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 vaccum control from Raspberry pi + iPad Mi app at the same time - token: b'ffffffffffffffffffffffffffffffff' #16

Closed
alexdom opened this issue Jun 18, 2017 · 3 comments

Comments

@alexdom
Copy link

alexdom commented Jun 18, 2017

First of all, thanks for a great software!

So long I am trying to get my Xiaomi Mi Vaccum robot to work with mirobo on my Raspberry Pi 2 (Debian Jessie, Ethernet connection + USB Wi-Fi).

Initially, I connected my Xiaomy Mi Vacuum and three Air Purifiers to home Wi-Fi so I could control it via iPad Mi app. I can use mirobo then to discover all their tokens from command line:

-> # mirobo discover

INFO:mirobo.vacuum:Sending discovery to <broadcast> with timeout of 5s..
INFO:mirobo.vacuum:  IP 192.168.0.22: 833 - token: b'7eda8d580fa5c33dbb6168326f75efbd'
INFO:mirobo.vacuum:  IP 192.168.0.23: 830 - token: b'4e65fb7827d51cd2208f0acdf9af7b08'
INFO:mirobo.vacuum:  IP 192.168.0.24: 833 - token: b'79f795f4d8db427a1946f93e6c610fcb'
INFO:mirobo.vacuum:  IP 192.168.0.25: 847 - token: b'ffffffffffffffffffffffffffffffff'
INFO:mirobo.vacuum:Discovery done

So, I reset Mi Vacuum and get RPi connected to Vacuum Wi-Fi by wlan0 USB adapter. Only then I could define Vacuum token and have it controlled via command line:

-> # mirobo discover

INFO:mirobo.vacuum:Sending discovery to <broadcast> with timeout of 5s..
INFO:mirobo.vacuum:  IP 192.168.4.1: 847 - token: b'7a3779494c6d5679a475496f42646344'
INFO:mirobo.vacuum:Discovery done

> # export MIROBO_IP=192.168.4.1
> # export MIROBO_TOKEN=7a3779494c6d56793475496f42646344
> # mirobo

State: Charging
Battery: 100 %
Fanspeed: 60 %
Cleaning since: 0:00:02
Cleaned area: 0.0 m²
DND enabled: 0

But then, Vacuum looses connection to home Wi-Fi. And I can't control one from iPad at the same time.

...........
So I have two questions:

  1. Why Xiaomi Mi Vacuum can't be discovered in local network as well as Air Purifiers?

  2. Is it possible to control Xiaomi Mi Vacuum from Rpi command line and from iPad Mi app at the same time?

@alexdom alexdom changed the title Xiaomi vaccum robot - token: b'ffffffffffffffffffffffffffffffff' Xiaomi vaccum robot control from Raspberry pi + iPad Mi app at the same time - token: b'ffffffffffffffffffffffffffffffff' Jun 18, 2017
@alexdom alexdom changed the title Xiaomi vaccum robot control from Raspberry pi + iPad Mi app at the same time - token: b'ffffffffffffffffffffffffffffffff' Xiaomi vaccum control from Raspberry pi + iPad Mi app at the same time - token: b'ffffffffffffffffffffffffffffffff' Jun 18, 2017
@rytilahti
Copy link
Owner

Did you try to connect it again with the iPad after fetching the token? That's the way it should work; the token will be only available before the device has been configured with a device, however, I have just tested this on Android.

@alexdom
Copy link
Author

alexdom commented Jun 22, 2017

Y-y-ep! It worked! Thanks a lot!

-> # mirobo discover

INFO:mirobo.vacuum:Sending discovery to <broadcast> with timeout of 5s..
INFO:mirobo.vacuum:  IP 192.168.4.1: 847 - token: b'4c66774d6b544d513548743854597653'
INFO:mirobo.vacuum:Discovery done

Then I connected my Xiaomy Mi Vacuum to home Wi-Fi via iPad Mi app and tried it again but with local home IP and a token obtained above. It worked:

mirobo --ip=192.168.0.25 --token=4c66774d6b544d513548743854597653

State: Charging
Battery: 100 %
Fanspeed: 60 %
Cleaning since: 1:04:27
Cleaned area: 53.5575 m²
DND enabled: 0

Now I've got my Mi Vacuum fully integrated into smart home, so I can control it even better based on motion sensors, cameras, GPS data etc..

@rytilahti
Copy link
Owner

Good to hear, closing this then.

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

2 participants