JanJaapKo / DysonPureLink

Handles Dyson Pure Link in Domoticz as plugin
12 stars 2 forks source link

DysonNetworkError #41

Closed ricorico94 closed 2 years ago

ricorico94 commented 3 years ago

Hi, I realized my domoticz plugin was not retrieving data for a couplemonths already, so I decided to update the plugin to latest version -using git pull and stopping/retsarting domoticz service), but now I see the following error messages:

2021-08-14 14:20:16.474 Status: DysonPurHotCoolCrypto: (DysonPurHotCoolCrypto) Initialized author 'Jan-Jaap Kostelijk' 2021-08-14 14:20:16.524 Error: DysonPurHotCoolCrypto: (DysonPurHotCoolCrypto) 'onStart' failed 'DysonNetworkError'. 2021-08-14 14:20:16.524 Error: DysonPurHotCoolCrypto: (DysonPurHotCoolCrypto) ----> Line 651 in '/home/pi/domoticz/plugins/DysonPureLink/plugin.py', function onStart 2021-08-14 14:20:16.524 Error: DysonPurHotCoolCrypto: (DysonPurHotCoolCrypto) ----> Line 172 in '/home/pi/domoticz/plugins/DysonPureLink/plugin.py', function onStart 2021-08-14 14:20:16.524 Error: DysonPurHotCoolCrypto: (DysonPurHotCoolCrypto) ----> Line 134 in '/home/pi/domoticz/plugins/DysonPureLink/cloud/account.py', function login_email_otp 2021-08-14 14:20:16.524 Error: DysonPurHotCoolCrypto: (DysonPurHotCoolCrypto) ----> Line 116 in '/home/pi/domoticz/plugins/DysonPureLink/cloud/account.py', function request

Any idea what can happen ? What should I check ? (my Dyson mobile app is still working). Thanks,

Jan-nl commented 3 years ago

Did you try to switch off and on the Dyson (Powercycle)?

JanJaapKo commented 3 years ago

Hi @ricorico94 ,

I think you need a new OTP code when updating (but not sure). You can try to initiate the cloud request with the 'debug' option set to 'reset cloud data': image And follow the steps as described in the installation instructions. Please let me know if this solves it.

Please check also #40

ricorico94 commented 3 years ago

Hi, I tried to set Debug to "Reset Cloud", but I don't receive any email. I can see this in my log file: 2021-08-17 21:21:47.206 Status: DysonPurHotCoolCrypto: (DysonPurHotCoolCrypto) Stop directive received. 2021-08-17 21:21:47.705 Status: DysonPurHotCoolCrypto: (DysonPurHotCoolCrypto) Exiting work loop. 2021-08-17 21:21:47.707 Status: DysonPurHotCoolCrypto: (DysonPurHotCoolCrypto) Stopping threads. 2021-08-17 21:21:47.707 Status: DysonPurHotCoolCrypto: (DysonPurHotCoolCrypto) Stopped. 2021-08-17 21:21:47.708 Status: DysonPurHotCoolCrypto: (DysonPurHotCoolCrypto) Started. 2021-08-17 21:21:47.707 Status: DysonPurHotCoolCrypto: (DysonPurHotCoolCrypto) Entering work loop. 2021-08-17 21:21:49.351 DysonPurHotCoolCrypto: (DysonPurHotCoolCrypto) Plugin config will be erased to retreive new cloud account data 2021-08-17 21:21:49.352 DysonPurHotCoolCrypto: (DysonPurHotCoolCrypto) Starting version: 4.0.3 2021-08-17 21:21:49.352 DysonPurHotCoolCrypto: (DysonPurHotCoolCrypto) Major version upgrade: 0 -> 4 2021-08-17 21:21:49.354 DysonPurHotCoolCrypto: (DysonPurHotCoolCrypto) No devices found in plugin configuration, request from Dyson cloud account 2021-08-17 21:21:49.337 Status: DysonPurHotCoolCrypto: (DysonPurHotCoolCrypto) Initialized author 'Jan-Jaap Kostelijk' 2021-08-17 21:21:49.408 Error: DysonPurHotCoolCrypto: (DysonPurHotCoolCrypto) 'onStart' failed 'DysonNetworkError'. 2021-08-17 21:21:49.408 Error: DysonPurHotCoolCrypto: (DysonPurHotCoolCrypto) ----> Line 651 in '/home/pi/domoticz/plugins/DysonPureLink/plugin.py', function onStart 2021-08-17 21:21:49.408 Error: DysonPurHotCoolCrypto: (DysonPurHotCoolCrypto) ----> Line 172 in '/home/pi/domoticz/plugins/DysonPureLink/plugin.py', function onStart 2021-08-17 21:21:49.408 Error: DysonPurHotCoolCrypto: (DysonPurHotCoolCrypto) ----> Line 134 in '/home/pi/domoticz/plugins/DysonPureLink/cloud/account.py', function login_email_otp 2021-08-17 21:21:49.408 Error: DysonPurHotCoolCrypto: (DysonPurHotCoolCrypto) ----> Line 116 in '/home/pi/domoticz/plugins/DysonPureLink/cloud/account.py', function

Could it be a bug in my plugin installation (I mean the script itself) ? I used the git pull and here's the log of what I had seen when updating the plugin: `*@****:~/domoticz/plugins/DysonPureLink $ git pull https://github.com/JanJaapKo/DysonPureLink remote: Enumerating objects: 214, done. remote: Counting objects: 100% (214/214), done. remote: Compressing objects: 100% (156/156), done. remote: Total 214 (delta 128), reused 126 (delta 55), pack-reused 0 Réception d'objets: 100% (214/214), 472.27 KiB | 4.63 MiB/s, fait. Résolution des deltas: 100% (128/128), complété avec 3 objets locaux. Depuis https://github.com/JanJaapKo/DysonPureLink

Any idea ?

Lisarne commented 3 years ago

Hi all,

I am having the same issues. when I update the plugin with the ip (tried the mqtt broker ip after the ip of the dyson did not work) and port, the cloud account email and password and added it to generate the e-mail. The email did not show up nor in the spam folder. the loggings output:

2021-08-21 12:38:51.931 Status: Dyson: (Dyson) Stop directive received. 2021-08-21 12:38:52.639 Dyson hardware started. 2021-08-21 12:38:52.572 Status: Dyson: (Dyson) Exiting work loop. 2021-08-21 12:38:52.638 Status: Dyson: (Dyson) Stopping threads. 2021-08-21 12:38:52.639 Status: Dyson: (Dyson) Stopped. 2021-08-21 12:38:52.640 Status: Dyson: (Dyson) Started. 2021-08-21 12:38:52.642 Status: Dyson: (Dyson) Entering work loop. 2021-08-21 12:38:59.279 Dyson: (Dyson) Plugin config will be erased to retreive new cloud account data 2021-08-21 12:38:59.282 Dyson: (Dyson) Starting version: 4.0.3 2021-08-21 12:38:59.282 Dyson: (Dyson) Major version upgrade: 0 -> 4 2021-08-21 12:38:59.296 Dyson: (Dyson) No devices found in plugin configuration, request from Dyson cloud account 2021-08-21 12:38:59.268 Status: Dyson: (Dyson) Initialized author 'Jan-Jaap Kostelijk' 2021-08-21 12:38:59.442 Error: Dyson: (Dyson) 'onStart' failed 'DysonNetworkError'. 2021-08-21 12:38:59.442 Error: Dyson: (Dyson) ----> Line 651 in '/home/pi/domoticz/plugins/DysonPureLink/plugin.py', function onStart 2021-08-21 12:38:59.442 Error: Dyson: (Dyson) ----> Line 172 in '/home/pi/domoticz/plugins/DysonPureLink/plugin.py', function onStart 2021-08-21 12:38:59.443 Error: Dyson: (Dyson) ----> Line 134 in '/home/pi/domoticz/plugins/DysonPureLink/cloud/account.py', function login_email_otp 2021-08-21 12:38:59.443 Error: Dyson: (Dyson) ----> Line 116 in '/home/pi/domoticz/plugins/DysonPureLink/cloud/account.py', function request 2021-08-21 12:39:18.268 Status: Dyson: (Dyson) Stop directive received. 2021-08-21 12:39:18.933 Status: Dyson: (Dyson) Exiting work loop. 2021-08-21 12:39:18.978 Status: Dyson: (Dyson) Stopping threads. 2021-08-21 12:39:18.978 Status: Dyson: (Dyson) Stopped.

Any suggestions? we are clueless at this point.

Best regards,

Lia

Jan-nl commented 3 years ago

I had a brief look in the code (account.py), the DysonNetworkError seems to be raised when thte mail/password combi is not correct. Did you double check this? May be you need to remove the emial verification code when doing a reset.

Lisarne commented 3 years ago

I had a brief look in the code (account.py), the DysonNetworkError seems to be raised when thte mail/password combi is not correct. Did you double check this? May be you need to remove the emial verification code when doing a reset.

retried dubble checked, same result. with debug mode:

2021-08-21 16:25:37.532 Status: Dyson: (Dyson) Exiting work loop.
2021-08-21 16:25:37.615 Status: Dyson: (Dyson) Stopping threads.
2021-08-21 16:25:37.616 Status: Dyson: (Dyson) Stopped.
2021-08-21 16:25:37.617 Status: Dyson: (Dyson) Started.
2021-08-21 16:25:37.620 Status: Dyson: (Dyson) Entering work loop.
2021-08-21 16:25:44.416 Dyson: (Dyson) Debug logging mask set to: PYTHON
2021-08-21 16:25:44.417 Dyson: (Dyson) Parameter count: 25
2021-08-21 16:25:44.417 Dyson: (Dyson) Parameter 'HardwareID':'11'
2021-08-21 16:25:44.418 Dyson: (Dyson) Parameter 'HomeFolder':'/home/pi/domoticz/plugins/DysonPureLink/'
2021-08-21 16:25:44.418 Dyson: (Dyson) Parameter 'StartupFolder':'/home/pi/domoticz/'
2021-08-21 16:25:44.418 Dyson: (Dyson) Parameter 'UserDataFolder':'/home/pi/domoticz/'
2021-08-21 16:25:44.419 Dyson: (Dyson) Parameter 'Database':'/home/pi/domoticz/domoticz.db'
2021-08-21 16:25:44.419 Dyson: (Dyson) Parameter 'Language':'en'
2021-08-21 16:25:44.419 Dyson: (Dyson) Parameter 'Author':'Jan-Jaap Kostelijk'
2021-08-21 16:25:44.419 Dyson: (Dyson) Parameter 'Name':'Dyson'
2021-08-21 16:25:44.420 Dyson: (Dyson) Parameter 'Address':'192.168.178.54'
2021-08-21 16:25:44.420 Dyson: (Dyson) Parameter 'Port':'1883'
2021-08-21 16:25:44.420 Dyson: (Dyson) Parameter 'Key':'DysonPureLink'
2021-08-21 16:25:44.420 Dyson: (Dyson) Parameter 'Mode2':'30'
2021-08-21 16:25:44.420 Dyson: (Dyson) Parameter 'Mode3':'****'
2021-08-21 16:25:44.421 Dyson: (Dyson) Parameter 'Mode4':'Debug'
2021-08-21 16:25:44.421 Dyson: (Dyson) Parameter 'Mode5':'......nl'
2021-08-21 16:25:44.421 Dyson: (Dyson) Parameter 'Mode6':'PT4-EU-KKA4658A'
2021-08-21 16:25:44.421 Dyson: (Dyson) Parameter 'DomoticzVersion':'2021.1'
2021-08-21 16:25:44.422 Dyson: (Dyson) Parameter 'DomoticzHash':'8547c5b7e'
2021-08-21 16:25:44.422 Dyson: (Dyson) Parameter 'DomoticzBuildTime':'2021-04-17 17:29:11'
2021-08-21 16:25:44.423 Dyson: (Dyson) Configuration count: 5
2021-08-21 16:25:44.424 Dyson: (Dyson) Configuration 'MajorVersion':'4'
2021-08-21 16:25:44.424 Dyson: (Dyson) Configuration 'MinorVersion':'0'
2021-08-21 16:25:44.424 Dyson: (Dyson) Configuration 'patchVersion':'3'
2021-08-21 16:25:44.424 Dyson: (Dyson) Configuration 'plugin version':'4.0.3'
2021-08-21 16:25:44.425 Dyson: (Dyson) Device count: 0
2021-08-21 16:25:44.426 Dyson: (Dyson) Starting version: 4.0.3
2021-08-21 16:25:44.426 Dyson: (Dyson) checking versions: current '4.0.3', config '4.0.3'
2021-08-21 16:25:44.428 Dyson: (Dyson) No devices found in plugin configuration, request from Dyson cloud account
2021-08-21 16:25:44.428 Dyson: (Dyson) === start making connection to Dyson account, new method as of 2021 ===
2021-08-21 16:25:44.433 Dyson: (Dyson) building request: method POST, path /v3/userregistration/email/userstatus, params {'country': 'NL'}, data {'email': '.....nl'}, auth None
2021-08-21 16:25:44.407 Status: Dyson: (Dyson) Initialized author 'Jan-Jaap Kostelijk'
2021-08-21 16:25:44.575 Error: Dyson: (Dyson) 'onStart' failed 'DysonNetworkError'.
2021-08-21 16:25:44.575 Error: Dyson: (Dyson) ----> Line 651 in '/home/pi/domoticz/plugins/DysonPureLink/plugin.py', function onStart
2021-08-21 16:25:44.575 Error: Dyson: (Dyson) ----> Line 172 in '/home/pi/domoticz/plugins/DysonPureLink/plugin.py', function onStart
2021-08-21 16:25:44.575 Error: Dyson: (Dyson) ----> Line 134 in '/home/pi/domoticz/plugins/DysonPureLink/cloud/account.py', function login_email_otp
2021-08-21 16:25:44.576 Error: Dyson: (Dyson) ----> Line 116 in '/home/pi/domoticz/plugins/DysonPureLink/cloud/account.py', function request 

  | BeantwoordenDoorsturen -- | --

When we use the same username and password on the dyson app on an android tablet we get the code we need. So those are the right username and password.

JanJaapKo commented 2 years ago

@ricorico94 , @Lisarne Sorry for the late response, hope you still want to use this plugin. Apparently there was a change in the certificate. I made some fixes and now it works for me now again.

JanJaapKo commented 2 years ago

Closing due to no response