mib1185 / py-sucks

Simple command-line script for the Ecovacs series of robot vacuums
GNU General Public License v3.0
15 stars 5 forks source link

[Errno 8] nodename nor servname provided, or not known #4

Open EdwardChamberlain opened 1 year ago

EdwardChamberlain commented 1 year ago

Running sucks login I enter my email, password, country code (gb), and continent (eu) and then receive the following error:

Traceback (most recent call last):
  File "/Users/edward/Documents/Github/Testing/env/lib/python3.10/site-packages/urllib3/connection.py", line 174, in _new_conn
    conn = connection.create_connection(
  File "/Users/edward/Documents/Github/Testing/env/lib/python3.10/site-packages/urllib3/util/connection.py", line 72, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/socket.py", line 955, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno 8] nodename nor servname provided, or not known
CHAZICLE commented 1 year ago

Try uk for the country code and eu for continent. I had this problem.

EdwardChamberlain commented 1 year ago

I dont think that works @CHAZICLE ! Trying to use 'uk' results in:

KeyError: "Invalid Country Alpha-2 code: 'UK'"
CHAZICLE commented 1 year ago

For the UK, use this to log in: sucks login --country-code uk --continent-code eu

cli.py uses the previously entered country(Alpha-2) code to figure out the continent code. For ecovacs, ours is "UK" not "GB" so it raises a KeyError when it tries to helpfully give you a default that you can just press enter for.

It's one of those annoying exceptions that each library will handle differently. :roll_eyes:

EdwardChamberlain commented 1 year ago

Thanks @CHAZICLE !

That progresses me a bit further.... It seems im connected but no luck with actual cleaning!

When I issue sucks clean 5 as per the readme I get the following error:

sleekxmppfs.exceptions.IqError: <iq type="error" to="::maybe a token::@ecouser.net/::maybe a token::" from="::maybe a token::@ty84oi.ecorobot.net/atom" id="::maybe a token::"><error type="wait" code="404"><recipient-unavailable xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" /></error></iq>

(I've redacted anything that looks like it may be a token just in case.)

Seems like it thinks the robot is not reachable.

CHAZICLE commented 1 year ago

Ah. This library is for the REALLY old deebots that use XMPP to communicate. You're seeing this error because it can't find yours (It says 404).

Sadly ecovacs libraries are a little fragmented these days. If you have an old (but not this old) deebot then this might work: https://pypi.org/project/ozmo/ https://github.com/Ligio/ozmo