IRremoteESP8266
Public Member Functions | Static Public Member Functions | Public Attributes | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
IRac Class Reference

A universal/common/generic interface for controling supported A/Cs. More...

#include <IRac.h>

Collaboration diagram for IRac:
Collaboration graph
[legend]

Public Member Functions

 IRac (const uint16_t pin, const bool inverted=false, const bool use_modulation=true)
 Class constructor. More...
 
void markAsSent (void)
 Update the previous state to the current one. More...
 
bool sendAc (void)
 Send an A/C message based soley on our internal state. More...
 
bool sendAc (const stdAc::state_t desired, const stdAc::state_t *prev=NULL)
 Send A/C message for a given device using state_t structures. More...
 
bool sendAc (const decode_type_t vendor, const int16_t model, const bool power, const stdAc::opmode_t mode, const float degrees, const bool celsius, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const stdAc::swingh_t swingh, const bool quiet, const bool turbo, const bool econo, const bool light, const bool filter, const bool clean, const bool beep, const int16_t sleep=-1, const int16_t clock=-1)
 Send A/C message for a given device using common A/C settings. More...
 
stdAc::state_t getState (void)
 Get the current internal A/C climate state. More...
 
stdAc::state_t getStatePrev (void)
 Get the previous internal A/C climate state that should have already been sent to the device. i.e. What the A/C unit should already be set to. More...
 
bool hasStateChanged (void)
 Check if the internal state has changed from what was previously sent. More...
 

Static Public Member Functions

static bool isProtocolSupported (const decode_type_t protocol)
 Is the given protocol supported by the IRac class? More...
 
static void initState (stdAc::state_t *state, const decode_type_t vendor, const int16_t model, const bool power, const stdAc::opmode_t mode, const float degrees, const bool celsius, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const stdAc::swingh_t swingh, const bool quiet, const bool turbo, const bool econo, const bool light, const bool filter, const bool clean, const bool beep, const int16_t sleep, const int16_t clock)
 Initialise the given state with the supplied settings. More...
 
static void initState (stdAc::state_t *state)
 Initialise the given state with the supplied settings. More...
 
static bool cmpStates (const stdAc::state_t a, const stdAc::state_t b)
 Compare two AirCon states. More...
 
static bool strToBool (const char *str, const bool def=false)
 Convert the supplied str into the appropriate boolean value. More...
 
static int16_t strToModel (const char *str, const int16_t def=-1)
 Convert the supplied str into the appropriate enum. More...
 
static stdAc::ac_command_t strToCommandType (const char *str, const stdAc::ac_command_t def=stdAc::ac_command_t::kControlCommand)
 Convert the supplied str into the appropriate enum. More...
 
static stdAc::opmode_t strToOpmode (const char *str, const stdAc::opmode_t def=stdAc::opmode_t::kAuto)
 Convert the supplied str into the appropriate enum. More...
 
static stdAc::fanspeed_t strToFanspeed (const char *str, const stdAc::fanspeed_t def=stdAc::fanspeed_t::kAuto)
 Convert the supplied str into the appropriate enum. More...
 
static stdAc::swingv_t strToSwingV (const char *str, const stdAc::swingv_t def=stdAc::swingv_t::kOff)
 Convert the supplied str into the appropriate enum. More...
 
static stdAc::swingh_t strToSwingH (const char *str, const stdAc::swingh_t def=stdAc::swingh_t::kOff)
 Convert the supplied str into the appropriate enum. More...
 
static String boolToString (const bool value)
 Convert the supplied boolean into the appropriate String. More...
 
static String commandTypeToString (const stdAc::ac_command_t cmdType)
 Convert the supplied operation mode into the appropriate String. More...
 
static String opmodeToString (const stdAc::opmode_t mode, const bool ha=false)
 Convert the supplied operation mode into the appropriate String. More...
 
static String fanspeedToString (const stdAc::fanspeed_t speed)
 Convert the supplied fan speed enum into the appropriate String. More...
 
static String swingvToString (const stdAc::swingv_t swingv)
 Convert the supplied enum into the appropriate String. More...
 
static String swinghToString (const stdAc::swingh_t swingh)
 Convert the supplied enum into the appropriate String. More...
 

Public Attributes

stdAc::state_t next
 The state we want the device to be in after we send. More...
 

Private Member Functions

void airton (IRAirtonAc *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const bool turbo, const bool light, const bool econo, const bool filter, const int16_t sleep=-1)
 Send an Airton 56-bit A/C message with the supplied settings. More...
 
void airwell (IRAirwellAc *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan)
 Send an Airwell A/C message with the supplied settings. More...
 
void amcor (IRAmcorAc *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan)
 Send an Amcor A/C message with the supplied settings. More...
 
void argo (IRArgoAC *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const float sensorTemp, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const bool iFeel, const bool turbo, const int16_t sleep=-1)
 Send an Argo A/C message with the supplied settings. More...
 
void argoWrem3_ACCommand (IRArgoAC_WREM3 *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const float sensorTemp, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const bool iFeel, const bool night, const bool econo, const bool turbo, const bool filter, const bool light)
 Send an Argo A/C WREM-3 AC control message with the supplied settings. More...
 
void argoWrem3_iFeelReport (IRArgoAC_WREM3 *ac, const float sensorTemp)
 Send an Argo A/C WREM-3 iFeel (room temp) silent (no beep) report. More...
 
void argoWrem3_ConfigSet (IRArgoAC_WREM3 *ac, const uint8_t param, const uint8_t value, bool safe=true)
 Send an Argo A/C WREM-3 Config command. More...
 
void argoWrem3_SetTimer (IRArgoAC_WREM3 *ac, bool on, const uint16_t currentTime, const uint16_t delayMinutes)
 Send an Argo A/C WREM-3 Delay timer command. More...
 
void bosch144 (IRBosch144AC *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const bool quiet)
 Send a Bosch144 A/C message with the supplied settings. More...
 
void carrier64 (IRCarrierAc64 *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const int16_t sleep=-1)
 Send a Carrier 64-bit A/C message with the supplied settings. More...
 
void coolix (IRCoolixAC *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const float sensorTemp, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const stdAc::swingh_t swingh, const bool iFeel, const bool turbo, const bool light, const bool clean, const int16_t sleep=-1)
 Send a Coolix A/C message with the supplied settings. More...
 
void corona (IRCoronaAc *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const bool econo)
 Send a Corona A/C message with the supplied settings. More...
 
void daikin (IRDaikinESP *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const stdAc::swingh_t swingh, const bool quiet, const bool turbo, const bool econo, const bool clean)
 Send a Daikin A/C message with the supplied settings. More...
 
void daikin128 (IRDaikin128 *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const bool quiet, const bool turbo, const bool light, const bool econo, const int16_t sleep=-1, const int16_t clock=-1)
 Send a Daikin 128-bit A/C message with the supplied settings. More...
 
void daikin152 (IRDaikin152 *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const bool quiet, const bool turbo, const bool econo)
 Send a Daikin 152-bit A/C message with the supplied settings. More...
 
void daikin160 (IRDaikin160 *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv)
 Send a Daikin 160-bit A/C message with the supplied settings. More...
 
void daikin176 (IRDaikin176 *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingh_t swingh)
 Send a Daikin 176-bit A/C message with the supplied settings. More...
 
void daikin2 (IRDaikin2 *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const stdAc::swingh_t swingh, const bool quiet, const bool turbo, const bool light, const bool econo, const bool filter, const bool clean, const bool beep, const int16_t sleep=-1, const int16_t clock=-1)
 Send a Daikin2 A/C message with the supplied settings. More...
 
void daikin216 (IRDaikin216 *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const stdAc::swingh_t swingh, const bool quiet, const bool turbo)
 Send a Daikin 216-bit A/C message with the supplied settings. More...
 
void daikin64 (IRDaikin64 *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const bool quiet, const bool turbo, const int16_t sleep=-1, const int16_t clock=-1)
 Send a Daikin 64-bit A/C message with the supplied settings. More...
 
void delonghiac (IRDelonghiAc *ac, const bool on, const stdAc::opmode_t mode, const bool celsius, const float degrees, const stdAc::fanspeed_t fan, const bool turbo, const int16_t sleep=-1)
 Send a Delonghi A/C message with the supplied settings. More...
 
void ecoclim (IREcoclimAc *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const float sensorTemp, const stdAc::fanspeed_t fan, const int16_t sleep=-1, const int16_t clock=-1)
 Send an EcoClim A/C message with the supplied settings. More...
 
void electra (IRElectraAc *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const float sensorTemp, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const stdAc::swingh_t swingh, const bool iFeel, const bool turbo, const bool lighttoggle, const bool clean)
 Send an Electra A/C message with the supplied settings. More...
 
void fujitsu (IRFujitsuAC *ac, const fujitsu_ac_remote_model_t model, const bool on, const stdAc::opmode_t mode, const bool celsius, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const stdAc::swingh_t swingh, const bool quiet, const bool turbo, const bool econo, const bool filter, const bool clean, const int16_t sleep=-1)
 Send a Fujitsu A/C message with the supplied settings. More...
 
void goodweather (IRGoodweatherAc *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const bool turbo, const bool light, const int16_t sleep=-1)
 Send a Goodweather A/C message with the supplied settings. More...
 
void gree (IRGreeAC *ac, const gree_ac_remote_model_t model, const bool on, const stdAc::opmode_t mode, const bool celsius, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const stdAc::swingh_t swingh, const bool iFeel, const bool turbo, const bool econo, const bool light, const bool clean, const int16_t sleep=-1)
 Send a Gree A/C message with the supplied settings. More...
 
void haier (IRHaierAC *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const bool filter, const int16_t sleep=-1, const int16_t clock=-1)
 Send a Haier A/C message with the supplied settings. More...
 
void haier160 (IRHaierAC160 *ac, const bool on, const stdAc::opmode_t mode, const bool celsius, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const bool turbo, const bool quiet, const bool filter, const bool clean, const bool light, const bool prevlight, const int16_t sleep=-1)
 Send a Haier 160 bit A/C message with the supplied settings. More...
 
void haier176 (IRHaierAC176 *ac, const haier_ac176_remote_model_t model, const bool on, const stdAc::opmode_t mode, const bool celsius, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const stdAc::swingh_t swingh, const bool turbo, const bool quiet, const bool filter, const int16_t sleep=-1)
 Send a Haier 176 bit A/C message with the supplied settings. More...
 
void haierYrwo2 (IRHaierACYRW02 *ac, const bool on, const stdAc::opmode_t mode, const bool celsius, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const stdAc::swingh_t swingh, const bool turbo, const bool quiet, const bool filter, const int16_t sleep=-1)
 Send a Haier YRWO2 A/C message with the supplied settings. More...
 
void hitachi (IRHitachiAc *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const stdAc::swingh_t swingh)
 Send a Hitachi A/C message with the supplied settings. More...
 
void hitachi1 (IRHitachiAc1 *ac, const hitachi_ac1_remote_model_t model, const bool on, const bool power_toggle, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const stdAc::swingh_t swingh, const bool swing_toggle, const int16_t sleep=-1)
 Send a Hitachi1 A/C message with the supplied settings. More...
 
void hitachi264 (IRHitachiAc264 *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan)
 Send a Hitachi 264-bit A/C message with the supplied settings. More...
 
void hitachi296 (IRHitachiAc296 *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan)
 Send a Hitachi 296-bit A/C message with the supplied settings. More...
 
void hitachi344 (IRHitachiAc344 *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const stdAc::swingh_t swingh)
 Send a Hitachi 344-bit A/C message with the supplied settings. More...
 
void hitachi424 (IRHitachiAc424 *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv)
 Send a Hitachi 424-bit A/C message with the supplied settings. More...
 
void kelon (IRKelonAc *ac, const bool togglePower, const stdAc::opmode_t mode, const int8_t dryGrade, const float degrees, const stdAc::fanspeed_t fan, const bool toggleSwing, const bool superCool, const int16_t sleep)
 Send a Kelon A/C message with the supplied settings. More...
 
void kelvinator (IRKelvinatorAC *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const stdAc::swingh_t swingh, const bool quiet, const bool turbo, const bool light, const bool filter, const bool clean)
 Send a Kelvinator A/C message with the supplied settings. More...
 
void lg (IRLgAc *ac, const lg_ac_remote_model_t model, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const stdAc::swingv_t swingv_prev, const stdAc::swingh_t swingh, const bool light)
 Send a LG A/C message with the supplied settings. More...
 
void midea (IRMideaAC *ac, const bool on, const stdAc::opmode_t mode, const bool celsius, const float degrees, const float sensorTemp, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const bool iFeel, const bool quiet, const bool quiet_prev, const bool turbo, const bool econo, const bool light, const bool clean, const int16_t sleep=-1)
 Send a Midea A/C message with the supplied settings. More...
 
void mirage (IRMirageAc *ac, const stdAc::state_t state)
 Send a Mirage 120-bit A/C message with the supplied settings. More...
 
void mitsubishi (IRMitsubishiAC *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const stdAc::swingh_t swingh, const bool quiet, const int16_t clock=-1)
 Send a Mitsubishi A/C message with the supplied settings. More...
 
void mitsubishi112 (IRMitsubishi112 *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const stdAc::swingh_t swingh, const bool quiet)
 Send a Mitsubishi 112-bit A/C message with the supplied settings. More...
 
void mitsubishi136 (IRMitsubishi136 *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const bool quiet)
 Send a Mitsubishi 136-bit A/C message with the supplied settings. More...
 
void mitsubishiHeavy88 (IRMitsubishiHeavy88Ac *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const stdAc::swingh_t swingh, const bool turbo, const bool econo, const bool clean)
 Send a Mitsubishi Heavy 88-bit A/C message with the supplied settings. More...
 
void mitsubishiHeavy152 (IRMitsubishiHeavy152Ac *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const stdAc::swingh_t swingh, const bool quiet, const bool turbo, const bool econo, const bool filter, const bool clean, const int16_t sleep=-1)
 Send a Mitsubishi Heavy 152-bit A/C message with the supplied settings. More...
 
void neoclima (IRNeoclimaAc *ac, const bool on, const stdAc::opmode_t mode, const bool celsius, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const stdAc::swingh_t swingh, const bool turbo, const bool econo, const bool light, const bool filter, const int16_t sleep=-1)
 Send a Neoclima A/C message with the supplied settings. More...
 
void panasonic (IRPanasonicAc *ac, const panasonic_ac_remote_model_t model, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const stdAc::swingh_t swingh, const bool quiet, const bool turbo, const bool filter, const int16_t clock=-1)
 Send a Panasonic A/C message with the supplied settings. More...
 
void panasonic32 (IRPanasonicAc32 *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const stdAc::swingh_t swingh)
 Send a Panasonic A/C message with the supplied settings. More...
 
void rhoss (IRRhossAc *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swing)
 Send an Rhoss A/C message with the supplied settings. More...
 
void samsung (IRSamsungAc *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const stdAc::swingh_t swingh, const bool quiet, const bool turbo, const bool econo, const bool light, const bool filter, const bool clean, const bool beep, const int16_t sleep=-1, const bool prevpower=true, const int16_t prevsleep=-1, const bool forceextended=true)
 Send a Samsung A/C message with the supplied settings. More...
 
void sanyo (IRSanyoAc *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const float sensorTemp, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const bool iFeel, const bool beep, const int16_t sleep=-1)
 Send a Sanyo A/C message with the supplied settings. More...
 
void sanyo88 (IRSanyoAc88 *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const bool turbo, const bool filter, const int16_t sleep=-1, const int16_t clock=-1)
 Send a Sanyo 88-bit A/C message with the supplied settings. More...
 
void sharp (IRSharpAc *ac, const sharp_ac_remote_model_t model, const bool on, const bool prev_power, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const stdAc::swingv_t swingv_prev, const bool turbo, const bool light, const bool filter, const bool clean)
 Send a Sharp A/C message with the supplied settings. More...
 
void tcl112 (IRTcl112Ac *ac, const tcl_ac_remote_model_t model, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const stdAc::swingh_t swingh, const bool quiet, const bool turbo, const bool light, const bool econo, const bool filter)
 Send a TCL 112-bit A/C message with the supplied settings. More...
 
void technibel (IRTechnibelAc *ac, const bool on, const stdAc::opmode_t mode, const bool celsius, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const int16_t sleep=-1)
 Send a Technibel A/C message with the supplied settings. More...
 
void teco (IRTecoAc *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const bool light, const int16_t sleep=-1)
 Send a Teco A/C message with the supplied settings. More...
 
void toshiba (IRToshibaAC *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const bool turbo, const bool econo, const bool filter)
 Send a Toshiba A/C message with the supplied settings. More...
 
void trotec (IRTrotecESP *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const int16_t sleep=-1)
 Send a Trotec A/C message with the supplied settings. More...
 
void trotec3550 (IRTrotec3550 *ac, const bool on, const stdAc::opmode_t mode, const bool celsius, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv)
 Send a Trotec 3550 A/C message with the supplied settings. More...
 
void truma (IRTrumaAc *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const bool quiet)
 Send a Truma A/C message with the supplied settings. More...
 
void vestel (IRVestelAc *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const bool turbo, const bool filter, const int16_t sleep=-1, const int16_t clock=-1, const bool sendNormal=true)
 Send a Vestel A/C message with the supplied settings. More...
 
void voltas (IRVoltas *ac, const voltas_ac_remote_model_t model, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const stdAc::swingh_t swingh, const bool turbo, const bool econo, const bool light, const int16_t sleep=-1)
 Send a Voltas A/C message with the supplied settings. More...
 
void whirlpool (IRWhirlpoolAc *ac, const whirlpool_ac_remote_model_t model, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const bool turbo, const bool light, const int16_t sleep=-1, const int16_t clock=-1)
 Send a Whirlpool A/C message with the supplied settings. More...
 
void transcold (IRTranscoldAc *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const stdAc::swingh_t swingh)
 Send a Transcold A/C message with the supplied settings. More...
 

Static Private Member Functions

static stdAc::state_t cleanState (const stdAc::state_t state)
 Create a new state base on the provided state that has been suitably fixed. More...
 
static stdAc::state_t handleToggles (const stdAc::state_t desired, const stdAc::state_t *prev=NULL)
 Create a new state base on desired & previous states but handle any state changes for options that need to be toggled. More...
 

Private Attributes

uint16_t _pin
 The GPIO to use to transmit messages from. More...
 
bool _inverted
 IR LED is lit when GPIO is LOW (true) or HIGH (false)? More...
 
bool _modulation
 Is frequency modulation to be used? More...
 
stdAc::state_t _prev
 The state we expect the device to currently be in. More...
 

Detailed Description

A universal/common/generic interface for controling supported A/Cs.

Constructor & Destructor Documentation

◆ IRac()

IRac::IRac ( const uint16_t  pin,
const bool  inverted = false,
const bool  use_modulation = true 
)
explicit

Class constructor.

Parameters
[in]pinGpio pin to use when transmitting IR messages.
[in]invertedtrue, gpio output defaults to high. false, to low.
[in]use_modulationtrue means use frequency modulation. false, don't.

Member Function Documentation

◆ airton()

void IRac::airton ( IRAirtonAc ac,
const bool  on,
const stdAc::opmode_t  mode,
const float  degrees,
const stdAc::fanspeed_t  fan,
const stdAc::swingv_t  swingv,
const bool  turbo,
const bool  light,
const bool  econo,
const bool  filter,
const int16_t  sleep = -1 
)
private

Send an Airton 56-bit A/C message with the supplied settings.

Parameters
[in,out]acA Ptr to an IRAirtonAc object to use.
[in]onThe power setting.
[in]modeThe operation mode setting.
[in]degreesThe temperature setting in degrees.
[in]fanThe speed setting for the fan.
[in]swingvThe vertical swing setting.
[in]turboRun the device in turbo/powerful mode.
[in]lightTurn on the LED/Display mode.
[in]econoRun the device in economical mode.
[in]filterTurn on the (ion/pollen/health/etc) filter mode.
[in]sleepNr. of minutes for sleep mode.
Note
-1 is Off, >= 0 is on.

◆ airwell()

void IRac::airwell ( IRAirwellAc ac,
const bool  on,
const stdAc::opmode_t  mode,
const float  degrees,
const stdAc::fanspeed_t  fan 
)
private

Send an Airwell A/C message with the supplied settings.

Parameters
[in,out]acA Ptr to an IRAirwellAc object to use.
[in]onThe power setting.
[in]modeThe operation mode setting.
[in]degreesThe temperature setting in degrees.
[in]fanThe speed setting for the fan.

◆ amcor()

void IRac::amcor ( IRAmcorAc ac,
const bool  on,
const stdAc::opmode_t  mode,
const float  degrees,
const stdAc::fanspeed_t  fan 
)
private

Send an Amcor A/C message with the supplied settings.

Parameters
[in,out]acA Ptr to an IRAmcorAc object to use.
[in]onThe power setting.
[in]modeThe operation mode setting.
[in]degreesThe temperature setting in degrees.
[in]fanThe speed setting for the fan.

◆ argo()

void IRac::argo ( IRArgoAC ac,
const bool  on,
const stdAc::opmode_t  mode,
const float  degrees,
const float  sensorTemp,
const stdAc::fanspeed_t  fan,
const stdAc::swingv_t  swingv,
const bool  iFeel,
const bool  turbo,
const int16_t  sleep = -1 
)
private

Send an Argo A/C message with the supplied settings.

Parameters
[in,out]acA Ptr to an IRArgoAC object to use.
[in]onThe power setting.
[in]modeThe operation mode setting.
[in]degreesThe temperature setting in degrees.
[in]sensorTempThe room (iFeel) temperature sensor reading in degrees Celsius.
[in]fanThe speed setting for the fan.
[in]swingvThe vertical swing setting.
[in]iFeelWhether to enable iFeel (remote temp) mode on the A/C unit.
[in]turboRun the device in turbo/powerful mode.
[in]sleepNr. of minutes for sleep mode.
Note
-1 is Off, >= 0 is on.

◆ argoWrem3_ACCommand()

void IRac::argoWrem3_ACCommand ( IRArgoAC_WREM3 ac,
const bool  on,
const stdAc::opmode_t  mode,
const float  degrees,
const float  sensorTemp,
const stdAc::fanspeed_t  fan,
const stdAc::swingv_t  swingv,
const bool  iFeel,
const bool  night,
const bool  econo,
const bool  turbo,
const bool  filter,
const bool  light 
)
private

Send an Argo A/C WREM-3 AC control message with the supplied settings.

Parameters
[in,out]acA Ptr to an IRArgoAC_WREM3 object to use.
[in]onThe power setting.
[in]modeThe operation mode setting.
[in]degreesThe set temperature setting in degrees Celsius.
[in]sensorTempThe room (iFeel) temperature sensor reading in degrees Celsius.
Warning
The sensorTemp param is assumed to be in 0..255 range (uint8_t) The overflow is not checked, though.
Note
The value is rounded to nearest integer, rounding halfway cases away from zero. E.g. 1.5 [C] becomes 2 [C].
Parameters
[in]fanThe speed setting for the fan.
[in]swingvThe vertical swing setting.
[in]iFeelWhether to enable iFeel (remote temp) mode on the A/C unit.
[in]nightEnable night mode (raises temp by +1*C after 1h).
[in]econoEnable eco mode (limits power consumed).
[in]turboRun the device in turbo/powerful mode.
[in]filterEnable filter mode
[in]lightEnable device display/LEDs

◆ argoWrem3_ConfigSet()

void IRac::argoWrem3_ConfigSet ( IRArgoAC_WREM3 ac,
const uint8_t  param,
const uint8_t  value,
bool  safe = true 
)
private

Send an Argo A/C WREM-3 Config command.

Parameters
[in,out]acA Ptr to an IRArgoAC_WREM3 object to use.
[in]paramThe parameter ID.
[in]valueThe parameter value.
[in]safeIf true, will only allow setting the below parameters in order to avoid accidentally setting a restricted vendor-specific param and breaking the A/C device
Note
Known parameters (P<xx>, where xx is the param) P05 - Temperature Scale (0-Celsius, 1-Fahrenheit) P06 - Transmission channel (0..3) P12 - ECO mode power input limit (30..99, default: 75)

◆ argoWrem3_iFeelReport()

void IRac::argoWrem3_iFeelReport ( IRArgoAC_WREM3 ac,
const float  sensorTemp 
)
private

Send an Argo A/C WREM-3 iFeel (room temp) silent (no beep) report.

Parameters
[in,out]acA Ptr to an IRArgoAC_WREM3 object to use.
[in]sensorTempThe room (iFeel) temperature setting in degrees Celsius.
Warning
The sensorTemp param is assumed to be in 0..255 range (uint8_t) The overflow is not checked, though.
Note
The value is rounded to nearest integer, rounding halfway cases away from zero. E.g. 1.5 [C] becomes 2 [C].

◆ argoWrem3_SetTimer()

void IRac::argoWrem3_SetTimer ( IRArgoAC_WREM3 ac,
bool  on,
const uint16_t  currentTime,
const uint16_t  delayMinutes 
)
private

Send an Argo A/C WREM-3 Delay timer command.

Parameters
[in,out]acA Ptr to an IRArgoAC_WREM3 object to use.
[in]onWhether the unit is currently on. The timer, upon elapse will toggle this state
[in]currentTimecurrentTime in minutes, starting from 00:00
Note
For timer mode, this value is not really used much so can be zero.
Parameters
[in]delayMinutesNumber of minutes after which the on state should be toggled
Note
Schedule timers are not exposed via this interface

◆ boolToString()

String IRac::boolToString ( const bool  value)
static

Convert the supplied boolean into the appropriate String.

Parameters
[in]valueThe boolean value to be converted.
Returns
The equivalent String for the locale.

◆ bosch144()

void IRac::bosch144 ( IRBosch144AC ac,
const bool  on,
const stdAc::opmode_t  mode,
const float  degrees,
const stdAc::fanspeed_t  fan,
const bool  quiet 
)
private

Send a Bosch144 A/C message with the supplied settings.

Note
May result in multiple messages being sent.
Parameters
[in,out]acA Ptr to an IRBosch144AC object to use.
[in]onThe power setting.
[in]modeThe operation mode setting.
[in]degreesThe temperature setting in degrees.
[in]fanThe speed setting for the fan.
[in]quietRun the device in quiet/silent mode.
Note
-1 is Off, >= 0 is on.

◆ carrier64()

void IRac::carrier64 ( IRCarrierAc64 ac,
const bool  on,
const stdAc::opmode_t  mode,
const float  degrees,
const stdAc::fanspeed_t  fan,
const stdAc::swingv_t  swingv,
const int16_t  sleep = -1 
)
private

Send a Carrier 64-bit A/C message with the supplied settings.

Parameters
[in,out]acA Ptr to an IRCarrierAc64 object to use.
[in]onThe power setting.
[in]modeThe operation mode setting.
[in]degreesThe temperature setting in degrees.
[in]fanThe speed setting for the fan.
[in]swingvThe vertical swing setting.
[in]sleepNr. of minutes for sleep mode.
Note
-1 is Off, >= 0 is on.

◆ cleanState()

stdAc::state_t IRac::cleanState ( const stdAc::state_t  state)
staticprivate

Create a new state base on the provided state that has been suitably fixed.

Note
This is for use with Home Assistant, which requires mode to be off if the power is off.
Parameters
[in]stateThe state_t structure describing the desired a/c state.
Returns
A stdAc::state_t with the needed settings.

◆ cmpStates()

bool IRac::cmpStates ( const stdAc::state_t  a,
const stdAc::state_t  b 
)
static

Compare two AirCon states.

Note
The comparison excludes the clock.
Parameters
aA state_t to be compared.
bA state_t to be compared.
Returns
True if they differ, False if they don't.

◆ commandTypeToString()

String IRac::commandTypeToString ( const stdAc::ac_command_t  cmdType)
static

Convert the supplied operation mode into the appropriate String.

Parameters
[in]cmdTypeThe enum to be converted.
Returns
The equivalent String for the locale.

◆ coolix()

void IRac::coolix ( IRCoolixAC ac,
const bool  on,
const stdAc::opmode_t  mode,
const float  degrees,
const float  sensorTemp,
const stdAc::fanspeed_t  fan,
const stdAc::swingv_t  swingv,
const stdAc::swingh_t  swingh,
const bool  iFeel,
const bool  turbo,
const bool  light,
const bool  clean,
const int16_t  sleep = -1 
)
private

Send a Coolix A/C message with the supplied settings.

Note
May result in multiple messages being sent.
Parameters
[in,out]acA Ptr to an IRCoolixAC object to use.
[in]onThe power setting.
[in]modeThe operation mode setting.
[in]degreesThe temperature setting in degrees.
[in]sensorTempThe room (iFeel) temperature sensor reading in degrees Celsius.
[in]fanThe speed setting for the fan.
[in]swingvThe vertical swing setting.
[in]swinghThe horizontal swing setting.
[in]iFeelWhether to enable iFeel (remote temp) mode on the A/C unit.
[in]turboRun the device in turbo/powerful mode.
[in]lightTurn on the LED/Display mode.
[in]cleanTurn on the self-cleaning mode. e.g. Mould, dry filters etc
[in]sleepNr. of minutes for sleep mode.
Note
-1 is Off, >= 0 is on.

◆ corona()

void IRac::corona ( IRCoronaAc ac,
const bool  on,
const stdAc::opmode_t  mode,
const float  degrees,
const stdAc::fanspeed_t  fan,
const stdAc::swingv_t  swingv,
const bool  econo 
)
private

Send a Corona A/C message with the supplied settings.

Note
May result in multiple messages being sent.
Parameters
[in,out]acA Ptr to an IRCoronaAc object to use.
[in]onThe power setting.
[in]modeThe operation mode setting.
[in]degreesThe temperature setting in degrees.
[in]fanThe speed setting for the fan.
[in]swingvThe vertical swing setting.
[in]econoRun the device in economical mode.

◆ daikin()

void IRac::daikin ( IRDaikinESP ac,
const bool  on,
const stdAc::opmode_t  mode,
const float  degrees,
const stdAc::fanspeed_t  fan,
const stdAc::swingv_t  swingv,
const stdAc::swingh_t  swingh,
const bool  quiet,
const bool  turbo,
const bool  econo,
const bool  clean 
)
private

Send a Daikin A/C message with the supplied settings.

Parameters
[in,out]acA Ptr to an IRDaikinESP object to use.
[in]onThe power setting.
[in]modeThe operation mode setting.
[in]degreesThe temperature setting in degrees.
[in]fanThe speed setting for the fan.
[in]swingvThe vertical swing setting.
[in]swinghThe horizontal swing setting.
[in]quietRun the device in quiet/silent mode.
[in]turboRun the device in turbo/powerful mode.
[in]econoRun the device in economical mode.
[in]cleanTurn on the self-cleaning mode. e.g. Mould, dry filters etc

◆ daikin128()

void IRac::daikin128 ( IRDaikin128 ac,
const bool  on,
const stdAc::opmode_t  mode,
const float  degrees,
const stdAc::fanspeed_t  fan,
const stdAc::swingv_t  swingv,
const bool  quiet,
const bool  turbo,
const bool  light,
const bool  econo,
const int16_t  sleep = -1,
const int16_t  clock = -1 
)
private

Send a Daikin 128-bit A/C message with the supplied settings.

Parameters
[in,out]acA Ptr to an IRDaikin128 object to use.
[in]onThe power setting.
[in]modeThe operation mode setting.
[in]degreesThe temperature setting in degrees.
[in]fanThe speed setting for the fan.
[in]swingvThe vertical swing setting.
[in]quietRun the device in quiet/silent mode.
[in]turboRun the device in turbo/powerful mode.
[in]lightTurn on the LED/Display mode.
[in]econoRun the device in economical mode.
[in]sleepNr. of minutes for sleep mode. -1 is Off, >= 0 is on.
[in]clockThe time in Nr. of mins since midnight. < 0 is ignore.

◆ daikin152()

void IRac::daikin152 ( IRDaikin152 ac,
const bool  on,
const stdAc::opmode_t  mode,
const float  degrees,
const stdAc::fanspeed_t  fan,
const stdAc::swingv_t  swingv,
const bool  quiet,
const bool  turbo,
const bool  econo 
)
private

Send a Daikin 152-bit A/C message with the supplied settings.

Parameters
[in,out]acA Ptr to an IRDaikin152 object to use.
[in]onThe power setting.
[in]modeThe operation mode setting.
[in]degreesThe temperature setting in degrees.
[in]fanThe speed setting for the fan.
[in]swingvThe vertical swing setting.
[in]quietRun the device in quiet/silent mode.
[in]turboRun the device in turbo/powerful mode.
[in]econoRun the device in economical mode.

◆ daikin160()

void IRac::daikin160 ( IRDaikin160 ac,
const bool  on,
const stdAc::opmode_t  mode,
const float  degrees,
const stdAc::fanspeed_t  fan,
const stdAc::swingv_t  swingv 
)
private

Send a Daikin 160-bit A/C message with the supplied settings.

Parameters
[in,out]acA Ptr to an IRDaikin160 object to use.
[in]onThe power setting.
[in]modeThe operation mode setting.
[in]degreesThe temperature setting in degrees.
[in]fanThe speed setting for the fan.
[in]swingvThe vertical swing setting.

◆ daikin176()

void IRac::daikin176 ( IRDaikin176 ac,
const bool  on,
const stdAc::opmode_t  mode,
const float  degrees,
const stdAc::fanspeed_t  fan,
const stdAc::swingh_t  swingh 
)
private

Send a Daikin 176-bit A/C message with the supplied settings.

Parameters
[in,out]acA Ptr to an IRDaikin176 object to use.
[in]onThe power setting.
[in]modeThe operation mode setting.
[in]degreesThe temperature setting in degrees.
[in]fanThe speed setting for the fan.
[in]swinghThe horizontal swing setting.

◆ daikin2()

void IRac::daikin2 ( IRDaikin2 ac,
const bool  on,
const stdAc::opmode_t  mode,
const float  degrees,
const stdAc::fanspeed_t  fan,
const stdAc::swingv_t  swingv,
const stdAc::swingh_t  swingh,
const bool  quiet,
const bool  turbo,
const bool  light,
const bool  econo,
const bool  filter,
const bool  clean,
const bool  beep,
const int16_t  sleep = -1,
const int16_t  clock = -1 
)
private

Send a Daikin2 A/C message with the supplied settings.

Parameters
[in,out]acA Ptr to an IRDaikin2 object to use.
[in]onThe power setting.
[in]modeThe operation mode setting.
[in]degreesThe temperature setting in degrees.
[in]fanThe speed setting for the fan.
[in]swingvThe vertical swing setting.
[in]swinghThe horizontal swing setting.
[in]quietRun the device in quiet/silent mode.
[in]turboRun the device in turbo/powerful mode.
[in]lightTurn on the LED/Display mode.
[in]econoRun the device in economical mode.
[in]filterTurn on the (ion/pollen/etc) filter mode.
[in]cleanTurn on the self-cleaning mode. e.g. Mould, dry filters etc
[in]beepEnable/Disable beeps when receiving IR messages.
[in]sleepNr. of minutes for sleep mode. -1 is Off, >= 0 is on.
[in]clockThe time in Nr. of mins since midnight. < 0 is ignore.

◆ daikin216()

void IRac::daikin216 ( IRDaikin216 ac,
const bool  on,
const stdAc::opmode_t  mode,
const float  degrees,
const stdAc::fanspeed_t  fan,
const stdAc::swingv_t  swingv,
const stdAc::swingh_t  swingh,
const bool  quiet,
const bool  turbo 
)
private

Send a Daikin 216-bit A/C message with the supplied settings.

Parameters
[in,out]acA Ptr to an IRDaikin216 object to use.
[in]onThe power setting.
[in]modeThe operation mode setting.
[in]degreesThe temperature setting in degrees.
[in]fanThe speed setting for the fan.
[in]swingvThe vertical swing setting.
[in]swinghThe horizontal swing setting.
[in]quietRun the device in quiet/silent mode.
[in]turboRun the device in turbo/powerful mode.

◆ daikin64()

void IRac::daikin64 ( IRDaikin64 ac,
const bool  on,
const stdAc::opmode_t  mode,
const float  degrees,
const stdAc::fanspeed_t  fan,
const stdAc::swingv_t  swingv,
const bool  quiet,
const bool  turbo,
const int16_t  sleep = -1,
const int16_t  clock = -1 
)
private

Send a Daikin 64-bit A/C message with the supplied settings.

Parameters
[in,out]acA Ptr to an IRDaikin64 object to use.
[in]onThe power setting.
[in]modeThe operation mode setting.
[in]degreesThe temperature setting in degrees.
[in]fanThe speed setting for the fan.
[in]swingvThe vertical swing setting.
[in]quietRun the device in quiet/silent mode.
[in]turboRun the device in turbo/powerful mode.
[in]sleepNr. of minutes for sleep mode. -1 is Off, >= 0 is on.
[in]clockThe time in Nr. of mins since midnight. < 0 is ignore.

◆ delonghiac()

void IRac::delonghiac ( IRDelonghiAc ac,
const bool  on,
const stdAc::opmode_t  mode,
const bool  celsius,
const float  degrees,
const stdAc::fanspeed_t  fan,
const bool  turbo,
const int16_t  sleep = -1 
)
private

Send a Delonghi A/C message with the supplied settings.

Parameters
[in,out]acA Ptr to an IRDelonghiAc object to use.
[in]onThe power setting.
[in]modeThe operation mode setting.
[in]celsiusTemperature units. True is Celsius, False is Fahrenheit.
[in]degreesThe temperature setting in degrees.
[in]fanThe speed setting for the fan.
[in]turboRun the device in turbo/powerful mode.
[in]sleepNr. of minutes for sleep mode. -1 is Off, >= 0 is on.

◆ ecoclim()

void IRac::ecoclim ( IREcoclimAc ac,
const bool  on,
const stdAc::opmode_t  mode,
const float  degrees,
const float  sensorTemp,
const stdAc::fanspeed_t  fan,
const int16_t  sleep = -1,
const int16_t  clock = -1 
)
private

Send an EcoClim A/C message with the supplied settings.

Parameters
[in,out]acA Ptr to an IREcoclimAc object to use.
[in]onThe power setting.
[in]modeThe operation mode setting.
[in]degreesThe temperature setting in degrees.
[in]sensorTempThe room (iFeel) temperature sensor reading in degrees Celsius.
[in]fanThe speed setting for the fan.
[in]sleepNr. of minutes for sleep mode. -1 is Off, >= 0 is on.
[in]clockThe time in Nr. of mins since midnight. < 0 is ignore.

◆ electra()

void IRac::electra ( IRElectraAc ac,
const bool  on,
const stdAc::opmode_t  mode,
const float  degrees,
const float  sensorTemp,
const stdAc::fanspeed_t  fan,
const stdAc::swingv_t  swingv,
const stdAc::swingh_t  swingh,
const bool  iFeel,
const bool  turbo,
const bool  lighttoggle,
const bool  clean 
)
private

Send an Electra A/C message with the supplied settings.

Parameters
[in,out]acA Ptr to an IRElectraAc object to use.
[in]onThe power setting.
[in]modeThe operation mode setting.
[in]degreesThe temperature setting in degrees.
[in]sensorTempThe room (iFeel) temperature sensor reading in degrees Celsius.
[in]fanThe speed setting for the fan.
[in]swingvThe vertical swing setting.
[in]swinghThe horizontal swing setting.
[in]iFeelWhether to enable iFeel (remote temp) mode on the A/C unit.
[in]turboRun the device in turbo/powerful mode.
[in]lighttoggleShould we toggle the LED/Display?
[in]cleanTurn on the self-cleaning mode. e.g. Mould, dry filters etc

◆ fanspeedToString()

String IRac::fanspeedToString ( const stdAc::fanspeed_t  speed)
static

Convert the supplied fan speed enum into the appropriate String.

Parameters
[in]speedThe enum to be converted.
Returns
The equivalent String for the locale.

◆ fujitsu()

void IRac::fujitsu ( IRFujitsuAC ac,
const fujitsu_ac_remote_model_t  model,
const bool  on,
const stdAc::opmode_t  mode,
const bool  celsius,
const float  degrees,
const stdAc::fanspeed_t  fan,
const stdAc::swingv_t  swingv,
const stdAc::swingh_t  swingh,
const bool  quiet,
const bool  turbo,
const bool  econo,
const bool  filter,
const bool  clean,
const int16_t  sleep = -1 
)
private

Send a Fujitsu A/C message with the supplied settings.

Parameters
[in,out]acA Ptr to an IRFujitsuAC object to use.
[in]modelThe A/C model to use.
[in]onThe power setting.
[in]modeThe operation mode setting.
[in]celsiusTemperature units. True is Celsius, False is Fahrenheit.
[in]degreesThe temperature setting in degrees.
[in]fanThe speed setting for the fan.
[in]swingvThe vertical swing setting.
[in]swinghThe horizontal swing setting.
[in]quietRun the device in quiet/silent mode.
[in]turboRun the device in turbo/powerful mode.
[in]econoRun the device in economical mode.
[in]filterTurn on the (ion/pollen/etc) filter mode.
[in]cleanTurn on the self-cleaning mode. e.g. Mould, dry filters etc
[in]sleepNr. of minutes for sleep mode. <= 0 is Off, > 0 is on.

◆ getState()

stdAc::state_t IRac::getState ( void  )

Get the current internal A/C climate state.

Returns
A Ptr to a state containing the current (to be sent) settings.

◆ getStatePrev()

stdAc::state_t IRac::getStatePrev ( void  )

Get the previous internal A/C climate state that should have already been sent to the device. i.e. What the A/C unit should already be set to.

Returns
A Ptr to a state containing the previously sent settings.

◆ goodweather()

void IRac::goodweather ( IRGoodweatherAc ac,
const bool  on,
const stdAc::opmode_t  mode,
const float  degrees,
const stdAc::fanspeed_t  fan,
const stdAc::swingv_t  swingv,
const bool  turbo,
const bool  light,
const int16_t  sleep = -1 
)
private

Send a Goodweather A/C message with the supplied settings.

Parameters
[in,out]acA Ptr to an IRGoodweatherAc object to use.
[in]onThe power setting.
[in]modeThe operation mode setting.
[in]degreesThe temperature setting in degrees.
[in]fanThe speed setting for the fan.
[in]swingvThe vertical swing setting.
[in]turboRun the device in turbo/powerful mode.
[in]lightTurn on the LED/Display mode.
[in]sleepNr. of minutes for sleep mode. -1 is Off, >= 0 is on.

◆ gree()

void IRac::gree ( IRGreeAC ac,
const gree_ac_remote_model_t  model,
const bool  on,
const stdAc::opmode_t  mode,
const bool  celsius,
const float  degrees,
const stdAc::fanspeed_t  fan,
const stdAc::swingv_t  swingv,
const stdAc::swingh_t  swingh,
const bool  iFeel,
const bool  turbo,
const bool  econo,
const bool  light,
const bool  clean,
const int16_t  sleep = -1 
)
private

Send a Gree A/C message with the supplied settings.

Parameters
[in,out]acA Ptr to an IRGreeAC object to use.
[in]modelThe A/C model to use.
[in]onThe power setting.
[in]modeThe operation mode setting.
[in]celsiusTemperature units. True is Celsius, False is Fahrenheit.
[in]degreesThe temperature setting in degrees.
[in]fanThe speed setting for the fan.
[in]swingvThe vertical swing setting.
[in]swinghThe horizontal swing setting.
[in]iFeelWhether to enable iFeel (remote temp) mode on the A/C unit.
[in]turboRun the device in turbo/powerful mode.
[in]econoToggle the device's economical mode.
[in]lightTurn on the LED/Display mode.
[in]cleanTurn on the self-cleaning mode. e.g. Mould, dry filters etc
[in]sleepNr. of minutes for sleep mode. -1 is Off, >= 0 is on.

◆ haier()

void IRac::haier ( IRHaierAC ac,
const bool  on,
const stdAc::opmode_t  mode,
const float  degrees,
const stdAc::fanspeed_t  fan,
const stdAc::swingv_t  swingv,
const bool  filter,
const int16_t  sleep = -1,
const int16_t  clock = -1 
)
private

Send a Haier A/C message with the supplied settings.

Parameters
[in,out]acA Ptr to an IRGreeAC object to use.
[in]onThe power setting.
[in]modeThe operation mode setting.
[in]degreesThe temperature setting in degrees.
[in]fanThe speed setting for the fan.
[in]swingvThe vertical swing setting.
[in]filterTurn on the (ion/pollen/etc) filter mode.
[in]sleepNr. of minutes for sleep mode. -1 is Off, >= 0 is on.
[in]clockThe time in Nr. of mins since midnight. < 0 is ignore.

◆ haier160()

void IRac::haier160 ( IRHaierAC160 ac,
const bool  on,
const stdAc::opmode_t  mode,
const bool  celsius,
const float  degrees,
const stdAc::fanspeed_t  fan,
const stdAc::swingv_t  swingv,
const bool  turbo,
const bool  quiet,
const bool  filter,
const bool  clean,
const bool  light,
const bool  prevlight,
const int16_t  sleep = -1 
)
private

Send a Haier 160 bit A/C message with the supplied settings.

Parameters
[in,out]acA Ptr to an IRHaierAC160 object to use.
[in]onThe power setting.
[in]modeThe operation mode setting.
[in]celsiusTemperature units. True is Celsius, False is Fahrenheit.
[in]degreesThe temperature setting in degrees.
[in]fanThe speed setting for the fan.
[in]swingvThe vertical swing setting.
[in]turboRun the device in turbo/powerful mode.
[in]quietRun the device in quiet mode.
[in]filterTurn on the (ion/pollen/etc) filter mode.
[in]cleanTurn on the clean mode.
[in]lightTurn on the LED/Display mode.
[in]prevlightPrevious LED/Display mode.
[in]sleepNr. of minutes for sleep mode. -1 is Off, >= 0 is on.

◆ haier176()

void IRac::haier176 ( IRHaierAC176 ac,
const haier_ac176_remote_model_t  model,
const bool  on,
const stdAc::opmode_t  mode,
const bool  celsius,
const float  degrees,
const stdAc::fanspeed_t  fan,
const stdAc::swingv_t  swingv,
const stdAc::swingh_t  swingh,
const bool  turbo,
const bool  quiet,
const bool  filter,
const int16_t  sleep = -1 
)
private

Send a Haier 176 bit A/C message with the supplied settings.

Parameters
[in,out]acA Ptr to an IRHaierAC176 object to use.
[in]modelThe A/C model to use.
[in]onThe power setting.
[in]modeThe operation mode setting.
[in]celsiusTemperature units. True is Celsius, False is Fahrenheit.
[in]degreesThe temperature setting in degrees.
[in]fanThe speed setting for the fan.
[in]swingvThe vertical swing setting.
[in]swinghThe horizontal swing setting.
[in]turboRun the device in turbo/powerful mode.
[in]quietRun the device in quiet mode.
[in]filterTurn on the (ion/pollen/etc) filter mode.
[in]sleepNr. of minutes for sleep mode. -1 is Off, >= 0 is on.

◆ haierYrwo2()

void IRac::haierYrwo2 ( IRHaierACYRW02 ac,
const bool  on,
const stdAc::opmode_t  mode,
const bool  celsius,
const float  degrees,
const stdAc::fanspeed_t  fan,
const stdAc::swingv_t  swingv,
const stdAc::swingh_t  swingh,
const bool  turbo,
const bool  quiet,
const bool  filter,
const int16_t  sleep = -1 
)
private

Send a Haier YRWO2 A/C message with the supplied settings.

Parameters
[in,out]acA Ptr to an IRHaierACYRW02 object to use.
[in]onThe power setting.
[in]modeThe operation mode setting.
[in]celsiusTemperature units. True is Celsius, False is Fahrenheit.
[in]degreesThe temperature setting in degrees.
[in]fanThe speed setting for the fan.
[in]swingvThe vertical swing setting.
[in]swinghThe horizontal swing setting.
[in]turboRun the device in turbo/powerful mode.
[in]quietRun the device in quiet mode.
[in]filterTurn on the (ion/pollen/etc) filter mode.
[in]sleepNr. of minutes for sleep mode. -1 is Off, >= 0 is on.

◆ handleToggles()

stdAc::state_t IRac::handleToggles ( const stdAc::state_t  desired,
const stdAc::state_t prev = NULL 
)
staticprivate

Create a new state base on desired & previous states but handle any state changes for options that need to be toggled.

Parameters
[in]desiredThe state_t structure describing the desired a/c state.
[in]prevA Ptr to the previous state_t structure.
Returns
A stdAc::state_t with the needed settings.

◆ hasStateChanged()

bool IRac::hasStateChanged ( void  )

Check if the internal state has changed from what was previously sent.

Note
The comparison excludes the clock.
Returns
True if it has changed, False if not.

◆ hitachi()

void IRac::hitachi ( IRHitachiAc ac,
const bool  on,
const stdAc::opmode_t  mode,
const float  degrees,
const stdAc::fanspeed_t  fan,
const stdAc::swingv_t  swingv,
const stdAc::swingh_t  swingh 
)
private

Send a Hitachi A/C message with the supplied settings.

Parameters
[in,out]acA Ptr to an IRHitachiAc object to use.
[in]onThe power setting.
[in]modeThe operation mode setting.
[in]degreesThe temperature setting in degrees.
[in]fanThe speed setting for the fan.
[in]swingvThe vertical swing setting.
[in]swinghThe horizontal swing setting.

◆ hitachi1()

void IRac::hitachi1 ( IRHitachiAc1 ac,
const hitachi_ac1_remote_model_t  model,
const bool  on,
const bool  power_toggle,
const stdAc::opmode_t  mode,
const float  degrees,
const stdAc::fanspeed_t  fan,
const stdAc::swingv_t  swingv,
const stdAc::swingh_t  swingh,
const bool  swing_toggle,
const int16_t  sleep = -1 
)
private

Send a Hitachi1 A/C message with the supplied settings.

Parameters
[in,out]acA Ptr to an IRHitachiAc1 object to use.
[in]modelThe A/C model to use.
[in]onThe power setting.
[in]power_toggleThe power toggle setting.
[in]modeThe operation mode setting.
[in]degreesThe temperature setting in degrees.
[in]fanThe speed setting for the fan.
[in]swingvThe vertical swing setting.
[in]swinghThe horizontal swing setting.
[in]swing_toggleThe swing_toggle setting.
[in]sleepNr. of minutes for sleep mode. -1 is Off, >= 0 is on.
Note
The sleep mode used is the "Sleep 2" setting.

◆ hitachi264()

void IRac::hitachi264 ( IRHitachiAc264 ac,
const bool  on,
const stdAc::opmode_t  mode,
const float  degrees,
const stdAc::fanspeed_t  fan 
)
private

Send a Hitachi 264-bit A/C message with the supplied settings.

Parameters
[in,out]acA Ptr to an IRHitachiAc264 object to use.
[in]onThe power setting.
[in]modeThe operation mode setting.
[in]degreesThe temperature setting in degrees.
[in]fanThe speed setting for the fan.

◆ hitachi296()

void IRac::hitachi296 ( IRHitachiAc296 ac,
const bool  on,
const stdAc::opmode_t  mode,
const float  degrees,
const stdAc::fanspeed_t  fan 
)
private

Send a Hitachi 296-bit A/C message with the supplied settings.

Parameters
[in,out]acA Ptr to an IRHitachiAc296 object to use.
[in]onThe power setting.
[in]modeThe operation mode setting.
[in]degreesThe temperature setting in degrees.
[in]fanThe speed setting for the fan.

◆ hitachi344()

void IRac::hitachi344 ( IRHitachiAc344 ac,
const bool  on,
const stdAc::opmode_t  mode,
const float  degrees,
const stdAc::fanspeed_t  fan,
const stdAc::swingv_t  swingv,
const stdAc::swingh_t  swingh 
)
private

Send a Hitachi 344-bit A/C message with the supplied settings.

Parameters
[in,out]acA Ptr to an IRHitachiAc344 object to use.
[in]onThe power setting.
[in]modeThe operation mode setting.
[in]degreesThe temperature setting in degrees.
[in]fanThe speed setting for the fan.
[in]swingvThe vertical swing setting.
[in]swinghThe horizontal swing setting.

◆ hitachi424()

void IRac::hitachi424 ( IRHitachiAc424 ac,
const bool  on,
const stdAc::opmode_t  mode,
const float  degrees,
const stdAc::fanspeed_t  fan,
const stdAc::swingv_t  swingv 
)
private

Send a Hitachi 424-bit A/C message with the supplied settings.

Parameters
[in,out]acA Ptr to an IRHitachiAc424 object to use.
[in]onThe power setting.
[in]modeThe operation mode setting.
[in]degreesThe temperature setting in degrees.
[in]fanThe speed setting for the fan.
[in]swingvThe vertical swing setting.

◆ initState() [1/2]

void IRac::initState ( stdAc::state_t state)
static

Initialise the given state with the supplied settings.

Parameters
[out]stateA Ptr to where the settings will be stored.
Note
Sets all the parameters to reasonable base/automatic defaults.

◆ initState() [2/2]

void IRac::initState ( stdAc::state_t state,
const decode_type_t  vendor,
const int16_t  model,
const bool  power,
const stdAc::opmode_t  mode,
const float  degrees,
const bool  celsius,
const stdAc::fanspeed_t  fan,
const stdAc::swingv_t  swingv,
const stdAc::swingh_t  swingh,
const bool  quiet,
const bool  turbo,
const bool  econo,
const bool  light,
const bool  filter,
const bool  clean,
const bool  beep,
const int16_t  sleep,
const int16_t  clock 
)
static

Initialise the given state with the supplied settings.

Parameters
[out]stateA Ptr to where the settings will be stored.
[in]vendorThe vendor/protocol type.
[in]modelThe A/C model if applicable.
[in]powerThe power setting.
[in]modeThe operation mode setting.
[in]degreesThe temperature setting in degrees.
[in]celsiusTemperature units. True is Celsius, False is Fahrenheit.
[in]fanThe speed setting for the fan.
[in]swingvThe vertical swing setting.
[in]swinghThe horizontal swing setting.
[in]quietRun the device in quiet/silent mode.
[in]turboRun the device in turbo/powerful mode.
[in]econoRun the device in economical mode.
[in]lightTurn on the LED/Display mode.
[in]filterTurn on the (ion/pollen/etc) filter mode.
[in]cleanTurn on the self-cleaning mode. e.g. Mould, dry filters etc
[in]beepEnable/Disable beeps when receiving IR messages.
[in]sleepNr. of minutes for sleep mode. -1 is Off, >= 0 is on. Some devices it is the nr. of mins to run for. Others it may be the time to enter/exit sleep mode. i.e. Time in Nr. of mins since midnight.
[in]clockThe time in Nr. of mins since midnight. < 0 is ignore.

◆ isProtocolSupported()

bool IRac::isProtocolSupported ( const decode_type_t  protocol)
static

Is the given protocol supported by the IRac class?

Parameters
[in]protocolThe vendor/protocol type.
Returns
true if the protocol is supported by this class, otherwise false.

◆ kelon()

void IRac::kelon ( IRKelonAc ac,
const bool  togglePower,
const stdAc::opmode_t  mode,
const int8_t  dryGrade,
const float  degrees,
const stdAc::fanspeed_t  fan,
const bool  toggleSwing,
const bool  superCool,
const int16_t  sleep 
)
private

Send a Kelon A/C message with the supplied settings.

Parameters
[in,out]acA Ptr to an IRKelonAc object to use.
[in]togglePowerWhether to toggle the unit's power
[in]modeThe operation mode setting.
[in]dryGradeThe dehumidification intensity grade
[in]degreesThe temperature setting in degrees.
[in]fanThe speed setting for the fan.
[in]toggleSwingWhether to toggle the swing setting
[in]superCoolRun the device in Super cooling mode.
[in]sleepNr. of minutes for sleep mode. -1 is Off, >= 0 is on

◆ kelvinator()

void IRac::kelvinator ( IRKelvinatorAC ac,
const bool  on,
const stdAc::opmode_t  mode,
const float  degrees,
const stdAc::fanspeed_t  fan,
const stdAc::swingv_t  swingv,
const stdAc::swingh_t  swingh,
const bool  quiet,
const bool  turbo,
const bool  light,
const bool  filter,
const bool  clean 
)
private

Send a Kelvinator A/C message with the supplied settings.

Parameters
[in,out]acA Ptr to an IRKelvinatorAC object to use.
[in]onThe power setting.
[in]modeThe operation mode setting.
[in]degreesThe temperature setting in degrees.
[in]fanThe speed setting for the fan.
[in]swingvThe vertical swing setting.
[in]swinghThe horizontal swing setting.
[in]quietRun the device in quiet/silent mode.
[in]turboRun the device in turbo/powerful mode.
[in]lightTurn on the LED/Display mode.
[in]filterTurn on the (ion/pollen/etc) filter mode.
[in]cleanTurn on the self-cleaning mode. e.g. XFan, dry filters etc

◆ lg()

void IRac::lg ( IRLgAc ac,
const lg_ac_remote_model_t  model,
const bool  on,
const stdAc::opmode_t  mode,
const float  degrees,
const stdAc::fanspeed_t  fan,
const stdAc::swingv_t  swingv,
const stdAc::swingv_t  swingv_prev,
const stdAc::swingh_t  swingh,
const bool  light 
)
private

Send a LG A/C message with the supplied settings.

Parameters
[in,out]acA Ptr to an IRLgAc object to use.
[in]modelThe A/C model to use.
[in]onThe power setting.
[in]modeThe operation mode setting.
[in]degreesThe temperature setting in degrees.
[in]fanThe speed setting for the fan.
[in]swingvThe vertical swing setting.
[in]swingv_prevThe previous vertical swing setting.
[in]swinghThe horizontal swing setting.
[in]lightTurn on the LED/Display mode.

◆ markAsSent()

void IRac::markAsSent ( void  )

Update the previous state to the current one.

◆ midea()

void IRac::midea ( IRMideaAC ac,
const bool  on,
const stdAc::opmode_t  mode,
const bool  celsius,
const float  degrees,
const float  sensorTemp,
const stdAc::fanspeed_t  fan,
const stdAc::swingv_t  swingv,
const bool  iFeel,
const bool  quiet,
const bool  quiet_prev,
const bool  turbo,
const bool  econo,
const bool  light,
const bool  clean,
const int16_t  sleep = -1 
)
private

Send a Midea A/C message with the supplied settings.

Parameters
[in,out]acA Ptr to an IRMideaAC object to use.
[in]onThe power setting.
[in]modeThe operation mode setting.
[in]celsiusTemperature units. True is Celsius, False is Fahrenheit.
[in]degreesThe temperature setting in degrees.
[in]sensorTempThe room (iFeel) temperature sensor reading in degrees.
[in]fanThe speed setting for the fan.
[in]swingvThe vertical swing setting.
[in]iFeelWhether to enable iFeel (remote temp) mode on the A/C unit.
[in]quietRun the device in quiet/silent mode.
[in]quiet_prevThe device's previous quiet/silent mode.
[in]turboToggle the device's turbo/powerful mode.
[in]econoToggle the device's economical mode.
[in]lightToggle the LED/Display mode.
[in]cleanTurn on the self-cleaning mode. e.g. XFan, dry filters etc
[in]sleepNr. of minutes for sleep mode. -1 is Off, >= 0 is on.
Note
On Danby A/C units, swingv controls the Ion Filter instead.

◆ mirage()

void IRac::mirage ( IRMirageAc ac,
const stdAc::state_t  state 
)
private

Send a Mirage 120-bit A/C message with the supplied settings.

Parameters
[in,out]acA Ptr to an IRMitsubishiAC object to use.
[in]stateThe desired state to send.

◆ mitsubishi()

void IRac::mitsubishi ( IRMitsubishiAC ac,
const bool  on,
const stdAc::opmode_t  mode,
const float  degrees,
const stdAc::fanspeed_t  fan,
const stdAc::swingv_t  swingv,
const stdAc::swingh_t  swingh,
const bool  quiet,
const int16_t  clock = -1 
)
private

Send a Mitsubishi A/C message with the supplied settings.

Parameters
[in,out]acA Ptr to an IRMitsubishiAC object to use.
[in]onThe power setting.
[in]modeThe operation mode setting.
[in]degreesThe temperature setting in degrees.
[in]fanThe speed setting for the fan.
[in]swingvThe vertical swing setting.
[in]swinghThe horizontal swing setting.
[in]quietRun the device in quiet/silent mode.
[in]clockThe time in Nr. of mins since midnight. < 0 is ignore.
Note
Clock can only be set in 10 minute increments. i.e. % 10.

◆ mitsubishi112()

void IRac::mitsubishi112 ( IRMitsubishi112 ac,
const bool  on,
const stdAc::opmode_t  mode,
const float  degrees,
const stdAc::fanspeed_t  fan,
const stdAc::swingv_t  swingv,
const stdAc::swingh_t  swingh,
const bool  quiet 
)
private

Send a Mitsubishi 112-bit A/C message with the supplied settings.

Parameters
[in,out]acA Ptr to an IRMitsubishi112 object to use.
[in]onThe power setting.
[in]modeThe operation mode setting.
[in]degreesThe temperature setting in degrees.
[in]fanThe speed setting for the fan.
[in]swingvThe vertical swing setting.
[in]swinghThe horizontal swing setting.
[in]quietRun the device in quiet/silent mode.

◆ mitsubishi136()

void IRac::mitsubishi136 ( IRMitsubishi136 ac,
const bool  on,
const stdAc::opmode_t  mode,
const float  degrees,
const stdAc::fanspeed_t  fan,
const stdAc::swingv_t  swingv,
const bool  quiet 
)
private

Send a Mitsubishi 136-bit A/C message with the supplied settings.

Parameters
[in,out]acA Ptr to an IRMitsubishi136 object to use.
[in]onThe power setting.
[in]modeThe operation mode setting.
[in]degreesThe temperature setting in degrees.
[in]fanThe speed setting for the fan.
[in]swingvThe vertical swing setting.
[in]quietRun the device in quiet/silent mode.

◆ mitsubishiHeavy152()

void IRac::mitsubishiHeavy152 ( IRMitsubishiHeavy152Ac ac,
const bool  on,
const stdAc::opmode_t  mode,
const float  degrees,
const stdAc::fanspeed_t  fan,
const stdAc::swingv_t  swingv,
const stdAc::swingh_t  swingh,
const bool  quiet,
const bool  turbo,
const bool  econo,
const bool  filter,
const bool  clean,
const int16_t  sleep = -1 
)
private

Send a Mitsubishi Heavy 152-bit A/C message with the supplied settings.

Parameters
[in,out]acA Ptr to an IRMitsubishiHeavy152Ac object to use.
[in]onThe power setting.
[in]modeThe operation mode setting.
[in]degreesThe temperature setting in degrees.
[in]fanThe speed setting for the fan.
[in]swingvThe vertical swing setting.
[in]swinghThe horizontal swing setting.
[in]quietRun the device in quiet/silent mode.
[in]turboRun the device in turbo/powerful mode.
[in]econoRun the device in economical mode.
[in]filterTurn on the (ion/pollen/etc) filter mode.
[in]cleanTurn on the self-cleaning mode. e.g. Mould, dry filters etc
[in]sleepNr. of minutes for sleep mode. -1 is Off, >= 0 is on.

◆ mitsubishiHeavy88()

void IRac::mitsubishiHeavy88 ( IRMitsubishiHeavy88Ac ac,
const bool  on,
const stdAc::opmode_t  mode,
const float  degrees,
const stdAc::fanspeed_t  fan,
const stdAc::swingv_t  swingv,
const stdAc::swingh_t  swingh,
const bool  turbo,
const bool  econo,
const bool  clean 
)
private

Send a Mitsubishi Heavy 88-bit A/C message with the supplied settings.

Parameters
[in,out]acA Ptr to an IRMitsubishiHeavy88Ac object to use.
[in]onThe power setting.
[in]modeThe operation mode setting.
[in]degreesThe temperature setting in degrees.
[in]fanThe speed setting for the fan.
[in]swingvThe vertical swing setting.
[in]swinghThe horizontal swing setting.
[in]turboRun the device in turbo/powerful mode.
[in]econoRun the device in economical mode.
[in]cleanTurn on the self-cleaning mode. e.g. Mould, dry filters etc

◆ neoclima()

void IRac::neoclima ( IRNeoclimaAc ac,
const bool  on,
const stdAc::opmode_t  mode,
const bool  celsius,
const float  degrees,
const stdAc::fanspeed_t  fan,
const stdAc::swingv_t  swingv,
const stdAc::swingh_t  swingh,
const bool  turbo,
const bool  econo,
const bool  light,
const bool  filter,
const int16_t  sleep = -1 
)
private

Send a Neoclima A/C message with the supplied settings.

Parameters
[in,out]acA Ptr to an IRNeoclimaAc object to use.
[in]onThe power setting.
[in]modeThe operation mode setting.
[in]celsiusTemperature units. True is Celsius, False is Fahrenheit.
[in]degreesThe temperature setting in degrees.
[in]fanThe speed setting for the fan.
[in]swingvThe vertical swing setting.
[in]swinghThe horizontal swing setting.
[in]turboRun the device in turbo/powerful mode.
[in]econoRun the device in economical mode.
[in]lightTurn on the LED/Display mode.
[in]filterTurn on the (ion/pollen/etc) filter mode.
[in]sleepNr. of minutes for sleep mode. -1 is Off, >= 0 is on.

◆ opmodeToString()

String IRac::opmodeToString ( const stdAc::opmode_t  mode,
const bool  ha = false 
)
static

Convert the supplied operation mode into the appropriate String.

Parameters
[in]modeThe enum to be converted.
[in]haA flag to indicate we want GoogleHome/HomeAssistant output.
Returns
The equivalent String for the locale.

◆ panasonic()

void IRac::panasonic ( IRPanasonicAc ac,
const panasonic_ac_remote_model_t  model,
const bool  on,
const stdAc::opmode_t  mode,
const float  degrees,
const stdAc::fanspeed_t  fan,
const stdAc::swingv_t  swingv,
const stdAc::swingh_t  swingh,
const bool  quiet,
const bool  turbo,
const bool  filter,
const int16_t  clock = -1 
)
private

Send a Panasonic A/C message with the supplied settings.

Parameters
[in,out]acA Ptr to an IRPanasonicAc object to use.
[in]modelThe A/C model to use.
[in]onThe power setting.
[in]modeThe operation mode setting.
[in]degreesThe temperature setting in degrees.
[in]fanThe speed setting for the fan.
[in]swingvThe vertical swing setting.
[in]swinghThe horizontal swing setting.
[in]quietRun the device in quiet/silent mode.
[in]turboRun the device in turbo/powerful mode.
[in]filterTurn on the (ion/pollen/etc) filter mode.
[in]clockThe time in Nr. of mins since midnight. < 0 is ignore.

◆ panasonic32()

void IRac::panasonic32 ( IRPanasonicAc32 ac,
const bool  on,
const stdAc::opmode_t  mode,
const float  degrees,
const stdAc::fanspeed_t  fan,
const stdAc::swingv_t  swingv,
const stdAc::swingh_t  swingh 
)
private

Send a Panasonic A/C message with the supplied settings.

Parameters
[in,out]acA Ptr to an IRPanasonicAc32 object to use.
[in]onThe power setting.
[in]modeThe operation mode setting.
[in]degreesThe temperature setting in degrees.
[in]fanThe speed setting for the fan.
[in]swingvThe vertical swing setting.
[in]swinghThe horizontal swing setting.

◆ rhoss()

void IRac::rhoss ( IRRhossAc ac,
const bool  on,
const stdAc::opmode_t  mode,
const float  degrees,
const stdAc::fanspeed_t  fan,
const stdAc::swingv_t  swing 
)
private

Send an Rhoss A/C message with the supplied settings.

Parameters
[in,out]acA Ptr to an IRRhossAc object to use.
[in]onThe power setting.
[in]modeThe operation mode setting.
[in]degreesThe temperature setting in degrees.
[in]fanThe speed setting for the fan.
[in]swingThe swing setting.

◆ samsung()

void IRac::samsung ( IRSamsungAc ac,
const bool  on,
const stdAc::opmode_t  mode,
const float  degrees,
const stdAc::fanspeed_t  fan,
const stdAc::swingv_t  swingv,
const stdAc::swingh_t  swingh,
const bool  quiet,
const bool  turbo,
const bool  econo,
const bool  light,
const bool  filter,
const bool  clean,
const bool  beep,
const int16_t  sleep = -1,
const bool  prevpower = true,
const int16_t  prevsleep = -1,
const bool  forceextended = true 
)
private

Send a Samsung A/C message with the supplied settings.

Note
Multiple IR messages may be generated & sent.
Parameters
[in,out]acA Ptr to an IRSamsungAc object to use.
[in]onThe power setting.
[in]modeThe operation mode setting.
[in]degreesThe temperature setting in degrees.
[in]fanThe speed setting for the fan.
[in]swingvThe vertical swing setting.
[in]swinghThe horizontal swing setting.
[in]quietRun the device in quiet/silent mode.
[in]turboRun the device in turbo/powerful mode.
[in]econoRun the device in economical mode.
[in]lightTurn on the LED/Display mode.
[in]filterTurn on the (ion/pollen/etc) filter mode.
[in]cleanToggle the self-cleaning mode. e.g. Mould, dry filters etc
[in]beepToggle beep setting for receiving IR messages.
[in]sleepNr. of minutes for sleep mode. <= 0 is Off, > 0 is on.
[in]prevpowerThe power setting from the previous A/C state.
[in]prevsleepNr. of minutes for sleep from the previous A/C state.
[in]forceextendedDo we force sending the special extended message?

◆ sanyo()

void IRac::sanyo ( IRSanyoAc ac,
const bool  on,
const stdAc::opmode_t  mode,
const float  degrees,
const float  sensorTemp,
const stdAc::fanspeed_t  fan,
const stdAc::swingv_t  swingv,
const bool  iFeel,
const bool  beep,
const int16_t  sleep = -1 
)
private

Send a Sanyo A/C message with the supplied settings.

Parameters
[in,out]acA Ptr to an IRSanyoAc object to use.
[in]onThe power setting.
[in]modeThe operation mode setting.
[in]degreesThe temperature setting in degrees.
[in]sensorTempThe room (iFeel) temperature sensor reading in degrees Celsius.
[in]fanThe speed setting for the fan.
[in]swingvThe vertical swing setting.
[in]iFeelWhether to enable iFeel (remote temp) mode on the A/C unit.
[in]beepEnable/Disable beeps when receiving IR messages.
[in]sleepNr. of minutes for sleep mode. -1 is Off, >= 0 is on.

◆ sanyo88()

void IRac::sanyo88 ( IRSanyoAc88 ac,
const bool  on,
const stdAc::opmode_t  mode,
const float  degrees,
const stdAc::fanspeed_t  fan,
const stdAc::swingv_t  swingv,
const bool  turbo,
const bool  filter,
const int16_t  sleep = -1,
const int16_t  clock = -1 
)
private

Send a Sanyo 88-bit A/C message with the supplied settings.

Parameters
[in,out]acA Ptr to an IRSanyoAc88 object to use.
[in]onThe power setting.
[in]modeThe operation mode setting.
[in]degreesThe temperature setting in degrees.
[in]fanThe speed setting for the fan.
[in]swingvThe vertical swing setting.
[in]turboRun the device in turbo/powerful mode.
[in]filterTurn on the (ion/pollen/etc) filter mode.
[in]sleepNr. of minutes for sleep mode. -1 is Off, >= 0 is on.
[in]clockThe time in Nr. of mins since midnight. < 0 is ignore.

◆ sendAc() [1/3]

bool IRac::sendAc ( const decode_type_t  vendor,
const int16_t  model,
const bool  power,
const stdAc::opmode_t  mode,
const float  degrees,
const bool  celsius,
const stdAc::fanspeed_t  fan,
const stdAc::swingv_t  swingv,
const stdAc::swingh_t  swingh,
const bool  quiet,
const bool  turbo,
const bool  econo,
const bool  light,
const bool  filter,
const bool  clean,
const bool  beep,
const int16_t  sleep = -1,
const int16_t  clock = -1 
)

Send A/C message for a given device using common A/C settings.

Parameters
[in]vendorThe vendor/protocol type.
[in]modelThe A/C model if applicable.
[in]powerThe power setting.
[in]modeThe operation mode setting.
Note
Changing mode from "Off" to something else does NOT turn on a device. You need to use power for that.
Parameters
[in]degreesThe temperature setting in degrees.
[in]celsiusTemperature units. True is Celsius, False is Fahrenheit.
[in]fanThe speed setting for the fan.
Note
The following are all "if supported" by the underlying A/C classes.
Parameters
[in]swingvThe vertical swing setting.
[in]swinghThe horizontal swing setting.
[in]quietRun the device in quiet/silent mode.
[in]turboRun the device in turbo/powerful mode.
[in]econoRun the device in economical mode.
[in]lightTurn on the LED/Display mode.
[in]filterTurn on the (ion/pollen/etc) filter mode.
[in]cleanTurn on the self-cleaning mode. e.g. Mould, dry filters etc
[in]beepEnable/Disable beeps when receiving IR messages.
[in]sleepNr. of minutes for sleep mode. -1 is Off, >= 0 is on. Some devices it is the nr. of mins to run for. Others it may be the time to enter/exit sleep mode. i.e. Time in Nr. of mins since midnight.
[in]clockThe time in Nr. of mins since midnight. < 0 is ignore.
Returns
True, if accepted/converted/attempted etc. False, if unsupported.

◆ sendAc() [2/3]

bool IRac::sendAc ( const stdAc::state_t  desired,
const stdAc::state_t prev = NULL 
)

Send A/C message for a given device using state_t structures.

Parameters
[in]desiredThe state_t structure describing the desired new ac state
[in]prevA Ptr to the state_t structure containing the previous state
Note
Changing mode from "Off" to something else does NOT turn on a device. You need to use power for that.
Returns
True, if accepted/converted/attempted etc. False, if unsupported.
Warning
: this is ABUSING current common parameters: clock and sleep as config key and value Hence, value pre-validation is performed (safe-mode) to avoid accidental device misconfiguration

◆ sendAc() [3/3]

bool IRac::sendAc ( void  )

Send an A/C message based soley on our internal state.

Returns
True, if accepted/converted/attempted. False, if unsupported.

◆ sharp()

void IRac::sharp ( IRSharpAc ac,
const sharp_ac_remote_model_t  model,
const bool  on,
const bool  prev_power,
const stdAc::opmode_t  mode,
const float  degrees,
const stdAc::fanspeed_t  fan,
const stdAc::swingv_t  swingv,
const stdAc::swingv_t  swingv_prev,
const bool  turbo,
const bool  light,
const bool  filter,
const bool  clean 
)
private

Send a Sharp A/C message with the supplied settings.

Note
Multiple IR messages may be generated & sent.
Parameters
[in,out]acA Ptr to an IRSharpAc object to use.
[in]modelThe A/C model to use.
[in]onThe power setting.
[in]prev_powerThe power setting from the previous A/C state.
[in]modeThe operation mode setting.
[in]degreesThe temperature setting in degrees.
[in]fanThe speed setting for the fan.
[in]swingvThe vertical swing setting.
[in]swingv_prevThe previous vertical swing setting.
[in]turboRun the device in turbo/powerful mode.
[in]lightTurn on the LED/Display mode.
[in]filterTurn on the (ion/pollen/etc) filter mode.
[in]cleanTurn on the self-cleaning mode. e.g. Mould, dry filters etc

◆ strToBool()

bool IRac::strToBool ( const char *  str,
const bool  def = false 
)
static

Convert the supplied str into the appropriate boolean value.

Parameters
[in]strA Ptr to a C-style string to be converted.
[in]defThe boolean value to return if no conversion was possible.
Returns
The equivalent boolean value.

◆ strToCommandType()

stdAc::ac_command_t IRac::strToCommandType ( const char *  str,
const stdAc::ac_command_t  def = stdAc::ac_command_t::kControlCommand 
)
static

Convert the supplied str into the appropriate enum.

Parameters
[in]strA Ptr to a C-style string to be converted.
[in]defThe enum to return if no conversion was possible.
Returns
The equivalent enum.

◆ strToFanspeed()

stdAc::fanspeed_t IRac::strToFanspeed ( const char *  str,
const stdAc::fanspeed_t  def = stdAc::fanspeed_t::kAuto 
)
static

Convert the supplied str into the appropriate enum.

Parameters
[in]strA Ptr to a C-style string to be converted.
[in]defThe enum to return if no conversion was possible.
Returns
The equivalent enum.

◆ strToModel()

int16_t IRac::strToModel ( const char *  str,
const int16_t  def = -1 
)
static

Convert the supplied str into the appropriate enum.

Note
Assumes str is the model code or an integer >= 1.
Parameters
[in]strA Ptr to a C-style string to be converted.
[in]defThe enum to return if no conversion was possible.
Returns
The equivalent enum.
Note
After adding a new model you should update modelToStr() too.

◆ strToOpmode()

stdAc::opmode_t IRac::strToOpmode ( const char *  str,
const stdAc::opmode_t  def = stdAc::opmode_t::kAuto 
)
static

Convert the supplied str into the appropriate enum.

Parameters
[in]strA Ptr to a C-style string to be converted.
[in]defThe enum to return if no conversion was possible.
Returns
The equivalent enum.

◆ strToSwingH()

stdAc::swingh_t IRac::strToSwingH ( const char *  str,
const stdAc::swingh_t  def = stdAc::swingh_t::kOff 
)
static

Convert the supplied str into the appropriate enum.

Parameters
[in]strA Ptr to a C-style string to be converted.
[in]defThe enum to return if no conversion was possible.
Returns
The equivalent enum.

◆ strToSwingV()

stdAc::swingv_t IRac::strToSwingV ( const char *  str,
const stdAc::swingv_t  def = stdAc::swingv_t::kOff 
)
static

Convert the supplied str into the appropriate enum.

Parameters
[in]strA Ptr to a C-style string to be converted.
[in]defThe enum to return if no conversion was possible.
Returns
The equivalent enum.

◆ swinghToString()

String IRac::swinghToString ( const stdAc::swingh_t  swingh)
static

Convert the supplied enum into the appropriate String.

Parameters
[in]swinghThe enum to be converted.
Returns
The equivalent String for the locale.

◆ swingvToString()

String IRac::swingvToString ( const stdAc::swingv_t  swingv)
static

Convert the supplied enum into the appropriate String.

Parameters
[in]swingvThe enum to be converted.
Returns
The equivalent String for the locale.

◆ tcl112()

void IRac::tcl112 ( IRTcl112Ac ac,
const tcl_ac_remote_model_t  model,
const bool  on,
const stdAc::opmode_t  mode,
const float  degrees,
const stdAc::fanspeed_t  fan,
const stdAc::swingv_t  swingv,
const stdAc::swingh_t  swingh,
const bool  quiet,
const bool  turbo,
const bool  light,
const bool  econo,
const bool  filter 
)
private

Send a TCL 112-bit A/C message with the supplied settings.

Parameters
[in,out]acA Ptr to an IRTcl112Ac object to use.
[in]modelThe A/C model to use.
[in]onThe power setting.
[in]modeThe operation mode setting.
[in]degreesThe temperature setting in degrees.
[in]fanThe speed setting for the fan.
[in]swingvThe vertical swing setting.
[in]swinghThe horizontal swing setting.
[in]quietRun the device in quiet/silent mode.
[in]turboRun the device in turbo/powerful mode.
[in]lightTurn on the LED/Display mode.
[in]econoRun the device in economical mode.
[in]filterTurn on the (ion/pollen/etc) filter mode.

◆ technibel()

void IRac::technibel ( IRTechnibelAc ac,
const bool  on,
const stdAc::opmode_t  mode,
const bool  celsius,
const float  degrees,
const stdAc::fanspeed_t  fan,
const stdAc::swingv_t  swingv,
const int16_t  sleep = -1 
)
private

Send a Technibel A/C message with the supplied settings.

Parameters
[in,out]acA Ptr to an IRTechnibelAc object to use.
[in]onThe power setting.
[in]modeThe operation mode setting.
[in]celsiusTemperature units. True is Celsius, False is Fahrenheit.
[in]degreesThe temperature setting in degrees.
[in]fanThe speed setting for the fan.
[in]swingvThe vertical swing setting.
[in]sleepNr. of minutes for sleep mode. -1 is Off, >= 0 is on.

◆ teco()

void IRac::teco ( IRTecoAc ac,
const bool  on,
const stdAc::opmode_t  mode,
const float  degrees,
const stdAc::fanspeed_t  fan,
const stdAc::swingv_t  swingv,
const bool  light,
const int16_t  sleep = -1 
)
private

Send a Teco A/C message with the supplied settings.

Parameters
[in,out]acA Ptr to an IRTecoAc object to use.
[in]onThe power setting.
[in]modeThe operation mode setting.
[in]degreesThe temperature setting in degrees.
[in]fanThe speed setting for the fan.
[in]swingvThe vertical swing setting.
[in]lightTurn on the LED/Display mode.
[in]sleepNr. of minutes for sleep mode. -1 is Off, >= 0 is on.

◆ toshiba()

void IRac::toshiba ( IRToshibaAC ac,
const bool  on,
const stdAc::opmode_t  mode,
const float  degrees,
const stdAc::fanspeed_t  fan,
const stdAc::swingv_t  swingv,
const bool  turbo,
const bool  econo,
const bool  filter 
)
private

Send a Toshiba A/C message with the supplied settings.

Parameters
[in,out]acA Ptr to an IRToshibaAC object to use.
[in]onThe power setting.
[in]modeThe operation mode setting.
[in]degreesThe temperature setting in degrees.
[in]fanThe speed setting for the fan.
[in]swingvThe vertical swing setting.
[in]turboRun the device in turbo/powerful mode.
[in]econoRun the device in economical mode.
[in]filterTurn on the (Pure/ion/pollen/etc) filter mode.

◆ transcold()

void IRac::transcold ( IRTranscoldAc ac,
const bool  on,
const stdAc::opmode_t  mode,
const float  degrees,
const stdAc::fanspeed_t  fan,
const stdAc::swingv_t  swingv,
const stdAc::swingh_t  swingh 
)
private

Send a Transcold A/C message with the supplied settings.

Note
May result in multiple messages being sent.
Parameters
[in,out]acA Ptr to an IRTranscoldAc object to use.
[in]onThe power setting.
[in]modeThe operation mode setting.
[in]degreesThe temperature setting in degrees.
[in]fanThe speed setting for the fan.
[in]swingvThe vertical swing setting.
[in]swinghThe horizontal swing setting.
Note
-1 is Off, >= 0 is on.

◆ trotec()

void IRac::trotec ( IRTrotecESP ac,
const bool  on,
const stdAc::opmode_t  mode,
const float  degrees,
const stdAc::fanspeed_t  fan,
const int16_t  sleep = -1 
)
private

Send a Trotec A/C message with the supplied settings.

Parameters
[in,out]acA Ptr to an IRTrotecESP object to use.
[in]onThe power setting.
[in]modeThe operation mode setting.
[in]degreesThe temperature setting in degrees.
[in]fanThe speed setting for the fan.
[in]sleepNr. of minutes for sleep mode. -1 is Off, >= 0 is on.

◆ trotec3550()

void IRac::trotec3550 ( IRTrotec3550 ac,
const bool  on,
const stdAc::opmode_t  mode,
const bool  celsius,
const float  degrees,
const stdAc::fanspeed_t  fan,
const stdAc::swingv_t  swingv 
)
private

Send a Trotec 3550 A/C message with the supplied settings.

Parameters
[in,out]acA Ptr to an IRTrotecESP object to use.
[in]onThe power setting.
[in]modeThe operation mode setting.
[in]celsiusTemperature units. True is Celsius, False is Fahrenheit.
[in]degreesThe temperature setting in degrees.
[in]fanThe speed setting for the fan.
[in]swingvThe vertical swing setting.

◆ truma()

void IRac::truma ( IRTrumaAc ac,
const bool  on,
const stdAc::opmode_t  mode,
const float  degrees,
const stdAc::fanspeed_t  fan,
const bool  quiet 
)
private

Send a Truma A/C message with the supplied settings.

Parameters
[in,out]acA Ptr to an IRTrumaAc object to use.
[in]onThe power setting.
[in]modeThe operation mode setting.
[in]degreesThe temperature setting in degrees.
[in]fanThe speed setting for the fan.
[in]quietRun the device quietly if we can.

◆ vestel()

void IRac::vestel ( IRVestelAc ac,
const bool  on,
const stdAc::opmode_t  mode,
const float  degrees,
const stdAc::fanspeed_t  fan,
const stdAc::swingv_t  swingv,
const bool  turbo,
const bool  filter,
const int16_t  sleep = -1,
const int16_t  clock = -1,
const bool  sendNormal = true 
)
private

Send a Vestel A/C message with the supplied settings.

Parameters
[in,out]acA Ptr to an IRVestelAc object to use.
[in]onThe power setting.
[in]modeThe operation mode setting.
[in]degreesThe temperature setting in degrees.
[in]fanThe speed setting for the fan.
[in]swingvThe vertical swing setting.
[in]turboRun the device in turbo/powerful mode.
[in]filterTurn on the (ion/pollen/etc) filter mode.
[in]sleepNr. of minutes for sleep mode. -1 is Off, >= 0 is on.
[in]clockThe time in Nr. of mins since midnight. < 0 is ignore.
[in]sendNormalDo we send a Normal settings message at all? i.e In addition to the clock/time/timer message

◆ voltas()

void IRac::voltas ( IRVoltas ac,
const voltas_ac_remote_model_t  model,
const bool  on,
const stdAc::opmode_t  mode,
const float  degrees,
const stdAc::fanspeed_t  fan,
const stdAc::swingv_t  swingv,
const stdAc::swingh_t  swingh,
const bool  turbo,
const bool  econo,
const bool  light,
const int16_t  sleep = -1 
)
private

Send a Voltas A/C message with the supplied settings.

Parameters
[in,out]acA Ptr to an IRVoltas object to use.
[in]modelThe A/C model to use.
[in]onThe power setting.
[in]modeThe operation mode setting.
[in]degreesThe temperature setting in degrees.
[in]fanThe speed setting for the fan.
[in]swingvThe vertical swing setting.
[in]swinghThe horizontal swing setting.
[in]turboRun the device in turbo/powerful mode.
[in]econoRun the device in economical mode.
[in]lightTurn on the LED/Display mode.
[in]sleepNr. of minutes for sleep mode. -1 is Off, >= 0 is on.

◆ whirlpool()

void IRac::whirlpool ( IRWhirlpoolAc ac,
const whirlpool_ac_remote_model_t  model,
const bool  on,
const stdAc::opmode_t  mode,
const float  degrees,
const stdAc::fanspeed_t  fan,
const stdAc::swingv_t  swingv,
const bool  turbo,
const bool  light,
const int16_t  sleep = -1,
const int16_t  clock = -1 
)
private

Send a Whirlpool A/C message with the supplied settings.

Parameters
[in,out]acA Ptr to an IRWhirlpoolAc object to use.
[in]modelThe A/C model to use.
[in]onThe power setting.
[in]modeThe operation mode setting.
[in]degreesThe temperature setting in degrees.
[in]fanThe speed setting for the fan.
[in]swingvThe vertical swing setting.
[in]turboRun the device in turbo/powerful mode.
[in]lightTurn on the LED/Display mode.
[in]sleepNr. of minutes for sleep mode. -1 is Off, >= 0 is on.
[in]clockThe time in Nr. of mins since midnight. < 0 is ignore.

Member Data Documentation

◆ _inverted

bool IRac::_inverted
private

IR LED is lit when GPIO is LOW (true) or HIGH (false)?

◆ _modulation

bool IRac::_modulation
private

Is frequency modulation to be used?

◆ _pin

uint16_t IRac::_pin
private

The GPIO to use to transmit messages from.

◆ _prev

stdAc::state_t IRac::_prev
private

The state we expect the device to currently be in.

◆ next

stdAc::state_t IRac::next

The state we want the device to be in after we send.


The documentation for this class was generated from the following files: