IRremoteESP8266
|
Class for handling detailed Neoclima A/C messages. More...
#include <ir_Neoclima.h>
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) |
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) |
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) |
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) |
Get the current temperature setting. More... | |
void | setFan (const uint8_t speed) |
Set the speed of the fan. More... | |
uint8_t | getFan (void) |
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) |
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) |
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) |
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) |
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) |
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) |
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) |
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) |
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) |
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) |
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) |
Get the Eye (Sensor) setting of the A/C. More... | |
bool | getTempUnits (void) |
Is the A/C unit using Fahrenheit or Celsius for temperature units. More... | |
bool | getFollow (void) |
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) |
Convert the current internal state into a human readable string. More... | |
uint8_t | convertMode (const stdAc::opmode_t mode) |
Convert a stdAc::opmode_t enum into its native mode. More... | |
uint8_t | convertFan (const stdAc::fanspeed_t speed) |
Convert a stdAc::fanspeed_t enum into it's native speed. More... | |
stdAc::state_t | toCommon (void) |
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 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... | |
uint8_t | remote_state [kNeoclimaStateLength] |
State of the remote in code. More... | |
Class for handling detailed Neoclima A/C messages.
|
explicit |
Class constructor.
[in] | pin | GPIO to be used when sending. |
[in] | inverted | Is the output signal to be inverted? |
[in] | use_modulation | Is frequency modulation to be used? |
void IRNeoclimaAc::begin | ( | void | ) |
Set up hardware to be able to send a message.
|
static |
Calculate the checksum for a given state.
[in] | state | The array to calc the checksum of. |
[in] | length | The length/size of the array. |
|
inline |
Run the calibration to calculate uSec timing offsets for this platform.
|
private |
Calculate & update the checksum for the internal state.
[in] | length | The length/size of the internal state. |
uint8_t IRNeoclimaAc::convertFan | ( | const stdAc::fanspeed_t | speed | ) |
Convert a stdAc::fanspeed_t enum into it's native speed.
[in] | speed | The enum to be converted. |
uint8_t IRNeoclimaAc::convertMode | ( | const stdAc::opmode_t | mode | ) |
Convert a stdAc::opmode_t enum into its native mode.
[in] | mode | The enum to be converted. |
bool IRNeoclimaAc::get8CHeat | ( | void | ) |
Get the 8°C Heat setting of the A/C.
uint8_t IRNeoclimaAc::getButton | ( | void | ) |
Get the Button/Command setting of the A/C.
bool IRNeoclimaAc::getEcono | ( | void | ) |
Get the Economy (Energy Saver) setting of the A/C.
bool IRNeoclimaAc::getEye | ( | void | ) |
Get the Eye (Sensor) setting of the A/C.
uint8_t IRNeoclimaAc::getFan | ( | void | ) |
Get the current fan speed setting.
bool IRNeoclimaAc::getFollow | ( | void | ) |
Get the Follow Me setting of the A/C.
bool IRNeoclimaAc::getFresh | ( | void | ) |
Get the Fresh (air) setting of the A/C.
bool IRNeoclimaAc::getHold | ( | void | ) |
Get the Hold setting of the A/C.
bool IRNeoclimaAc::getIon | ( | void | ) |
Get the Ion (filter) setting of the A/C.
bool IRNeoclimaAc::getLight | ( | void | ) |
Get the Light (LED display) setting of the A/C.
uint8_t IRNeoclimaAc::getMode | ( | void | ) |
Get the operating mode setting of the A/C.
bool IRNeoclimaAc::getPower | ( | void | ) |
Get the value of the current power setting.
uint8_t * IRNeoclimaAc::getRaw | ( | void | ) |
Get a PTR to the internal state/code for this protocol.
bool IRNeoclimaAc::getSleep | ( | void | ) |
Get the Sleep setting of the A/C.
bool IRNeoclimaAc::getSwingH | ( | void | ) |
Get the horizontal swing (Air Flow) setting of the A/C.
bool IRNeoclimaAc::getSwingV | ( | void | ) |
Get the vertical swing setting of the A/C.
uint8_t IRNeoclimaAc::getTemp | ( | void | ) |
Get the current temperature setting.
getTempUnits()
. bool IRNeoclimaAc::getTempUnits | ( | void | ) |
Is the A/C unit using Fahrenheit or Celsius for temperature units.
bool IRNeoclimaAc::getTurbo | ( | void | ) |
Get the Turbo setting of the A/C.
void IRNeoclimaAc::off | ( | void | ) |
Set the requested power state of the A/C to off.
void IRNeoclimaAc::on | ( | void | ) |
Set the requested power state of the A/C to on.
void IRNeoclimaAc::send | ( | const uint16_t | repeat = kNeoclimaMinRepeat | ) |
Send the current internal state as an IR message.
[in] | repeat | Nr. of times the message will be repeated. |
void IRNeoclimaAc::set8CHeat | ( | const bool | on | ) |
Set the 8°C Heat setting of the A/C.
[in] | on | true, the setting is on. false, the setting is off. |
void IRNeoclimaAc::setButton | ( | const uint8_t | button | ) |
Set the Button/Command pressed setting of the A/C.
[in] | button | The value of the button/command that was pressed. |
void IRNeoclimaAc::setEcono | ( | const bool | on | ) |
Set the Economy (Energy Saver) setting of the A/C.
[in] | on | true, the setting is on. false, the setting is off. |
void IRNeoclimaAc::setEye | ( | const bool | on | ) |
Set the Eye (Sensor) setting of the A/C.
[in] | on | true, the setting is on. false, the setting is off. |
void IRNeoclimaAc::setFan | ( | const uint8_t | speed | ) |
Set the speed of the fan.
[in] | speed | The desired setting. 0-3, 0 is auto, 1-3 is the speed |
void IRNeoclimaAc::setFresh | ( | const bool | on | ) |
Set the Fresh (air) setting of the A/C.
[in] | on | true, the setting is on. false, the setting is off. |
void IRNeoclimaAc::setHold | ( | const bool | on | ) |
Set the Hold setting of the A/C.
[in] | on | true, the setting is on. false, the setting is off. |
void IRNeoclimaAc::setIon | ( | const bool | on | ) |
Set the Ion (filter) setting of the A/C.
[in] | on | true, the setting is on. false, the setting is off. |
void IRNeoclimaAc::setLight | ( | const bool | on | ) |
Set the Light(LED display) setting of the A/C.
[in] | on | true, the setting is on. false, the setting is off. |
void IRNeoclimaAc::setMode | ( | const uint8_t | mode | ) |
Set the operating mode of the A/C.
[in] | mode | The desired operating mode. |
void IRNeoclimaAc::setPower | ( | const bool | on | ) |
Change the power setting.
[in] | on | true, the setting is on. false, the setting is off. |
void IRNeoclimaAc::setRaw | ( | const uint8_t | new_code[], |
const uint16_t | length = kNeoclimaStateLength |
||
) |
Set the internal state from a valid code for this protocol.
[in] | new_code | A valid code for this protocol. |
[in] | length | The length/size of the new_code array. |
void IRNeoclimaAc::setSleep | ( | const bool | on | ) |
Set the Sleep setting of the A/C.
[in] | on | true, the setting is on. false, the setting is off. |
void IRNeoclimaAc::setSwingH | ( | const bool | on | ) |
Set the horizontal swing setting of the A/C.
[in] | on | true, the setting is on. false, the setting is off. |
void IRNeoclimaAc::setSwingV | ( | const bool | on | ) |
Set the vertical swing setting of the A/C.
[in] | on | true, the setting is on. false, the setting is off. |
void IRNeoclimaAc::setTemp | ( | const uint8_t | temp, |
const bool | celsius = true |
||
) |
Set the temperature.
[in] | temp | The temperature in degrees celsius. |
[in] | celsius | Use Fahrenheit (false) or Celsius (true). |
void IRNeoclimaAc::setTurbo | ( | const bool | on | ) |
Set the Turbo setting of the A/C.
[in] | on | true, the setting is on. false, the setting is off. |
void IRNeoclimaAc::stateReset | ( | void | ) |
Reset the state of the remote to a known good state/sequence.
stdAc::state_t IRNeoclimaAc::toCommon | ( | void | ) |
Convert the current internal state into its stdAc::state_t equivalent.
|
static |
|
static |
String IRNeoclimaAc::toString | ( | void | ) |
Convert the current internal state into a human readable string.
|
static |
Verify the checksum is valid for a given state.
[in] | state | The array to verify the checksum of. |
[in] | length | The length/size of the array. |
|
private |
Instance of the IR send class.
|
private |
State of the remote in code.