IRremoteESP8266
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#ifndef UNIT_TEST
17#include <Arduino.h>
18#endif
19#include "IRremoteESP8266.h"
20#include "IRsend.h"
21#ifdef UNIT_TEST
22#include "IRsend_test.h"
23#endif
24
25
26// ARGO Ulisse DCI
27
31 struct {
32 // Byte 0
33 uint64_t Pre1 :8; // Typically 0b00110101
34 // Byte 1
35 uint64_t Pre2 :8; // Typically 0b10101111
36 // Byte 2~4
37 uint64_t :3;
38 uint64_t Mode :3;
39 uint64_t Temp :5; // straddle byte 2 and 3
40 uint64_t Fan :2;
41 uint64_t RoomTemp :5; // straddle byte 3 and 4
42 uint64_t Flap :3; // SwingV
43 uint64_t :3; // OnTimer, maybe hours
44 // Byte 5
45 uint64_t :8; // OnTimer, maybe minutes
46 // Byte 6
47 uint64_t :8; // OffTimer, maybe minutes
48 // Byte 7
49 uint64_t :3; // OffTimer, maybe hours
50 uint64_t :5; // Time
51 // Byte 8
52 uint32_t :6; // Time
53 uint32_t :1; // Timer On/Off
54 uint32_t :1; // Timer Program
55 // Byte 9
56 uint32_t :1; // Timer Program
57 uint32_t :1; // Timer 1h
58 uint32_t Night :1;
59 uint32_t Max :1;
60 uint32_t :1; // Filter
61 uint32_t Power :1;
62 uint32_t :1; // const 0
63 uint32_t iFeel :1;
64 // Byte 10~11
65 uint32_t Post :2;
66 uint32_t Sum :8; // straddle byte 10 and 11
67 uint32_t :6;
68 };
69 struct {
70 // Byte 0-1
71 uint8_t :8;
72 uint8_t :8;
73 // Byte 2-3
74 uint8_t CheckHi :3;
75 uint8_t SensorT :5;
76 uint8_t Fixed :3; // Typically 0b011
77 uint8_t CheckLo :5;
78 };
79};
80
92 struct {
93 // Byte 0 (same definition across the union)
94 uint8_t Pre1 :4;
95 uint8_t IrChannel :2;
96 uint8_t IrCommandType :2;
97 // Byte 1
98 uint8_t RoomTemp :5; // in Celsius, range: 4..35 (offset by -4[*C])
99 uint8_t Mode :3;
100 // Byte 2
101 uint8_t Temp :5; // in Celsius, range: 10..32 (offset by -4[*C])
102 uint8_t Fan :3;
103 // Byte3
104 uint8_t Flap :3;
105 uint8_t Power :1;
106 uint8_t iFeel :1;
107 uint8_t Night :1;
108 uint8_t Eco :1;
109 uint8_t Max :1;
110 // Byte4
111 uint8_t Filter :1;
112 uint8_t Light :1;
113 uint8_t Post1 :6;
114 // Byte5
115 uint8_t Sum :8;
116 };
117 struct {
118 // Byte 0 (same definition across the union)
119 uint8_t :8; // {Pre1 | IrChannel | IrCommandType}
120 // Byte 1
121 uint8_t SensorT :5; // in Celsius, range: 4..35 (offset by -4[*C])
122 uint8_t CheckHi :3; // Checksum (short)
123 };
124 struct Timer {
125 // Byte 0 (same definition across the union)
126 uint8_t : 8; // {Pre1 | IrChannel | IrCommandType}
127 // Byte 1
128 uint8_t IsOn : 1;
129 uint8_t TimerType : 3;
130 uint8_t CurrentTimeLo : 4;
131 // Byte 2
132 uint8_t CurrentTimeHi : 7;
133 uint8_t CurrentWeekdayLo : 1;
134 // Byte 3
135 uint8_t CurrentWeekdayHi : 2;
136 uint8_t DelayTimeLo : 6;
137 // Byte 4
138 uint8_t DelayTimeHi : 5;
139 uint8_t TimerStartLo : 3;
140 // Byte 5
141 uint8_t TimerStartHi : 8;
142 // Byte 6
143 uint8_t TimerEndLo : 8;
144 // Byte 7
145 uint8_t TimerEndHi : 3;
146 uint8_t TimerActiveDaysLo : 5; // Bitmap (LSBit is Sunday)
147 // Byte 8
148 uint8_t TimerActiveDaysHi : 2; // Bitmap (LSBit is Sunday)
149 uint8_t Post1 : 1; // Unknown, always 1
150 uint8_t Checksum : 5;
152 struct Config {
153 uint8_t :8; // Byte 0 {Pre1 | IrChannel | IrCommandType}
154 uint8_t Key :8; // Byte 1
155 uint8_t Value :8; // Byte 2
156 uint8_t Checksum :8; // Byte 3
158};
159
160// Constants (WREM-2). Store MSB left.
161const uint8_t kArgoHeatBit = 0b00100000;
162const uint8_t kArgoPreamble1 = 0b10101100;
163const uint8_t kArgoPreamble2 = 0b11110101;
164const uint8_t kArgoPost = 0b00000010;
165
166// Constants (generic)
167const uint16_t kArgoFrequency = 38000; // Hz
168// Temp
169const uint8_t kArgoTempDelta = 4;
170const uint8_t kArgoMaxRoomTemp = 35; // Celsius
171const uint8_t kArgoMinTemp = 10; // Celsius delta +4
172const uint8_t kArgoMaxTemp = 32; // Celsius
173const uint8_t kArgoMaxChannel = 3;
174
175
182enum class argoIrMessageType_t : uint8_t {
183 AC_CONTROL = 0b00,
184 IFEEL_TEMP_REPORT = 0b01,
185 TIMER_COMMAND = 0b10, // WREM-3 only (WREM-2 has it under AC_CONTROL)
186 CONFIG_PARAM_SET = 0b11 // WREM-3 only
187};
188
192enum class argoMode_t : uint8_t {
193 COOL = 0b001,
194 DRY = 0b010,
195 HEAT = 0b011,
196 FAN = 0b100,
197 AUTO = 0b101
198};
199
200// Raw mode definitions for WREM-2 remote
201// (not wraped into a ns nor enum for backwards-compat.)
202const uint8_t kArgoCool = 0b000;
203const uint8_t kArgoDry = 0b001;
204const uint8_t kArgoAuto = 0b010;
205const uint8_t kArgoOff = 0b011;
206const uint8_t kArgoHeat = 0b100;
207const uint8_t kArgoHeatAuto = 0b101;
208// ?no idea what mode that is
209const uint8_t kArgoHeatBlink = 0b110;
210
214enum class argoFan_t : uint8_t {
215 FAN_AUTO = 0b000,
216 FAN_LOWEST = 0b001,
217 FAN_LOWER = 0b010,
218 FAN_LOW = 0b011,
219 FAN_MEDIUM = 0b100,
220 FAN_HIGH = 0b101,
221 FAN_HIGHEST = 0b110
222};
223
224// Raw fan speed definitions for WREM-2 remote
225// (not wraped into a ns nor enum for backwards-compat.)
226const uint8_t kArgoFanAuto = 0; // 0b00
227const uint8_t kArgoFan1 = 1; // 0b01
228const uint8_t kArgoFan2 = 2; // 0b10
229const uint8_t kArgoFan3 = 3; // 0b11
230
234enum class argoFlap_t : uint8_t {
235 FLAP_AUTO = 0,
236 FLAP_1 = 1, // Highest
237 FLAP_2 = 2,
238 FLAP_3 = 3,
239 FLAP_4 = 4,
240 FLAP_5 = 5,
241 FLAP_6 = 6, // Lowest
242 FLAP_FULL = 7
243};
244
245// Raw Flap/SwingV definitions for WREM-2 remote
246// (not wraped into a ns nor enum for backwards-compat.)
247const uint8_t kArgoFlapAuto = 0;
248const uint8_t kArgoFlap1 = 1;
249const uint8_t kArgoFlap2 = 2;
250const uint8_t kArgoFlap3 = 3;
251const uint8_t kArgoFlap4 = 4;
252const uint8_t kArgoFlap5 = 5;
253const uint8_t kArgoFlap6 = 6;
254const uint8_t kArgoFlapFull = 7;
255
256// Legacy defines. (Deprecated)
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
278
279
282enum class argoTimerType_t : uint8_t {
283 NO_TIMER = 0b000,
284 DELAY_TIMER = 0b001,
285 SCHEDULE_TIMER_1 = 0b010,
286 SCHEDULE_TIMER_2 = 0b011,
287 SCHEDULE_TIMER_3 = 0b100
288};
289
292enum class argoWeekday : uint8_t {
293 SUNDAY = 0b000,
294 MONDAY = 0b001,
295 TUESDAY = 0b010,
296 WEDNESDAY = 0b011,
297 THURSDAY = 0b100,
298 FRIDAY = 0b101,
299 SATURDAY = 0b110
300};
301
302
303
313template <typename ARGO_PROTOCOL_T>
315#ifndef UNIT_TEST // A less cloggy way of expressing FRIEND_TEST(...)
316
317 protected:
318#else
319
320 public:
321#endif
322 explicit IRArgoACBase(const uint16_t pin, const bool inverted = false,
323 const bool use_modulation = true);
324
325 public:
326#if SEND_ARGO
327 void send(const uint16_t repeat = kArgoDefaultRepeat);
332 int8_t calibrate(void) { return _irsend.calibrate(); }
333#endif // SEND_ARGO
334
335 void begin(void);
336 void on(void);
337 void off(void);
338
339 void setPower(const bool on);
340 bool getPower(void) const;
341
342 void setTemp(const uint8_t degrees);
343 uint8_t getTemp(void) const;
344
345 void setSensorTemp(const uint8_t degrees);
346 uint8_t getSensorTemp(void) const;
347
348 void setFan(const argoFan_t fan);
349 void setFanEx(const argoFan_t fan) { setFan(fan); }
350 argoFan_t getFanEx(void) const;
351
352 void setFlap(const argoFlap_t flap);
353 void setFlapEx(const argoFlap_t flap) { setFlap(flap); }
354 argoFlap_t getFlapEx(void) const;
355
356 void setMode(const argoMode_t mode);
357 void setModeEx(const argoMode_t mode) { setMode(mode); }
358 argoMode_t getModeEx(void) const;
359
360 void setMax(const bool on);
361 bool getMax(void) const;
362
363 void setNight(const bool on);
364 bool getNight(void) const;
365
366 void setiFeel(const bool on);
367 bool getiFeel(void) const;
368
369 void setMessageType(const argoIrMessageType_t msgType);
371 static argoIrMessageType_t getMessageType(const uint8_t state[],
372 const uint16_t length);
373
374 uint8_t* getRaw(void);
375 uint16_t getRawByteLength() const;
377 void setRaw(const uint8_t state[], const uint16_t length);
378
379 static bool validChecksum(const uint8_t state[], const uint16_t length);
380
381 static argoMode_t convertMode(const stdAc::opmode_t mode);
382 static argoFan_t convertFan(const stdAc::fanspeed_t speed);
383 static argoFlap_t convertSwingV(const stdAc::swingv_t position);
385
386 protected:
387 void _stateReset(ARGO_PROTOCOL_T *state, argoIrMessageType_t messageType
389 void stateReset(argoIrMessageType_t messageType
391 void _checksum(ARGO_PROTOCOL_T *state);
392 void checksum(void);
393 static uint16_t getRawByteLength(const ARGO_PROTOCOL_T& raw,
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);
397
398 static stdAc::opmode_t toCommonMode(const argoMode_t mode);
399 static stdAc::fanspeed_t toCommonFanSpeed(const argoFan_t speed);
400 static stdAc::swingv_t toCommonSwingV(const uint8_t position);
402
403 // Attributes
404 ARGO_PROTOCOL_T _;
407
408#ifndef UNIT_TEST
409
410 protected:
412#else
413
414 public:
416 IRsendTest _irsend;
418#endif
419};
420
422class IRArgoAC : public IRArgoACBase<ArgoProtocol> {
423 public:
424 explicit IRArgoAC(const uint16_t pin, const bool inverted = false,
425 const bool use_modulation = true);
426
427 #if SEND_ARGO
428 void sendSensorTemp(const uint8_t degrees,
429 const uint16_t repeat = kArgoDefaultRepeat);
430 #endif // SEND_ARGO
431
432 String toString(void) const;
433 stdAc::state_t toCommon(void) const;
434
436 void setMode(const uint8_t mode);
437 uint8_t getMode(void) const;
438
440 void setFan(const uint8_t fan);
441 uint8_t getFan(void) const;
442
444 void setFlap(const uint8_t flap);
445 uint8_t getFlap(void) const;
446};
447
449class IRArgoAC_WREM3 : public IRArgoACBase<ArgoProtocolWREM3> {
450 public:
451 explicit IRArgoAC_WREM3(const uint16_t pin, const bool inverted = false,
452 const bool use_modulation = true);
453
454 #if SEND_ARGO
455 void sendSensorTemp(const uint8_t degrees,
456 const uint16_t repeat = kArgoDefaultRepeat);
457 #endif // SEND_ARGO
458
460
461
462 argoFan_t getFan(void) const;
463 argoFlap_t getFlap(void) const;
464 argoMode_t getMode(void) const;
465
466 void setEco(const bool on);
467 bool getEco(void) const;
468
469 void setFilter(const bool on);
470 bool getFilter(void) const;
471
472 void setLight(const bool on);
473 bool getLight(void) const;
474
475 void setChannel(const uint8_t channel);
476 uint8_t getChannel(void) const;
477
478 void setConfigEntry(const uint8_t paramId, const uint8_t value);
479 std::pair<uint8_t, uint8_t> getConfigEntry(void) const;
480
481 void setCurrentTimeMinutes(uint16_t currentTimeMinutes);
482 uint16_t getCurrentTimeMinutes(void) const;
483
484 void setCurrentDayOfWeek(argoWeekday dayOfWeek);
486
487 void setTimerType(const argoTimerType_t timerType);
488 argoTimerType_t getTimerType(void) const;
489
490 void setDelayTimerMinutes(const uint16_t delayMinutes);
491 uint16_t getDelayTimerMinutes(void) const;
492
493 void setScheduleTimerStartMinutes(const uint16_t startTimeMinutes);
494 uint16_t getScheduleTimerStartMinutes(void) const;
495 // uint16_t getTimerXStartMinutes(void) const
496
497 void setScheduleTimerStopMinutes(const uint16_t stopTimeMinutes);
498 uint16_t getScheduleTimerStopMinutes(void) const;
499 // uint16_t getTimerXStopMinutes(void) const;
500
501
502 void setScheduleTimerActiveDays(const std::set<argoWeekday>& days);
503 std::set<argoWeekday> getScheduleTimerActiveDays(void) const;
504 uint8_t getTimerActiveDaysBitmap(void) const;
505
508
509 String toString(void) const;
510 stdAc::state_t toCommon(void) const;
511
512 static bool hasValidPreamble(const uint8_t state[], const uint16_t length);
513
514 public:
515#if DECODE_ARGO
516 static bool isValidWrem3Message(const uint8_t state[], const uint16_t nbits,
517 bool verifyChecksum = true);
518#endif
519};
520
521#endif // IR_ARGO_H_
const uint16_t kArgoStateLength
Definition IRremoteESP8266.h:1185
const uint16_t kArgoDefaultRepeat
Definition IRremoteESP8266.h:1193
std::string String
Definition IRremoteESP8266.h:1564
argo_ac_remote_model_t
Argo A/C model numbers.
Definition IRsend.h:231
Base class for handling common support for Argo remote protocols (functionality is shared across WREM...
Definition ir_Argo.h:314
void setMessageType(const argoIrMessageType_t msgType)
Set the message type of the next command (setting this resets state)
Definition ir_Argo.cpp:1013
bool getMax(void) const
Is the Max (i.e. Turbo) setting on?
Definition ir_Argo.cpp:638
uint8_t getTemp(void) const
Get the current temperature setting.
Definition ir_Argo.cpp:655
bool getiFeel(void) const
Get the status of iFeel mode.
Definition ir_Argo.cpp:1008
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:296
uint8_t getSensorTemp(void) const
Get the currently stored value for the room temperature setting.
Definition ir_Argo.cpp:1042
void setTemp(const uint8_t degrees)
Set the temperature.
Definition ir_Argo.cpp:644
static stdAc::ac_command_t toCommonCommand(const argoIrMessageType_t command)
Convert a native message type into its stdAc equivalent.
Definition ir_Argo.cpp:1200
void setPower(const bool on)
Set the internal state to have the desired power.
Definition ir_Argo.cpp:597
static stdAc::fanspeed_t toCommonFanSpeed(const argoFan_t speed)
Convert a native fan speed into its stdAc equivalent.
Definition ir_Argo.cpp:1235
void checksum(void)
Update the checksum for the internal state.
Definition ir_Argo.cpp:370
void setiFeel(const bool on)
Turn on/off the iFeel mode.
Definition ir_Argo.cpp:1003
static stdAc::opmode_t toCommonMode(const argoMode_t mode)
Convert a native mode into its stdAc equivalent.
Definition ir_Argo.cpp:1220
argoMode_t getModeEx(void) const
-Ex for backw. compat w/ IRArgoAC
Definition ir_Argo.cpp:820
void setModeEx(const argoMode_t mode)
Definition ir_Argo.h:357
static uint8_t getChecksum(const uint8_t state[], const uint16_t length)
Retrieve the checksum value from transmitted state.
Definition ir_Argo.cpp:441
void off(void)
Set the internal state to have the power off.
Definition ir_Argo.cpp:575
uint16_t getRawByteLength() const
Get actual raw state byte length for the current state.
Definition ir_Argo.cpp:262
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:1053
void setRaw(const uint8_t state[], const uint16_t length)
Set the raw state of the object.
Definition ir_Argo.cpp:563
uint16_t _length
Definition ir_Argo.h:405
IRsend _irsend
instance of the IR send class
Definition ir_Argo.h:411
static bool validChecksum(const uint8_t state[], const uint16_t length)
Verify the checksum is valid for a given state.
Definition ir_Argo.cpp:480
bool getPower(void) const
Get the power setting from the internal state.
Definition ir_Argo.cpp:612
static argoMode_t convertMode(const stdAc::opmode_t mode)
Convert a stdAc::opmode_t enum into its native mode.
Definition ir_Argo.cpp:1072
argoIrMessageType_t _messageType
Definition ir_Argo.h:406
static uint16_t getStateLengthForIrMsgType(argoIrMessageType_t type)
Get byte length of raw WREM-3 message based on IR cmd type.
Definition ir_Argo.cpp:163
void setMode(const argoMode_t mode)
Set the desired operation mode.
Definition ir_Argo.cpp:897
void setFanEx(const argoFan_t fan)
Definition ir_Argo.h:349
ARGO_PROTOCOL_T _
The raw protocol data.
Definition ir_Argo.h:404
void send(const uint16_t repeat=kArgoDefaultRepeat)
Send the current internal state as an IR message.
Definition ir_Argo.cpp:490
static argoFan_t convertFan(const stdAc::fanspeed_t speed)
Convert a stdAc::fanspeed_t enum into it's native speed.
Definition ir_Argo.cpp:1092
bool getNight(void) const
Get the status of Night mode. i.e. Sleep.
Definition ir_Argo.cpp:948
void setFan(const argoFan_t fan)
Set the desired fan mode (WREM3).
Definition ir_Argo.cpp:740
argoFan_t getFanEx(void) const
-Ex for backw. compat w/ IRArgoAC
Definition ir_Argo.cpp:667
void setFlapEx(const argoFlap_t flap)
Definition ir_Argo.h:353
void setNight(const bool on)
Turn on/off the Night mode. i.e. Sleep.
Definition ir_Argo.cpp:943
void _checksum(ARGO_PROTOCOL_T *state)
void setSensorTemp(const uint8_t degrees)
Set the value for the current room temperature.
Definition ir_Argo.cpp:1028
void on(void)
Set the internal state to have the power on.
Definition ir_Argo.cpp:571
static argoFlap_t convertSwingV(const stdAc::swingv_t position)
Convert a stdAc::swingv_t enum into it's native setting.
Definition ir_Argo.cpp:1115
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:332
argoIrMessageType_t getMessageType(void) const
Get the message type.
Definition ir_Argo.cpp:1020
argoFlap_t getFlapEx(void) const
-Ex for backw. compat w/ IRArgoAC
Definition ir_Argo.cpp:776
void setFlap(const argoFlap_t flap)
Set the desired flap mode.
Definition ir_Argo.cpp:783
static stdAc::swingv_t toCommonSwingV(const uint8_t position)
Convert a native flap mode into its stdAc equivalent (WREM3).
Definition ir_Argo.cpp:1173
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:127
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:553
void stateReset(argoIrMessageType_t messageType=argoIrMessageType_t::AC_CONTROL)
Reset the internals of the object to a known good state.
Definition ir_Argo.cpp:418
void setMax(const bool on)
Control the current Max setting. (i.e. Turbo)
Definition ir_Argo.cpp:631
Supports Argo A/C SAC-WREM3 IR remote protocol.
Definition ir_Argo.h:449
stdAc::state_t toCommon(void) const
Convert the current internal state into its stdAc::state_t equivalent.
Definition ir_Argo.cpp:1279
void setChannel(const uint8_t channel)
Set the IR channel on which to communicate.
Definition ir_Argo.cpp:976
uint16_t getScheduleTimerStopMinutes(void) const
Get schedule timer OFF time.
Definition ir_Argo.cpp:1516
argo_ac_remote_model_t getModel(void) const
Get device model.
Definition ir_Argo.cpp:1556
bool getEco(void) const
Get the status of Economy function.
Definition ir_Argo.cpp:956
String toString(void) const
Convert the current internal state into a human readable string (WREM3).
Definition ir_Argo.cpp:1575
uint16_t getDelayTimerMinutes(void) const
Get current delay timer value.
Definition ir_Argo.cpp:1468
uint16_t getCurrentTimeMinutes(void) const
Retrieve current time.
Definition ir_Argo.cpp:1406
argoWeekday getCurrentDayOfWeek(void) const
Get current day of week.
Definition ir_Argo.cpp:1421
void setTimerType(const argoTimerType_t timerType)
Set timer type.
Definition ir_Argo.cpp:1437
void setDelayTimerMinutes(const uint16_t delayMinutes)
Set delay timer delay in minutes (10-minute increments only) Max is 1190 (19h50m)
Definition ir_Argo.cpp:1455
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:1673
void setScheduleTimerActiveDays(const std::set< argoWeekday > &days)
Set the days when the schedule timer shall be active.
Definition ir_Argo.cpp:1529
uint8_t getChannel(void) const
Get the currently set transmission channel.
Definition ir_Argo.cpp:982
uint16_t getScheduleTimerStartMinutes(void) const
Get schedule timer ON time.
Definition ir_Argo.cpp:1492
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:534
void setLight(const bool on)
Turn on/off the device Lights (LED)
Definition ir_Argo.cpp:968
argoMode_t getMode(void) const
Definition ir_Argo.cpp:938
void setEco(const bool on)
Turn on/off the Economy mode (lowered power mode)
Definition ir_Argo.cpp:952
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:1779
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:1398
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:1478
argoFan_t getFan(void) const
Definition ir_Argo.cpp:936
void setCurrentDayOfWeek(argoWeekday dayOfWeek)
Set current day of week.
Definition ir_Argo.cpp:1412
uint8_t getTimerActiveDaysBitmap(void) const
Get the days when shedule timer shall be active (as bitmap)
Definition ir_Argo.cpp:1523
bool getLight(void) const
Get status of device lights.
Definition ir_Argo.cpp:972
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:1502
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:988
argoTimerType_t getTimerType(void) const
Get currently set timer type.
Definition ir_Argo.cpp:1447
argoFlap_t getFlap(void) const
Definition ir_Argo.cpp:937
bool getFilter(void) const
Get status of the filter function.
Definition ir_Argo.cpp:964
std::pair< uint8_t, uint8_t > getConfigEntry(void) const
Get the config entry previously set.
Definition ir_Argo.cpp:996
void setFilter(const bool on)
Turn on/off the Filter mode (not supported by Argo Ulisse)
Definition ir_Argo.cpp:960
std::set< argoWeekday > getScheduleTimerActiveDays(void) const
Get the days when shedule timer shall be active (as set)
Definition ir_Argo.cpp:1541
Supports Argo A/C SAC-WREM2 IR remote protocol.
Definition ir_Argo.h:422
uint8_t getMode(void) const
Get the current operation mode.
Definition ir_Argo.cpp:934
void setFlap(const uint8_t flap)
Set the flap position. i.e. Swing. (WREM2)
Definition ir_Argo.cpp:798
void setFan(const uint8_t fan)
Set the speed of the fan.
Definition ir_Argo.cpp:760
void setMode(const uint8_t mode)
Set the desired operation mode.
Definition ir_Argo.cpp:915
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:512
stdAc::state_t toCommon(void) const
Convert the current internal state into its stdAc::state_t equivalent.
Definition ir_Argo.cpp:1250
String toString(void) const
Convert the current internal state into a human readable string (WREM2).
Definition ir_Argo.cpp:1328
uint8_t getFlap(void) const
Get the flap position. i.e. Swing. (WREM2)
Definition ir_Argo.cpp:807
uint8_t getFan(void) const
Get the current fan speed setting.
Definition ir_Argo.cpp:767
Class for sending all basic IR protocols.
Definition IRsend.h:249
int8_t calibrate(uint16_t hz=38000U)
Calculate & set any offsets to account for execution times during sending.
Definition IRsend.cpp:209
const uint8_t kArgoHeatAuto
Definition ir_Argo.h:207
const uint8_t kArgoMaxChannel
Definition ir_Argo.h:173
const uint8_t kArgoMaxTemp
Definition ir_Argo.h:172
const uint8_t kArgoMaxRoomTemp
Definition ir_Argo.h:170
const uint16_t kArgoFrequency
Definition ir_Argo.h:167
const uint8_t kArgoFanAuto
Definition ir_Argo.h:226
const uint8_t kArgoHeat
Definition ir_Argo.h:206
const uint8_t kArgoFlap1
Definition ir_Argo.h:248
const uint8_t kArgoMinTemp
Definition ir_Argo.h:171
argoWeekday
Day type to set (for argoIrMessageType_t::TIMER_COMMAND)
Definition ir_Argo.h:292
const uint8_t kArgoAuto
Definition ir_Argo.h:204
const uint8_t kArgoFlap4
Definition ir_Argo.h:251
const uint8_t kArgoFlap5
Definition ir_Argo.h:252
argoFlap_t
Flap position (swing-V)
Definition ir_Argo.h:234
const uint8_t kArgoTempDelta
Definition ir_Argo.h:169
const uint8_t kArgoFan2
Definition ir_Argo.h:228
const uint8_t kArgoFlapFull
Definition ir_Argo.h:254
argoTimerType_t
Timer type to set (for argoIrMessageType_t::TIMER_COMMAND)
Definition ir_Argo.h:282
const uint8_t kArgoPost
Definition ir_Argo.h:164
argoFan_t
Fan speed.
Definition ir_Argo.h:214
const uint8_t kArgoFan3
Definition ir_Argo.h:229
const uint8_t kArgoFlap2
Definition ir_Argo.h:249
const uint8_t kArgoFlap3
Definition ir_Argo.h:250
const uint8_t kArgoCool
Definition ir_Argo.h:202
const uint8_t kArgoFan1
Definition ir_Argo.h:227
const uint8_t kArgoFlap6
Definition ir_Argo.h:253
argoMode_t
A/C operation mode.
Definition ir_Argo.h:192
const uint8_t kArgoPreamble2
Definition ir_Argo.h:163
const uint8_t kArgoPreamble1
Definition ir_Argo.h:162
const uint8_t kArgoHeatBlink
Definition ir_Argo.h:209
const uint8_t kArgoHeatBit
Definition ir_Argo.h:161
const uint8_t kArgoDry
Definition ir_Argo.h:203
const uint8_t kArgoOff
Definition ir_Argo.h:205
argoIrMessageType_t
IR message type (determines the payload part of IR command)
Definition ir_Argo.h:182
const uint8_t kArgoFlapAuto
Definition ir_Argo.h:247
fanspeed_t
Common A/C settings for Fan Speeds.
Definition IRsend.h:61
ac_command_t
Tyoe of A/C command (if the remote uses different codes for each)
Definition IRsend.h:90
opmode_t
Common A/C settings for A/C operating modes.
Definition IRsend.h:49
swingv_t
Common A/C settings for Vertical Swing.
Definition IRsend.h:74
Definition ir_Argo.h:152
uint8_t Value
Definition ir_Argo.h:155
uint8_t Key
Definition ir_Argo.h:154
uint8_t Checksum
Definition ir_Argo.h:156
Definition ir_Argo.h:124
uint8_t Checksum
Definition ir_Argo.h:150
uint8_t DelayTimeHi
Definition ir_Argo.h:138
uint8_t IsOn
Definition ir_Argo.h:128
uint8_t DelayTimeLo
Definition ir_Argo.h:136
uint8_t TimerActiveDaysLo
Definition ir_Argo.h:146
uint8_t CurrentWeekdayLo
Definition ir_Argo.h:133
uint8_t CurrentTimeHi
Definition ir_Argo.h:132
uint8_t TimerActiveDaysHi
Definition ir_Argo.h:148
uint8_t CurrentWeekdayHi
Definition ir_Argo.h:135
uint8_t TimerEndHi
Definition ir_Argo.h:145
uint8_t CurrentTimeLo
Definition ir_Argo.h:130
uint8_t TimerType
Definition ir_Argo.h:129
uint8_t TimerStartLo
Definition ir_Argo.h:139
uint8_t Post1
Definition ir_Argo.h:149
uint8_t TimerEndLo
Definition ir_Argo.h:143
uint8_t TimerStartHi
Definition ir_Argo.h:141
Structure to hold a common A/C state.
Definition IRsend.h:114
Native representation of A/C IR message for WREM-3 remote.
Definition ir_Argo.h:90
uint8_t Night
Definition ir_Argo.h:107
uint8_t RoomTemp
argoIrMessageType_t
Definition ir_Argo.h:98
uint8_t Power
SwingV argoFlap_t.
Definition ir_Argo.h:105
uint8_t Sum
Unknown, always 0b110000 (TempScale?)
Definition ir_Argo.h:115
struct ArgoProtocolWREM3::Config config
uint8_t Mode
Definition ir_Argo.h:99
uint8_t Eco
Definition ir_Argo.h:108
uint8_t Flap
argoFan_t
Definition ir_Argo.h:104
struct ArgoProtocolWREM3::Timer timer
uint8_t IrChannel
Preamble: 0b1011 kArgoWrem3Preamble.
Definition ir_Argo.h:95
uint8_t CheckHi
Definition ir_Argo.h:122
uint8_t Temp
argoMode_t
Definition ir_Argo.h:101
uint8_t SensorT
Definition ir_Argo.h:121
uint8_t Fan
Definition ir_Argo.h:102
uint8_t Pre1
Definition ir_Argo.h:94
uint8_t IrCommandType
0..3 range
Definition ir_Argo.h:96
uint8_t Light
Definition ir_Argo.h:112
uint8_t Post1
Definition ir_Argo.h:113
uint8_t raw[kArgoStateLength]
The state in native IR code form.
Definition ir_Argo.h:91
uint8_t Filter
Definition ir_Argo.h:111
uint8_t Max
a.k.a. Turbo
Definition ir_Argo.h:109
uint8_t iFeel
Definition ir_Argo.h:106
Native representation of a Argo A/C message for WREM-2 remote.
Definition ir_Argo.h:29
uint8_t Fixed
Definition ir_Argo.h:76
uint64_t RoomTemp
Definition ir_Argo.h:41
uint32_t Night
Definition ir_Argo.h:58
uint32_t Power
Definition ir_Argo.h:61
uint64_t Pre1
Definition ir_Argo.h:33
uint8_t SensorT
Definition ir_Argo.h:75
uint8_t raw[kArgoStateLength]
The state in native IR code form.
Definition ir_Argo.h:30
uint64_t Fan
Definition ir_Argo.h:40
uint64_t Temp
Definition ir_Argo.h:39
uint32_t iFeel
Definition ir_Argo.h:63
uint32_t Sum
Definition ir_Argo.h:66
uint64_t Flap
Definition ir_Argo.h:42
uint64_t Pre2
Definition ir_Argo.h:35
uint32_t Max
Definition ir_Argo.h:59
uint32_t Post
Definition ir_Argo.h:65
uint8_t CheckLo
Definition ir_Argo.h:77
uint8_t CheckHi
Definition ir_Argo.h:74
uint64_t Mode
Definition ir_Argo.h:38