Skip to content

Dyson MQTT Protocol

Parker Hawke edited this page Sep 10, 2022 · 2 revisions

All Dyson fans make use of a local messaging protocol titled MQTT, the internet standard for IoT communication across devices. Dyson's protocol is relatively simple and its MQTT topics are extremely easy to parse as it is sent in JSON format. This wiki documents the findings of Dyson MQTT messaging available to clients. Note however that Dyson4J makes every attempt to abstract away this messaging protocol in an object-oriented-friendly manner rather than exposing raw JSON content. This wiki exists as a way to publicly document the findings of the protocol as the library was developed over time.

Message Topics

Topic Description
<product_code>/<username>/command Used to send commands to the Dyson fan. See /command below.
<product_code>/<username>/status/current Used to receive messages from the fan pertaining to current state and environmental sensor data. See /status/current below.

All message topics are prefixed with the Dyson fan's unique product code (Typically a 3-numbered sequence, possibly prefixed with an alphabetical character), and the plain-text username of the Dyson fan. Both the product code and username can be found on the fan's label at the front of the device as such:

Dyson Fan Label

All message JSON payloads will be formatted with at least the following JSON:

{
    "msg": "<message_id>",
    "time": "2022-09-10T02:45:00.000Z (ISO formatted date)"
}

Some messages may include (or require) additional key-value pairs, but ALL messages will include the msg id, and the time at which the message was dispatched.

/command

Used to send commands to the Dyson fan. There are two supported message ids accepted on this topic

Message Id Description
STATE-SET Changes the state of the fan's settings using an additional "data" object.
REQUEST-CURRENT-STATE Requests that the fan's MQTT server respond with two messages including the state of the fan, and the environmental sensor data

STATE-SET

Upon receiving this message, the Dyson fan will update the state of all settings included in the message's data object. An example message may look like this:

{
    "msg": "STATE-SET",
    "time": "2022-09-10T02:45:00.000Z",
    "data": {
        "fmod": "FAN",
        "fnsp": "0080",
        ... etc ... All fields are optional
    }
}

All known message fields and values are as follows:

Fan State Name Fan State ID Possible Values
Fan Mode fmod
Value Description
FAN The fan is enabled.
OFF The fan is disabled. Not running.
AUTO The fan will automatically enable and disable according to environment temperature.
Fan Speed fnsp
Value Description
0001 The fan power is set to 1.
0002 The fan power is set to 2.
... ...
0010 The fan power is set to 10.
AUTO The fan power will automatically adjust according to environment temperature.
Oscillation oson
Value Description
ON The fan will oscillate left and right.
OFF The fan will point in a single direction.
Sleep Timer sltm
Value Description
0 - 9999 A value from 0 to 9,999 calculated in minutes. The time until the fan will automatically disable.
OFF The fan has no sleep timer enabled.
Monitor Air Quality rhtm
Value Description
ON The fan will monitor air quality and particles.
OFF The fan will not monitor air quality.
Reset Filter State rsft
Value Description
RSTF Reset the filter's lifetime. Used when the filter has been replaced.
STET Do nothing. Yep. That's it. Nothing.
Air Quality Target qtar
Value Description
0001 Better air quality. Maintains extremely high air quality for those very sensitive to particles and pollutants.
0003 High. Maintains a higher air quality for those sensitive to particles and pollutants.
0004 Normal. Maintains "good" air quality for the average human.
Night Mode nmod
Value Description
ON Night mode enabled. The fan's light indicator will dim unless interacted with.
OFF Night mode disabled. The fan's light indicator remains on.
Heat Mode hmod
Value Description
HEAT The heater is enabled. Hot air is being blown.
OFF The heater is disabled. Cold air is being blown.
Focus Mode ffoc
Value Description
ON Focus mode is enabled. Air will be blown in a straight line, focused towards its facing direction.
OFF Focus mode is disabled. Air will be diffused in a wide radius in front of the fan.
Temperature Limit hmax
Value Description
2741 - 3101 The temperature limit for heater mode, measured in Kelvin * 10.
OFF No temperature limit.

REQUEST-CURRENT-STATE

Upon receiving this message, the Dyson fan will respond with two messages on the /status/current topic (see below) including the fan's current state, as well as the fan's environmental sensor data. This message requires no additional data. An example message looks like the following:

{
    "msg": "REQUEST-CURRENT-STATE",
    "time": "2022-09-10T02:45:00.000Z"
}

/status/current

Used to receive messages from the Dyson fan after a REQUEST-CURRENT-STATE message on the /command channel (see above). Either one of two messages can be received on this channel.

CURRENT-STATE

This message is sent by the MQTT server (the fan) when the REQUEST-CURRENT-STATE message has been sent on the /command channel.

{
    "msg": "CURRENT-STATE",
    "time": "2022-09-10T02:45:00.000Z",
    "mode-reason": "PUI",
    "state-reason": "MODE",
    "dial": "OFF",
    "rssi": "-58",
    "product-state": {
        "fmod": "FAN",
        "fnst": "FAN",
        "fnsp": "0005",
        "qtar": "0003",
        "oson": "OFF",
        "rhtm": "ON",
        "filf": "0000",
        "ercd": "NONE",
        "nmod": "OFF",
        "wacd": "FLTR",
        "hmod": "OFF",
        "hmax": "2980",
        "hsta": "OFF",
        "ffoc": "OFF",
        "tilt": "OK"
    },
    "scheduler": {
        "srsc": "1ff4",
        "dstv": "0001",
        "tzid": "0001"
    }
}

Additional values in the root object are described as follows:

Name Key Possible Values
??? mode-reason ???
??? state-reason ???
??? dial ???
??? rssi ???

Most values under product-state are covered under the known values table declared above under STATE-SET, but other states not yet described are as follows:

Fan State Name Fan State ID Possible Values
Remaining Filter Life filf 0 - 9999, value calculated in hours. The amount of time remaining until the filter needs replacing.
Error Code ercd
Value Description
02C0 Operating as normal.
02C9 Operating as normal.
NONE (Misleading name). Air purifier filter needs replacing.
Warning Code wacd
Value Description
NONE Operating as normal
FLTR Air purifier filter needs replacing
??? hsta ???
??? tilt ???

Values under the scheduling object are not yet well defined.

Scheduler Name Scheduler ID Possible Values
??? srsc ???
??? dstv ???
??? tzid ???

ENVIRONMENTAL-CURRENT-SENSOR-DATA

This message is sent by the MQTT server (the fan) when the REQUEST-CURRENT-STATE message has been sent on the /command channel.

{
    "msg": "ENVIRONMENTAL-CURRENT-SENSOR-DATA",
    "time": "2022-09-10T02:45:00.000Z",
    "data": {
        "tact": "2974",
        "hact": "0053",
        "pact": "0000",
        "vact": "0004",
        "sltm": "OFF"
    }
}

Values found under the data object are described as follows:

Name ID Possible Values
Current Temperature tact
Value Description
0000 - 9999 A value from 0 - 9,999, the temperature measured in Kelvin * 10.
OFF The temperature monitor is disabled.
Relative Humidity hact 0000 - 0100 (a percentage value)
Particles pact 0000 - 9999
Volatile Compounds vact
Value Description
0000 - 9999 A value from 0 - 9,999, the amount of volatile compounds in the air.
INIT The volatile compounds system is still initializing and does not yet have any data.
Sleep Timer sltm
Value Description
0000 - 9999 A value from 0 - 9,999, the remaining amount of time (in minutes) before the fan turns off.
OFF There is no active sleep timer.

(internal documentation is not API. You may use this if you wish to create your own library).

Clone this wiki locally