Xiaomi token integration - discuss with Xiaomi?

I see that it’s quite hard to get access token for Xiaomi devices. I wanted to ask if anyone considered contacting Xiaomi and asking for a ‘legal’ integration instead of all this hacking into it?

Apparently they have integration with Google Assistant and Alexa. And it does not seem like you need to go through all this token-finding hell. Since it’s all so hacky there’s a high chance that Xiaomi may break it at any moment. So it’s not reliable.

I believe that HomeAssistant is big enough name for Xiaomi to consider or at least respond to. Granted, it’s open source, so they may not like that part. But still, I suppose it’s worth asking them?

Thanks for your time and attention

I believe you can try contacting them and then update the forum.
Thanks!

The hacking as you say is required for “local” control. Their native GA/alexa integration requires the cloud. which most of us try not to use

@radinsky No need to be so offensive. I could of course try that. Asking if it was done already. I also suspect that it may require contacting them by more official ‘leaders’ of hass community with official hass email, not just some random weirdo from random email.

@aidbish I was not referring to rooting, I meant the way access token is retrieved, as described here: https://www.home-assistant.io/components/vacuum.xiaomi_miio/#retrieving-the-access-token

Or is this for local control? I thought this is token for the cloud. Is it local token for device?

I also don’t really understand what all the privacy hype is all about, what information do they have? Your floor plan? Who could benefit from it? It’s not to argue, just to understand.

I’m so sorry that suggesting to take the lead sounds to you like something offensive…

That was not an answer to the question I asked, instead you said " try to do it yourself". At least from my experience this kind of response usually implies certain form of aggression. Which, in this situation, may not be a good option as I mentioned in my other post, it has to be more official than that, I suppose.

I’m trying to get more information on the subject. I can’t ask them anything without knowing if anyone already asked it, or if Hass community is even interested in this.

Sorry if I’m, in turn, sounding offensive.

1 Like

Getting the token is for local control. The token is a security feature between their cloud server(and then the mobile app) and the device so that everything goes through their cloud server which then uses another security feature. The mobile app actually sets that token and syncs with the cloud server when the device is added to your account. It is the same scheme Tuya uses for example and it is as painful to obtain this token from the Tuya plugs. Not sure how far you will be able to go with this given the fact that the token is a security feature and is unlikely to be made easier to obtain…

@rafale77

Thanks for clarification.

Yes that’s what concerns me, the fact that it will only get harder to control until HASS gives up on supporting it at all.

I would like to have a “Cloud” based integration component, which goes the ‘official’ route. I don’t care about China knowing my floor plan and my vacuuming schedule, lmao. I’m more concerned about it just working for as long as I have it all setup.

Could be 2 separate ways of integration, local and cloud based. Was there any discussion about it? Did anyone try to do it?

If I was Xiaomi I would want people using my smart home app, as they are trying to develop their own smart home eco system.

If you don’t want to use token then can use zigbee2mqtt instead and bypass their gateway hub.

Your fellow h.a. users suggestion is inline with open source community driven development and you shouldn’t take offensive :slight_smile:

Thanks for reply and clarification.

However, if I was Xiaomi I would allow as many integrations as possible, because Xiaomi sells hardware, not apps.

No, it gathers users to monetise in the future.

EDIT: there is no benefit to Xiaomi in them making it easier to use their hardware with other systems. If you are stuck with their hub, you’ll stick with their sensors/switches/bulbs etc.

zigbee2mqtt is open source and can accommodate many different manufacturers’ hardware, and not give away your data.

A shame. Time for na Open DIY vacuum cleaner with Rasperry Pi project :smiley: