The Yolink integration uses MQTT for communications between it’s hub and HA. I have 66 devices talking to the Hub but the single crfitical MQTT connection between the yolink hub and HA keeps getting disonnected I am told by something else in HA.
Running this command:
sudo tail -f /usr/share/hassio/share/syslog | grep 'mqtt\|mosquitto\|yolink\|YOLINK\|recover'
At a command line over the last couple of hours results in:
Oct 5 11:36:11 kruse-pi homeassistant[746]: #033[31m2023-10-05 11:36:11.259 ERROR (MainThread) [yolink.mqtt_client] yolink mqtt client disconnected!#033[0m
Oct 5 12:01:10 kruse-pi homeassistant[746]: #033[32m2023-10-05 12:01:10.517 INFO (MainThread) [homeassistant.components.yolink.coordinator] Fetching yolink data recovered#033[0m
Oct 5 12:02:28 kruse-pi homeassistant[746]: #033[32m2023-10-05 12:02:28.379 INFO (MainThread) [homeassistant.components.yolink.coordinator] Fetching yolink data recovered#033[0m
Oct 5 13:07:14 kruse-pi homeassistant[746]: #033[31m2023-10-05 13:07:14.336 ERROR (MainThread) [mqtt] failed to receive on socket: [Errno 104] Connection reset by peer#033[0m
Oct 5 13:07:14 kruse-pi homeassistant[746]: #033[31m2023-10-05 13:07:14.337 ERROR (MainThread) [yolink.mqtt_client] yolink mqtt client disconnected!#033[0m
Oct 5 13:08:58 kruse-pi homeassistant[746]: #033[31m2023-10-05 13:08:58.948 ERROR (MainThread) [homeassistant.components.yolink.coordinator] Timeout fetching yolink data#033[0m
Oct 5 13:09:33 kruse-pi homeassistant[746]: #033[31m2023-10-05 13:09:33.386 ERROR (MainThread) [homeassistant.components.yolink.coordinator] Error fetching yolink data: #033[0m
Oct 5 13:09:55 kruse-pi homeassistant[746]: #033[31m2023-10-05 13:09:55.113 ERROR (MainThread) [mqtt] failed to receive on socket: [Errno 104] Connection reset by peer#033[0m
Oct 5 13:09:55 kruse-pi homeassistant[746]: #033[31m2023-10-05 13:09:55.115 ERROR (MainThread) [yolink.mqtt_client] yolink mqtt client disconnected!#033[0m
Oct 5 13:10:50 kruse-pi homeassistant[746]: #033[31m2023-10-05 13:10:50.216 ERROR (MainThread) [mqtt] failed to receive on socket: [Errno 104] Connection reset by peer#033[0m
Oct 5 13:10:50 kruse-pi homeassistant[746]: #033[31m2023-10-05 13:10:50.220 ERROR (MainThread) [yolink.mqtt_client] yolink mqtt client disconnected!#033[0m
Oct 5 13:12:24 kruse-pi homeassistant[746]: #033[32m2023-10-05 13:12:24.084 INFO (MainThread) [custom_components.mail_and_packages] Fetching Mail and Packages (smtp.gmail.com) data recovered#033[0m
Oct 5 13:19:15 kruse-pi homeassistant[746]: #033[31m2023-10-05 13:19:15.950 ERROR (MainThread) [mqtt] failed to receive on socket: [Errno 104] Connection reset by peer#033[0m
Oct 5 13:19:15 kruse-pi homeassistant[746]: #033[31m2023-10-05 13:19:15.952 ERROR (MainThread) [yolink.mqtt_client] yolink mqtt client disconnected!#033[0m
Oct 5 13:19:45 kruse-pi homeassistant[746]: #033[31m2023-10-05 13:19:45.347 ERROR (MainThread) [homeassistant.components.yolink.coordinator] Error fetching yolink data: #033[0m
Oct 5 13:20:11 kruse-pi homeassistant[746]: #033[31m2023-10-05 13:20:11.172 ERROR (MainThread) [mqtt] failed to receive on socket: [Errno 104] Connection reset by peer#033[0m
Oct 5 13:20:11 kruse-pi homeassistant[746]: #033[31m2023-10-05 13:20:11.173 ERROR (MainThread) [yolink.mqtt_client] yolink mqtt client disconnected!#033[0m
Oct 5 13:22:46 kruse-pi homeassistant[746]: #033[31m2023-10-05 13:22:46.547 ERROR (MainThread) [mqtt] failed to receive on socket: [Errno 104] Connection reset by peer#033[0m
Oct 5 13:22:46 kruse-pi homeassistant[746]: #033[31m2023-10-05 13:22:46.549 ERROR (MainThread) [yolink.mqtt_client] yolink mqtt client disconnected!#033[0m
Oct 5 13:39:33 kruse-pi homeassistant[746]: #033[32m2023-10-05 13:39:33.387 INFO (MainThread) [homeassistant.components.yolink.coordinator] Fetching yolink data recovered#033[0m
Oct 5 13:49:45 kruse-pi homeassistant[746]: #033[32m2023-10-05 13:49:45.351 INFO (MainThread) [homeassistant.components.yolink.coordinator] Fetching yolink data recovered#033[0m
Oct 5 14:05:05 kruse-pi hassio_supervisor[746]: #033[32m23-10-05 14:05:05 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/tsightler/ring-mqtt-ha-addon repository#033[0m
Oct 5 14:29:36 kruse-pi homeassistant[746]: #033[31m2023-10-05 14:29:36.899 ERROR (MainThread) [mqtt] failed to receive on socket: [Errno 104] Connection reset by peer#033[0m
Oct 5 14:29:36 kruse-pi homeassistant[746]: #033[31m2023-10-05 14:29:36.901 ERROR (MainThread) [yolink.mqtt_client] yolink mqtt client disconnected!#033[0m
Oct 5 14:33:02 kruse-pi homeassistant[746]: #033[31m2023-10-05 14:33:02.334 ERROR (MainThread) [mqtt] failed to receive on socket: [Errno 104] Connection reset by peer#033[0m
Oct 5 14:33:02 kruse-pi homeassistant[746]: #033[31m2023-10-05 14:33:02.336 ERROR (MainThread) [yolink.mqtt_client] yolink mqtt client disconnected!#033[0m
Oct 5 14:38:51 kruse-pi homeassistant[746]: #033[32m2023-10-05 14:38:51.503 INFO (MainThread) [custom_components.mail_and_packages] Fetching Mail and Packages (smtp.gmail.com) data recovered#033[0m
Oct 5 15:04:29 kruse-pi homeassistant[746]: #033[32m2023-10-05 15:04:29.357 INFO (MainThread) [homeassistant.components.shelly] Fetching Bathroom Shelly +1 data recovered#033[0m
Oct 5 15:09:51 kruse-pi homeassistant[746]: #033[31m2023-10-05 15:09:51.259 ERROR (MainThread) [mqtt] failed to receive on socket: [Errno 104] Connection reset by peer#033[0m
Oct 5 15:09:51 kruse-pi homeassistant[746]: #033[31m2023-10-05 15:09:51.260 ERROR (MainThread) [yolink.mqtt_client] yolink mqtt client disconnected!#033[0m
Oct 5 15:12:26 kruse-pi homeassistant[746]: #033[31m2023-10-05 15:12:26.809 ERROR (MainThread) [mqtt] failed to receive on socket: [Errno 104] Connection reset by peer#033[0m
Oct 5 15:12:26 kruse-pi homeassistant[746]: #033[31m2023-10-05 15:12:26.810 ERROR (MainThread) [yolink.mqtt_client] yolink mqtt client disconnected!#033[0m
Oct 5 15:22:13 kruse-pi homeassistant[746]: #033[32m2023-10-05 15:22:13.458 INFO (MainThread) [custom_components.mail_and_packages] Fetching Mail and Packages (smtp.gmail.com) data recovered#033[0m
Oct 5 15:30:53 kruse-pi homeassistant[746]: #033[31m2023-10-05 15:30:53.916 ERROR (MainThread) [mqtt] failed to receive on socket: [Errno 104] Connection reset by peer#033[0m
Oct 5 15:30:53 kruse-pi homeassistant[746]: #033[31m2023-10-05 15:30:53.918 ERROR (MainThread) [yolink.mqtt_client] yolink mqtt client disconnected!#033[0m
Oct 5 15:44:20 kruse-pi homeassistant[746]: #033[31m2023-10-05 15:44:20.613 ERROR (MainThread) [mqtt] failed to receive on socket: [Errno 104] Connection reset by peer#033[0m
Oct 5 15:44:20 kruse-pi homeassistant[746]: #033[31m2023-10-05 15:44:20.615 ERROR (MainThread) [yolink.mqtt_client] yolink mqtt client disconnected!#033[0m
Oct 5 15:45:03 kruse-pi homeassistant[746]: #033[31m2023-10-05 15:45:03.948 ERROR (MainThread) [homeassistant.components.yolink.coordinator] Timeout fetching yolink data#033[0m
Oct 5 15:46:05 kruse-pi homeassistant[746]: #033[31m2023-10-05 15:46:05.910 ERROR (MainThread) [mqtt] failed to receive on socket: [Errno 104] Connection reset by peer#033[0m
Oct 5 15:46:05 kruse-pi homeassistant[746]: #033[31m2023-10-05 15:46:05.912 ERROR (MainThread) [yolink.mqtt_client] yolink mqtt client disconnected!#033[0m
Oct 5 15:46:39 kruse-pi homeassistant[746]: #033[31m2023-10-05 15:46:39.949 ERROR (MainThread) [homeassistant.components.yolink.coordinator] Timeout fetching yolink data#033[0m
Oct 5 15:47:12 kruse-pi homeassistant[746]: #033[31m2023-10-05 15:47:12.378 ERROR (MainThread) [homeassistant.components.yolink.coordinator] Error fetching yolink data: #033[0m
Oct 5 15:47:51 kruse-pi homeassistant[746]: #033[31m2023-10-05 15:47:51.300 ERROR (MainThread) [mqtt] failed to receive on socket: [Errno 104] Connection reset by peer#033[0m
Oct 5 15:47:51 kruse-pi homeassistant[746]: #033[31m2023-10-05 15:47:51.301 ERROR (MainThread) [yolink.mqtt_client] yolink mqtt client disconnected!#033[0m
Oct 5 16:16:40 kruse-pi homeassistant[746]: #033[32m2023-10-05 16:16:40.185 INFO (MainThread) [homeassistant.components.yolink.coordinator] Fetching yolink data recovered#033[0m
Oct 5 16:17:12 kruse-pi homeassistant[746]: #033[32m2023-10-05 16:17:12.382 INFO (MainThread) [homeassistant.components.yolink.coordinator] Fetching yolink data recovered#033[0m
Oct 5 16:54:10 kruse-pi homeassistant[746]: #033[32m2023-10-05 16:54:10.565 INFO (MainThread) [custom_components.mail_and_packages] Fetching Mail and Packages (smtp.gmail.com) data recovered#033[0m
Oct 5 16:55:42 kruse-pi homeassistant[746]: #033[31m2023-10-05 16:55:42.949 ERROR (MainThread) [homeassistant.components.yolink.coordinator] Timeout fetching yolink data#033[0m
Oct 5 16:56:21 kruse-pi homeassistant[746]: #033[31m2023-10-05 16:56:21.961 ERROR (MainThread) [mqtt] failed to receive on socket: [Errno 104] Connection reset by peer#033[0m
Oct 5 16:56:21 kruse-pi homeassistant[746]: #033[31m2023-10-05 16:56:21.962 ERROR (MainThread) [yolink.mqtt_client] yolink mqtt client disconnected!#033[0m
Oct 5 17:05:09 kruse-pi hassio_supervisor[746]: #033[32m23-10-05 17:05:09 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/tsightler/ring-mqtt-ha-addon repository#033[0m
Oct 5 17:25:43 kruse-pi homeassistant[746]: #033[32m2023-10-05 17:25:43.330 INFO (MainThread) [homeassistant.components.yolink.coordinator] Fetching yolink data recovered#033[0m
Due to this which I believe is killing the Yolink MQTT connection -
ERROR (MainThread) [mqtt] failed to receive on socket: [Errno 104] Connection reset by peer
which is causing the -
yolink mqtt client disconnected!
How do I find out which MQTT connection is causing this issue?
I know the Ring integration (as well as yolink) use the MQTT integration under the covers, that is, I do not have any MQTT integration installed in HA and no MQTT addon either (but I do have the Ring integration just for a smart doorbell with a camera). If there was a super-verbose way of showing logging for everything that might help - but I already have this in my configuration.yaml:
logger:
default: info
The Yolink integration is central to my automations (as I use their 24/7 monitoring system for alarm, and even leaks), so this HAS to be resolved once and for all.
Yolink also supports IFTTT and I have duplicated literally a couple dozen critical automations to work with IFTTT webhooks instead, coming from yolink’s cloud to post application/json calls into HA that do the same thing which still do work when the yolink HUB<->HA MQTT connection is broken, but those are much slower and less reliable, so I have coded HA to handle both the same way (coded so duplicates do not cause anyissue) to improve the reliability. If it weren’t for this disconnection issue I wouldn’t have to do that -
If I completely remove and then re-add the yolink integration in an attempt to resolve the issue - to even see if that works - am I going to have to then rename all 66 devioces it finds to their old names?
I have worked with the yolink developer, he at least was able to add in some recovery to make it more robust, but this is driving me nuts. How do I figure out what else is breaking the MQTT connection?
Here is my setup - maybe one of those other integrations use MQTT under the covers as well?
System Information
version | core-2023.10.0 |
---|---|
installation_type | Home Assistant Supervised |
dev | false |
hassio | true |
docker | true |
user | root |
virtualenv | false |
python_version | 3.11.5 |
os_name | Linux |
os_version | 6.1.0-12-arm64 |
arch | aarch64 |
timezone | America/New_York |
config_dir | /config |
Home Assistant Community Store
GitHub API | ok |
---|---|
GitHub Content | ok |
GitHub Web | ok |
GitHub API Calls Remaining | 5000 |
Installed Version | 1.33.0 |
Stage | running |
Available Repositories | 1369 |
Downloaded Repositories | 27 |
AccuWeather
can_reach_server | ok |
---|---|
remaining_requests | 21 |
Home Assistant Cloud
logged_in | false |
---|---|
can_reach_cert_server | ok |
can_reach_cloud_auth | ok |
can_reach_cloud | ok |
Home Assistant Supervisor
host_os | Debian GNU/Linux 12 (bookworm) |
---|---|
update_channel | stable |
supervisor_version | supervisor-2023.10.0 |
agent_version | 1.6.0 |
docker_version | 24.0.6 |
disk_total | 915.4 GB |
disk_used | 28.9 GB |
healthy | true |
supported | true |
supervisor_api | ok |
version_api | ok |
installed_addons | Samba share (10.0.2), AdGuard Home (4.8.15), Log Viewer (0.15.1), Home Assistant Google Drive Backup (0.111.1), File editor (5.6.0), Terminal & SSH (9.7.1), Core DNS Override (0.1.1), Duck DNS (1.15.0), Matter Server (4.9.0) |
Dashboards
dashboards | 5 |
---|---|
resources | 20 |
views | 37 |
mode | storage |
Recorder
oldest_recorder_run | September 5, 2023 at 5:59 PM |
---|---|
current_recorder_run | October 5, 2023 at 2:03 AM |
estimated_db_size | 4794.33 MiB |
database_engine | sqlite |
database_version | 3.41.2 |