mjmeli/ha-duke-energy-gateway

Forced MQTT disconnect is causing HA to hang

mjmeli opened this issue · 0 comments

Started seeing this issue over the last couple of days. The MQTT connection is being forcefully closed, which causes it to attempt reconnect. However the reconnect call is not working and it is a blocking call.

2021-12-03 15:29:29 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2021-12-03 15:29:29 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2021-12-03 15:29:29 DEBUG (MainThread) [pyduke_energy.realtime] Socket readable, calling loop_read()
2021-12-03 15:29:29 DEBUG (MainThread) [pyduke_energy.realtime] Socket closed
2021-12-03 15:29:29 ERROR (MainThread) [pyduke_energy.realtime] MQTT disconnect error, result code: The connection was lost. (This may not be accurate)
2021-12-03 15:29:29 WARNING (MainThread) [pyduke_energy.realtime] Unexpected MQTT disconnect. Attempting reconnect.

I've had to kill the docker container to fix this.