Open HomeAssistantPim opened 3 weeks ago
Hey there @rytilahti, @syssi, @starkillerog, mind taking a look at this issue as it has been labeled with an integration (xiaomi_miio
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
xiaomi_miio documentation xiaomi_miio source (message by IssueLinks)
After some investigation on my own I suspect that Xiaomi is moving towards OAuth2 managed security tokens. For sure is that the token is being refreshed when the device connects with a different WiFi network and afterwards no longer responds to UDP packets (lacking a valid token?). My guess: Xiaomi is moved towards a scenario were to use such Xiaomi devices within HA you would require to buy some Xiaomi hub/gateway or some cloud service that can be integrated to colaborate with other smart home systems :(
The problem
The problem seems to be that Xiaomi has changed their login api. All tools seem to fail now (Integration can't get past login to cloud, token extractos dito).
The only thing which might work judging from the documentation: "Use of Miio should be done before the Vacuum is connected to Mi Home. If you already connected to the app you will need to delete it and then join the ad-hoc Wi-Fi network the Vacuum creates. If the vacuum is already paired it’s likely this method will only return ??? as your token."
then with npx miio discover you should get a token.
Two questions: 1) this miio tool would be this one? pip3 install python-miio 2) If your first pair your laptop with the ad-hoc network and discover the device to get a token. Is this token still usable once you've added to vacuum robot to your wifi (using the Mi Home app)??
What version of Home Assistant Core has the issue?
2024.4.3
What was the last working version of Home Assistant Core?
2024.4.3
What type of installation are you running?
Home Assistant OS
Integration causing the issue
xiaomi_miio
Link to integration documentation on our website
No response
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response