Blame | Last modification | View Log | Download
## Tuya Data Points - DPS TableThe Tuya devices send back data points (DPS) also called device function points, in a json string. The DPS attributes define the state of the device. Each key in the DPS dictionary refers to key value pair, the key is the DP ID and its value is the dpValue. You can refer to the [Tuya developer platform](https://iot.tuya.com/index/) for definition of function points for the products.The following table represents several of the standard Tuya DPS values and their properties. It represents data compiled from Tuya documentation and self-discovery. Devices may vary. Feedback or additional data would would be appreciated. Please submit a Issue or Pull Request if you have additional data that would be helpful for others.To find Tuya DPS for devices not listed below, you can discover the DPS values using the Tuya IoT platform. See this help here: [Find your Data Point](https://www.zigbee2mqtt.io/advanced/support-new-devices/03_find_tuya_data_points.html#_8-display-device-logs).### Version 3.1 Devices#### Version 3.1 (and some 3.3) - Plug or Switch Type| DP ID | Function Point | Type | Range | Units || --- | --- | --- | --- | --- || 1 | Switch | bool | True/False | || 2 | Countdown? | integer | 0-86400 | s || 4 | Current | integer | 0-30000 | mA || 5 | Power | integer | 0-50000 | W || 6 | Voltage | integer | 0-5000 | V |#### Version 3.1 - Light Type (RGB)| DP ID | Function Point | Type | Range | Units || --- | --- | --- | --- | --- || 1 | Switch | bool | True/False | || 2 | Mode | enum | white,colour,scene,music | || 3 | Bright | integer | 10-1000\* | || 4 | Color Temp | integer | 0-1000\* | || 5 | Color | hexstring | r:0-255,g:0-255,b:0-255,h:0-360,s:0-255,v:0-255 | rgb+hsv |### Version 3.3 Devices#### Version 3.3 - Plug, Switch, Power Strip Type| DP ID | Function Point | Type | Range | Units || --- | --- | --- | --- | --- || 1 | Switch 1 | bool | True/False | || 2 | Switch 2 | bool | True/False | || 3 | Switch 3 | bool | True/False | || 4 | Switch 4 | bool | True/False | || 5 | Switch 5 | bool | True/False | || 6 | Switch 6 | bool | True/False | || 7 | Switch 7/usb | bool | True/False | || 9 | Countdown 1 | integer | 0-86400 | s || 10 | Countdown 2 | integer | 0-86400 | s || 11 | Countdown 3 | integer | 0-86400 | s || 12 | Countdown 4 | integer | 0-86400 | s || 13 | Countdown 5 | integer | 0-86400 | s || 14 | Countdown 6 | integer | 0-86400 | s || 15 | Countdown 7 | integer | 0-86400 | s || 17 | Add Electricity | integer | 0-50000 | kwh || 18 | Current | integer | 0-30000 | mA || 19 | Power | integer | 0-50000 | W || 20 | Voltage | integer | 0-5000 | V || 21 | Test Bit | integer | 0-5 | n/a || 22 | Voltage coeff. | integer | 0-1000000 | || 23 | Current coeff. | integer | 0-1000000 | || 24 | Power coeff. | integer | 0-1000000 | || 25 | Electricity coeff. | integer | 0-1000000 | || 26 | Fault | fault | ov_cr | || 38 | Power-on state setting | enum | off, on, memory | || 39 | Overcharge Switch | bool | True/False | || 40 | Indicator status setting | enum | none, on, relay, pos | || 41 | Child Lock | bool | True/False | || 42 | UNKNOWN | | | || 43 | UNKNOWN | | | || 44 | UNKNOWN | | | |Note: Some 3.3 energy management plugs use the DPS values of the 3.1 plug above.#### Version 3.3 - Dimmer Switch| DP ID | Function Point | Type | Range | Units || --- | --- | --- | --- | --- || 1 | Switch | bool | True/False | || 2 | Brightness | integer | 10-1000\* | || 3 | Minimum of Brightness | integer | 10-1000\* | || 4 | Type of light source1 | enum | LED,incandescent,halogen | || 5 | Mode | enum | white | |#### Version 3.3 - Light Type (RGB)| DP ID | Function Point | Type | Range | Units || --- | --- | --- | --- | --- || 20 | Switch | bool | True/False | || 21 | Mode | enum | white,colour,scene,music | || 22 | Bright | integer | 10-1000\* | || 23 | Color Temp | integer | 0-1000 | || 24 | Color | hexstring | h:0-360,s:0-1000,v:0-1000 | hsv || 25 | Scene | string | n/a | || 26 | Left time | integer | 0-86400 | s || 27 | Music | string | n/a | || 28 | Debugger | string | n/a | || 29 | Debug | string | n/a | || 30 | Rhythms | n/a | n/a | || 31 | Go To Sleep | n/a | n/a | || 32 | Wake Up | n/a | n/a | || 33 | Power Off Memory | n/a | n/a | || 34 | Do not Disturb | n/a | n/a | || 41 | Remote Control Switch | n/a | n/a | || 209 | Cycle Timing | n/a | n/a | || 210 | Vaction Timing | n/a | n/a | |#### Version 3.3 - Automated Curtain Type| DP ID | Function Point | Type | Range | Units || --- | --- | --- | --- | --- || 1 | Curtain Switch 1 | enum | open, stop, close, continue | || 2 | Percent control 1 | integer | 0-100 | % || 3 | Accurate Calibration 1 | enum | start, end | || 4 | Curtain Switch 2 | enum | open, stop, close, continue | || 5 | Percent control 2 | integer | 0-100 | || 6 | Accurate Calibration 2 | enum | start, end | || 8 | Motor Steer 1 | enum | forward, back | || 9 | Motor steer 2 | enum | forward, back | || 10 | Quick Calibration 1 | integer | 1-180 | s || 11 | Quick Calibration 2 | integer | 1-180 | s || 12 | Motor Mode 1 | enum | strong_power, dry_contact | || 13 | Motor Mode 2 | enum | strong_power, dry_contact | || 14 | Light mode | enum | relay, pos, none | |#### Version 3.3 - Fan Switch Type| DP ID | Function Point | Type | Range | Units || --- | --- | --- | --- | --- || 1 | Fan switch | bool | True/False | n/a || 2 | Fan countdown | integer | 0-86400 | s || 3 | Fan speed | enum | level_1, level_2, level_3, level_4, level_5 | || 4 | Fan speed | integer | 1-100 | % || 5 | Fan light switch | bool | True/False | || 6 | Brightness integer | integer | 10-1000 | || 7 | Fan light countdown | integer | 0-86400 | || 8 | Minimum brightness | integer | 10-1000 | || 9 | Maximum brightness | integer | 10-1000 | || 10 | Mode | enum | white | || 11 | Power-on state setting | enum | off, on, memory | || 12 | Indicator status setting | enum | none, relay, pos | || 13 | Backlight switch | bool | True/False | |#### Version 3.3 - Universal IR Controller with optional Temp/Humidity| DP ID | Function Point | Type | Range | Units || --- | --- | --- | --- | --- || 101 | Current Temperature | integer | 0-600 | 10x Celsius || 102 | Current Humidity | integer | 0-100 | % || 201 | IR Commands (set only) | JSON\* | n/a | n/a |#### Version 3.3 - Sensor Type*Important Note:* Battery-powered Tuya sensors are usually designed to stay in sleep mode until a state change (eg.open or close alert). This means you will not be able to poll these devices except in the brief moment they awake, connect to the WiFi and send their state update payload the the Tuya Cloud. Keep in mind that if you manage to poll the device enough to keep it awake, you will likely quickly drain the battery.| DP ID | Function Point | Type | Range | Units || --- | --- | --- | --- | --- || 1 | Door Sensor | bool | True/False | || 2 | Battery level state | enum | low, middle, high | || 3 | Battery level | integer | 0-100 | % || 4 | Temper alarm | bool | True/False | || 5 | Flooding Detection State | enum | alarm, normal | || 6 | Luminance detection state | enum | low, middle, high, strong | || 7 | Current Luminance | integer | 0-100 | % || 8 | Current Temperature | integer | 400-2000 | || 9 | Current Humidity | integer | 0-100 | % || 10 | Shake State | enum | normal, vibration, drop, tilt | || 11 | Pressure State | enum | alarm, normal | || 12 | PIR state | enum | pir, none | || 13 | Smoke Detection State | enum | alarm, normal | || 14 | Smoke value | integer | 0-1000 | || 15 | Alarm Volume | enum | low, middle, high, mute | || 16 | Alarm Ringtone | enum | 1, 2, 3, 4, 5 | || 17 | Alarm Time | integer | 0-60 | s || 18 | Auto-Detect | bool | True/False | || 19 | Auto-Detect Result | enum | checking, check_success, check_failure, others | || 20 | Preheat | bool | True/False | || 21 | Fault Alarm | fault | fault, serious_fault, sensor_fault, probe_fault, power_fault | Barrier || 22 | Lifecycle | bool | True/False | || 23 | Alarm Switch | bool | True/False | || 24 | Silence | bool | True/False | || 25 | Gas Detection State | enum | alarm, normal | || 26 | Detected Gas | integer | 0-1000 | || 27 | CH4 Detection State | enum | alarm, normal | || 28 | CH4 value | integer | 0-1000 | || 29 | Alarm state | enum | alarm_sound, alarm_light, alarm_sound_light, normal | || 30 | VOC Detection State | enum | alarm, normal | || 31 | VOC value | integer | 0-999 | || 32 | PM2.5 state | enum | alarm, normal | || 33 | PM2.5 value | integer | 0-999 | || 34 | CO state | enum | alarm, normal | || 35 | CO value | integer | 0-1000 | || 36 | CO2 Detection State | enum | alarm, normal | || 37 | CO2 value | integer | 0-1000 | || 38 | Formaldehyde Detection State | enum | alarm, normal | || 39 | CH2O value | integer | 0-1000 | || 40 | Master mode | enum | disarmed, arm, home, sos | || 41 | Air quality index | enum | level_1, level_2, level_3, level_4, level_5, level_6 | |NOTE (\*) - The range can vary depending on the device. As an example, for dimmers, it may be 10-1000 or 25-255.#### Version 3.3 - WiFi Air Quality Detector PM2.5/Formaldehyde/VOC/CO2/Temperature/Humidity| DP ID | Function Point | Type | Range | Units || --- | --- | --- | --- | --- || 2 | PM2.5 value | integer | 0 - 999 | ug/m3 || 18 | Current Temperature | integer | 0 - 850 | ËšC (multiplied by 10) || 19 | Current Humidity | integer | 0 - 1000 | % (multiplied by 10) || 20 | CH2O (Formaldehyde) value | integer | 0 - 1000 | ppm || 21 | VOC (Volatile organic compound) value | integer | 0 - 2000 | ppm || 22 | CO2 value | integer | 350 - 2000 | ppm |Example device: https://www.aliexpress.com/item/1005005034880204.html#### Version 3.3 - Robot Mower Type<table><thead><tr><th>DP ID</th><th>Function Point</th><th>Type</th><th>Range</th><th>Units</th></tr></thead><tbody><tr><td>6</td><td>Battery</td><td>integer</td><td>0-100</td><td>%</td></tr><tr><td>101</td><td>Machine Status</td><td>enum</td><td><ul><li>STANDBY MOWING</li><li>CHARGING</li><li>EMERGENCY</li><li>LOCKED</li><li>PAUSED</li><li>PARK</li><li>CHARGING_WITH_TASK_SUSPEND</li><li>FIXED_MOWING</li></ul></td><td></td></tr><tr><td>102</td><td>Machine error</td><td>integer</td><td>0, ?</td><td></td></tr><tr><td>103</td><td>Machine warning</td><td>enum</td><td><ul><li>MOWER_LEAN</li><li>MOWER_EMERGENCY</li><li>MOWER_UI_LOCKED</li><ul></ul></ul></td><td></td></tr><tr><td>104</td><td>Rain mode</td><td>boolean</td><td>True/False</td><td></td></tr><tr><td>105</td><td>Work time</td><td>interger</td><td>1-99</td><td>hours</td></tr><tr><td>106</td><td>Machine password</td><td>byte str</td><td>?</td><td></td></tr><tr><td>107</td><td>Clear machine appointment</td><td>boolean</td><td>True/False</td><td></td></tr><tr><td>108</td><td>Query machine reservation</td><td>boolean</td><td>True/False</td><td></td></tr><tr><td>109</td><td>Query partition parameters</td><td>boolean</td><td>True/False</td><td></td></tr><tr><td>110</td><td>Report machine reservation</td><td>byte str</td><td></td><td></td></tr><tr><td>111</td><td>Error log</td><td>byte str</td><td></td><td></td></tr><tr><td>112</td><td>Work log</td><td>byte str</td><td></td><td></td></tr><tr><td>113</td><td>Partition parameters</td><td>byte str</td><td></td><td></td></tr><tr><td>114</td><td>Work mode</td><td>enum</td><td>AutoMode/??</td><td></td></tr></tbody></table>Reference [pymoebot](https://github.com/Whytey/pymoebot) for further definition.#### Version 3.3 - 24v Thermostat (i.e. PCT513-TY)| DP ID | Function Point | Type | Range | Units || --- | --- | --- | --- | --- || 2 | System Mode | enum | \[ 'auto' 'cool' 'heat' 'off' others? \] | || 16 | Center of Setpoint, High-Resolution °C | integer | 500-3200 | °C x 100 in steps of 50 || 17 | Center of Setpoint, °F | integer | 20-102 | °F || 18\* | Cooling Setpoint, Low-Resolution °F | integer | 20-102 | °F || 19\* | Cooling Setpoint, Low-Resolution °C | integer | 500-3200 | °C || 20\* | Heating Setpoint, Low-Resolution °F | integer | 20-102 | °F || 23 | Display Units | enum | \[ 'f' 'c' \] | || 24 | Current Temperature, High-Resolution °C | integer | 500-3200 | °C x 100 in steps of 50 || 26\* | Heating Setpoint, Low-Resolution °C | integer | 5-32 | °C || 27\* | Temperature Correction | integer | \-10 - +10 | || 29 | Current Temperature, °F | integer | 20-102 | °F || 34 | Current Humidity | integer | 0-100 | % || 45 | Fault Flags | bitmask | \[ e1 e2 e3 \] | || 107 | System Type | integer-as-string | ? | ? || 108\* | Cooling Setpoint, High-Resolution °C | integer | 500-3200 | °C x 100 in steps of 50 || 109\* | Heating Setpoint, High-Resolution °C | integer | 500-3200 | °C x 100 in steps of 50 || 110\* | Cooling Setpoint, °F | integer | 20-102 | °F || 111\* | Heating Setpoint, °F | integer | 20-102 | °F || 115 | Fan Mode | enum | \[ 'auto' 'cycle' 'on' \] | || 116 | "at home/away from home" | integer-as-string | ? | ? || 118 | Schedule Data | base64 | binary blob | || 119 | Schedule Enabled | bool | True/False | || 120 | Hold/Schedule | enum | \[ 'permhold' 'temphold' 'followschedule' \] | || 121 | Vacation Data | base64 | binary blob | || 122 | [Sensor Data, list 1](https://github.com/jasonacox/tinytuya/discussions/139) | base64 | binary blob | || 123 | Minimum Fan Run Time | integer | 0-55 | minutes per hour || 125 | [Sensor Data, list 2](https://github.com/jasonacox/tinytuya/discussions/139) | base64 | binary blob | || 126 | [Sensor Data, list 3](https://github.com/jasonacox/tinytuya/discussions/139) | base64 | binary blob | || 127 | [Sensor Data, list 4](https://github.com/jasonacox/tinytuya/discussions/139) | base64 | binary blob | || 128 | [Sensor Data, list 5](https://github.com/jasonacox/tinytuya/discussions/139) | base64 | binary blob | || 129 | System State | enum | \[ 'fanon' 'coolfanon' 'alloff' others? \] | || 130 | Weather Forcast | ? | ? | ? |NOTE (\*) - Depending on the firmware, either 18/19/20/26/27 or 108/109/110/111/x are used, not bothA user contributed module is available for this device in the [Contrib library](https://github.com/jasonacox/tinytuya/tree/master/tinytuya/Contrib):