ESPHome 2026.11.0-dev
Loading...
Searching...
No Matches
esphome::haier Namespace Reference

Namespaces

namespace  hon_protocol
 
namespace  smartair2_protocol
 

Data Structures

class  BeeperSwitch
 
class  DisplaySwitch
 
struct  HaierBaseSettings
 
class  HaierClimateBase
 
class  HealthModeSwitch
 
class  HonClimate
 
struct  HonSettings
 
class  HorizontalAirflowSelect
 
class  QuietModeSwitch
 
class  SelfCleaningButton
 
class  Smartair2Climate
 
class  SteriCleaningButton
 
class  VerticalAirflowSelect
 

Enumerations

enum class  ActionRequest : uint8_t {
  SEND_CUSTOM_COMMAND = 0 , TURN_POWER_ON = 1 , TURN_POWER_OFF = 2 , TOGGLE_POWER = 3 ,
  START_SELF_CLEAN = 4 , START_STERI_CLEAN = 5
}
 
enum class  CleaningState : uint8_t { NO_CLEANING = 0 , SELF_CLEAN = 1 , STERI_CLEAN = 2 }
 
enum class  HonControlMethod { MONITOR_ONLY = 0 , SET_GROUP_PARAMETERS , SET_SINGLE_PARAMETER }
 

Functions

 ESPHOME_LOG_TAG (TAG, "haier.climate")
 
bool check_timeout (std::chrono::steady_clock::time_point now, std::chrono::steady_clock::time_point tpoint, size_t timeout)
 
 PROGMEM_STRING_TABLE (HonAlarmMessages, "Outdoor module failure", "Outdoor defrost sensor failure", "Outdoor compressor exhaust sensor failure", "Outdoor EEPROM abnormality", "Indoor coil sensor failure", "Indoor-outdoor communication failure", "Power supply overvoltage protection", "Communication failure between panel and indoor unit", "Outdoor compressor overheat protection", "Outdoor environmental sensor abnormality", "Full water protection", "Indoor EEPROM failure", "Outdoor out air sensor failure", "CBD and module communication failure", "Indoor DC fan failure", "Outdoor DC fan failure", "Door switch failure", "Dust filter needs cleaning reminder", "Water shortage protection", "Humidity sensor failure", "Indoor temperature sensor failure", "Manipulator limit failure", "Indoor PM2.5 sensor failure", "Outdoor PM2.5 sensor failure", "Indoor heating overload/high load alarm", "Outdoor AC current protection", "Outdoor compressor operation abnormality", "Outdoor DC current protection", "Outdoor no-load failure", "CT current abnormality", "Indoor cooling freeze protection", "High and low pressure protection", "Compressor out air temperature is too high", "Outdoor evaporator sensor failure", "Outdoor cooling overload", "Water pump drainage failure", "Three-phase power supply failure", "Four-way valve failure", "External alarm/scraper flow switch failure", "Temperature cutoff protection alarm", "Different mode operation failure", "Electronic expansion valve failure", "Dual heat source sensor Tw failure", "Communication failure with the wired controller", "Indoor unit address duplication failure", "50Hz zero crossing failure", "Outdoor unit failure", "Formaldehyde sensor failure", "VOC sensor failure", "CO2 sensor failure", "Firewall failure", "Unknown")
 
template<typename Mode , size_t N>
Mode airflow_order_at (const std::array< Mode, N > &order, size_t index)
 
void esphome_logger (haier_protocol::HaierLogLevel level, const char *tag, const char *message)
 
void init_haier_protocol_logging ()
 

Variables

constexpr size_t COMMUNICATION_TIMEOUT_MS = 60000
 
constexpr size_t STATUS_REQUEST_INTERVAL_MS = 5000
 
constexpr size_t PROTOCOL_INITIALIZATION_INTERVAL = 10000
 
constexpr size_t DEFAULT_MESSAGES_INTERVAL_MS = 2000
 
constexpr size_t CONTROL_MESSAGES_INTERVAL_MS = 400
 
constexpr uint32_t AIRFLOW_SELECT_DEBOUNCE_MS = 10000
 
constexpr size_t SIGNAL_LEVEL_UPDATE_INTERVAL_MS = 10000
 
constexpr int PROTOCOL_OUTDOOR_TEMPERATURE_OFFSET = -64
 
constexpr uint8_t CONTROL_MESSAGE_RETRIES = 5
 
constexpr std::chrono::milliseconds CONTROL_MESSAGE_RETRIES_INTERVAL = std::chrono::milliseconds(500)
 
constexpr size_t ALARM_STATUS_REQUEST_INTERVAL_MS = 600000
 
const uint8_t ONE_BUF [] = {0x00, 0x01}
 
const uint8_t ZERO_BUF [] = {0x00, 0x00}
 
constexpr std::array< hon_protocol::VerticalSwingMode, 7 > VERTICAL_SWING_MODES_ORDER PROGMEM
 
constexpr uint8_t INIT_REQUESTS_RETRY = 2
 
constexpr std::chrono::milliseconds INIT_REQUESTS_RETRY_INTERVAL = std::chrono::milliseconds(2000)
 

Enumeration Type Documentation

◆ ActionRequest

enum class esphome::haier::ActionRequest : uint8_t
strong
Enumerator
SEND_CUSTOM_COMMAND 
TURN_POWER_ON 
TURN_POWER_OFF 
TOGGLE_POWER 
START_SELF_CLEAN 
START_STERI_CLEAN 

Definition at line 16 of file haier_base.h.

◆ CleaningState

enum class esphome::haier::CleaningState : uint8_t
strong
Enumerator
NO_CLEANING 
SELF_CLEAN 
STERI_CLEAN 

Definition at line 48 of file hon_climate.h.

◆ HonControlMethod

Enumerator
MONITOR_ONLY 
SET_GROUP_PARAMETERS 
SET_SINGLE_PARAMETER 

Definition at line 54 of file hon_climate.h.

Function Documentation

◆ airflow_order_at()

template<typename Mode , size_t N>
Mode esphome::haier::airflow_order_at ( const std::array< Mode, N > & order,
size_t index )

Definition at line 42 of file hon_climate.h.

◆ check_timeout()

bool esphome::haier::check_timeout ( std::chrono::steady_clock::time_point now,
std::chrono::steady_clock::time_point tpoint,
size_t timeout )

Definition at line 46 of file haier_base.cpp.

◆ ESPHOME_LOG_TAG()

esphome::haier::ESPHOME_LOG_TAG ( TAG ,
"haier.climate"  )

◆ esphome_logger()

void esphome::haier::esphome_logger ( haier_protocol::HaierLogLevel level,
const char * tag,
const char * message )

Definition at line 6 of file logger_handler.cpp.

◆ init_haier_protocol_logging()

void esphome::haier::init_haier_protocol_logging ( )

Definition at line 29 of file logger_handler.cpp.

◆ PROGMEM_STRING_TABLE()

esphome::haier::PROGMEM_STRING_TABLE ( HonAlarmMessages ,
"Outdoor module failure" ,
"Outdoor defrost sensor failure" ,
"Outdoor compressor exhaust sensor failure" ,
"Outdoor EEPROM abnormality" ,
"Indoor coil sensor failure" ,
"Indoor-outdoor communication failure" ,
"Power supply overvoltage protection" ,
"Communication failure between panel and indoor unit" ,
"Outdoor compressor overheat protection" ,
"Outdoor environmental sensor abnormality" ,
"Full water protection" ,
"Indoor EEPROM failure" ,
"Outdoor out air sensor failure" ,
"CBD and module communication failure" ,
"Indoor DC fan failure" ,
"Outdoor DC fan failure" ,
"Door switch failure" ,
"Dust filter needs cleaning reminder" ,
"Water shortage protection" ,
"Humidity sensor failure" ,
"Indoor temperature sensor failure" ,
"Manipulator limit failure" ,
"Indoor PM2.5 sensor failure" ,
"Outdoor PM2.5 sensor failure" ,
"Indoor heating overload/high load alarm" ,
"Outdoor AC current protection" ,
"Outdoor compressor operation abnormality" ,
"Outdoor DC current protection" ,
"Outdoor no-load failure" ,
"CT current abnormality" ,
"Indoor cooling freeze protection" ,
"High and low pressure protection" ,
"Compressor out air temperature is too high" ,
"Outdoor evaporator sensor failure" ,
"Outdoor cooling overload" ,
"Water pump drainage failure" ,
"Three-phase power supply failure" ,
"Four-way valve failure" ,
"External alarm/scraper flow switch failure" ,
"Temperature cutoff protection alarm" ,
"Different mode operation failure" ,
"Electronic expansion valve failure" ,
"Dual heat source sensor Tw failure" ,
"Communication failure with the wired controller" ,
"Indoor unit address duplication failure" ,
"50Hz zero crossing failure" ,
"Outdoor unit failure" ,
"Formaldehyde sensor failure" ,
"VOC sensor failure" ,
"CO2 sensor failure" ,
"Firewall failure" ,
"Unknown"  )

Variable Documentation

◆ AIRFLOW_SELECT_DEBOUNCE_MS

uint32_t esphome::haier::AIRFLOW_SELECT_DEBOUNCE_MS = 10000
constexpr

Definition at line 32 of file hon_climate.cpp.

◆ ALARM_STATUS_REQUEST_INTERVAL_MS

size_t esphome::haier::ALARM_STATUS_REQUEST_INTERVAL_MS = 600000
constexpr

Definition at line 42 of file hon_climate.cpp.

◆ COMMUNICATION_TIMEOUT_MS

size_t esphome::haier::COMMUNICATION_TIMEOUT_MS = 60000
constexpr

Definition at line 16 of file haier_base.cpp.

◆ CONTROL_MESSAGE_RETRIES

uint8_t esphome::haier::CONTROL_MESSAGE_RETRIES = 5
constexpr

Definition at line 40 of file hon_climate.cpp.

◆ CONTROL_MESSAGE_RETRIES_INTERVAL

std::chrono::milliseconds esphome::haier::CONTROL_MESSAGE_RETRIES_INTERVAL = std::chrono::milliseconds(500)
constexpr

Definition at line 41 of file hon_climate.cpp.

◆ CONTROL_MESSAGES_INTERVAL_MS

size_t esphome::haier::CONTROL_MESSAGES_INTERVAL_MS = 400
constexpr

Definition at line 20 of file haier_base.cpp.

◆ DEFAULT_MESSAGES_INTERVAL_MS

size_t esphome::haier::DEFAULT_MESSAGES_INTERVAL_MS = 2000
constexpr

Definition at line 19 of file haier_base.cpp.

◆ INIT_REQUESTS_RETRY

uint8_t esphome::haier::INIT_REQUESTS_RETRY = 2
constexpr

Definition at line 16 of file smartair2_climate.cpp.

◆ INIT_REQUESTS_RETRY_INTERVAL

std::chrono::milliseconds esphome::haier::INIT_REQUESTS_RETRY_INTERVAL = std::chrono::milliseconds(2000)
constexpr

Definition at line 17 of file smartair2_climate.cpp.

◆ ONE_BUF

const uint8_t esphome::haier::ONE_BUF[] = {0x00, 0x01}

Definition at line 43 of file hon_climate.cpp.

◆ PROGMEM

std::array< hon_protocol::HorizontalSwingMode, 5 > HORIZONTAL_SWING_MODES_ORDER esphome::haier::PROGMEM
inlineconstexpr
Initial value:
{
hon_protocol::VerticalSwingMode::HEALTH_UP, hon_protocol::VerticalSwingMode::MAX_UP,
hon_protocol::VerticalSwingMode::UP, hon_protocol::VerticalSwingMode::CENTER,
hon_protocol::VerticalSwingMode::DOWN, hon_protocol::VerticalSwingMode::MAX_DOWN,
hon_protocol::VerticalSwingMode::HEALTH_DOWN,
}

Definition at line 30 of file hon_climate.h.

◆ PROTOCOL_INITIALIZATION_INTERVAL

size_t esphome::haier::PROTOCOL_INITIALIZATION_INTERVAL = 10000
constexpr

Definition at line 18 of file haier_base.cpp.

◆ PROTOCOL_OUTDOOR_TEMPERATURE_OFFSET

int esphome::haier::PROTOCOL_OUTDOOR_TEMPERATURE_OFFSET = -64
constexpr

Definition at line 39 of file hon_climate.cpp.

◆ SIGNAL_LEVEL_UPDATE_INTERVAL_MS

size_t esphome::haier::SIGNAL_LEVEL_UPDATE_INTERVAL_MS = 10000
constexpr

Definition at line 38 of file hon_climate.cpp.

◆ STATUS_REQUEST_INTERVAL_MS

size_t esphome::haier::STATUS_REQUEST_INTERVAL_MS = 5000
constexpr

Definition at line 17 of file haier_base.cpp.

◆ ZERO_BUF

const uint8_t esphome::haier::ZERO_BUF[] = {0x00, 0x00}

Definition at line 44 of file hon_climate.cpp.