Latest update on Mqtt add-on: Timed out waiting for mid

Has anyone else noticed this after updating to the latest core Mqtt add-on?

2021-03-02 18:53:49 ERROR (MainThread) [homeassistant.components.mqtt] Timed out waiting for mid 1014
2021-03-02 18:53:49 ERROR (MainThread) [homeassistant.components.mqtt] Timed out waiting for mid 1015
2021-03-02 18:53:49 ERROR (MainThread) [homeassistant.components.mqtt] Timed out waiting for mid 1016
2021-03-02 18:53:49 ERROR (MainThread) [homeassistant.components.mqtt] Timed out waiting for mid 1017
2021-03-02 18:53:49 ERROR (MainThread) [homeassistant.components.mqtt] Timed out waiting for mid 1018
2021-03-02 18:53:49 ERROR (MainThread) [homeassistant.components.mqtt] Timed out waiting for mid 1019
2021-03-02 18:53:49 ERROR (MainThread) [homeassistant.components.mqtt] Timed out waiting for mid 1020

no Idea why this is happening thus far…

Looks like it’s a bug that has been happening for awhile now: https://github.com/home-assistant/core/issues/39847

yes, that’s it exactly, thanks!

added to that https://github.com/home-assistant/core/issues/39847#issuecomment-789136456

hope this will get some traction again

2 Likes

check this too: https://github.com/home-assistant/addons/issues/1887 and https://github.com/home-assistant/core/issues/45036 …

Note to self: Avoid temptation to upgrade to 5.1.1.

2 Likes

ha yes, and at least have a snapshot ready and available of 5.1.0. It took less than a minute to restore that :wink:
awfully silent on the dev front on this one really.
Cant have issues on MQTT, glueing 3 instances to each other…

I’ve upgraded and am not seeing these errors.

Have same errors… Everything work so it’s not brick things of working

Well, if you are not troubled by it, there might not be any harm in upgrading.
However, as you can see in the linked topics, this is a serious issue, and many people suffer it. Of course, depending on your setup, ymmv.

In my case, I have more than a few binary_sensors triggering security automations, which, upon the constant reset of the add-on, keep triggering… the other mqtt sensors are not hampered by it, maybe (probably) because their topics are retained.

I was to fast with my answer. My motion sensors are slow now.
I see them react (red led behind sensor) but the reaction when lights go on are long.

Before sensors fired, lights on…
Now sensors fired, almost a second lights on.

This is why I always run my MQTT brokers on their own servers. Since I moved over to zw2m and z2m, nearly all my smart devices rely on MQTT for communications to and from HA. The nice thing is that you can literally run a cluster of MQTT servers on Pi Zeros with pretty much no penalty to performance so long as you have a fairly decent WiFi setup (or use a USB<->Ethernet adapters).

If you haven’t explored MQTT clustering, check out VerneMQ. It’s free and can easily be setup in a cluster and also offers a docker install. HiveMQ, which is the enterprise “standard”, is also good, but they don’t offer a free version that can be clustered.

I had q MQTT Broker (Mosquitto) running on a RPi3.
Only thing the discovery option was never working.
So I switched to MQTT Broker Add-on. That was working with discovery.

I can try to switch all devices to a new MQTT Server ( only change IP on all devices )
and see what happen…

1 Like

I have a dedicated HA Mqtt instance, which only serves as a MQTT hub so to say. This is the add-on instance I suffered the issue with. IS that what you do too, or do you have a Pi with only a MQTT service setup on that Pi, without any HA?

I have 3 Pi Zero W instances, plus 3 more instances (one running on my Unraid box, one running on my HA box and now one running on my opnSense box) all in a single cluster. I originally had it running as an add-on for HA, but had so many problems that I couldn’t trust the add-on reliability, especially with security.

Discovery of the broker or devices on the broker? Device discovery is largely dependent on the integration or service that is creating the devices. Both zjs2m and z2m have been flawless for me.

The devices… I will do some tests…

1 Like

Now backup my whole HA system.
RPi3 is running with mosquito broker.

I did a test with MQTT Explorer (osx) to connect to the new server and within msec its connected. When I connect to the server inside HA it take a while before connected.
So thats already a signal that Add-on is not fast.

Have to update MQTT Integration inside HA, Zwave2MQTT, and 12 ESP devices to new MQTT Server. Hoping I won’t brick things…

1 Like

Everything seems to work :smiley:

1 Like