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)
 Initialse the given state with the supplied settings. More...
 
static void initState (stdAc::state_t *state)
 Initialse 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::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 opmodeToString (const stdAc::opmode_t mode)
 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 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 stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const bool turbo, const int16_t sleep=-1)
 Send an Argo 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 stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const stdAc::swingh_t swingh, 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 electra (IRElectraAc *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 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 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 bool turbo, 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 haierYrwo2 (IRHaierACYRW02 *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)
 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 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 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)
 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 stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const bool econo, const int16_t sleep=-1)
 Send a Midea 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 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 bool quiet, const bool turbo, const bool light, const bool filter, const bool clean, const bool beep, const bool prevpower=true, const bool forcepower=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 stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const bool beep, const int16_t sleep=-1)
 Send a Toshiba A/C message with the supplied settings. More...
 
void sharp (IRSharpAc *ac, 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 bool turbo, const bool filter, const bool clean)
 Send a Sharp A/C message with the supplied settings. More...
 
void tcl112 (IRTcl112Ac *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 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)
 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 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

◆ 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 stdAc::fanspeed_t  fan,
const stdAc::swingv_t  swingv,
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]fanThe speed setting for the fan.
[in]swingvThe vertical swing setting.
[in]turboRun the device in turbo/powerful mode.
[in]sleepNr. of minutes for sleep mode.
Note
-1 is Off, >= 0 is on.

◆ 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 equivilent String for the locale.

◆ 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.

◆ coolix()

void IRac::coolix ( IRCoolixAC 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  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]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]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.

◆ electra()

void IRac::electra ( IRElectraAc 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  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]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]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 equivilent 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 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]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 bool  turbo,
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]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. -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.

◆ haierYrwo2()

void IRac::haierYrwo2 ( IRHaierACYRW02 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 
)
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]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.

◆ 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.

◆ 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

Initialse 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

Initialse 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.

◆ 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 
)
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.

◆ 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 stdAc::fanspeed_t  fan,
const stdAc::swingv_t  swingv,
const bool  econo,
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]fanThe speed setting for the fan.
[in]swingvThe vertical swing setting.
[in]econoRun the device in economical mode.
[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.

◆ 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)
static

Convert the supplied operation mode into the appropriate String.

Parameters
[in]modeThe enum to be converted.
Returns
The equivilent 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.

◆ 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 bool  quiet,
const bool  turbo,
const bool  light,
const bool  filter,
const bool  clean,
const bool  beep,
const bool  prevpower = true,
const bool  forcepower = 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]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. Mould, dry filters etc
[in]beepEnable/Disable beeps when receiving IR messages.
[in]prevpowerThe power setting from the previous A/C state.
[in]forcepowerDo we force send the special power message?

◆ sanyo()

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

Send a Toshiba 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]fanThe speed setting for the fan.
[in]swingvThe vertical swing setting.
[in]beepEnable/Disable beeps when receiving IR messages.
[in]sleepNr. of minutes for sleep mode. -1 is Off, >= 0 is on.

◆ 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.
[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
Returns
True, if accepted/converted/attempted etc. False, if unsupported.

◆ 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 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 bool  turbo,
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]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]turboRun the device in turbo/powerful 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 equivilent boolean value.

◆ 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 equivilent 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 equivilent enum.

◆ 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 equivilent 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 equivilent 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 equivilent 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 equivilent 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 equivilent String for the locale.

◆ tcl112()

void IRac::tcl112 ( IRTcl112Ac 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  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]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]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 
)
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.

◆ 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.

◆ 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: