sucks
sucks copied to clipboard
D900 support
My D900 is with the patched sucks version not working. At first, there was the "GetDeviceList"-Failure, but I changed the code and now,the following issue appears:
sleekxmpp.exceptions.IqError:`
The used ID's from above don't match the ID's which are used in my APP but the login was correctly registered.
Checking it with the APP, it works well.
Any Idea
I don't think anybody has added support for the D900 yet. If you would like add it, the first step is to snoop the protocol between your app and your robot. Details here:
https://github.com/wpietri/sucks/blob/master/developing.md
Same issue here. I fixed the GetDeviceList issue and now running into the sleekxmpp.exceptions.IqError:` with the Deebot 900.
I'll see if I can find time during the week to run through the xmpppeek process.
Would like to assist with getting the 900 series functioning. Whats the status/what is needed? My programming expertise is minimal, but should be able to collect data if needed from my unit.
I am running into issues getting the 901 working with HomeAssistant. if the 900 series turns out to do something new with the protocol and is not supported, then i'll see what i can do to sniff the traffic and help.
is this the same IQError
you get @Joey40
INFO (event_thread_0) [sleekxmpp.xmlstream.xmlstream] Waiting for </stream:stream> from server
ERROR (read_thread) [sleekxmpp.xmlstream.xmlstream] Error reading from XML stream.
ERROR (read_thread) [sleekxmpp.xmlstream.xmlstream] Error reading from XML stream.
WARNING (event_thread_0) [sleekxmpp.xmlstream.handler.waiter] Timed out waiting for IqWait_UID6
WARNING (event_thread_0) [sucks] Ping did not reach VacBot. Will retry.
WARNING (SyncWorker_3) [sleekxmpp.xmlstream.handler.waiter] Timed out waiting for IqWait_UID5
ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/app/homeassistant/helpers/service.py", line 224, in _handle_service_platform_call
await getattr(entity, func)(**data)
File "/usr/src/app/homeassistant/components/vacuum/__init__.py", line 387, in async_turn_on
partial(self.turn_on, **kwargs))
File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/app/homeassistant/components/vacuum/ecovacs.py", line 151, in turn_on
self.device.run(Clean())
File "/usr/local/lib/python3.6/site-packages/sucks/__init__.py", line 416, in run
self.send_command(action.to_xml())
File "/usr/local/lib/python3.6/site-packages/sucks/__init__.py", line 413, in send_command
self.xmpp.send_command(xml, self._vacuum_address())
File "/usr/local/lib/python3.6/site-packages/sucks/__init__.py", line 482, in send_command
c.send()
File "/usr/local/lib/python3.6/site-packages/sleekxmpp/stanza/iq.py", line 233, in send
raise IqTimeout(self)
sleekxmpp.exceptions.IqTimeout: <iq id="UID5" to="[email protected]/atom" from="[email protected]/UID_2" type="set"><query xmlns="com:ctl"><ctl td="Clean"><clean type="auto" speed="standard" /></ctl></query></iq>
WARNING (event_thread_0) [sleekxmpp.xmlstream.handler.waiter] Timed out waiting for IqWait_UID3
WARNING (event_thread_0) [sucks] Ping did not reach VacBot. Will retry.
things to note ls1ok3.ecorobot.net
is not a valid domain; i don't know if this is related
Yep that’s what I’m seeing too.
---sent from my iPhone
On Oct 5, 2018, at 1:29 PM, Karl Q. [email protected] wrote:
I am running into issues getting the 901 working with HomeAssistant. if the 900 series turns out to do something new with the protocol and is not supported, then i'll see what i can do to sniff the traffic and help.
is this the same IQError you get @Joey40
INFO (event_thread_0) [sleekxmpp.xmlstream.xmlstream] Waiting for </stream:stream> from server ERROR (read_thread) [sleekxmpp.xmlstream.xmlstream] Error reading from XML stream. ERROR (read_thread) [sleekxmpp.xmlstream.xmlstream] Error reading from XML stream. WARNING (event_thread_0) [sleekxmpp.xmlstream.handler.waiter] Timed out waiting for IqWait_UID6 WARNING (event_thread_0) [sucks] Ping did not reach VacBot. Will retry. WARNING (SyncWorker_3) [sleekxmpp.xmlstream.handler.waiter] Timed out waiting for IqWait_UID5 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved Traceback (most recent call last): File "/usr/src/app/homeassistant/helpers/service.py", line 224, in _handle_service_platform_call await getattr(entity, func)(**data) File "/usr/src/app/homeassistant/components/vacuum/init.py", line 387, in async_turn_on partial(self.turn_on, **kwargs)) File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run result = self.fn(*self.args, **self.kwargs) File "/usr/src/app/homeassistant/components/vacuum/ecovacs.py", line 151, in turn_on self.device.run(Clean()) File "/usr/local/lib/python3.6/site-packages/sucks/init.py", line 416, in run self.send_command(action.to_xml()) File "/usr/local/lib/python3.6/site-packages/sucks/init.py", line 413, in send_command self.xmpp.send_command(xml, self._vacuum_address()) File "/usr/local/lib/python3.6/site-packages/sucks/init.py", line 482, in send_command c.send() File "/usr/local/lib/python3.6/site-packages/sleekxmpp/stanza/iq.py", line 233, in send raise IqTimeout(self) sleekxmpp.exceptions.IqTimeout:
WARNING (event_thread_0) [sleekxmpp.xmlstream.handler.waiter] Timed out waiting for IqWait_UID3 WARNING (event_thread_0) [sucks] Ping did not reach VacBot. Will retry. things to note
ls1ok3.ecorobot.net
is not a valid domain; i don't know if this is related — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
@wpietri, the 900 uses the same msg-na.ecouser.net (47.88.66.164) for the HTTPS as it does for 5223. Below is a capture directly from the app to the internet.
When I change DNS and try to capture via xmpppeek.py, no dice. The machine with xmpppeek isn't listening on 443.
On other robots how are you accomplishing the capture? Is the https going to the same URL as the xmpp traffic? I am going to try an https mitm proxy.
At this point I don't remember, but I was using mitmproxy to capture the HTTPS traffic, so that sounds like a good idea to me.
I missed the comment on this issue, but I did send a note out in the mailing list on Jan 18th.
Here is the post again:
I have a fork where I am tackling this in a D901 branch (https://github.com/bmartin5692/sucks/tree/D901). I have the 901, but believe the only difference between 900/901 is the color. I've found that the communication protocols are entirely different for the D900/901 as compared to the existing sucks library/supported devices. I suspect these changes in protocol will be shared by other EcoVac "IOT Product" devices so I've been building to support this assumption.
The devices I assume that fall in this bucket are:
DEEBOT 600 Series
DEEBOT OZMO Slim10 Series
DEEBOT OZMO 900
DEEBOT 711
DEEBOT 710
DEEBOT 900 Series
The code in this branch is working and I've taken care to make the changes compatible with the existing library structure and API. If anyone is willing to test what has been done so far it would be great to see the results. I would guess I am 95% there with a few items remaining before I feel comfortable with discussion of a PR:
Further testing
Additional unit tests
Documenting the protocol differences
@bmartin5692 I have just checked out your fork and it works great with my DEBOOT 901! Just out of interest, how did you name your areas? I saw that you also added the spotarea command to the CLI but I can't figure out how names are assigned to areas based on your commits.
@mariuskiessling Glad it works for you, it is nice to see confirmation.
RE: SpotAreas - I'll make sure to document this as well, but for the below to work you'll need to get my latest commit in the 901 branch.
SpotAreas
For the CLI - the spotclean
command takes a csv of ints and minutes to clean - ex spotclean 0,1 60
For the Library you could use vacbot.run(SpotArea('start', '0,1'))
"0,1" is a list of mapIDs the bot should clean. Each of these corresponds to a room or area the bot mapped. In the app, these are what show the letters over rooms mapID (0) == room ("A"), (1) == "B", etc.
You'll need to use the library, but if you set --debug for sucks you can get your SpotArea MapSet with:
vacbot.run(VacBotCommand("GetMapSet", {"tp":"sa"}))
You'll see in DEBUG something like:
sucks DEBUG got {'id': 'ralnsy', 'ret': 'ok', 'resp': "<ctl ret='ok' tp='sa' msid='11'><m mid='0' p='1'/><m mid='1' p='1'/><m mid='2' p='1'/><m mid='3' p='1'/><m mid='4' p='1'/><m mid='5' p='1'/><m mid='6' p='1'/><m mid='7' p='1'/><m mid='8' p='1'/></ctl>"}
This tells you I have 9 rooms mapped (mid= 0 - 8) or A-I, but you should be able to compare to the map in the app now to know which mid == what room.
Friendly Names
If you want to rename them to "friendly names" - something the app won't let you do natively: You need to convert the xml from the GetMapSet to json:
<ctl ret='ok' tp='sa' msid='11'><m mid='0' p='1'/><m mid='1' p='1'/><m mid='2' p='1'/><m mid='3' p='1'/><m mid='4' p='1'/><m mid='5' p='1'/><m mid='6' p='1'/><m mid='7' p='1'/><m mid='8' p='1'/></ctl>
becomes
{"ctl":{"ret":"ok","tp":"sa","msid":"11","m":[{"mid":"0","p":"1"},{"mid":"1","p":"1"},{"mid":"2","p":"1"},{"mid":"3","p":"1"},{"mid":"4","p":"1"},{"mid":"5","p":"1"},{"mid":"6","p":"1"},{"mid":"7","p":"1"},{"mid":"8","p":"1"}]}}
Now you need to add a "n" attribute which contains the friendly name like so:
{"ctl":{"ret":"ok","tp":"sa","msid":"11","m":[{"mid":"0","n":"Entry"},{"mid":"1","n":"Master Bath"},{"mid":"2","n":"Master"},{"mid":"3","n":"Office"},{"mid":"4","n":"Play Room"},{"mid":"5","n":"Craft Room"},{"mid":"6","n":"Kitchen"},{"mid":"7","n":"Sun Room"},{"mid":"8","n":"Garage Entry"}]}}
Remove the api response details ("ctl" and "ret"):
{"tp":"sa","msid":"11","m":[{"mid":"0","n":"Entry"},{"mid":"1","n":"Master Bath"},{"mid":"2","n":"Master"},{"mid":"3","n":"Office"},{"mid":"4","n":"Play Room"},{"mid":"5","n":"Craft Room"},{"mid":"6","n":"Kitchen"},{"mid":"7","n":"Sun Room"},{"mid":"8","n":"Garage Entry"}]}
Last of all you can use the below command to issue the rename:
vacbot.run(VacBotCommand("RenameM", {"tp":"sa","msid":"11","m":[{"mid":"0","n":"Entry"},{"mid":"1","n":"Master Bath"},{"mid":"2","n":"Master"},{"mid":"3","n":"Office"},{"mid":"4","n":"Play Room"},{"mid":"5","n":"Craft Room"},{"mid":"6","n":"Kitchen"},{"mid":"7","n":"Sun Room"},{"mid":"8","n":"Garage Entry"}]}))
You should then see the friendly names in the app when selecting an area to clean. Note: You cannot use the friendly names when starting a clean, you must use the mid.
@wpietri , is there anything that's preventing this from being merged in? I'd like to use the library inside Home Assistant without mucking about with forks in my HA python setup.
@kquinsland do you have a workaround going? I'm curious how youre doing it