Zum Hauptinhalt springen

Dyson Smart-Home-Integration, kostenlos und Open Source

Dyson-Integration für Gladys Assistant

Control Dyson purifiers, fans and heaters, and read their air quality sensors.

Info

Die Dokumentation dieser Integration wird von ihrem Autor geschrieben und ist bisher nur auf Englisch verfügbar.

This integration connects Gladys to your connected Dyson purifiers, fans and heaters (Pure Cool, Purifier Cool, Hot+Cool, Humidify+Cool, Big+Quiet and the older "Link" models). Turn them on and off, set the speed, oscillation, night mode and heating, and follow the air quality they measure.

What you need​

  • A MyDyson account (the Dyson mobile app), with your devices already added and connected to Wi-Fi.
  • The e-mail address and password of that account.
  • Access to the account's mailbox: Dyson e-mails a one-time code at every sign-in.

Local and cloud​

The integration can reach a device in two ways:

  • Local: straight over your network (MQTT, port 1883). Fast, and it works without Internet. Give the device address in the configuration (see Settings below).
  • Dyson cloud: through Dyson's servers, from anywhere. Needs Internet and a signed-in account.

The Dyson account is always needed once: it gives the list of devices and the local password of each one.

On the Configuration screen, the Prefer the local connection toggle (on by default) picks the path tried first. The other one is the fallback. Each device shows a badge with the path in use: local, cloud or unreachable. An orange dot on the badge means "it works, but through the fallback": hover it to see why.

Getting started​

  1. In Gladys, open Integrations → Dyson → Configuration.
  2. Fill in:
    • MyDyson e-mail: the e-mail of your account;
    • MyDyson password;
    • Account country: the two-letter code of the country chosen when the account was created (FR, BE, CH, GB, US...).
  3. Click Save.
  4. Click Receive a code. Dyson e-mails you a 6-digit code.
  5. In Validate the code, type that code and confirm. The message says how many devices were found.
  6. Open the Discover tab and add your devices.
  7. For the local connection, type the address of each device in Device addresses (see Settings), then save.

The session is kept: no new code is needed after a restart. If Dyson ends the session (a password change, for instance), the connection status asks for a new code.

What you get​

Depending on the model:

FeatureModels
On / offall
Mode list (off, low, medium, high...)all
Speed (1 to 10)all
Auto modeall
Oscillationall
Oscillation angle (45°, 90°, 180°...)Pure Cool, Purifier Cool, Hot+Cool towers
Night modeall
Airflow direction (front / back)Pure Cool, Purifier Cool, Hot+Cool
Heating + target (°C)Hot+Cool
HumidificationHumidify+Cool
Temperature, humidityall
PM2.5, PM10 (µg/m³)2018 and later models
VOC index, NO2 index2018 and later models (VOC only on Link)
Formaldehyde (mg/m³)"Formaldehyde" models (K suffix)
Filter life% (HEPA, carbon), hours on Link models

The feature names are in French when the account country is French-speaking (France, Belgium, Switzerland, Luxembourg, Monaco), in English otherwise. A device already added keeps its names: rename a feature in the device page (Integrations → Dyson → Devices). In a "Devices" box, Gladys names a feature that is the only one of its kind after its type ("Selection" for the oscillation angle): give the row a name of your own in the box settings.

The values are the ones the MyDyson app shows. The VOC and NO2 indexes are Dyson's: from 0 (clean air) to 10, as whole numbers like in the app.

Choosing a speed turns the device on and the auto mode off, like the remote does. In auto mode, no speed is shown.

The mode list works like the Matter fans: Off, Low (speed 1), Medium (speed 5), High (speed 10) and Auto. It follows the speed, so the list and the slider always agree: speeds 1 to 3 show Low, 4 to 6 Medium, 7 to 10 High. The airflow direction is a list too. Oscillation and night mode are on / off switches.

The oscillation angle list offers the widths of the Dyson app: 45°, 90°, 180° and 350°. Choosing one starts the oscillation, around the direction the device points to. To stop it, use the Oscillation switch. A width set otherwise (another app) shows no entry in the list.

Device added before this version? Open the Discover tab and click Update on the device to get the latest features (oscillation angle, switches, PM and humidity icons). Its history and scenes are kept. The button shows up as soon as the integration has restarted in its new version.

Gladys shows the state the device confirms: an order the device refused never shows as done. A change made with the remote or the Dyson app shows up in Gladys too.

Scenes​

Triggers​

In the scene editor, Integrations category:

  • Air quality changed: the level measured by a device changes. Levels: good, fair, poor, very poor. The worst of PM2.5, PM10, VOC and NO2 decides, with the bands of the Dyson app (PM2.5: 35 / 53 / 70 µg/m³; PM10: 50 / 75 / 100 µg/m³; VOC and NO2: 3 / 6 / 8). Variables: level, previous_level, pm25, pm10, voc, no2.
  • Filter to replace soon: a filter goes under 10 % (400 hours on the Link models). Variables: filter (hepa, carbon, combined), remaining.
  • Connection changed: a device switches to local, to the cloud, or becomes unreachable. Variables: transport, previous_transport, degraded.

Each trigger can be limited to one device. One event per change. At startup, the first value is the reference: a restart does not run your scenes again.

Actions​

  • Apply Dyson settings: power, mode (auto / manual), speed, oscillation and night mode, in one order. An empty field changes nothing. "Off" ignores the other settings.
  • Set the sleep timer: the device turns itself off after N minutes (1 to 540); 0 cancels the timer.

Both return sent (order sent or not) and transport (connection used). An unreachable device does not fail the scene: sent is then false.

Dashboard widgets​

Each widget shows one device, chosen in its settings.

Dyson air quality:

  • up to 6 live tiles: PM2.5, PM10, VOC, NO2, temperature, humidity (depending on the model). Each pollutant tile takes the colour of its level: green (good), blue (fair), orange (poor), red (very poor), with the thresholds of the scenes below;
  • the status: overall air quality (the worst pollutant), formaldehyde on the K models, connection, filter life (the filters are what cleans the air);
  • a button to refresh the readings.

Dyson gives no single AQI number: the overall level is computed from the four pollutants.

Dyson controls:

  • one tile: the fan (off, auto, or a live speed gauge). The air readings are in the air quality widget;
  • the status: oscillation (with its angle), night mode, airflow, heating, connection, sleep timer. With the oscillation buttons, the oscillation and night mode rows are left out: the buttons show them;
  • four buttons, chosen in the widget's Buttons setting:
    • On/off, auto, speed - and + (default): turn on / off, auto mode (or back to manual), speed - and speed +;
    • On/off, oscillation, night mode, airflow: a setting that is on is a filled button, a click switches it. On the models that blow one way, the auto mode takes the place of the airflow.

After a click, the widget updates as soon as the device answered. To get both button sets, add the widget twice.

Gladys allows four buttons per widget. To control everything in one place (mode list, speed slider, oscillation, night mode, airflow), also add the device to a "Devices" box of your dashboard.

Settings​

  • Device addresses (local): the address of each device on your network, as serial=IP, separated by commas. Example: NK6-EU-MHA0000A=192.168.1.20. With a single Dyson device in the account, the address alone is enough: 192.168.1.20. A device without an address here goes through the Dyson cloud (badge with an orange dot); the badge message and Test the connection give the serial to type. The serial number is on the device label and in the MyDyson app. Give the device a fixed address in your router so it does not change.

    To find the address, look at the list of connected devices of your router: the device usually shows up under its serial number. The integration cannot find it on its own yet: Gladys does not allow it to listen to the _dyson_mqtt._tcp announcements the devices send.

  • Sensor refresh (s): how often the air quality sensors are read, from 15 to 3600 seconds (60 by default). Power, speed and other changes arrive at once, without waiting.

Buttons​

  • Receive a code / Validate the code: sign in to the Dyson account.
  • Test the connection: reads the account's device list again and shows, for each device, the path in use (local, Dyson cloud, unreachable) and, on a fallback, why.
  • Sign out: deletes the token and the device list kept by the integration. The devices stay in Gladys.

Troubleshooting​

  • "Dyson refused the code or the password": check the saved password, then ask for a new code. A code is only valid for a few minutes.
  • No code received: look in the spam folder, and check the e-mail and the country of the account.
  • "cloud" badge with an orange dot: the device address is missing from Device addresses, or the local connection was refused (wrong address, device on another network Gladys cannot reach). A factory reset changes the device's local password: click Test the connection to read it again. When the local connection failed (device restarting, Wi-Fi down), the integration tries it again every 4 minutes and goes back to it on its own.
  • "unreachable" badge: the device is unplugged, off Wi-Fi, or neither the local network nor the cloud answers. The integration keeps retrying.
  • The "Air quality" widget tiles stay blue: with the Gladys "glass" theme, the colour of the tile icons is not applied (to be fixed in Gladys). The overall level keeps its colour in the status.
  • A sensor stays empty: some sensors need a few minutes after power-up. A model without that sensor never sends a value.

The integration logs (Supervision tab) give the details. They never contain your password or your token.

Privacy​

Your e-mail and password are only sent to Dyson (appapi.cp.dyson.com). The session token and the device list are kept in the integration's data volume, readable by the integration only.

Konfigurationseinstellungen​

Diese Einstellungen fragt Dyson in seinem Konfigurationsbildschirm in Gladys ab.

EinstellungTypPflichtfeldBeschreibung
Getting startedsectionNein1. Enter the e-mail, password and country of your MyDyson account, then save. 2. Click "Receive a code": Dyson e-mails you a code. 3. Type it in "Validate the code". 4. Add your devices from the Discover tab. To drive a device on your local network, give its address below; otherwise it goes through the Dyson cloud.
MyDyson e-mailstringJa
MyDyson passwordsecretJaOnly sent to Dyson, with the e-mailed code, to sign in.
Account countrystringJaTwo-letter code of the country of the MyDyson account (FR, BE, CH, GB, US...).
Device addresses (local)stringNeinFor the local connection: serial=IP of each device, separated by commas (the IP alone with a single device). Without it: Dyson cloud.
Sensor refresh (s)numberNeinHow often the air quality sensors are read, in seconds.

So installierst du Dyson in Gladys​

  1. Öffne in Gladys Integrationen: Dyson erscheint im Katalog neben den nativen Integrationen, mit einem Community-Badge.
  2. Klicke auf Installieren. Gladys lädt das Docker-Image (ghcr.io/prohand/gladys-dyson:1.4.0) herunter, startet es in einer vom Kern isolierten Sandbox und erzeugt die Oberfläche der Integration (Geräte, Erkennung und Konfiguration).
  3. Öffne den Bildschirm Konfiguration der Integration, fülle die Einstellungen aus und speichere.
  4. Du kannst sie auch direkt über die URL ihres Repositorys installieren: https://github.com/prohand/gladys-dyson.

Dyson benötigt Gladys >=5.1.0. Der Katalog in Gladys wird stündlich aktualisiert, eine neue Version ist also spätestens eine Stunde nach ihrer Veröffentlichung verfügbar.

Du nutzt Gladys noch nicht? Es ist kostenlos und Open Source: folge der Installationsanleitung, um loszulegen.

Über externe Integrationen​

Dyson ist eine externe Integration: eine Community-Integration, die als Docker-Container verpackt und auf GitHub veröffentlicht wird. Gladys installiert sie mit einem Klick und führt sie in einer vom Kern isolierten Sandbox aus. Sie wird von prohand veröffentlicht und gepflegt, nicht vom Gladys-Kernteam.

Abonniere den Newsletter von Gladys Assistant

Ein paar E-Mails im Monat zu neuen Releases und Neuigkeiten aus dem Projekt. Verschickt von Pierre-Gilles Leymarie, dem Gründer des Projekts. Jederzeit abbestellbar 🙂