Hey,
I use openhab 1.8.1 at my raspberry pi and try to use the mqtt binding, placed at the addon dir.
At the same raspberry a mosquitto mqtt broker is running. I’ve tested this server a several time with different tools (mosquitto_pub, mosquitto_sub, MQTT.fx…) everything is working fine.
I don’t believe your MQTT topics are matched correctly. If the OH item is subscribed to “test/temperature”, you need to publish your topic to “-t test/temperature”.
To publish messages i use the official mosquitto test server (as above in openhab.cfg) and MQTT.FX.
This is a very simple and reproducible example. Why it won’t work?
It’s odd that you are seeing the event bus binding start, but the openhab.cfg you provided does not have that configured.
Also, have you tried mosquitto_sub to make sure your mosquitto_pub commands are making it to the broker?
Lastly, is mosquitto set to listen for connections on localhost, and does localhost resolve to the loopback address 127.0.0.1? I assume you are running openHAB and mosquitto on the same machine?
Also, have you tried mosquitto_sub to make sure your mosquitto_pub commands are making it to the broker?
Yes, I subscribed the topic via mosquitto_sub. On the local machine as well as on an other machine. Also I used mqtt.fx. Both working fine and show my messages.
Lastly, is mosquitto set to listen for connections on localhost, and does localhost resolve to the loopback address 127.0.0.1? I assume you are running openHAB and mosquitto on the same machine?
For the system in my first post: yes. Mosqitto and openHAB are running on the same machine. Since it works with mosquitto_sub, I suppose mosquitto settings are right. Loopback address is set. But I also tried 127.0.0.1 at openhab.cfg.
Please also read my last post. I build a whole new system. Stripped down to a simple mqtt sample with an external mosquitto server. Even that does not work.