libpurecool icon indicating copy to clipboard operation
libpurecool copied to clipboard

Error retrieving devices info

Open buitre-buitaker opened this issue 5 years ago • 1 comments

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 avatar Jan 31 '21 23:01 buitre-buitaker

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

buitre-buitaker avatar Feb 01 '21 22:02 buitre-buitaker