Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xiaomi miio still broken in 0.63 #356

Closed
DavidFW1960 opened this issue Feb 12, 2018 · 38 comments · Fixed by home-assistant/core#12368
Closed

Xiaomi miio still broken in 0.63 #356

DavidFW1960 opened this issue Feb 12, 2018 · 38 comments · Fixed by home-assistant/core#12368

Comments

@DavidFW1960
Copy link

As per:-
home-assistant/core#12298

Construct still not updated

@syssi
Copy link
Member

syssi commented Feb 12, 2018

Can somebody help here? The xiaomi_miio components requires a recent version (0.3.5) of python-miio plus construct>=2.9.23 (defined at the setup.py of python-miio). The stack trace (home-assistant/core#12298 (comment)) of affected users reveals the required construct version isn't used / wasn't updated.

The issue can be fixed temporary(?) by: home-assistant/core#12028 (comment)

docker exec homeassistant pip3 install construct==2.9.29

What' the root cause for this issue? Are there other components requiring a old version of construct? A fresh virtualenv installation isn't affected. An existing virtualenv installation updates the requirements, too. Just hassio users are in trouble.

@syssi
Copy link
Member

syssi commented Feb 12, 2018

@DavidFW1960 has a hassio install which sticks to construct 2.8.10: https://community.home-assistant.io/t/miio-platform-broken-after-upgrade-0-62/41118/52

@syssi
Copy link
Member

syssi commented Feb 12, 2018

A hassio build installs a lot of stuff: https://github.com/home-assistant/hassio-build/blob/master/homeassistant/generic/Dockerfile

There are conflicting packages probably!

@syssi
Copy link
Member

syssi commented Feb 12, 2018

I found the root cause. It's another component (homeassistant.components.sensor.eddystone_temperature) which depends on beacontools which is pinned to construct==2.8.10.

@citruz
Copy link

citruz commented Feb 12, 2018

I am the creator of eddystone_temperature and beacontools. Will update the package as soon as possible, in the next days.

@syssi
Copy link
Member

syssi commented Feb 12, 2018

Awesome! Let me know if you need support!

@pvizeli
Copy link
Member

pvizeli commented Feb 12, 2018

Yeah, Hass.io install all requerements with pip and that can ends in a problem like this. But since 1.2 years of hass.io it was the first time we run into a problem like this...

@delorean-dev
Copy link

syssi so, how can we solve the problem with xiaomi vaccum?

@pvizeli
Copy link
Member

pvizeli commented Feb 13, 2018

@htcheroportugal downgrade your Home-Assistant and wait until the fix from @citruz is inside Home-Assistant

@kiwijunglist
Copy link

I joined hass Io after the bug. What version should I downgrade too. Thanks.

@AlexandrePautet
Copy link

I downgraded to 0.61.1 and the xiaomi_miio module is working

I'm on hassio, I rollback to 0.61.1 from 0.62 using :
curl -d '{"version": "0.61.1"}' http://hassio/homeassistant/update

https://community.home-assistant.io/t/miio-platform-broken-after-upgrade-0-62/41118/2

@pvizeli
Copy link
Member

pvizeli commented Feb 19, 2018

you can also use hassio homeassistant update -o version=0.61.1

@kiwijunglist
Copy link

Thanks. Roll back to v 0.61.1 worked for me. My yeelight bulbs, Xiaomi Phillips bulbs and xiaomi air filter are working. I wait patiently for v 0.64 fix. Thanks for everyone's hard work.

@pejotigrek
Copy link

update 0.63.3 fixed xiaomi vacuum issues on my hass.io installation

@pejotigrek
Copy link

...aaaand it was too soon to be happy. vacuum stopped working :(

device is online, but even then I've got:

  • 2018-02-19 21:57:23 WARNING (SyncWorker_8) [miio.device] Retrying with incremented id, retries left: 3
  • 2018-02-19 21:57:28 WARNING (MainThread) [homeassistant.helpers.entity] Update of vacuum.rosita_jetson is taking over 10 seconds
  • 2018-02-19 21:57:28 ERROR (SyncWorker_8) [miio.device] Got error when receiving: timed out
  • 2018-02-19 21:57:28 WARNING (SyncWorker_8) [miio.device] Retrying with incremented id, retries left: 2
  • 2018-02-19 21:57:34 ERROR (SyncWorker_8) [miio.device] Got error when receiving: timed out
  • 2018-02-19 21:57:34 WARNING (SyncWorker_8) [miio.device] Retrying with incremented id, retries left: 1
  • 2018-02-19 21:57:39 ERROR (SyncWorker_8) [miio.device] Got error when receiving: timed out
  • 2018-02-19 21:57:39 WARNING (SyncWorker_8) [homeassistant.components.vacuum.xiaomi_miio] Got exception while fetching the state: No response from the device

in the logs..
don't want to downgrade, will wait for the next update..

@syssi
Copy link
Member

syssi commented Feb 19, 2018

Please enable the debug output by

logger:                                                                                                                                                                                                                                                                                                                                                                   
  default: warn                                                                                                                                                                                                                                                                                                                                                           
  logs:                                                                                                                                                                                                                                                                                                                                                                   
    homeassistant.components.light.xiaomi_miio: debug                                                                                                                                                                                                                                                                                                                     
    homeassistant.components.fan.xiaomi_miio: debug                                                                                                                                                                                                                                                                                                                       
    homeassistant.components.vacuum.xiaomi_miio: debug                                                                                                                                                                                                                                                                                                                       
    homeassistant.components.light.xiaomi_miio: debug                                                                                                                                                                                                                                                                                                                       
    miio: debug    

Restart HA and provide the content of the homeassistant.log again please!

@syssi
Copy link
Member

syssi commented Feb 19, 2018

@pejotigrek Another thing: Please check your token is uptodate. The vacuum (=mihome app) updates the token sometimes.

@pejotigrek
Copy link

@syssi ok, log in the attachement.
home-assistant.log

about the token - I'd be more than happy to check it, but unfortunately after one of the MiHome/vacuum firmware updates, the "token" column in miio2.db is empty... is there any other way to sniff the token than check it in the database?

@pejotigrek
Copy link

pejotigrek commented Feb 19, 2018

@syssi I've managed to read token by installing some prehistoric version of MiHome.
indeed it was changed.. so now my vacuum is visible online in hassio, waiting for orders.

I guess we can forget my few last posts then :)
thanks for the hint with checking the token!

@DavidFW1960
Copy link
Author

So weird! as recently as yesterday, I used the current iOS app to get my token. (I was documenting it). So far as I see nothing has changed. Is there an issue with the MiHome app on Android? It is definitely still working properly on iOS.

@krisnyse
Copy link

@DavidFW1960 Did you install the latest FW update?

@syssi
Copy link
Member

syssi commented Feb 20, 2018

@DavidFW1960 @krisnyse This is the background: rytilahti/python-miio#185

Hard times for miio devices and the token retrieval are coming.

@DavidFW1960
Copy link
Author

@krisnyse - yes latest firmware

@pejotigrek
Copy link

@DavidFW1960 it definitely is caused by the app itself, not the firmware - so be prepared, that any future MiHome app update can break it. like I wrote - after downgrading the app, token is back in the database, even if I have latest firmware [updated also yesterday, just before downgrading the app].

@DavidFW1960
Copy link
Author

Latest Firmware, Latest App iOS though.

@pejotigrek
Copy link

@DavidFW1960 keep in mind, that applications not always are updated at the same time on both systems. it's possible that iOS's version doesn't have the changes yet.

as anexample - same thing, but opposite is with DJI GO app for drones - iOS version has some features few days or even weeks before android.

@DavidFW1960
Copy link
Author

Sure. We'll see.

@kiwijunglist
Copy link

Hi. Does v0.63.3 fix all the issues? Our should I keep waiting for v0.64?

I'm running Xiaomi air purifier, yeelight e27 RGB bulbs and Xiaomi Phillips e27 led bulbs.

Thanks.

@syssi
Copy link
Member

syssi commented Feb 21, 2018

What do you mean by "all issues"?

@kiwijunglist
Copy link

Sorry I meant the Xiaomi miio issues I had when I used 0.63.0. Eg. Xiaomi fan and Xiaomi Phillips bulbs not working in hass.io

@DavidFW1960
Copy link
Author

If you're on 0.63.0 you have nothing to lose going to 0.63.3

@syssi
Copy link
Member

syssi commented Feb 21, 2018

The miio issues are solved. May be your yeelight bulb will show up twice (auto-discovered & static configuration).

@DavidFW1960
Copy link
Author

was that duplication fixed in 0.63.3? I have this issue but didn't bother unhiding etc..

@kiwijunglist
Copy link

I'm on 0.61.1 , I had issues on 0.63.0.

@syssi
Copy link
Member

syssi commented Feb 21, 2018

The duplicate isn't fixed yet.

@DavidFW1960
Copy link
Author

The duplicate is no biggie - easily fixed/ignored/hidden

@keesschollaart81
Copy link

Do we keep track of the app-token-issue? Or shall we update the docs and explain that you need a specific version of the MiHome app, at this moment!?

@syssi
Copy link
Member

syssi commented Feb 25, 2018

Please update the docs!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
10 participants