MQTT Binding Not Working - Nothing in Openhab Log

This was all working, but seems to have stopped.

It seems my MQTT server it working, but not communicating with Openhab. I can send commands via terminal and my devices are connecting, but nothing showing up in openhab logs.

I’ve changed nothing since it was last working. I’ve tried restart OH, but no luck. How can I debug/trouobleshoot this?


Use the console and set the mqtt binding to DEBUG or TRACE and see if you get any additional info that helps.

Also what version of OH, mqtt binding and broker are you using?

Really “Nothing in Openhab Log” at that reboot?
Your MQTT binding has got uninstalled somehow.
It should produce connection messaging in openhab.log at boot up.

How do I do this?

OH2.5. I just set up MQTT up last week installed via openhabian-config

I’ve deleted the MQTT broker things in paperUI.

I’m now seeing the log react to my terminal commands:
mosquitto_pub -u oh -P oh -t "gs1/temperature" -m 105

2020-05-08 20:52:56.471 [vent.ItemStateChangedEvent] - GardenSensor1_Temperature changed from 100.0 °F to 105.0 °F

But my it’s not responding to my device ESP8266 MQTT device. The device is not showing any errors while connecting and it seems to be sending data up… Is there a way to monitor MQTT broker via terminal to verify the connection and data being sent?

You speak of “the log”. Just to be sure, there are two interesting logs. The events.log such as you posted a snippet of, and the openhab.log which would include interesting messages from bindings.

Um, okay. So …

Why is that now surprising? If openHAB is not given a broker Thing, it will not connect to the broker. If it does not connect to th ebroker, it cannot send or receive MQTT messages.

You can I think see connections by looking at the broker’s own log, Mosquitto or whatever you use.

A toll like mqtt.fx can connect to your broker and subscribe itself to topics you are interested in. You can manually send messages too.

1 Like

I still don’t understand the first issue, but it seems resolved after recreating everything. I’m moving on…

I just used this command to subscribe to all topics in mosquitto via terminal:
mosquitto_sub -u user -P pass -t "#" -v

Regarding the arduino, I removed my display and went to Serial for debugging. With the display, I had a delay after publishing data before the device went to sleep so you can read the data on the display. I removed the delay since it was not necessary for Serial…Turns out, the delay is necessary in order to get everything published. I haven’t fiddled much, but I’m at 1000ms delay after publishing to three topics, then sleep.