Code Monkey home page Code Monkey logo

iobroker.js-controller's Introduction

Logo

ioBroker.js-controller

==================

NPM version Downloads Tests

NPM

Here you can find change log.

This is a main controller, that starts all other ioBroker adapters.

Official Web-Site: http://iobroker.net

Forum: http://forum.iobroker.net

Trello: https://trello.com/b/q0SZKdfW/iobroker-whiteboard

ioBroker wiki: https://github.com/ioBroker/ioBroker/wiki/Home-(English)

Explanation of the concept: https://github.com/iobroker/iobroker


This is a Javascript/Node.js implementation of an ioBroker controller.

Manual installation of ioBroker.js-controller on Debian based Linux (Raspbian, Ubuntu, ...)

Install Node.js

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install curl build-essential
sudo curl -sL https://deb.nodesource.com/setup_6.x | sudo bash -
sudo apt-get install -y nodejs

Install ioBroker on linux

sudo mkdir /opt/iobroker
sudo cd /opt/iobroker
sudo chmod 777 /opt/iobroker
sudo npm install iobroker --unsafe-perm

After that the ioBroker should run and be available in browser under http://<ip>:8081/

Start ioBroker controller on linux

  • run ./iobroker start in the ioBroker directory to start the ioBroker controller in the background
  • watch the logfile tail -f log/iobroker.log

or

  • run node node_modules/iobroker.js-controller/controller.js to start the ioBroker controller in foreground and watch the log on console

Install js-controller on windows

  • Create and change to the directory under which you want to install ioBroker.

    mkdir C:/iobroker cd C:/iobroker

  • install npm packet from created directory

    npm install iobroker

Start ioBroker controller on windows

  • run iobroker start in the ioBroker directory to start the ioBroker controller in the background console
  • check the logfile node_modules/iobroker.js-controller/log/iobroker.log

or

  • run node node_modules/iobroker.js-controller/controller.js to start the ioBroker controller in foreground and watch the log on console

Admin UI

The admin adapter starts a web-server that hosts the Admin UI. Default port is 8081, so just open http://<iobroker>:8081/ If port 8081 is occupied, you can install second Admin UI on alternate port and change port for first admin UI:

  • run ./iobroker add admin --enabled --port 8090 and go to the http://<iobroker>:8090/. Of course you can change port 8090 to other one.

Using REDIS as States-DB

There is a possibility to use REDIS as states database. It is reasonable to do that for big installations or for systems with performance problems. It is possible to switch anytime between REDIS and In-Memory Javascript DB. The only problem, that all states must be updated by adapters again (values will be lost). Objects and configuration are not affected.

To install REDIS on linux/debuan just write: apt-get install redis-server .

If you plan to use mulithost installation you must allow connections to redis from any address (default only 127.0.0.1). To do that edit file /etc/redis/redis.conf (sudo nano /etc/redis/redis.conf) and replace bind 127.0.0.1 with bind 0.0.0.0 . Don't forget to restart redis after that. (sudo /etc/init.d/redis-server restart)

To install on windows download latest release here https://github.com/MSOpenTech/redis/releases.

To switch to REDIS write in the console following:

>iobroker stop
>iobroker setup custom

And then:

Type of objects DB [file, couch, redis], default [file]:
Host of objects DB(file), default[127.0.0.1]:
Port of objects DB(file), default[9001]:
Type of states DB [file, redis], default [file]: redis
Host of states DB (redis), default[127.0.0.1]:
Port of states DB (redis), default[6379]:
Data directory (file), default[../../../iobroker-data/]:
Host name of this machine [FastPC]:
creating conf/iobroker.json

Note that in fourth line it was entered redis.

Now ioBroker can be started. Of course redis must be first installed and firewall rules must be checked.

To switch back to JS States write the same commands again, just instead of redis in fourth line write nothing and press ENTER.

License

The MIT License (MIT)

Copyright (c) 2014-2018 bluefox [email protected],

Copyright (c) 2014 hobbyquaker

iobroker.js-controller's People

Contributors

alcalzone avatar anunezde avatar apollon77 avatar buzzy1337 avatar cernst1980 avatar germanbluefox avatar hobbyquaker avatar homoran avatar husky-koglhof avatar jens-maus avatar ldittmar81 avatar parns avatar pmant avatar smiling-jack avatar soef avatar stabilostick avatar steiger04 avatar twonky4 avatar ykuendig avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.