IRremoteESP8266

Public Member Functions | Static Public Member Functions | List of all members
IRArgoAC_WREM3 Class Reference

Supports Argo A/C SAC-WREM3 IR remote protocol. More...

`#include <ir_Argo.h>`

Inheritance diagram for IRArgoAC_WREM3:
[legend]
Collaboration diagram for IRArgoAC_WREM3:
[legend]

## Public Member Functions
| IRArgoAC_WREM3 (const uint16_t pin, const bool inverted=false, const bool use_modulation=true)
| Class constructor. More...
void | sendSensorTemp (const uint8_t degrees, const uint16_t repeat=kArgoDefaultRepeat)
| Send current room temperature for the iFeel feature as a silent IR message (no acknowledgement from the device) (WREM3) More...
argo_ac_remote_model_t | getModel (void) const
| Get device model. More...
argoFan_t | getFan (void) const
argoFlap_t | getFlap (void) const
argoMode_t | getMode (void) const
void | setEco (const bool on)
| Turn on/off the Economy mode (lowered power mode) More...
bool | getEco (void) const
| Get the status of Economy function. More...
void | setFilter (const bool on)
| Turn on/off the Filter mode (not supported by Argo Ulisse) More...
bool | getFilter (void) const
| Get status of the filter function. More...
void | setLight (const bool on)
| Turn on/off the device Lights (LED) More...
bool | getLight (void) const
| Get status of device lights. More...
void | setChannel (const uint8_t channel)
| Set the IR channel on which to communicate. More...
uint8_t | getChannel (void) const
| Get the currently set transmission channel. More...
void | setConfigEntry (const uint8_t paramId, const uint8_t value)
| Set the config data to send Valid only for `argoIrMessageType_t::CONFIG_PARAM_SET` message. More...
std::pair< uint8_t, uint8_t > | getConfigEntry (void) const
| Get the config entry previously set. More...
void | setCurrentTimeMinutes (uint16_t currentTimeMinutes)
| Set current clock (as minutes, counted from 0:00) E.g. 13:38 becomes 818 (13*60+38) More...
uint16_t | getCurrentTimeMinutes (void) const
| Retrieve current time. More...
void | setCurrentDayOfWeek (argoWeekday dayOfWeek)
| Set current day of week. More...
argoWeekday | getCurrentDayOfWeek (void) const
| Get current day of week. More...
void | setTimerType (const argoTimerType_t timerType)
| Set timer type. More...
argoTimerType_t | getTimerType (void) const
| Get currently set timer type. More...
void | setDelayTimerMinutes (const uint16_t delayMinutes)
| Set delay timer delay in minutes (10-minute increments only) Max is 1190 (19h50m) More...
uint16_t | getDelayTimerMinutes (void) const
| Get current delay timer value. More...
void | setScheduleTimerStartMinutes (const uint16_t startTimeMinutes)
| Set schedule timer on time (time when the device should turn on) (10-minute increments only) More...
uint16_t | getScheduleTimerStartMinutes (void) const
| Get schedule timer ON time. More...
void | setScheduleTimerStopMinutes (const uint16_t stopTimeMinutes)
| Set schedule timer off time (time when the device should turn off) (10-minute increments only) More...
uint16_t | getScheduleTimerStopMinutes (void) const
| Get schedule timer OFF time. More...
void | setScheduleTimerActiveDays (const std::set< argoWeekday > &days)
| Set the days when the schedule timer shall be active. More...
std::set< argoWeekday > | getScheduleTimerActiveDays (void) const
| Get the days when shedule timer shall be active (as set) More...
uint8_t | getTimerActiveDaysBitmap (void) const
| Get the days when shedule timer shall be active (as bitmap) More...
String | toString (void) const
| Convert the current internal state into a human readable string (WREM3). More...
stdAc::state_t | toCommon (void) const
| Convert the current internal state into its stdAc::state_t equivalent. More...
Public Member Functions inherited from IRArgoACBase< ArgoProtocolWREM3 >
| IRArgoACBase (const uint16_t pin, const bool inverted=false, const bool use_modulation=true)
| Class constructor. More...
void | send (const uint16_t repeat=kArgoDefaultRepeat)
| 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)
| Set the internal state to have the power on. More...
void | off (void)
| Set the internal state to have the power off. More...
void | setPower (const bool on)
| Set the internal state to have the desired power. More...
bool | getPower (void) const
| Get the power setting from the internal state. More...
void | setTemp (const uint8_t degrees)
| Set the temperature. More...
uint8_t | getTemp (void) const
| Get the current temperature setting. More...
void | setSensorTemp (const uint8_t degrees)
| Set the value for the current room temperature. More...
uint8_t | getSensorTemp (void) const
| Get the currently stored value for the room temperature setting. More...
void | setFan (const argoFan_t fan)
| Set the desired fan mode (WREM3). More...
void | setFanEx (const argoFan_t fan)
argoFan_t | getFanEx (void) const
| `-Ex` for backw. compat w/ `IRArgoAC` More...
void | setFlap (const argoFlap_t flap)
| Set the desired flap mode. More...
void | setFlapEx (const argoFlap_t flap)
argoFlap_t | getFlapEx (void) const
| `-Ex` for backw. compat w/ `IRArgoAC` More...
void | setMode (const argoMode_t mode)
| Set the desired operation mode. More...
void | setModeEx (const argoMode_t mode)
argoMode_t | getModeEx (void) const
| `-Ex` for backw. compat w/ `IRArgoAC` More...
void | setMax (const bool on)
| Control the current Max setting. (i.e. Turbo) More...
bool | getMax (void) const
| Is the Max (i.e. Turbo) setting on? More...
void | setNight (const bool on)
| Turn on/off the Night mode. i.e. Sleep. More...
bool | getNight (void) const
| Get the status of Night mode. i.e. Sleep. More...
void | setiFeel (const bool on)
| Turn on/off the iFeel mode. More...
bool | getiFeel (void) const
| Get the status of iFeel mode. More...
void | setMessageType (const argoIrMessageType_t msgType)
| Set the message type of the next command (setting this resets state) More...
argoIrMessageType_t | getMessageType (void) const
| Get the message type. More...
uint8_t * | getRaw (void)
| Get the raw state of the object, suitable to be sent with the appropriate IRsend object method. More...
uint16_t | getRawByteLength () const
| Get actual raw state byte length for the current state. More...
void | setRaw (const uint8_t state[], const uint16_t length)
| Set the raw state of the object. More...

## Static Public Member Functions
static argoIrMessageType_t | getMessageType (const ArgoProtocolWREM3 &raw)
| Get message type from raw WREM-3 data. More...
static bool | hasValidPreamble (const uint8_t state[], const uint16_t length)
| Check if raw ARGO state starts with valid WREM3 preamble. More...
static bool | isValidWrem3Message (const uint8_t state[], const uint16_t nbits, bool verifyChecksum=true)
| Detects if an ARGO protocol message is a WREM-3 sub-type (model) More...
Static Public Member Functions inherited from IRArgoACBase< ArgoProtocolWREM3 >
static argoIrMessageType_t | getMessageType (const uint8_t state[], const uint16_t length)
| Get message type from raw WREM-3 data. More...
static uint16_t | getStateLengthForIrMsgType (argoIrMessageType_t type)
| Get byte length of raw WREM-3 message based on IR cmd type. More...
static bool | validChecksum (const uint8_t state[], const uint16_t length)
| Verify the checksum is valid for a given state. More...
static argoMode_t | convertMode (const stdAc::opmode_t mode)
| Convert a stdAc::opmode_t enum into its native mode. More...
static argoFan_t | convertFan (const stdAc::fanspeed_t speed)
| Convert a stdAc::fanspeed_t enum into it's native speed. More...
static argoFlap_t | convertSwingV (const stdAc::swingv_t position)
| Convert a stdAc::swingv_t enum into it's native setting. More...
static argoIrMessageType_t | convertCommand (const stdAc::ac_command_t command)
| Convert a stdAc::ac_command_t enum into its native message type. More...

## Additional Inherited Members
Protected Member Functions inherited from IRArgoACBase< ArgoProtocolWREM3 >
void | _stateReset (ArgoProtocolWREM3 *state, argoIrMessageType_t messageType=argoIrMessageType_t::AC_CONTROL)
void | stateReset (argoIrMessageType_t messageType=argoIrMessageType_t::AC_CONTROL)
| Reset the internals of the object to a known good state. More...
void | _checksum (ArgoProtocolWREM3 *state)
void | checksum (void)
| Update the checksum for the internal state. More...
Static Protected Member Functions inherited from IRArgoACBase< ArgoProtocolWREM3 >
static uint16_t | getRawByteLength (const ArgoProtocolWREM3 &raw, argoIrMessageType_t messageTypeHint=argoIrMessageType_t::AC_CONTROL)
static uint8_t | calcChecksum (const uint8_t state[], const uint16_t length)
| Calculate the checksum for a given state (WREM-3). More...
static uint8_t | getChecksum (const uint8_t state[], const uint16_t length)
| Retrieve the checksum value from transmitted state. More...
static stdAc::opmode_t | toCommonMode (const argoMode_t mode)
| Convert a native mode into its stdAc equivalent. More...
static stdAc::fanspeed_t | toCommonFanSpeed (const argoFan_t speed)
| Convert a native fan speed into its stdAc equivalent. More...
static stdAc::swingv_t | toCommonSwingV (const uint8_t position)
| Convert a native flap mode into its stdAc equivalent (WREM3). More...
static stdAc::ac_command_t | toCommonCommand (const argoIrMessageType_t command)
| Convert a native message type into its stdAc equivalent. More...
Protected Attributes inherited from IRArgoACBase< ArgoProtocolWREM3 >
ArgoProtocolWREM3 | _
| The raw protocol data. More...
uint16_t | _length
argoIrMessageType_t | _messageType
IRsend | _irsend
| instance of the IR send class More...
Related Functions inherited from IRArgoACBase< ArgoProtocolWREM3 >
uint16_t | getRawByteLength (const ArgoProtocol &, argoIrMessageType_t messageType)
| Get actual raw state byte length for the current state _param 1st param ignored: WREM-2 does not caryy type in payload, allegedly. More...
uint16_t | getRawByteLength (const ArgoProtocolWREM3 &raw, argoIrMessageType_t)
| Get actual raw state byte length for the current state. More...
void | _stateReset (ArgoProtocol *state, argoIrMessageType_t)
| Reset the given state to a known good state. More...
void | _stateReset (ArgoProtocolWREM3 *state, argoIrMessageType_t messageType)
| Reset the given state to a known good state. More...
void | _checksum (ArgoProtocol *state)
| Update the checksum for a given state (WREM2). More...
void | _checksum (ArgoProtocolWREM3 *state)
| Update the checksum for a given state (WREM3). More...

## Detailed Description

Supports Argo A/C SAC-WREM3 IR remote protocol.

## Constructor & Destructor Documentation

## ◆ IRArgoAC_WREM3()

IRArgoAC_WREM3::IRArgoAC_WREM3 | ( | 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

## ◆ getChannel()

uint8_t IRArgoAC_WREM3::getChannel | ( | void |  | ) | const

Get the currently set transmission channel.

Returns
  Channel number

## ◆ getConfigEntry()

std::pair< uint8_t, uint8_t > IRArgoAC_WREM3::getConfigEntry | ( | void |  | ) | const

Get the config entry previously set.

Returns
  Key->value pair (paramID: value)

## ◆ getCurrentDayOfWeek()

argoWeekday IRArgoAC_WREM3::getCurrentDayOfWeek | ( | void |  | ) | const

Get current day of week.

Returns
  Current day of week

## ◆ getCurrentTimeMinutes()

uint16_t IRArgoAC_WREM3::getCurrentTimeMinutes | ( | void |  | ) | const

Retrieve current time.

Returns
  Current time as minutes from 0:00

## ◆ getDelayTimerMinutes()

uint16_t IRArgoAC_WREM3::getDelayTimerMinutes | ( | void |  | ) | const

Get current delay timer value.

Returns
  Delay timer value (in minutes)

## ◆ getEco()

bool IRArgoAC_WREM3::getEco | ( | void |  | ) | const

Get the status of Economy function.

Returns
  true if on, false if off.

## ◆ getFan()

argoFan_t IRArgoAC_WREM3::getFan | ( | void |  | ) | const

## ◆ getFilter()

bool IRArgoAC_WREM3::getFilter | ( | void |  | ) | const

Get status of the filter function.

Returns
  true if on, false if off.

## ◆ getFlap()

argoFlap_t IRArgoAC_WREM3::getFlap | ( | void |  | ) | const

## ◆ getLight()

bool IRArgoAC_WREM3::getLight | ( | void |  | ) | const

Get status of device lights.

Returns
  true if on, false if off.

## ◆ getMessageType()

argoIrMessageType_t IRArgoAC_WREM3::getMessageType | ( | const ArgoProtocolWREM3 & | raw | ) |
| static

Get message type from raw WREM-3 data.

Parameters

  raw | Raw data

Returns
  IR message type

## ◆ getMode()

argoMode_t IRArgoAC_WREM3::getMode | ( | void |  | ) | const

## ◆ getModel()

argo_ac_remote_model_t IRArgoAC_WREM3::getModel | ( | void |  | ) | const

Get device model.

Returns
  Device model

## ◆ getScheduleTimerActiveDays()

std::set< argoWeekday > IRArgoAC_WREM3::getScheduleTimerActiveDays | ( | void |  | ) | const

Get the days when shedule timer shall be active (as set)

Returns
  Days when the schedule timer runs

## ◆ getScheduleTimerStartMinutes()

uint16_t IRArgoAC_WREM3::getScheduleTimerStartMinutes | ( | void |  | ) | const

Get schedule timer ON time.

Returns
  Schedule on time (as # of minutes from 0:00)

## ◆ getScheduleTimerStopMinutes()

uint16_t IRArgoAC_WREM3::getScheduleTimerStopMinutes | ( | void |  | ) | const

Get schedule timer OFF time.

Returns
  Schedule off time (as # of minutes from 0:00)

## ◆ getTimerActiveDaysBitmap()

uint8_t IRArgoAC_WREM3::getTimerActiveDaysBitmap | ( | void |  | ) | const

Get the days when shedule timer shall be active (as bitmap)

Returns
  Days when schedule timer is active, as raw bitmap type where bit[0] is Sunday, bit[1] -> Monday, ...

## ◆ getTimerType()

argoTimerType_t IRArgoAC_WREM3::getTimerType | ( | void |  | ) | const

Get currently set timer type.

Returns
  Timer type

## ◆ hasValidPreamble()

bool IRArgoAC_WREM3::hasValidPreamble | ( | const uint8_t | state[],
|  | const uint16_t | length
| ) |  |
| static

Check if raw ARGO state starts with valid WREM3 preamble.

Parameters

  state | The state bytes
  length | Length of state in bytes

Returns
  True if state starts wiht valid WREM3 preamble, False otherwise

## ◆ isValidWrem3Message()

bool IRArgoAC_WREM3::isValidWrem3Message | ( | const uint8_t | state[],
|  | const uint16_t | nbits,
|  | bool | verifyChecksum = `true`
| ) |  |
| static

Detects if an ARGO protocol message is a WREM-3 sub-type (model)

Parameters

  state | The raw IR decore state
  nbits | The length of `state` IN BITS
  verifyChecksum | Whether to perform checksum verification

Returns
  True if the message is a WREM-3 one

## ◆ sendSensorTemp()

void IRArgoAC_WREM3::sendSensorTemp | ( | const uint8_t | degrees,
|  | const uint16_t | repeat = `kArgoDefaultRepeat`
| ) |  |

Send current room temperature for the iFeel feature as a silent IR message (no acknowledgement from the device) (WREM3)

Parameters

  [in] | degrees | The temperature in degrees celsius.
  [in] | repeat | Nr. of times the message will be repeated.

## ◆ setChannel()

void IRArgoAC_WREM3::setChannel | ( | const uint8_t | channel | ) |

Set the IR channel on which to communicate.

Parameters

  [in] | channel | The desired IR channel.

## ◆ setConfigEntry()

void IRArgoAC_WREM3::setConfigEntry | ( | const uint8_t | paramId,
|  | const uint8_t | value
| ) |  |

Set the config data to send Valid only for `argoIrMessageType_t::CONFIG_PARAM_SET` message.

Parameters

  paramId | The param ID
  value | The value of the parameter

## ◆ setCurrentDayOfWeek()

void IRArgoAC_WREM3::setCurrentDayOfWeek | ( | argoWeekday | dayOfWeek | ) |

Set current day of week.

Parameters

  dayOfWeek | Current day of week

## ◆ setCurrentTimeMinutes()

void IRArgoAC_WREM3::setCurrentTimeMinutes | ( | uint16_t | currentTimeMinutes | ) |

Set current clock (as minutes, counted from 0:00) E.g. 13:38 becomes 818 (13*60+38)

Parameters

  currentTimeMinutes | Current time (in minutes)

## ◆ setDelayTimerMinutes()

void IRArgoAC_WREM3::setDelayTimerMinutes | ( | const uint16_t | delayMinutes | ) |

Set delay timer delay in minutes (10-minute increments only) Max is 1190 (19h50m)

Note
  The delay timer also accepts current device state: set by `setPower`

Parameters

  delayMinutes | Delay minutes

## ◆ setEco()

void IRArgoAC_WREM3::setEco | ( | const bool | on | ) |

Turn on/off the Economy mode (lowered power mode)

Parameters

  [in] | on | The desired setting.

## ◆ setFilter()

void IRArgoAC_WREM3::setFilter | ( | const bool | on | ) |

Turn on/off the Filter mode (not supported by Argo Ulisse)

Parameters

  [in] | on | The desired setting.

## ◆ setLight()

void IRArgoAC_WREM3::setLight | ( | const bool | on | ) |

Turn on/off the device Lights (LED)

Parameters

  [in] | on | The desired setting.

## ◆ setScheduleTimerActiveDays()

void IRArgoAC_WREM3::setScheduleTimerActiveDays | ( | const std::set< argoWeekday > & | days | ) |

Set the days when the schedule timer shall be active.

Parameters

  days | A set of days when the timer shall run

## ◆ setScheduleTimerStartMinutes()

void IRArgoAC_WREM3::setScheduleTimerStartMinutes | ( | const uint16_t | startTimeMinutes | ) |

Set schedule timer on time (time when the device should turn on) (10-minute increments only)

Parameters

  startTimeMinutes | Time when the device should turn itself on expressed as # of minutes counted from 0:00 The value is in 10-minute increments (rounded) E.g. 13:38 becomes 820 (13:40 in minutes)

## ◆ setScheduleTimerStopMinutes()

void IRArgoAC_WREM3::setScheduleTimerStopMinutes | ( | const uint16_t | stopTimeMinutes | ) |

Set schedule timer off time (time when the device should turn off) (10-minute increments only)

Parameters

  stopTimeMinutes | Time when the device should turn itself off expressed as # of minutes counted from 0:00 The value is in 10-minute increments (rounded) E.g. 13:38 becomes 820 (13:40 in minutes)

## ◆ setTimerType()

void IRArgoAC_WREM3::setTimerType | ( | const argoTimerType_t | timerType | ) |

Set timer type.

Parameters

  timerType | Timer type to use OFF | DELAY | SCHEDULE<1|2|3>

Note
  2 timer types supported: delay | schedule timer
  - `DELAY_TIMER` requires setting `setDelayTimerMinutes` and `setCurrentTimeMinutes` and (optionally) `setCurrentDayOfWeek`
  - `SCHEDULE_TIMER<x>` requires setting: `setScheduleTimerStartMinutes` `setScheduleTimerStopMinutes` `setScheduleTimerActiveDays` as well as current time and day `setCurrentTimeMinutes` and `setCurrentDayOfWeek`

## ◆ toCommon()

stdAc::state_t IRArgoAC_WREM3::toCommon | ( | void |  | ) | const

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

Returns
  The stdAc equivalent of the native settings.

## ◆ toString()

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

Convert the current internal state into a human readable string (WREM3).

Returns
  A human readable string.

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

- src/ir_Argo.h
- src/ir_Argo.cpp