github9984 / homebridge-xiaomi-purifier-3

Xiaomi Air Purifier 3 plugin for Homebridge
MIT License
0 stars 0 forks source link

Token:??? #10

Open paqpaqpaq opened 4 years ago

paqpaqpaq commented 4 years ago

I’ve installed mi wifi products before, but there is no way I can get a token on this one.

Miio discover or miio discover —sync will show me the purifier 3H (european version) most of the time, but won’t show a token. Just device id and ip.

paqpaqpaq commented 4 years ago

I reset the device, connected directly to it:

miio discover INFO Discovering devices. Press Ctrl+C to stop. Device ID: 29325xxxx Model info: zhimi.airpurifier.mb3 Address: 192.168.4.1 Token: ba7fa416a477fcbbf99cda0f839ac7ab via auto-token Support: At least generic

then tried to configure it directly:

sudo miio configure 29325xxxx --ssid ssid --passwd pw INFO Attempting to configure 29325xxxx

ERROR Encountered an error while updating wireless

Error was: Failed updating wireless

The wireless icon now is not blinking, but 'loading'. The device is not to be discovered.

I also tried to connect it with the mi home app after I had the original token, and then update it for a new token, but that fails because as soon as it connects the token is invalid:

miio tokens update 192.168.108.178 --token 9e4b00d4de86faf3473436beab4d329d INFO Updating token for 192.168.108.178

INFO Connected to miio:29325xxxx - trying to change token

ERROR Could not update token, double-check the given token

MEGALITH2022 commented 4 years ago

I have the same error. I want help

dmndrz commented 4 years ago

I've done the same steps as you @paqpaqpaq and I get the exact same errors! Once I successfully get the token, then re-add the device in Mi Home app and the token is now wrong. Could somebody help please?

paqpaqpaq commented 4 years ago

I've done the same steps as you @paqpaqpaq and I get the exact same errors! Once I successfully get the token, then re-add the device in Mi Home app and the token is now wrong. Could somebody help please?

The only thing that works (for iOS) is to add the device to the mi home app, in a country where you can see it. So EU devices in an EU country, not mainland China. Then create a back-up of the iphone or ipad, extract that, look up the connection link of the device in the Xiaomi table of your back-up, and decrypt it in order to get the correct token.

If you reset the device, you need to do this all over again.

You need tot google for the exact step by step tutorial.

dmndrz commented 4 years ago

Yes. I found a tutorial, it was a bit tricky but it worked! https://github.com/Maxmudjon/com.xiaomi-miio/blob/master/docs/obtain_token.md#non-jailbroken-ios-users