-
-
Notifications
You must be signed in to change notification settings - Fork 566
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
Viomi V2 discoverable, not responding #597
Comments
I also have a Viomi V2 Pro(similar model to Xiaomi styj02ym) connected to Mi Home. I got "Error: No response from the device" error message. I extract tokens from logs of Mi Home 5.4.49 app running on BlueStacks.
Running any command with previously extracted token ends with error I also try to use mirobo after vacuum WiFi reset and direct connect to robot wifi. I think changes introduced in this PR #576 should be also working for Viomi V2 Pro because this is the same product in different brands. |
Nice thinking @0sk4r! Sadly, it didn't work for me, BUT it produced a more meaningful error! EDIT: Nope, this is the same result without the change :( Repro:
Actual hunting:
Not sure if we should change some config to explain to miio what to do with this vacuum. |
Retrying again without system packages and explicit master version didn't help:
|
Hello Guys Did you managed to make it work? |
That device uses a different protocol than the rockrobo ones, so In order to use this in homeassistant, the homeassistant integration needs to be updated to allow defining which protocol to use (rockrobo or viomi). Feel free to make a PR in homeassitant's repository for that, too! |
@rytilahti miiocli viomivacuum --ip 192.168.0.9 --token xxx info
ERROR:miio.device:Got error when receiving: timed out
Error: No response from the device However it responds to ping ( 43 ms). firmware is 3.5.3_0045 |
The token is most likely wrong then, did you extract it from your mobile device after the initial provisioning? |
I personally can't confirm whether it's wrong or right. However, I extracted it from a mobile emulator after logging in to my account |
The token is right.
What else could I do? |
It might be the same issue as this one: #550 (comment) If you turn off the device and turn it on again, are you able to run miiocli viomivacuum --ip 192.168.0.9 --token xxx info ? |
"Have you tried turn it off and on again?" method worked for me with combination of |
@rytilahti I think that for the viomi v2 as well as the styj02ym have the same problem (same hardware). The issue is that the software needs a lot of retries before it gets a valid response from the robot. |
@silentkiller88 my understanding of the problem is that the device does not respond to request using an already used (or lower than the "current") msgid; this needs to be fixed in miiocli, feel free to open a PR for it. For API users this should not be a problem as the id is automatically incremented in the background, it is just that miiocli is not saving the most recently used id for next invocation. |
I'm still not getting any luck, but I'm not sure my token was legit, because I got it from an emulator running mihome 5.4.54. However, I'm encouraged by you succeeding, because it means Viomi isn't inherently uncooperative with miio :) |
I ran tcpdump on my router and redirected to wireshark so I can see how the app is communicating, hopefully confirming my token. I tried decoding the messages by running this:
The short message parses successfully, but the long one insists I have the wrong checksum:
I'm aware my token is there, and if anyone wants to remote control my vacuum, idgaf. I'll re-pair it in a bit. What do you pros make of it? |
Generated a new token with the bluestacks method (here) and with the same disappointing results. |
Did some more testing. The bluestacks token seems legit, but no go.
running
However, running
Will be happy to provide whatever dumps can further help - tcpdumps, debug prints etc. |
Ok so I followed this guide I successfully added the Viomi V2 Pro to Home Assistant. In order to get the Token I used a Russian hacked MI Home app for android. Let me know if you need the link. |
@polysa that'd be great.
Thanks! |
@BackSlasher Here we go: Direct link to apk My conficuration.yaml:
firmware Version: 3.5.3_0030 Steps: |
Are you sure about this platform? I got this error when trying to use miio2:
|
Oh I pasted the wrong link: https://github.com/nqkdev/home-assistant-vacuum-styj02ym |
Looks promising! Will check once I'm home, thanks :D |
@polysa works! It doesn't support everything (e.g. I can't get the room map) but "start" and "return to base" work. |
You can send commands to change mode or to clean a particular room. |
@BackSlasher that's not out of scope, so no worries. The (most?) of the communication parts are already contained in this library, it is merely that the homeassistant integration has to be updated accordingly to select the model to use for communication. Or that is my current understanding at the moment, I haven't really dug into the code to see if something else needs to be implemented in this library. If there is a need to extend the support, PRs are more than welcome to do so :-) |
@polysa what I'm struggling to do currently is to get a lit of the rooms. I can't seem to use "send_command" to run |
@rytilahti great. I'm not sure what exactly is the difference, but the python-miio provider doesn't seem to work at all and |
all Supported commands can be found: rytilahti/python-miio#550 (comment) I managed to send clean command for particular rooms. But I tested the numbers manually. |
Good stuff! Did you manage to run arbitrary commands via home assistant, e.g.
? Your links seem very insightful, will go through them later :) |
@BackSlasher actually no I just run some commands from Developer Tools / Services and setup basic automatons to Vacuum / mob my flat. Choosing the program is easy: |
for the map maybe this can help. |
Hi, Results:
Using "miiocli" I was able to get data.
I was able to start / stop also, however after 10-15 mins something breaks and I am not able to fetch data anymore until I manualy powercycle Viomi.
Any ideas what this can be? Appreciate if someone could help me with this topic / integration, I can provide outputs which are needed. My target is to run it on Domoticz :). Thank you, |
See my earlier response above: #597 (comment) . If you are using |
I suppose that thre is a different password. |
@polysa coming back to this, did you find a way to clean a specific room?
and causes the vacuum to leave the dock and immediately return |
Here is a script am using for cleaning my dinning room: `vacuum_dinningroom:
I had to test manually the code for each room. My rooms start from number 10 and up. The latest firmware update that support multi level floor maps make the Viomi unusable and I can't find a way to roll back :( |
Don't install latest firmware, gotcha :) |
The process to identify the rooms was:
room 2 will be 12 and so on. I am not sure about the pattern here but it is working for me. Stay away from firmware 3.5.8_0033 I will let you know once I recieve the new bug free firmware. |
Ok just remembered you need to send the vacuum to dock before each test. So if you send using command from dock to room 1(11) you need to dock before send it to room 2 (12). |
Yeah, I'm on that. I think the UI is reusing the lowest roomid, but API is not. So due to massive re-editing to the rooms I did, the numbers don't match.
This is my mapping so far. Exciting, I know. EDIT: Done with mapping! Good stuff :) |
Perfect. They only think I am missing from my setup in HA is the live map. Probably I will start working on that now I'm stuck home. |
Nothing better to do now than obsess on home automation :) |
BTW, I think a map would be really hard, unless you're rooted. I'm afraid of rooting my device since I can't seem to make my adb port work. |
@BackSlasher @polysa : it seems like almost everything is working for you!? I am stuck with the message ID bug - how did you fix that problem? |
@crazykiwi2003 I verified my token using the npm version of miio, and using it to issue commands to the device.
For me, it returns
|
You can't. this is a bug. Please this topic is for Home Assistant integration with python-miio. Contact Viomi from Facebook. |
okay i'm sorry, thanks. their facebook is "viomi tech", please? |
Yes correct |
Closing this, because I got my answers. @polysa please CC me when you have interesting progress :) |
Firstly, thank you very much for creating this!
I have a Viomi V2 running with the Mi Home app, trying to get it to do stuff using
python-miio
I extracted the token by running version Mi Home v5.4.54 on an emulator.
mirobo -d discover --handshake 1
:https://gist.github.com/BackSlasher/aa47b96c9b26bde9f67cdbf7ebe39056
However, running any command (e.g.
home
) seems to be ignored:mirobo -d --ip 192.168.0.9 --token XXX home
https://gist.github.com/BackSlasher/1239ff641a0c5feddc1e6aeae654e844
This is my first Viomi device, and I'm not sure what I'm missing.
What can I collect to troubleshoot further?
Thanks!
The text was updated successfully, but these errors were encountered: