OpenHAB2 Plugin

I’ve created a plugin which uses the Rest API of OpenHAB2 to read the items and interact with it.

Prequisites:
You have to put all the items you want to see in the plugin in a OpenHAB Group. When you install the plugin you will be asked for the Base URL of OpenHAB (usually something like http://192.168.1.xxx:8080) without trailing slash and the name of the OpenHAB Group containing the items. If you configured your group fine the devices will be read from OpenHAB and you should see them in the plugin. If no devices are found, check the log for errors. Most probably you have some spelling error in the group or URL.

How to use it
Each device you see has 2 attributes: “Command” and “State”. This directly relates to OpenHAB2 commands and states of the items. To execute an action set the “.Command” attribute to the value of an OpenHAB2 command of the device. On the other hand the plugin is polling the “State” of the items from OpenHAB2 and updates the “.State” attribute accordingly. You can also update a “State” field to a new value if this is required by some rules or triggers in OpenHAB2 but this will not trigger any direct action in OpenHAB2. It just updates the Items state value.

Limitations
The plugin does not support any capabilities as there are only few of them in OpenHAB2 anyhow and they do not match the HomeRemote ones and it’s generally not needed, I don’t even know if they are exposed. Also channels of OpenHAB2 items are not directly supported. Of course feel free to improve on this points if you have a need and share it but I think for 99% of the cases the plugin should do fine.

Download plugin here.
openhab.plugin (2.7 KB)

2 Likes