Go to the documentation of this file.
32 #define __STDC_LIMIT_MACROS
40 #include "IRsend_test.h"
374 explicit IRHitachiAc(
const uint16_t pin,
const bool inverted =
false,
375 const bool use_modulation =
true);
384 #endif // SEND_HITACHI_AC
390 void setTemp(
const uint8_t temp);
392 void setFan(
const uint8_t speed);
393 uint8_t
getFan(
void)
const;
394 void setMode(
const uint8_t mode);
401 void setRaw(
const uint8_t new_code[],
431 explicit IRHitachiAc1(
const uint16_t pin,
const bool inverted =
false,
432 const bool use_modulation =
true);
442 #endif // SEND_HITACHI_AC1
452 void setTemp(
const uint8_t temp);
454 void setFan(
const uint8_t speed,
const bool force =
false);
455 uint8_t
getFan(
void)
const;
456 void setMode(
const uint8_t mode);
471 void setRaw(
const uint8_t new_code[],
501 explicit IRHitachiAc424(
const uint16_t pin,
const bool inverted =
false,
502 const bool use_modulation =
true);
504 #if SEND_HITACHI_AC424
511 #endif // SEND_HITACHI_AC424
517 void setTemp(
const uint8_t temp,
bool setPrevious =
true);
519 virtual void setFan(
const uint8_t speed);
520 uint8_t
getFan(
void)
const;
525 void setMode(
const uint8_t mode);
528 virtual void setRaw(
const uint8_t new_code[],
554 explicit IRHitachiAc3(
const uint16_t pin,
const bool inverted =
false,
555 const bool use_modulation =
true);
565 #endif // SEND_HITACHI_AC3
569 void setRaw(
const uint8_t new_code[],
588 explicit IRHitachiAc344(
const uint16_t pin,
const bool inverted =
false,
589 const bool use_modulation =
true);
591 void setRaw(
const uint8_t new_code[],
594 #if SEND_HITACHI_AC344
596 #endif // SEND_HITACHI_AC344
609 explicit IRHitachiAc264(
const uint16_t pin,
const bool inverted =
false,
610 const bool use_modulation =
true);
612 void setRaw(
const uint8_t new_code[],
614 void setFan(
const uint8_t speed)
override;
618 #if SEND_HITACHI_AC264
620 #endif // SEND_HITACHI_AC264
626 explicit IRHitachiAc296(
const uint16_t pin,
const bool inverted =
false,
627 const bool use_modulation =
true);
630 #if SEND_HITACHI_AC296
632 #endif // SEND_HITACHI_AC296
638 void setTemp(
const uint8_t temp);
640 void setFan(
const uint8_t speed);
641 uint8_t
getFan(
void)
const;
642 void setMode(
const uint8_t mode);
646 void setRaw(
const uint8_t new_code[],
667 #endif // IR_HITACHI_H_
void setPower(const bool on)
Change the power setting.
Definition: ir_Hitachi.cpp:1082
uint8_t _previoustemp
Definition: ir_Hitachi.h:548
const uint8_t kHitachiAc424Fan
Definition: ir_Hitachi.h:148
static uint8_t calcChecksum(const uint8_t state[], const uint16_t length=kHitachiAc1StateLength)
Calculate the checksum for a given state.
Definition: ir_Hitachi.cpp:456
uint8_t Mode
Definition: ir_Hitachi.h:50
const uint8_t kHitachiAc1Fan
Definition: ir_Hitachi.h:223
uint8_t * getRaw(void)
Get a PTR to the internal state/code for this protocol.
Definition: ir_Hitachi.cpp:1911
const uint8_t kHitachiAc344SwingHRightMax
Definition: ir_Hitachi.h:172
IRHitachiAc3(const uint16_t pin, const bool inverted=false, const bool use_modulation=true)
Class constructor.
Definition: ir_Hitachi.cpp:1368
void setMode(const uint8_t mode)
Set the operating mode of the A/C.
Definition: ir_Hitachi.cpp:1101
const uint8_t kHitachiAcMinTemp
Definition: ir_Hitachi.h:86
static stdAc::fanspeed_t toCommonFanSpeed(const uint8_t speed)
Convert a native fan speed into its stdAc equivalent.
Definition: ir_Hitachi.cpp:373
IRsend _irsend
Instance of the IR send class.
Definition: ir_Hitachi.h:539
void setTemp(const uint8_t temp, bool setPrevious=true)
Set the temperature.
Definition: ir_Hitachi.cpp:1126
const uint8_t kHitachiAcMaxTemp
Definition: ir_Hitachi.h:87
void setSleep(const uint8_t mode)
Set the Sleep setting of the A/C.
Definition: ir_Hitachi.cpp:690
void stateReset(void)
Reset the internal state to a fixed known good state.
Definition: ir_Hitachi.cpp:148
const uint8_t kHitachiAc264FanHigh
Definition: ir_Hitachi.h:296
void off(void)
Change the power setting to Off.
Definition: ir_Hitachi.cpp:1091
const uint8_t kHitachiAcAuto
Definition: ir_Hitachi.h:77
uint8_t Sleep
Definition: ir_Hitachi.h:207
void setRaw(const uint8_t new_code[], const uint16_t length=kHitachiAc296StateLength)
Set the internal state from a valid code for this protocol.
Definition: ir_Hitachi.cpp:1919
uint8_t raw[kHitachiAc296StateLength]
Definition: ir_Hitachi.h:301
uint8_t getTemp(void) const
Get the current temperature setting.
Definition: ir_Hitachi.cpp:593
IRsend _irsend
Instance of the IR send class.
Definition: ir_Hitachi.h:575
uint8_t pad0[10]
Definition: ir_Hitachi.h:48
const uint8_t kHitachiAc344ButtonFan
Definition: ir_Hitachi.h:136
Native representation of a Hitachi 224-bit A/C message.
Definition: ir_Hitachi.h:44
const uint8_t kHitachiAc1Model_A
Definition: ir_Hitachi.h:218
const uint8_t kHitachiAc344ButtonPowerMode
Definition: ir_Hitachi.h:135
uint8_t Power
Definition: ir_Hitachi.h:209
uint8_t Humidity
Definition: ir_Hitachi.h:340
void setFan(const uint8_t speed)
Set the speed of the fan.
Definition: ir_Hitachi.cpp:289
void setPowerToggle(const bool on)
Change the power toggle setting.
Definition: ir_Hitachi.cpp:553
static uint8_t convertSwingH(const stdAc::swingh_t position)
Convert a standard A/C horizontal swing into its native setting.
Definition: ir_Hitachi.cpp:1543
void checksum(const uint16_t length=kHitachiAc1StateLength)
Calculate and set the checksum values for the internal state.
Definition: ir_Hitachi.cpp:470
const uint16_t kHitachiAcStateLength
Definition: IRremoteESP8266.h:1264
String toString(void) const
Convert the current internal state into a human readable string.
Definition: ir_Hitachi.cpp:1952
const uint8_t kHitachiAc264ButtonSwingV
Definition: ir_Hitachi.h:286
void send(const uint16_t repeat=kHitachiAcDefaultRepeat) override
Create and send the IR message to the A/C.
Definition: ir_Hitachi.cpp:1635
bool getPower(void) const
Get the value of the current power setting.
Definition: ir_Hitachi.cpp:219
fanspeed_t
Common A/C settings for Fan Speeds.
Definition: IRsend.h:61
const uint8_t kHitachiAc344SwingHRight
Definition: ir_Hitachi.h:173
void begin(void)
Set up hardware to be able to send a message.
Definition: ir_Hitachi.cpp:1409
int8_t calibrate(void)
Run the calibration to calculate uSec timing offsets for this platform.
Definition: ir_Hitachi.h:564
uint8_t OnTimerLow
Definition: ir_Hitachi.h:202
void setSwingVertical(const bool on)
Set the Vertical Swing setting of the A/C.
Definition: ir_Hitachi.cpp:314
uint8_t getFan(void) const
Get the current fan speed setting.
Definition: ir_Hitachi.cpp:1873
uint8_t raw[kHitachiAc424StateLength]
The state in native code.
Definition: ir_Hitachi.h:92
void stateReset(void)
Reset the internal state to a fixed known good state.
Definition: ir_Hitachi.cpp:435
Native representation of a Hitachi 104-bit A/C message.
Definition: ir_Hitachi.h:180
const uint8_t kHitachiAc296FanMedium
Definition: ir_Hitachi.h:357
void send(const uint16_t repeat=kHitachiAcDefaultRepeat)
void setSwingHorizontal(const bool on)
Set the Horizontal Swing setting of the A/C.
Definition: ir_Hitachi.cpp:326
virtual void setFan(const uint8_t speed)
Set the speed of the fan.
Definition: ir_Hitachi.cpp:1146
uint8_t getMode(void) const
Get the operating mode setting of the A/C.
Definition: ir_Hitachi.cpp:1809
uint8_t getMode(void) const
Get the operating mode setting of the A/C.
Definition: ir_Hitachi.cpp:1095
uint8_t pad[3]
Definition: ir_Hitachi.h:184
bool getSwingHorizontal(void) const
Get the Horizontal Swing setting of the A/C.
Definition: ir_Hitachi.cpp:320
uint8_t SwingToggle
Definition: ir_Hitachi.h:206
const uint16_t kHitachiAc1StateLength
Definition: IRremoteESP8266.h:1267
void setSwingVToggle(const bool on)
Set the Vertical Swing toggle setting of the A/C.
Definition: ir_Hitachi.cpp:1192
const uint8_t kHitachiAc264Cool
Definition: ir_Hitachi.h:290
uint8_t Fan
Definition: ir_Hitachi.h:107
const uint8_t kHitachiAc1ChecksumStartByte
Definition: ir_Hitachi.h:245
uint8_t raw[kHitachiAc1StateLength]
The state in native code.
Definition: ir_Hitachi.h:181
const uint8_t kHitachiAc344FanHigh
Definition: ir_Hitachi.h:167
void setOnTimer(const uint16_t mins)
Set the On Timer time.
Definition: ir_Hitachi.cpp:703
const uint8_t kHitachiAcFanHigh
Definition: ir_Hitachi.h:85
uint8_t pad1[9]
Definition: ir_Hitachi.h:69
const uint8_t kHitachiAc1Sleep3
Definition: ir_Hitachi.h:242
const uint8_t kHitachiAc296MaxTemp
Definition: ir_Hitachi.h:363
hitachi_ac1_remote_model_t getModel(void) const
Get/Detect the model of the A/C.
Definition: ir_Hitachi.cpp:510
const uint8_t kHitachiAc1TimerSize
Definition: ir_Hitachi.h:237
uint8_t Fan
Definition: ir_Hitachi.h:327
const uint8_t kHitachiAc344Fan
Definition: ir_Hitachi.h:152
uint8_t Mode
Definition: ir_Hitachi.h:106
Class for handling detailed Hitachi 53-byte/424-bit A/C messages.
Definition: ir_Hitachi.h:497
void setInvertedStates(void)
Update the internal consistency check for the protocol.
Definition: ir_Hitachi.cpp:1047
IRHitachiAc1(const uint16_t pin, const bool inverted=false, const bool use_modulation=true)
Class constructor.
Definition: ir_Hitachi.cpp:430
void send(const uint16_t repeat=kHitachiAcDefaultRepeat)
Send the current internal state as an IR message.
Definition: ir_Hitachi.cpp:500
const uint8_t kHitachiAc1Sleep1
Definition: ir_Hitachi.h:240
const uint8_t kHitachiAc296PowerOn
Definition: ir_Hitachi.h:365
void send(const uint16_t repeat=kHitachiAcDefaultRepeat) override
Create and send the IR message to the A/C.
Definition: ir_Hitachi.cpp:1499
IRHitachiAc(const uint16_t pin, const bool inverted=false, const bool use_modulation=true)
Class constructor.
Definition: ir_Hitachi.cpp:143
uint8_t convertFan(const stdAc::fanspeed_t speed) const override
Convert a stdAc::fanspeed_t enum into it's native speed.
Definition: ir_Hitachi.cpp:1665
const uint16_t kHitachiAc264StateLength
Definition: IRremoteESP8266.h:1275
HitachiProtocol _
Definition: ir_Hitachi.h:422
const uint8_t kHitachiAc296AutoDehumidifying
Definition: ir_Hitachi.h:351
static stdAc::opmode_t toCommonMode(const uint8_t mode)
Convert a native mode into its stdAc equivalent.
Definition: ir_Hitachi.cpp:1843
uint8_t Temp
Definition: ir_Hitachi.h:307
static uint8_t convertMode(const stdAc::opmode_t mode)
Convert a stdAc::opmode_t enum into its native mode.
Definition: ir_Hitachi.cpp:1831
uint8_t SwingH
Definition: ir_Hitachi.h:211
const uint8_t kHitachiAc1Auto
Definition: ir_Hitachi.h:226
void setSwingV(const bool on)
Control the vertical swing setting.
Definition: ir_Hitachi.cpp:1513
const uint8_t kHitachiAc264ButtonFan
Definition: ir_Hitachi.h:283
const uint8_t kHitachiAc344MaxTemp
Definition: ir_Hitachi.h:145
const uint16_t kHitachiAc3StateLength
Definition: IRremoteESP8266.h:1271
uint8_t getTemp(void) const
Get the current temperature setting.
Definition: ir_Hitachi.cpp:259
hitachi_ac1_remote_model_t
HITACHI_AC1 A/C model numbers.
Definition: IRsend.h:169
int8_t calibrate(void)
Run the calibration to calculate uSec timing offsets for this platform.
Definition: ir_Hitachi.h:441
Native representation of a Hitachi 164-bit A/C message.
Definition: ir_Hitachi.h:249
const uint8_t kHitachiAc424ButtonSwingH
Definition: ir_Hitachi.h:134
uint8_t Power
Definition: ir_Hitachi.h:332
const uint8_t kHitachiAc424ButtonTempDown
Definition: ir_Hitachi.h:131
uint8_t pad0[13]
Definition: ir_Hitachi.h:304
uint8_t TimerActive
Definition: ir_Hitachi.h:334
Class for sending all basic IR protocols.
Definition: IRsend.h:237
void begin(void)
Set up hardware to be able to send a message.
Definition: ir_Hitachi.cpp:1783
const uint8_t kHitachiAc344SwingHAuto
Definition: ir_Hitachi.h:171
void setSwingH(const bool on)
Set the Horizontal Swing setting of the A/C.
Definition: ir_Hitachi.cpp:676
const uint8_t kHitachiAc344Heat
Definition: ir_Hitachi.h:155
Class for handling detailed Hitachi 224-bit A/C messages.
Definition: ir_Hitachi.h:372
int8_t calibrate(uint16_t hz=38000U)
Calculate & set any offsets to account for execution times during sending.
Definition: IRsend.cpp:207
const uint8_t kHitachiAc344SwingHLeftMax
Definition: ir_Hitachi.h:176
static bool validChecksum(const uint8_t state[], const uint16_t length=kHitachiAc1StateLength)
Verify the checksum is valid for a given state.
Definition: ir_Hitachi.cpp:478
static uint8_t convertMode(const stdAc::opmode_t mode)
Convert a stdAc::opmode_t enum into its native mode.
Definition: ir_Hitachi.cpp:734
uint8_t SwingV
Definition: ir_Hitachi.h:123
uint8_t Mode
Definition: ir_Hitachi.h:326
const uint8_t kHitachiAc1FanLow
Definition: ir_Hitachi.h:230
Class for handling detailed Hitachi 344-bit A/C messages.
Definition: ir_Hitachi.h:586
const uint8_t kHitachiAc424MinTemp
Definition: ir_Hitachi.h:142
const uint8_t kHitachiAc264ButtonTempUp
Definition: ir_Hitachi.h:285
String toString(void) const override
Convert the internal state into a human readable string.
Definition: ir_Hitachi.cpp:1580
Hitachi1Protocol _
Definition: ir_Hitachi.h:492
const uint8_t kHitachiAc344FanAuto
Definition: ir_Hitachi.h:168
void stateReset(void)
Reset the internal state to auto fan, heating, & 24° Celsius.
Definition: ir_Hitachi.cpp:1735
std::string String
Definition: IRremoteESP8266.h:1521
uint8_t Sum
Definition: ir_Hitachi.h:213
const uint8_t kHitachiAc1Model_B
Definition: ir_Hitachi.h:219
bool getSwingToggle(void) const
Get the Swing Toggle setting of the A/C.
Definition: ir_Hitachi.cpp:646
static uint8_t convertFan(const stdAc::fanspeed_t speed)
Convert a stdAc::fanspeed_t enum into it's native speed.
Definition: ir_Hitachi.cpp:346
virtual stdAc::fanspeed_t toCommonFanSpeed(const uint8_t speed) const
Convert a native fan speed into its stdAc equivalent.
Definition: ir_Hitachi.cpp:1251
uint8_t OffTimerHigh
Definition: ir_Hitachi.h:316
static uint8_t calcChecksum(const uint8_t state[], const uint16_t length=kHitachiAcStateLength)
Calculate the checksum for a given state.
Definition: ir_Hitachi.cpp:173
const uint8_t kHitachiAc1FanHigh
Definition: ir_Hitachi.h:228
static stdAc::fanspeed_t toCommonFanSpeed(const uint8_t speed)
Convert a native fan speed into its stdAc equivalent.
Definition: ir_Hitachi.cpp:1899
const uint8_t kHitachiAc424ButtonSwingV
Definition: ir_Hitachi.h:133
const uint8_t kHitachiAcDry
Definition: ir_Hitachi.h:80
void setButton(const uint8_t button)
Set the Button/Command pressed setting of the A/C.
Definition: ir_Hitachi.cpp:1184
Definition: ir_Hitachi.h:300
void setTemp(const uint8_t temp)
Set the temperature.
Definition: ir_Hitachi.cpp:1860
const uint8_t kHitachiAc1Sleep2
Definition: ir_Hitachi.h:241
const uint8_t kHitachiAc424ButtonTempUp
Definition: ir_Hitachi.h:132
const uint8_t kHitachiAc296MinTemp
Definition: ir_Hitachi.h:362
void stateReset(void)
Reset the internal state to a fixed known good state.
Definition: ir_Hitachi.cpp:1374
static uint8_t convertFan(const stdAc::fanspeed_t speed)
Convert a stdAc::fanspeed_t enum into it's native speed.
Definition: ir_Hitachi.cpp:1885
uint8_t OnTimerLow
Definition: ir_Hitachi.h:318
uint8_t * getRaw(void)
Get a PTR to the internal state/code for this protocol.
Definition: ir_Hitachi.cpp:1056
const uint8_t kHitachiAc424ButtonFan
Definition: ir_Hitachi.h:130
const uint8_t kHitachiAcFanAuto
Definition: ir_Hitachi.h:82
friend class IRHitachiAc264
Definition: ir_Hitachi.h:498
const uint8_t kHitachiAc344Dry
Definition: ir_Hitachi.h:154
IRHitachiAc296(const uint16_t pin, const bool inverted=false, const bool use_modulation=true)
Definition: ir_Hitachi.cpp:1730
Class for handling detailed Hitachi 15to27-byte/120to216-bit A/C messages.
Definition: ir_Hitachi.h:552
swingh_t
Common A/C settings for Horizontal Swing.
Definition: IRsend.h:100
void setModel(const hitachi_ac1_remote_model_t model)
Set the model of the A/C to emulate.
Definition: ir_Hitachi.cpp:519
Class for handling detailed Hitachi 264-bit A/C messages.
Definition: ir_Hitachi.h:607
const uint8_t kHitachiAc296DryCool
Definition: ir_Hitachi.h:347
const uint8_t kHitachiAc344FanLow
Definition: ir_Hitachi.h:165
const uint8_t kHitachiAc424FanMaxDry
Definition: ir_Hitachi.h:163
const uint8_t kHitachiAc424FanHigh
Definition: ir_Hitachi.h:160
uint8_t getFan(void) const
Get the current fan speed setting.
Definition: ir_Hitachi.cpp:610
uint8_t getFan(void) const
Get the current fan speed setting.
Definition: ir_Hitachi.cpp:1140
void setSwingToggle(const bool toggle)
Set the Swing toggle setting of the A/C.
Definition: ir_Hitachi.cpp:652
const uint8_t kHitachiAc264Heat
Definition: ir_Hitachi.h:292
virtual uint8_t convertFan(const stdAc::fanspeed_t speed) const
Convert a stdAc::fanspeed_t enum into it's native speed.
Definition: ir_Hitachi.cpp:1224
void off(void)
Change the power setting to Off.
Definition: ir_Hitachi.cpp:1805
Class for handling detailed Hitachi 104-bit A/C messages.
Definition: ir_Hitachi.h:429
void setPower(const bool on)
Change the power setting.
Definition: ir_Hitachi.cpp:1799
const uint8_t kHitachiAc344SwingHLeft
Definition: ir_Hitachi.h:175
uint8_t getSwingH(void) const
Get the current horizontal swing setting.
Definition: ir_Hitachi.cpp:1536
static stdAc::opmode_t toCommonMode(const uint8_t mode)
Convert a native mode into its stdAc equivalent.
Definition: ir_Hitachi.cpp:1238
void on(void)
Change the power setting to On.
Definition: ir_Hitachi.cpp:558
uint8_t Temp
Definition: ir_Hitachi.h:260
const uint8_t kHitachiAc1TempSize
Definition: ir_Hitachi.h:233
String toString(void) const override
Convert the internal state into a human readable string.
Definition: ir_Hitachi.cpp:1699
uint8_t Temp
Definition: ir_Hitachi.h:195
const uint8_t kHitachiAc296FanHigh
Definition: ir_Hitachi.h:358
uint8_t Power
Definition: ir_Hitachi.h:66
void on(void)
Change the power setting to On.
Definition: ir_Hitachi.cpp:1802
const uint8_t kHitachiAc296Heat
Definition: ir_Hitachi.h:349
bool getPower(void) const
Get the value of the current power setting.
Definition: ir_Hitachi.cpp:533
const uint8_t kHitachiAc264Fan
Definition: ir_Hitachi.h:289
const uint8_t kHitachiAc296CondensationControl
Definition: ir_Hitachi.h:353
uint8_t pad1[11]
Definition: ir_Hitachi.h:104
const uint8_t kHitachiAcFanMed
Definition: ir_Hitachi.h:84
void setTemp(const uint8_t temp)
Set the temperature.
Definition: ir_Hitachi.cpp:599
void setFan(const uint8_t speed)
Set the speed of the fan.
Definition: ir_Hitachi.cpp:1877
void setFan(const uint8_t speed) override
Set the speed of the fan.
Definition: ir_Hitachi.cpp:1649
void on(void)
Change the power setting to On.
Definition: ir_Hitachi.cpp:230
Definition: ir_Hitachi.h:624
void send(const uint16_t repeat=kHitachiAcDefaultRepeat)
Send the current internal state as an IR message.
Definition: ir_Hitachi.cpp:1788
static uint8_t convertMode(const stdAc::opmode_t mode)
Convert a stdAc::opmode_t enum into its native mode.
Definition: ir_Hitachi.cpp:333
void setRaw(const uint8_t new_code[], const uint16_t length=kHitachiAc264StateLength) override
Set the internal state from a valid code for this protocol.
Definition: ir_Hitachi.cpp:1643
uint8_t Power
Definition: ir_Hitachi.h:112
const uint8_t kHitachiAc264FanMin
Definition: ir_Hitachi.h:293
stdAc::state_t toCommon(void) const
Convert the current internal state into its stdAc::state_t equivalent.
Definition: ir_Hitachi.cpp:1926
static bool hasInvertedStates(const uint8_t state[], const uint16_t length)
Check if every second byte of the state, after the fixed header is inverted to the previous byte.
Definition: ir_Hitachi.cpp:1403
const uint16_t kHitachiAc424StateLength
Definition: IRremoteESP8266.h:1281
virtual stdAc::state_t toCommon(void) const
Convert the current internal state into its stdAc::state_t equivalent.
Definition: ir_Hitachi.cpp:1264
uint8_t remote_state[kHitachiAc3StateLength]
The state in native code.
Definition: ir_Hitachi.h:581
stdAc::state_t toCommon(void) const override
Convert the current internal state into its stdAc::state_t equivalent.
Definition: ir_Hitachi.cpp:1690
static stdAc::opmode_t toCommonMode(const uint8_t mode)
Convert a native mode into its stdAc equivalent.
Definition: ir_Hitachi.cpp:761
static bool hasInvertedStates(const uint8_t state[], const uint16_t length)
Check if every second byte of the state, after the fixed header is inverted to the previous byte.
Definition: ir_Hitachi.cpp:1777
void off(void)
Change the power setting to Off.
Definition: ir_Hitachi.cpp:233
const uint8_t kHitachiAc1Heat
Definition: ir_Hitachi.h:225
uint8_t raw[kHitachiAc264StateLength]
The state in native code.
Definition: ir_Hitachi.h:250
const uint16_t kHitachiAcFreq
Definition: ir_Hitachi.h:76
bool getSwingVertical(void) const
Get the Vertical Swing setting of the A/C.
Definition: ir_Hitachi.cpp:308
int8_t calibrate(void)
Run the calibration to calculate uSec timing offsets for this platform.
Definition: ir_Hitachi.h:510
const uint8_t kHitachiAcFanLow
Definition: ir_Hitachi.h:83
void stateReset(void) override
Reset the internal state to auto fan, cooling, 23° Celsius.
Definition: ir_Hitachi.cpp:1490
const uint8_t kHitachiAc344FanMin
Definition: ir_Hitachi.h:164
const uint8_t kHitachiAc424FanAuto
Definition: ir_Hitachi.h:161
void setRaw(const uint8_t new_code[], const uint16_t length=kHitachiAcStateLength)
Set the internal state from a valid code for this protocol.
Definition: ir_Hitachi.cpp:205
uint8_t pad1[10]
Definition: ir_Hitachi.h:264
uint8_t Mode
Definition: ir_Hitachi.h:266
const uint8_t kHitachiAc1FanMed
Definition: ir_Hitachi.h:229
bool getPower(void) const
Get the value of the current power setting.
Definition: ir_Hitachi.cpp:1795
const uint16_t kHitachiAc296StateLength
Definition: IRremoteESP8266.h:1277
void setPower(const bool on)
Change the power setting.
Definition: ir_Hitachi.cpp:539
uint8_t Button
Definition: ir_Hitachi.h:255
bool getSwingH(void) const
Get the Horizontal Swing setting of the A/C.
Definition: ir_Hitachi.cpp:670
stdAc::state_t toCommon(void) const
Convert the current internal state into its stdAc::state_t equivalent.
Definition: ir_Hitachi.cpp:785
IRHitachiAc424(const uint16_t pin, const bool inverted=false, const bool use_modulation=true)
Class constructor.
Definition: ir_Hitachi.cpp:1015
IRsend _irsend
Instance of the IR send class.
Definition: ir_Hitachi.h:657
const uint8_t kHitachiAc296PowerOff
Definition: ir_Hitachi.h:366
const uint8_t kHitachiAcCool
Definition: ir_Hitachi.h:79
const uint8_t kHitachiAc1Sleep4
Definition: ir_Hitachi.h:243
static stdAc::swingh_t toCommonSwingH(const uint8_t pos)
Convert a native horizontal swing postion to it's common equivalent.
Definition: ir_Hitachi.cpp:1557
void setRaw(const uint8_t new_code[], const uint16_t length=kHitachiAc1StateLength)
Set the internal state from a valid code for this protocol.
Definition: ir_Hitachi.cpp:493
const uint8_t kHitachiAcHeat
Definition: ir_Hitachi.h:78
const uint8_t kHitachiAc264MaxTemp
Definition: ir_Hitachi.h:288
void begin(void)
Set up hardware to be able to send a message.
Definition: ir_Hitachi.cpp:1052
friend class IRHitachiAc344
Definition: ir_Hitachi.h:499
const uint8_t kHitachiAc424MaxTemp
Definition: ir_Hitachi.h:143
void setInvertedStates(const uint16_t length=kHitachiAc3StateLength)
Invert every second byte of the internal state, after the fixed header.
Definition: ir_Hitachi.cpp:1394
String toString(void) const
Convert the current internal state into a human readable string.
Definition: ir_Hitachi.cpp:813
const uint16_t kHitachiAc344StateLength
Definition: IRremoteESP8266.h:1279
IRsend _irsend
Instance of the IR send class.
Definition: ir_Hitachi.h:416
void send(const uint16_t repeat=kHitachiAcDefaultRepeat)
Send the current internal state as an IR message.
Definition: ir_Hitachi.cpp:212
Hitachi424Protocol _
Definition: ir_Hitachi.h:545
void stateReset(void) override
Reset the internal state to auto fan, cooling, 23° Celsius.
Definition: ir_Hitachi.cpp:1626
const uint8_t kHitachiAc424FanTemp
Definition: ir_Hitachi.h:146
const uint8_t kHitachiAc1Cool
Definition: ir_Hitachi.h:224
uint8_t getFan(void) const
Get the current fan speed setting.
Definition: ir_Hitachi.cpp:285
uint8_t _previoustemp
Definition: ir_Hitachi.h:424
const uint8_t kHitachiAc1FanAuto
Definition: ir_Hitachi.h:227
void begin(void)
Set up hardware to be able to send a message.
Definition: ir_Hitachi.cpp:167
uint8_t pad2[4]
Definition: ir_Hitachi.h:277
uint8_t getTemp(void) const
Get the current temperature setting.
Definition: ir_Hitachi.cpp:1856
const uint8_t kHitachiAc264FanAuto
Definition: ir_Hitachi.h:297
uint16_t getOnTimer(void) const
Get the On Timer vtime of the A/C.
Definition: ir_Hitachi.cpp:711
const uint8_t kHitachiAc264ButtonPowerMode
Definition: ir_Hitachi.h:282
bool getPower(void) const
Get the value of the current power setting.
Definition: ir_Hitachi.cpp:1078
const uint8_t kHitachiAc424FanMin
Definition: ir_Hitachi.h:157
uint8_t Temp
Definition: ir_Hitachi.h:102
virtual void stateReset(void)
Reset the internal state to a fixed known good state.
Definition: ir_Hitachi.cpp:1021
const uint8_t kHitachiAc344FanMax
Definition: ir_Hitachi.h:169
uint8_t Temp
Definition: ir_Hitachi.h:52
IRsend _irsend
Instance of the IR send class.
Definition: ir_Hitachi.h:486
uint8_t pad1[6]
Definition: ir_Hitachi.h:337
const uint8_t kHitachiAc296Cool
Definition: ir_Hitachi.h:346
bool getSwingV(void) const
Get the current vertical swing setting.
Definition: ir_Hitachi.cpp:1520
const uint8_t kHitachiAc424Dry
Definition: ir_Hitachi.h:150
void setSwingH(const uint8_t position)
Control the horizontal swing setting.
Definition: ir_Hitachi.cpp:1526
void setMode(const uint8_t mode)
Set the operating mode of the A/C.
Definition: ir_Hitachi.cpp:1813
uint8_t pad2[7]
Definition: ir_Hitachi.h:115
void setMode(const uint8_t mode)
Set the operating mode of the A/C.
Definition: ir_Hitachi.cpp:571
uint16_t getOffTimer(void) const
Get the Off Timer vtime of the A/C.
Definition: ir_Hitachi.cpp:726
const uint16_t kHitachiAcDefaultRepeat
Definition: IRremoteESP8266.h:1266
uint8_t Fan
Definition: ir_Hitachi.h:191
uint8_t OnTimerActive
Definition: ir_Hitachi.h:322
const uint8_t kHitachiAc344SwingHMiddle
Definition: ir_Hitachi.h:174
void checksum(const uint16_t length=kHitachiAcStateLength)
Calculate and set the checksum values for the internal state.
Definition: ir_Hitachi.cpp:182
static uint8_t convertMode(const stdAc::opmode_t mode)
Convert a stdAc::opmode_t enum into its native mode.
Definition: ir_Hitachi.cpp:1211
uint8_t Fan
Definition: ir_Hitachi.h:56
void setInvertedStates(void)
Update the internal consistency check for the protocol.
Definition: ir_Hitachi.cpp:1768
uint8_t getMode(void) const
Get the operating mode setting of the A/C.
Definition: ir_Hitachi.cpp:565
void setFan(const uint8_t speed, const bool force=false)
Set the speed of the fan.
Definition: ir_Hitachi.cpp:617
static uint8_t convertFan(const stdAc::fanspeed_t speed)
Convert a stdAc::fanspeed_t enum into it's native speed.
Definition: ir_Hitachi.cpp:747
stdAc::state_t toCommon(void) const
Convert the current internal state into its stdAc::state_t equivalent.
Definition: ir_Hitachi.cpp:385
void setSwingV(const bool on)
Set the Vertical Swing setting of the A/C.
Definition: ir_Hitachi.cpp:664
uint8_t SwingV
Definition: ir_Hitachi.h:59
uint8_t OffTimerHigh
Definition: ir_Hitachi.h:200
String toString(void) const
Convert the current internal state into a human readable string.
Definition: ir_Hitachi.cpp:411
static bool validChecksum(const uint8_t state[], const uint16_t length=kHitachiAcStateLength)
Verify the checksum is valid for a given state.
Definition: ir_Hitachi.cpp:190
const uint8_t kHitachiAc424FanMedium
Definition: ir_Hitachi.h:159
bool getSwingV(void) const
Get the Vertical Swing setting of the A/C.
Definition: ir_Hitachi.cpp:658
const uint8_t kHitachiAc344ButtonTempUp
Definition: ir_Hitachi.h:138
stdAc::state_t toCommon(void) const override
Convert the current internal state into its stdAc::state_t equivalent.
Definition: ir_Hitachi.cpp:1570
const uint8_t kHitachiAc296FanLow
Definition: ir_Hitachi.h:356
static stdAc::opmode_t toCommonMode(const uint8_t mode)
Convert a native mode into its stdAc equivalent.
Definition: ir_Hitachi.cpp:360
const uint8_t kHitachiAc296TempAuto
Definition: ir_Hitachi.h:361
const uint8_t kHitachiAc424Cool
Definition: ir_Hitachi.h:149
const uint8_t kHitachiAc296QuickLaundry
Definition: ir_Hitachi.h:352
void setRaw(const uint8_t new_code[], const uint16_t length=kHitachiAc3StateLength)
Set the internal state from a valid code for this protocol.
Definition: ir_Hitachi.cpp:1421
const uint8_t kHitachiAcFan
Definition: ir_Hitachi.h:81
uint8_t * getRaw(void)
Get a PTR to the internal state/code for this protocol.
Definition: ir_Hitachi.cpp:1413
uint8_t Sum
Definition: ir_Hitachi.h:71
void begin(void)
Set up hardware to be able to send a message.
Definition: ir_Hitachi.cpp:450
bool getPowerToggle(void) const
Get the value of the current power toggle setting.
Definition: ir_Hitachi.cpp:547
uint8_t * getRaw(void)
Get a PTR to the internal state/code for this protocol.
Definition: ir_Hitachi.cpp:197
stdAc::fanspeed_t toCommonFanSpeed(const uint8_t speed) const override
Convert a native fan speed into its stdAc equivalent.
Definition: ir_Hitachi.cpp:1679
void setOffTimer(const uint16_t mins)
Set the Off Timer time.
Definition: ir_Hitachi.cpp:718
uint8_t Mode
Definition: ir_Hitachi.h:192
static stdAc::fanspeed_t toCommonFanSpeed(const uint8_t speed)
Convert a native fan speed into its stdAc equivalent.
Definition: ir_Hitachi.cpp:774
uint8_t OnTimerHigh
Definition: ir_Hitachi.h:320
uint8_t Model
Definition: ir_Hitachi.h:187
const uint8_t kHitachiAc264ButtonTempDown
Definition: ir_Hitachi.h:284
uint8_t OnTimerHigh
Definition: ir_Hitachi.h:204
const uint8_t kHitachiAc296FanSilent
Definition: ir_Hitachi.h:355
uint8_t getSleep(void) const
Get the Sleep setting of the A/C.
Definition: ir_Hitachi.cpp:683
virtual void send(const uint16_t repeat=kHitachiAcDefaultRepeat)
Send the current internal state as an IR message.
Definition: ir_Hitachi.cpp:1071
const uint8_t kHitachiAc344ButtonSwingH
Definition: ir_Hitachi.h:140
void setPower(const bool on)
Change the power setting.
Definition: ir_Hitachi.cpp:225
uint8_t OffTimerActive
Definition: ir_Hitachi.h:321
const uint8_t kHitachiAc296FanAuto
Definition: ir_Hitachi.h:359
uint8_t getMode(void) const
Get the operating mode setting of the A/C.
Definition: ir_Hitachi.cpp:237
const uint8_t kHitachiAc296Dehumidify
Definition: ir_Hitachi.h:348
uint8_t SwingV
Definition: ir_Hitachi.h:210
virtual void setRaw(const uint8_t new_code[], const uint16_t length=kHitachiAc424StateLength)
Set the internal state from a valid code for this protocol.
Definition: ir_Hitachi.cpp:1064
void setRaw(const uint8_t new_code[], const uint16_t length=kHitachiAc344StateLength) override
Set the internal state from a valid code for this protocol.
Definition: ir_Hitachi.cpp:1507
const uint8_t kHitachiAc424FanLow
Definition: ir_Hitachi.h:158
uint8_t PowerToggle
Definition: ir_Hitachi.h:208
const uint8_t kHitachiAcAutoTemp
Definition: ir_Hitachi.h:88
Native representation of a Hitachi 53-byte/424-bit A/C message.
Definition: ir_Hitachi.h:91
int8_t calibrate(void)
Run the calibration to calculate uSec timing offsets for this platform.
Definition: ir_Hitachi.h:383
const uint8_t kHitachiAc344FanMedium
Definition: ir_Hitachi.h:166
const uint8_t kHitachiAc1Dry
Definition: ir_Hitachi.h:222
uint8_t Power
Definition: ir_Hitachi.h:272
const uint8_t kHitachiAc344Cool
Definition: ir_Hitachi.h:153
const uint8_t kHitachiAc424FanMax
Definition: ir_Hitachi.h:162
uint8_t OffTimerLow
Definition: ir_Hitachi.h:314
uint8_t getTemp(void) const
Get the current temperature setting.
Definition: ir_Hitachi.cpp:1119
const uint8_t kHitachiAc424Heat
Definition: ir_Hitachi.h:151
void setMode(const uint8_t mode)
Set the operating mode of the A/C.
Definition: ir_Hitachi.cpp:241
uint8_t raw[kHitachiAcStateLength]
The state in native code.
Definition: ir_Hitachi.h:45
uint8_t SwingH
Definition: ir_Hitachi.h:62
uint8_t Button
Definition: ir_Hitachi.h:97
const uint8_t kHitachiAc296Auto
Definition: ir_Hitachi.h:350
uint8_t OffTimerLow
Definition: ir_Hitachi.h:198
bool getSwingVToggle(void) const
Get the Vertical Swing toggle setting of the A/C.
Definition: ir_Hitachi.cpp:1204
Structure to hold a common A/C state.
Definition: IRsend.h:114
const uint8_t kHitachiAc344ButtonTempDown
Definition: ir_Hitachi.h:137
const uint8_t kHitachiAc424ButtonPowerMode
Definition: ir_Hitachi.h:129
const uint8_t kHitachiAc1TempAuto
Definition: ir_Hitachi.h:235
const uint8_t kHitachiAc344MinTemp
Definition: ir_Hitachi.h:144
const uint8_t kHitachiAc264Dry
Definition: ir_Hitachi.h:291
const uint8_t kHitachiAc1TempDelta
Definition: ir_Hitachi.h:234
uint8_t Fan
Definition: ir_Hitachi.h:267
void on(void)
Change the power setting to On.
Definition: ir_Hitachi.cpp:1088
uint8_t getButton(void) const
Get the Button/Command setting of the A/C.
Definition: ir_Hitachi.cpp:1178
void off(void)
Change the power setting to Off.
Definition: ir_Hitachi.cpp:561
String _toString(void) const
Convert the internal state into a human readable string for the settings that are common to protocols...
Definition: ir_Hitachi.cpp:1292
uint8_t * getRaw(void)
Get a PTR to the internal state/code for this protocol.
Definition: ir_Hitachi.cpp:485
HitachiAC296Protocol _
Definition: ir_Hitachi.h:664
const uint8_t kHitachiAc344ButtonSwingV
Definition: ir_Hitachi.h:139
const uint8_t kHitachiAc1SleepOff
Definition: ir_Hitachi.h:239
uint8_t pad0[11]
Definition: ir_Hitachi.h:253
void setTemp(const uint8_t temp)
Set the temperature.
Definition: ir_Hitachi.cpp:265
const uint8_t kHitachiAc264FanMedium
Definition: ir_Hitachi.h:295
const uint8_t kHitachiAc264MinTemp
Definition: ir_Hitachi.h:287
uint8_t SwingH
Definition: ir_Hitachi.h:117
const uint8_t kHitachiAc264FanLow
Definition: ir_Hitachi.h:294
uint8_t pad0[11]
Definition: ir_Hitachi.h:95
virtual String toString(void) const
Convert the internal state into a human readable string.
Definition: ir_Hitachi.cpp:1333
opmode_t
Common A/C settings for A/C operating modes.
Definition: IRsend.h:49