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

Class for handling detailed Neoclima A/C messages. More...

#include <ir_Neoclima.h>

Collaboration diagram for IRNeoclimaAc:
Collaboration graph
[legend]

Public Member Functions

 IRNeoclimaAc (const uint16_t pin, const bool inverted=false, const bool use_modulation=true)
 Class constructor. More...
 
void stateReset (void)
 Reset the state of the remote to a known good state/sequence. More...
 
void send (const uint16_t repeat=kNeoclimaMinRepeat)
 Send the current internal state as an IR message. More...
 
int8_t calibrate (void)
 Run the calibration to calculate uSec timing offsets for this platform. More...
 
void begin (void)
 Set up hardware to be able to send a message. More...
 
void setButton (const uint8_t button)
 Set the Button/Command pressed setting of the A/C. More...
 
uint8_t getButton (void) const
 Get the Button/Command setting of the A/C. More...
 
void on (void)
 Set the requested power state of the A/C to on. More...
 
void off (void)
 Set the requested power state of the A/C to off. More...
 
void setPower (const bool on)
 Change the power setting. More...
 
bool getPower (void) const
 Get the value of the current power setting. More...
 
void setMode (const uint8_t mode)
 Set the operating mode of the A/C. More...
 
uint8_t getMode (void) const
 Get the operating mode setting of the A/C. More...
 
void setTemp (const uint8_t temp, const bool celsius=true)
 Set the temperature. More...
 
uint8_t getTemp (void) const
 Get the current temperature setting. More...
 
void setFan (const uint8_t speed)
 Set the speed of the fan. More...
 
uint8_t getFan (void) const
 Get the current fan speed setting. More...
 
void setSwingV (const bool on)
 Set the vertical swing setting of the A/C. More...
 
bool getSwingV (void) const
 Get the vertical swing setting of the A/C. More...
 
void setSwingH (const bool on)
 Set the horizontal swing setting of the A/C. More...
 
bool getSwingH (void) const
 Get the horizontal swing (Air Flow) setting of the A/C. More...
 
void setSleep (const bool on)
 Set the Sleep setting of the A/C. More...
 
bool getSleep (void) const
 Get the Sleep setting of the A/C. More...
 
void setTurbo (const bool on)
 Set the Turbo setting of the A/C. More...
 
bool getTurbo (void) const
 Get the Turbo setting of the A/C. More...
 
void setEcono (const bool on)
 Set the Economy (Energy Saver) setting of the A/C. More...
 
bool getEcono (void) const
 Get the Economy (Energy Saver) setting of the A/C. More...
 
void setFresh (const bool on)
 Set the Fresh (air) setting of the A/C. More...
 
bool getFresh (void) const
 Get the Fresh (air) setting of the A/C. More...
 
void setHold (const bool on)
 Set the Hold setting of the A/C. More...
 
bool getHold (void) const
 Get the Hold setting of the A/C. More...
 
void setIon (const bool on)
 Set the Ion (filter) setting of the A/C. More...
 
bool getIon (void) const
 Get the Ion (filter) setting of the A/C. More...
 
void setLight (const bool on)
 Set the Light(LED display) setting of the A/C. More...
 
bool getLight (void) const
 Get the Light (LED display) setting of the A/C. More...
 
void set8CHeat (const bool on)
 Set the 8°C Heat setting of the A/C. More...
 
bool get8CHeat (void) const
 Get the 8°C Heat setting of the A/C. More...
 
void setEye (const bool on)
 Set the Eye (Sensor) setting of the A/C. More...
 
bool getEye (void) const
 Get the Eye (Sensor) setting of the A/C. More...
 
bool getTempUnits (void) const
 Is the A/C unit using Fahrenheit or Celsius for temperature units. More...
 
bool getFollow (void) const
 Get the Follow Me setting of the A/C. More...
 
uint8_t * getRaw (void)
 Get a PTR to the internal state/code for this protocol. More...
 
void setRaw (const uint8_t new_code[], const uint16_t length=kNeoclimaStateLength)
 Set the internal state from a valid code for this protocol. More...
 
String toString (void) const
 Convert the current internal state into a human readable string. More...
 
stdAc::state_t toCommon (void) const
 Convert the current internal state into its stdAc::state_t equivalent. More...
 

Static Public Member Functions

static bool validChecksum (const uint8_t state[], const uint16_t length=kNeoclimaStateLength)
 Verify the checksum is valid for a given state. More...
 
static uint8_t calcChecksum (const uint8_t state[], const uint16_t length=kNeoclimaStateLength)
 Calculate the checksum for a given state. More...
 
static uint8_t convertMode (const stdAc::opmode_t mode)
 Convert a stdAc::opmode_t enum into its native mode. More...
 
static uint8_t convertFan (const stdAc::fanspeed_t speed)
 Convert a stdAc::fanspeed_t enum into it's native speed. More...
 
static stdAc::opmode_t toCommonMode (const uint8_t mode)
 Convert a native mode into its stdAc equivalent. More...
 
static stdAc::fanspeed_t toCommonFanSpeed (const uint8_t speed)
 Convert a native fan speed into its stdAc equivalent. More...
 

Private Member Functions

void checksum (const uint16_t length=kNeoclimaStateLength)
 Calculate & update the checksum for the internal state. More...
 

Private Attributes

IRsend _irsend
 Instance of the IR send class. More...
 
NeoclimaProtocol _
 

Detailed Description

Class for handling detailed Neoclima A/C messages.

Constructor & Destructor Documentation

◆ IRNeoclimaAc()

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

Class constructor.

Parameters
[in]pinGPIO to be used when sending.
[in]invertedIs the output signal to be inverted?
[in]use_modulationIs frequency modulation to be used?

Member Function Documentation

◆ begin()

void IRNeoclimaAc::begin ( void  )

Set up hardware to be able to send a message.

◆ calcChecksum()

uint8_t IRNeoclimaAc::calcChecksum ( const uint8_t  state[],
const uint16_t  length = kNeoclimaStateLength 
)
static

Calculate the checksum for a given state.

Parameters
[in]stateThe array to calc the checksum of.
[in]lengthThe length/size of the array.
Returns
The calculated checksum value.

◆ calibrate()

int8_t IRNeoclimaAc::calibrate ( void  )
inline

Run the calibration to calculate uSec timing offsets for this platform.

Returns
The uSec timing offset needed per modulation of the IR Led.
Note
This will produce a 65ms IR signal pulse at 38kHz. Only ever needs to be run once per object instantiation, if at all.

◆ checksum()

void IRNeoclimaAc::checksum ( const uint16_t  length = kNeoclimaStateLength)
private

Calculate & update the checksum for the internal state.

Parameters
[in]lengthThe length/size of the internal state.

◆ convertFan()

uint8_t IRNeoclimaAc::convertFan ( const stdAc::fanspeed_t  speed)
static

Convert a stdAc::fanspeed_t enum into it's native speed.

Parameters
[in]speedThe enum to be converted.
Returns
The native equivalent of the enum.

◆ convertMode()

uint8_t IRNeoclimaAc::convertMode ( const stdAc::opmode_t  mode)
static

Convert a stdAc::opmode_t enum into its native mode.

Parameters
[in]modeThe enum to be converted.
Returns
The native equivalent of the enum.

◆ get8CHeat()

bool IRNeoclimaAc::get8CHeat ( void  ) const

Get the 8°C Heat setting of the A/C.

Returns
true, the setting is on. false, the setting is off.

◆ getButton()

uint8_t IRNeoclimaAc::getButton ( void  ) const

Get the Button/Command setting of the A/C.

Returns
The value of the button/command that was pressed.

◆ getEcono()

bool IRNeoclimaAc::getEcono ( void  ) const

Get the Economy (Energy Saver) setting of the A/C.

Returns
true, the setting is on. false, the setting is off.

◆ getEye()

bool IRNeoclimaAc::getEye ( void  ) const

Get the Eye (Sensor) setting of the A/C.

Returns
true, the setting is on. false, the setting is off.

◆ getFan()

uint8_t IRNeoclimaAc::getFan ( void  ) const

Get the current fan speed setting.

Returns
The current fan speed/mode.

◆ getFollow()

bool IRNeoclimaAc::getFollow ( void  ) const

Get the Follow Me setting of the A/C.

Returns
true, the setting is on. false, the setting is off.

◆ getFresh()

bool IRNeoclimaAc::getFresh ( void  ) const

Get the Fresh (air) setting of the A/C.

Returns
true, the setting is on. false, the setting is off.

◆ getHold()

bool IRNeoclimaAc::getHold ( void  ) const

Get the Hold setting of the A/C.

Returns
true, the setting is on. false, the setting is off.

◆ getIon()

bool IRNeoclimaAc::getIon ( void  ) const

Get the Ion (filter) setting of the A/C.

Returns
true, the setting is on. false, the setting is off.

◆ getLight()

bool IRNeoclimaAc::getLight ( void  ) const

Get the Light (LED display) setting of the A/C.

Returns
true, the setting is on. false, the setting is off.

◆ getMode()

uint8_t IRNeoclimaAc::getMode ( void  ) const

Get the operating mode setting of the A/C.

Returns
The current operating mode setting.

◆ getPower()

bool IRNeoclimaAc::getPower ( void  ) const

Get the value of the current power setting.

Returns
true, the setting is on. false, the setting is off.

◆ getRaw()

uint8_t * IRNeoclimaAc::getRaw ( void  )

Get a PTR to the internal state/code for this protocol.

Returns
PTR to a code for this protocol based on the current internal state.

◆ getSleep()

bool IRNeoclimaAc::getSleep ( void  ) const

Get the Sleep setting of the A/C.

Returns
true, the setting is on. false, the setting is off.

◆ getSwingH()

bool IRNeoclimaAc::getSwingH ( void  ) const

Get the horizontal swing (Air Flow) setting of the A/C.

Returns
true, the setting is on. false, the setting is off.

◆ getSwingV()

bool IRNeoclimaAc::getSwingV ( void  ) const

Get the vertical swing setting of the A/C.

Returns
true, the setting is on. false, the setting is off.

◆ getTemp()

uint8_t IRNeoclimaAc::getTemp ( void  ) const

Get the current temperature setting.

Returns
The current setting for temp. in degrees.
Note
The units of the temperature (F/C) is determined by getTempUnits().

◆ getTempUnits()

bool IRNeoclimaAc::getTempUnits ( void  ) const

Is the A/C unit using Fahrenheit or Celsius for temperature units.

Returns
false, Fahrenheit. true, Celsius.

◆ getTurbo()

bool IRNeoclimaAc::getTurbo ( void  ) const

Get the Turbo setting of the A/C.

Returns
true, the setting is on. false, the setting is off.

◆ off()

void IRNeoclimaAc::off ( void  )

Set the requested power state of the A/C to off.

◆ on()

void IRNeoclimaAc::on ( void  )

Set the requested power state of the A/C to on.

◆ send()

void IRNeoclimaAc::send ( const uint16_t  repeat = kNeoclimaMinRepeat)

Send the current internal state as an IR message.

Parameters
[in]repeatNr. of times the message will be repeated.

◆ set8CHeat()

void IRNeoclimaAc::set8CHeat ( const bool  on)

Set the 8°C Heat setting of the A/C.

Parameters
[in]ontrue, the setting is on. false, the setting is off.
Note
This feature maintains the room temperature steadily at 8°C and prevents the room from freezing by activating the heating operation automatically when nobody is at home over a longer period during severe winter.

◆ setButton()

void IRNeoclimaAc::setButton ( const uint8_t  button)

Set the Button/Command pressed setting of the A/C.

Parameters
[in]buttonThe value of the button/command that was pressed.

◆ setEcono()

void IRNeoclimaAc::setEcono ( const bool  on)

Set the Economy (Energy Saver) setting of the A/C.

Parameters
[in]ontrue, the setting is on. false, the setting is off.

◆ setEye()

void IRNeoclimaAc::setEye ( const bool  on)

Set the Eye (Sensor) setting of the A/C.

Parameters
[in]ontrue, the setting is on. false, the setting is off.

◆ setFan()

void IRNeoclimaAc::setFan ( const uint8_t  speed)

Set the speed of the fan.

Parameters
[in]speedThe desired setting. 0-3, 0 is auto, 1-3 is the speed

◆ setFresh()

void IRNeoclimaAc::setFresh ( const bool  on)

Set the Fresh (air) setting of the A/C.

Parameters
[in]ontrue, the setting is on. false, the setting is off.

◆ setHold()

void IRNeoclimaAc::setHold ( const bool  on)

Set the Hold setting of the A/C.

Parameters
[in]ontrue, the setting is on. false, the setting is off.

◆ setIon()

void IRNeoclimaAc::setIon ( const bool  on)

Set the Ion (filter) setting of the A/C.

Parameters
[in]ontrue, the setting is on. false, the setting is off.

◆ setLight()

void IRNeoclimaAc::setLight ( const bool  on)

Set the Light(LED display) setting of the A/C.

Parameters
[in]ontrue, the setting is on. false, the setting is off.

◆ setMode()

void IRNeoclimaAc::setMode ( const uint8_t  mode)

Set the operating mode of the A/C.

Parameters
[in]modeThe desired operating mode.

◆ setPower()

void IRNeoclimaAc::setPower ( const bool  on)

Change the power setting.

Parameters
[in]ontrue, the setting is on. false, the setting is off.

◆ setRaw()

void IRNeoclimaAc::setRaw ( const uint8_t  new_code[],
const uint16_t  length = kNeoclimaStateLength 
)

Set the internal state from a valid code for this protocol.

Parameters
[in]new_codeA valid code for this protocol.
[in]lengthThe length/size of the new_code array.

◆ setSleep()

void IRNeoclimaAc::setSleep ( const bool  on)

Set the Sleep setting of the A/C.

Parameters
[in]ontrue, the setting is on. false, the setting is off.

◆ setSwingH()

void IRNeoclimaAc::setSwingH ( const bool  on)

Set the horizontal swing setting of the A/C.

Parameters
[in]ontrue, the setting is on. false, the setting is off.

◆ setSwingV()

void IRNeoclimaAc::setSwingV ( const bool  on)

Set the vertical swing setting of the A/C.

Parameters
[in]ontrue, the setting is on. false, the setting is off.

◆ setTemp()

void IRNeoclimaAc::setTemp ( const uint8_t  temp,
const bool  celsius = true 
)

Set the temperature.

Parameters
[in]tempThe temperature in degrees celsius.
[in]celsiusUse Fahrenheit (false) or Celsius (true).

◆ setTurbo()

void IRNeoclimaAc::setTurbo ( const bool  on)

Set the Turbo setting of the A/C.

Parameters
[in]ontrue, the setting is on. false, the setting is off.

◆ stateReset()

void IRNeoclimaAc::stateReset ( void  )

Reset the state of the remote to a known good state/sequence.

◆ toCommon()

stdAc::state_t IRNeoclimaAc::toCommon ( void  ) const

Convert the current internal state into its stdAc::state_t equivalent.

Returns
The stdAc equivalent of the native settings.

◆ toCommonFanSpeed()

stdAc::fanspeed_t IRNeoclimaAc::toCommonFanSpeed ( const uint8_t  speed)
static

Convert a native fan speed into its stdAc equivalent.

Parameters
[in]speedThe native setting to be converted.
Returns
The stdAc equivalent of the native setting.

◆ toCommonMode()

stdAc::opmode_t IRNeoclimaAc::toCommonMode ( const uint8_t  mode)
static

Convert a native mode into its stdAc equivalent.

Parameters
[in]modeThe native setting to be converted.
Returns
The stdAc equivalent of the native setting.

◆ toString()

String IRNeoclimaAc::toString ( void  ) const

Convert the current internal state into a human readable string.

Returns
A human readable string.

◆ validChecksum()

bool IRNeoclimaAc::validChecksum ( const uint8_t  state[],
const uint16_t  length = kNeoclimaStateLength 
)
static

Verify the checksum is valid for a given state.

Parameters
[in]stateThe array to verify the checksum of.
[in]lengthThe length/size of the array.
Returns
true, if the state has a valid checksum. Otherwise, false.

Member Data Documentation

◆ _

NeoclimaProtocol IRNeoclimaAc::_
private

◆ _irsend

IRsend IRNeoclimaAc::_irsend
private

Instance of the IR send class.


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