Skip to content

Commit

Permalink
Added comments about tuya protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
JeroenSt committed Feb 14, 2021
1 parent 326e092 commit 9e27302
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tuya.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,25 @@
#include "espMQTT.h"
#include "tuya.h"

/* https://images.tuyacn.com/smart/aircondition/Guide-to-Interworking-with-the-Tuya-MCU.pdf
* Tuyapacket with DP command = 0x55, 0xAA, VERSION, COMMAND, 0x00, LENGTH, DPID, DATA TYPE, FUNCTION LENGTH, FUCTION DATA
*
* COMMAND
* 0x00 Heartbeat detection.
* 0x01 Query product information.
* 0x02 Query the working mode of the Wi-Fi module.
* 0x03 Report the network connection status of the device.
* 0x04 Reset the Wi-Fi module and switch the network configuration mode.
* 0x05 Reset the Wi-Fi module and select a network configuration mode.
* 0x06 Deliver DP commands.
* 0x07 Report DP status.
* 0x08 Query the device initialization status.
* 0x0a (Optional) Start OTA upgrade.
* 0x0b (Optional) Transmit the OTA upgrade package.
* 0x1c (Optional) Obtain the local time.
* 0x0e Test the Wi-Fi function (product testing command).
*/

static uint8_t tuya_dimvalue0 = 0;
static uint8_t tuya_dimvalue1 = 0;
static uint8_t tuya_dimstate0 = 0;
Expand Down

0 comments on commit 9e27302

Please sign in to comment.