IRremoteESP8266

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

Class for handling detailed EcoClim A/C 56 bit messages. More...

`#include <ir_Ecoclim.h>`

Collaboration diagram for IREcoclimAc:
[legend]

## Public Member Functions
| IREcoclimAc (const uint16_t pin, const bool inverted=false, const bool use_modulation=true)
| Class constructor. More...
void | stateReset (void)
| Reset the internal state to a fixed known good state. More...
void | send (const uint16_t repeat=kNoRepeat)
| 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 | on (void)
| Change the power setting to On. More...
void | off (void)
| Change the power setting 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 | setTemp (const uint8_t celsius)
| Set the temperature. More...
uint8_t | getTemp (void) const
| Get the current temperature setting. More...
void | setSensorTemp (const uint8_t celsius)
| Set the sensor temperature. More...
uint8_t | getSensorTemp (void) const
| Get the sensor 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 | 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 | setClock (const uint16_t nr_of_mins)
| Set the clock time on the A/C unit. More...
uint16_t | getClock (void) const
| Get the clock time of the A/C unit. More...
uint64_t | getRaw (void) const
| Get a copy of the internal state as a valid code for this protocol. More...
void | setRaw (const uint64_t new_code)
| Set the internal state from a valid code for this protocol. More...
void | setType (const uint8_t code)
| Set the Unit type/DIP switch settings for the remote. More...
uint8_t | getType (void) const
| Get the Unit type/DIP switch settings of the remote. More...
stdAc::state_t | toCommon (void) const
| Convert the current internal state into its stdAc::state_t equivalent. More...
void | setOnTimer (const uint16_t nr_of_mins)
| Set & enable the On Timer for the A/C. More...
uint16_t | getOnTimer (void) const
| Get the On Timer for the A/C. More...
bool | isOnTimerEnabled (void) const
| Check if the On Timer is enabled. More...
void | disableOnTimer (void)
| Disable & clear the On Timer. More...
void | setOffTimer (const uint16_t nr_of_mins)
| Set & enable the Off Timer for the A/C. More...
uint16_t | getOffTimer (void) const
| Get the Off Timer for the A/C. More...
bool | isOffTimerEnabled (void) const
| Check if the Off Timer is enabled. More...
void | disableOffTimer (void)
| Disable & clear the Off Timer. More...
String | toString (void) const
| Convert the internal state into a human readable string. More...

## Static Public Member Functions
static uint8_t | convertMode (const stdAc::opmode_t mode)
| Convert a standard A/C mode 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 to it's common stdAc::opmode_t equivalent. More...
static stdAc::fanspeed_t | toCommonFanSpeed (const uint8_t speed)
| Convert a native fan speed into its stdAc equivalent. More...

## Private Attributes
IRsend | _irsend
| Instance of the IR send class. More...
EcoclimProtocol | _
| The state of the IR remote in IR code form. More...

## Detailed Description

Class for handling detailed EcoClim A/C 56 bit messages.

See also
  https://github.com/crankyoldgit/IRremoteESP8266/issues/1397

## Constructor & Destructor Documentation

## ◆ IREcoclimAc()

IREcoclimAc::IREcoclimAc | ( | const uint16_t | pin,
|  | const bool | inverted = `false`,
|  | const bool | use_modulation = `true`
| ) |  |
| explicit

Class constructor.

Parameters

  [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?

## Member Function Documentation

## ◆ begin()

void IREcoclimAc::begin | ( | void |  | ) |

Set up hardware to be able to send a message.

## ◆ calibrate()

int8_t IREcoclimAc::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.

## ◆ convertFan()

uint8_t IREcoclimAc::convertFan | ( | const stdAc::fanspeed_t | speed | ) |
| static

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

Parameters

  [in] | speed | The enum to be converted.

Returns
  The native equivalent of the enum.

## ◆ convertMode()

uint8_t IREcoclimAc::convertMode | ( | const stdAc::opmode_t | mode | ) |
| static

Convert a standard A/C mode into its native mode.

Parameters

  [in] | mode | A stdAc::opmode_t to be converted to it's native equivalent.

Returns
  The corresponding native mode.

## ◆ disableOffTimer()

void IREcoclimAc::disableOffTimer | ( | void |  | ) |

Disable & clear the Off Timer.

## ◆ disableOnTimer()

void IREcoclimAc::disableOnTimer | ( | void |  | ) |

Disable & clear the On Timer.

## ◆ getClock()

uint16_t IREcoclimAc::getClock | ( | void |  | ) | const

Get the clock time of the A/C unit.

Returns
  Nr. of minutes past midnight.

## ◆ getFan()

uint8_t IREcoclimAc::getFan | ( | void |  | ) | const

Get the current fan speed setting.

Returns
  The current fan speed.

## ◆ getMode()

uint8_t IREcoclimAc::getMode | ( | void |  | ) | const

Get the operating mode setting of the A/C.

Returns
  The current operating mode setting.

## ◆ getOffTimer()

uint16_t IREcoclimAc::getOffTimer | ( | void |  | ) | const

Get the Off Timer for the A/C.

Returns
  The Off Time, in minutes since midnight.

## ◆ getOnTimer()

uint16_t IREcoclimAc::getOnTimer | ( | void |  | ) | const

Get the On Timer for the A/C.

Returns
  The On Time, in minutes since midnight.

## ◆ getPower()

bool IREcoclimAc::getPower | ( | void |  | ) | const

Get the value of the current power setting.

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

## ◆ getRaw()

uint64_t IREcoclimAc::getRaw | ( | void |  | ) | const

Get a copy of the internal state as a valid code for this protocol.

Returns
  A valid code for this protocol based on the current internal state.

## ◆ getSensorTemp()

uint8_t IREcoclimAc::getSensorTemp | ( | void |  | ) | const

Get the sensor temperature setting.

Returns
  The current setting for sensor temp. in degrees celsius.

## ◆ getTemp()

uint8_t IREcoclimAc::getTemp | ( | void |  | ) | const

Get the current temperature setting.

Returns
  The current setting for temp. in degrees celsius.

## ◆ getType()

uint8_t IREcoclimAc::getType | ( | void |  | ) | const

Get the Unit type/DIP switch settings of the remote.

Returns
  The binary representation of the 4 DIP switches on the remote.

## ◆ isOffTimerEnabled()

bool IREcoclimAc::isOffTimerEnabled | ( | void |  | ) | const

Check if the Off Timer is enabled.

Returns
  true, if the timer is enabled, otherwise false.

## ◆ isOnTimerEnabled()

bool IREcoclimAc::isOnTimerEnabled | ( | void |  | ) | const

Check if the On Timer is enabled.

Returns
  true, if the timer is enabled, otherwise false.

## ◆ off()

void IREcoclimAc::off | ( | void |  | ) |

Change the power setting to Off.

## ◆ on()

void IREcoclimAc::on | ( | void |  | ) |

Change the power setting to On.

## ◆ send()

void IREcoclimAc::send | ( | const uint16_t | repeat = `kNoRepeat` | ) |

Send the current internal state as an IR message.

Parameters

  [in] | repeat | Nr. of times the message will be repeated.

## ◆ setClock()

void IREcoclimAc::setClock | ( | const uint16_t | nr_of_mins | ) |

Set the clock time on the A/C unit.

Parameters

  [in] | nr_of_mins | Nr. of minutes past midnight.

## ◆ setFan()

void IREcoclimAc::setFan | ( | const uint8_t | speed | ) |

Set the speed of the fan.

Parameters

  [in] | speed | The desired setting.

## ◆ setMode()

void IREcoclimAc::setMode | ( | const uint8_t | mode | ) |

Set the operating mode of the A/C.

Parameters

  [in] | mode | The desired operating mode.

## ◆ setOffTimer()

void IREcoclimAc::setOffTimer | ( | const uint16_t | nr_of_mins | ) |

Set & enable the Off Timer for the A/C.

Parameters

  [in] | nr_of_mins | The time, in minutes since midnight.

## ◆ setOnTimer()

void IREcoclimAc::setOnTimer | ( | const uint16_t | nr_of_mins | ) |

Set & enable the On Timer for the A/C.

Parameters

  [in] | nr_of_mins | The time, in minutes since midnight.

## ◆ setPower()

void IREcoclimAc::setPower | ( | const bool | on | ) |

Change the power setting.

Parameters

  [in] | on | true, the setting is on. false, the setting is off.

## ◆ setRaw()

void IREcoclimAc::setRaw | ( | const uint64_t | new_code | ) |

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

Parameters

  [in] | new_code | A valid code for this protocol.

## ◆ setSensorTemp()

void IREcoclimAc::setSensorTemp | ( | const uint8_t | celsius | ) |

Set the sensor temperature.

Parameters

  [in] | celsius | The temperature in degrees celsius.

## ◆ setTemp()

void IREcoclimAc::setTemp | ( | const uint8_t | celsius | ) |

Set the temperature.

Parameters

  [in] | celsius | The temperature in degrees celsius.

## ◆ setType()

void IREcoclimAc::setType | ( | const uint8_t | code | ) |

Set the Unit type/DIP switch settings for the remote.

Parameters

  [in] | code | The binary representation of the remote's 4 DIP switches.

## ◆ stateReset()

void IREcoclimAc::stateReset | ( | void |  | ) |

Reset the internal state to a fixed known good state.

## ◆ toCommon()

stdAc::state_t IREcoclimAc::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 IREcoclimAc::toCommonFanSpeed | ( | const uint8_t | speed | ) |
| static

Convert a native fan speed into its stdAc equivalent.

Parameters

  [in] | speed | The native setting to be converted.

Returns
  The stdAc equivalent of the native setting.

## ◆ toCommonMode()

stdAc::opmode_t IREcoclimAc::toCommonMode | ( | const uint8_t | mode | ) |
| static

Convert a native mode to it's common stdAc::opmode_t equivalent.

Parameters

  [in] | mode | A native operation mode to be converted.

Returns
  The corresponding common stdAc::opmode_t mode.

## ◆ toString()

String IREcoclimAc::toString | ( | void |  | ) | const

Convert the internal state into a human readable string.

Returns
  A string containing the settings in human-readable form.

## Member Data Documentation

## ◆ _

EcoclimProtocol IREcoclimAc::_
| private

The state of the IR remote in IR code form.

## ◆ _irsend

IRsend IREcoclimAc::_irsend
| private

Instance of the IR send class.

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

- src/ir_Ecoclim.h
- src/ir_Ecoclim.cpp