Go to the documentation of this file.
22 #include "IRsend_test.h"
257 #define ARGO_COOL_ON kArgoCoolOn
258 #define ARGO_COOL_OFF kArgoCoolOff
259 #define ARGO_COOL_AUTO kArgoCoolAuto
260 #define ARGO_COOL_HUM kArgoCoolHum
261 #define ARGO_HEAT_ON kArgoHeatOn
262 #define ARGO_HEAT_AUTO kArgoHeatAuto
263 #define ARGO_HEAT_BLINK kArgoHeatBlink
264 #define ARGO_MIN_TEMP kArgoMinTemp
265 #define ARGO_MAX_TEMP kArgoMaxTemp
266 #define ARGO_FAN_AUTO kArgoFanAuto
267 #define ARGO_FAN_3 kArgoFan3
268 #define ARGO_FAN_2 kArgoFan2
269 #define ARGO_FAN_1 kArgoFan1
270 #define ARGO_FLAP_AUTO kArgoFlapAuto
271 #define ARGO_FLAP_1 kArgoFlap1
272 #define ARGO_FLAP_2 kArgoFlap2
273 #define ARGO_FLAP_3 kArgoFlap3
274 #define ARGO_FLAP_4 kArgoFlap4
275 #define ARGO_FLAP_5 kArgoFlap5
276 #define ARGO_FLAP_6 kArgoFlap6
277 #define ARGO_FLAP_FULL kArgoFlapFull
313 template <
typename ARGO_PROTOCOL_T>
315 #ifndef UNIT_TEST // A less cloggy way of expressing FRIEND_TEST(...)
322 explicit IRArgoACBase(
const uint16_t pin,
const bool inverted =
false,
323 const bool use_modulation =
true);
342 void setTemp(
const uint8_t degrees);
372 const uint16_t length);
377 void setRaw(
const uint8_t state[],
const uint16_t length);
379 static bool validChecksum(
const uint8_t state[],
const uint16_t length);
395 static uint8_t
calcChecksum(
const uint8_t state[],
const uint16_t length);
396 static uint8_t
getChecksum(
const uint8_t state[],
const uint16_t length);
424 explicit IRArgoAC(
const uint16_t pin,
const bool inverted =
false,
425 const bool use_modulation =
true);
436 void setMode(
const uint8_t mode);
440 void setFan(
const uint8_t fan);
441 uint8_t
getFan(
void)
const;
444 void setFlap(
const uint8_t flap);
451 explicit IRArgoAC_WREM3(
const uint16_t pin,
const bool inverted =
false,
452 const bool use_modulation =
true);
517 bool verifyChecksum =
true);
uint8_t RoomTemp
argoIrMessageType_t
Definition: ir_Argo.h:98
uint32_t Sum
Definition: ir_Argo.h:66
static uint8_t getChecksum(const uint8_t state[], const uint16_t length)
Retrieve the checksum value from transmitted state.
Definition: ir_Argo.cpp:436
void setFan(const uint8_t fan)
Set the speed of the fan.
Definition: ir_Argo.cpp:751
uint8_t Fan
Definition: ir_Argo.h:102
struct ArgoProtocolWREM3::Config config
ARGO_PROTOCOL_T _
The raw protocol data.
Definition: ir_Argo.h:404
argoFan_t getFanEx(void) const
-Ex for backw. compat w/ IRArgoAC
Definition: ir_Argo.cpp:659
const uint8_t kArgoHeatBlink
Definition: ir_Argo.h:209
uint8_t CurrentWeekdayHi
Definition: ir_Argo.h:135
uint8_t TimerType
Definition: ir_Argo.h:129
argo_ac_remote_model_t getModel(void) const
Get device model.
Definition: ir_Argo.cpp:1545
static stdAc::ac_command_t toCommonCommand(const argoIrMessageType_t command)
Convert a native message type into its stdAc equivalent.
Definition: ir_Argo.cpp:1189
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 t...
Definition: ir_Argo.cpp:527
void setDelayTimerMinutes(const uint16_t delayMinutes)
Set delay timer delay in minutes (10-minute increments only) Max is 1190 (19h50m)
Definition: ir_Argo.cpp:1444
swingv_t
Common A/C settings for Vertical Swing.
Definition: IRsend.h:74
uint8_t getFan(void) const
Get the current fan speed setting.
Definition: ir_Argo.cpp:758
uint8_t getTemp(void) const
Get the current temperature setting.
Definition: ir_Argo.cpp:647
void setFanEx(const argoFan_t fan)
Definition: ir_Argo.h:349
uint64_t Pre1
Definition: ir_Argo.h:33
uint8_t CurrentTimeHi
Definition: ir_Argo.h:132
const uint8_t kArgoMaxTemp
Definition: ir_Argo.h:172
const uint16_t kArgoDefaultRepeat
Definition: IRremoteESP8266.h:1166
void setFlap(const uint8_t flap)
Set the flap position. i.e. Swing. (WREM2)
Definition: ir_Argo.cpp:789
void setCurrentTimeMinutes(uint16_t currentTimeMinutes)
Set current clock (as minutes, counted from 0:00) E.g. 13:38 becomes 818 (13*60+38)
Definition: ir_Argo.cpp:1387
static stdAc::opmode_t toCommonMode(const argoMode_t mode)
Convert a native mode into its stdAc equivalent.
Definition: ir_Argo.cpp:1209
String toString(void) const
Convert the current internal state into a human readable string (WREM2).
Definition: ir_Argo.cpp:1317
void setChannel(const uint8_t channel)
Set the IR channel on which to communicate.
Definition: ir_Argo.cpp:966
fanspeed_t
Common A/C settings for Fan Speeds.
Definition: IRsend.h:61
uint8_t iFeel
Definition: ir_Argo.h:106
bool getEco(void) const
Get the status of Economy function.
Definition: ir_Argo.cpp:946
void stateReset(argoIrMessageType_t messageType=argoIrMessageType_t::AC_CONTROL)
Reset the internals of the object to a known good state.
Definition: ir_Argo.cpp:413
uint16_t getRawByteLength() const
Get actual raw state byte length for the current state.
Definition: ir_Argo.cpp:258
const uint8_t kArgoFlap2
Definition: ir_Argo.h:249
argoFlap_t getFlap(void) const
Definition: ir_Argo.cpp:927
uint8_t TimerEndHi
Definition: ir_Argo.h:145
uint8_t getFlap(void) const
Get the flap position. i.e. Swing. (WREM2)
Definition: ir_Argo.cpp:798
uint32_t Night
Definition: ir_Argo.h:58
uint16_t _length
Definition: ir_Argo.h:405
void setLight(const bool on)
Turn on/off the device Lights (LED)
Definition: ir_Argo.cpp:958
int8_t calibrate(void)
Run the calibration to calculate uSec timing offsets for this platform.
Definition: ir_Argo.h:332
std::set< argoWeekday > getScheduleTimerActiveDays(void) const
Get the days when shedule timer shall be active (as set)
Definition: ir_Argo.cpp:1530
const uint8_t kArgoFlap4
Definition: ir_Argo.h:251
bool getMax(void) const
Is the Max (i.e. Turbo) setting on?
Definition: ir_Argo.cpp:630
std::pair< uint8_t, uint8_t > getConfigEntry(void) const
Get the config entry previously set.
Definition: ir_Argo.cpp:986
void setFan(const argoFan_t fan)
Set the desired fan mode (WREM3).
Definition: ir_Argo.cpp:731
argoMode_t
A/C operation mode.
Definition: ir_Argo.h:192
const uint8_t kArgoHeatBit
Definition: ir_Argo.h:161
static argoMode_t convertMode(const stdAc::opmode_t mode)
Convert a stdAc::opmode_t enum into its native mode.
Definition: ir_Argo.cpp:1062
uint8_t CheckLo
Definition: ir_Argo.h:77
static bool validChecksum(const uint8_t state[], const uint16_t length)
Verify the checksum is valid for a given state.
Definition: ir_Argo.cpp:474
uint8_t Mode
Definition: ir_Argo.h:99
void setEco(const bool on)
Turn on/off the Economy mode (lowered power mode)
Definition: ir_Argo.cpp:942
uint8_t IrCommandType
0..3 range
Definition: ir_Argo.h:96
const uint8_t kArgoPreamble2
Definition: ir_Argo.h:163
const uint8_t kArgoFlap3
Definition: ir_Argo.h:250
argoFan_t getFan(void) const
Definition: ir_Argo.cpp:926
uint8_t Temp
argoMode_t
Definition: ir_Argo.h:101
void setScheduleTimerActiveDays(const std::set< argoWeekday > &days)
Set the days when the schedule timer shall be active.
Definition: ir_Argo.cpp:1518
const uint8_t kArgoPost
Definition: ir_Argo.h:164
Class for sending all basic IR protocols.
Definition: IRsend.h:237
void setTimerType(const argoTimerType_t timerType)
Set timer type.
Definition: ir_Argo.cpp:1426
argoMode_t getModeEx(void) const
-Ex for backw. compat w/ IRArgoAC
Definition: ir_Argo.cpp:811
const uint8_t kArgoMaxChannel
Definition: ir_Argo.h:173
int8_t calibrate(uint16_t hz=38000U)
Calculate & set any offsets to account for execution times during sending.
Definition: IRsend.cpp:207
ac_command_t
Tyoe of A/C command (if the remote uses different codes for each)
Definition: IRsend.h:90
uint8_t TimerStartHi
Definition: ir_Argo.h:141
const uint16_t kArgoStateLength
Definition: IRremoteESP8266.h:1158
std::string String
Definition: IRremoteESP8266.h:1521
Definition: ir_Argo.h:124
const uint8_t kArgoFan1
Definition: ir_Argo.h:227
void setScheduleTimerStopMinutes(const uint16_t stopTimeMinutes)
Set schedule timer off time (time when the device should turn off) (10-minute increments only)
Definition: ir_Argo.cpp:1491
static stdAc::fanspeed_t toCommonFanSpeed(const argoFan_t speed)
Convert a native fan speed into its stdAc equivalent.
Definition: ir_Argo.cpp:1224
void setMessageType(const argoIrMessageType_t msgType)
Set the message type of the next command (setting this resets state)
Definition: ir_Argo.cpp:1003
const uint8_t kArgoOff
Definition: ir_Argo.h:205
uint64_t Flap
Definition: ir_Argo.h:42
bool getNight(void) const
Get the status of Night mode. i.e. Sleep.
Definition: ir_Argo.cpp:938
uint8_t Max
a.k.a. Turbo
Definition: ir_Argo.h:109
uint8_t Sum
Unknown, always 0b110000 (TempScale?)
Definition: ir_Argo.h:115
const uint8_t kArgoFlapFull
Definition: ir_Argo.h:254
uint8_t CurrentTimeLo
Definition: ir_Argo.h:130
uint64_t Mode
Definition: ir_Argo.h:38
uint8_t TimerStartLo
Definition: ir_Argo.h:139
static bool hasValidPreamble(const uint8_t state[], const uint16_t length)
Check if raw ARGO state starts with valid WREM3 preamble.
Definition: ir_Argo.cpp:1662
bool getiFeel(void) const
Get the status of iFeel mode.
Definition: ir_Argo.cpp:998
uint8_t getSensorTemp(void) const
Get the currently stored value for the room temperature setting.
Definition: ir_Argo.cpp:1032
Base class for handling common support for Argo remote protocols (functionality is shared across WREM...
Definition: ir_Argo.h:314
uint8_t Filter
Definition: ir_Argo.h:111
const uint16_t kArgoFrequency
Definition: ir_Argo.h:167
const uint8_t kArgoDry
Definition: ir_Argo.h:203
stdAc::state_t toCommon(void) const
Convert the current internal state into its stdAc::state_t equivalent.
Definition: ir_Argo.cpp:1239
static argoFan_t convertFan(const stdAc::fanspeed_t speed)
Convert a stdAc::fanspeed_t enum into it's native speed.
Definition: ir_Argo.cpp:1082
Supports Argo A/C SAC-WREM3 IR remote protocol.
Definition: ir_Argo.h:449
uint8_t Checksum
Definition: ir_Argo.h:150
bool getPower(void) const
Get the power setting from the internal state.
Definition: ir_Argo.cpp:604
const uint8_t kArgoAuto
Definition: ir_Argo.h:204
String toString(void) const
Convert the current internal state into a human readable string (WREM3).
Definition: ir_Argo.cpp:1564
uint8_t Key
Definition: ir_Argo.h:154
argoTimerType_t getTimerType(void) const
Get currently set timer type.
Definition: ir_Argo.cpp:1436
uint8_t Post1
Definition: ir_Argo.h:149
uint64_t Temp
Definition: ir_Argo.h:39
uint32_t Power
Definition: ir_Argo.h:61
uint8_t Light
Definition: ir_Argo.h:112
void _stateReset(ARGO_PROTOCOL_T *state, argoIrMessageType_t messageType=argoIrMessageType_t::AC_CONTROL)
void setMode(const argoMode_t mode)
Set the desired operation mode.
Definition: ir_Argo.cpp:887
uint8_t Value
Definition: ir_Argo.h:155
argoIrMessageType_t _messageType
Definition: ir_Argo.h:406
void setFilter(const bool on)
Turn on/off the Filter mode (not supported by Argo Ulisse)
Definition: ir_Argo.cpp:950
const uint8_t kArgoFlap1
Definition: ir_Argo.h:248
uint8_t raw[kArgoStateLength]
The state in native IR code form.
Definition: ir_Argo.h:30
uint64_t Pre2
Definition: ir_Argo.h:35
void setPower(const bool on)
Set the internal state to have the desired power.
Definition: ir_Argo.cpp:589
void setNight(const bool on)
Turn on/off the Night mode. i.e. Sleep.
Definition: ir_Argo.cpp:933
uint8_t Flap
argoFan_t
Definition: ir_Argo.h:104
uint8_t SensorT
Definition: ir_Argo.h:121
stdAc::state_t toCommon(void) const
Convert the current internal state into its stdAc::state_t equivalent.
Definition: ir_Argo.cpp:1268
argoWeekday
Day type to set (for argoIrMessageType_t::TIMER_COMMAND)
Definition: ir_Argo.h:292
uint8_t IsOn
Definition: ir_Argo.h:128
uint8_t Checksum
Definition: ir_Argo.h:156
uint8_t DelayTimeLo
Definition: ir_Argo.h:136
argoMode_t getMode(void) const
Definition: ir_Argo.cpp:928
void setMax(const bool on)
Control the current Max setting. (i.e. Turbo)
Definition: ir_Argo.cpp:623
uint64_t Fan
Definition: ir_Argo.h:40
uint8_t IrChannel
Preamble: 0b1011 kArgoWrem3Preamble.
Definition: ir_Argo.h:95
uint8_t SensorT
Definition: ir_Argo.h:75
void setTemp(const uint8_t degrees)
Set the temperature.
Definition: ir_Argo.cpp:636
void begin(void)
Set up hardware to be able to send a message.
Definition: ir_Argo.cpp:125
uint8_t CurrentWeekdayLo
Definition: ir_Argo.h:133
uint8_t CheckHi
Definition: ir_Argo.h:74
uint32_t Post
Definition: ir_Argo.h:65
void setRaw(const uint8_t state[], const uint16_t length)
Set the raw state of the object.
Definition: ir_Argo.cpp:556
uint32_t Max
Definition: ir_Argo.h:59
uint64_t RoomTemp
Definition: ir_Argo.h:41
uint8_t Power
SwingV argoFlap_t.
Definition: ir_Argo.h:105
uint8_t raw[kArgoStateLength]
The state in native IR code form.
Definition: ir_Argo.h:91
void off(void)
Set the internal state to have the power off.
Definition: ir_Argo.cpp:568
uint8_t TimerEndLo
Definition: ir_Argo.h:143
uint8_t * getRaw(void)
Get the raw state of the object, suitable to be sent with the appropriate IRsend object method.
Definition: ir_Argo.cpp:546
argoIrMessageType_t
IR message type (determines the payload part of IR command)
Definition: ir_Argo.h:182
const uint8_t kArgoMinTemp
Definition: ir_Argo.h:171
void setSensorTemp(const uint8_t degrees)
Set the value for the current room temperature.
Definition: ir_Argo.cpp:1018
uint8_t getChannel(void) const
Get the currently set transmission channel.
Definition: ir_Argo.cpp:972
uint8_t Pre1
Definition: ir_Argo.h:94
uint8_t Fixed
Definition: ir_Argo.h:76
IRsend _irsend
instance of the IR send class
Definition: ir_Argo.h:411
void setCurrentDayOfWeek(argoWeekday dayOfWeek)
Set current day of week.
Definition: ir_Argo.cpp:1401
uint8_t getTimerActiveDaysBitmap(void) const
Get the days when shedule timer shall be active (as bitmap)
Definition: ir_Argo.cpp:1512
Definition: ir_Argo.h:152
uint16_t getCurrentTimeMinutes(void) const
Retrieve current time.
Definition: ir_Argo.cpp:1395
static argoFlap_t convertSwingV(const stdAc::swingv_t position)
Convert a stdAc::swingv_t enum into it's native setting.
Definition: ir_Argo.cpp:1105
void setiFeel(const bool on)
Turn on/off the iFeel mode.
Definition: ir_Argo.cpp:993
argoFlap_t
Flap position (swing-V)
Definition: ir_Argo.h:234
static uint16_t getStateLengthForIrMsgType(argoIrMessageType_t type)
Get byte length of raw WREM-3 message based on IR cmd type.
Definition: ir_Argo.cpp:160
Native representation of A/C IR message for WREM-3 remote.
Definition: ir_Argo.h:90
const uint8_t kArgoFan2
Definition: ir_Argo.h:228
const uint8_t kArgoCool
Definition: ir_Argo.h:202
void checksum(void)
Update the checksum for the internal state.
Definition: ir_Argo.cpp:365
uint8_t Post1
Definition: ir_Argo.h:113
const uint8_t kArgoHeatAuto
Definition: ir_Argo.h:207
Native representation of a Argo A/C message for WREM-2 remote.
Definition: ir_Argo.h:29
void setScheduleTimerStartMinutes(const uint16_t startTimeMinutes)
Set schedule timer on time (time when the device should turn on) (10-minute increments only)
Definition: ir_Argo.cpp:1467
static uint8_t calcChecksum(const uint8_t state[], const uint16_t length)
Calculate the checksum for a given state (WREM-3).
Definition: ir_Argo.cpp:291
uint8_t CheckHi
Definition: ir_Argo.h:122
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)
Definition: ir_Argo.cpp:1768
uint8_t Eco
Definition: ir_Argo.h:108
const uint8_t kArgoHeat
Definition: ir_Argo.h:206
struct ArgoProtocolWREM3::Timer timer
argoWeekday getCurrentDayOfWeek(void) const
Get current day of week.
Definition: ir_Argo.cpp:1410
uint8_t Night
Definition: ir_Argo.h:107
bool getLight(void) const
Get status of device lights.
Definition: ir_Argo.cpp:962
uint8_t getMode(void) const
Get the current operation mode.
Definition: ir_Argo.cpp:924
static argoIrMessageType_t convertCommand(const stdAc::ac_command_t command)
Convert a stdAc::ac_command_t enum into its native message type.
Definition: ir_Argo.cpp:1043
const uint8_t kArgoFlap5
Definition: ir_Argo.h:252
IRArgoAC(const uint16_t pin, const bool inverted=false, const bool use_modulation=true)
Class constructor.
Definition: ir_Argo.cpp:110
const uint8_t kArgoTempDelta
Definition: ir_Argo.h:169
void setModeEx(const argoMode_t mode)
Definition: ir_Argo.h:357
argoFlap_t getFlapEx(void) const
-Ex for backw. compat w/ IRArgoAC
Definition: ir_Argo.cpp:767
const uint8_t kArgoFlap6
Definition: ir_Argo.h:253
void setFlap(const argoFlap_t flap)
Set the desired flap mode.
Definition: ir_Argo.cpp:774
uint16_t getScheduleTimerStopMinutes(void) const
Get schedule timer OFF time.
Definition: ir_Argo.cpp:1505
uint8_t DelayTimeHi
Definition: ir_Argo.h:138
uint16_t getDelayTimerMinutes(void) const
Get current delay timer value.
Definition: ir_Argo.cpp:1457
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.
Definition: ir_Argo.cpp:978
argoTimerType_t
Timer type to set (for argoIrMessageType_t::TIMER_COMMAND)
Definition: ir_Argo.h:282
uint16_t getScheduleTimerStartMinutes(void) const
Get schedule timer ON time.
Definition: ir_Argo.cpp:1481
void _checksum(ARGO_PROTOCOL_T *state)
argoIrMessageType_t getMessageType(void) const
Get the message type.
Definition: ir_Argo.cpp:1010
uint32_t iFeel
Definition: ir_Argo.h:63
void setFlapEx(const argoFlap_t flap)
Definition: ir_Argo.h:353
argoFan_t
Fan speed.
Definition: ir_Argo.h:214
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 t...
Definition: ir_Argo.cpp:505
const uint8_t kArgoFlapAuto
Definition: ir_Argo.h:247
argo_ac_remote_model_t
Argo A/C model numbers.
Definition: IRsend.h:226
void send(const uint16_t repeat=kArgoDefaultRepeat)
Send the current internal state as an IR message.
Definition: ir_Argo.cpp:484
uint8_t TimerActiveDaysLo
Definition: ir_Argo.h:146
bool getFilter(void) const
Get status of the filter function.
Definition: ir_Argo.cpp:954
Structure to hold a common A/C state.
Definition: IRsend.h:114
const uint8_t kArgoFan3
Definition: ir_Argo.h:229
Supports Argo A/C SAC-WREM2 IR remote protocol.
Definition: ir_Argo.h:422
const uint8_t kArgoPreamble1
Definition: ir_Argo.h:162
static stdAc::swingv_t toCommonSwingV(const uint8_t position)
Convert a native flap mode into its stdAc equivalent (WREM3).
Definition: ir_Argo.cpp:1162
const uint8_t kArgoFanAuto
Definition: ir_Argo.h:226
uint8_t TimerActiveDaysHi
Definition: ir_Argo.h:148
void setMode(const uint8_t mode)
Set the desired operation mode.
Definition: ir_Argo.cpp:905
const uint8_t kArgoMaxRoomTemp
Definition: ir_Argo.h:170
IRArgoAC_WREM3(const uint16_t pin, const bool inverted=false, const bool use_modulation=true)
Class constructor.
Definition: ir_Argo.cpp:119
void on(void)
Set the internal state to have the power on.
Definition: ir_Argo.cpp:564
IRArgoACBase(const uint16_t pin, const bool inverted=false, const bool use_modulation=true)
Class constructor.
Definition: ir_Argo.cpp:101
opmode_t
Common A/C settings for A/C operating modes.
Definition: IRsend.h:49