NOTE: This package is no longer maintained. I've moved my Free@Home setup to openHAB with this binding: https://github.com/ruebox/openhab2-addons/tree/feature_binding_freeathome/addons/binding/org.openhab.binding.freeathome
Custom Interface / API for the Busch Jäger free@home system (home automation).
- Node.js 5.5 (tested, earlier and later versions might work; 10.7 is currently being successfully tested so far)
The following Node.js modules:
- body-parser
- cors
- express
- md5
- mysql (optional)
- node-xmpp-client
- nodejs-websocket
- suncalc
- install node.js: https://nodejs.org/
- clone the repository: git clone [email protected]:sstadlberger/home.git
- cd into the project root and install the node modules: npm install
- configure the config.js, data.json and structure.json files (see the files themselves and below for more information)
- run it with: node home.js (possible options: --logLevel=debug --useWeather --useDB --useHomematic)
The config files are located all in config/
- create a copy of config.default.js and rename it to config.js
- fill in config.bosh & config.websocket
The JID can be found here: http://yourSysAPIP/settings.json - If you want to use the weather feature you need to create an API key here:
https://darksky.net/dev
1000 requests per day are free, home uses normally 144 per day (one request every 10 minutes)
- create a copy of data.default.json and rename it to data.json
- unless you use custom sensors or actuators (i.e. self built), you don't need to change anything
- create a copy of structure.default.json and rename it to structure.json
- modify the file so that it matches your home layout (this is mainly used for a not yet released visual frontend)
- this is optional
- run the file in your mySQL database to create the table structure
- this currently only used to store the data of a Landis+Gyr E350 powermeter
When the software is running, you can call into the REST API using a browser. For example, to switch a light on: http://yourLocalIP:8080/set/switch/ABB123456789/ch0000/on ABB123456789 is the serial number of the actuator you're trying to control.
To see all data from an actuator use the following URL (you can set a custom port number other than 8080 via the config.js): http://yourLocalIP:8080/info/ABB123456789/
An overview of all available commands can be found in the REST API and the SysAP API (parse function)
Connect with a websocket client on port 8001 You will automatically receive status updates in JSON format.
To switch on a light use the following command syntax: set/switch/ABB123456789/ch0000/on ABB123456789 is the serial number of the actuator you're trying to control.
An overview of all available commands can be found in the Websocket API and the SysAP API (parse function)
- Only one single user can be logged in at the same time. When you login in the webinterface as the same user you are using for the API you will be disconnected. It is recommended that you create an extra user just for the API which does not have admin status.
- After a restart of the SysAP the user has to login once into the webinterface before the user can access the API.
- Only actuators that are used in the webinterface can be accessed by the API. If an actuator is not used (i.e. dragged on the floor plan) it can not be controlled with the API.
- see here for more information: https://github.com/sstadlberger/home/issues
Add the ability to execute actions at certain times or intervalls. For example:
- Switch the light off in 10 minutes
- Open the shutters at 7:00
- Turn on the ambient light at 30 minutes after sunset
Add the abilities to exectute actions at certain conditions. For example:
- Add a timer for 10 minutes after Light has been switched on
- Close the shutters if the light has been switched on after sunset
Add support for Homematic sensors and actuators to enable easy expansion of the system.
Native support for Philips Hue, including switches and motion sensors
Development is currently on hold, depending on the release of the Busch Jaeger version
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
Version numbering will start when the first set of features is complete.