CharlesBlonde / libpurecoollink

Dyson Pure Cool link python library
http://libpurecoollink.readthedocs.io
Other
205 stars 54 forks source link

Can't log in anymore #30

Closed Robert-815 closed 4 years ago

Robert-815 commented 4 years ago

Issue closed 3/31/2020 - exking's solution solved the error.

Several months ago, I successfully wrote some code to connect to my Pure Hot+Cool Link, then change it to some preset settings at the touch of a button. However, whenever I have gone to run the code recently, I get the DysonNotLoggedException error:

The code that seems to cause the error: from libpurecoollink.dyson import DysonAccount dyson_account = DysonAccount("my@email.com","MyPass","US") logged = dyson_account.login() devices = dyson_account.devices()

The error: Not logged to Dyson Web Services. Traceback (most recent call last): File "<pyshell#12>", line 1, in <module> devices = dyson_account.devices() File "C:\Users\r****.******\AppData\Local\Programs\Python\Python37-32\lib\site-packages\libpurecoollink\dyson.py", line 74, in devices raise DysonNotLoggedException() libpurecoollink.exceptions.DysonNotLoggedException

Any idea why this once worked, but now no longer does? I haven't changed the code at all from then. Thanks!

exking commented 4 years ago

https://github.com/etheralm/libpurecool/pull/9/files

Robert-815 commented 4 years ago

Thank you exking! This worked perfectly. I couldn't find the test_dyson_account.py file, but the changes in the dyson.py file solved the error on their own.