[SOLVED] Xiaomi/Roborock Vacuum Issues - Undiscoverable / Unavailable

My vacuum integration was working awesomely well, aside from my logs being spammed with the below errors and warnings every few minutes:

Got exception while fetching the state: Unable to discover the device 192.168.1.17

Unable to discover a device at address 192.168.1.17

As others who experienced the same indicated, sometimes commands would not fire on the first attempt and you’d need to call the command a second or third time. This wasn’t too big of a deal and I even included a routine in my node-red automations that would re-send the cleaning commands until the state changed to “cleaning”. Things were working well.

However, yesterday after a re-start the vacuum became Unavailable, and the above log entries appeared many times each minute (like every 20 seconds, or whatever the component’s polling interval seems to be). I verified the token, and even reset wifi on the device and retrieved a new one. But the vacuum still was unavailable. But then I discovered that I’m able to raise it from the dead by shutting down and re-starting the vacuum. Doing this seems to force the handshake with the vacuum. However, it only seems to work with the initial handshake and then the vacuum become undiscoverable for long periods, and none of the states get updated. At one point today it stayed discoverable for at least 15 minutes before once again going totally undiscoverable, but this has been the exception.

I’ve researched here and the web, and haven’t been able to find a solution. The vacuum is not being restricted from the web, and it’s on the same network SSID as my HA server (a laptop running hass.io on Ubuntu). My home router is a Ubiquiti Amplifi setup, with multiple routers meshed. The Amplifi app doesn’t have really deep settings, nothing out of the ordinary going on aside from the fact that I assigned the vacuum a static IP. I really love this vacuum, but it looks like the Xiaomi integration via miio is way far from perfect. Anyone have any other suggestions?

So it was an issue with my network. Somehow, the same IP was assigned to 2 devices… don’t ask how… I don’t know the answer.