Mosquitto errors

You can test the Mosquitto MQTT Broker with the following commands:

Open a ssh login in one window and subscribe to all topics under openhab:

mosquitto_sub -u openhab -P habopen -t openhab/#

Open another ssh login in another window and publish a message (e.g. ON) to a topic (e.g. command) under openhab:

mosquitto_pub -u openhab -P habopen -t openhab/command -m ON

On the first window with the subscription, you should see the published message (ON)

Does this simple test work? (if yes: your MQTT Broker is working fine and you need to check the openHAB2 configuration of the MQTT Binding again)

Ps: You will need to have apt-get install mosquitto-clients for these pub & sub commands to work.

1 Like