Testing OpenHAB with Domoticz via MQTT

Hi Ankan,

Thanks a lot for your explanations. At least, now, I understand the structure of your MQTT action with the JSONpath and the regex to filter !

After 4 hours of investigation (tests, retests, reboots, readings and almost despair), I finally made it work. I’ve not yet tried the steps with the Cloud, etc., but at least I get reflected devices between domoticz and openhab…
What helped me, if it can help others…

broker.url=tcp://localhost:1883
broker.user=openhabian
broker.pwd=abcdefg

but in Ankan’s examples, he uses another name:

mqttBroker.url=tcp://localhost:1883
mqttBroker.user=openhabian
mqttBroker.pwd=abcdefg

as long as I kept the default, the domoticz devices were not detected by openhab… and once I made the change, it worked…
And I realized that Ankan had briefly mentioned that fact, but I had not understood the importance of that short statement…
The weird thing is that the test switch created as per tutorial mentioned above is still working despite its definition in items is:

Code: Select all

Switch MQTT_Test "Testing..." { mqtt="<[broker:testing/mqtt/topic:state:default], >[broker:testing/mqtt/back-topic:command:*:default]" }

thus using “broker” name instead of “mqttBroker”… I don’t know why this one is still working.

So, Ankan, thanks a lot !!! I hope I’ll face less issues with the next steps. :roll: I must admit that I find openHab far more obscure and complex than Domoticz.

As a recap for newcomers to openhab and MQTT like me, here are a couple links I found interesting to duplicate the trick from Ankan: