Well, all the Z-wave “Things” are configured and migrated from domoticz and working very nice, no problems here.
Next step for me is on how to connect node-red over mqtt with openhab.
I followed this guide: https://www.smarthomeblog.net/mqtt-openhab/ which helped me further, the broker is configured and node-red is connected to the broker but now, what are next stepts ?
From domoticz it was quite easy, every device action, sensor reading etc was configure to publish on topic domoticz/out , every action from node-red could write to domoticz/in.
This was an easy configuration which I was very happy with, al the filtering of devices was done in node-red, worked great.
Is a configuration like that possible in OpenHab ? I like to keep as much intelligence as possible in node-red, do if openhab can be configured to do the same, it would be nice…
It’s my understanding that NodeRed has an openHAB node so there is no need to use MQTT for this. NodeRed supports OH natively.
The MQTT 1.x binding has a mode called EventBus which will allow OH to publish/subscribe to a topic that includes all events that occur on Items on the event bus. There is a way to do this using a Rule and the MQTT 2 binding as well.
The problem with the opehab nodes in node-red is that this is a node for every “thing” and, that it is not generic. I prefer to use mqtt because it is a standard and allows me to switch controllers by seperating things.
I found another post, explaining the use of the standaard mqtt nodes with openhab, I’ll try that first.
I use the MQTT 1.x Eventbus, it works like you describes the domoticz in/out setup. I also use an external system (CDP Studio) for the logic, alarm handling, logging, standalone GUI, etc.) i.e. use OpenHAB as a bridge to all the bindings. I assume this was how OpenHAB started out in the first place. I did not see an easy way to set that up with the 2.x MQTT binding, so sticking to the 1.x, which in any way is just a few configuration lines, and works flawlessly.
Thanks, I already figgured out that using the eventbus is the way to go…
Still, that does not provide payloads like I’m used to get (in JSON)
I’m pretty used to getting data in like this:
Well, I do not have any interest in working via the rest API (then I can as well replace the mqtt nodes in node-red for the openhab nodes).
The nice thing of mqtt is that it has very little overhead and that it is a standard.
If mqtt implementation in openhab 2.5x is too complicated then I think I’ll wait a little longer…
There is only an mqtt2 binding in openHAB. A bindings tasks is to offer external integration into openHAB, not the other way round. To use an external tool you need another kind of addon called “IO Service” (like HomeKit, Hue Emulation, Alexa, Google Home).
So what you need is an MQTT IO Service. The mqtt1-eventbus addon is an IO service and therefore works best in this scenario.