Last Updated on : 2024-11-20 08:51:38download
This topic describes the protocol specific to the features of the infrared (IR) thermostat.
To make a traditional air conditioner smart, the popular approach is to use a smart plug for the air conditioner and universal remote control. However, this approach is app-dependent and can only support simple operations. It cannot provide deep experience in smart life.
Given this, Tuya provides the IR thermostat that can be used in tandem with the existing IR remote control for a better and smarter user experience. The IR thermostat can get and display the status of the air conditioner.
The thermostat controls the air conditioner with cloud-based IR codes.
Process description:
The module matches the IR code from the remote control of the air conditioner against IR code libraries.
With successful matching, the module downloads the corresponding IR code library to the local system.
The download library is stored in the external flash.
Up to three IR code libraries can be stored. Deleting or switching between libraries is supported.
The module parses the IR code from the remote control and syncs the status to the MCU.
Process description:
The module matches the received IR code against the local IR code library to get information such as temperature, mode, and speed.
Then, it syncs the obtained status data to the MCU through serial communication.
The MCU parses the received data and gets the status such as temperature, mode, and speed to update the display.
The status of the air conditioner is synced to the app panel through the data point (DP). This keeps the status of the air conditioner in sync with the thermostat and the app panel.
IR learning allows users to capture IR codes from a remote control by using the app panel. The module uploads the learned IR code to the cloud to match it against the IR code libraries.
IR control can be performed with the app panel or the thermostat display.
Control with app panel
Control with thermostat display
When users adjust the air conditioner, the MCU will send the updated status such as temperature, mode, and speed to the module through serial communication.
The module parses the received command.
With the mapping table, the module retrieves the corresponding IR code from the flash memory address.
If the IR code is found, the module will transmit the IR signal and returns success to the MCU. Otherwise, the module will not transmit the IR signal and returns failure to the MCU.
On successful return, the MCU will update the display and report the temperature status to the app panel. This keeps the status of the air conditioner in sync with the thermostat and the app panel.
The MCU sends the following data.
Field | Length (byte) | Description |
---|---|---|
Header | 2 | 0x55aa |
Version | 1 | 0x03 |
Command | 1 | 0x38 |
Data length | 2 | 0x0002 |
Data | 1 | 0x01 (subcommand) |
1 | Category: 0x01: Air conditioner |
|
N | IR code group: mode + speed + temperature and on/off | |
Checksum | 1 | Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder. |
The module returns the following data.
Field | Length (byte) | Description |
---|---|---|
Header | 2 | 0x55aa |
Version | 1 | 0x00 |
Command | 1 | 0x38 |
Data length | 2 | 0x0002 |
Data | 1 | 0x01 (subcommand) |
1 | 0x00/0x01
|
|
Checksum | 1 | Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder. |
Protocol description
The MCU uses the command 0x3801
to sync the status of the air conditioner to the module. After receiving the command, the module will parse it to get the IR code.
The special mode and the on/off control work with the same logic.
The group code for special mode: mode + speed or mode + speed + temperature.
For the special mode, the MCU includes the temperature in the command. The module matches the received command against the library. The module returns success if it reads the IR code successfully. The module returns failure if it fails to read the IR code.
After returning failure, the module continues retrieving the mode + speed code group. If the retrieval failed, the module polls the mode + speed + temperature code group at different temperatures. On success, the module syncs the code to the MCU. Otherwise, the module does not return a value.
The module sends the following data.
Field | Length (byte) | Description |
---|---|---|
Header | 2 | 0x55aa |
Version | 1 | 0x00 |
Command | 1 | 0x38 |
Data length | 2 | 0x0002 |
Data | 1 | 0x02 (subcommand) |
1 | Product category 0x01: Air conditioner |
|
N | IR code group: mode + speed + temperature, mode + speed, and on/off. | |
Checksum | 1 | Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder. |
The MCU returns the following data.
Field | Length (byte) | Description |
---|---|---|
Header | 2 | 0x55aa |
Version | 1 | 0x03 |
Command | 1 | 0x38 |
Data length | 2 | 0x0001 |
Data | 1 | 0x02 (subcommand) |
Checksum | 1 | Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder. |
Protocol description
The module uses the command 0x3802
to sync the status of the air conditioner to the MCU.
The MCU sends the following data.
Field | Length (byte) | Description |
---|---|---|
Header | 2 | 0x55aa |
Version | 1 | 0x03 |
Command | 1 | 0x38 |
Data length | 2 | 0x0002 |
Data | 1 | 0x03 (subcommand) |
1 | Product category 0x01: Air conditioner |
|
Checksum | 1 | Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder. |
The module returns the following data.
Field | Length (byte) | Description |
---|---|---|
Header | 2 | 0x55aa |
Version | 1 | 0x00 |
Command | 1 | 0x38 |
Data length | 2 | 0x0002 |
Data | 1 | 0x03 (subcommand) |
1 | 0x00/0x01
|
|
Checksum | 1 | Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder. |
Protocol description
The MCU sends the command 0x3803
to the module to test the SPI read, write, and erase operations. Make sure the external flash is greater than or equal to 2 MB. The return value 0x01
means success and 0x00
means failure.
For more information about the IR code group, submit a service ticket.
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback