Lost all MQTT connection

So long story short, I used to have a couple of devices working seamlessly with OH2 using mosquito, I was having problem with a couple of them disconnecting from the server so I’ve opted to upgrade my system to OpenHab 2.4… now nothing works anymore.

I’ve re-installed (for a zillion time) Mosquitto and I’m FINALLY able to connect to it using MQTTfx, weird thing I can connect to it without any user:password if I setup user:password there is no connection at all… anyway I’m publishing message and I can subscribe to but now my OH2.4 doesn’t see nothing.

Just fo a test I have a switch item that tells me if the lights are on:
Switch Garage_Light_Sensor “Garage Light” (Garage, Lights) {mqtt="<[mosquitto:Boubounouche/Garage/LightSensor:state:default]"}

If I published to Boubounouche/Garage/LightSensor I can see it in MQTTfx but nothing goes into OH2.4 I’ve read the tutorials on setting up the MQTT broker and is is online but nothing works anymore.

Is there something changed from the previous version that I should be aware off?

Thanks for any input.

mqtt1 and mqtt2

Yep… that’s what I followed…

That blog contains obsolete and incorrect information.

The upgrade to OH 2.4 caused the MQTT binding to be updated to the 2.4 release as well (this was unforseen when OH 2.4 was released). However, its configuration is totally different from the MQTT 1.x binding. To quickly restore things to a working state, I would recommend installing the MQTT 1.x binding (both the 1.x and 2.4 binding can peacefully co-exist).
When things are working again, then go through the topics here on the forum. I think consensus is that if you’d like to use the MQTT 2.x binding then the best thing to do is upgrade to openHAB 2.5 M1. It contains many fixes to the MQTT 2.x binding.

Okay I’ll install the 1.x binding.


Now I’ll try to make the user:password to work and understand why all my ESP8266 connect once or last a day then disconnect from the server, I think the easiest way would be to program a reset like after 5min to reconnect to the Mosquito server.

1 Like