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) 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 | _ |
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. |
|
static |
Convert a stdAc::fanspeed_t enum into it's native speed.
[in] | speed | The enum to be converted. |
|
static |
Convert a stdAc::opmode_t enum into its native mode.
[in] | mode | The enum to be converted. |
bool IRNeoclimaAc::get8CHeat | ( | void | ) | const |
Get the 8°C Heat setting of the A/C.
uint8_t IRNeoclimaAc::getButton | ( | void | ) | const |
Get the Button/Command setting of the A/C.
bool IRNeoclimaAc::getEcono | ( | void | ) | const |
Get the Economy (Energy Saver) setting of the A/C.
bool IRNeoclimaAc::getEye | ( | void | ) | const |
Get the Eye (Sensor) setting of the A/C.
uint8_t IRNeoclimaAc::getFan | ( | void | ) | const |
Get the current fan speed setting.
bool IRNeoclimaAc::getFollow | ( | void | ) | const |
Get the Follow Me setting of the A/C.
bool IRNeoclimaAc::getFresh | ( | void | ) | const |
Get the Fresh (air) setting of the A/C.
bool IRNeoclimaAc::getHold | ( | void | ) | const |
Get the Hold setting of the A/C.
bool IRNeoclimaAc::getIon | ( | void | ) | const |
Get the Ion (filter) setting of the A/C.
bool IRNeoclimaAc::getLight | ( | void | ) | const |
Get the Light (LED display) setting of the A/C.
uint8_t IRNeoclimaAc::getMode | ( | void | ) | const |
Get the operating mode setting of the A/C.
bool IRNeoclimaAc::getPower | ( | void | ) | const |
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 | ) | const |
Get the Sleep setting of the A/C.
bool IRNeoclimaAc::getSwingH | ( | void | ) | const |
Get the horizontal swing (Air Flow) setting of the A/C.
bool IRNeoclimaAc::getSwingV | ( | void | ) | const |
Get the vertical swing setting of the A/C.
uint8_t IRNeoclimaAc::getTemp | ( | void | ) | const |
Get the current temperature setting.
getTempUnits()
. bool IRNeoclimaAc::getTempUnits | ( | void | ) | const |
Is the A/C unit using Fahrenheit or Celsius for temperature units.
bool IRNeoclimaAc::getTurbo | ( | void | ) | const |
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 | ) | const |
Convert the current internal state into its stdAc::state_t equivalent.
|
static |
|
static |
String IRNeoclimaAc::toString | ( | void | ) | const |
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 |
|
private |
Instance of the IR send class.