diff --git a/Tuya-Protocols.md b/Tuya-Protocols.md new file mode 100644 index 00000000..65509836 --- /dev/null +++ b/Tuya-Protocols.md @@ -0,0 +1,54 @@ +Common dpId's and what they're used for in Tuya devices + +### Aromatherapy machine (Oil Diffuser) + +| DP ID | Function points | Identifier | Data type | Function type | Properties +|-------|--|---|---|---|--| +| 1 | Switch | Power | Issue and report | Boolean | | +| 6 | Amount of fog | fog | Issue and report | Enum | Enumerated values:small, large| +| 11 | Light | Light | Issue and report | Boolean | | +| 12 | Fault alarm | fault | Only report | Fault | Barrier values:1| +| 13 | Countdown | countdown | Issue and report | Enum | Enumerated values: 0, 1, 2, 3| +| 14 | Countdown remaining time | countdown_left | Only report | Integer | Values range: 0-360, Pitch1, Scale0, Unit:min| +| 101 | Light mode | work_mode | Issue and report | Enum | Enumerated values: white, colour, scene, scene1, scene2, scene3, scene4 | +| 102 | Color value | colour_data | Issue and report | Char type |data format of the lights is a string of 14 characters, for example, 00112233334455, where 00 indicates R, 11 indicates G, 22 indicates B, 3333 indicates the hue, 44 indicates the saturation, and 55 indicates the value. The initial value is saved by default. If you do not want to adjust the light, set the data to the maximum value 100% (0x64). The last four characters have fixed values.| +| 103 | Light mode | lightmode | Issue and report | Enum | Enumerated values: 1, 2, 3| +| 104 | Brightness setting | setlight | Issue and report | Integer | Values range: 0-255, Pitch1, Scale0, Unit:\%| + +### Curtain motor + +| DP ID | Function points | Identifier | Data type | Function type | Properties | +|-------|-----------------|---------------|------------------|---------------|-----------------------------------------------| +| 1 | Percentage | percent_state | Only report | Integer | Values range:0-100, Pitch1, Scale0, Unit:% | +| 2 | Motor Direction | control_back | Issue and report | Boolean | | +| 3 | Auto Power | auto_power | Issue and report | Boolean | | +| 4 | Left time | countdown | Issue and report | Enum | Enumerated values:cancel, 1, 2, 3, 4 | +| 5 | Total Time | time_total | Only report | Integer | Values range:0-120000, Pitch1, Scale0, Unit:m | + +### Power monitoring plug +| DP ID | Function points | Identifier | Data type | Function type | Properties | | | +|-------|------------------------|-----------------|--------------------|---------------|-----------------------------------------------|---|---| +| 1 | switch_1 | switch_1 | Control and report | Boolean | | | | +| 9 | countdown_1 | countdown_1 | Control and report | Integer | undefined0-86400, undefined1, Scale0, Unit:s | | | +| 17 | statistics Function | add_ele | Control and report | Integer | undefined0-50000, undefined100, Scale3, Unit: | | | +| 18 | current | cur_current | Data report | Integer | undefined0-30000, undefined1, Scale0, Unit:mA | | | +| 19 | power | cur_power | Data report | Integer | undefined0-50000, undefined1, Scale1, Unit:W | | | +| 20 | voltage | cur_voltage | Data report | Integer | undefined0-5000, undefined1, Scale1, Unit:V | | | +| 21 | test flag | test_bit | Data report | Integer | undefined0-5, undefined1, Scale0, Unit: | | | +| 22 | voltage coefficient | voltage_coe | Data report | Integer | undefined0-1000000, undefined1, Scale0, Unit: | | | +| 23 | current coefficient | electric_coe | Data report | Integer | undefined0-1000000, undefined1, Scale0, Unit: | | | +| 24 | power coefficient | power_coe | Data report | Integer | undefined0-1000000, undefined1, Scale0, Unit: | | | +| 25 | statistics coefficient | electricity_coe | Data report | Integer | undefined0-1000000, undefined1, Scale0, Unit: | | | +| 26 | warning | fault | Data report | Fault | Barrier values:ov_cr | | | + +### 1-4 gang switch +| DP ID | Identifier | Data type | Function type | Properties | +|-------|-------------|--------------------|---------------|----------------------------------------------| +| 1 | switch_1 | Control and report | Boolean | | +| 2 | switch_2 | Control and report | Boolean | | +| 3 | switch_3 | Control and report | Boolean | | +| 4 | switch_4 | Control and report | Boolean | | +| 9 | countdown_1 | Control and report | Integer | undefined0-86400, undefined1, Scale0, Unit:s | +| 10 | countdown_2 | Control and report | Integer | undefined0-86400, undefined1, Scale0, Unit:s | +| 11 | countdown_3 | Control and report | Integer | undefined0-86400, undefined1, Scale0, Unit:s | +| 12 | countdown_4 | Control and report | Integer | undefined0-86400, undefined1, Scale0, Unit:s | \ No newline at end of file