Roborock - Xiomi Miio - Timeout fetching data

Hi All,

I am seeing the error following error frequently wihtin the logs:
ERROR (MainThread) [homeassistant.components.xiaomi_miio] Timeout fetching <MY-ROBOROCK> data
As of my research this seems to be a known issue which should have been fixed: Disable lazy discover in xiaomi_miio by mrwogu · Pull Request #82601 · home-assistant/core (github.com)
And been merged within Full Changelog for Home Assistant Core 2023.5 - Home Assistant (home-assistant.io)

For me it unfortunately it is not visible HOW to enable the “lazy discovery” option as this seems to still be set to disabled on default?

My HA system is:
Home Assistant 2023.9.2
Supervisor 2023.09.2
Frontend 20230911.0

Roborock S7 (two devices)
Firmware 4.3.5_1612

I started seeing the same for one of my vacuums a while back, I don’t remember exactly when.

2023-11-07 19:47:08.005 INFO (MainThread) [homeassistant.components.xiaomi_miio] Fetching SOMENAME data recovered
2023-11-07 19:48:02.769 ERROR (MainThread) [homeassistant.components.xiaomi_miio] Timeout fetching SOMENAME data
2023-11-07 19:48:23.002 INFO (MainThread) [homeassistant.components.xiaomi_miio] Fetching SOMENAME data recovered
2023-11-07 19:49:47.768 ERROR (MainThread) [homeassistant.components.xiaomi_miio] Timeout fetching SOMENAME data
2023-11-07 19:50:03.001 INFO (MainThread) [homeassistant.components.xiaomi_miio] Fetching SOMENAME data recovered
2023-11-07 19:51:12.768 ERROR (MainThread) [homeassistant.components.xiaomi_miio] Timeout fetching SOMENAME data

Running Wireshark seems to inficate that HA floods the vacuum with requests to port 54321 udp faster than the vacuum handles it. First it responds normally, then HA keep sending the requests and the vacuum simply doesn’t respond to those packets for a minute or so. Then it responds again. Then it doesn̈́t. And so on.

Seems to me like the vacuum has some kind of rate limiting for incoming requests, or it simply can’t keep up with them. I didn’t have time to investigate this further yet. Perhaps a workaround would be to edit some config/script and increase the interval.

I have several Roborocks vacuums of slightly different models and it only happens on the Q7 max.