Grizzelbee / ioBroker.dysonairpurifier

ioBroker Adapter to control to your dyson fan and air purifier devices such as Pure Cool, Hot & Cool and others.
MIT License
13 stars 7 forks source link
air dyson fan iobroker-adapter purifier

ioBroker.dysonAirPurifier

LogoLogo

Number of Installations (latest) NPM version Number of Installations (stable) Known Vulnerabilities Test and Release CodeQL NPM

License Downloads

ioBroker Adapter for Dyson Air Purifiers and fans

This adapter connects ioBroker to various Dyson Air Purifiers. Fan-Icon in Logo created by Freepik from www.flaticon.com.

If you like this adapter and consider supporting me
> Donate with payPal

supported devices

Features

Connects your Dyson fans, fan heaters, air purifiers, and air humidifiers to ioBroker.

How it works

On startup the dyson cloud gets queried for all known devices bound to your account and their MQTT passwords. With that list in hands the adapter connects to all devices locally and interacts with them.

Installation

Prerequisites

Adapter installation

Using npm

Run npm install iobroker.dysonairpurifier on your ioBroker installation to grab the latest version of this adapter from the npm repository.

Alternative: Using GitHub URL

Install through the ioBroker Admin UI by pointing it to the latest stable release on GitHub: https://github.com/Grizzelbee/ioBroker.dysonairpurifier/tarball/master/

You can also install older release versions using these methods (by pointing to a version tag, e.g., v0.6.0 instead of masterin the URL), but the most recent one is generally preferred.

Config-data needed

The dyson username and password are general config data which need to be entered in the config page of the adapter. In difference the IP is entered into the field Hostname in the device tree on the devices tab page.

How to config the adapter

On the first regular start of this adapter the Dyson API is queried for all your devices and all supported devices will be created in the device tree -- with their basic information provided by the API and an additional field Hostaddress.

So please run the adapter once, and your Dyson devices will be created in the device tree with their basic settings.

Then stop the adapter, enter the IP(s) into the Hostaddress field(s) in the device tree and restart the adapter. After that your Dyson devices in the device tree should be populated with data.

Please note: Due to a non conform mDNS implementation by Dyson you'll need to provide the local IP of the device after the first run.

Additional Note: Since Version 0.7.1 the adapter tries to connect to the device by its hostname (serial number) as long as no host address/IP is given. This will work under two prerequisites:

  1. There is a DNS Server running in your LAN. Either in your router (e.g. FritzBoxes have a DNS running) or a dedicated one.
  2. You haven't changed the default device name.
  3. The device name is properly mapped to its IP (in case you manage your DNS manually).

2-factor Authentication (since V0.9.0)

After installation of the adapter it should be started automatically - if not please start it first. After an update it will also restart automatically. In both cases it will remain in "yellow" state and probably show some errors in the log - that's fine for now.

All the values will be saved and shown furthermore.

Usually you don't need to do this 2 FA on a scheduled basis - but you may repeat it when needed.

If you are facing the 401 issue during 2-FA. Please try this workaround:

  1. Log out of your dyson smartphone app
  2. Wait a few minutes
  3. Enter your login data to the adapter (if not already done) and follow the 2FA procedure to the end.
  4. Adapter should start and turn green.
  5. wait a while (up to an hour or maybe more since dyson has a blocker for too many requests in a short time frame)
  6. Login back into your dyson smartphone app if you like to use it.

Controlling your device(s)

This adapter is currently able to control the following states of your devices:

Possible values for these states are documented below, as far as known. Fan speed only allows values from 1 to 10 and Auto. If you like to set your fan speed down to 0 you'll need to power off the main power. Which is what the dyson app does also.

SystemStates folder (since 2.4.0)

The devices are capable of reporting failures. This feature has been added in adapter version 2.4.0. For now there are only rough information on the failures, and the data points vary from device to device. If you have better information on a failure don't hesitate to report it to me to improve the adapter. All states report whether there is a failure or not. True means a failure, false means "No failure".

Poll Intervall

Known issues

Changelog

WORK IN PROGRESS

3.2.3 (2024-06-21) (Marching on)

3.2.2 (2024-06-18) (Marching on)

3.2.1 (2024-06-04) (Marching on)

3.2.0 (2024-05-28) (Marching on)

3.1.10 (2024-05-14) (Marching on)

3.1.9 (2024-05-13) (Marching on)

3.1.8 (2024-05-10) (Marching on)

3.1.7 (2024-04-24) (Marching on)

3.1.6 (2024-04-24) (Marching on)

3.1.5 (2024-04-16) (Marching on)

3.1.4 (2024-03-22) (Marching on)

3.1.3 (2024-02-28) (Marching on)

3.1.2 (2024-02-26) (Marching on)

3.1.1 (2024-02-01) (Marching on)

3.0.0 (2024-01-11) (Marching on)

2.5.9 (2023-08-21) (Halo of the dark)

2.5.8 (2023-08-09) (Halo of the dark)

2.5.7 (2022-12-06) (Halo of the dark)

2.5.6 (2022-11-28) (Halo of the dark)

2.5.4 (2022-11-27) (Halo of the dark)

2.5.3 (2022-11-26) (Halo of the dark)

2.5.2 (2022-11-17) (Halo of the dark)

2.5.1 (2022-03-23) (Halo of the dark)

2.5.0 (2022-03-22) (Halo of the dark)

2.4.1 (2022-03-20) (Echo from the past)

2.4.0 (2022-03-17) (Echo from the past)

2.3.2 (2022-03-04) (Fairytale of doom)

2.3.1 (2022-01-14) (Fairytale of doom)

2.3.0 (2021-12-02) (Fairytale of doom)

2.2.0 (2021-11-07) (Welcome to my wasteland)

2.1.4 (2021-10-20) (Running to the edge)

2.1.3 (2021-10-17) (Running to the edge)

2.1.2 (2021-10-07) (Running to the edge)

2.1.1 (2021-10-05) (Running to the edge)

2.0.1 (2021-10-04) (Lost in forever)

2.0.0 (2021-09-26) (Lost in forever)

V1.1.0 (2021-09-15) (Coming home)

V1.0.0 (2021-08-26) (Dim the spotlight)

V0.9.5 (2021-08-23) (Marching on)

V0.9.4 (2021-08-20) ()

V0.9.3 (2021-08-19) (Paralyzed)

V0.9.2 (2021-08-15) (Pearl in a world of dirt)

V0.9.1 (2021-05-17) (Still breathing)

V0.9.0 (2021-05-15) (Still breathing)

V0.8.2 (2021-04-09) (Still breathing)

V0.8.1 (2021-02-19) (Fall into the flames)

V0.8.0 (2021-02-18) (Beyond the mirror)

V0.7.5 (2021-02-12) (I won't surrender)

V0.7.4 (2021-02-10) (Human)

V0.7.3 (2021-02-10) (When angels fall)

V0.7.2 (2021-02-10) (Songs of love and death)

V0.7.1 (2021-02-06) (Horizons)

V0.7.0 (2021-01-08) (Afraid of the dark)

V0.6.0 (2020-10-29) (Rage before the storm)

V0.5.1 (2020-10-27) (Heart of the hurricane)

V0.5.0 (2020-10-27) (Heart of the hurricane)

V0.4.1 (2020-10-16) (unbroken)

V0.4.0 (2020-09-29)

V0.3.0 (2020-09-27) - first version worth giving it a try

V0.2.0 (2020-09-22) - not working! Do not install/use

V0.1.0 (2020-09-04) - not working! Do not install/use

Explanation of Dyson API data (message payload)

Information copied and extended from https://github.com/shadowwa/Dyson-MQTT2RRD/blob/master/README.md

CURRENT-STATE

name meaning possible values Unit
mode-reason Current Mode has been set by RemoteControl, App, Scheduler PRC, LAPP, LSCH, PUI
state-reason MODE
rssi WIFI Strength -100 - 0 dBm
channel WIFI Channel 52
fqhp 96704
fghp 70480

product-state

name meaning possible values Unit
ercd Last Error Code NONE , or some hexa values
filf remaining Filter life 0000 - 4300 hours
fmod Mode FAN , AUTO, OFF
fpwr Main Power ON, OFF
fnst Fan Status ON , OFF, FAN
fnsp Fan speed 0001 - 0010, AUTO
fdir Fandirection aka. Jet focus/ ON=Front, OFF=Back ON, OFF
ffoc JetFocus ON, OFF
nmod Night mode ON , OFF
oson Oscillation ON , OFF
osal OscillationAngle Lower Boundary 0005 - 355 ° (degrees)
osau OscillationAngle Upper Boundary 0005 - 355 ° (degrees)
oscs OscillationActive ON, OFF, IDLE
ancp OscillationAngle CUST, 0180 ° (degrees)
qtar Air Quality target 0001=Good, 0002=Normal, 0003=Bad, 0004=Very bad
rhtm Continuous Monitoring ON, OFF
auto AutomaticMode ON, OFF
nmdv NightMode Max Fanspeed? 0004
cflr Status Carbonfilter 0000 - 0100 Percent
cflt Carbonfilter CARF, NONE
hflr Status HEPA-Filter 0000 - 0100 Percent
hflt HEPA-Filter GHEP, GCOM
sltm Sleeptimer ON, OFF
hmod Heater Mode [ON/OFF] HEAT
hmax Target temperature for heating 0 .. 5000 K
hume HumidificationMode ON, OFF,
haut Humidify Auto Mode HUMIDIFY_AUTO_MODE_ON, HUMIDIFY_AUTO_MODE_OFF
humt Humidification Target HUMIDIFICATION_MODE_OFF, HUMIDIFICATION_MODE_THIRTY, HUMIDIFICATION_MODE_FORTY, HUMIDIFICATION_MODE_FIFTY, HUMIDIFICATION_MODE_SIXTY, HUMIDIFICATION_MODE_SEVENTY
cdrr CleanDurationRemaining integer minutes
rect AutoHumidificationTarget integer %
cltr TimeRemainingToNextClean integer hours
wath WaterHardness SOFT="2025", MEDIUM="1350", HARD="0675"
wacd WarningCode NONE...
rstf reset filter lifecycle 'RSTF', 'STET', RESET_FILTER_LIFE_IGNORE, RESET_FILTER_LIFE_ACTION
corf Temperature format ON=Celsius, OFF=Fahrenheit
clcr DeepcleanCycle CLNO=inactive, CLAC=Deep clean in progress, CLCM=Finished
hsta Heating state ACTIVE/IDLE
msta Humidification state Active/Idle OFF, HUMD
psta [HP0x] Unknown INIT, CLNG, INV, OFF
bril unknown 0002 LEVEL_LOW, LEVEL_MEDIUM, LEVEL_HIGH
fqhp unknown
tilt [HP0x] Unknown string
dial [DP0x] Unknown
Error-Codes Meaning
NONE There is no error active
57C2 unknown
11E1 Oscillation has been disabled. Please press Button "Oscillation" on your remote to continue.

scheduler

name meaning possible values Unit
dstv daylightSavingTime 0001...
srsc ? 7c68...
tzid timezone? 0001...

ENVIRONMENTAL-CURRENT-SENSOR-DATA

data

name meaning possible values Unit
hact Humidity (%) 0000 - 0100 Percent
pact Dust 0000 - 0009
sltm Sleep timer OFF... 9999 Minutes
tact Temperature in Kelvin 0000 - 5000 K
vact volatile organic compounds 0001 - 0009
hcho Formaldehyde (not used)
hchr Formaldehyde
pm25 PM2.5 (not used) 0018
pm10 PM10 (not used) 0011
va10 volatile organic compounds 0004
noxl NO2 0000 - 0014
p25r PM2.5 particulate matter 0019 µg/m³
p10r PM10 particulate matter 0018 µg/m³

ENVIRONMENTAL-AND-USAGE-DATA

Redundant values?

data

name meaning possible values Unit
pal0 - pal9 number of second spend in this level of dust since the beginning of hour 0000 - 3600
palm seems to be a median value of palX
vol0 - vol9 number of second spend in this level of voc since the beginning of hour 0000 - 3600
volm seems to be a median value of volX
aql0 - aql9 number of second spend in this level of air quality max (pal, vol)) since the beginning of hour 0000 - 3600
aqlm seems to be a median value of aqlX
fafs seems to be a number of seconds spend in a specific time 0000 - 3600
faos seems to be a number of seconds spend in a specific time 0000 - 3600
fofs seems to be a number of seconds spend in a specific time 0000 - 3600
fons seems to be a number of seconds spend in a specific time 0000 - 3600
humm humidity ? (%) 0000 - 0100
tmpm temperature in kelvin ? 0000 - 5000

sentry.io

This adapter uses sentry.io to collect details on crashes and report it automated to the author. The ioBroker.sentry plugin is used for it. Please refer to the plugin homepage for detailed information on what the plugin does, which information is collected and how to disable it, if you don't like to support the author with your information on crashes.

Legal Notices

Dyson, pure cool, pure hot & cool, and others are trademarks or registered trademarks of Dyson Ltd. All other trademarks are the property of their respective owners.

License

MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Copyright (c) 2020 .. 2024 Hanjo Hingsen open-source@hingsen.de