MQTT messages - Where are they going?

Hi there,

I’ve setup mosquito and I have setup some sensors all sending messages into the broker which is also running on my pi2

I have also got the sensors showing their values in my sitemap, which is all great, So I think its all working as I should be, however I was expecting to see the mqtt messages appear on the openhab events log as they come into my mqtt broker but as far as I can see they are not showing up in the events log, when i watch it updating.

I see the messages coming into MQTT fx so I know they are getting through to the broker.

I’ve been playing with the Event Bus Binding Configuration as it was my understanding that’s where I need to subscribe to the mqtt topic?? I’m really struggling to understand this part of the setup, I’ve read through the wiki so many times and tried so many different configs but still no messages appear in the logs. Should I me seeing mqtt updates in the openhab events log??

Does the events log get written to a file?

MQTT message do not show up in the logging. You may be able to add it modifying the logback.xml but I’m not sure of the line needed. Somebody else may know it.

You can see the events and openhab logs in openhabdirectory/logs/

In my logback_debug.xml I use:

        <logger name="org.openhab.binding.mqtt" level="DEBUG" />
        <logger name="" level="DEBUG" />

However, this does not show the actually received messages. It only informs about subscribing to the broker, etc.

The openHAB log shows also some info messages for the sensor values, anytime there is a new message from the broker:

20:29:24.905 [INFO ] [runtime.busevents             :26   ] - ebus_pump_pwr state updated to 0
20:29:24.952 [INFO ] [runtime.busevents             :26   ] - ebus_t_in_aim state updated to 19.00
20:29:24.994 [INFO ] [runtime.busevents             :26   ] - ebus_t_in_now state updated to 21.00

I do not know if this is the default behaviour for MQTT binding or if it may have been triggered by the JDBC persistence binding (which I use to store the readings to SQLite).

use a program like mqtt fx to follow the messages. just connect to your mosquitto server, and subscribe to # to see all messages. that way you can point the mqtt broker in openhab to where the messages are found.