Go to the documentation of this file.
32 #include "IRsend_test.h"
112 #define HAIER_AC_MIN_TEMP kHaierAcMinTemp
113 #define HAIER_AC_DEF_TEMP kHaierAcDefTemp
114 #define HAIER_AC_MAX_TEMP kHaierAcMaxTemp
115 #define HAIER_AC_CMD_OFF kHaierAcCmdOff
116 #define HAIER_AC_CMD_ON kHaierAcCmdOn
117 #define HAIER_AC_CMD_MODE kHaierAcCmdMode
118 #define HAIER_AC_CMD_FAN kHaierAcCmdFan
119 #define HAIER_AC_CMD_TEMP_UP kHaierAcCmdTempUp
120 #define HAIER_AC_CMD_TEMP_DOWN kHaierAcCmdTempDown
121 #define HAIER_AC_CMD_SLEEP kHaierAcCmdSleep
122 #define HAIER_AC_CMD_TIMER_SET kHaierAcCmdTimerSet
123 #define HAIER_AC_CMD_TIMER_CANCEL kHaierAcCmdTimerCancel
124 #define HAIER_AC_CMD_HEALTH kHaierAcCmdHealth
125 #define HAIER_AC_CMD_SWINGV kHaierAcCmdSwing
126 #define HAIER_AC_SWINGV_OFF kHaierAcSwingVOff
127 #define HAIER_AC_SWINGV_UP kHaierAcSwingVUp
128 #define HAIER_AC_SWINGV_DOWN kHaierAcSwingVDown
129 #define HAIER_AC_SWINGV_CHG kHaierAcSwingVChg
130 #define HAIER_AC_AUTO kHaierAcAuto
131 #define HAIER_AC_COOL kHaierAcCool
132 #define HAIER_AC_DRY kHaierAcDry
133 #define HAIER_AC_HEAT kHaierAcHeat
134 #define HAIER_AC_FAN kHaierAcFan
135 #define HAIER_AC_FAN_AUTO kHaierAcFanAuto
136 #define HAIER_AC_FAN_LOW kHaierAcFanLow
137 #define HAIER_AC_FAN_MED kHaierAcFanMed
138 #define HAIER_AC_FAN_HIGH kHaierAcFanHigh
348 #define HAIER_AC_YRW02_SWING_OFF kHaierAcYrw02SwingOff
349 #define HAIER_AC_YRW02_SWING_TOP kHaierAcYrw02SwingTop
350 #define HAIER_AC_YRW02_SWING_MIDDLE kHaierAcYrw02SwingMiddle
351 #define HAIER_AC_YRW02_SWING_BOTTOM kHaierAcYrw02SwingBottom
352 #define HAIER_AC_YRW02_SWING_DOWN kHaierAcYrw02SwingDown
353 #define HAIER_AC_YRW02_SWING_AUTO kHaierAcYrw02SwingAuto
354 #define HAIER_AC_YRW02_FAN_HIGH kHaierAcYrw02FanHigh
355 #define HAIER_AC_YRW02_FAN_MED kHaierAcYrw02FanMed
356 #define HAIER_AC_YRW02_FAN_LOW kHaierAcYrw02FanLow
357 #define HAIER_AC_YRW02_FAN_AUTO kHaierAcYrw02FanAuto
358 #define HAIER_AC_YRW02_TURBO_OFF kHaierAcYrw02TurboOff
359 #define HAIER_AC_YRW02_AUTO kHaierAcYrw02Auto
360 #define HAIER_AC_YRW02_COOL kHaierAcYrw02Cool
361 #define HAIER_AC_YRW02_DRY kHaierAcYrw02Dry
362 #define HAIER_AC_YRW02_HEAT kHaierAcYrw02Heat
363 #define HAIER_AC_YRW02_FAN kHaierAcYrw02Fan
364 #define HAIER_AC_YRW02_BUTTON_TEMP_UP kHaierAcYrw02ButtonTempUp
365 #define HAIER_AC_YRW02_BUTTON_TEMP_DOWN kHaierAcYrw02ButtonTempDown
366 #define HAIER_AC_YRW02_BUTTON_SWING kHaierAcYrw02ButtonSwing
367 #define HAIER_AC_YRW02_BUTTON_FAN kHaierAcYrw02ButtonFan
368 #define HAIER_AC_YRW02_BUTTON_POWER kHaierAcYrw02ButtonPower
369 #define HAIER_AC_YRW02_BUTTON_MODE kHaierAcYrw02ButtonMode
370 #define HAIER_AC_YRW02_BUTTON_HEALTH kHaierAcYrw02ButtonHealth
371 #define HAIER_AC_YRW02_BUTTON_TURBO kHaierAcYrw02ButtonTurbo
372 #define HAIER_AC_YRW02_BUTTON_SLEEP kHaierAcYrw02ButtonSleep
378 explicit IRHaierAC(
const uint16_t pin,
const bool inverted =
false,
379 const bool use_modulation =
true);
387 #endif // SEND_HAIER_AC
394 void setTemp(
const uint8_t temp);
397 void setFan(
const uint8_t speed);
398 uint8_t
getFan(
void)
const;
401 void setMode(
const uint8_t mode);
421 void setRaw(
const uint8_t new_code[]);
449 explicit IRHaierAC176(
const uint16_t pin,
const bool inverted =
false,
450 const bool use_modulation =
true);
458 #endif // SEND_HAIER_AC176
470 void setTemp(
const uint8_t temp,
const bool fahrenheit =
false);
473 void setFan(
const uint8_t speed);
474 uint8_t
getFan(
void)
const;
477 void setMode(
const uint8_t mode);
515 virtual void setRaw(
const uint8_t new_code[]);
546 explicit IRHaierACYRW02(
const uint16_t pin,
const bool inverted =
false,
547 const bool use_modulation =
true);
548 #if SEND_HAIER_AC_YRW02
555 #endif // SEND_HAIER_AC_YRW02
556 void setRaw(
const uint8_t new_code[])
override;
558 const uint8_t state[],
565 explicit IRHaierAC160(
const uint16_t pin,
const bool inverted =
false,
566 const bool use_modulation =
true);
574 #endif // SEND_HAIER_AC160
583 void setTemp(
const uint8_t temp,
const bool fahrenheit =
false);
586 void setFan(
const uint8_t speed);
587 uint8_t
getFan(
void)
const;
590 void setMode(
const uint8_t mode);
628 virtual void setRaw(
const uint8_t new_code[]);
653 #endif // IR_HAIER_H_
bool getPower(void) const
Get the value of the current power setting.
Definition: ir_Haier.cpp:1694
void setOnTimer(const uint16_t mins)
Set the number of minutes of the On Timer setting.
Definition: ir_Haier.cpp:1856
bool getUseFahrenheit(void) const
Get the default temperature units in use.
Definition: ir_Haier.cpp:1595
const uint8_t kHaierAc160ButtonClean
Definition: ir_Haier.h:199
const uint8_t kHaierAcCmdFan
Definition: ir_Haier.h:82
void setButton(const uint8_t button)
Set the Button/Command setting of the A/C.
Definition: ir_Haier.cpp:623
const uint8_t kHaierAcFanHigh
Definition: ir_Haier.h:105
bool getLock(void) const
Get the Lock setting of the A/C.
Definition: ir_Haier.cpp:1020
uint8_t getSwingV(void) const
Get the Vertical Swing position setting of the A/C.
Definition: ir_Haier.cpp:1810
const uint16_t kHaierAcYrw02DefaultRepeat
Definition: IRremoteESP8266.h:1257
void begin(void)
Set up hardware to be able to send a message.
Definition: ir_Haier.cpp:561
const uint16_t kHaierAC160StateLength
Definition: IRremoteESP8266.h:1258
uint8_t AuxHeating
Definition: ir_Haier.h:298
int16_t getOffTimer(void) const
Get the Off Timer value/setting of the A/C.
Definition: ir_Haier.cpp:296
void on(void)
Change the power setting to On.
Definition: ir_Haier.cpp:1704
const uint8_t kHaierAcSwingVUp
Definition: ir_Haier.h:92
uint8_t getMode(void) const
Get the operating mode setting of the A/C.
Definition: ir_Haier.cpp:230
static uint8_t convertSwingV(const stdAc::swingv_t position)
Convert a stdAc::swingv_t enum into it's native setting.
Definition: ir_Haier.cpp:1955
uint16_t getOffTimer(void) const
Get the number of minutes of the Off Timer setting.
Definition: ir_Haier.cpp:1014
const uint8_t kHaierAcYrw02Fan
Definition: ir_Haier.h:183
uint8_t Sleep
Definition: ir_Haier.h:242
const uint16_t kHaierAcDefaultRepeat
Definition: IRremoteESP8266.h:1254
uint8_t raw[kHaierAC176StateLength]
The state in native form.
Definition: ir_Haier.h:210
const uint8_t kHaierAcYrw02FanMed
Definition: ir_Haier.h:175
const uint8_t kHaierAcYrw02SwingVTop
Definition: ir_Haier.h:152
const uint8_t kHaierAcAuto
Definition: ir_Haier.h:96
void setSwingV(const uint8_t pos)
Set the Vertical Swing mode of the A/C.
Definition: ir_Haier.cpp:1814
const uint8_t kHaierAcYrw02ButtonTurbo
Definition: ir_Haier.h:193
uint8_t Quiet
Definition: ir_Haier.h:235
int8_t calibrate(void)
Run the calibration to calculate uSec timing offsets for this platform.
Definition: ir_Haier.h:554
stdAc::state_t toCommon(const stdAc::state_t *prev=NULL) const
Convert the current internal state into its stdAc::state_t equivalent.
Definition: ir_Haier.cpp:2011
swingv_t
Common A/C settings for Vertical Swing.
Definition: IRsend.h:74
static bool validChecksum(const uint8_t state[], const uint16_t length=kHaierAC176StateLength)
Verify the checksum is valid for a given state.
Definition: ir_Haier.cpp:582
const uint8_t kHaierAcYrw02OnTimer
Definition: ir_Haier.h:204
const uint8_t kHaierAcYrw02OffThenOnTimer
Definition: ir_Haier.h:206
const uint16_t kHaierACStateLength
Definition: IRremoteESP8266.h:1252
static bool validChecksum(const uint8_t state[], const uint16_t length=kHaierACYRW02StateLength)
Verify the checksum is valid for a given state.
Definition: ir_Haier.cpp:1333
uint8_t getSwingV(void) const
Get the Vertical Swing position setting of the A/C.
Definition: ir_Haier.cpp:891
int8_t calibrate(void)
Run the calibration to calculate uSec timing offsets for this platform.
Definition: ir_Haier.h:573
const uint8_t kHaierAcCmdTempDown
Definition: ir_Haier.h:84
void setRaw(const uint8_t new_code[])
Set the internal state from a valid code for this protocol.
Definition: ir_Haier.cpp:162
uint8_t Mode
Definition: ir_Haier.h:308
void stateReset(void)
Reset the internal state to a fixed known good state.
Definition: ir_Haier.cpp:143
const uint8_t kHaierAcCmdMode
Definition: ir_Haier.h:81
fanspeed_t
Common A/C settings for Fan Speeds.
Definition: IRsend.h:61
const uint8_t kHaierAcYrw02ButtonHealth
Definition: ir_Haier.h:192
void off(void)
Change the power setting to Off.
Definition: ir_Haier.cpp:1707
const uint8_t kHaierAcYrw02SwingHMiddle
Definition: ir_Haier.h:167
uint16_t getCurrTime(void) const
Get the clock value of the A/C.
Definition: ir_Haier.cpp:306
void setQuiet(const bool on)
Set the Quiet setting of the A/C.
Definition: ir_Haier.cpp:1744
void setFan(const uint8_t speed)
Set the speed of the fan.
Definition: ir_Haier.cpp:193
uint8_t Fan
Definition: ir_Haier.h:231
void on(void)
Change the power setting to On.
Definition: ir_Haier.cpp:809
bool getTurbo(void) const
Get the Turbo setting of the A/C.
Definition: ir_Haier.cpp:827
uint8_t Mode
Definition: ir_Haier.h:238
const uint8_t kHaierAcCmdSleep
Definition: ir_Haier.h:85
void stateReset(void)
Reset the internal state to a fixed known good state.
Definition: ir_Haier.cpp:1513
void setMode(const uint8_t mode)
Set the operating mode of the A/C.
Definition: ir_Haier.cpp:671
static uint8_t convertFan(const stdAc::fanspeed_t speed)
Convert a stdAc::fanspeed_t enum into it's native speed.
Definition: ir_Haier.cpp:376
uint8_t getTimerMode(void) const
Get the Timer operating mode.
Definition: ir_Haier.cpp:1852
uint8_t OffTimerHrs
Definition: ir_Haier.h:230
const uint16_t kHaierAC176StateLength
Definition: IRremoteESP8266.h:1261
uint8_t Prefix
Definition: ir_Haier.h:41
uint16_t getOnTimer(void) const
Get the number of minutes of the On Timer setting.
Definition: ir_Haier.cpp:1880
uint16_t getOnTimer(void) const
Get the number of minutes of the On Timer setting.
Definition: ir_Haier.cpp:984
uint8_t getTemp(void) const
Get the current temperature setting.
Definition: ir_Haier.cpp:254
uint8_t Temp
Definition: ir_Haier.h:44
uint8_t getFan(void) const
Get the current fan speed setting.
Definition: ir_Haier.cpp:209
uint8_t Prefix
Definition: ir_Haier.h:330
uint8_t OnTimer
Definition: ir_Haier.h:52
const uint8_t kHaierAcYrw02Auto
Definition: ir_Haier.h:179
uint8_t ExtraDegreeF
Definition: ir_Haier.h:246
HaierAc176Protocol _
Definition: ir_Haier.h:539
uint8_t Health
Definition: ir_Haier.h:292
uint8_t * getRaw(void)
Get a PTR to the internal state/code for this protocol.
Definition: ir_Haier.cpp:155
const uint8_t kHaierAcCmdSwing
Definition: ir_Haier.h:89
bool getQuiet(void) const
Get the Quiet setting of the A/C.
Definition: ir_Haier.cpp:1739
void off(void)
Change the power setting to Off.
Definition: ir_Haier.cpp:812
uint8_t * getRaw(void)
Get a PTR to the internal state/code for this protocol.
Definition: ir_Haier.cpp:610
bool getUseFahrenheit(void) const
Get the default temperature units in use.
Definition: ir_Haier.cpp:701
const uint8_t kHaierAcSwingVChg
Definition: ir_Haier.h:94
void setTimerMode(const uint8_t setting)
Set the Timer operating mode.
Definition: ir_Haier.cpp:937
void setSleep(const bool on)
Set the Sleep setting of the A/C.
Definition: ir_Haier.cpp:820
static bool toCommonTurbo(const uint8_t speed)
void setSleep(const bool on)
Set the Sleep setting of the A/C.
Definition: ir_Haier.cpp:273
uint8_t getSwingH(void) const
Get the Horizontal Swing position setting of the A/C.
Definition: ir_Haier.cpp:917
uint8_t Power
Definition: ir_Haier.h:227
uint8_t CurrMins
Definition: ir_Haier.h:50
const uint8_t kHaierAcYrw02DefTempC
Definition: ir_Haier.h:144
uint8_t Prefix2
Definition: ir_Haier.h:259
void setUseFahrenheit(const bool on)
Set the default temperature units to use.
Definition: ir_Haier.cpp:697
int8_t calibrate(void)
Run the calibration to calculate uSec timing offsets for this platform.
Definition: ir_Haier.h:457
void setTemp(const uint8_t temp, const bool fahrenheit=false)
Set the temperature.
Definition: ir_Haier.cpp:706
uint8_t Mode
Definition: ir_Haier.h:62
void setLock(const bool on)
Set the Lock setting of the A/C.
Definition: ir_Haier.cpp:1024
String toString(void) const
Convert the current internal state into a human readable string.
Definition: ir_Haier.cpp:1168
bool getLock(void) const
Get the Lock setting of the A/C.
Definition: ir_Haier.cpp:1916
static bool toCommonTurbo(const uint8_t speed)
const uint8_t kHaierAcYrw02SwingVMiddle
Definition: ir_Haier.h:153
const uint8_t kHaierAcYrw02SwingVBottom
Definition: ir_Haier.h:154
uint8_t * getRaw(void)
Get a PTR to the internal state/code for this protocol.
Definition: ir_Haier.cpp:1526
void setSwingV(const uint8_t state)
Set the Vertical Swing mode of the A/C.
Definition: ir_Haier.cpp:347
static stdAc::swingv_t toCommonSwingV(const uint8_t pos)
Convert a stdAc::swingv_t enum into it's native setting.
Definition: ir_Haier.cpp:1114
void setTurbo(const bool on)
Set the Turbo setting of the A/C.
Definition: ir_Haier.cpp:1727
String toString(void) const
Convert the current internal state into a human readable string.
Definition: ir_Haier.cpp:468
const uint8_t kHaierAcCmdTimerSet
Definition: ir_Haier.h:86
void setMode(const uint8_t mode)
Set the operating mode of the A/C.
Definition: ir_Haier.cpp:220
const uint8_t kHaierAcCmdTempUp
Definition: ir_Haier.h:83
void cancelTimers(void)
Cancel/disable the On & Off timers.
Definition: ir_Haier.cpp:327
const uint8_t kHaierAc160Prefix
Definition: ir_Haier.h:149
uint8_t Sum
Definition: ir_Haier.h:328
const uint8_t kHaierAc160ButtonLight
Definition: ir_Haier.h:197
uint8_t OffTimerHrs
Definition: ir_Haier.h:300
Native representation of a Haier 160 bit A/C message.
Definition: ir_Haier.h:279
virtual void setRaw(const uint8_t new_code[])
Set the internal state from a valid code for this protocol.
Definition: ir_Haier.cpp:1533
Class for sending all basic IR protocols.
Definition: IRsend.h:237
bool getSleep(void) const
Get the Sleep setting of the A/C.
Definition: ir_Haier.cpp:816
IRsend _irsend
Instance of the IR send class.
Definition: ir_Haier.h:435
static uint8_t convertMode(const stdAc::opmode_t mode)
Convert a stdAc::opmode_t enum into its native mode.
Definition: ir_Haier.cpp:363
void checksum(void)
Calculate and set the checksum values for the internal state.
Definition: ir_Haier.cpp:572
int8_t calibrate(uint16_t hz=38000U)
Calculate & set any offsets to account for execution times during sending.
Definition: IRsend.cpp:207
bool getPower(void) const
Get the value of the current power setting.
Definition: ir_Haier.cpp:799
const uint8_t kHaierAcFanLow
Definition: ir_Haier.h:103
const uint8_t kHaierAcYrw02OffTimer
Definition: ir_Haier.h:203
void setTurbo(const bool on)
Set the Turbo setting of the A/C.
Definition: ir_Haier.cpp:832
const uint8_t kHaierAcYrw02SwingHRightMax
Definition: ir_Haier.h:171
uint8_t SwingV
Definition: ir_Haier.h:48
const uint8_t kHaierAc160SwingVHighest
Definition: ir_Haier.h:160
const uint8_t kHaierAcYrw02ModelA
Definition: ir_Haier.h:146
const uint8_t kHaierAc160SwingVHigh
Definition: ir_Haier.h:161
std::string String
Definition: IRremoteESP8266.h:1521
bool getHealth(void) const
Get the Health (filter) setting of the A/C.
Definition: ir_Haier.cpp:267
uint8_t OffTimerMins
Definition: ir_Haier.h:303
static bool validChecksum(const uint8_t state[], const uint16_t length=kHaierAC160StateLength)
bool getLightToggle(void) const
Get the value of the current Light toggle setting.
Definition: ir_Haier.cpp:1768
const uint8_t kHaierAcYrw02ButtonSleep
Definition: ir_Haier.h:194
void setFan(const uint8_t speed)
Set the speed of the fan.
Definition: ir_Haier.cpp:865
const uint8_t kHaierAcPrefix
Definition: ir_Haier.h:74
uint8_t OnTimerMins
Definition: ir_Haier.h:310
static uint8_t convertFan(const stdAc::fanspeed_t speed)
Convert a stdAc::fanspeed_t enum into it's native speed.
Definition: ir_Haier.cpp:1941
virtual void setRaw(const uint8_t new_code[])
Set the internal state from a valid code for this protocol.
Definition: ir_Haier.cpp:617
void begin(void)
Set up hardware to be able to send a message.
Definition: ir_Haier.cpp:1495
const uint8_t kHaierAcYrw02SwingVDown
Definition: ir_Haier.h:155
uint8_t getButton(void) const
Get the Button/Command setting of the A/C.
Definition: ir_Haier.cpp:1560
const uint16_t kHaierACYRW02StateLength
Definition: IRremoteESP8266.h:1255
Native representation of a Haier 176 bit A/C message.
Definition: ir_Haier.h:209
void setOnTimer(const uint16_t mins)
Set & enable the On Timer.
Definition: ir_Haier.cpp:310
void setPower(const bool on)
Change the power setting.
Definition: ir_Haier.cpp:803
void send(const uint16_t repeat=kHaierAcYrw02DefaultRepeat) override
Send the current internal state as an IR message.
Definition: ir_Haier.cpp:1318
const uint8_t kHaierAcYrw02MinTempF
Definition: ir_Haier.h:142
uint8_t Fan2
Definition: ir_Haier.h:337
static stdAc::fanspeed_t toCommonFanSpeed(const uint8_t speed)
Convert a native fan speed into its stdAc equivalent.
Definition: ir_Haier.cpp:1983
swingh_t
Common A/C settings for Horizontal Swing.
Definition: IRsend.h:100
uint8_t Fan2
Definition: ir_Haier.h:264
bool getHealth(void) const
Get the Health (filter) setting of the A/C.
Definition: ir_Haier.cpp:795
const uint8_t kHaierAcSwingVDown
Definition: ir_Haier.h:93
const uint8_t kHaierAcYrw02FanHigh
Definition: ir_Haier.h:174
const uint8_t kHaierAcFan
Definition: ir_Haier.h:100
const uint8_t kHaierAcYrw02FanLow
Definition: ir_Haier.h:176
const uint8_t kHaierAcYrw02MinTempC
Definition: ir_Haier.h:140
uint8_t Fan
Definition: ir_Haier.h:59
uint8_t getSwingV(void) const
Get the Vertical Swing position setting of the A/C.
Definition: ir_Haier.cpp:341
void setHealth(const bool on)
Set the Health (filter) setting of the A/C.
Definition: ir_Haier.cpp:788
const uint8_t kHaierAcCool
Definition: ir_Haier.h:97
uint8_t Model
Definition: ir_Haier.h:213
void setFan(const uint8_t speed)
Set the speed of the fan.
Definition: ir_Haier.cpp:1785
const uint8_t kHaierAcDefTemp
Definition: ir_Haier.h:77
void setHealth(const bool on)
Set the Health (filter) setting of the A/C.
Definition: ir_Haier.cpp:1799
uint8_t Button
Definition: ir_Haier.h:253
static uint8_t convertSwingV(const stdAc::swingv_t position)
Convert a stdAc::swingv_t enum into it's native setting.
Definition: ir_Haier.cpp:390
bool getSleep(void) const
Get the Sleep setting of the A/C.
Definition: ir_Haier.cpp:280
IRHaierAC160(const uint16_t pin, const bool inverted=false, const bool use_modulation=true)
Class constructor.
Definition: ir_Haier.cpp:1490
void setHealth(const bool on)
Set the Health (filter) setting of the A/C.
Definition: ir_Haier.cpp:260
uint8_t UseFahrenheit
Definition: ir_Haier.h:248
const uint8_t kHaierAcYrw02ButtonTempUp
Definition: ir_Haier.h:185
static bool toCommonQuiet(const uint8_t speed)
void setTimerMode(const uint8_t setting)
Set the Timer operating mode.
Definition: ir_Haier.cpp:1833
void setSwingH(const uint8_t pos)
Set the Horizontal Swing mode of the A/C.
Definition: ir_Haier.cpp:921
uint8_t Temp
Definition: ir_Haier.h:216
uint8_t TimerMode
Definition: ir_Haier.h:294
uint8_t SwingV
Definition: ir_Haier.h:285
static stdAc::opmode_t toCommonMode(const uint8_t mode)
Convert a native mode into its stdAc equivalent.
Definition: ir_Haier.cpp:1970
const uint8_t kHaierAcMinTemp
Definition: ir_Haier.h:76
const uint8_t kHaierAcYrw02ButtonSwingH
Definition: ir_Haier.h:188
static bool validChecksum(uint8_t state[], const uint16_t length=kHaierACStateLength)
Verify the checksum is valid for a given state.
Definition: ir_Haier.cpp:137
const uint8_t kHaierAcYrw02SwingVAuto
Definition: ir_Haier.h:156
uint8_t Quiet
Definition: ir_Haier.h:305
uint8_t Turbo
Definition: ir_Haier.h:304
uint8_t SwingV
Definition: ir_Haier.h:215
HaierProtocol _
Definition: ir_Haier.h:441
uint8_t getTemp(void) const
Get the current temperature setting. The unit of temperature is specified by UseFahrenheit value.
Definition: ir_Haier.cpp:743
uint8_t Health
Definition: ir_Haier.h:55
const uint16_t kHaierAc176DefaultRepeat
Definition: IRremoteESP8266.h:1263
uint8_t Lock
Definition: ir_Haier.h:325
uint16_t getOffTimer(void) const
Get the number of minutes of the Off Timer setting.
Definition: ir_Haier.cpp:1910
void setClean(const bool on)
Set the Clean setting of the A/C.
Definition: ir_Haier.cpp:1682
bool getSleep(void) const
Get the Sleep setting of the A/C.
Definition: ir_Haier.cpp:1711
static stdAc::fanspeed_t toCommonFanSpeed(const uint8_t speed)
Convert a native fan speed into its stdAc equivalent.
Definition: ir_Haier.cpp:1102
uint8_t Button
Definition: ir_Haier.h:324
bool getClean(void) const
Get the Clean setting of the A/C.
Definition: ir_Haier.cpp:1690
void stateReset(void)
Reset the internal state to a fixed known good state.
Definition: ir_Haier.cpp:597
static uint8_t convertFan(const stdAc::fanspeed_t speed)
Convert a stdAc::fanspeed_t enum into it's native speed.
Definition: ir_Haier.cpp:1045
static bool toCommonQuiet(const uint8_t speed)
uint8_t SwingH
Definition: ir_Haier.h:219
bool getTurbo(void) const
Get the Turbo setting of the A/C.
Definition: ir_Haier.cpp:1722
const uint8_t kHaierAcCmdHealth
Definition: ir_Haier.h:88
uint8_t unknown
Definition: ir_Haier.h:47
bool getAuxHeating(void) const
Get the value of the Aux Heating setting.
Definition: ir_Haier.cpp:1756
uint8_t CurrHours
Definition: ir_Haier.h:46
uint8_t remote_state[kHaierACStateLength]
< The state in native IR code form
Definition: ir_Haier.h:38
const uint8_t kHaierAc160SwingVMiddle
Definition: ir_Haier.h:162
uint8_t Health
Definition: ir_Haier.h:222
const uint8_t kHaierAcCmdOn
Definition: ir_Haier.h:80
uint8_t Sum
Definition: ir_Haier.h:257
void setSwingV(const uint8_t pos)
Set the Vertical Swing mode of the A/C.
Definition: ir_Haier.cpp:895
const uint8_t kHaierAcYrw02SwingHLeftMax
Definition: ir_Haier.h:168
uint8_t Sum2
Definition: ir_Haier.h:343
uint8_t getTimerMode(void) const
Get the Timer operating mode.
Definition: ir_Haier.cpp:956
uint8_t ExtraDegreeF
Definition: ir_Haier.h:316
const uint8_t kHaierAcYrw02SwingHRight
Definition: ir_Haier.h:170
uint8_t getButton(void) const
Get the Button/Command setting of the A/C.
Definition: ir_Haier.cpp:665
uint8_t OnTimerHrs
Definition: ir_Haier.h:237
const uint8_t kHaierAcYrw02ButtonSwingV
Definition: ir_Haier.h:187
const uint8_t kHaierAcYrw02ButtonLock
Definition: ir_Haier.h:196
uint8_t OnTimerHrs
Definition: ir_Haier.h:307
uint8_t Power
Definition: ir_Haier.h:297
const uint8_t kHaierAcSwingVOff
Definition: ir_Haier.h:91
void setAuxHeating(const bool on)
Change the Aux Heating setting.
Definition: ir_Haier.cpp:1760
static stdAc::opmode_t toCommonMode(const uint8_t mode)
Convert a native mode into its stdAc equivalent.
Definition: ir_Haier.cpp:1089
const uint8_t kHaierAcFanMed
Definition: ir_Haier.h:104
Class for handling detailed Haier 160 bit A/C messages.
Definition: ir_Haier.h:563
void setButton(const uint8_t button)
Set the Button/Command setting of the A/C.
Definition: ir_Haier.cpp:1539
const uint8_t kHaierAcYrw02ButtonCFAB
Definition: ir_Haier.h:200
uint8_t getFan(void) const
Get the current fan speed setting.
Definition: ir_Haier.cpp:861
uint8_t Turbo
Definition: ir_Haier.h:234
HaierAc160Protocol _
Definition: ir_Haier.h:650
const uint8_t kHaierAcYrw02ButtonTempDown
Definition: ir_Haier.h:186
IRsend _irsend
Instance of the IR send class.
Definition: ir_Haier.h:533
Class for handling detailed Haier A/C messages.
Definition: ir_Haier.h:376
const uint8_t kHaierAc160SwingVLowest
Definition: ir_Haier.h:164
uint8_t OnMins
Definition: ir_Haier.h:64
IRHaierAC176(const uint16_t pin, const bool inverted=false, const bool use_modulation=true)
Class constructor.
Definition: ir_Haier.cpp:556
void setOffTimer(const uint16_t mins)
Set the number of minutes of the Off Timer setting.
Definition: ir_Haier.cpp:990
void setOffTimer(const uint16_t mins)
Set & enable the Off Timer.
Definition: ir_Haier.cpp:319
uint8_t OnTimerMins
Definition: ir_Haier.h:240
const uint8_t kHaierAcYrw02FanAuto
Definition: ir_Haier.h:177
const uint8_t kHaierAc176Prefix
Definition: ir_Haier.h:148
const uint8_t kHaierAcMaxTemp
Definition: ir_Haier.h:78
const uint8_t kHaierAcYrw02ButtonFan
Definition: ir_Haier.h:189
const uint8_t kHaierAcYrw02Cool
Definition: ir_Haier.h:180
Class for handling detailed Haier 176 bit A/C messages.
Definition: ir_Haier.h:446
static uint8_t convertMode(const stdAc::opmode_t mode)
Convert a stdAc::opmode_t enum into its native mode.
Definition: ir_Haier.cpp:1928
const uint8_t kHaierAcYrw02ButtonTimer
Definition: ir_Haier.h:195
static stdAc::opmode_t toCommonMode(const uint8_t mode)
Convert a native mode into its stdAc equivalent.
Definition: ir_Haier.cpp:405
void setQuiet(const bool on)
Set the Quiet setting of the A/C.
Definition: ir_Haier.cpp:849
uint8_t UseFahrenheit
Definition: ir_Haier.h:319
uint8_t OffHours
Definition: ir_Haier.h:54
void setSwing(const uint8_t pos)
For backward compatibility. Use setSwingV() instead. Set the Vertical Swing mode of the A/C.
Definition: ir_Haier.cpp:887
const uint8_t kHaierAcFanAuto
Definition: ir_Haier.h:102
const uint8_t kHaierAc160SwingVAuto
Definition: ir_Haier.h:165
uint8_t Model
Definition: ir_Haier.h:283
const uint8_t kHaierAcYrw02SwingHLeft
Definition: ir_Haier.h:169
void checksum(void)
Calculate and set the checksum values for the internal state.
Definition: ir_Haier.cpp:1506
const uint8_t kHaierAcYrw02OnThenOffTimer
Definition: ir_Haier.h:205
const uint8_t kHaierAcCmdOff
Definition: ir_Haier.h:79
uint8_t Sleep
Definition: ir_Haier.h:65
uint8_t Temp
Definition: ir_Haier.h:286
void setOffTimer(const uint16_t mins)
Set the number of minutes of the Off Timer setting.
Definition: ir_Haier.cpp:1886
virtual void send(const uint16_t repeat=kHaierAc160DefaultRepeat)
Send the current internal state as an IR message.
Definition: ir_Haier.cpp:1500
const uint8_t kHaierAcYrw02SwingHAuto
Definition: ir_Haier.h:172
stdAc::state_t toCommon(void) const
Convert the current internal state into its stdAc::state_t equivalent.
Definition: ir_Haier.cpp:441
uint8_t getFan(void) const
Get the current fan speed setting.
Definition: ir_Haier.cpp:1781
void setRaw(const uint8_t new_code[]) override
Set the internal state from a valid code for this protocol.
Definition: ir_Haier.cpp:1325
static stdAc::swingh_t toCommonSwingH(const uint8_t pos)
Convert a stdAc::swingh_t enum into it's native setting.
Definition: ir_Haier.cpp:1128
friend class IRHaierACYRW02
Definition: ir_Haier.h:447
int16_t getOnTimer(void) const
Get the On Timer value/setting of the A/C.
Definition: ir_Haier.cpp:286
virtual void send(const uint16_t repeat=kHaierAc176DefaultRepeat)
Send the current internal state as an IR message.
Definition: ir_Haier.cpp:566
const uint8_t kHaierAcYrw02Heat
Definition: ir_Haier.h:182
const uint8_t kHaierAc160SwingVOff
Definition: ir_Haier.h:158
void checksum(void)
Calculate and set the checksum values for the internal state.
Definition: ir_Haier.cpp:129
void setCommand(const uint8_t command)
Set the Command/Button setting of the A/C.
Definition: ir_Haier.cpp:168
IRsend _irsend
Instance of the IR send class.
Definition: ir_Haier.h:644
int8_t calibrate(void)
Run the calibration to calculate uSec timing offsets for this platform.
Definition: ir_Haier.h:386
const uint8_t kHaierAc160SwingVTop
Definition: ir_Haier.h:159
const uint8_t kHaierAcYrw02MaxTempF
Definition: ir_Haier.h:143
const uint8_t kHaierAcSleepBit
Definition: ir_Haier.h:109
const uint8_t kHaierAcDry
Definition: ir_Haier.h:98
void setModel(const haier_ac176_remote_model_t model)
Set the model of the A/C to emulate.
Definition: ir_Haier.cpp:652
String toString(void) const
Convert the current internal state into a human readable string.
Definition: ir_Haier.cpp:2046
static uint8_t convertMode(const stdAc::opmode_t mode)
Convert a stdAc::opmode_t enum into its native mode.
Definition: ir_Haier.cpp:1032
uint8_t SwingH
Definition: ir_Haier.h:289
void setUseFahrenheit(const bool on)
Set the default temperature units to use.
Definition: ir_Haier.cpp:1591
void setLock(const bool on)
Set the Lock setting of the A/C.
Definition: ir_Haier.cpp:1920
void setLightToggle(const bool on)
Set the Light Toggle setting of the A/C.
Definition: ir_Haier.cpp:1775
static stdAc::swingv_t toCommonSwingV(const uint8_t pos)
Convert a stdAc::swingv_t enum into it's native setting.
Definition: ir_Haier.cpp:430
const uint8_t kHaierAcYrw02NoTimers
Definition: ir_Haier.h:202
const uint8_t kHaierAcYrw02ButtonMode
Definition: ir_Haier.h:191
const uint8_t kHaierAcHeat
Definition: ir_Haier.h:99
uint8_t getSwing(void) const
These functions are for backward compatibility. Use getSwingV() and setSwingV() instead.
Definition: ir_Haier.cpp:880
uint8_t Sleep
Definition: ir_Haier.h:312
void setPower(const bool on)
Change the power setting.
Definition: ir_Haier.cpp:1698
uint8_t Sum2
Definition: ir_Haier.h:274
Native representation of a Haier HSU07-HEA03 A/C message.
Definition: ir_Haier.h:36
void begin(void)
Set up hardware to be able to send a message.
Definition: ir_Haier.cpp:118
uint8_t getTemp(void) const
Get the current temperature setting. The unit of temperature is specified by UseFahrenheit value.
Definition: ir_Haier.cpp:1637
const uint16_t kHaierAcMaxTime
Definition: ir_Haier.h:107
void setTemp(const uint8_t temp, const bool fahrenheit=false)
Set the temperature.
Definition: ir_Haier.cpp:1600
void setCurrTime(const uint16_t mins)
Set the clock value for the A/C.
Definition: ir_Haier.cpp:335
uint8_t Lock
Definition: ir_Haier.h:254
Class for handling detailed Haier ACYRW02 A/C messages.
Definition: ir_Haier.h:544
IRHaierAC(const uint16_t pin, const bool inverted=false, const bool use_modulation=true)
Class constructor.
Definition: ir_Haier.cpp:113
void setTemp(const uint8_t temp)
Set the temperature.
Definition: ir_Haier.cpp:236
uint8_t getCommand(void) const
Get the Command/Button setting of the A/C.
Definition: ir_Haier.cpp:187
void setMode(const uint8_t mode)
Set the operating mode of the A/C.
Definition: ir_Haier.cpp:1564
const uint8_t kHaierAc160ButtonAuxHeating
Definition: ir_Haier.h:198
static stdAc::swingv_t toCommonSwingV(const uint8_t pos)
Convert a stdAc::swingv_t enum into it's native setting.
Definition: ir_Haier.cpp:1995
void setOnTimer(const uint16_t mins)
Set the number of minutes of the On Timer setting.
Definition: ir_Haier.cpp:960
bool getHealth(void) const
Get the Health (filter) setting of the A/C.
Definition: ir_Haier.cpp:1806
uint8_t Fan
Definition: ir_Haier.h:301
uint8_t getMode(void) const
Get the operating mode setting of the A/C.
Definition: ir_Haier.cpp:692
uint8_t TimerMode
Definition: ir_Haier.h:224
bool getQuiet(void) const
Get the Quiet setting of the A/C.
Definition: ir_Haier.cpp:844
const uint8_t kHaierAcYrw02Dry
Definition: ir_Haier.h:181
uint8_t OnHours
Definition: ir_Haier.h:61
uint8_t OffTimer
Definition: ir_Haier.h:51
Structure to hold a common A/C state.
Definition: IRsend.h:114
haier_ac176_remote_model_t getModel(void) const
Get/Detect the model of the A/C.
Definition: ir_Haier.cpp:643
uint8_t Clean2
Definition: ir_Haier.h:333
const uint8_t kHaierAc160SwingVLow
Definition: ir_Haier.h:163
const uint16_t kHaierAc160DefaultRepeat
Definition: IRremoteESP8266.h:1260
uint8_t Command
Definition: ir_Haier.h:43
const uint8_t kHaierAcYrw02SwingVOff
Definition: ir_Haier.h:151
static uint8_t convertSwingH(const stdAc::swingh_t position)
Convert a stdAc::swingh_t enum into it's native setting.
Definition: ir_Haier.cpp:1074
uint8_t OffMins
Definition: ir_Haier.h:58
uint8_t getMode(void) const
Get the operating mode setting of the A/C.
Definition: ir_Haier.cpp:1586
uint8_t Sum
Definition: ir_Haier.h:68
static stdAc::fanspeed_t toCommonFanSpeed(const uint8_t speed)
Convert a native fan speed into its stdAc equivalent.
Definition: ir_Haier.cpp:418
uint8_t raw[kHaierAC160StateLength]
The state in native form.
Definition: ir_Haier.h:280
const uint8_t kHaierAcYrw02ButtonPower
Definition: ir_Haier.h:190
const uint8_t kHaierAcYrw02ModelB
Definition: ir_Haier.h:147
void setSleep(const bool on)
Set the Sleep setting of the A/C.
Definition: ir_Haier.cpp:1715
uint8_t Clean
Definition: ir_Haier.h:318
const uint8_t kHaierAcYrw02MaxTempC
Definition: ir_Haier.h:141
stdAc::state_t toCommon(void) const
Convert the current internal state into its stdAc::state_t equivalent.
Definition: ir_Haier.cpp:1142
const uint8_t kHaierAcCmdTimerCancel
Definition: ir_Haier.h:87
uint8_t OffTimerMins
Definition: ir_Haier.h:233
static uint8_t convertSwingV(const stdAc::swingv_t position)
Convert a stdAc::swingv_t enum into it's native setting.
Definition: ir_Haier.cpp:1059
haier_ac176_remote_model_t
HAIER_AC176 A/C model numbers.
Definition: IRsend.h:163
opmode_t
Common A/C settings for A/C operating modes.
Definition: IRsend.h:49
void send(const uint16_t repeat=kHaierAcDefaultRepeat)
Send the current internal state as an IR message.
Definition: ir_Haier.cpp:123