knolleary / pubsubclient

A client library for the Arduino Ethernet Shield that provides support for MQTT.
http://pubsubclient.knolleary.net/
MIT License
3.84k stars 1.47k forks source link

MQTT Issue With Latest MQTT Broker Add-on in Home Assistant #866

Open mmoci opened 3 years ago

mmoci commented 3 years ago

Yesterday my ESP devices on MQTT stop working. This issues seems to be related with update of home assistant add on for mqtt broker which I am using.

On a my ESP devices I am using pubsubclient library. According to traces form device I can see that it actually manages to connect to MQTT server:

13:10:40.466 -> 192.168.0.10
13:10:41.448 -> Attempting MQTT connection...
13:10:41.495 -> MQTT client state: 0
13:10:41.495 -> Publishing topic [/light/bedroom/desk/availability] payload: online
13:10:41.495 -> Publishing topic [/light/bedroom/desk/state] payload: OFF
13:10:41.542 -> Publishing topic [/light/bedroom/desk/brightness] payload: 0
13:10:41.542 -> Subscribing on topic [/light/bedroom/desk/state/set]
13:10:41.542 -> Subscribing on topic [/light/bedroom/desk/brightness/set]

all topics seems to be published and subscribed. On MQTT broker add on in home assistant I can see following traces: 1621509042: New client connected from 192.168.0.10 as /light/bedroom/desk/ (p2, c1, k15, u'myUserName'). which I would say indicate that devices are connected on mqtt broker.

However, it seems like messages are not exchanged. Can you please help?

cyber-junkie9 commented 3 years ago

working fine here just sometime stops subscribing , i have to restart add-on or esp to get it working back change "/light/bedroom/desk/" to something short

EmbeddedDevver commented 3 years ago

Did you ever resolve this?