10static constexpr uint32_t BOOST_TIMEOUT_ID = 0;
12static constexpr uint8_t DAIKIN_HEADER_BYTE0 = 0x11;
13static constexpr uint8_t DAIKIN_HEADER_BYTE1 = 0xDA;
14static constexpr uint8_t DAIKIN_HEADER_BYTE2 = 0x27;
15static constexpr uint8_t DAIKIN_HEADER_BYTE3 = 0x00;
16static constexpr uint8_t DAIKIN_FRAME_TYPE_INDEX = 4;
17static constexpr uint8_t DAIKIN_FRAME_HEADER_SIZE = DAIKIN_FRAME_TYPE_INDEX + 1;
33 uint8_t remote_state[35] = {0x11, 0xDA, 0x27, 0x00, 0xC5, 0x00, 0x00, 0x00, 0x11, 0xDA, 0x27, 0x00,
34 0x42, 0x49, 0x05, 0xA2, 0x11, 0xDA, 0x27, 0x00, 0x00, 0x00, 0x00, 0x00,
35 0x00, 0x00, 0x00, 0x06, 0x60, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00};
41 remote_state[24] = fan_speed >> 8;
42 remote_state[25] = fan_speed & 0xff;
44 remote_state[7] =
sum_bytes(remote_state, 7);
45 remote_state[34] =
sum_bytes(remote_state + 16, 18);
48 auto *data = transmit.get_data();
96 return operating_mode;
138 switch (this->
mode) {
144 return static_cast<uint8_t
>(
173 if (is_boost && !was_boost) {
175 }
else if (was_boost && !is_boost) {
183 ESP_LOGD(TAG,
"Boost ended");
190 uint8_t
mode = frame[5];
195 switch (
mode & 0xF0) {
283 if (!data.expect_bytes<DAIKIN_BIT_TIMINGS>(frame, DAIKIN_FRAME_HEADER_SIZE) || frame[0] != DAIKIN_HEADER_BYTE0 ||
284 frame[1] != DAIKIN_HEADER_BYTE1 || frame[2] != DAIKIN_HEADER_BYTE2 || frame[3] != DAIKIN_HEADER_BYTE3) {
293 if (!data.expect_bytes<DAIKIN_BIT_TIMINGS>(frame + DAIKIN_FRAME_HEADER_SIZE, frame_size - DAIKIN_FRAME_HEADER_SIZE)) {
296 if (frame[frame_size - 1] !=
sum_bytes(frame, frame_size - 1)) {
uint32_t IRAM_ATTR HOT get_loop_component_start_time() const
Get the cached time in milliseconds from when the current component started its loop execution.
bool cancel_timeout(const char *name)
Cancel a timeout function.
void set_timeout(const char *name, uint32_t timeout, std::function< void()> &&f)
Set a timeout function with a const char* name.
This class is used to encode all control actions on a climate device.
ClimateMode mode
The active mode of the climate device.
optional< ClimateFanMode > fan_mode
The active fan mode of the climate device.
float target_temperature
The target temperature of the climate device.
ClimateSwingMode swing_mode
The active swing mode of the climate device.
void publish_state()
Publish the state of the climate device, to be called from integrations.
optional< ClimatePreset > preset
The active preset of the climate device.
void control(const climate::ClimateCall &call) override
Override control to change settings of the climate device.
bool parse_state_frame_(const uint8_t frame[])
uint8_t temperature_() const
uint32_t pending_comfort_at_
void cancel_boost_mode_()
PendingComfort
What the 0xC5 frame of the current transmission said about comfort, applied by the state frame.
@ PENDING_COMFORT_UNKNOWN
void control(const climate::ClimateCall &call) override
uint8_t operation_mode_() const
uint16_t fan_speed_() const
PendingComfort pending_comfort_
void transmit_state() override
bool on_receive(remote_base::RemoteReceiveData data) override
void set_presets_(uint8_t *remote_state) const
void update_boost_timer_(bool was_boost)
Arms or cancels the boost timer when the preset moves into or out of boost.
RemoteTransmitterBase * transmitter_
@ CLIMATE_PRESET_NONE
No preset is active.
@ CLIMATE_PRESET_COMFORT
Device is in comfort preset.
@ CLIMATE_PRESET_BOOST
Device is in boost preset.
@ CLIMATE_PRESET_ACTIVITY
Device is reacting to activity (e.g., movement sensors)
@ CLIMATE_PRESET_SLEEP
Device is prepared for sleep.
@ CLIMATE_PRESET_ECO
Device is running an energy-saving preset.
@ CLIMATE_SWING_OFF
The swing mode is set to Off.
@ CLIMATE_SWING_HORIZONTAL
The fan mode is set to Horizontal.
@ CLIMATE_SWING_VERTICAL
The fan mode is set to Vertical.
@ CLIMATE_SWING_BOTH
The fan mode is set to Both.
@ CLIMATE_MODE_DRY
The climate device is set to dry/humidity mode.
@ CLIMATE_MODE_FAN_ONLY
The climate device only has the fan enabled, no heating or cooling is taking place.
@ CLIMATE_MODE_HEAT
The climate device is set to heat to reach the target temperature.
@ CLIMATE_MODE_COOL
The climate device is set to cool to reach the target temperature.
@ CLIMATE_MODE_HEAT_COOL
The climate device is set to heat/cool to reach the target temperature.
@ CLIMATE_MODE_OFF
The climate device is off.
@ CLIMATE_FAN_MEDIUM
The fan mode is set to Medium.
@ CLIMATE_FAN_ON
The fan mode is set to On.
@ CLIMATE_FAN_AUTO
The fan mode is set to Auto.
@ CLIMATE_FAN_LOW
The fan mode is set to Low.
@ CLIMATE_FAN_QUIET
The fan mode is set to Quiet.
@ CLIMATE_FAN_HIGH
The fan mode is set to High.
const uint8_t DAIKIN_MODE_AUTO
const uint8_t DAIKIN_COMFORT_FRAME_SIZE
const uint8_t DAIKIN_MODE_OFF
const uint8_t DAIKIN_PRESET_POWERFUL_ON
const uint8_t DAIKIN_STATE_FRAME_SIZE
const uint32_t DAIKIN_BIT_MARK
const uint8_t DAIKIN_TEMP_MIN
ESPHOME_LOG_TAG(TAG, "daikin.climate")
const uint8_t DAIKIN_FRAME_TYPE_COMFORT
const uint8_t DAIKIN_PRESET_QUIET_ON
const uint32_t DAIKIN_IR_FREQUENCY
const uint8_t DAIKIN_FAN_4
const uint8_t DAIKIN_FRAME_TYPE_STATE
const uint32_t DAIKIN_HEADER_MARK
const uint8_t DAIKIN_PRESET_SENSOR_ON
const uint8_t DAIKIN_MODE_COOL
const uint8_t DAIKIN_FAN_5
const uint32_t DAIKIN_BOOST_DURATION_MS
const uint8_t DAIKIN_PRESET_COMFORT_ON
const uint32_t DAIKIN_MESSAGE_SPACE
const uint32_t DAIKIN_HEADER_SPACE
const uint8_t DAIKIN_FAN_SILENT
const uint8_t DAIKIN_MODE_DRY
const uint8_t DAIKIN_FAN_2
const uint8_t DAIKIN_MODE_ON
const uint32_t DAIKIN_TRANSMISSION_MS
const uint8_t DAIKIN_FAN_1
const uint8_t DAIKIN_FAN_AUTO
const uint8_t DAIKIN_FAN_3
const uint8_t DAIKIN_TEMP_MAX
const uint8_t DAIKIN_PRESET_ECONO_ON
const uint8_t DAIKIN_MODE_HEAT
const uint8_t DAIKIN_MODE_FAN
constexpr uint8_t sum_bytes(const uint8_t *data, size_t len, uint8_t sum=0)
Add up the bytes of data with size len, truncated to 8 bits: the checksum many serial and IR protocol...
Application App
Global storage of Application pointer - only one Application can exist.