-
-
Notifications
You must be signed in to change notification settings - Fork 1
Dyson MQTT Protocol
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.
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:
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.
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 |
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 |
|
||||||||||||
Fan Speed | fnsp |
|
||||||||||||
Oscillation | oson |
|
||||||||||||
Sleep Timer | sltm |
|
||||||||||||
Monitor Air Quality | rhtm |
|
||||||||||||
Reset Filter State | rsft |
|
||||||||||||
Air Quality Target | qtar |
|
||||||||||||
Night Mode | nmod |
|
||||||||||||
Heat Mode | hmod |
|
||||||||||||
Focus Mode | ffoc |
|
||||||||||||
Temperature Limit | hmax |
|
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"
}
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.
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 |
|
||||||||
Warning Code | wacd |
|
||||||||
??? | hsta | ??? | ||||||||
??? | tilt | ??? |
Values under the scheduling
object are not yet well defined.
Scheduler Name | Scheduler ID | Possible Values |
---|---|---|
??? | srsc | ??? |
??? | dstv | ??? |
??? | tzid | ??? |
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 |
|
||||||
Relative Humidity | hact | 0000 - 0100 (a percentage value) | ||||||
Particles | pact | 0000 - 9999 | ||||||
Volatile Compounds | vact |
|
||||||
Sleep Timer | sltm |
|
Dyson4J is not in any way associated with nor endorsed by Dyson™️ Ltd. or any subsidiary entities. This project is maintained separately by the community and does not bare any responsibility for damage caused to Dyson™️ devices.