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

cant get it to work with xiaomi robot vacuum cleaner s50 #378

Closed
lasse9000 opened this issue Sep 5, 2018 · 8 comments
Closed

cant get it to work with xiaomi robot vacuum cleaner s50 #378

lasse9000 opened this issue Sep 5, 2018 · 8 comments

Comments

@lasse9000
Copy link

Hello

first of all does it even work with the new model s50?

i have collected the token with packet sender. did it with 2 ligh bulb right after, no problem there.
here is some of the logs

It look like it is duing something right:
2018-09-05 22:25:57 INFO (MainThread) [homeassistant.components.vacuum.xiaomi_miio] Initializing with host 192.168.1.153 (token 72316...)

2018-09-05 22:25:57 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: domain=vacuum, service=xiaomi_remote_control_start>

2018-09-05 22:25:57 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: domain=vacuum, service=xiaomi_remote_control_stop>

2018-09-05 22:25:57 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: domain=vacuum, service=xiaomi_remote_control_move>

2018-09-05 22:25:57 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: domain=vacuum, service=xiaomi_remote_control_move_step>

But a litle later i got this:
2018-09-05 22:26:07 WARNING (MainThread) [homeassistant.components.vacuum] Setup of platform xiaomi_miio is taking over 10 seconds.

2018-09-05 22:26:18 ERROR (SyncWorker_3) [miio.device] Got error when receiving: timed out

2018-09-05 22:26:18 WARNING (SyncWorker_3) [homeassistant.components.vacuum.xiaomi_miio] Got exception while fetching the state: No response from the device

things i have tryed

change ip adr.

  • put http:// in front.
  • tryed get a new token by doing a reset of robot wifi and do evrything again.(got a different token then - first time, is that normal?)
  • small and big letters in the token.

set it up like this in configuraton file
vacuum:

  • platform: xiaomi_miio
    host: 192.168.xxx.xxx
    token: 4755306265556e484e5543515079xxxx

runing out of ideas, hope someone can help.

@rytilahti
Copy link
Owner

rytilahti commented Sep 5, 2018

The timeout is usually caused by an incorrect token, are you sure it's correct one? Every time you reset the vacuum it will use a different token, so yes, it is normal that you have gotten another token on the second round.

The s50 is the 2nd gen vacuum with mopping, and at least I have not heard any troubles using this library with it. Did you try it with the command line tool (mirobo)?

edit: #349 is maybe related?

@lasse9000
Copy link
Author

Thanks for the Quick respons.

Where do i type ind the command? Tryed to SSH in hass.io but it says onknown command.

Is it possible that the vacuum get a new token again when connect it to my router?

@rytilahti
Copy link
Owner

Unfortunately I don't know how hass.io handles this, so I cannot help with that. The token gets initialized during the onboarding procedure (when you connect it to the wlan), so you have to get the token after the vacuum has been connected to the wanted network.

@sgtio
Copy link
Contributor

sgtio commented Sep 9, 2018

Can you give a bit more details on how you got the token? In my case, I reset the vacuum cleaner and, before pairing it with the app, I managed to retrieve the token with the packet sender tool. However, that token appears to be useless once the pairing with the app is completed (@rytilahti mentioned the token changes after onboarding). I haven't managed to obtain the token after pairing with the app yet.

@rytilahti
Copy link
Owner

With earlier versions of the app it's possible to extract the token directly from a backup file: https://python-miio.readthedocs.io/en/latest/discovery.html#tokens-from-backups . For newer versions it's apparently harder (#185), documentation updates are welcome!

@sgtio
Copy link
Contributor

sgtio commented Sep 9, 2018

Yes, but as I mentioned in #349, I also tried getting the token from the old app, both by downgrading the app after the onboarding process was completed, and by trying to onboard the robot with the old app. None of the methods have worked so far for me, so please @lasse9000 let me know if you manage to get it working.

@lasse9000
Copy link
Author

Sorry for the later respons.

I got it to work.
by extract the mijo2.db file, from the old app. But it was really hard. I im not really sure how i did it. Tryed a lot and different things, moved files and used different command, with 2 guides.
I can try find Them if you want?

One Thing i fund out is that you have to have Java installer, to run th ab.jar stricpt. That is not mention in the guide on this Site. Maybe it is clear for many but not me😉

@rytilahti
Copy link
Owner

rytilahti commented Sep 13, 2018

Great that you got it working!

As I mentioned earlier, the simplest way with the old app version is simply to extract it from a backup file as described in the documentation. There's no ab.jar script at all, all of it is in python, so I'm not sure about what method you have used here.

I think this can be closed now. If someone wants to find out how to get the token for the newer versions and update the documentation, a PR is greatly appreciated!

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

No branches or pull requests

3 participants