libdyson-wg / ha-dyson

Home Assistant custom integration for Wi-Fi connected Dyson devices
MIT License
208 stars 23 forks source link

Add and test support for new Dyson devices (Device owners' help is appreciated!) #24

Open dotvezz opened 1 year ago

dotvezz commented 1 year ago

Yesterday, Dyson announced the following products:

Based on previous product releases and MQTT/Wifi messaging patterns, adding support for these devices should be trivial. However, testing the new devices with this integration will require the assistance of device owners.

If any owners of the new devices would be willing to share messages/logs that would be awesome.

Paul-McNeice commented 11 months ago

The main difference you'll find with the visnav robot is that instead of setting a vacuum power mode, you'll configure a "cleaning strategy". For example, the "auto" cleaning strategy will clean an area twice if it's particularly dusty and the "quick" strategy will skip edge cleaning etc.

There's just a different property in the command and state messages to configure that.

Otherwise the app functionality is pretty much identical to the heurist. Oh, except the clean history returns an additional dust map to be rendered over the clean map.

cemarriott commented 11 months ago

I just received a Purifier Big+Quiet Formaldehyde if you need someone to test that out.

dotvezz commented 11 months ago

Hey @cemarriott, that's awesome! Sorry for the slow reply here. If you'd be willing to help collect some information, I can hopefully add support for your Big+Quiet Formaldehyde (and maybe even the Big+Quiet base model) pretty quickly.

Right now, this process uses two tools to learn about the new devices. I want to consolidate the features into a single tool at some point, but that's a future goal.

The process goes like this:

  1. Run get_devices.py to get device information.
    • You'll need to clone that repo, install Python, the pip package manager, and run pip install requirements.txt to download required dependencies for the script.
      1. Save the following information from that script:
        • Device Type (I'll need to add this to const.py.)
        • Serial and Credential (I don't need these, don't share them. You'll need them for the next step though)
      2. Run dyson-mqtt-listen to get mqtt messages from the device. This is how we'll double-check that all the status/sensor messages are using the same format as previous devices.
    • You can download the executable binary for your platform of choice on the release page.
    • When running it, you'll need to use the flags for devices without wifi stickers.
    • Feel free to copy-paste the output here with your serial number redacted for privacy. I only need the json message bodies.

Sorry if this all feels like a big convoluted process without much explanation. I need to work on simplifying it - for now, if you have any issues, please let me know and I'll be happy to help.

cemarriott commented 11 months ago

Very cool @dotvezz, love that you have tools for it. The device type is 664. I saved the MQTT messages to a gist.

I popped the app open and changed the fan level and also the angle/tilt and included those messages too. The CO2 sensor is apparently new, and I'm not sure I have heard of any other device having the "tilt" adjustment. I bumped that tilt down to the "breeze" mode that oscillates as one of the messages too.

Let me know if you need anything else!

dotvezz commented 11 months ago

You're my hero. That's all super helpful. Once I finish up my day job tomorrow, I'll start work on a new branch that integrates all this and we'll get a beta release out the door for you and others with the same device.

dotvezz commented 10 months ago

@cemarriott just wanted to follow up, I'm finally getting around to this (Life got in the way, bad excuse but it's what I got) and I have to say thanks, this was a huge help. Together with your MQTT message dump and decompiling the latest Android APK, I was able to find everything needed for the full Big+Quiet lineup. I'll have a release for you soon!

dotvezz commented 10 months ago

v1.1.0 just released with initial support for all Big+Quiet devices!

There may be some missing features, particularly any that are unique to the Big+Quiet series. Feel free to let me know if anything's missing, then we can work out a plan to decode the MQTT messages with a bit more detail as needed.

Jink0 commented 1 month ago

Hi, I've added a Big+Quiet Formaldehyde and only some of the entities show up. It's missing fan speed, fan tilt, auto mode, and timer if that's supported. I was wondering if I maybe have a slightly different version, or if there has been some software change. It's bought in the UK and it's running the latest software version (0664PF.00.08.005.0002).

I'm happy to test things if needed.

dotvezz commented 1 month ago

@Jink0 hey, thanks for reaching out.

Jink0 commented 1 month ago

Hey thanks for asnwering, I found the speed and mode controls, my mistake there. In the fan controls within home assistant there are Direction and Oscillating fields which don't seem to do anything, as this purifier doesn't have that funcitonality.

For tilt, it can either be full, 0, 25, or 50 degrees. Thanks for the help!

dotvezz commented 1 month ago

@Jink0 Oh good shout on the direction and oscillation fields! I'd just assumed it would have them and they'd be controllable since it's otherwise so similar to the other fans.

Next release will try to add tilt, and will remove Direction and Oscillation. Thanks!