-
-
Notifications
You must be signed in to change notification settings - Fork 561
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
Support for new vaccum Xiaomi Mijia STYJ02YM #550
Comments
hi, please mee too |
with mi home 5.4.54 : {"did":"27XXX6986","token":"72676b4a764bXXXXXXXXXXXXXX5363","longitude":"XXX","latitude":"XXX","name":"Mi Robot Vacuum-Mop P","pid":"0","localip":"192.168.0.35","mac":"XX:XX:XX:XX:XX:XX","ssid":"XX","bssid":"XX:XX:XX:XX:XX:XX","parent_id":"","parent_model":"","show_mode":1,"model":"viomi.vacuum.v7","adminFlag":1,"shareFlag":0,"permitLevel":16,"isOnline":true,"desc":"Appareil en ligne ","extra":{"isSetPincode":0,"fw_version":"3.5.3_0042","needVerifyCode":0,"isPasswordEncrypt":0} |
Hi |
I have this vacuum too. Is there anything we can do for help ? |
Hi, please too |
have you any news ? |
Where did you get this info? I can't find mine in /Smarthome/log files |
my best guess is that local api is disabled after provisioning, because in the plugin all requests are forced to send via cloud when usually mi home decides whenever use local or cloud. |
The problem is that this robot is manufactured by Viomi, not Roborock like other models, I think that the way of use it is not the same and maybe will be impossible to support it (at least not in the same way) |
vedor is not important, because all miio devices use same way to communicate, they just use different methods/props. problem here is that local udp 54321 looks disabled after provisioning, so only cloud rpc is used (normally it is only used when device is in different network). |
I am not an expert in this area but what you are saying is that it will be impossible to integrate it into Home-Assistant? |
seems not possible with local api. |
I did a quick test with this:
and got a response so local api is possible 👍
|
good news! i wonder why all ppl before had problems using local api. maybe it's related to firmware version? |
I think the api has changed. I don't have the other vacuum so can't tell the difference. Also, Mi home does not connect directly to the local api but it sends rpc commands to the cloud so, without internet, the robot is useless :p |
it does not work like the other models? I would like to drive it from Home-Assistant even if my internet connection is broken |
Me too but with Jeedom (not possible with Google Home 😢) |
Hello, When not registered on miHome: When registered on miHome, vacuum is still detected, but seems not supported:
I scanned UDP ports with nmap (vacuum registered on miHome), opened ports are: But commands ends with time out.
I would be happy to help for investigation. :-) |
You are using Also, are you able to request the properties as mentioned by @nqkdev? Anyway, after the device is provisioned, it's token gets changed and that's why you are getting timed outs. @nqkdev am I interpreting you correctly, that you were able to request these properties using some firmware version, but that it's blocked in some other? If those properties work in "local mode", it would be fairly simple to add a preliminary implementation for this. |
@rytilahti I am using the latest firmware (3.5.3_0044). I don't think the local api is blocked in any version. Only the methods and params are different. I was able to figure out a few rpc commands for this. Just did a quick hack so that it works with my home-assistant. Check it out here |
@rytilahti , When registered on miHome, the handshake command result is
i don't know which version of miio is used by @nqkdev , but i don't have that command available ("miio protocol call") in my mirobo version 0.4.7). All the commands i send to the vacuum ends in time out.
please find the result of status command with debug enabled in attachment. status command.txt |
I just created a PR based on the work done by @nqkdev, thanks a lot! 🎉 Please feel to test the linked PR and report your findings:
|
@jevd thanks for your input, too! The respective command for python-miio is To anyone reading this at some point in the future, the |
similar should work for viomi.vacuum.v6 (V-RVCLM21B). 3rd param of set_mode_withroom is room_array_len and next are room ids ([0, 1, 3, 11, 12, 13] = start cleaning rooms 11-13). room ids are encoded in map and it's part of cloud api so best way to get it is log between device <> mi home app (before map format is supported). some undocumented methods set_language [1/2] - voice pack (1 - CN, 2 - EN) there is also multimap support, not yet supported by mi home plugin UI. list of all methods/params (don't test them if you don't know what you are doing). get_prop hw_info |
Thanks, I will try :) |
Hello, thank you for this update :-)
version:
I can't get any info from the vacuum when it's registered on miHome. I can run "status", but not "info" command (.venv) user@server:~$ miiocli viomivacuum --ip 192.168.5.1 --token xxxxxxxxxxxxxxxxxxxxx status
(.venv) user@server:~$ miiocli viomivacuum --ip 192.168.5.1 --token xxxxxxxxxx info
i didn't tried the other commands. |
Thank you very much @rytilahti and @nqkdev !! miiocli viomivacuum --ip 192.168.0.16 --token xxx info
mirobo --ip 192.168.0.16 --token xxxxx raw-command miIO.info
Edit - now i only got time out response... from the vacuum cleaner |
I also tried a bit:
|
Actually it continues to work, but since rerunning the tool doesn’t keep track of the last sequence-id, it needs more retries / higher ids. As a quick fix, I increased |
@rezmus Out of curiosity: how did you acquire the list of supported commands? |
from robot binaries. |
* Add support for Xiaomi Mijia STYJ02YM (viomi.vacuum.v7) Based on findings done by @nqkdev - thanks a lot for help! This is the initial PR to fix #550 - plenty of values are still unknown so any help is welcome! * update README * add help message to set_fan_speed * Add state "idle not docked" * Add support for a few more commands of the STYJ02YM (#581) * STYJ02YM: Add support for DND * STYJ02YM: Add support to change language. * STYJ02YM: Add support to switch button LEDs on/off * add carpetturbo as new method, add docstrings
A look at current binaries (3.5.3_0045) reveals a couple of more commands not previously mentioned in #550 (comment):
In particular it looks like the device may have multimap support. Similarly there are params for get_prop:
For the map editor: Sample command to rename a room: |
how to use it from home-assistant? |
Thanks for this! I was struggeling to get it working but this did the trick. I don't understand why it works after multiple tries and why this is STYJ02YM specific. |
Yes, this should be fixed in miiocli, currently only mirobo has it implemented (in a very hacky way): https://github.com/rytilahti/python-miio/blob/master/miio/vacuum_cli.py#L58 Feel free to open a new issue for that. |
Hello,
It's possible to add the new vaccum xaomi.
This model : https://fr.gearbest.com/vacuum-cleaners/pp_009487950353.html
Thanks
The text was updated successfully, but these errors were encountered: