ESPHome 2026.5.1
Loading...
Searching...
No Matches
smartair2_packet.h
Go to the documentation of this file.
1#pragma once
2
4
5enum class ConditioningMode : uint8_t { AUTO = 0x00, COOL = 0x01, HEAT = 0x02, FAN = 0x03, DRY = 0x04 };
6
7enum class FanMode : uint8_t { FAN_HIGH = 0x00, FAN_MID = 0x01, FAN_LOW = 0x02, FAN_AUTO = 0x03 };
8
10 // Control bytes starts here
11 // 10
12 uint8_t : 8; // Temperature high byte
13 // 11
14 uint8_t room_temperature; // current room temperature 1°C step
15 // 12
16 uint8_t : 8; // Humidity high byte
17 // 13
18 uint8_t room_humidity; // Humidity 0%-100% with 1% step
19 // 14
20 uint8_t : 8;
21 // 15
22 uint8_t cntrl; // In AC => ESP packets - 0x7F, in ESP => AC packets - 0x00
23 // 16
24 uint8_t : 8;
25 // 17
26 uint8_t : 8;
27 // 18
28 uint8_t : 8;
29 // 19
30 uint8_t : 8;
31 // 20
32 uint8_t : 8;
33 // 21
34 uint8_t ac_mode; // See enum ConditioningMode
35 // 22
36 uint8_t : 8;
37 // 23
38 uint8_t fan_mode; // See enum FanMode
39 // 24
40 uint8_t : 8;
41 // 25
42 uint8_t swing_mode; // In normal mode: If 1 - swing both direction, if 0 - horizontal_swing and
43 // vertical_swing define vertical/horizontal/off
44 // In alternative mode: 0 - off, 01 - vertical, 02 - horizontal, 03 - both
45 // 26
46 uint8_t : 3;
47 uint8_t use_fahrenheit : 1;
48 uint8_t : 3;
49 uint8_t lock_remote : 1; // Disable remote
50 // 27
51 uint8_t ac_power : 1; // Is ac on or off
52 uint8_t : 2;
53 uint8_t health_mode : 1; // Health mode on or off
54 uint8_t compressor : 1; // Compressor on or off ???
55 uint8_t half_degree : 1; // Use half degree
56 uint8_t ten_degree : 1; // 10 degree status (only work in heat mode)
57 uint8_t : 0;
58 // 28
59 uint8_t : 8;
60 // 29
61 uint8_t use_swing_bits : 1; // Indicate if horizontal_swing and vertical_swing should be used
62 uint8_t turbo_mode : 1; // Turbo mode
63 uint8_t quiet_mode : 1; // Sleep mode
64 uint8_t horizontal_swing : 1; // Horizontal swing (if swing_both == 0)
65 uint8_t vertical_swing : 1; // Vertical swing (if swing_both == 0) if vertical_swing and horizontal_swing both 0 =>
66 // swing off
67 uint8_t display_status : 1; // Led on or off
68 uint8_t : 0;
69 // 30
70 uint8_t : 8;
71 // 31
72 uint8_t : 8;
73 // 32
74 uint8_t : 8; // Target temperature high byte
75 // 33
76 uint8_t set_point; // Target temperature with 16°C offset, 1°C step
77};
78
83
84} // namespace esphome::haier::smartair2_protocol