Issue with Openhab 1.8.2 - MQTT not working anymore

I today updated openhab from 1.8.1 to 1.8.2 and now my mqtt switches do not update anymore…
so I can see an update at the broker (mosquitto) with 1.00 or 0.00 as before…but the switches in the gui do not show any reaction…

anyone else having the same problems…did already check the complete config of mqtt, the switch mapping, but all is again in the same place as before.

Regards
Norbert

I read in another topic that there is a problem with update of switch in classic UI with openHAB 1.8.2.
So if you are using classic UI, the problem is probably not the MQTT binding but classic UI.

1 Like

is this related…i found the following issue…

odroid@MiOdroid:~/openhab/logs$ cat openhab.log |grep MQTT
2016-03-26 09:03:55.994 [INFO ] [.io.transport.mqtt.MqttService] - MQTT Service initialization completed.
2016-03-26 09:03:55.995 [INFO ] [o.i.t.m.i.MqttBrokerConnection] - Starting MQTT broker connection 'mosquitto’
2016-03-26 09:09:02.395 [ERROR] [o.i.t.m.i.MqttBrokerConnection] - MQTT connection to broker was lost
2016-03-26 09:09:02.402 [ERROR] [o.i.t.m.i.MqttBrokerConnection] - MQTT connection to ‘mosquitto’ was lost: Connection lost : ReasonCode 32109 : Cause : null
2016-03-26 09:12:06.335 [INFO ] [.io.transport.mqtt.MqttService] - MQTT Service initialization completed.
2016-03-26 09:12:06.336 [INFO ] [o.i.t.m.i.MqttBrokerConnection] - Starting MQTT broker connection 'mosquitto’
odroid@MiOdroid:~/openhab/logs$

Not related to the known 1.8.2 issue regarding lack of updates in the UI. I suspect either there is a network or broker issue behind your highlighted log line.

I now switched back to 1.8.1…simply by holding an openhab_old folder…and here everything works fine, without any change in network or mosquitto. Just a guess, but it looks like somehting changed in 1.8.2 that does not forward the broker messages towards openhab…which of course is related to the Connection Lost message.
Regards

@norbert_jordan
Did you ever solve this? I just updated to 1.8.2 and now have no MQTT messaging at all, unrelated to switch bug referenced above…

I’m seeing problems with MQTT working for a while, dropping, and sometimes reestablishing a connection, and other times not. I’m running 1.8.1 on Linux, the MQTT broker is Mosquitto on a Raspberry Pi on the same local network.

2016-04-06 11:57:22.279 [INFO ] [o.i.t.m.i.MqttBrokerConnection] - Starting MQTT broker connection 'mqtt87' 2016-04-08 22:05:17.328 [ERROR] [o.i.t.m.i.MqttBrokerConnection] - MQTT connection to 'mqtt87' was lost: Connection lost : ReasonCode 32109 : Cause : Connection reset 2016-04-08 22:05:17.328 [INFO ] [o.i.t.m.i.MqttBrokerConnection] - Starting connection helper to periodically try restore connection to broker 'mqtt87' 2016-04-08 22:05:27.329 [INFO ] [o.i.t.m.i.MqttBrokerConnection] - Starting MQTT broker connection 'mqtt87' 2016-04-11 22:07:05.735 [ERROR] [o.i.t.m.i.MqttBrokerConnection] - MQTT connection to 'mqtt87' was lost: Connection lost : ReasonCode 32109 : Cause : Connection reset 2016-04-11 22:07:05.735 [INFO ] [o.i.t.m.i.MqttBrokerConnection] - Starting connection helper to periodically try restore connection to broker 'mqtt87' 2016-04-11 22:07:15.736 [INFO ] [o.i.t.m.i.MqttBrokerConnection] - Starting MQTT broker connection 'mqtt87' 2016-04-30 09:48:21.982 [ERROR] [o.i.t.m.i.MqttBrokerConnection] - MQTT connection to 'mqtt87' was lost: Connection lost : ReasonCode 32109 : Cause : Connection reset 2016-04-30 09:48:21.982 [INFO ] [o.i.t.m.i.MqttBrokerConnection] - Starting connection helper to periodically try restore connection to broker 'mqtt87' 2016-04-30 09:48:31.984 [INFO ] [o.i.t.m.i.MqttBrokerConnection] - Starting MQTT broker connection 'mqtt87' 2016-04-30 09:49:31.984 [INFO ] [o.i.t.m.i.MqttBrokerConnection] - Starting MQTT broker connection 'mqtt87'

The last line is repeated every minute until Openhab is restarted (in this case, several days later).
Mosquitto_sub successfully connects from the same machine openhab is running on; both the rPi and mosquitto have been up continuously since April 3.

1 Like

Similar observation from February?

You could get very verbose logging if you added

<logger name="org.openhab.io.transport.mqtt.internal.MqttBrokerConnection" level="TRACE"/>

to your logback.xml file. You could also add

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

for higher, binding level activity.

Mine is disconnecting on an irregular schedule. In the log snippet, it disconnect after 2 days (reconnected successfully), then another 3 days (reconnected successfully), then another 19 days (did not reconnect).

1 Like

similar behavior on openhab2.
disconnection every few minutes.