homebridge-mi-airpurifier
homebridge-mi-airpurifier copied to clipboard
Mi Air Purifier 3 - not working
Hello. Can you make working script for Purifier 3?
+1
Same here. Would love to see version 3 working.
2h support would also be nice
And 3H. Pretty please :)
Same here.
Is something from homebridge-mi-airpurifier read this Issue? I don't think. Maybe project homebridge-mi-airpurifier is dead?
hum, don't know, but probably linked to this, the plugin is based on miio https://github.com/aholstenson/miio/issues/259 so also on this https://github.com/aholstenson/miio/issues/257
and this : https://github.com/rytilahti/python-miio/issues/543
i did basic purifier 3 support, you need to add/replace files from this zip and setup ip/token/did
https://ufile.io/hnc3imlc
I can confirm it's working with 3H. Thanks for your help @rezmus !
i did basic purifier 3 support, you need to add/replace files from this zip and setup ip/token/did
https://ufile.io/hnc3imlc
Where i need to replace this files? Before instalation? After?
ok i found - /usr/local/lib/node - but i dont know what is this => "did": "xxxxxxxxx", in config.
and - should i setup token and ip in file index.js or only copy to plugin catalog?
Ok i found DID - device ID - this is this? => zhimi-airpurifier-ma4_mibtb303?
[2019-11-22 19:51:34] [MiAirPurifierPlatform] [MiAirPurifierPlatform][ERROR]MiAirPurifier3HumidityAccessory - Humidity - getHumidity Error: Error: Call to device timed out [2019-11-22 19:51:34] [MiAirPurifierPlatform] [MiAirPurifierPlatform][ERROR]MiAirPurifier3AirQualityAccessory - AirQuality - getAirQuality Error: Error: Call to device timed out [2019-11-22 19:51:34] [MiAirPurifierPlatform] [MiAirPurifierPlatform][ERROR]MiAirPurifier3TemperatureAccessory - Temperature - getTemperature Error: Error: Call to device timed out [2019-11-22 19:51:34] [MiAirPurifierPlatform] [MiAirPurifierPlatform][ERROR]MiAirPurifier3AirPurifierAccessory - SilentModeSwitch - getOn Error: Error: Call to device timed out [2019-11-22 19:51:34] [MiAirPurifierPlatform] [MiAirPurifierPlatform][ERROR]MiAirPurifier3AirPurifierAccessory - TargetAirPurifierState - getTargetAirPurifierState: Error: Call to device timed out [2019-11-22 19:51:34] [MiAirPurifierPlatform] [MiAirPurifierPlatform][ERROR]MiAirPurifier3AirPurifierAccessory - CurrentAirPurifierState - getCurrentAirPurifierState Error: Error: Call to device timed out [2019-11-22 19:51:34] [MiAirPurifierPlatform] [MiAirPurifierPlatform][ERROR]MiAirPurifier3AirPurifierAccessory - Active - getActive Error: Error: Call to device timed out [2019-11-22 19:51:34] [MiAirPurifierPlatform] [MiAirPurifierPlatform][ERROR]MiAirPurifier3AirPurifierAccessory - LockPhysicalControls - getLockPhysicalControls Error: Error: Call to device timed out [2019-11-22 19:51:34] [MiAirPurifierPlatform] [MiAirPurifierPlatform][ERROR]MiAirPurifier3AirPurifierAccessory - RotationSpeed - getRotationSpeed Error: Error: Call to device timed out [2019-11-22 19:51:34] [MiAirPurifierPlatform] [MiAirPurifierPlatform][ERROR]MiAirPurifier3AirPurifierAccessory - FilterChangeIndication - getFilterChangeIndication Error: Error: Call to device timed out
which method do you use to get your token?
which method do you use to get your token?
iBackup and then DB browser. I have token and IP, DID - this is MAC adress?
did is device id, should be numer 8-9 digits long.
did is device id, should be numer 8-9 digits long.
IS this ZID from sqlite database? I check - he have 9 digits but not working.
[2019-11-22 20:12:09] [MiAirPurifierPlatform] Initializing platform accessory 'MiAirPurifier3'... HAP Warning: Characteristic 000000AC-0000-1000-8000-0026BB765291 not in required or optional characteristics for service 000000BB-0000-1000-8000-0026BB765291. Adding anyway.
Is this a normal message?
did is device id, should be numer 8-9 digits long.
rezmus i only add IP and token to config on my homebridge. Index.js file i only copy whithout changes to node and air purifier folder?
Solved. Thanks rezmus. DID - this is ZDID from sqllite database. Guys token is changing when you change wifi network after reset old conection to your wifi network. You always must check new token.
Thanks for @rezmus share the implementation, and thanks for some steps shared by @pl-samurai after I tried to replace the files / token / ip and the device id, I got these errors like "TargetAirPurifierState - getTargetAirPurifierState: Error: Call to device timed out" when I run the home bridge.
I'm sure the token / IP / Device ID are correct ...
Does anyone knows why? Thanks!
if you are sure ip/token is correct use one of cli tools, miio (nodejs) or miiocli (python-miio), send miIO.info to your device and paste result here (cover sensitive data).
@rezmus Hi, thanks for your reply. I'm not sure how to send the "miIO.info" to the device, do you mean the "miio discover" command?
miiocli device --ip IP --token TOKEN raw_command miIO.info
or
miio tokens update IP --token TOKEN miio protocol call IP miIO.info
@rezmus Hi, here are the results:
root@hassbian:/home/pi# miio tokens update 192.168.5.71 --token 9347205c422842eaba6f123dc5da90d577684c1d107ef518b85de96b2b02d8f20143db63ee66b0cdff9f69917680151e INFO Updating token for 192.168.5.71
INFO Connected to miio:107563792 - trying to change token
ERROR Could not update token, double-check the given token
==========
root@hassbian:/home/pi# miio protocol call 192.168.5.71 miIO.info INFO Attempting to call miIO.info on 192.168.5.71
INFO Device found, making call
ERROR Encountered an error while controlling device
Error was: Could not connect to device, token needs to be specified
you didn't decrypt token from ios db, try homebridge with this settings
"ip": "192.168.5.71", "token": "e7168a55c07934c7906d8db2b9da0178", "did": "107563792",
@rezmus So many thanks for your help, it works now. Yep, I didn't decrypt the token, maybe I missed the step ... now it works fine! Thanks again!
@rezmus I've installed your patch and it seems to be working great - except for the speed of the fan: that doesn't seem to be working at all (so I can only switch between auto and night mode). I've got a bunch of these errors:
[MiAirPurifierPlatform][ERROR]MiAirPurifier3AirPurifierAccessory - RotationSpeed - getRotationSpeed Error: Error: busy.
[MiAirPurifierPlatform][ERROR]MiAirPurifier3AirPurifierAccessory - LockPhysicalControls - getLockPhysicalControls Error: Error: busy
Do you know what can be possibly be wrong?
@rezmus I see you've used favorite_level to set rotationspeed. Why not use siid 10: (motor-speed), piid: 8 (motor1-speed) and piid: 9 (motor1-set-speed)? Instead of 12 steps we can have 100 steps.
For this model, motor speed ranges from 390 to 2150 apparently. This can be mapped to 1-100 in homekit.