Shelly updates started getting delayed

I set up a couple shellys to control some of my lights about a week ago, (a 1 and a 2.5,) using the official integration. Everything has been working great up until yesterday, when the state from the shellys started getting delayed when reporting back to home assistant. I have some automations triggered by the shelly relay state, which had been nearly instant up until yesterday, and now they can take as long as 30 seconds after using the physical switches connected to the shellys. If I use home assistant to turn the lights on or off, both the light and the automation triggered by the status change are instant. Anyone have any idea what could have gone wrong?

I was starting to migrate to MQTT, but then read about this bug with the latest MQTT broker addon, https://github.com/home-assistant/addons/issues/1887. I was then looking into ShellyForHASS, and noticed a very similar bug report there to the issues I’m seeing https://github.com/StyraHem/ShellyForHASS/issues/489. That bug report mentions that on recent versions CoAP stops working and the system is falling back to polling. That feels very likely the same case for me. Not sure what I should do now, as there are bugs with all 3 methods. :man_shrugging:

Well, I managed to solve this. I had installed a (dumb, unmanaged) switch to get some more network ports, and moved my HA server and access point over to this switch, and this is apparently what broke it. I just tested moving the access point and HA server back to the built-in switch in my router, and everything is working instantly again. I can’t fathom why this makes any difference, but apparently it does.