|
Post by papa on Feb 18, 2018 15:41:49 GMT
Install OpenHAB-MQTT on Synology NASAfter some struggles, my son recently got OpenHAB / Mosquitto / MQTT working on his Synology NAS (Network Attached Storage). I wasn't able to help him much because the Synology NAS runs a special flavor of Linux. Specific to the Synology NAS, this post gives what worked for my son.github.com/openhab/openhab-syno-spk/releases Download and install the latest OpenHAB.spk package Install Mosquitto from Synology Package Center Next: Possible Entries for Any OpenHAB / Mosquitto / MQTT configuration AFTER OpenHAB & Mosquitto are installed
|
|
|
Post by papa on Feb 18, 2018 15:43:59 GMT
The following tweaked & expanded version of what my son wrote should apply to any OpenHAB / Mosquitto / MQTT configuration AFTER OpenHAB & Mosquitto are installed.
Include Legacy 1.x Bindings Add this line to services/addons.cfg remote = true OR Turn on -> PaperUI/Configuration/System/Add-on Management/Include Legacy 1.x Bindings
In OpenHAB, install MQTT Binding In services/addons.cfg after "binding = ", add this to the comma separated list: mqtt1 OR in PaperUI, select MQTT in Add-ons/Bindings
In services/mqtt.cfg, adapt these lines to your situation: mosquitto.url=tcp://[ IP address or name of computer hosting Mosquitto ]:1883 mosquitto.clientId=openhab
^^ The above means ... If Mosquitto's host computer has an IP of 192.168.1.69, your first entry could be mosquitto.url=tcp://192.168.1.69:1883 If Mosquitto's host computer has a name of Dell, your first entry could be mosquitto.url=tcp://Dell:1883
Next: More possibilities for any OpenHAB / Mosquitto / MQTT configuration AFTER OpenHAB & Mosquitto are installed
|
|
|
Post by papa on Feb 18, 2018 15:48:29 GMT
Continued: The following tweaked & expanded version of what my son wrote could apply to any OpenHAB / Mosquitto / MQTT configuration AFTER OpenHAB & Mosquitto are installed.
Samples for a items/home.items file to control EcoPlugs Switch Act_Node05 {mqtt="<[mosquitto:home/esp_gw/nb/node05/dev16:state:default::],>[mosquitto:home/esp_gw/sb/node05/dev16:command:*:default]"} Switch Act_Node10 {mqtt="<[mosquitto:home/esp_gw/nb/node10/dev16:state:default::],>[mosquitto:home/esp_gw/sb/node10/dev16:command:*:default]"}
Note: You can have more than one .items files & the name before .items is arbitrary. The above sample items are for user interface switches to control EcoPlugs programmed to work with this forum's programming. In the files mqtt.cfg & home.items, mosquitto is an arbitrary identification, but one must use the same identification in both files. "mosquitto" is the name we use on this forum.
Sample for a sitemaps/home.sitemap file sitemap home label="Home" { Switch item=Act_Node05 label="Outlet 01" icon="poweroutlet" Switch item=Act_Node10 label="Outlet 02" icon="poweroutlet" }
|
|
|
Post by papa on Feb 18, 2018 15:52:53 GMT
Note: From the above posts, if everything is working,
to display & use virtual switches for Node05 & Node10 EcoPlugs, one could use the following in a browser ... (Replace "Dell" with the host name of your computer hosting OpenHAB & Mosquitto. Replace 192.168.1.69 with the IP address of your computer.)
http://Dell:8080/basicui/app?sitemap=home
OR
http://192.168.1.69:8080/basicui/app?sitemap=home
|
|