Unofficial Dyson Air Treatment drivers
I took a cut at creating a HE driver for my Dyson Pure Hot/Cool Link and went on to take some guesses at how to possibly support additional models. The result is 3 Dyson Air Treatment Drivers; however, I have only tested one of the drivers and with only a single device. Code supporting other devices were based on my interpretation of code, postings, and discussion from others. So...It may not work. There may be problems.
These drivers are local network only. As currently implemented, they will not go online to Dyson to look up the connection information. You will need to enter it yourself.
That said, hopefully even with problems it may be helpful. Feel free to create a PR and contribute to making it better.
The drivers are as follows:
Unofficial Dyson Pure Hot Cool Link driver: dyson-pure-hotcool-link-driver.groovy
This driver is intended to work with Dyson Pure Cool Link/Dyson Pure Cool Link Desk/Dyson Pure Hot Cool Link. However, I have only tested it with the latter, an HP02 (455) unit.
Devices this driver tries to support (the number corresponds to the last part of the number at the end of the Device's WiFi SSID sticker):
- PURE COOL LINK "475"
- PURE COOL LINK DESK "469"
- PURE HOT COOL LINK "455" or "455A"
Unofficial Dyson Pure Hot Cool driver: dyson-pure-hotcool-driver.groovy
This driver is intended to work with Dyson Pure Cool/Dyson Pure Cool Desk/Dyson Pure Cool Formaldehyde/Dyson Pure Hot Cool. I do not own or have access to any of these units. I do not know if this code will work.
Devices this driver tries to support (the number corresponds to the last part of the number at the end of the Device's WiFi SSID sticker):
- PURE COOL "438"
- PURE COOL FORMALDEHYDE "438E"
- PURE COOL DESK "520"
- PURE HOT COOL "527" or "527E"
Unofficial Dyson Pure Humidify Cool driver: dyson-pure-humidify-driver.groovy
This driver is intended to work with Dyson Pure Humidify Cool. I do not own or have access to this type of unit. I do not know if this code will work.
Devices this driver tries to support (the number corresponds to the last part of the number at the end of the Device's WiFi SSID sticker):
- PURE HUMIDIFY COOL "358"
Instructions:
- Login to your Hubitat and go to Advanced -> Drivers Code
- Choose new driver to add this driver
- Go to Devices -> Add Virtual Device - give it a name and select this driver
- Save and configure the device. You will need to enter the Unit's WiFi SSID (not your home network), WiFi Password (not your home network), and IP address.
- Where do I find the unit's WiFi SSID? On the sticker, either on the outside of the unit or perhaps on the body of the unit under the filter or maybe with the documentation. (this is not your home's SSID)
- Where do I find the unit's WiFi Password? On the sticker, either on the outside of the unit or perhaps on the body of the unit under the filter or maybe with the documentation. (this is not your home's Wifi WPA password) (If you don't have a sticker see this post)
- Where do I find the unit's IP address? (look it up on your home's wifi router)
- My model looks like HP02 or something else, not a 3 digit number...? See the last 3 (or 4) digits of the WiFi SSID sticker. On the image below its the "455".
- What does the sticker looks like?
(If you don't have a sticker see this post)
To use this with Rule Machine, it will present itself as a Fan and Thermostat; however, there is more functionality available through driver specific commands. These are accessible in Rule Machine via Run Custom Action -> Actuator. Then any custom command can be selected. If the selected custom command takes a parameter on the drivers page, the same parameter value can be specified here. Note: specify "string" - all custom commands for this driver assume the data entered are strings.
A note regarding "polling" - Polling should not be necessary for normal operation. Even if disconnected, if you send a command, the driver will reconnect and maintain a persistent MQTT connection and subscribe/receive data events. However, if you are capturing data points, graphing, etc. and reboot or otherwise lose the MQTT connection, polling is an option to cause an automatic reconnect.
Thank You to:
@g.shepperd for helping to test
Home Assistant had a head start.
@AlmostSerious Marcus Peters
https://community.home-assistant.io/t/dyson-pure-cool-link-local-mqtt-control/217263
@shenex Xiaonan Shen
https://github.com/shenxn/libdyson
for ideas and know how