-
-
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
Add support for Vacuum 1C STYTJ01ZHM #669
Comments
Could you try if some of the commands of |
just found the miot-spec files
ERROR:miio.miioprotocol:Got error when receiving: timed out |
if you are not afraid of testing a PR, you could check out #672 to see what |
Thanks for your effort!
What I did:
Somewhere I read yesterday some more commands to setup, but can't finde them anymore Edit: wrong token provide same result |
If you reseted the device, the token will change which will lead to timeouts. Is The setup commands you used should be fine, I don't personally use pipenv, but |
changed setup now. Running directly from pc not over raspberrypi anymore. |
Info should be working if the token is correct, the token via discover handshake hasn't worked since end of 2017 or so (if you paired it with the mobile app). When the device gets provisioned (either by the app or |
|
if i can help you with any raw commands, let me know |
So, you could try this out to see if that is a miot device which simply ignores the miot_info:
If it responds back with, it's a miot device and adding some basic support should be straight forward. If that is not working, maybe it is using the miio protocol, but neither Here's how the interpret the return value (siid/piid description) of that call:
|
sadly all of the commands time out: |
Okay, then it's likely a miio device, but we need to figure out what commands it accepts. One way to do that would be to capture the traffic between your phone and the device as described here: https://github.com/aholstenson/miio/blob/master/docs/protocol.md. Another potential way involves obtaining the app plugin (from a backup, for example) and reverse engineering it for the expected commands. |
I could not capture commands from my phone. looks like it pings the vacuum with unplug the router from the internet: regularly the vacuum calls out:
|
That |
I got the packages!!! After some research I found out, that you need a wlan adapter in monitor mode to get the packages via wireshark. At the end I found a very simply solution! so here you go: this includes at least starting, pausing and resuming |
Ah, that should probably be described in the documentation, it's indeed the simplest way to do that :) Looking at the capture, it is indeed a miot device, but the raw_command I gave you previously was incorrect. Could you try
to see if that works? edit: looks like |
again no luck :/ dump with first command with device id debug answer - with did:deviceID its the same |
The first link is using |
then it's no direct communication with the cloud. |
with the whole junk it worked! |
Great! Maybe the siid+piid combination was just unfortunate, I just picked it as its valuelist seemed to indicate it's used to query the state of the device.. Anyway, siid 2 is the battery status: 1 is for the percentage and 2 is for the state (yours is charging currently!). |
damn you got me! :D yes it is ^^ |
ooook observed strange behavior |
partially autogenerated based on the spec file, so things may or may not work, so use at your own risk. in its current state it is more or less just for testing. Fixes #669
If you want, you can take a look at that PR :-) The
|
wow thanks for this fast pr! |
Yeah, it's generated mostly with a script :) anyways, try to modify the edit: simply git pull again, I added a quick hack to avoid crashing when it fails with timeouts, just for making it simpler to test. |
still no luck |
Did you see my edit? If you don't mind, join https://matrix.to/#/#python-miio-chat:matrix.org to make it simpler to converse while debugging it. |
yep just tried it. Looks like it loops to command, showing timeout, but can't break the loop xD |
How did it end? |
It works on my side:
|
First Part of the work is done and a big part of the possible commands are working. |
Maybe I could help :) |
So, the DreameVacuum depends on some other structural changes (related to miot support) so it should probably do as the last vacuum, so the starting point would be at first to create base classes, and convert Maybe something like VacuumDevice (or VacuumBase) which will provide the common abstract interface and methods (using abc & its decorators, e.g., https://docs.python.org/3/library/abc.html#abc.abstractmethod). The vacuum implementations inherit and implement this interface then. The same handling should also be done for the status container classes. Feel free to work on that and create a PR whenever you want, any help is more than welcome! :-) |
hi guys, thanks for the awesome work on this robot, i'm one of the unlucky one that have a bricked robot that is on a loop of saying "turn me on" every 5 minutes, after the update of the firmware 1045(with experimental maps function), i'm trying to make it back to work, i was able to extract token and comunicate with robot thanks to our work, I already added the files of the PR 672 I got this output Any suggest to make it comunicate properly? thanks in advance |
some possible things:
Try the Edit: misclicked ... |
info work with every command tipe, device vacuum etc, that's the output, seem token is right jonny@iMacdiJonathan ~ % miiocli dreamevacuum --ip 192.168.1.191 --token xx info |
Not sure if this can help in any way, but it seems like openHab has some implementation of this device. |
Unlucky even the openhab one doesn't work properly, maybe i found a way to upgrade the firmware (via : mirobo IpXX tokenXX raw-command update-firmare) but I miss the urls and the md5, could some you find it in the mihome log, or knew a way to get them? |
@Concentricc openhab is only reference implementation, based on converting the onine spec, similar as @rytilahti did in the python-miio version. @Limitless1985 what would help though if you could share a openhab debug log while it is doing the properties refresh. If indeed this device is requiring the property refresh per single property, also in OH you can set the maxproperties to 1. |
You can check the linked pull request. Connection is working just fine. I can control my vacuum. Only home assist adaptations are missing. |
@craiq I was looking for a openhab log, as @Limitless1985 indicated he tried that. |
@craiq Edit: think my token was wrong, re-paired, working now. |
Did you manage to unbrick your vacuum? I'm communicating with it normally, but I don't know where to get the firmware (as for url and md5: you're supposed to serve it locally yourself) |
It may or may not be related, but there are mentions in some issue reports that starting from some newish version the vacuums do not accept the update command from local rfc1918 addresses. Unfortunately, I don't know anything about the firmware versions locations (I have only used that with valetudo firmwares / firmwares linked elsewhere) so I cannot personally help you with that, just wanted to let you know that the upgrade procedure may also fail even if you have that information. |
I have this same problem. Problem don't resolve?/Could you tell me how fast resolve? |
Hi, |
I have the same model, but I am not sure, what the status is here. |
Support by this lib since #1290, adding support to homeassistant will require further changes that are not directly relevant to this issue so this can be closed now. |
What is needed for HA support? |
WARNING:miio.discovery:Found unsupported device dreame-vacuum-mc1808_miio29430xxxx._miio._udp.local. at 192.168.0.172, please report to developers
would love to get support :)
The text was updated successfully, but these errors were encountered: