ESPHome  2024.2.0
Namespaces | Data Structures | Enumerations | Functions | Variables
esphome::haier Namespace Reference

Namespaces

 hon_protocol
 
 smartair2_protocol
 

Data Structures

class  BeeperOffAction
 
class  BeeperOnAction
 
class  DisplayOffAction
 
class  DisplayOnAction
 
class  HaierAlarmEndTrigger
 
class  HaierAlarmStartTrigger
 
class  HaierClimateBase
 
class  HealthOffAction
 
class  HealthOnAction
 
class  HonClimate
 
class  HorizontalAirflowAction
 
class  PowerOffAction
 
class  PowerOnAction
 
class  PowerToggleAction
 
class  Smartair2Climate
 
class  StartSelfCleaningAction
 
class  StartSteriCleaningAction
 
class  VerticalAirflowAction
 

Enumerations

enum  ActionRequest : uint8_t {
  ActionRequest::SEND_CUSTOM_COMMAND = 0, ActionRequest::TURN_POWER_ON = 1, ActionRequest::TURN_POWER_OFF = 2, ActionRequest::TOGGLE_POWER = 3,
  ActionRequest::START_SELF_CLEAN = 4, ActionRequest::START_STERI_CLEAN = 5
}
 
enum  AirflowVerticalDirection : uint8_t {
  AirflowVerticalDirection::HEALTH_UP = 0, AirflowVerticalDirection::MAX_UP = 1, AirflowVerticalDirection::UP = 2, AirflowVerticalDirection::CENTER = 3,
  AirflowVerticalDirection::DOWN = 4, AirflowVerticalDirection::HEALTH_DOWN = 5
}
 
enum  AirflowHorizontalDirection : uint8_t {
  AirflowHorizontalDirection::MAX_LEFT = 0, AirflowHorizontalDirection::LEFT = 1, AirflowHorizontalDirection::CENTER = 2, AirflowHorizontalDirection::RIGHT = 3,
  AirflowHorizontalDirection::MAX_RIGHT = 4
}
 
enum  CleaningState : uint8_t { CleaningState::NO_CLEANING = 0, CleaningState::SELF_CLEAN = 1, CleaningState::STERI_CLEAN = 2 }
 
enum  HonControlMethod { HonControlMethod::MONITOR_ONLY = 0, HonControlMethod::SET_GROUP_PARAMETERS, HonControlMethod::SET_SINGLE_PARAMETER }
 

Functions

bool check_timeout (std::chrono::steady_clock::time_point now, std::chrono::steady_clock::time_point tpoint, size_t timeout)
 
hon_protocol::VerticalSwingMode get_vertical_swing_mode (AirflowVerticalDirection direction)
 
hon_protocol::HorizontalSwingMode get_horizontal_swing_mode (AirflowHorizontalDirection direction)
 
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 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
 
constexpr uint8_t INIT_REQUESTS_RETRY = 2
 
constexpr std::chrono::milliseconds INIT_REQUESTS_RETRY_INTERVAL = std::chrono::milliseconds(2000)
 

Enumeration Type Documentation

◆ ActionRequest

enum 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 13 of file haier_base.h.

◆ AirflowHorizontalDirection

Enumerator
MAX_LEFT 
LEFT 
CENTER 
RIGHT 
MAX_RIGHT 

Definition at line 20 of file hon_climate.h.

◆ AirflowVerticalDirection

Enumerator
HEALTH_UP 
MAX_UP 
UP 
CENTER 
DOWN 
HEALTH_DOWN 

Definition at line 11 of file hon_climate.h.

◆ CleaningState

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

Definition at line 28 of file hon_climate.h.

◆ HonControlMethod

Enumerator
MONITOR_ONLY 
SET_GROUP_PARAMETERS 
SET_SINGLE_PARAMETER 

Definition at line 34 of file hon_climate.h.

Function Documentation

◆ 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 47 of file haier_base.cpp.

◆ esphome_logger()

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

Definition at line 7 of file logger_handler.cpp.

◆ get_horizontal_swing_mode()

hon_protocol::HorizontalSwingMode esphome::haier::get_horizontal_swing_mode ( AirflowHorizontalDirection  direction)

Definition at line 38 of file hon_climate.cpp.

◆ get_vertical_swing_mode()

hon_protocol::VerticalSwingMode esphome::haier::get_vertical_swing_mode ( AirflowVerticalDirection  direction)

Definition at line 21 of file hon_climate.cpp.

◆ init_haier_protocol_logging()

void esphome::haier::init_haier_protocol_logging ( )

Definition at line 30 of file logger_handler.cpp.

Variable Documentation

◆ ALARM_STATUS_REQUEST_INTERVAL_MS

constexpr size_t esphome::haier::ALARM_STATUS_REQUEST_INTERVAL_MS = 600000

Definition at line 19 of file hon_climate.cpp.

◆ COMMUNICATION_TIMEOUT_MS

constexpr size_t esphome::haier::COMMUNICATION_TIMEOUT_MS = 60000

Definition at line 17 of file haier_base.cpp.

◆ CONTROL_MESSAGE_RETRIES

constexpr uint8_t esphome::haier::CONTROL_MESSAGE_RETRIES = 5

Definition at line 17 of file hon_climate.cpp.

◆ CONTROL_MESSAGE_RETRIES_INTERVAL

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

Definition at line 18 of file hon_climate.cpp.

◆ CONTROL_MESSAGES_INTERVAL_MS

constexpr size_t esphome::haier::CONTROL_MESSAGES_INTERVAL_MS = 400

Definition at line 21 of file haier_base.cpp.

◆ DEFAULT_MESSAGES_INTERVAL_MS

constexpr size_t esphome::haier::DEFAULT_MESSAGES_INTERVAL_MS = 2000

Definition at line 20 of file haier_base.cpp.

◆ INIT_REQUESTS_RETRY

constexpr uint8_t esphome::haier::INIT_REQUESTS_RETRY = 2

Definition at line 17 of file smartair2_climate.cpp.

◆ INIT_REQUESTS_RETRY_INTERVAL

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

Definition at line 18 of file smartair2_climate.cpp.

◆ PROTOCOL_INITIALIZATION_INTERVAL

constexpr size_t esphome::haier::PROTOCOL_INITIALIZATION_INTERVAL = 10000

Definition at line 19 of file haier_base.cpp.

◆ PROTOCOL_OUTDOOR_TEMPERATURE_OFFSET

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

Definition at line 16 of file hon_climate.cpp.

◆ SIGNAL_LEVEL_UPDATE_INTERVAL_MS

constexpr size_t esphome::haier::SIGNAL_LEVEL_UPDATE_INTERVAL_MS = 10000

Definition at line 15 of file hon_climate.cpp.

◆ STATUS_REQUEST_INTERVAL_MS

constexpr size_t esphome::haier::STATUS_REQUEST_INTERVAL_MS = 5000

Definition at line 18 of file haier_base.cpp.