Python plugin: Dyson pure link

Python and python framework

Moderator: leecollings

JanJaap
Posts: 215
Joined: Thursday 12 October 2017 20:46
Target OS: Raspberry Pi / ODroid
Domoticz version: Dev
Location: the Netherlands
Contact:

Python plugin: Dyson pure link

Post by JanJaap »

Hi all,

I've created a plugin to connect to the Dyson PureLink devices. For now the PureCool tower (which I have) is tested. Reading out the sensors works fine, sending commands is still work in progress.

Please find the plugin here: GitHub/JanJaapKo

Please read the github wiki for more info.

Looking forward to any comments/findings!

Regards,

Jan-Jaap
RPi 3, Domoticz dev version, Aeon ZWave stick (with a whole bunch of slaves), Zigbee using Zigbee2MQTT, Nest thermo, P1 smart meter on RPi Zero
Mozart
Posts: 39
Joined: Monday 19 January 2015 14:35
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: The Netherlands
Contact:

Re: Python plugin: Dyson pure link

Post by Mozart »

I'm trying to use your plugin but it's not working :(
I think it has to do with the password but I'm not sure.
My device has a sticker behind the filter that has the Mac address and also a mobile phone picture with arrows indicating data exchange and a code behind it. This is the only thing I can find that looks like the password.
Code.png
Code.png (350.75 KiB) Viewed 5246 times
I added the hardware with the following settings:
settings.png
settings.png (48.54 KiB) Viewed 5246 times
I get the additional devices in the list but the logs show the following:
log.png
log.png (14.17 KiB) Viewed 5246 times
What goes wrong?
Raspberry 3
Aeon Labs Z-Wave Stick Series 2 - RFLink USB Gateway
Z-Wave switches
433 MHz Temperature + Humidity sensors
Philips Hue Lights
Mi-Light WiFi Bridge + RGBW Controllers
JanJaap
Posts: 215
Joined: Thursday 12 October 2017 20:46
Target OS: Raspberry Pi / ODroid
Domoticz version: Dev
Location: the Netherlands
Contact:

Re: Python plugin: Dyson pure link

Post by JanJaap »

Hi,

Sorry for late reply I wasn't watching this forum......

First, this device doesn't look like my 475 model. The error points to either no network connection or password incorrect. I needed the password at the initial setup of the machine. Did you need that as well?

See also the extended wiki on github.
RPi 3, Domoticz dev version, Aeon ZWave stick (with a whole bunch of slaves), Zigbee using Zigbee2MQTT, Nest thermo, P1 smart meter on RPi Zero
JollyRoger68
Posts: 1
Joined: Wednesday 25 September 2019 23:55
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python plugin: Dyson pure link

Post by JollyRoger68 »

Mozart wrote: Thursday 27 June 2019 11:00 I'm trying to use your plugin but it's not working :(
I think it has to do with the password but I'm not sure.
My device has a sticker behind the filter that has the Mac address and also a mobile phone picture with arrows indicating data exchange and a code behind it. This is the only thing I can find that looks like the password.
Code.png

I added the hardware with the following settings:
settings.png

I get the additional devices in the list but the logs show the following:
log.png

What goes wrong?
This is not the "Link" Modell. The new ones, with the new status display, are just called dyson pure cool. Now the App connects over Bluetooth, so there is no password on the device.

As your Post was from January, did you find any solution in between?
JanJaap
Posts: 215
Joined: Thursday 12 October 2017 20:46
Target OS: Raspberry Pi / ODroid
Domoticz version: Dev
Location: the Netherlands
Contact:

Re: Python plugin: Dyson pure link

Post by JanJaap »

Well, I did do some tests with connections to new models, however, since I have only an old one I'm looking for testers ;)

See discussion on the plugin github. I created a test plugin to see if I can get the credentials from the Dyson cloud account, see test plugin.

I'd be really interested to see what the response is on your case. The test plugin will try to connect to the machineand fetch its status when it connects. Works fine on my old model.
RPi 3, Domoticz dev version, Aeon ZWave stick (with a whole bunch of slaves), Zigbee using Zigbee2MQTT, Nest thermo, P1 smart meter on RPi Zero
LaurentVDP
Posts: 2
Joined: Wednesday 08 April 2020 20:18
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.1
Location: Belgium
Contact:

Re: Python plugin: Dyson pure link

Post by LaurentVDP »

JanJaap wrote: Thursday 26 September 2019 20:24 Well, I did do some tests with connections to new models, however, since I have only an old one I'm looking for testers ;)

See discussion on the plugin github. I created a test plugin to see if I can get the credentials from the Dyson cloud account, see test plugin.

I'd be really interested to see what the response is on your case. The test plugin will try to connect to the machineand fetch its status when it connects. Works fine on my old model.
well, I tested the plugin with the settings as follows:
Dyson test plugin settings.JPG
Dyson test plugin settings.JPG (59.81 KiB) Viewed 4169 times
but no devices are accessable.
log file:
2020-04-14 17:30:01.709 (Dyson ) MqttClient::Failed to connect to: 192.168.0.131:1883, Description: No route to host
2020-04-14 17:30:06.734 (Dyson test) Pushing 'onHeartbeatCallback' on to queue
2020-04-14 17:30:06.769 (Dyson test) Processing 'onHeartbeatCallback' message
2020-04-14 17:30:06.769 (Dyson test) Calling message handler 'onHeartbeat'.
2020-04-14 17:30:06.769 (Dyson test) onHeartbeat called
2020-04-14 17:30:11.729 (Dyson ) MqttClient::Failed to connect to: 192.168.0.131:1883, Description: No route to host
2020-04-14 17:30:16.736 (Dyson test) Pushing 'onHeartbeatCallback' on to queue
2020-04-14 17:30:16.739 (Dyson test) Processing 'onHeartbeatCallback' message
2020-04-14 17:30:16.739 (Dyson test) Calling message handler 'onHeartbeat'.
2020-04-14 17:30:16.739 (Dyson test) onHeartbeat called
2020-04-14 17:30:21.699 (Dyson ) MqttClient::Failed to connect to: 192.168.0.131:1883, Description: No route to host
2020-04-14 17:30:26.737 (Dyson test) Pushing 'onHeartbeatCallback' on to queue
2020-04-14 17:30:26.759 (Dyson test) Processing 'onHeartbeatCallback' message
2020-04-14 17:30:26.759 (Dyson test) Calling message handler 'onHeartbeat'.
2020-04-14 17:30:26.759 (Dyson test) onHeartbeat called
2020-04-14 17:30:31.719 (Dyson ) MqttClient::Failed to connect to: 192.168.0.131:1883, Description: No route to host
2020-04-14 17:30:36.739 (Dyson test) Pushing 'onHeartbeatCallback' on to queue
2020-04-14 17:30:36.779 (Dyson test) Processing 'onHeartbeatCallback' message
2020-04-14 17:30:36.779 (Dyson test) Calling message handler 'onHeartbeat'.
2020-04-14 17:30:36.779 (Dyson test) onHeartbeat called
2020-04-14 17:30:41.689 (Dyson ) MqttClient::Failed to connect to: 192.168.0.131:1883, Description: No route to host
2020-04-14 17:30:46.741 (Dyson test) Pushing 'onHeartbeatCallback' on to queue
2020-04-14 17:30:46.749 (Dyson test) Processing 'onHeartbeatCallback' message
2020-04-14 17:30:46.749 (Dyson test) Calling message handler 'onHeartbeat'.
2020-04-14 17:30:46.749 (Dyson test) onHeartbeat called
2020-04-14 17:30:51.709 (Dyson ) MqttClient::Failed to connect to: 192.168.0.131:1883, Description: No route to host
2020-04-14 17:30:56.743 (Dyson test) Pushing 'onHeartbeatCallback' on to queue
2020-04-14 17:30:56.769 (Dyson test) Processing 'onHeartbeatCallback' message
2020-04-14 17:30:56.769 (Dyson test) Calling message handler 'onHeartbeat'.
2020-04-14 17:30:56.769 (Dyson test) onHeartbeat called


with the original plugin, I have the same issue as JollyRoger68, I see the devices, but they are not active (f.e. 0°C and hum 50%)
if I can help further, let me know.
Domoticz 2020.1 on Rasberry Pi 4B
Sonos speakers |
MartijnW
Posts: 2
Joined: Saturday 02 May 2020 10:50
Target OS: -
Domoticz version:
Contact:

Re: Python plugin: Dyson pure link

Post by MartijnW »

Dear JanJaap,

i'm using your plugin and did the add 438 to update to the latest version of the plugin. It seems like to work on my Dyson Pure Cool. It connects but doesn't get the values. Using latest version of Domoticz. Here the log of domoticz:

2020-05-02 10:54:38.395 (Dyson pure cool) MqttClient::onHeartbeat
2020-05-02 10:54:38.395 (Dyson pure cool) MqttClient::Reconnecting
2020-05-02 10:54:38.395 (Dyson pure cool) MqttClient::Open
2020-05-02 10:54:38.395 (Dyson pure cool) MqttClient::Open: setup Domoticz connection object with protocol: 'MQTT'
2020-05-02 10:54:38.395 (Dyson pure cool) MqttClient::Open: open connection
2020-05-02 10:54:38.395 (Dyson pure cool) Polling unit in 4 heartbeats.
2020-05-02 10:54:38.395 (Dyson pure cool) Protocol set to: 'MQTT'.
2020-05-02 10:54:38.396 (Dyson pure cool) Transport set to: 'TCP/IP', 192.168.#.##:1883.
2020-05-02 10:54:38.396 (Dyson pure cool) Connect directive received, action initiated successfully.
2020-05-02 10:54:38.446 (Dyson pure cool) onConnect called
2020-05-02 10:54:38.446 (Dyson pure cool) onConnect returns 1: Connection 'Name: '192.168.#.##', Transport: 'TCP/IP', Protocol: 'MQTT', Address: '192.168.#.##', Port: '1883', Baud: -1, Bytes: 0, Connected: True, Last Seen: 2020-05-02 10:54:38, Parent: 'None'', Status: '0', Description: 'Success'
2020-05-02 10:54:38.447 (Dyson pure cool) MqttClient::onConnect
2020-05-02 10:54:38.447 (Dyson pure cool) MqttClient::MQTT connected successfully.
2020-05-02 10:54:38.447 (Dyson pure cool) MqttClient::Connect
2020-05-02 10:54:38.447 (Dyson pure cool) MqttClient::MQTT CONNECT ID: 'Domoticz_1588409418'
2020-05-02 10:54:38.447 (Dyson pure cool) Sending 141 bytes of data
2020-05-02 10:54:38.447 (Dyson pure cool) 10 8a 01 00 04 4d 51 54 54 04 c2 00 3c 00 13 44 6f 6d 6f 74 .ʮ..MQTT.®<..Domot
2020-05-02 10:54:38.447 (Dyson pure cool) 69 63 7a 5f 31 35 38 38 34 30 39 34 31 38 00 0f 56 53 39 2d icz_1588409418..VS9-
2020-05-02 10:54:38.447 (Dyson pure cool) 45 55 2d 4e 43 41 32 34 31 31 41 00 58 45 7a 4c 66 32 4c 65 EU-NCA2411A.XEzLf2Le
2020-05-02 10:54:38.447 (Dyson pure cool) 32 55 36 35 67 64 38 6a 53 58 54 51 61 53 47 6e 67 64 35 37 2U65gd8jSXTQaSGngd57
2020-05-02 10:54:38.447 (Dyson pure cool) 65 69 53 30 4b 6f 31 79 38 4e 51 57 30 47 5a 2b 45 61 76 54 eiS0Ko1y8NQW0GZ+EavT
2020-05-02 10:54:38.447 (Dyson pure cool) 4e 72 66 78 4d 69 46 62 67 6a 34 45 6d 62 41 32 4d 4e 39 4a NrfxMiFbgj4EmbA2MN9J
2020-05-02 10:54:38.447 (Dyson pure cool) 4d 73 30 56 43 39 64 79 5a 58 33 6e 4e 4f 36 77 64 34 67 3d Ms0VC9dyZX3nNO6wd4g=
2020-05-02 10:54:38.447 (Dyson pure cool) 3d .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. =
2020-05-02 10:54:38.604 (Dyson pure cool) Queued asynchronous read aborted (192.168.#.##:1883), [2] End of file.
2020-05-02 10:54:38.648 (Dyson pure cool) Received 4 bytes of data
2020-05-02 10:54:38.648 (Dyson pure cool) 20 02 00 05 .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. ....
2020-05-02 10:54:38.648 (Dyson pure cool) Disconnect event received for '192.168.#.##:1883'.
2020-05-02 10:54:38.649 (Dyson pure cool) MqttClient::onMessage
2020-05-02 10:54:38.649 (Dyson pure cool) MqttClient::onMessage Topic '', Data[Verb]: 'CONNACK'
2020-05-02 10:54:38.649 (Dyson pure cool) onMQTTConnected called
2020-05-02 10:54:38.649 (Dyson pure cool) MqttClient::Subscribe
2020-05-02 10:54:38.649 (Dyson pure cool) dyson_pure_link_device: request_state called
2020-05-02 10:54:38.649 (Dyson pure cool) request_state command built
2020-05-02 10:54:38.650 (Dyson pure cool) MqttClient::Publish 438/VS9-EU-NCA2411A/command ({"msg": "REQUEST-CURRENT-STATE", "time": "2020-05-02T08:54:38Z"})
2020-05-02 10:54:38.650 (Dyson pure cool) MqttClient::onDisonnect Disconnected from: 192.168.#.##:1883
2020-05-02 10:54:38.650 (Dyson pure cool) MqttClient::Close
2020-05-02 10:54:38.650 (Dyson pure cool) onMQTTDisconnected
2020-05-02 10:54:38.650 (Dyson pure cool) Deallocating connection object '192.168.#.##' (192.168.#.##:1883).
2020-05-02 10:54:38.650 Error: (Dyson pure cool) No transport, write directive to '192.168.#.##' ignored.
2020-05-02 10:54:38.650 Error: (Dyson pure cool) No transport, write directive to '192.168.#.##' ignored.
JanJaap
Posts: 215
Joined: Thursday 12 October 2017 20:46
Target OS: Raspberry Pi / ODroid
Domoticz version: Dev
Location: the Netherlands
Contact:

Re: Python plugin: Dyson pure link

Post by JanJaap »

Hi Martijn,

I need a bit more information to help out:
- is your device actually a '438'?
- did you enter the Dyson cloud account or local password? Or both?
- when starting the plugin (just hit 'update' on the hardware page), what is the logging saying when attempting to connect? It will also spit the passwords so you can xxxx them too

Some comments in the (closed) issue on GitHub had some one get the local password out of the cloud account replies. Perhaps that is worth checking.
RPi 3, Domoticz dev version, Aeon ZWave stick (with a whole bunch of slaves), Zigbee using Zigbee2MQTT, Nest thermo, P1 smart meter on RPi Zero
MartijnW
Posts: 2
Joined: Saturday 02 May 2020 10:50
Target OS: -
Domoticz version:
Contact:

Re: Python plugin: Dyson pure link

Post by MartijnW »

JanJaap wrote: Monday 04 May 2020 9:48 Hi Martijn,

I need a bit more information to help out:
- is your device actually a '438'?
- did you enter the Dyson cloud account or local password? Or both?
- when starting the plugin (just hit 'update' on the hardware page), what is the logging saying when attempting to connect? It will also spit the passwords so you can xxxx them too

Some comments in the (closed) issue on GitHub had some one get the local password out of the cloud account replies. Perhaps that is worth checking.
Hi janJaap,

I thought, after reading the forum and github, the new devices were the 438.
I entered the same credentials as i use in the link-app on my phone to connect, didn't need a local password with installing.

The update gives\\\\;

2020-05-04 13:57:40.013 (Dyson pure cool) === start making connection to Dyson account ===
2020-05-04 13:57:40.124 (Dyson pure cool) Not logged to Dyson Web Services.
2020-05-04 13:57:40.124 (Dyson pure cool) No devices found in Dyson cloud account
2020-05-04 13:57:40.124 (Dyson pure cool) no cloud devices found, try the local credentials will be used
2020-05-04 13:57:40.124 (Dyson pure cool) local device pwd: '#######'
2020-05-04 13:57:40.124 (Dyson pure cool) local device usn: 'VS9-EU-NCA2411A'
JanJaap
Posts: 215
Joined: Thursday 12 October 2017 20:46
Target OS: Raspberry Pi / ODroid
Domoticz version: Dev
Location: the Netherlands
Contact:

Re: Python plugin: Dyson pure link

Post by JanJaap »

OK, apparently Dyson changed the URL for the API's to connect to. Should be good now. Changed from api.cp.dyson.com to appapi.cp.dyson.com. Please give it a try by pulling latest version.
RPi 3, Domoticz dev version, Aeon ZWave stick (with a whole bunch of slaves), Zigbee using Zigbee2MQTT, Nest thermo, P1 smart meter on RPi Zero
Patlazuli
Posts: 4
Joined: Monday 01 June 2020 19:57
Target OS: -
Domoticz version:
Contact:

Re: Python plugin: Dyson pure link

Post by Patlazuli »

Hello

Don't work for me . any idea ?

(Dyson) Login OK ....
Dyson) Fetching devices from Dyson Web Services.
(Dyson) No devices found in Dyson cloud account
(Dyson) Device instance created: Non

Thanks
JanJaap
Posts: 215
Joined: Thursday 12 October 2017 20:46
Target OS: Raspberry Pi / ODroid
Domoticz version: Dev
Location: the Netherlands
Contact:

Re: Python plugin: Dyson pure link

Post by JanJaap »

Hi Patlazuli,

I'll need some more info than this.......

Check questions/steps:
- when you open the app on your phone/tablet, are there any devices visible?
- is your device a newer (post 2018) model or not?
- if it is an older model you can also use the credentials that you needed when installing the device (see the wiki on Git)
- please setup (update) the plugin with debug logging enabled, this will show the response from Dyson's web API and post the logging
RPi 3, Domoticz dev version, Aeon ZWave stick (with a whole bunch of slaves), Zigbee using Zigbee2MQTT, Nest thermo, P1 smart meter on RPi Zero
Patlazuli
Posts: 4
Joined: Monday 01 June 2020 19:57
Target OS: -
Domoticz version:
Contact:

Re: Python plugin: Dyson pure link

Post by Patlazuli »

Hi,

Thanks in advance :

- when you open the app on your phone/tablet, are there any devices visible? YES
- is your device a newer (post 2018) model or not? YES newer one
- if it is an older model you can also use the credentials that you needed when installing the device (see the wiki on Git) : Newer model
- please setup (update) the plugin with debug logging enabled, this will show the response from Dyson's web API and post the logging :

2020-06-02 16:25:25.863 Status: (Dyson) Entering work loop.
2020-06-02 16:25:25.864 Status: (Dyson) Initialized version 2.2.1, author 'Jan-Jaap Kostelijk'
2020-06-02 16:25:29.071 (Dyson) Login OK, JSON response: '{'Account': 'xxxxxxx', 'Password': 'xxxxx=='}'
2020-06-02 16:25:29.071 (Dyson) Fetching devices from Dyson Web Services.
2020-06-02 16:25:29.356 (Dyson) No devices found in Dyson cloud account
2020-06-02 16:25:29.356 (Dyson) Device instance created: None
2020-06-02 16:25:29.356 Error: (Dyson) No usable credentials found
2020-06-02 16:25:29.356 Error: (Dyson) 'onStart' failed 'AttributeError':''NoneType' object has no attribute 'device_base_topic''.
2020-06-02 16:25:29.356 Error: (Dyson) ----> Line 415 in '/home/pi/domoticz/plugins/DysonPureLink/plugin.py', function onStart
2020-06-02 16:25:29.356 Error: (Dyson) ----> Line 233 in '/home/pi/domoticz/plugins/DysonPureLink/plugin.py', function onStart
JanJaap
Posts: 215
Joined: Thursday 12 October 2017 20:46
Target OS: Raspberry Pi / ODroid
Domoticz version: Dev
Location: the Netherlands
Contact:

Re: Python plugin: Dyson pure link

Post by JanJaap »

Hi,

It looks like your cloud account contains no device. I put in some extra logging, can you please pull the latest version and pot the logging?

Thanks
RPi 3, Domoticz dev version, Aeon ZWave stick (with a whole bunch of slaves), Zigbee using Zigbee2MQTT, Nest thermo, P1 smart meter on RPi Zero
Patlazuli
Posts: 4
Joined: Monday 01 June 2020 19:57
Target OS: -
Domoticz version:
Contact:

Re: Python plugin: Dyson pure link

Post by Patlazuli »

Hi,
here it is :

2020-06-03 17:55:08.397 (Dyson) Request URL: 'https://appapi.cp.dyson.com/v1/userregi ... country=DE'
2020-06-03 17:55:08.387 Status: (Dyson) Initialized version 2.2.1, author 'Jan-Jaap Kostelijk'
2020-06-03 17:55:08.386 Status: (Dyson) Entering work loop.
2020-06-03 17:55:11.020 (Dyson) Login OK, JSON response: '{'Account': 'xxxxxxxxx', 'Password': 'xxxxxxxxxxxxxx}'
2020-06-03 17:55:11.020 (Dyson) Fetching devices from Dyson Web Services.
2020-06-03 17:55:11.249 (Dyson) Reply from Dyson: []'
2020-06-03 17:55:11.250 (Dyson) No devices found in Dyson cloud account
2020-06-03 17:55:11.250 (Dyson) Device instance created: None
2020-06-03 17:55:11.250 Error: (Dyson) No usable credentials found
2020-06-03 17:55:11.250 Error: (Dyson) 'onStart' failed 'AttributeError':''NoneType' object has no attribute 'device_base_topic''.
2020-06-03 17:55:11.250 Error: (Dyson) ----> Line 415 in '/home/pi/domoticz/plugins/DysonPureLink/plugin.py', function onStart
2020-06-03 17:55:11.250 Error: (Dyson) ----> Line 233 in '/home/pi/domoticz/plugins/DysonPureLink/plugin.py', function onStart

all is ok with "Dyson LInk" on smartphone

Thanks
JanJaap
Posts: 215
Joined: Thursday 12 October 2017 20:46
Target OS: Raspberry Pi / ODroid
Domoticz version: Dev
Location: the Netherlands
Contact:

Re: Python plugin: Dyson pure link

Post by JanJaap »

Hi,

Well apparently there is a response from the Dyson web API only it doesn't return a list of devices. Looking at one of the issues reported in github (comments around 23-11-2019) this seems to happen more often. I'm afraid IO can't help there. You could contact Dyson as Loedeman did.
RPi 3, Domoticz dev version, Aeon ZWave stick (with a whole bunch of slaves), Zigbee using Zigbee2MQTT, Nest thermo, P1 smart meter on RPi Zero
Patlazuli
Posts: 4
Joined: Monday 01 June 2020 19:57
Target OS: -
Domoticz version:
Contact:

Re: Python plugin: Dyson pure link

Post by Patlazuli »

ok thanks. i do that.
ricorico94
Posts: 94
Joined: Monday 26 October 2015 10:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python plugin: Dyson pure link

Post by ricorico94 »

Hi,
I tried to install the plugin, but it doesn't want to connect..
I tried it on a fresh install on Buster of latest Domoticz release. My product is a "Dyson Pure Hot+Cool Cryptomic" (the latest model of this spring)
It seems it doesn't to connect, but in the log I find weird the request as I can't recognize the account and password I seized.

Code: Select all

2020-06-09 21:41:10.116 (DysonHot+Cool) === start making connection to Dyson account ===
2020-06-09 21:41:10.116 (DysonHot+Cool) Request URL: 'https://appapi.cp.dyson.com/v1/userregistration/authenticate?country=DE'
2020-06-09 21:41:10.680 (DysonHot+Cool) Login OK, JSON response: '{'Account': 'cdaaf647-92d8-4827-b2d3-1c0909090909', 'Password': 'S6lB6UkA+Ptg8JhTfQgX9L+xDU5RQy/jhnpwkjESP3nFPy+H9wapQUfoCTh30yqcR0K6YF6vhmuXXXXXXX'}'
2020-06-09 21:41:10.680 (DysonHot+Cool) Fetching devices from Dyson Web Services.
2020-06-09 21:41:10.795 (DysonHot+Cool) Reply from Dyson: []'
2020-06-09 21:41:10.795 (DysonHot+Cool) No devices found in Dyson cloud account
2020-06-09 21:41:10.795 (DysonHot+Cool) Device instance created: None
2020-06-09 21:41:10.795 (DysonHot+Cool) Heartbeat interval set to: 10.
2020-06-09 21:41:10.106 Status: (DysonHot+Cool) Entering work loop.
2020-06-09 21:41:10.107 Status: (DysonHot+Cool) Initialized version 2.2.1, author 'Jan-Jaap Kostelijk'
2020-06-09 21:41:10.795 Error: (DysonHot+Cool) No usable credentials found
2020-06-09 21:41:10.795 Error: (DysonHot+Cool) 'onStart' failed 'AttributeError':''NoneType' object has no attribute 'device_base_topic''.
2020-06-09 21:41:10.795 Error: (DysonHot+Cool) ----> Line 415 in '/home/pi/domoticz/plugins/DysonPureLink/plugin.py', function onStart
2020-06-09 21:41:10.795 Error: (DysonHot+Cool) ----> Line 233 in '/home/pi/domoticz/plugins/DysonPureLink/plugin.py', function onStart
(I replaced some characters by XXX for confidentiality).
I checked the settings of the Hardware and my email address looks ok. I can both connect to dyson.fr website and on their android app with my account and password.
I noticed I had to enter an IP address in ardware settings despite I don't use the local but the account login approach. Is it normal ?
Could you advise what I can try ?

In case it helps, I paste here the installation steps and results, which look ok:

Code: Select all

pi@raspberrypi:~/domoticz/plugins $ sudo apt-get update
Réception de :1 http://raspbian.raspberrypi.org/raspbian buster InRelease [15,0 kB]
Atteint :2 http://archive.raspberrypi.org/debian buster InRelease
Réception de :3 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages [13,0 MB]
Réception de :4 http://raspbian.raspberrypi.org/raspbian buster/non-free armhf Packages [104 kB]
13,1 Mo réceptionnés en 8s (1 582 ko/s)
Lecture des listes de paquets... Fait
pi@raspberrypi:~/domoticz/plugins $ sudo apt-get install python3-requests
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances
Lecture des informations d'état... Fait
python3-requests est déjà la version la plus récente (2.21.0-1).
python3-requests passé en « installé manuellement ».
Le paquet suivant a été installé automatiquement et n'est plus nécessaire :
  rpi-eeprom-images
Veuillez utiliser « sudo apt autoremove » pour le supprimer.
0 mis à jour, 0 nouvellement installés, 0 à enlever et 7 non mis à jour.
pi@raspberrypi:~/domoticz/plugins $ sudo pip3 install crypto
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting crypto
  Downloading https://files.pythonhosted.org/packages/fc/bb/0b812dc02e6357606228edfbf5808f5ca0a675a84273578c3a199e841cd8/crypto-1.4.1-py2.py3-none-any.whl
Collecting Naked (from crypto)
  Downloading https://files.pythonhosted.org/packages/02/36/b8107b51adca73402ec1860d88f41d958e275e60eea6eeaa9c39ddb89a40/Naked-0.1.31-py2.py3-none-any.whl (590kB)
    100% |████████████████████████████████| 593kB 492kB/s
Collecting shellescape (from crypto)
  Downloading https://files.pythonhosted.org/packages/d0/f4/0081137fceff5779cd4205c1e96657e41cc2d2d56c940dc8eeb6111780f7/shellescape-3.8.1-py2.py3-none-any.whl
Collecting pyyaml (from Naked->crypto)
  Downloading https://www.piwheels.org/simple/pyyaml/PyYAML-5.3.1-cp37-cp37m-linux_armv7l.whl (44kB)
    100% |████████████████████████████████| 51kB 1.6MB/s
Requirement already satisfied: requests in /usr/lib/python3/dist-packages (from Naked->crypto) (2.21.0)
Installing collected packages: pyyaml, Naked, shellescape, crypto
Successfully installed Naked-0.1.31 crypto-1.4.1 pyyaml-5.3.1 shellescape-3.8.1
pi@raspberrypi:~/domoticz/plugins $ git clone https://github.com/JanJaapKo/DysonPureLink
Clonage dans 'DysonPureLink'...
remote: Enumerating objects: 112, done.
remote: Counting objects: 100% (112/112), done.
remote: Compressing objects: 100% (86/86), done.
remote: Total 294 (delta 68), reused 58 (delta 26), pack-reused 182
Réception d'objets: 100% (294/294), 1.34 MiB | 3.06 MiB/s, fait.
Résolution des deltas: 100% (174/174), fait.
Thanks a lot !
Ricorico94
jannl
Posts: 673
Joined: Thursday 02 October 2014 6:36
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Geleen
Contact:

Re: Python plugin: Dyson pure link

Post by jannl »

Tried a lot of this, but no luck so far.
I only get '403 access denied' now. I am pretty sure I got a login ok when I first started.

Someone a clue?
FrancescoS
Posts: 12
Joined: Sunday 19 May 2019 21:16
Target OS: -
Domoticz version:
Contact:

Re: Python plugin: Dyson pure link

Post by FrancescoS »

Hello,
I am using this plugin with a cloud account.
The plugin is able to retrieve the credential and the device list, but values are not populated in the widgets.
It seems like there is a problem in the write protocol. Any hint ?


=== start making connection to Dyson account ===
2020-10-22 18:09:19.343 (Dyson) Request URL: 'https://appapi.cp.dyson.com/v1/userregi ... country=NL'
2020-10-22 18:09:19.684 (Dyson) Login OK, JSON response: '{'Account': 'yyiiyyiiyyi-b31f-4033-b5e2-5644f5caf297', 'Password': 'yiyiyiuyiyiuyyi+4J4iS46gXEJhZwsGsUsnCcKWUbH/+JpXnKXBwrypBFEAGHdZXr07Rg=='}'
2020-10-22 18:09:19.684 (Dyson) Fetching devices from Dyson Web Services.
2020-10-22 18:09:19.838 (Dyson) Reply from Dyson: [{'Active': False, 'Serial': 'PT4-EU-KKA0925A', 'Name': 'Salotto', 'ScaleUnit': 'SU09', 'Version': '21.04.03', 'LocalCredentials': 'yyioyuioyu+C6kR9BoYzd4dVLfPrgDdaGUTOQAcSIHwdp8SPtz0pOWV2JkAtSFpKhKZDzgb8xorSmD42+sHu2LwD39qIPgK7/AnVglFgYBy0F/B/lVm3WLo0Kn9byOCeL/K40PRveVMixUxePQeHGZUy9qaHNubyik+xOw+NOe8mYQ+hJq6f', 'AutoUpdate': True, 'NewVersionAvailable': False, 'ProductType': '455'}]'
2020-10-22 18:09:19.838 (Dyson) Device returned from Dyson: {'Active': False, 'Serial': 'PT4-EU-KKA0925A', 'Name': 'Salotto', 'ScaleUnit': 'SU09', 'Version': '21.04.03', 'LocalCredentials': 'T9Do6DBqUhrOMJMOnjn8LD+yiuyii+sHu2LwD39qIPgK7/AnVglFgYBy0F/B/lVm3WLo0Kn9byOCeL/K40PRveVMixUxePQeHGZUy9qaHNubyik+xOw+NOe8mYQ+hJq6f', 'AutoUpdate': True, 'NewVersionAvailable': False, 'ProductType': '455'}'
2020-10-22 18:09:19.840 (Dyson) Number of devices from cloud: '1'
2020-10-22 18:09:19.840 (Dyson) 1 device found in cloud, none configured, assuming we need this one: 'Salotto'
2020-10-22 18:09:19.840 (Dyson) local device pwd: 'z4PhNX7vuL3xVChQ1m2AB9Yg5AULVxXcg/yuiyuiyu+DGNKHfuwvY7kxvUdBeoGlODJ6+SfaPg=='
2020-10-22 18:09:19.840 (Dyson) cloud device pwd: 'u3Yr4CFts0yRE+yuyuiyuyuyiyiyuyiii/A=='
2020-10-22 18:09:19.840 (Dyson) Device instance created: Dyson device from Cloud: 'Salotto' with serial 'PT4-EU-KKA0925A' of type '455', with version '21.04.03'
2020-10-22 18:09:19.840 (Dyson) base topic defined: '455/PT4-EU-KKA0925A'
2020-10-22 18:09:19.840 (Dyson) MqttClient::__init__
2020-10-22 18:09:19.841 (Dyson) MqttClient::Open
2020-10-22 18:09:19.841 (Dyson) MqttClient::Open: setup Domoticz connection object with protocol: 'MQTT'
2020-10-22 18:09:19.841 (Dyson) MqttClient::Open: open connection
2020-10-22 18:09:19.841 (Dyson) Heartbeat interval set to: 10.
2020-10-22 18:09:19.841 (Dyson) Protocol set to: 'MQTT'.
2020-10-22 18:09:19.841 (Dyson) Transport set to: 'TCP/IP', 192.168.1.14:1883.
2020-10-22 18:09:19.844 (Dyson) Connect directive received, action initiated successfully.
2020-10-22 18:09:19.894 (Dyson) onConnect called: Connection 'Name: '192.168.1.14', Transport: 'TCP/IP', Protocol: 'MQTT', Address: '192.168.1.14', Port: '1883', Baud: -1, Bytes: 0, Connected: True, Last Seen: 2020-10-22 18:09:19, Parent: 'None'', Status: '0', Description: 'Success'
2020-10-22 18:09:19.894 (Dyson) MqttClient::onConnect
2020-10-22 18:09:19.894 (Dyson) MqttClient::MQTT connected successfully.
2020-10-22 18:09:19.894 (Dyson) MqttClient::Connect
2020-10-22 18:09:19.894 (Dyson) MqttClient::MQTT CONNECT ID: 'Domoticz_1603382959'
2020-10-22 18:09:19.894 (Dyson) Sending 141 bytes of data
2020-10-22 18:09:19.894 (Dyson) 10 8a 01 00 04 4d 51 54 54 04 c2 00 3c 00 13 44 6f 6d 6f 74 .ʮ..MQTT.®<..Domot
2020-10-22 18:09:19.895 (Dyson) 69 63 7a 5f 31 36 30 33 33 38 32 39 35 39 00 0f 50 54 34 2d icz_1603382959..PT4-
2020-10-22 18:09:19.895 (Dyson) 45 55 2d 4b 4b 41 30 39 32 35 41 00 58 75 33 59 72 34 43 46 EU-KKA0925A.Xu3Yr4CF
2020-10-22 18:09:19.895 (Dyson) 74 73 30 79 52 45 2b 56 74 51 31 74 34 31 42 59 63 4b 44 7a ts0yRE+VtQ1t41BYcKDz
2020-10-22 18:09:19.895 (Dyson) 33 77 59 59 54 30 74 39 43 7a 6c 55 45 50 73 58 79 6b 76 79 3wYYT0t9CzlUEPsXykvy
2020-10-22 18:09:19.895 (Dyson) 47 78 49 41 74 47 36 38 41 6d 71 55 39 36 41 36 79 43 4a 4c GxIAtG68AmqU96A6yCJL
2020-10-22 18:09:19.895 (Dyson) 4c 36 6c 35 69 70 39 7a 56 50 4e 58 75 6b 48 67 73 2f 41 3d L6l5ip9zVPNXukHgs/A=
2020-10-22 18:09:19.895 (Dyson) 3d .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. =
2020-10-22 18:09:19.333 Status: (Dyson) Entering work loop.
2020-10-22 18:09:19.334 Status: (Dyson) Initialized version 2.3.6, author 'Jan-Jaap Kostelijk'
2020-10-22 18:09:20.260 (Dyson) Queued asynchronous read aborted (192.168.1.14:1883), [2] End of file.
2020-10-22 18:09:20.296 (Dyson) Received 4 bytes of data
2020-10-22 18:09:20.296 (Dyson) 20 02 00 05 .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. ....
2020-10-22 18:09:20.296 (Dyson) Disconnect event received for '192.168.1.14:1883'.
2020-10-22 18:09:20.296 (Dyson) MqttClient::onMessage Topic '', Data[Verb]: 'CONNACK'
2020-10-22 18:09:20.296 (Dyson) onMQTTConnected called
2020-10-22 18:09:20.296 (Dyson) MQTT connection established
2020-10-22 18:09:20.296 (Dyson) MqttClient::Subscribe
2020-10-22 18:09:20.297 (Dyson) MqttClient::Publish 455/PT4-EU-KKA0925A/command ({"msg": "REQUEST-CURRENT-STATE", "time": "2020-10-22T16:09:20Z"})
2020-10-22 18:09:20.297 (Dyson) MqttClient::onDisonnect Disconnected from: 192.168.1.14:1883
2020-10-22 18:09:20.297 (Dyson) MqttClient::Close
2020-10-22 18:09:20.297 (Dyson) onMQTTDisconnected
2020-10-22 18:09:20.297 (Dyson) Deallocating connection object '192.168.1.14' (192.168.1.14:1883).
2020-10-22 18:09:20.297 Error: (Dyson) No transport, write directive to '192.168.1.14' ignored.
2020-10-22 18:09:20.297 Error: (Dyson) No transport, write directive to '192.168.1.14' ignored.
2020-10-22 18:09:29.366 (Dyson) Polling unit in 5 heartbeats.
2020-10-22 18:09:29.366 (Dyson) MqttClient::onHeartbeat
2020-10-22 18:09:29.366 (Dyson) MqttClient::Reconnecting
2020-10-22 18:09:29.366 (Dyson) MqttClient::Open
2020-10-22 18:09:29.366 (Dyson) MqttClient::Open: setup Domoticz connection object with protocol: 'MQTT'
2020-10-22 18:09:29.366 (Dyson) MqttClient::Open: open connection
2020-10-22 18:09:29.366 (Dyson) Protocol set to: 'MQTT'.
2020-10-22 18:09:29.366 (Dyson) Transport set to: 'TCP/IP', 192.168.1.14:1883.
2020-10-22 18:09:29.366 (Dyson) Connect directive received, action initiated successfully.
2020-10-22 18:09:29.417 (Dyson) onConnect called: Connection 'Name: '192.168.1.14', Transport: 'TCP/IP', Protocol: 'MQTT', Address: '192.168.1.14', Port: '1883', Baud: -1, Bytes: 0, Connected: True, Last Seen: 2020-10-22 18:09:29, Parent: 'None'', Status: '0', Description: 'Success'
2020-10-22 18:09:29.417 (Dyson) MqttClient::onConnect
2020-10-22 18:09:29.417 (Dyson) MqttClient::MQTT connected successfully.
2020-10-22 18:09:29.417 (Dyson) MqttClient::Connect
2020-10-22 18:09:29.417 (Dyson) MqttClient::MQTT CONNECT ID: 'Domoticz_1603382959'
2020-10-22 18:09:29.417 (Dyson) Sending 141 bytes of data
2020-10-22 18:09:29.417 (Dyson) 10 8a 01 00 04 4d 51 54 54 04 c2 00 3c 00 13 44 6f 6d 6f 74 .ʮ..MQTT.®<..Domot
2020-10-22 18:09:29.417 (Dyson) 69 63 7a 5f 31 36 30 33 33 38 32 39 35 39 00 0f 50 54 34 2d icz_1603382959..PT4-
2020-10-22 18:09:29.417 (Dyson) 45 55 2d 4b 4b 41 30 39 32 35 41 00 58 75 33 59 72 34 43 46 EU-KKA0925A.Xu3Yr4CF
2020-10-22 18:09:29.417 (Dyson) 74 73 30 79 52 45 2b 56 74 51 31 74 34 31 42 59 63 4b 44 7a ts0yRE+VtQ1t41BYcKDz
2020-10-22 18:09:29.417 (Dyson) 33 77 59 59 54 30 74 39 43 7a 6c 55 45 50 73 58 79 6b 76 79 3wYYT0t9CzlUEPsXykvy
2020-10-22 18:09:29.417 (Dyson) 47 78 49 41 74 47 36 38 41 6d 71 55 39 36 41 36 79 43 4a 4c GxIAtG68AmqU96A6yCJL
2020-10-22 18:09:29.417 (Dyson) 4c 36 6c 35 69 70 39 7a 56 50 4e 58 75 6b 48 67 73 2f 41 3d L6l5ip9zVPNXukHgs/A=
2020-10-22 18:09:29.418 (Dyson) 3d .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. =
2020-10-22 18:09:29.421 (Dyson) Queued asynchronous read aborted (192.168.1.14:1883), [2] End of file.
2020-10-22 18:09:29.468 (Dyson) Received 4 bytes of data
2020-10-22 18:09:29.468 (Dyson) 20 02 00 05 .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. ....
2020-10-22 18:09:29.468 (Dyson) Disconnect event received for '192.168.1.14:1883'.
2020-10-22 18:09:29.468 (Dyson) MqttClient::onMessage Topic '', Data[Verb]: 'CONNACK'
2020-10-22 18:09:29.468 (Dyson) onMQTTConnected called
2020-10-22 18:09:29.468 (Dyson) MQTT connection established
2020-10-22 18:09:29.468 (Dyson) MqttClient::Subscribe
2020-10-22 18:09:29.469 (Dyson) MqttClient::Publish 455/PT4-EU-KKA0925A/command ({"msg": "REQUEST-CURRENT-STATE", "time": "2020-10-22T16:09:29Z"})
2020-10-22 18:09:29.469 (Dyson) MqttClient::onDisonnect Disconnected from: 192.168.1.14:1883
2020-10-22 18:09:29.469 (Dyson) MqttClient::Close
2020-10-22 18:09:29.469 (Dyson) onMQTTDisconnected
2020-10-22 18:09:29.469 (Dyson) Deallocating connection object '192.168.1.14' (192.168.1.14:1883).
2020-10-22 18:09:29.469 Error: (Dyson) No transport, write directive to '192.168.1.14' ignored.
2020-10-22 18:09:29.469 Error: (Dyson) No transport, write directive to '192.168.1.14' ignored.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest