Note · budding
The GAITEK serial protocol on a portable air conditioner
- Stage
- budding
- Links
- 1 out, 2 in
GAITEK is the serial protocol on the Wi-Fi module port of my Dimplex DCP33EB portable air conditioner. The name is the six ASCII letters that start every frame. The same protocol is reported on portable units sold under other brands, so these notes may fit a unit that looks nothing like mine.
The port is a plain UART: 9600 baud, 8 data bits, no parity, 1 stop bit, at 5 V. The unit sends a status frame about every 3 seconds. The module sends a command frame to change one setting.
How I found the port is in Putting ESPHome on a Dimplex portable air conditioner.
Frames
Every frame has three parts:
- The six bytes
47 41 49 54 45 4B, which areGAITEKin ASCII. - A body that starts with
BD. - Two check bytes.
A status frame then ends with 4B 45 54 49 41 47, which is KETIAG, the name backwards. A command frame has no ending.
| Frame | Direction | Length | Body |
|---|---|---|---|
| Status | unit to module | 24 bytes | 10 bytes |
| Command | module to unit | 14 bytes | 6 bytes |
Check bytes
Number the body bytes from 0, so byte 0 is BD.
- The first check byte is the XOR of body bytes 1, 3, 5 and so on.
- The second check byte is the XOR of body bytes 0, 2, 4 and so on.
The rule is the same for both frames. In a command, body bytes 3 to 5 are zero, so the first check byte equals the command number and the second equals BD XOR the value.
Status frame
Offsets count from the start of the frame.
| Offset | Meaning |
|---|---|
| 0 to 5 | GAITEK |
| 6 | BD |
| 7 | flags: bit 0 is power, bit 2 is swing |
| 8 | unknown |
| 9 | low four bits: mode. Bits 4 and 5: fan speed |
| 10 | room temperature in °C |
| 11 | target temperature in °C |
| 12 | room humidity in percent |
| 13 | target humidity in percent |
| 14 | off timer in hours |
| 15 | unknown |
| 16 | first check byte |
| 17 | second check byte |
| 18 to 23 | KETIAG |
Mode is 1 for cool, 3 for dry and 6 for fan. Fan speed is 1 for high, 2 for medium and 3 for low.
Command frame
| Offset | Meaning |
|---|---|
| 0 to 5 | GAITEK |
| 6 | BD |
| 7 | command number |
| 8 | value |
| 9 to 11 | 00 00 00 |
| 12 | first check byte |
| 13 | second check byte |
| Command | Setting | Value |
|---|---|---|
00 |
power | 0 off, 1 on |
01 |
swing | 0 off, 1 on |
06 |
mode | 1 cool, 3 dry, 6 fan |
07 |
fan speed | 1 high, 2 medium, 3 low |
08 |
target temperature | °C |
09 |
target humidity | percent |
0A |
off timer | hours |
FF |
keepalive | see below |
Each command sets one value. To turn the unit on in cool mode at 22 °C, the module sends three frames. This one turns the power on:
47 41 49 54 45 4B BD 00 01 00 00 00 00 BC
The first check byte is 00, the command number. The second is BD XOR 01, which is BC.
The unit answers a command with a new status frame. A controller can treat the status frame as the only source of truth and never guess the state.
What I have checked on my unit
- The status frames arrive on the port every 3 seconds, and the check bytes match the rule on every frame I captured.
- Room temperature, target temperature and fan speed in the status frame match the unit.
- The original Wi-Fi module sends the power, mode, fan speed, target temperature, humidity and timer commands in the form shown above. I recorded them on the wire.
- In dry mode the unit forces the target temperature to 24.
- The original Wi-Fi module sends the keepalive as
FF FFabout every 120 seconds.
What is still open
- Status bytes 8 and 15 are not decoded.
- Bytes 12 and 13 both read 32 on my unit. I treat them as humidity, and I have not confirmed it against a hygrometer.
- My unit has no swing motor, so I cannot test the swing bit or the swing command.
- A keepalive of
FF 01every 110 seconds also keeps the unit answering. I do not know what the value means or what the unit does when no keepalive arrives. - I have not sent every command from Home Assistant yet, and I have not tested the limits of any value.
Code
gaitek in belikh/esphome-components is an ESPHome climate component for this protocol. Its file frame.h holds the encoder and decoder with no ESPHome code around them, so it builds on a PC. It limits the target temperature to 16 to 31 °C, the target humidity to 30 to 90 percent and the timer to 24 hours. The component compiles for my unit’s Wi-Fi board, and it has not yet run on the unit.
Projects
- Dimplex portable ACPutting ESPHome on a Dimplex 3.5 kW portable air conditioner, then turning it into a two-hose unit with a printed cover.