IRremoteIDF
Infrared send & receive for ESP-IDF
Loading...
Searching...
No Matches
ir_Argo.h
Go to the documentation of this file.
1// Copyright 2017 Schmolders
2// Copyright 2022 crankyoldgit
3// Copyright 2022 Mateusz Bronk (mbronk)
6
7// Supports:
8// Brand: Argo, Model: Ulisse 13 DCI Mobile Split A/C [WREM2 remote]
9// Brand: Argo, Model: Ulisse Eco Mobile Split A/C (Wifi) [WREM3 remote]
10
11#ifndef IR_ARGO_H_
12#define IR_ARGO_H_
13
14#include <set>
15#include <utility>
16#include "IRplatform.h"
17#include "IRremoteESP8266.h"
18#include "IRsend.h"
19#ifdef UNIT_TEST
20#include "IRsend_test.h"
21#endif
22
23
24// ARGO Ulisse DCI
25
29 struct {
30 // Byte 0
31 uint64_t Pre1 :8; // Typically 0b00110101
32 // Byte 1
33 uint64_t Pre2 :8; // Typically 0b10101111
34 // Byte 2~4
35 uint64_t :3;
36 uint64_t Mode :3;
37 uint64_t Temp :5; // straddle byte 2 and 3
38 uint64_t Fan :2;
39 uint64_t RoomTemp :5; // straddle byte 3 and 4
40 uint64_t Flap :3; // SwingV
41 uint64_t :3; // OnTimer, maybe hours
42 // Byte 5
43 uint64_t :8; // OnTimer, maybe minutes
44 // Byte 6
45 uint64_t :8; // OffTimer, maybe minutes
46 // Byte 7
47 uint64_t :3; // OffTimer, maybe hours
48 uint64_t :5; // Time
49 // Byte 8
50 uint32_t :6; // Time
51 uint32_t :1; // Timer On/Off
52 uint32_t :1; // Timer Program
53 // Byte 9
54 uint32_t :1; // Timer Program
55 uint32_t :1; // Timer 1h
56 uint32_t Night :1;
57 uint32_t Max :1;
58 uint32_t :1; // Filter
59 uint32_t Power :1;
60 uint32_t :1; // const 0
61 uint32_t iFeel :1;
62 // Byte 10~11
63 uint32_t Post :2;
64 uint32_t Sum :8; // straddle byte 10 and 11
65 uint32_t :6;
66 };
67 struct {
68 // Byte 0-1
69 uint8_t :8;
70 uint8_t :8;
71 // Byte 2-3
72 uint8_t CheckHi :3;
73 uint8_t SensorT :5;
74 uint8_t Fixed :3; // Typically 0b011
75 uint8_t CheckLo :5;
76 };
77};
78
90 struct {
91 // Byte 0 (same definition across the union)
92 uint8_t Pre1 :4;
93 uint8_t IrChannel :2;
94 uint8_t IrCommandType :2;
95 // Byte 1
96 uint8_t RoomTemp :5; // in Celsius, range: 4..35 (offset by -4[*C])
97 uint8_t Mode :3;
98 // Byte 2
99 uint8_t Temp :5; // in Celsius, range: 10..32 (offset by -4[*C])
100 uint8_t Fan :3;
101 // Byte3
102 uint8_t Flap :3;
103 uint8_t Power :1;
104 uint8_t iFeel :1;
105 uint8_t Night :1;
106 uint8_t Eco :1;
107 uint8_t Max :1;
108 // Byte4
109 uint8_t Filter :1;
110 uint8_t Light :1;
111 uint8_t Post1 :6;
112 // Byte5
113 uint8_t Sum :8;
114 };
115 struct {
116 // Byte 0 (same definition across the union)
117 uint8_t :8; // {Pre1 | IrChannel | IrCommandType}
118 // Byte 1
119 uint8_t SensorT :5; // in Celsius, range: 4..35 (offset by -4[*C])
120 uint8_t CheckHi :3; // Checksum (short)
121 };
122 struct Timer {
123 // Byte 0 (same definition across the union)
124 uint8_t : 8; // {Pre1 | IrChannel | IrCommandType}
125 // Byte 1
126 uint8_t IsOn : 1;
127 uint8_t TimerType : 3;
128 uint8_t CurrentTimeLo : 4;
129 // Byte 2
130 uint8_t CurrentTimeHi : 7;
131 uint8_t CurrentWeekdayLo : 1;
132 // Byte 3
133 uint8_t CurrentWeekdayHi : 2;
134 uint8_t DelayTimeLo : 6;
135 // Byte 4
136 uint8_t DelayTimeHi : 5;
137 uint8_t TimerStartLo : 3;
138 // Byte 5
139 uint8_t TimerStartHi : 8;
140 // Byte 6
141 uint8_t TimerEndLo : 8;
142 // Byte 7
143 uint8_t TimerEndHi : 3;
144 uint8_t TimerActiveDaysLo : 5; // Bitmap (LSBit is Sunday)
145 // Byte 8
146 uint8_t TimerActiveDaysHi : 2; // Bitmap (LSBit is Sunday)
147 uint8_t Post1 : 1; // Unknown, always 1
148 uint8_t Checksum : 5;
150 struct Config {
151 uint8_t :8; // Byte 0 {Pre1 | IrChannel | IrCommandType}
152 uint8_t Key :8; // Byte 1
153 uint8_t Value :8; // Byte 2
154 uint8_t Checksum :8; // Byte 3
156};
157
158// Constants (WREM-2). Store MSB left.
159const uint8_t kArgoHeatBit = 0b00100000;
160const uint8_t kArgoPreamble1 = 0b10101100;
161const uint8_t kArgoPreamble2 = 0b11110101;
162const uint8_t kArgoPost = 0b00000010;
163
164// Constants (generic)
165const uint16_t kArgoFrequency = 38000; // Hz
166// Temp
167const uint8_t kArgoTempDelta = 4;
168const uint8_t kArgoMaxRoomTemp = 35; // Celsius
169const uint8_t kArgoMinTemp = 10; // Celsius delta +4
170const uint8_t kArgoMaxTemp = 32; // Celsius
171const uint8_t kArgoMaxChannel = 3;
172
173
180enum class argoIrMessageType_t : uint8_t {
181 AC_CONTROL = 0b00,
182 IFEEL_TEMP_REPORT = 0b01,
183 TIMER_COMMAND = 0b10, // WREM-3 only (WREM-2 has it under AC_CONTROL)
184 CONFIG_PARAM_SET = 0b11 // WREM-3 only
185};
186
190enum class argoMode_t : uint8_t {
191 COOL = 0b001,
192 DRY = 0b010,
193 HEAT = 0b011,
194 FAN = 0b100,
195 AUTO = 0b101
196};
197
198// Raw mode definitions for WREM-2 remote
199// (not wraped into a ns nor enum for backwards-compat.)
200const uint8_t kArgoCool = 0b000;
201const uint8_t kArgoDry = 0b001;
202const uint8_t kArgoAuto = 0b010;
203const uint8_t kArgoOff = 0b011;
204const uint8_t kArgoHeat = 0b100;
205const uint8_t kArgoHeatAuto = 0b101;
206// ?no idea what mode that is
207const uint8_t kArgoHeatBlink = 0b110;
208
212enum class argoFan_t : uint8_t {
213 FAN_AUTO = 0b000,
214 FAN_LOWEST = 0b001,
215 FAN_LOWER = 0b010,
216 FAN_LOW = 0b011,
217 FAN_MEDIUM = 0b100,
218 FAN_HIGH = 0b101,
219 FAN_HIGHEST = 0b110
220};
221
222// Raw fan speed definitions for WREM-2 remote
223// (not wraped into a ns nor enum for backwards-compat.)
224const uint8_t kArgoFanAuto = 0; // 0b00
225const uint8_t kArgoFan1 = 1; // 0b01
226const uint8_t kArgoFan2 = 2; // 0b10
227const uint8_t kArgoFan3 = 3; // 0b11
228
232enum class argoFlap_t : uint8_t {
233 FLAP_AUTO = 0,
234 FLAP_1 = 1, // Highest
235 FLAP_2 = 2,
236 FLAP_3 = 3,
237 FLAP_4 = 4,
238 FLAP_5 = 5,
239 FLAP_6 = 6, // Lowest
240 FLAP_FULL = 7
241};
242
243// Raw Flap/SwingV definitions for WREM-2 remote
244// (not wraped into a ns nor enum for backwards-compat.)
245const uint8_t kArgoFlapAuto = 0;
246const uint8_t kArgoFlap1 = 1;
247const uint8_t kArgoFlap2 = 2;
248const uint8_t kArgoFlap3 = 3;
249const uint8_t kArgoFlap4 = 4;
250const uint8_t kArgoFlap5 = 5;
251const uint8_t kArgoFlap6 = 6;
252const uint8_t kArgoFlapFull = 7;
253
254// Legacy defines. (Deprecated)
255#define ARGO_COOL_ON kArgoCoolOn
256#define ARGO_COOL_OFF kArgoCoolOff
257#define ARGO_COOL_AUTO kArgoCoolAuto
258#define ARGO_COOL_HUM kArgoCoolHum
259#define ARGO_HEAT_ON kArgoHeatOn
260#define ARGO_HEAT_AUTO kArgoHeatAuto
261#define ARGO_HEAT_BLINK kArgoHeatBlink
262#define ARGO_MIN_TEMP kArgoMinTemp
263#define ARGO_MAX_TEMP kArgoMaxTemp
264#define ARGO_FAN_AUTO kArgoFanAuto
265#define ARGO_FAN_3 kArgoFan3
266#define ARGO_FAN_2 kArgoFan2
267#define ARGO_FAN_1 kArgoFan1
268#define ARGO_FLAP_AUTO kArgoFlapAuto
269#define ARGO_FLAP_1 kArgoFlap1
270#define ARGO_FLAP_2 kArgoFlap2
271#define ARGO_FLAP_3 kArgoFlap3
272#define ARGO_FLAP_4 kArgoFlap4
273#define ARGO_FLAP_5 kArgoFlap5
274#define ARGO_FLAP_6 kArgoFlap6
275#define ARGO_FLAP_FULL kArgoFlapFull
276
277
280enum class argoTimerType_t : uint8_t {
281 NO_TIMER = 0b000,
282 DELAY_TIMER = 0b001,
283 SCHEDULE_TIMER_1 = 0b010,
284 SCHEDULE_TIMER_2 = 0b011,
285 SCHEDULE_TIMER_3 = 0b100
286};
287
290enum class argoWeekday : uint8_t {
291 SUNDAY = 0b000,
292 MONDAY = 0b001,
293 TUESDAY = 0b010,
294 WEDNESDAY = 0b011,
295 THURSDAY = 0b100,
296 FRIDAY = 0b101,
297 SATURDAY = 0b110
298};
299
300
301
311template <typename ARGO_PROTOCOL_T>
313#ifndef UNIT_TEST // A less cloggy way of expressing FRIEND_TEST(...)
314
315 protected:
316#else
317
318 public:
319#endif
320 explicit IRArgoACBase(const uint16_t pin, const bool inverted = false,
321 const bool use_modulation = true);
322
323 public:
324#if SEND_ARGO
325 void send(const uint16_t repeat = kArgoDefaultRepeat);
330 int8_t calibrate(void) { return _irsend.calibrate(); }
331#endif // SEND_ARGO
332
333 void begin(void);
334 void on(void);
335 void off(void);
336
337 void setPower(const bool on);
338 bool getPower(void) const;
339
340 void setTemp(const uint8_t degrees);
341 uint8_t getTemp(void) const;
342
343 void setSensorTemp(const uint8_t degrees);
344 uint8_t getSensorTemp(void) const;
345
346 void setFan(const argoFan_t fan);
347 void setFanEx(const argoFan_t fan) { setFan(fan); }
348 argoFan_t getFanEx(void) const;
349
350 void setFlap(const argoFlap_t flap);
351 void setFlapEx(const argoFlap_t flap) { setFlap(flap); }
352 argoFlap_t getFlapEx(void) const;
353
354 void setMode(const argoMode_t mode);
355 void setModeEx(const argoMode_t mode) { setMode(mode); }
356 argoMode_t getModeEx(void) const;
357
358 void setMax(const bool on);
359 bool getMax(void) const;
360
361 void setNight(const bool on);
362 bool getNight(void) const;
363
364 void setiFeel(const bool on);
365 bool getiFeel(void) const;
366
367 void setMessageType(const argoIrMessageType_t msgType);
369 static argoIrMessageType_t getMessageType(const uint8_t state[],
370 const uint16_t length);
371
372 uint8_t* getRaw(void);
373 uint16_t getRawByteLength() const;
375 void setRaw(const uint8_t state[], const uint16_t length);
376
377 static bool validChecksum(const uint8_t state[], const uint16_t length);
378
379 static argoMode_t convertMode(const stdAc::opmode_t mode);
380 static argoFan_t convertFan(const stdAc::fanspeed_t speed);
381 static argoFlap_t convertSwingV(const stdAc::swingv_t position);
383
384 protected:
385 void _stateReset(ARGO_PROTOCOL_T *state, argoIrMessageType_t messageType
387 void stateReset(argoIrMessageType_t messageType
389 void _checksum(ARGO_PROTOCOL_T *state);
390 void checksum(void);
391 static uint16_t getRawByteLength(const ARGO_PROTOCOL_T& raw,
393 static uint8_t calcChecksum(const uint8_t state[], const uint16_t length);
394 static uint8_t getChecksum(const uint8_t state[], const uint16_t length);
395
396 static stdAc::opmode_t toCommonMode(const argoMode_t mode);
397 static stdAc::fanspeed_t toCommonFanSpeed(const argoFan_t speed);
398 static stdAc::swingv_t toCommonSwingV(const uint8_t position);
400
401 // Attributes
402 ARGO_PROTOCOL_T _;
405
406#ifndef UNIT_TEST
407
408 protected:
410#else
411
412 public:
414 IRsendTest _irsend;
416#endif
417};
418
420class IRArgoAC : public IRArgoACBase<ArgoProtocol> {
421 public:
422 explicit IRArgoAC(const uint16_t pin, const bool inverted = false,
423 const bool use_modulation = true);
424
425 #if SEND_ARGO
426 void sendSensorTemp(const uint8_t degrees,
427 const uint16_t repeat = kArgoDefaultRepeat);
428 #endif // SEND_ARGO
429
430 String toString(void) const;
431 stdAc::state_t toCommon(void) const;
432
434 void setMode(const uint8_t mode);
435 uint8_t getMode(void) const;
436
438 void setFan(const uint8_t fan);
439 uint8_t getFan(void) const;
440
442 void setFlap(const uint8_t flap);
443 uint8_t getFlap(void) const;
444};
445
447class IRArgoAC_WREM3 : public IRArgoACBase<ArgoProtocolWREM3> {
448 public:
449 explicit IRArgoAC_WREM3(const uint16_t pin, const bool inverted = false,
450 const bool use_modulation = true);
451
452 #if SEND_ARGO
453 void sendSensorTemp(const uint8_t degrees,
454 const uint16_t repeat = kArgoDefaultRepeat);
455 #endif // SEND_ARGO
456
458
459
460 argoFan_t getFan(void) const;
461 argoFlap_t getFlap(void) const;
462 argoMode_t getMode(void) const;
463
464 void setEco(const bool on);
465 bool getEco(void) const;
466
467 void setFilter(const bool on);
468 bool getFilter(void) const;
469
470 void setLight(const bool on);
471 bool getLight(void) const;
472
473 void setChannel(const uint8_t channel);
474 uint8_t getChannel(void) const;
475
476 void setConfigEntry(const uint8_t paramId, const uint8_t value);
477 std::pair<uint8_t, uint8_t> getConfigEntry(void) const;
478
479 void setCurrentTimeMinutes(uint16_t currentTimeMinutes);
480 uint16_t getCurrentTimeMinutes(void) const;
481
482 void setCurrentDayOfWeek(argoWeekday dayOfWeek);
484
485 void setTimerType(const argoTimerType_t timerType);
486 argoTimerType_t getTimerType(void) const;
487
488 void setDelayTimerMinutes(const uint16_t delayMinutes);
489 uint16_t getDelayTimerMinutes(void) const;
490
491 void setScheduleTimerStartMinutes(const uint16_t startTimeMinutes);
492 uint16_t getScheduleTimerStartMinutes(void) const;
493 // uint16_t getTimerXStartMinutes(void) const
494
495 void setScheduleTimerStopMinutes(const uint16_t stopTimeMinutes);
496 uint16_t getScheduleTimerStopMinutes(void) const;
497 // uint16_t getTimerXStopMinutes(void) const;
498
499
500 void setScheduleTimerActiveDays(const std::set<argoWeekday>& days);
501 std::set<argoWeekday> getScheduleTimerActiveDays(void) const;
502 uint8_t getTimerActiveDaysBitmap(void) const;
503
506
507 String toString(void) const;
508 stdAc::state_t toCommon(void) const;
509
510 static bool hasValidPreamble(const uint8_t state[], const uint16_t length);
511
512 public:
513#if DECODE_ARGO
514 static bool isValidWrem3Message(const uint8_t state[], const uint16_t nbits,
515 bool verifyChecksum = true);
516#endif
517};
518
519#endif // IR_ARGO_H_
std::string String
The protocol code builds human readable output with String. On ESP-IDF that is just std::string.
Definition IRplatform.h:21
const uint16_t kArgoStateLength
Definition IRremoteESP8266.h:1184
const uint16_t kArgoDefaultRepeat
Definition IRremoteESP8266.h:1192
argo_ac_remote_model_t
Argo A/C model numbers.
Definition IRsend.h:237
Base class for handling common support for Argo remote protocols (functionality is shared across WREM...
Definition ir_Argo.h:312
void setMessageType(const argoIrMessageType_t msgType)
Set the message type of the next command (setting this resets state)
Definition ir_Argo.cpp:1011
bool getMax(void) const
Is the Max (i.e. Turbo) setting on?
Definition ir_Argo.cpp:636
uint8_t getTemp(void) const
Get the current temperature setting.
Definition ir_Argo.cpp:653
bool getiFeel(void) const
Get the status of iFeel mode.
Definition ir_Argo.cpp:1006
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:294
uint8_t getSensorTemp(void) const
Get the currently stored value for the room temperature setting.
Definition ir_Argo.cpp:1040
void setTemp(const uint8_t degrees)
Set the temperature.
Definition ir_Argo.cpp:642
static stdAc::ac_command_t toCommonCommand(const argoIrMessageType_t command)
Convert a native message type into its stdAc equivalent.
Definition ir_Argo.cpp:1198
void setPower(const bool on)
Set the internal state to have the desired power.
Definition ir_Argo.cpp:595
static stdAc::fanspeed_t toCommonFanSpeed(const argoFan_t speed)
Convert a native fan speed into its stdAc equivalent.
Definition ir_Argo.cpp:1233
void checksum(void)
Update the checksum for the internal state.
Definition ir_Argo.cpp:368
void setiFeel(const bool on)
Turn on/off the iFeel mode.
Definition ir_Argo.cpp:1001
static stdAc::opmode_t toCommonMode(const argoMode_t mode)
Convert a native mode into its stdAc equivalent.
Definition ir_Argo.cpp:1218
argoMode_t getModeEx(void) const
-Ex for backw. compat w/ IRArgoAC
Definition ir_Argo.cpp:818
void setModeEx(const argoMode_t mode)
Definition ir_Argo.h:355
static uint8_t getChecksum(const uint8_t state[], const uint16_t length)
Retrieve the checksum value from transmitted state.
Definition ir_Argo.cpp:439
void off(void)
Set the internal state to have the power off.
Definition ir_Argo.cpp:573
uint16_t getRawByteLength() const
Get actual raw state byte length for the current state.
Definition ir_Argo.cpp:260
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:1051
void setRaw(const uint8_t state[], const uint16_t length)
Set the raw state of the object.
Definition ir_Argo.cpp:561
uint16_t _length
Definition ir_Argo.h:403
IRsend _irsend
instance of the IR send class
Definition ir_Argo.h:409
static bool validChecksum(const uint8_t state[], const uint16_t length)
Verify the checksum is valid for a given state.
Definition ir_Argo.cpp:478
bool getPower(void) const
Get the power setting from the internal state.
Definition ir_Argo.cpp:610
static argoMode_t convertMode(const stdAc::opmode_t mode)
Convert a stdAc::opmode_t enum into its native mode.
Definition ir_Argo.cpp:1070
argoIrMessageType_t _messageType
Definition ir_Argo.h:404
static uint16_t getStateLengthForIrMsgType(argoIrMessageType_t type)
Get byte length of raw WREM-3 message based on IR cmd type.
Definition ir_Argo.cpp:161
void setMode(const argoMode_t mode)
Set the desired operation mode.
Definition ir_Argo.cpp:895
void setFanEx(const argoFan_t fan)
Definition ir_Argo.h:347
ARGO_PROTOCOL_T _
The raw protocol data.
Definition ir_Argo.h:402
void send(const uint16_t repeat=kArgoDefaultRepeat)
Send the current internal state as an IR message.
Definition ir_Argo.cpp:488
static argoFan_t convertFan(const stdAc::fanspeed_t speed)
Convert a stdAc::fanspeed_t enum into it's native speed.
Definition ir_Argo.cpp:1090
bool getNight(void) const
Get the status of Night mode. i.e. Sleep.
Definition ir_Argo.cpp:946
void setFan(const argoFan_t fan)
Set the desired fan mode (WREM3).
Definition ir_Argo.cpp:738
argoFan_t getFanEx(void) const
-Ex for backw. compat w/ IRArgoAC
Definition ir_Argo.cpp:665
void setFlapEx(const argoFlap_t flap)
Definition ir_Argo.h:351
void setNight(const bool on)
Turn on/off the Night mode. i.e. Sleep.
Definition ir_Argo.cpp:941
void _checksum(ARGO_PROTOCOL_T *state)
void setSensorTemp(const uint8_t degrees)
Set the value for the current room temperature.
Definition ir_Argo.cpp:1026
void on(void)
Set the internal state to have the power on.
Definition ir_Argo.cpp:569
static argoFlap_t convertSwingV(const stdAc::swingv_t position)
Convert a stdAc::swingv_t enum into it's native setting.
Definition ir_Argo.cpp:1113
static uint16_t getRawByteLength(const ARGO_PROTOCOL_T &raw, argoIrMessageType_t messageTypeHint=argoIrMessageType_t::AC_CONTROL)
int8_t calibrate(void)
Run the calibration to calculate uSec timing offsets for this platform.
Definition ir_Argo.h:330
argoIrMessageType_t getMessageType(void) const
Get the message type.
Definition ir_Argo.cpp:1018
argoFlap_t getFlapEx(void) const
-Ex for backw. compat w/ IRArgoAC
Definition ir_Argo.cpp:774
void setFlap(const argoFlap_t flap)
Set the desired flap mode.
Definition ir_Argo.cpp:781
static stdAc::swingv_t toCommonSwingV(const uint8_t position)
Convert a native flap mode into its stdAc equivalent (WREM3).
Definition ir_Argo.cpp:1171
void _stateReset(ARGO_PROTOCOL_T *state, argoIrMessageType_t messageType=argoIrMessageType_t::AC_CONTROL)
void begin(void)
Set up hardware to be able to send a message.
Definition ir_Argo.cpp:125
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:551
void stateReset(argoIrMessageType_t messageType=argoIrMessageType_t::AC_CONTROL)
Reset the internals of the object to a known good state.
Definition ir_Argo.cpp:416
void setMax(const bool on)
Control the current Max setting. (i.e. Turbo)
Definition ir_Argo.cpp:629
Supports Argo A/C SAC-WREM3 IR remote protocol.
Definition ir_Argo.h:447
stdAc::state_t toCommon(void) const
Convert the current internal state into its stdAc::state_t equivalent.
Definition ir_Argo.cpp:1277
void setChannel(const uint8_t channel)
Set the IR channel on which to communicate.
Definition ir_Argo.cpp:974
uint16_t getScheduleTimerStopMinutes(void) const
Get schedule timer OFF time.
Definition ir_Argo.cpp:1514
argo_ac_remote_model_t getModel(void) const
Get device model.
Definition ir_Argo.cpp:1554
bool getEco(void) const
Get the status of Economy function.
Definition ir_Argo.cpp:954
String toString(void) const
Convert the current internal state into a human readable string (WREM3).
Definition ir_Argo.cpp:1573
uint16_t getDelayTimerMinutes(void) const
Get current delay timer value.
Definition ir_Argo.cpp:1466
uint16_t getCurrentTimeMinutes(void) const
Retrieve current time.
Definition ir_Argo.cpp:1404
argoWeekday getCurrentDayOfWeek(void) const
Get current day of week.
Definition ir_Argo.cpp:1419
void setTimerType(const argoTimerType_t timerType)
Set timer type.
Definition ir_Argo.cpp:1435
void setDelayTimerMinutes(const uint16_t delayMinutes)
Set delay timer delay in minutes (10-minute increments only) Max is 1190 (19h50m)
Definition ir_Argo.cpp:1453
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:1671
void setScheduleTimerActiveDays(const std::set< argoWeekday > &days)
Set the days when the schedule timer shall be active.
Definition ir_Argo.cpp:1527
uint8_t getChannel(void) const
Get the currently set transmission channel.
Definition ir_Argo.cpp:980
uint16_t getScheduleTimerStartMinutes(void) const
Get schedule timer ON time.
Definition ir_Argo.cpp:1490
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:532
void setLight(const bool on)
Turn on/off the device Lights (LED)
Definition ir_Argo.cpp:966
argoMode_t getMode(void) const
Definition ir_Argo.cpp:936
void setEco(const bool on)
Turn on/off the Economy mode (lowered power mode)
Definition ir_Argo.cpp:950
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:1777
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:1396
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:1476
argoFan_t getFan(void) const
Definition ir_Argo.cpp:934
void setCurrentDayOfWeek(argoWeekday dayOfWeek)
Set current day of week.
Definition ir_Argo.cpp:1410
uint8_t getTimerActiveDaysBitmap(void) const
Get the days when shedule timer shall be active (as bitmap)
Definition ir_Argo.cpp:1521
bool getLight(void) const
Get status of device lights.
Definition ir_Argo.cpp:970
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:1500
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:986
argoTimerType_t getTimerType(void) const
Get currently set timer type.
Definition ir_Argo.cpp:1445
argoFlap_t getFlap(void) const
Definition ir_Argo.cpp:935
bool getFilter(void) const
Get status of the filter function.
Definition ir_Argo.cpp:962
std::pair< uint8_t, uint8_t > getConfigEntry(void) const
Get the config entry previously set.
Definition ir_Argo.cpp:994
void setFilter(const bool on)
Turn on/off the Filter mode (not supported by Argo Ulisse)
Definition ir_Argo.cpp:958
std::set< argoWeekday > getScheduleTimerActiveDays(void) const
Get the days when shedule timer shall be active (as set)
Definition ir_Argo.cpp:1539
Supports Argo A/C SAC-WREM2 IR remote protocol.
Definition ir_Argo.h:420
uint8_t getMode(void) const
Get the current operation mode.
Definition ir_Argo.cpp:932
void setFlap(const uint8_t flap)
Set the flap position. i.e. Swing. (WREM2)
Definition ir_Argo.cpp:796
void setFan(const uint8_t fan)
Set the speed of the fan.
Definition ir_Argo.cpp:758
void setMode(const uint8_t mode)
Set the desired operation mode.
Definition ir_Argo.cpp:913
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:510
stdAc::state_t toCommon(void) const
Convert the current internal state into its stdAc::state_t equivalent.
Definition ir_Argo.cpp:1248
String toString(void) const
Convert the current internal state into a human readable string (WREM2).
Definition ir_Argo.cpp:1326
uint8_t getFlap(void) const
Get the flap position. i.e. Swing. (WREM2)
Definition ir_Argo.cpp:805
uint8_t getFan(void) const
Get the current fan speed setting.
Definition ir_Argo.cpp:765
Class for sending all basic IR protocols.
Definition IRsend.h:256
int8_t calibrate(uint16_t hz=38000U)
Calculate & set any offsets to account for execution times during sending.
Definition IRsend.cpp:286
const uint8_t kArgoHeatAuto
Definition ir_Argo.h:205
const uint8_t kArgoMaxChannel
Definition ir_Argo.h:171
const uint8_t kArgoMaxTemp
Definition ir_Argo.h:170
const uint8_t kArgoMaxRoomTemp
Definition ir_Argo.h:168
const uint16_t kArgoFrequency
Definition ir_Argo.h:165
const uint8_t kArgoFanAuto
Definition ir_Argo.h:224
const uint8_t kArgoHeat
Definition ir_Argo.h:204
const uint8_t kArgoFlap1
Definition ir_Argo.h:246
const uint8_t kArgoMinTemp
Definition ir_Argo.h:169
argoWeekday
Day type to set (for argoIrMessageType_t::TIMER_COMMAND)
Definition ir_Argo.h:290
const uint8_t kArgoAuto
Definition ir_Argo.h:202
const uint8_t kArgoFlap4
Definition ir_Argo.h:249
const uint8_t kArgoFlap5
Definition ir_Argo.h:250
argoFlap_t
Flap position (swing-V)
Definition ir_Argo.h:232
const uint8_t kArgoTempDelta
Definition ir_Argo.h:167
const uint8_t kArgoFan2
Definition ir_Argo.h:226
const uint8_t kArgoFlapFull
Definition ir_Argo.h:252
argoTimerType_t
Timer type to set (for argoIrMessageType_t::TIMER_COMMAND)
Definition ir_Argo.h:280
const uint8_t kArgoPost
Definition ir_Argo.h:162
argoFan_t
Fan speed.
Definition ir_Argo.h:212
const uint8_t kArgoFan3
Definition ir_Argo.h:227
const uint8_t kArgoFlap2
Definition ir_Argo.h:247
const uint8_t kArgoFlap3
Definition ir_Argo.h:248
const uint8_t kArgoCool
Definition ir_Argo.h:200
const uint8_t kArgoFan1
Definition ir_Argo.h:225
const uint8_t kArgoFlap6
Definition ir_Argo.h:251
argoMode_t
A/C operation mode.
Definition ir_Argo.h:190
const uint8_t kArgoPreamble2
Definition ir_Argo.h:161
const uint8_t kArgoPreamble1
Definition ir_Argo.h:160
const uint8_t kArgoHeatBlink
Definition ir_Argo.h:207
const uint8_t kArgoHeatBit
Definition ir_Argo.h:159
const uint8_t kArgoDry
Definition ir_Argo.h:201
const uint8_t kArgoOff
Definition ir_Argo.h:203
argoIrMessageType_t
IR message type (determines the payload part of IR command)
Definition ir_Argo.h:180
const uint8_t kArgoFlapAuto
Definition ir_Argo.h:245
fanspeed_t
Common A/C settings for Fan Speeds.
Definition IRsend.h:67
ac_command_t
Tyoe of A/C command (if the remote uses different codes for each)
Definition IRsend.h:96
opmode_t
Common A/C settings for A/C operating modes.
Definition IRsend.h:55
swingv_t
Common A/C settings for Vertical Swing.
Definition IRsend.h:80
Definition ir_Argo.h:150
uint8_t Value
Definition ir_Argo.h:153
uint8_t Key
Definition ir_Argo.h:152
uint8_t Checksum
Definition ir_Argo.h:154
Definition ir_Argo.h:122
uint8_t Checksum
Definition ir_Argo.h:148
uint8_t DelayTimeHi
Definition ir_Argo.h:136
uint8_t IsOn
Definition ir_Argo.h:126
uint8_t DelayTimeLo
Definition ir_Argo.h:134
uint8_t TimerActiveDaysLo
Definition ir_Argo.h:144
uint8_t CurrentWeekdayLo
Definition ir_Argo.h:131
uint8_t CurrentTimeHi
Definition ir_Argo.h:130
uint8_t TimerActiveDaysHi
Definition ir_Argo.h:146
uint8_t CurrentWeekdayHi
Definition ir_Argo.h:133
uint8_t TimerEndHi
Definition ir_Argo.h:143
uint8_t CurrentTimeLo
Definition ir_Argo.h:128
uint8_t TimerType
Definition ir_Argo.h:127
uint8_t TimerStartLo
Definition ir_Argo.h:137
uint8_t Post1
Definition ir_Argo.h:147
uint8_t TimerEndLo
Definition ir_Argo.h:141
uint8_t TimerStartHi
Definition ir_Argo.h:139
Structure to hold a common A/C state.
Definition IRsend.h:120
Native representation of A/C IR message for WREM-3 remote.
Definition ir_Argo.h:88
uint8_t Night
Definition ir_Argo.h:105
uint8_t RoomTemp
argoIrMessageType_t
Definition ir_Argo.h:96
uint8_t Power
SwingV argoFlap_t.
Definition ir_Argo.h:103
uint8_t Sum
Unknown, always 0b110000 (TempScale?)
Definition ir_Argo.h:113
struct ArgoProtocolWREM3::Config config
uint8_t Mode
Definition ir_Argo.h:97
uint8_t Eco
Definition ir_Argo.h:106
uint8_t Flap
argoFan_t
Definition ir_Argo.h:102
struct ArgoProtocolWREM3::Timer timer
uint8_t IrChannel
Preamble: 0b1011 kArgoWrem3Preamble.
Definition ir_Argo.h:93
uint8_t CheckHi
Definition ir_Argo.h:120
uint8_t Temp
argoMode_t
Definition ir_Argo.h:99
uint8_t SensorT
Definition ir_Argo.h:119
uint8_t Fan
Definition ir_Argo.h:100
uint8_t Pre1
Definition ir_Argo.h:92
uint8_t IrCommandType
0..3 range
Definition ir_Argo.h:94
uint8_t Light
Definition ir_Argo.h:110
uint8_t Post1
Definition ir_Argo.h:111
uint8_t raw[kArgoStateLength]
The state in native IR code form.
Definition ir_Argo.h:89
uint8_t Filter
Definition ir_Argo.h:109
uint8_t Max
a.k.a. Turbo
Definition ir_Argo.h:107
uint8_t iFeel
Definition ir_Argo.h:104
Native representation of a Argo A/C message for WREM-2 remote.
Definition ir_Argo.h:27
uint8_t Fixed
Definition ir_Argo.h:74
uint64_t RoomTemp
Definition ir_Argo.h:39
uint32_t Night
Definition ir_Argo.h:56
uint32_t Power
Definition ir_Argo.h:59
uint64_t Pre1
Definition ir_Argo.h:31
uint8_t SensorT
Definition ir_Argo.h:73
uint8_t raw[kArgoStateLength]
The state in native IR code form.
Definition ir_Argo.h:28
uint64_t Fan
Definition ir_Argo.h:38
uint64_t Temp
Definition ir_Argo.h:37
uint32_t iFeel
Definition ir_Argo.h:61
uint32_t Sum
Definition ir_Argo.h:64
uint64_t Flap
Definition ir_Argo.h:40
uint64_t Pre2
Definition ir_Argo.h:33
uint32_t Max
Definition ir_Argo.h:57
uint32_t Post
Definition ir_Argo.h:63
uint8_t CheckLo
Definition ir_Argo.h:75
uint8_t CheckHi
Definition ir_Argo.h:72
uint64_t Mode
Definition ir_Argo.h:36