Hi,
I’m having trouble with MQTT Binding 2.x. I already read, I think, all the similar topics realed to this problem but i didn’t found a solution. So this is the problem:
I wan’t to connect to a remote MQTT broker out of my network, in this case the Adafruit broker using the platform https://io.adafruit.com
The bridge is connecting to the broker without errors
The MQTT thing used for the connection to the channels doesn’t work, I tried alternative scripts following the instructions of the topics found int the community but nothing has changed. I also tried with the Paper UI, all the channels topics are correct.
Which version of the MQTT binding are you using? 2.4, 2.5 M1, snapshot? There were many bugs in the 2.4 version so I’d recommend running at least the M1 version.
Sorry Birdie, the reply wasn’t send.
Yeah, I tried to do that test and the result was positive, everything works.
I already tried with Paper UI, following the instructions also on github where this problem is described more accurately.
I’m switching from MQTT binding 1.x, with that version the channels and the broker worked. I want to use the new version for fun.
With openHAB 2.5 M1 MQTT 2.x seems to work, but not smoothly as 1.x version. To get the Bridge for the broker online I had to modify the file a first time, getting some errors, then a second time bringing it back as the original. So my code had to work the first time.
Anyway, only for info, these are the errors:
20:50:46.552 [INFO ] [ransport.mqtt.internal.ClientCallback] - MQTT connection to ‘io.adafruit.com’ was lost
org.eclipse.paho.client.mqttv3.MqttException: Connection lost
at org.eclipse.paho.client.mqttv3.internal.CommsReceiver.run(CommsReceiver.java:181) [269:org.eclipse.paho.client.mqttv3:1.2.0]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
at java.lang.Thread.run(Thread.java:748) [?:?]
Caused by: java.io.EOFException
at java.io.DataInputStream.readByte(DataInputStream.java:267) ~[?:?]
at org.eclipse.paho.client.mqttv3.internal.wire.MqttInputStream.readMqttWireMessage(MqttInputStream.java:92) ~[?:?]
at org.eclipse.paho.client.mqttv3.internal.CommsReceiver.run(CommsReceiver.java:133) ~[?:?]
… 7 more
20:50:46.572 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - ‘mqtt:broker:adafruit’ changed from OFFLINE to OFFLINE (COMMUNICATION_ERROR): Connection lost
Last estimates were the end of the year. But if you are looking to upgrade, there really is no reason not to upgrade to 2.5 M4 unless you use Hue emulation. The milestone releases are just about as stable as the releases.