Query from newbie

106 views
Skip to first unread message

Kaspar Althoefer

unread,
Dec 15, 2018, 5:13:23 PM12/15/18
to sucks-users
Hi all,

I am very much a beginner in the world of python and programming vacuum robots. But I hope you don't mind my questions. Great to see the fantastic developments of the group here.

I am very keen to program my Deebot (N97S) in Python, but fail at the first hurdle. 

I installed python and the relevant sucks package on my phone and on my Mac. I tried all kinds of ways to get sucks going, but it just doe snot work. The furthest I got was on my Android phone where I actually managed to run sucks and was invited to log in - I went through the login process at least 50 times trying different combinations but every time I type in "eu" at the end of the login process, I get a long list of error messages... and that's it... I just cannot get into the system. I am fairly certain that I am typing in the correct information - everything works just fine when using the ecovacs software which I have installed. 
My login info is as follows:
Email: [the email I use with the ecovacs APP]
Password: [the ecovacs password]
Country: gb
Continent: eu

Does it matter that my email account starts with a capital?

When trying to run sucks on my Mac, I don't get anywhere, sucks does not want to run at all in my python environment.

I hope you can help. I definitely would like to get over this hurdle and do some robot programming.

Thanks in advance, Kaspar

Guillermo Schimmel

unread,
Dec 17, 2018, 8:28:50 AM12/17/18
to kaspar.a...@gmail.com, sucks-users
Have you tried putting US values? I had lot's of trouble until I just put "us".

--
You received this message because you are subscribed to the Google Groups "sucks-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sucks-users...@googlegroups.com.
To post to this group, send email to sucks...@googlegroups.com.
Visit this group at https://groups.google.com/group/sucks-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/sucks-users/ed06ebd0-562c-4fe9-888e-d24fbebd9ad8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jason Arends

unread,
Dec 20, 2018, 10:10:24 AM12/20/18
to sucks-users
Also a newbie having problems getting it to install/run at all. I am trying to run just the CLI on a raspberry pi. "pip install sucks" from the installation instructions ended up targetting python2 so I redid it with "python3 -m pip install sucks" and it says it's installed but is there an actual "sucks" script as shown in the readme "sucks login"? I don't know what I'm missing.

Name: sucks
Version: 0.9.3
Summary: a library for controlling certain robot vacuums
Home-page: https://github.com/wpietri/sucks
Author: William Pietri
Author-email: sucks-users@googlegroups.com
License: GPL-3.0
Location: /home/pi/.local/lib/python3.5/site-packages
Requires: pycryptodome, click, pycountry-convert, requests, sleekxmpp, stringcase

the site-packages/sucks directory just contains cli.py, __init__.py, and a __pycache__

Jason Arends

unread,
Dec 20, 2018, 11:47:54 AM12/20/18
to sucks-users
nevermind, worked by doing:

sudo python3 -m pip install sucks
 
(didn't realize it had to install as root)

and now it's in /usr/local/bin/sucks

Guillermo Schimmel

unread,
Dec 20, 2018, 12:34:24 PM12/20/18
to Jason Arends, sucks-users
Great!

If you use mqtt check my other post. 

--
You received this message because you are subscribed to the Google Groups "sucks-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sucks-users...@googlegroups.com.
To post to this group, send email to sucks...@googlegroups.com.
Visit this group at https://groups.google.com/group/sucks-users.

William Pietri

unread,
Dec 20, 2018, 1:56:53 PM12/20/18
to sucks-users
On 12/20/18 8:47 AM, Jason Arends wrote:
nevermind, worked by doing:

sudo python3 -m pip install sucks
 
(didn't realize it had to install as root)

and now it's in /usr/local/bin/sucks


I don't think it's strictly necessary to install it as root. It works fine for me without it. My hazy recollection is that other people have had trouble on the Raspberry Pi. My even hazier notion is that there's something unusual about the way Python works on it. If anybody has a patch that will fix this on the Raspberry Pi, I'll happily accept it.

William

Jason Arends

unread,
Dec 21, 2018, 8:48:33 PM12/21/18
to sucks-users
I think this actually fixes it, it's not an issue with sucks, it's with python3 pip on a pi:

sudo python3 -m pip install pip --upgrade

I can run it as non-root now.

Thanks!

Kaspar Althoefer

unread,
Dec 22, 2018, 7:00:27 AM12/22/18
to sucks-users
Many thanks, Guillermo.

That does the trick. Fantastic! I can log in now. And the system responds as expected.

However, when I then put in a command like 'sucks clean 10', it acknowledges that and responds with a lot of comments and goes into 600 seconds of a wait loop. However, the robot does not do anything, just sits in the charger without moving...

I receive the following comments from the system :

/storage/emulated/0 $ sucks login
Ecovacs app email: kalt...@gmail.com Ecovacs app password: your two-letter country code [gb]: us your two-letter continent code [na]: na overwrite existing config? [y/N]: y Config saved. /storage/emulated/0 $ sucks clean 10 sleekxmpp.basexmpp WARNING fulljid property deprecated. Use boundjid.resource sleekxmpp.xmlstream.cert WARNING Could not find pyasn1 and pyasn1_modules. SSL certificate COULD NOT BE VERIFIED. sleekxmpp.xmlstream.cert WARNING Could not find pyasn1 and pyasn1_modules. SSL certificate expiration COULD NOT BE VERIFIED. performing clean command waiting for 600.0s


Do you have any ideas on what is going wrong and how I can overcome these issues?

Thanks in advance again.

Best, Kaspar.

Jason Arends

unread,
Dec 22, 2018, 9:50:15 AM12/22/18
to sucks-users
I ran into this too, I think you need to install specific versions of the prereqs due to an issue with sleekxmpp.

python3 -m pip uninstall -y pyasn1 pyasn1-modules sleekxmpp slixmpp
python3 -m pip install pyasn1==0.3.7 pyasn1 modules==0.1.5 sleekxmpp==1.3.2 dnspython3==1.15.0

Timo Prager

unread,
Jan 27, 2019, 8:23:47 AM1/27/19
to sucks-users
Hi @ all i have the same problems.. With trying this issue below i´l get some new faults. 

sleekxmpp.basexmpp WARNING  fulljid property deprecated. Use boundjid.resource
sleekxmpp.xmlstream.xmlstream ERROR    Certificate has expired.
sleekxmpp.xmlstream.xmlstream WARNING  Failed to send b"<stream:stream to='ecouser.net' xmlns:stream='http://etherx.jabber.org/streams' xmlns='jabber:client' xml:lang='en' version='1.0'>"
sleekxmpp.xmlstream.xmlstream ERROR    Socket Error #9: Bad file descriptor

Does any one have a idea how to fix this ? 

William Pietri

unread,
Jan 27, 2019, 9:18:43 AM1/27/19
to sucks-users
On 1/27/19 5:23 AM, 'Timo Prager' via sucks-users wrote:
Hi @ all i have the same problems.. With trying this issue below i´l get some new faults. 

sleekxmpp.basexmpp WARNING  fulljid property deprecated. Use boundjid.resource
sleekxmpp.xmlstream.xmlstream ERROR    Certificate has expired.
sleekxmpp.xmlstream.xmlstream WARNING  Failed to send b"<stream:stream to='ecouser.net' xmlns:stream='http://etherx.jabber.org/streams' xmlns='jabber:client' xml:lang='en' version='1.0'>"
sleekxmpp.xmlstream.xmlstream ERROR    Socket Error #9: Bad file descriptor

Does any one have a idea how to fix this ? 


Hi, Timo. I think that's a different issue, one that's being discussed here:

https://github.com/wpietri/sucks/issues/62

I think the first step is to figure out what the host is, and possibly what the certificate is. What continent and country codes is Ecovacs using for you? And are you comfortable capturing the traffic with something like Wireshark to find the certificate in question?

Thanks,

William

Timo Prager

unread,
Jan 27, 2019, 10:13:53 AM1/27/19
to sucks-users
Hi Willam, 

thanks for your quick response. 
I´m not a specialist about this stuff. Just try to get it works :-)
Country is DE and Continent ist set to EU

First error with every try after reboot the raspebrry is about:
Traceback (most recent call last):
  File "/usr/local/bin/sucks", line 10, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python3.4/dist-packages/click/core.py", line 764, in __ca                                 ll__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.4/dist-packages/click/core.py", line 696, in main
    _verify_python3_env()
  File "/usr/local/lib/python3.4/dist-packages/click/_unicodefun.py", line 124,                                  in _verify_python3_env
    ' mitigation steps.' + extra
RuntimeError: Click will abort further execution because Python 3 was configured                                  to use ASCII as encoding for the environment. Consult https://click.palletsproj                                 ects.com/en/7.x/python3/ for mitigation steps.

This system supports the C.UTF-8 locale which is recommended.
You might be able to resolve your issue by exporting the
following environment variables:

    export LC_ALL=C.UTF-8
    export LANG=C.UTF-8

After i put one of this export ** solutions into comand line i can exec like sucks clean 5
Next i´l get this output as a loop 

rx.jabber.org/streams' xmlns='jabber:client' xml:lang='en' version='1.0'>"
sleekxmpp.xmlstream.xmlstream ERROR    Socket Error #9: Bad file descriptor
sleekxmpp.xmlstream.xmlstream ERROR    Certificate has expired.

With a look into wireshark it looks for me not as the raspberry tries to send anything ... cause i can´t find any communication going outside my network.

hope this can help to find the issue.

Jonathan Woodall

unread,
Jan 27, 2019, 3:18:20 PM1/27/19
to sucks-users
Timo - I just validated what you are seeing, and it is as William described. pyasn1 & pyasn1_modules is trying to validate the sleekxmpp cert, which is expired. If you just remove pyasn1 * pyasn1_modules from python it will ignore the check, and continue on anyway. I've updated the post on github as well if you want some more info.

Timo Prager

unread,
Jan 28, 2019, 11:27:12 AM1/28/19
to sucks-users
Hi Jonathan, 

i tried with your issue, now i reach one step further but it´s still not working please see the respose below:

leekxmpp.xmlstream.handler.waiter WARNING  Timed out waiting for IqWait_8353c1b                                     7-ea42-42d2-8e6f-9e9d5bd5a6fc-3
Traceback (most recent call last):
  File "/usr/local/bin/sucks", line 10, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python3.4/dist-packages/click/core.py", line 764, in __ca                                     ll__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.4/dist-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.4/dist-packages/click/core.py", line 1164, in inv                                     oke
    return _process_result(rv)
  File "/usr/local/lib/python3.4/dist-packages/click/core.py", line 1102, in _pr                                     ocess_result
    **ctx.params)
  File "/usr/local/lib/python3.4/dist-packages/click/core.py", line 555, in invo                                     ke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.4/dist-packages/sucks/cli.py", line 219, in run
    vacbot.run(action.vac_command)
  File "/usr/local/lib/python3.4/dist-packages/sucks/__init__.py", line 416, in                                      run
    self.send_command(action.to_xml())
  File "/usr/local/lib/python3.4/dist-packages/sucks/__init__.py", line 413, in                                      send_command
    self.xmpp.send_command(xml, self._vacuum_address())
  File "/usr/local/lib/python3.4/dist-packages/sucks/__init__.py", line 482, in                                      send_command
    c.send()
  File "/usr/local/lib/python3.4/dist-packages/sleekxmpp/stanza/iq.py", line 233                                     , in send
    raise IqTimeout(self)
sleekxmpp.exceptions.IqTimeout: <iq from="d**************827...@ecouser.net/a8a29cb96                                     b72***************520f2" id="8353c1b7-e*********************5bd5a6fc-3" to="E000105                                     70**************7...@115.ecorobot.net/atom" type="set"><query xmlns="com:ctl"><ctl td="                                     Clean"><clean speed="standard" type="auto" /></ctl></query></iq>

Any idea ? 
Reply all
Reply to author
Forward
0 new messages