User Tools

Site Tools


openhab:openhab-en

openHAB REST API

ContentCommand StationsopenHAB



Work In Progress


Description

To be able to use devices in the home automation, SmartHome, a bridge is needed to all the diversity of protocols. There seems to be no standard.
If openHAB is running at home, and is configured, items can be controlled by Rocrail.


Setup

openHAB

See the openHAB WEB site for detailed instructions on how to install and setup an openHAB instance.

Rocrail

Add a controller with the "openhab" library.

  • Set the hostname to the PC wehre openHAB is running.
  • Set the port to 8080.


Development

Implemented

  • Output ON/OFF.
  • At ON the Value is used for setting the brightness. The value must be in range o 1…100.

ToDo List

  • Color of bulbs.
  • MQTT action to inform Rocrail of an event.


Addressing

Output

The output is referenced with the UID name, the address field can be left to zero.
The UID name is in the openHAB context the Item name.

Item example

conf/items/default.items:

Dimmer Hobby_Test "Testlamp1" <dimmer> { channel="hue:0100:0017881215cd:10:brightness" }



Raspbian Install

wget -qO - 'https://bintray.com/user/downloadSubjectPublicKey?username=openhab' | sudo apt-key add
echo 'deb https://dl.bintray.com/openhab/apt-repo2 stable main' | sudo tee /etc/apt/sources.list.d/openhab2.list
sudo apt-get update
sudo apt-get install openhab2
sudo apt-get install openhab2-addons
sudo /bin/systemctl start openhab2.service

Autostart

(Optional)
Configure Autostart:

sudo systemctl daemon-reload
sudo systemctl enable openhab2.service


openhab/openhab-en.txt · Last modified: 2018/11/12 08:56 by 127.0.0.1