Skip to content
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

Error retrieving devices info #34

Open
buitre-buitaker opened this issue Jan 31, 2021 · 1 comment
Open

Error retrieving devices info #34

buitre-buitaker opened this issue Jan 31, 2021 · 1 comment

Comments

@buitre-buitaker
Copy link

buitre-buitaker commented Jan 31, 2021

I have a Pure Cool Link purifier, TP04. I am able to log in my Dyson account with this script:

from libpurecool.dyson import DysonAccount
import urllib3
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)

# Log to Dyson account
# Language is a two characters code (eg: FR)
dyson_account = DysonAccount("[email protected]","XXXX","ES")
logged = dyson_account.login()

if not logged:
    print('Unable to login to Dyson account')
    exit(1)

# List devices available on the Dyson account
devices = dyson_account.devices()

But it fails retrieving the device info:

Traceback (most recent call last):
  File "dyson.py", line 15, in <module>
    devices = dyson_account.devices()
  File "build/bdist.macosx-10.15-x86_64/egg/libpurecool/dyson.py", line 104, in devices
    
  File "build/bdist.macosx-10.15-x86_64/egg/libpurecool/dyson_pure_cool_link.py", line 70, in __init__
TypeError: super() takes at least 1 argument (0 given)

Any support on this please?

Thank you!

@buitre-buitaker
Copy link
Author

buitre-buitaker commented Feb 1, 2021

OK, using python2.7... now with python3 it gets the device info, but timeout using manual conection with correct IP...

  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/libpurecool-0.6.4-py3.8.egg/libpurecool/dyson_pure_cool_link.py", line 152, in connect
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/libpurecool-0.6.4-py3.8.egg/libpurecool/dyson_pure_cool_link.py", line 160, in _mqtt_connect
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/paho/mqtt/client.py", line 941, in connect
    return self.reconnect()
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/paho/mqtt/client.py", line 1075, in reconnect
    sock = self._create_socket_connection()
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/paho/mqtt/client.py", line 3546, in _create_socket_connection
    return socket.create_connection(addr, source_address=source, timeout=self._keepalive)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/socket.py", line 808, in create_connection
    raise err
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/socket.py", line 796, in create_connection
    sock.connect(sa)
socket.timeout: timed out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant