Go to the documentation of this file.
20 #include "IRsend_test.h"
72 explicit IRKelonAc(uint16_t pin,
bool inverted =
false,
73 bool use_modulation =
true);
102 void setTemp(
const uint8_t degrees);
106 void setFan(
const uint8_t speed);
108 uint8_t
getFan(
void)
const;
114 void setMode(
const uint8_t mode);
138 uint64_t
getRaw(
void)
const;
140 void setRaw(
const uint64_t new_code);
170 #endif // IR_KELON_H_
uint8_t getMode(void) const
Get the current operation mode setting.
Definition: ir_Kelon.cpp:263
bool getSleep(void) const
Is the sleep setting on?
Definition: ir_Kelon.cpp:287
void ensurePower(const bool on)
Since the AC does not support actually setting the power state to a known value, this utility allow e...
Definition: ir_Kelon.cpp:128
void setRaw(const uint64_t new_code)
Set the raw state of the object.
Definition: ir_Kelon.cpp:366
uint8_t _previousMode
Definition: ir_Kelon.h:165
const uint8_t kKelonFanAuto
Definition: ir_Kelon.h:56
uint8_t Fan
Definition: ir_Kelon.h:32
fanspeed_t
Common A/C settings for Fan Speeds.
Definition: IRsend.h:58
uint8_t Mode
Definition: ir_Kelon.h:37
uint8_t SuperCoolEnabled2
Definition: ir_Kelon.h:46
uint64_t getRaw(void) const
Get the raw state of the object, suitable to be sent with the appropriate IRsend object method.
Definition: ir_Kelon.cpp:360
const int8_t kKelonDryGradeMin
Definition: ir_Kelon.h:64
void setToggleSwingVertical(const bool toggle)
Request toggling the vertical swing - will be reset to false after sending.
Definition: ir_Kelon.cpp:269
uint8_t preamble[2]
Definition: ir_Kelon.h:31
int8_t calibrate(void)
Run the calibration to calculate uSec timing offsets for this platform.
Definition: ir_Kelon.h:85
uint8_t TimerEnabled
Definition: ir_Kelon.h:38
const uint8_t kKelonMaxTemp
Definition: ir_Kelon.h:67
String toString(void) const
Convert the internal settings into a human readable string.
Definition: ir_Kelon.cpp:474
Class for sending all basic IR protocols.
Definition: IRsend.h:208
uint64_t raw
Definition: ir_Kelon.h:28
int8_t calibrate(uint16_t hz=38000U)
Calculate & set any offsets to account for execution times during sending.
Definition: IRsend.cpp:207
bool getToggleSwingVertical(void) const
Get whether the swing mode is set to be toggled.
Definition: ir_Kelon.cpp:275
void begin(void)
Set up hardware to be able to send a message.
Definition: ir_Kelon.cpp:154
Definition: ir_Kelon.h:70
const uint8_t kKelonFanMedium
Definition: ir_Kelon.h:61
std::string String
Definition: IRremoteESP8266.h:1309
const uint8_t kKelonModeSmart
Definition: ir_Kelon.h:52
void stateReset(void)
Reset the internals of the object to a known good state.
Definition: ir_Kelon.cpp:102
const uint8_t kKelonModeDry
Definition: ir_Kelon.h:54
void setFan(const uint8_t speed)
Set the speed of the fan.
Definition: ir_Kelon.cpp:187
void send(const uint16_t repeat=kNoRepeat)
Send the current internal state as an IR message.
Definition: ir_Kelon.cpp:112
uint8_t PowerToggle
Definition: ir_Kelon.h:33
void setTemp(const uint8_t degrees)
Set the temperature setting.
Definition: ir_Kelon.cpp:172
static stdAc::fanspeed_t toCommonFanSpeed(const uint8_t speed)
Convert a native fan speed to it's stdAc::fanspeed_t equivalent.
Definition: ir_Kelon.cpp:427
const uint8_t kKelonModeCool
Definition: ir_Kelon.h:53
uint8_t TimerHours
Definition: ir_Kelon.h:41
const uint16_t kNoRepeat
Definition: IRremoteESP8266.h:983
uint8_t pad1
Definition: ir_Kelon.h:43
uint8_t _previousFan
Definition: ir_Kelon.h:167
uint8_t DehumidifierGrade
Definition: ir_Kelon.h:35
const uint8_t kKelonModeHeat
Definition: ir_Kelon.h:51
void setDryGrade(const int8_t grade)
Set the dehumidification intensity.
Definition: ir_Kelon.cpp:204
void setSupercool(const bool on)
Control the current super cool mode setting.
Definition: ir_Kelon.cpp:293
uint16_t getTimer(void) const
Get the set timer. Timer set time is deleted once the command is sent, so calling this after send() w...
Definition: ir_Kelon.cpp:336
const uint8_t kKelonMinTemp
Definition: ir_Kelon.h:66
static uint8_t convertFan(const stdAc::fanspeed_t fan)
Convert a standard A/C fan speed (stdAc::fanspeed_t) into it a native speed.
Definition: ir_Kelon.cpp:391
IRsend _irsend
Instance of the IR send class.
Definition: ir_Kelon.h:156
IRKelonAc(uint16_t pin, bool inverted=false, bool use_modulation=true)
Class constructor.
Definition: ir_Kelon.cpp:97
uint8_t SmartModeEnabled
Definition: ir_Kelon.h:42
uint8_t TimerHalfHour
Definition: ir_Kelon.h:40
uint8_t getFan(void) const
Get the current fan speed setting.
Definition: ir_Kelon.cpp:198
uint8_t SwingVToggle
Definition: ir_Kelon.h:36
KelonProtocol _
Definition: ir_Kelon.h:162
void setSleep(const bool on)
Control the current sleep (quiet) setting.
Definition: ir_Kelon.cpp:281
uint8_t SleepEnabled
Definition: ir_Kelon.h:34
Definition: ir_Kelon.h:27
stdAc::state_t toCommon(const stdAc::state_t *prev=nullptr) const
Convert the internal A/C object state to it's stdAc::state_t equivalent.
Definition: ir_Kelon.cpp:442
bool getTogglePower(void) const
Get whether toggling power will be requested.
Definition: ir_Kelon.cpp:166
int8_t getDryGrade(void) const
Get the current dehumidification intensity setting. In smart mode, this controls the temperature adju...
Definition: ir_Kelon.cpp:221
uint8_t Temperature
Definition: ir_Kelon.h:39
const uint8_t kKelonFanMax
Definition: ir_Kelon.h:62
static stdAc::opmode_t toCommonMode(const uint8_t mode)
Convert a native mode to it's stdAc::opmode_t equivalent.
Definition: ir_Kelon.cpp:409
bool getSupercool(void) const
Is the super cool mode setting on?
Definition: ir_Kelon.cpp:308
uint8_t pad2
Definition: ir_Kelon.h:45
const uint8_t kKelonModeFan
Definition: ir_Kelon.h:55
const int8_t kKelonDryGradeMax
Definition: ir_Kelon.h:65
void setMode(const uint8_t mode)
Set the desired operation mode.
Definition: ir_Kelon.cpp:228
uint8_t SuperCoolEnabled1
Definition: ir_Kelon.h:44
void setTimerEnabled(const bool on)
Enable or disable the timer. Note that in order to enable the timer the minutes must be set with setT...
Definition: ir_Kelon.cpp:346
const uint8_t kKelonFanMin
Definition: ir_Kelon.h:60
Structure to hold a common A/C state.
Definition: IRsend.h:97
static uint8_t convertMode(const stdAc::opmode_t mode)
Convert a standard A/C mode (stdAc::opmode_t) into it a native mode.
Definition: ir_Kelon.cpp:373
bool getTimerEnabled(void) const
Get the current timer status.
Definition: ir_Kelon.cpp:352
uint8_t getTemp(void) const
Get the current temperature setting.
Definition: ir_Kelon.cpp:181
void setTimer(const uint16_t mins)
Set the timer time and enable it. Timer is an off timer if the unit is on, it is an on timer if the u...
Definition: ir_Kelon.cpp:316
void setTogglePower(const bool toggle)
Request toggling power - will be reset to false after sending.
Definition: ir_Kelon.cpp:160
uint8_t _previousTemp
Definition: ir_Kelon.h:166
opmode_t
Common A/C settings for A/C operating modes.
Definition: IRsend.h:46