-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
MQTT not reconnecting if disconnected from broker #8589
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I seem to have a similar issue. Home Assistant release (hass --version): Python release (python3 --version): Component/platform:
Description: Also if I try to turn on the switch via HA I see that the on command is sent to mosquitto (even though its already on) but the status is still not updated in HA. Let me know if I can provide any other useful information. |
Experiencing the same with 0.49: After the MQTT connection was interrupted, Home Assistant reconnects to the broker, but ignores incoming messages to the Looks like Home Assistant is not correctly re-subscribing after connection interruptions. |
Seems like the same issue as #7958 |
I'm having a similar issue on 0.52.1 with HA and Mosquitto and a MQTT Cover. When HA restarts, it loses the status of the Cover, though it can still publish messages to the command_topic (whereupon it will receive a new status update and then the GUI will show the correct state). I'm not sure if this is limited to the MQTT Cover platform, as an MQTT Binary Sensor I've set up to monitor the same status_topic is showing the correct state after HA restart. It appears that the MQTT Cover is ignoring the fact that there is a retained message on the status_topic with the correct state but the Binary Sensor is not. |
Could be in fact related to this paho bug: eclipse-paho/paho.mqtt.python#208 |
Just an update after further testing: the problem appears to be mqtt platform wide and not just with the cover - it just appeared that way to me since the cover's state with no retained message is set to "unknown" while the Binary sensor's state defaults to "off". It may be worth standardizing this across all mqtt devices to "unknown" so as not to mislead users into thinking their device has an accurate state when it may not. I may look into doing just this and raising a pull request at some point. |
I suspect I'm also hit by this bug. The paho bug eclipse-paho/paho.mqtt.python#208 has just been (supposedly) fixed. I think we should try upgrading our paho installation as soon as they release the fix and see if that fixes the issue. |
pahoo have been upgraded to 1.3.1 by #9874 may be worth re-testing this issue using the latest bits. |
#10133 claims to have fixed this issue. Perhaps this issue should be closed? |
Home Assistant release (
hass --version
):0.49
Python release (
python3 --version
):Python 3.5.2
Component/platform:
mqtt
Description of problem:
A few days ago I have restarted my MQTT broker during system maintenance.
I noticed about 15-30 minutes later that my MQTT-based items were no longer being updated.
The logs in the HA interface mentioned
I had to restart HA in order to get MQTT back to work properly.
Expected:
Problem-relevant
configuration.yaml
entries and steps to reproduce:The text was updated successfully, but these errors were encountered: