connection error setting up MQTT connection
Posted: Tuesday 25 June 2024 13:29
Running on latest Beta on a RPi 3 (uodating basically daily), I run into the following issue since June 23rd (currently on 16097). I try to setup a MQTT connection from a python plugin (legacy framework) using the Domoticz Connection object, and Iget now a 'connection refused' status with code 111.
Code to setup the connection:
Then the onConnect method has the following log line:
Producing this output:
2024-06-25 11:40:29.485 fan slaapkamer: onConnect called: Connection 'Name: '192.168.86.23', Transport: 'TCP/IP', Protocol: 'MQTT', Address: '192.168.86.23', Port: '1883', Baud: -1, Timeout: 0, Bytes: 0, Connected: False, Last Seen: 1970-01-01 01:00:00, Parent: 'None'', Status: '111', Description: 'Connection refused'
Obviously I checked: the address is reachable from the Pi. Nothing changed on the MQTT server side.
Did anything change on the implementation of the Connection object?
Code to setup the connection:
Code: Select all
protocol = "MQTTS" if self.port == "8883" else "MQTT"
self.mqttConn = Domoticz.Connection(Name=(protocol + " to " + self.address), Transport="TCP/IP", Protocol=protocol, Address=self. Address, Port=self. Port)
self.mqttConn.Connect()
Code: Select all
Domoticz.Debug("onConnect called: Connection '"+str(Connection)+"', Status: '"+str(Status)+"', Description: '"+Description+"'")
2024-06-25 11:40:29.485 fan slaapkamer: onConnect called: Connection 'Name: '192.168.86.23', Transport: 'TCP/IP', Protocol: 'MQTT', Address: '192.168.86.23', Port: '1883', Baud: -1, Timeout: 0, Bytes: 0, Connected: False, Last Seen: 1970-01-01 01:00:00, Parent: 'None'', Status: '111', Description: 'Connection refused'
Obviously I checked: the address is reachable from the Pi. Nothing changed on the MQTT server side.
Did anything change on the implementation of the Connection object?