YinHangCode / homebridge-mi-airpurifier

XiaoMi air purifier plugins for HomeBridge.
114 stars 34 forks source link

Call to device timed out #28

Open pawelrup opened 5 years ago

pawelrup commented 5 years ago

When I run Homebridge paired with iOS home app, the air purifier accessories are not responding and Homebridge logs this:

Homebridge is running on port 51826.
[MiAirPurifierPlatform] [MiAirPurifierPlatform][ERROR]MiAirPurifier2AirQualityAccessory - AirQuality - getAirQuality Error: Error: Call to device timed out
[MiAirPurifierPlatform] [MiAirPurifierPlatform][ERROR]MiAirPurifier2HumidityAccessory - Humidity - getHumidity Error: Error: Call to device timed out
[MiAirPurifierPlatform] [MiAirPurifierPlatform][ERROR]MiAirPurifier2TemperatureAccessory - Temperature - getTemperature Error: Error: Call to device timed out
[MiAirPurifierPlatform] [MiAirPurifierPlatform][ERROR]MiAirPurifier2AirPurifierAccessory - SilentModeSwitch - getOn Error: Error: Call to device timed out
[MiAirPurifierPlatform] [MiAirPurifierPlatform][ERROR]MiAirPurifier2AirPurifierAccessory - LockPhysicalControls - getLockPhysicalControls Error: Error: Call to device timed out
[MiAirPurifierPlatform] [MiAirPurifierPlatform][ERROR]MiAirPurifier2AirPurifierAccessory - RotationSpeed - getRotationSpeed Error: Error: Call to device timed out
[MiAirPurifierPlatform] [MiAirPurifierPlatform][ERROR]MiAirPurifier2AirPurifierAccessory - Active - getActive Error: Error: Call to device timed out
[MiAirPurifierPlatform] [MiAirPurifierPlatform][ERROR]MiAirPurifier2AirPurifierAccessory - TargetAirPurifierState - getTargetAirPurifierState: Error: Call to device timed out
[MiAirPurifierPlatform] [MiAirPurifierPlatform][ERROR]MiAirPurifier2AirPurifierAccessory - CurrentAirPurifierState - getCurrentAirPurifierState Error: Error: Call to device timed out
[MiAirPurifierPlatform] [MiAirPurifierPlatform][ERROR]MiAirPurifier2AirPurifierAccessory - FilterChangeIndication - getFilterChangeIndication Error: Error: Call to device timed out

Token is the proper one. I got it when connected to zhimi-airpurifier-m1_miapXXXX wifi, but then when I connect air purifier 2 with MiHome app, miio discover sync command returns this:

Device ID: 6136XXXX
Model info: Unknown
Address: 192.168.0.185
Token: ???
Support: Unknown
wroblewski6 commented 5 years ago

i have the same problem did you manage to deal with this ??

Hinchukardt commented 5 years ago

Does the mi home app work to control the air purifier?

What version of node are you running? Miio needs an older version of node otherwise it gives weird errors

wroblewski6 commented 5 years ago

I manager to Deal with this problem and the reason was incorrect token , I could not get correct token by miio device so I used iOS backup option to get token and it worked

Wiadomość napisana przez Hinchukardt notifications@github.com w dniu 13.02.2019, o godz. 21:18:

Does the mi home app work to control the air purifier?

What version of node are you running? Miio needs an older version of node otherwise it gives weird errors

— You are receiving this because you commented. Reply as to this email directly, view it on GitHub, or mute the thread.

pawelrup commented 5 years ago

Does the mi home app work to control the air purifier?

What version of node are you running? Miio needs an older version of node otherwise it gives weird errors

Yes, mi home app works fine with air purifier. My node version is v8.9.4. In the end, I managed to get the token like described here: https://github.com/jghaanstra/com.xiaomi-miio/blob/master/docs/obtain_token.md

degofedal commented 5 years ago

Had the same issue. Turns out it was the token obtained from miio cli.

Tried this method and now everything is working as it should

MickL commented 5 years ago

I can confirm i used the iOS method with latest firmware as of today. Please close this issue, getting the token is not even related to homebridge-mi-airpurifier anyway.