Integration - Dyson

Hello everyone,

Following @mutmut’s request in my progress report on integrations, here is a new external integration: Dyson :cyclone:

Repository: GitHub - prohand/gladys-dyson: Gladys external integration to connect dyson devices in Gladys · GitHub

Supported Devices

  • Pure Cool / Purifier Cool (including Formaldehyde models)
  • Pure Hot+Cool / Purifier Hot+Cool
  • Pure Humidify+Cool / Purifier Humidify+Cool
  • Purifier Big+Quiet
  • Older « Link » models (Pure Cool Link, Pure Hot+Cool Link)

What It Does

  • Commands: on/off, speed 1 to 10, auto mode, oscillation, night mode, heating + setpoint, humidification
  • Sensors: temperature, humidity, PM2.5, PM10, VOC and NO2 indices, formaldehyde (K models), filter wear
  • The displayed state is the one confirmed by the device. Changes made via the remote or the Dyson app are also reported.

Scenes (Gladys 5.1+)

Triggers

  • Air quality changed: good / average / poor / very poor. The worst of PM2.5, PM10, VOC, and NO2 counts, with the Dyson app thresholds.
  • Filter soon to be changed: a filter goes below 10%
  • Connection changed: the device switches to local, cloud, or becomes unreachable

One event per change, and a Gladys restart does not re-trigger your scenes.

Actions

  • Apply Dyson settings: on, mode, speed, oscillation, and night mode in one command. Useful for a « night mode » or an « away mode ».
  • Set timer: the device turns off automatically after X minutes

Example: « if air quality becomes poor → auto mode + notification ».

Dashboard Widget

The Dyson Air Quality widget displays for a device:

  • PM2.5, VOC, temperature, and humidity in real-time
  • the state: air quality, connection, mode, filters, timer
  • buttons: turn on/off, auto mode, refresh

Local and Cloud

  • Local: direct MQTT on the device, fast, no Internet. Just provide its IP in the config.
  • Dyson Cloud: used if the IP is unknown, or as a backup.
  • Switch « Prefer local connection ».
  • A badge per device indicates the path used. An orange dot signals the backup path.

Getting Started

  1. Install the integration from the Gladys store
  2. Enter the email, password, and country of your MyDyson account, then save
  3. Click on « Receive a code », then paste the code received by email in « Validate the code »
  4. Add your devices from the Discovery tab
  5. For local, set number_of_series=IP in « Device Addresses » (a fixed IP in your box is recommended)

Full documentation: gladys-dyson/docs/fr.md at main · prohand/gladys-dyson · GitHub

Not Yet Managed

  • Dyson vacuum robots. If you have one, let me know the model.
  • Automatic discovery on the network: for now, the IP is entered manually.

Testers Welcome :folded_hands:

I don’t have a Dyson on hand, so your feedback counts a lot (@mutmut first :wink:). Please indicate:

  • your model (or the product code, e.g., 438K)
  • local or cloud, and if the commands, sensors, scenes, and the widget work
  • the logs in case of issues, without email, IP, or serial number

Thanks!

Thanks @prohand, I have work tomorrow :wink:

Here is my feedback :slight_smile:

  • The fan in the integration image, I’m not a fan, I find this Dyson fan almost ugly :frowning: It’s a purely personal opinion, I would have preferred to see a real Dyson or the real silhouette of a real Dyson

  • For now, I’m going through the cloud, I will test with the local IP later but I would have liked an autodiscovery (I know, I’m lazy :sweat_smile: but I’m thinking of those who cannot know the IP of the Dyson(s)

  • On mobile in the integration settings, there are some visual oddities that you don’t find on desktop:

  • My model

  • Here are some comparisons of this integration with the information and features I have from Matter (matterbridge-dyson plugin):


    Some feature icons are missing.

    For the Auto on/off mode, with Matter it’s a list menu. By default if you select Off it’s speed 0, Low → 1, Medium → 5, High → 10. And if you select via the slider, I’ve put the correspondences between speed and display of the menu state.

  • The air flow direction Forward/Backward is missing.

  • Widget


    NO2, PM10, manual speed commands are missing.
    Can we put colors on PM2.5, etc. in the widgets? I think a request is in progress but there are too many topics now to follow everything :sweat_smile:

What would be nice would be 2 widgets:

  • 1 for the commands
  • 1 for the air quality part with PM10/2.5, VOC, NO2 and AQI if you can get it from the Dyson.

I’m also putting some screenshots of the app:

Thanks @mutmut for this very complete feedback! Version 1.1.0 is out and includes many of your suggestions.

What’s new

  • List of modes like Matter: Off / Low / Medium / High / Auto. Low = speed 1, Medium = speed 5, High = speed 10. The list follows the speed slider, so both always show the same thing (1 to 3 = Low, 4 to 7 = Medium, 8 to 10 = High).
  • Airflow direction (front / back): added on the Pure Cool, Purifier Cool and Hot+Cool.
  • Icons: oscillation, night mode, mode and airflow now use Gladys’ « fan » types, each with its icon (like on Matter).
  • « Dyson Air Quality » widget: PM2.5, PM10, VOC, NO2, temperature and humidity. Each pollutant takes a color according to its level (green, blue, orange, red), with Dyson app thresholds.
  • New « Dyson Controls » widget: speed gauge, status (mode, oscillation, night, airflow, filters, timer) and power on/off, auto, speed - and speed + buttons.
  • New image: a Dyson tower silhouette instead of the old fan.

To do after the update

  • For an already added device: Discovery tab → Update on the device, to get the list of modes and airflow. History and scenes are kept.
  • The power and auto buttons have left the « Air Quality » widget: they are now in « Dyson Controls ». Just add this widget to the dashboard.

Not yet possible

  • AQI: Dyson does not provide an AQI index. The overall level displayed is the worst of the 4 pollutants (PM2.5, PM10, VOC, NO2).
  • Automatic IP discovery: Dyson devices announce themselves in mDNS under the name _dyson_mqtt._tcp, but the Gladys store currently refuses a _ in the middle of a service name. I will ask for this to be fixed on the store side. In the meantime, the IP can be found in the list of connected devices on the box: the Dyson usually appears under its serial number.
  • Mobile display: the configuration page is drawn by Gladys, not by the integration. If you can open a topic with your screenshots, it will help fix this on the Gladys side.

Let me know how it works locally, and if the airflow works well on your model!

Version 1.1.0 installed by forcing the update, thanks @prohand.

I still have the old image, I’ll see when 1.1.0 is visible in the store.

No specific color but ok for all values.

Claude is struggling as there are almost no controls :frowning:




I would have seen this widget as a real remote control, not just a preview of what’s happening.

The value does change when I change it via the physical remote → OK

Nothing at all!
And Medium should be from 4 to 6 (if possible) because 7 is already strong!

No Update present, that probably explains why I still have empty features:


I entered the Dyson IP and saved the config, and as you can see in the screenshots, it remains in the cloud.

I also find that the command click feedback is a bit slow sometimes and you get the impression that you’ve done nothing if you don’t look at the colors that change:
image

And when I activate night mode, the widget doesn’t show it:
image


And I notice a problem between the speed gauge (the Dyson is indeed on 4 physically) and the mode… it’s done, the mode has gone from 5 to 4, but it’s not instant unfortunately.

Thanks @mutmut for these very precise tests: they helped find several real bugs. Version 1.2.0 is out.

Fixed

  • No « Update » button: This was an integration bug. It only sent its device list to Gladys when clicking on « Scan », so Gladys kept the list from 1.0.0. That’s why you had « empty » features, without a list of modes or new icons. The list is now sent at each startup: after the update, the button appears automatically in the Discovery tab.
  • Delayed widget (night mode not displayed, « Speed 5 » while the gauge is at 4): Gladys ignores a refresh request that arrives less than 10 s after the previous one, and the widget remained frozen for up to 2 min. The integration now keeps the request and sends it at the right time.
  • List of modes: Medium covers speeds 4 to 6, and Strong goes from 7 to 10.

« Dyson Commands » widget, closer to a remote control

  • After a click, the widget updates as soon as the Dyson has responded. No need to watch the colors anymore.

  • Gladys limits a widget to 4 buttons. A new widget setting, Buttons, therefore allows you to choose:

    • on, auto, speed - and speed + (by default);
    • on, oscillation, night mode, airflow.

    You can add the widget twice to have both.

  • The Mode line displays for example « Medium · speed 5 », like the list of modes.

  • To control everything from the same place (list of modes, speed slider…), put the device in a « Devices » box on the dashboard, once the device is updated.

Local connection

  • I think you typed the IP alone: the setting expected serial_number=IP, and a single IP was ignored without any message. Now, with a single Dyson in the account, the IP alone is enough. With multiple Dysons, the badge message and « Test the connection » give the serial number to type.
  • If the local connection fails (Dyson rebooting, Wi-Fi cut), the integration retries every 4 minutes and comes back on its own.

Colors of the « Air Quality » tiles

The integration sends the colors correctly, but with Gladys’ « glass » theme, a CSS rule overrides them on the tile icons: they remain blue. I proposed a fix to Gladys: fix(external-widget): keep tile icon colors in the glass theme by prohand · Pull Request #3188 · GladysAssistant/Gladys · GitHub. Meanwhile, the overall level keeps its color in the state.

Image in the store: it will change when the store has taken the new version.

After the update

  1. Discovery tab → Update on your Dyson.
  2. If you want the local: check that the IP is in Device Addresses, then click on Test the connection.

Let me know if it works locally this time!

thanks @prohand !

Local connection
image
I hadn’t understood the subtlety, but since I only have one, the IP is enough and it works very well.
image

Update
Done, but I still have three empty features that should be PM2.5, PM10, and humidity:


List of modes


Functional! :slight_smile:

Airflow
image
Functional! :slight_smile:

Night mode
image
It wasn’t necessary to change this because it’s ON/OFF, so a switch is much better.

Oscillation mode
image
It wasn’t necessary to change this because it’s ON/OFF, so a switch is much better.
Except if we manage OFF/45°/90°/180°/350° with a list :slight_smile:

I understand the limitation, but I find there’s too much redundant information if we put both.
I prefer to go through a device.



And I would put more important information in the tiles so that we don’t just have this tile with the recorded speed.

I just noticed that I had strange behavior and displays, let me explain.


The Dyson Matter values are exactly the same as those in the mobile app.
When I refresh several times in your widget, it updates in the widget AND in the app AND in Dyson Matter in real time.
The issue is that each time I have different values between the Matter integration (= app values) and the external Gladys integration.

Thanks @mutmut, another very useful feedback! Version 1.3.0 is out.

Fixed

  • The 3 empty features (PM2.5, PM10, humidity): they were declared with a type that Gladys does not know for these sensors. Hence the empty badge and no icon on the dashboard. This is fixed.
  • Different values from Matter: Well spotted! The Dyson sends two sets of values for particles. The integration was reading the old one (that’s why you had a PM2.5 higher than PM10, which is impossible). It now reads the one that the Dyson app displays, like the Matter plugin. Same for formaldehyde.
  • COV and NO2: displayed as whole numbers, like in the app (0 instead of 0.4).

Oscillation and Night Mode

  • These are switches again, you were right. Only downside: Gladys gives them the standard switch icon.
  • New Oscillation Angle list: 45° / 90° / 180° / 350°, like in the app. Choosing an angle starts oscillation around the current direction. To stop it, it’s the Oscillation switch (Gladys does not allow translating the choices in this list, so no « Stop » in it).
  • Available on Pure Cool, Purifier Cool and Hot+Cool towers.

« Dyson Controls » Widget

  • No more single tile with the saved speed. There are now 3 tiles:
    • the fan: « Off », « Auto », or the live speed gauge;
    • the air quality, in color;
    • the live PM2.5.
  • The Oscillation line gives the angle (« Enabled · 90° »).
  • With the « oscillation, night mode, airflow » buttons, the oscillation and night mode lines disappear from the state: the buttons already show them. Fewer duplicates if you put both widgets.
  • To control everything, the « Devices » box is still the best, I agree.

After the update

  1. Discovery tab → Update your Dyson (history and scenes kept).
  2. Check that PM2.5, PM10 and humidity have their icon, and compare the values with the app.

To test as a priority: the list of angles. I don’t have a Dyson, I’m basing this on what the app sends to a 438. Let me know if the chosen angle matches what the Dyson does and what the app displays.

Thanks!

Done and tested right away :stuck_out_tongue_winking_eye:

Icons
Nickel :white_check_mark:

Device
We have everything and everything is okay :white_check_mark:

Angles
It does exactly what it should do and the Dyson oscillates at the different angles :white_check_mark:

Air Quality Widget - Values
Everything is synced :white_check_mark:

Command Widgets
I think I’ll let this part settle a bit, I need to think about the need for each widget. As it stands, I’m not a big fan even though it’s much better than before, but PM25 and air quality don’t belong here as we’re on the commands.

Still some small changes though:

  • I’ll put the % of the filters in the air quality after local connection because after all, they are the ones filtering the air, and we have nothing left on the commands.
  • The name Selection in the features is not very explicit when choosing the feature, is it possible to have Oscillation Selection or Oscillation Angle?
  • same idea for Night Mode to change to Night Mode?
    → in fact, sometimes we have French, sometimes English in the features :frowning:

Question by the way: can we display an image in a tile?

Thank you for this very complete feedback :folded_hands:

The 1.4.0 version is available:

  • Dyson « Commands » Widget: It only keeps the commands. The fan tile remains (off / auto / speed gauge), the status (oscillation, night mode, airflow, connection, timer) and the 4 buttons. PM2.5 and air quality are removed.
  • Dyson « Air Quality » Widget: Filter wear is displayed right after the « Connection » line. It makes sense, they are the ones that clean the air :wink:
  • French names: Functions are called « Night Mode », « Oscillation Angle », « HEPA Filter Lifespan »… when the account country is French-speaking.
    :warning: Gladys keeps the names of an already added device, even after « Update ». For your device, you need to rename them in Integrations → Dyson → Devices.
  • « Selection »: This label comes from the core of Gladys. In a « Devices » box, a single function of its type takes the name of its type. To change it, give a name to the line in the box settings (for example « Oscillation Angle »).
  • Image in a tile: This is not possible, a tile only accepts an icon. There is a separate « image » block (16:9 frame), but it takes up space within the 8-element limit of the widget. Which image did you have in mind?

For the role of each command widget, I leave you to think about it. Tell me what you want to see there and I will adapt.


You can put it at the beginning of the post :ok_hand:

I’m still thinking about the command widgets.
By the way, do we know how to make a popup menu in an external integration like the one we have for lights?


Just show the photo of the controlled Dyson.

Thanks for the image, that’s the one from the integration cover. I’ll put it at the top of the first post :ok_hand:

The 1.5.0 is available:

  • Device drawing in the « Dyson Controls » widget: the widget displays your Dyson in a 16:9 frame. The drawing changes according to the model: tower (Pure Cool / Purifier Cool), Hot+Cool, desk fan, humidifier, or Big+Quiet. When the fan is running, air lines appear and the LED lights up. When it’s off or unreachable, it’s drawn as stationary.
    These are drawings, not photos: I can’t provide Dyson photos, and the Dyson account doesn’t share any.
    A new widget setting, « Show device drawing », allows you to hide it. It’s active by default.
  • Popup menu like for lights: this isn’t possible from an integration. This panel is coded in Gladys, and only for lights. To have one for fans, you’d need to request it from the Gladys core.
  • Small correction: the description of the « Dyson Controls » widget still mentioned air quality and PM2.5. This has been fixed.

Always open to your ideas for control widgets :wink:

cool I was reading the integration dev docs and I saw that:
image
so I thought it was possible :wink:


Activated at the top, deactivated at the bottom, it takes up quite a bit of space in 16:9 but it adds a bit of « life » to these widgets I find, and it’s more visible :slight_smile: .

Why not possible to use Dyson photos? Copyright or research of models and storage to be done?

A bit of both, but mainly copyright:

  • Rights: the product photos belong to Dyson. Putting them in the public repository and in the Docker image is redistributing them without authorization. The drawings, on the other hand, are made for integration, so no problem.
  • No official source: the Dyson account gives the model and serial number, but no image. You would have to manually search for the photos, for each model.
  • Colors: a single model comes in several colors (white/silver, black/nickel, blue/gold…), and the account doesn’t say which one you have. The photo might not match your device.

If you really want your photo, a possible solution: a setting for the “image address” widget. The integration downloads it and displays it instead of the drawing. Everyone would put the photo of their own device. Let me know if you’re interested.

For the space taken: the 16:9 frame takes up the full width of the card, Gladys enforces this. I can’t reduce it. Hence the setting to hide it, like on your second widget :wink:

I think that’s a good idea, that way no copyright issues and no tedious research for you (or Claude, even if nothing is tedious for him :wink: ).

Wait for my feedback on the command widgets before publishing a new release, it’s already great as it is!

Yes, it’s noted, thanks :wink:
I’m waiting for your reply to get back to Claude :smiling_face:

Hi, thanks so much for this integration! No more need to go through Matterbridge!

Just one question, is there a bug with the « speed + and - »?

I don’t see where it appears?

You need to turn on the Dyson and not be in auto to see the + and - :wink:

Thanks! No bug, it’s intentional: the « Speed - » and « Speed + » buttons only appear if the Dyson is on and in manual mode. When off, you have « Turn on » and « Auto mode »; in auto, « Turn off » and « Manual mode ». Turn it on, and you’ll see the 4 buttons. I’ll specify that in the documentation.

Super indeed :grinning_face:, the widgets are really cool and they look even better in dark mode!