ESPHome  2024.12.2
daikin.h
Go to the documentation of this file.
1 #pragma once
2 
4 
5 namespace esphome {
6 namespace daikin {
7 
8 // Values for Daikin ARC43XXX IR Controllers
9 // Temperature
10 const uint8_t DAIKIN_TEMP_MIN = 10; // Celsius
11 const uint8_t DAIKIN_TEMP_MAX = 30; // Celsius
12 
13 // Modes
14 const uint8_t DAIKIN_MODE_AUTO = 0x00;
15 const uint8_t DAIKIN_MODE_COOL = 0x30;
16 const uint8_t DAIKIN_MODE_HEAT = 0x40;
17 const uint8_t DAIKIN_MODE_DRY = 0x20;
18 const uint8_t DAIKIN_MODE_FAN = 0x60;
19 const uint8_t DAIKIN_MODE_OFF = 0x00;
20 const uint8_t DAIKIN_MODE_ON = 0x01;
21 
22 // Fan Speed
23 const uint8_t DAIKIN_FAN_AUTO = 0xA0;
24 const uint8_t DAIKIN_FAN_SILENT = 0xB0;
25 const uint8_t DAIKIN_FAN_1 = 0x30;
26 const uint8_t DAIKIN_FAN_2 = 0x40;
27 const uint8_t DAIKIN_FAN_3 = 0x50;
28 const uint8_t DAIKIN_FAN_4 = 0x60;
29 const uint8_t DAIKIN_FAN_5 = 0x70;
30 
31 // IR Transmission
32 const uint32_t DAIKIN_IR_FREQUENCY = 38000;
33 const uint32_t DAIKIN_HEADER_MARK = 3360;
34 const uint32_t DAIKIN_HEADER_SPACE = 1760;
35 const uint32_t DAIKIN_BIT_MARK = 520;
36 const uint32_t DAIKIN_ONE_SPACE = 1370;
37 const uint32_t DAIKIN_ZERO_SPACE = 360;
38 const uint32_t DAIKIN_MESSAGE_SPACE = 32300;
39 
40 // State Frame size
41 const uint8_t DAIKIN_STATE_FRAME_SIZE = 19;
42 
44  public:
46  : climate_ir::ClimateIR(DAIKIN_TEMP_MIN, DAIKIN_TEMP_MAX, 1.0f, true, true,
51 
52  protected:
53  // Transmit via IR the state of this climate controller.
54  void transmit_state() override;
55  uint8_t operation_mode_();
56  uint16_t fan_speed_();
57  uint8_t temperature_();
58  // Handle received IR Buffer
59  bool on_receive(remote_base::RemoteReceiveData data) override;
60  bool parse_state_frame_(const uint8_t frame[]);
61 };
62 
63 } // namespace daikin
64 } // namespace esphome
The fan mode is set to Low.
Definition: climate_mode.h:54
const uint8_t DAIKIN_MODE_AUTO
Definition: daikin.h:14
const uint8_t DAIKIN_FAN_AUTO
Definition: daikin.h:23
const uint8_t DAIKIN_MODE_ON
Definition: daikin.h:20
const uint32_t DAIKIN_ZERO_SPACE
Definition: daikin.h:37
The fan mode is set to Both.
Definition: climate_mode.h:74
const uint8_t DAIKIN_TEMP_MIN
Definition: daikin.h:10
const uint32_t DAIKIN_HEADER_SPACE
Definition: daikin.h:34
const uint32_t DAIKIN_BIT_MARK
Definition: daikin.h:35
const uint8_t DAIKIN_MODE_HEAT
Definition: daikin.h:16
bool on_receive(remote_base::RemoteReceiveData data) override
Definition: daikin.cpp:208
const uint32_t DAIKIN_HEADER_MARK
Definition: daikin.h:33
const uint32_t DAIKIN_MESSAGE_SPACE
Definition: daikin.h:38
const uint8_t DAIKIN_FAN_2
Definition: daikin.h:26
const uint8_t DAIKIN_FAN_SILENT
Definition: daikin.h:24
void transmit_state() override
Definition: daikin.cpp:9
const uint32_t DAIKIN_ONE_SPACE
Definition: daikin.h:36
const uint8_t DAIKIN_FAN_5
Definition: daikin.h:29
const uint8_t DAIKIN_FAN_4
Definition: daikin.h:28
The fan mode is set to Horizontal.
Definition: climate_mode.h:78
The fan mode is set to Auto.
Definition: climate_mode.h:52
const uint8_t DAIKIN_STATE_FRAME_SIZE
Definition: daikin.h:41
const uint8_t DAIKIN_MODE_OFF
Definition: daikin.h:19
ClimateIR(float minimum_temperature, float maximum_temperature, float temperature_step=1.0f, bool supports_dry=false, bool supports_fan_only=false, std::set< climate::ClimateFanMode > fan_modes={}, std::set< climate::ClimateSwingMode > swing_modes={}, std::set< climate::ClimatePreset > presets={})
Definition: climate_ir.h:26
The fan mode is set to Vertical.
Definition: climate_mode.h:76
const uint8_t DAIKIN_MODE_COOL
Definition: daikin.h:15
const uint8_t DAIKIN_FAN_3
Definition: daikin.h:27
The fan mode is set to High.
Definition: climate_mode.h:58
The swing mode is set to Off.
Definition: climate_mode.h:72
bool parse_state_frame_(const uint8_t frame[])
Definition: daikin.cpp:143
const uint8_t DAIKIN_TEMP_MAX
Definition: daikin.h:11
const uint8_t DAIKIN_FAN_1
Definition: daikin.h:25
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7
const uint8_t DAIKIN_MODE_DRY
Definition: daikin.h:17
const uint32_t DAIKIN_IR_FREQUENCY
Definition: daikin.h:32
The fan mode is set to Medium.
Definition: climate_mode.h:56
const uint8_t DAIKIN_MODE_FAN
Definition: daikin.h:18