Go to the documentation of this file.
14 #define __STDC_LIMIT_MACROS
22 #include "IRsend_test.h"
86 explicit IREcoclimAc(
const uint16_t pin,
const bool inverted =
false,
87 const bool use_modulation =
true);
96 #endif // SEND_ECOCLIM
102 void setTemp(
const uint8_t celsius);
106 void setFan(
const uint8_t speed);
107 uint8_t
getFan(
void)
const;
108 void setMode(
const uint8_t mode);
110 void setClock(
const uint16_t nr_of_mins);
112 uint64_t
getRaw(
void)
const;
113 void setRaw(
const uint64_t new_code);
114 void setType(
const uint8_t code);
142 #endif // IR_ECOCLIM_H_
bool isOnTimerEnabled(void) const
Check if the On Timer is enabled.
Definition: ir_Ecoclim.cpp:322
uint64_t OffHours
Off Timer nr of Hours.
Definition: ir_Ecoclim.h:61
uint64_t Mode
Operating Mode.
Definition: ir_Ecoclim.h:73
uint64_t OnTenMins
On Timer minutes (in tens of mins)
Definition: ir_Ecoclim.h:63
uint64_t getRaw(void) const
Get a copy of the internal state as a valid code for this protocol.
Definition: ir_Ecoclim.cpp:146
const uint8_t kEcoclimDipMaster
Definition: ir_Ecoclim.h:40
const uint8_t kEcoclimFanMed
1
Definition: ir_Ecoclim.h:36
void stateReset(void)
Reset the internal state to a fixed known good state.
Definition: ir_Ecoclim.cpp:131
uint8_t getType(void) const
Get the Unit type/DIP switch settings of the remote.
Definition: ir_Ecoclim.cpp:290
stdAc::state_t toCommon(void) const
Convert the current internal state into its stdAc::state_t equivalent.
Definition: ir_Ecoclim.cpp:361
void setSensorTemp(const uint8_t celsius)
Set the sensor temperature.
Definition: ir_Ecoclim.cpp:167
uint64_t Fan
Fan Speed.
Definition: ir_Ecoclim.h:68
uint8_t getSensorTemp(void) const
Get the sensor temperature setting.
Definition: ir_Ecoclim.cpp:176
fanspeed_t
Common A/C settings for Fan Speeds.
Definition: IRsend.h:61
uint16_t getClock(void) const
Get the clock time of the A/C unit.
Definition: ir_Ecoclim.cpp:280
uint8_t getFan(void) const
Get the current fan speed setting.
Definition: ir_Ecoclim.cpp:196
const uint64_t kEcoclimDefaultState
Definition: ir_Ecoclim.h:49
const uint8_t kEcoclimFanMin
0
Definition: ir_Ecoclim.h:35
void on(void)
Change the power setting to On.
Definition: ir_Ecoclim.cpp:189
const uint8_t kEcoclimDipSlave
Definition: ir_Ecoclim.h:41
const uint8_t kEcoclimSleep
7
Definition: ir_Ecoclim.h:33
void setPower(const bool on)
Change the power setting.
Definition: ir_Ecoclim.cpp:186
Class for sending all basic IR protocols.
Definition: IRsend.h:237
int8_t calibrate(uint16_t hz=38000U)
Calculate & set any offsets to account for execution times during sending.
Definition: IRsend.cpp:207
uint64_t raw
The state in IR code form.
Definition: ir_Ecoclim.h:53
std::string String
Definition: IRremoteESP8266.h:1521
const uint8_t kEcoclimTempMin
Definition: ir_Ecoclim.h:43
uint8_t getTemp(void) const
Get the current temperature setting.
Definition: ir_Ecoclim.cpp:163
const uint8_t kEcoclimFanMax
2
Definition: ir_Ecoclim.h:37
const uint8_t kEcoclimFanAuto
3
Definition: ir_Ecoclim.h:38
const uint16_t kEcoclimTimerDisable
Definition: ir_Ecoclim.h:46
static uint8_t convertMode(const stdAc::opmode_t mode)
Convert a standard A/C mode into its native mode.
Definition: ir_Ecoclim.cpp:255
void off(void)
Change the power setting to Off.
Definition: ir_Ecoclim.cpp:192
static stdAc::fanspeed_t toCommonFanSpeed(const uint8_t speed)
Convert a native fan speed into its stdAc equivalent.
Definition: ir_Ecoclim.cpp:221
uint64_t Clock
Definition: ir_Ecoclim.h:66
void setRaw(const uint64_t new_code)
Set the internal state from a valid code for this protocol.
Definition: ir_Ecoclim.cpp:150
void setTemp(const uint8_t celsius)
Set the temperature.
Definition: ir_Ecoclim.cpp:154
const uint8_t kEcoclimTempMax
Definition: ir_Ecoclim.h:44
const uint8_t kEcoclimRecycle
3
Definition: ir_Ecoclim.h:30
void setOffTimer(const uint16_t nr_of_mins)
Set & enable the Off Timer for the A/C.
Definition: ir_Ecoclim.cpp:334
void setMode(const uint8_t mode)
Set the operating mode of the A/C.
Definition: ir_Ecoclim.cpp:236
bool isOffTimerEnabled(void) const
Check if the Off Timer is enabled.
Definition: ir_Ecoclim.cpp:349
uint64_t Clear
Definition: ir_Ecoclim.h:70
const uint8_t kEcoclimCool
1
Definition: ir_Ecoclim.h:28
const uint16_t kNoRepeat
Definition: IRremoteESP8266.h:1145
void setType(const uint8_t code)
Set the Unit type/DIP switch settings for the remote.
Definition: ir_Ecoclim.cpp:294
uint64_t Power
Power control.
Definition: ir_Ecoclim.h:69
const uint8_t kEcoclimDry
2
Definition: ir_Ecoclim.h:29
void send(const uint16_t repeat=kNoRepeat)
Send the current internal state as an IR message.
Definition: ir_Ecoclim.cpp:139
bool getPower(void) const
Get the value of the current power setting.
Definition: ir_Ecoclim.cpp:182
void setClock(const uint16_t nr_of_mins)
Set the clock time on the A/C unit.
Definition: ir_Ecoclim.cpp:284
uint64_t Temp
Desired Temperature (Celsius)
Definition: ir_Ecoclim.h:72
uint16_t getOnTimer(void) const
Get the On Timer for the A/C.
Definition: ir_Ecoclim.cpp:316
void disableOnTimer(void)
Disable & clear the On Timer.
Definition: ir_Ecoclim.cpp:327
IREcoclimAc(const uint16_t pin, const bool inverted=false, const bool use_modulation=true)
Class constructor.
Definition: ir_Ecoclim.cpp:126
IRsend _irsend
Instance of the IR send class.
Definition: ir_Ecoclim.h:133
Class for handling detailed EcoClim A/C 56 bit messages.
Definition: ir_Ecoclim.h:84
void begin(void)
Set up hardware to be able to send a message.
Definition: ir_Ecoclim.cpp:134
const uint8_t kEcoclimAuto
0. a.k.a Slave
Definition: ir_Ecoclim.h:27
int8_t calibrate(void)
Run the calibration to calculate uSec timing offsets for this platform.
Definition: ir_Ecoclim.h:95
String toString(void) const
Convert the internal state into a human readable string.
Definition: ir_Ecoclim.cpp:388
uint16_t getOffTimer(void) const
Get the Off Timer for the A/C.
Definition: ir_Ecoclim.cpp:343
const uint8_t kEcoclimHeat
5
Definition: ir_Ecoclim.h:32
uint64_t OnHours
On Timer nr of Hours.
Definition: ir_Ecoclim.h:64
void setFan(const uint8_t speed)
Set the speed of the fan.
Definition: ir_Ecoclim.cpp:200
uint64_t SensorTemp
Sensed Temperature (Celsius)
Definition: ir_Ecoclim.h:75
static uint8_t convertFan(const stdAc::fanspeed_t speed)
Convert a stdAc::fanspeed_t enum into it's native speed.
Definition: ir_Ecoclim.cpp:207
Native representation of a Ecoclim A/C message.
Definition: ir_Ecoclim.h:52
void disableOffTimer(void)
Disable & clear the Off Timer.
Definition: ir_Ecoclim.cpp:354
static stdAc::opmode_t toCommonMode(const uint8_t mode)
Convert a native mode to it's common stdAc::opmode_t equivalent.
Definition: ir_Ecoclim.cpp:268
EcoclimProtocol _
The state of the IR remote in IR code form.
Definition: ir_Ecoclim.h:139
void setOnTimer(const uint16_t nr_of_mins)
Set & enable the On Timer for the A/C.
Definition: ir_Ecoclim.cpp:307
Structure to hold a common A/C state.
Definition: IRsend.h:114
uint8_t getMode(void) const
Get the operating mode setting of the A/C.
Definition: ir_Ecoclim.cpp:232
uint64_t DipConfig
0b0000 = Master, 0b0111 = Slave
Definition: ir_Ecoclim.h:58
const uint8_t kEcoclimFan
4
Definition: ir_Ecoclim.h:31
uint64_t OffTenMins
Off Timer minutes (in tens of mins)
Definition: ir_Ecoclim.h:60
opmode_t
Common A/C settings for A/C operating modes.
Definition: IRsend.h:49