IRremoteESP8266
IRac.h
Go to the documentation of this file.
1 #ifndef IRAC_H_
2 #define IRAC_H_
3 
4 // Copyright 2019 David Conran
5 
6 #ifndef UNIT_TEST
7 #include <Arduino.h>
8 #endif
9 #include "IRremoteESP8266.h"
10 #include "ir_Amcor.h"
11 #include "ir_Argo.h"
12 #include "ir_Carrier.h"
13 #include "ir_Coolix.h"
14 #include "ir_Corona.h"
15 #include "ir_Daikin.h"
16 #include "ir_Delonghi.h"
17 #include "ir_Fujitsu.h"
18 #include "ir_Electra.h"
19 #include "ir_Goodweather.h"
20 #include "ir_Gree.h"
21 #include "ir_Haier.h"
22 #include "ir_Hitachi.h"
23 #include "ir_Kelvinator.h"
24 #include "ir_LG.h"
25 #include "ir_Midea.h"
26 #include "ir_Mitsubishi.h"
27 #include "ir_MitsubishiHeavy.h"
28 #include "ir_Neoclima.h"
29 #include "ir_Panasonic.h"
30 #include "ir_Samsung.h"
31 #include "ir_Sharp.h"
32 #include "ir_Tcl.h"
33 #include "ir_Teco.h"
34 #include "ir_Toshiba.h"
35 #include "ir_Trotec.h"
36 #include "ir_Vestel.h"
37 #include "ir_Whirlpool.h"
38 
39 // Constants
40 const int8_t kGpioUnused = -1;
41 
42 // Class
43 class IRac {
44  public:
45  explicit IRac(const uint16_t pin, const bool inverted = false,
46  const bool use_modulation = true);
47  static bool isProtocolSupported(const decode_type_t protocol);
48  static void initState(stdAc::state_t *state,
49  const decode_type_t vendor, const int16_t model,
50  const bool power, const stdAc::opmode_t mode,
51  const float degrees, const bool celsius,
52  const stdAc::fanspeed_t fan,
53  const stdAc::swingv_t swingv,
54  const stdAc::swingh_t swingh,
55  const bool quiet, const bool turbo, const bool econo,
56  const bool light, const bool filter, const bool clean,
57  const bool beep, const int16_t sleep,
58  const int16_t clock);
59  static void initState(stdAc::state_t *state);
60  void markAsSent(void);
61  bool sendAc(void);
62  bool sendAc(const stdAc::state_t desired, const stdAc::state_t *prev = NULL);
63  bool sendAc(const decode_type_t vendor, const int16_t model,
64  const bool power, const stdAc::opmode_t mode, const float degrees,
65  const bool celsius, const stdAc::fanspeed_t fan,
66  const stdAc::swingv_t swingv, const stdAc::swingh_t swingh,
67  const bool quiet, const bool turbo, const bool econo,
68  const bool light, const bool filter, const bool clean,
69  const bool beep, const int16_t sleep = -1,
70  const int16_t clock = -1);
71  static bool cmpStates(const stdAc::state_t a, const stdAc::state_t b);
72  static bool strToBool(const char *str, const bool def = false);
73  static int16_t strToModel(const char *str, const int16_t def = -1);
75  const char *str, const stdAc::opmode_t def = stdAc::opmode_t::kAuto);
77  const char *str,
80  const char *str, const stdAc::swingv_t def = stdAc::swingv_t::kOff);
82  const char *str, const stdAc::swingh_t def = stdAc::swingh_t::kOff);
83  static String boolToString(const bool value);
84  static String opmodeToString(const stdAc::opmode_t mode);
85  static String fanspeedToString(const stdAc::fanspeed_t speed);
86  static String swingvToString(const stdAc::swingv_t swingv);
87  static String swinghToString(const stdAc::swingh_t swingh);
90  bool hasStateChanged(void);
92 #ifndef UNIT_TEST
93 
94  private:
95 #endif
96  uint16_t _pin;
97  bool _inverted;
99  stdAc::state_t _prev; // The state we expect the device to currently be in.
100 #if SEND_AMCOR
101  void amcor(IRAmcorAc *ac,
102  const bool on, const stdAc::opmode_t mode, const float degrees,
103  const stdAc::fanspeed_t fan);
104 #endif // SEND_AMCOR
105 #if SEND_ARGO
106  void argo(IRArgoAC *ac,
107  const bool on, const stdAc::opmode_t mode, const float degrees,
108  const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv,
109  const bool turbo, const int16_t sleep = -1);
110 #endif // SEND_ARGO
111 #if SEND_CARRIER_AC64
112 void carrier64(IRCarrierAc64 *ac,
113  const bool on, const stdAc::opmode_t mode,
114  const float degrees, const stdAc::fanspeed_t fan,
115  const stdAc::swingv_t swingv, const int16_t sleep = -1);
116 #endif // SEND_CARRIER_AC64
117 #if SEND_COOLIX
118  void coolix(IRCoolixAC *ac,
119  const bool on, const stdAc::opmode_t mode, const float degrees,
120  const stdAc::fanspeed_t fan,
121  const stdAc::swingv_t swingv, const stdAc::swingh_t swingh,
122  const bool turbo, const bool light, const bool clean,
123  const int16_t sleep = -1);
124 #endif // SEND_COOLIX
125 #if SEND_CORONA_AC
126  void corona(IRCoronaAc *ac,
127  const bool on, const stdAc::opmode_t mode,
128  const float degrees, const stdAc::fanspeed_t fan,
129  const stdAc::swingv_t swingv, const bool econo);
130 #endif // SEND_CORONA_AC
131 #if SEND_DAIKIN
132  void daikin(IRDaikinESP *ac,
133  const bool on, const stdAc::opmode_t mode, const float degrees,
134  const stdAc::fanspeed_t fan,
135  const stdAc::swingv_t swingv, const stdAc::swingh_t swingh,
136  const bool quiet, const bool turbo, const bool econo,
137  const bool clean);
138 #endif // SEND_DAIKIN
139 #if SEND_DAIKIN128
140  void daikin128(IRDaikin128 *ac,
141  const bool on, const stdAc::opmode_t mode,
142  const float degrees, const stdAc::fanspeed_t fan,
143  const stdAc::swingv_t swingv,
144  const bool quiet, const bool turbo, const bool light,
145  const bool econo, const int16_t sleep = -1,
146  const int16_t clock = -1);
147 #endif // SEND_DAIKIN128
148 #if SEND_DAIKIN152
149  void daikin152(IRDaikin152 *ac,
150  const bool on, const stdAc::opmode_t mode,
151  const float degrees, const stdAc::fanspeed_t fan,
152  const stdAc::swingv_t swingv,
153  const bool quiet, const bool turbo, const bool econo);
154 #endif // SEND_DAIKIN152
155 #if SEND_DAIKIN160
156  void daikin160(IRDaikin160 *ac,
157  const bool on, const stdAc::opmode_t mode,
158  const float degrees, const stdAc::fanspeed_t fan,
159  const stdAc::swingv_t swingv);
160 #endif // SEND_DAIKIN160
161 #if SEND_DAIKIN176
162  void daikin176(IRDaikin176 *ac,
163  const bool on, const stdAc::opmode_t mode,
164  const float degrees, const stdAc::fanspeed_t fan,
165  const stdAc::swingh_t swingh);
166 #endif // SEND_DAIKIN176
167 #if SEND_DAIKIN2
168  void daikin2(IRDaikin2 *ac,
169  const bool on, const stdAc::opmode_t mode,
170  const float degrees, const stdAc::fanspeed_t fan,
171  const stdAc::swingv_t swingv, const stdAc::swingh_t swingh,
172  const bool quiet, const bool turbo, const bool light,
173  const bool econo, const bool filter, const bool clean,
174  const bool beep, const int16_t sleep = -1,
175  const int16_t clock = -1);
176 #endif // SEND_DAIKIN2
177 #if SEND_DAIKIN216
178 void daikin216(IRDaikin216 *ac,
179  const bool on, const stdAc::opmode_t mode,
180  const float degrees, const stdAc::fanspeed_t fan,
181  const stdAc::swingv_t swingv, const stdAc::swingh_t swingh,
182  const bool quiet, const bool turbo);
183 #endif // SEND_DAIKIN216
184 #if SEND_DAIKIN64
185  void daikin64(IRDaikin64 *ac,
186  const bool on, const stdAc::opmode_t mode,
187  const float degrees, const stdAc::fanspeed_t fan,
188  const stdAc::swingv_t swingv,
189  const bool quiet, const bool turbo,
190  const int16_t sleep = -1, const int16_t clock = -1);
191 #endif // SEND_DAIKIN64
192 #if SEND_DELONGHI_AC
193  void delonghiac(IRDelonghiAc *ac,
194  const bool on, const stdAc::opmode_t mode, const bool celsius,
195  const float degrees, const stdAc::fanspeed_t fan,
196  const bool turbo, const int16_t sleep = -1);
197 #endif // SEND_DELONGHI_AC
198 #if SEND_ELECTRA_AC
199 void electra(IRElectraAc *ac,
200  const bool on, const stdAc::opmode_t mode,
201  const float degrees, const stdAc::fanspeed_t fan,
202  const stdAc::swingv_t swingv,
203  const stdAc::swingh_t swingh, const bool turbo,
204  const bool lighttoggle, const bool clean);
205 #endif // SEND_ELECTRA_AC
206 #if SEND_FUJITSU_AC
207  void fujitsu(IRFujitsuAC *ac, const fujitsu_ac_remote_model_t model,
208  const bool on, const stdAc::opmode_t mode, const float degrees,
209  const stdAc::fanspeed_t fan,
210  const stdAc::swingv_t swingv, const stdAc::swingh_t swingh,
211  const bool quiet, const bool turbo, const bool econo,
212  const bool filter, const bool clean);
213 #endif // SEND_FUJITSU_AC
214 #if SEND_GOODWEATHER
215  void goodweather(IRGoodweatherAc *ac,
216  const bool on, const stdAc::opmode_t mode,
217  const float degrees,
218  const stdAc::fanspeed_t fan,
219  const stdAc::swingv_t swingv,
220  const bool turbo, const bool light,
221  const int16_t sleep = -1);
222 #endif // SEND_GOODWEATHER
223 #if SEND_GREE
224  void gree(IRGreeAC *ac, const gree_ac_remote_model_t model,
225  const bool on, const stdAc::opmode_t mode, const bool celsius,
226  const float degrees, const stdAc::fanspeed_t fan,
227  const stdAc::swingv_t swingv, const bool turbo, const bool light,
228  const bool clean, const int16_t sleep = -1);
229 #endif // SEND_GREE
230 #if SEND_HAIER_AC
231  void haier(IRHaierAC *ac,
232  const bool on, const stdAc::opmode_t mode, const float degrees,
233  const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv,
234  const bool filter, const int16_t sleep = -1,
235  const int16_t clock = -1);
236 #endif // SEND_HAIER_AC
237 #if SEND_HAIER_AC_YRW02
238  void haierYrwo2(IRHaierACYRW02 *ac,
239  const bool on, const stdAc::opmode_t mode,
240  const float degrees, const stdAc::fanspeed_t fan,
241  const stdAc::swingv_t swingv,
242  const bool turbo, const bool filter,
243  const int16_t sleep = -1);
244 #endif // SEND_HAIER_AC_YRW02
245 #if SEND_HITACHI_AC
246  void hitachi(IRHitachiAc *ac,
247  const bool on, const stdAc::opmode_t mode,
248  const float degrees, const stdAc::fanspeed_t fan,
249  const stdAc::swingv_t swingv, const stdAc::swingh_t swingh);
250 #endif // SEND_HITACHI_AC
251 #if SEND_HITACHI_AC1
252  void hitachi1(IRHitachiAc1 *ac, const hitachi_ac1_remote_model_t model,
253  const bool on, const bool power_toggle,
254  const stdAc::opmode_t mode,
255  const float degrees, const stdAc::fanspeed_t fan,
256  const stdAc::swingv_t swingv, const stdAc::swingh_t swingh,
257  const bool swing_toggle, const int16_t sleep = -1);
258 #endif // SEND_HITACHI_AC1
259 #if SEND_HITACHI_AC344
260  void hitachi344(IRHitachiAc344 *ac,
261  const bool on, const stdAc::opmode_t mode,
262  const float degrees, const stdAc::fanspeed_t fan,
263  const stdAc::swingv_t swingv,
264  const stdAc::swingh_t swingh);
265 #endif // SEND_HITACHI_AC344
266 #if SEND_HITACHI_AC424
267  void hitachi424(IRHitachiAc424 *ac,
268  const bool on, const stdAc::opmode_t mode,
269  const float degrees, const stdAc::fanspeed_t fan,
270  const stdAc::swingv_t swingv);
271 #endif // SEND_HITACHI_AC424
272 #if SEND_KELVINATOR
273  void kelvinator(IRKelvinatorAC *ac,
274  const bool on, const stdAc::opmode_t mode,
275  const float degrees, const stdAc::fanspeed_t fan,
276  const stdAc::swingv_t swingv, const stdAc::swingh_t swingh,
277  const bool quiet, const bool turbo, const bool light,
278  const bool filter, const bool clean);
279 #endif // SEND_KELVINATOR
280 #if SEND_LG
281  void lg(IRLgAc *ac, const lg_ac_remote_model_t model,
282  const bool on, const stdAc::opmode_t mode,
283  const float degrees, const stdAc::fanspeed_t fan);
284 #endif // SEND_LG
285 #if SEND_MIDEA
286  void midea(IRMideaAC *ac,
287  const bool on, const stdAc::opmode_t mode, const bool celsius,
288  const float degrees, const stdAc::fanspeed_t fan,
289  const stdAc::swingv_t swingv, const int16_t sleep = -1);
290 #endif // SEND_MIDEA
291 #if SEND_MITSUBISHI_AC
292  void mitsubishi(IRMitsubishiAC *ac,
293  const bool on, const stdAc::opmode_t mode,
294  const float degrees,
295  const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv,
296  const stdAc::swingh_t swingh,
297  const bool quiet, const int16_t clock = -1);
298 #endif // SEND_MITSUBISHI_AC
299 #if SEND_MITSUBISHI112
301  const bool on, const stdAc::opmode_t mode,
302  const float degrees, const stdAc::fanspeed_t fan,
303  const stdAc::swingv_t swingv,
304  const stdAc::swingh_t swingh,
305  const bool quiet);
306 #endif // SEND_MITSUBISHI112
307 #if SEND_MITSUBISHI136
309  const bool on, const stdAc::opmode_t mode,
310  const float degrees, const stdAc::fanspeed_t fan,
311  const stdAc::swingv_t swingv, const bool quiet);
312 #endif // SEND_MITSUBISHI136
313 #if SEND_MITSUBISHIHEAVY
315  const bool on, const stdAc::opmode_t mode,
316  const float degrees, const stdAc::fanspeed_t fan,
317  const stdAc::swingv_t swingv,
318  const stdAc::swingh_t swingh,
319  const bool turbo, const bool econo, const bool clean);
321  const bool on, const stdAc::opmode_t mode,
322  const float degrees, const stdAc::fanspeed_t fan,
323  const stdAc::swingv_t swingv,
324  const stdAc::swingh_t swingh,
325  const bool quiet, const bool turbo, const bool econo,
326  const bool filter, const bool clean,
327  const int16_t sleep = -1);
328 #endif // SEND_MITSUBISHIHEAVY
329 #if SEND_NEOCLIMA
330  void neoclima(IRNeoclimaAc *ac, const bool on, const stdAc::opmode_t mode,
331  const float degrees, const stdAc::fanspeed_t fan,
332  const stdAc::swingv_t swingv, const stdAc::swingh_t swingh,
333  const bool turbo, const bool light, const bool filter,
334  const int16_t sleep = -1);
335 #endif // SEND_NEOCLIMA
336 #if SEND_PANASONIC_AC
338  const bool on, const stdAc::opmode_t mode, const float degrees,
339  const stdAc::fanspeed_t fan,
340  const stdAc::swingv_t swingv, const stdAc::swingh_t swingh,
341  const bool quiet, const bool turbo, const bool filter,
342  const int16_t clock = -1);
343 #endif // SEND_PANASONIC_AC
344 #if SEND_SAMSUNG_AC
345  void samsung(IRSamsungAc *ac,
346  const bool on, const stdAc::opmode_t mode, const float degrees,
347  const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv,
348  const bool quiet, const bool turbo, const bool light,
349  const bool filter, const bool clean,
350  const bool beep, const bool prevpower = true,
351  const bool forcepower = true);
352 #endif // SEND_SAMSUNG_AC
353 #if SEND_SHARP_AC
354  void sharp(IRSharpAc *ac,
355  const bool on, const bool prev_power, const stdAc::opmode_t mode,
356  const float degrees, const stdAc::fanspeed_t fan,
357  const stdAc::swingv_t swingv, const bool turbo, const bool filter,
358  const bool clean);
359 #endif // SEND_SHARP_AC
360 #if SEND_TCL112AC
361  void tcl112(IRTcl112Ac *ac,
362  const bool on, const stdAc::opmode_t mode, const float degrees,
363  const stdAc::fanspeed_t fan,
364  const stdAc::swingv_t swingv, const stdAc::swingh_t swingh,
365  const bool turbo, const bool light, const bool econo,
366  const bool filter);
367 #endif // SEND_TCL112AC
368 #if SEND_TECO
369  void teco(IRTecoAc *ac,
370  const bool on, const stdAc::opmode_t mode, const float degrees,
371  const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv,
372  const bool light, const int16_t sleep = -1);
373 #endif // SEND_TECO
374 #if SEND_TOSHIBA_AC
375  void toshiba(IRToshibaAC *ac,
376  const bool on, const stdAc::opmode_t mode, const float degrees,
377  const stdAc::fanspeed_t fan);
378 #endif // SEND_TOSHIBA_AC
379 #if SEND_TROTEC
380  void trotec(IRTrotecESP *ac,
381  const bool on, const stdAc::opmode_t mode, const float degrees,
382  const stdAc::fanspeed_t fan, const int16_t sleep = -1);
383 #endif // SEND_TROTEC
384 #if SEND_VESTEL_AC
385  void vestel(IRVestelAc *ac,
386  const bool on, const stdAc::opmode_t mode, const float degrees,
387  const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv,
388  const bool turbo, const bool filter,
389  const int16_t sleep = -1, const int16_t clock = -1,
390  const bool sendNormal = true);
391 #endif // SEND_VESTEL_AC
392 #if SEND_WHIRLPOOL_AC
394  const bool on, const stdAc::opmode_t mode, const float degrees,
395  const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv,
396  const bool turbo, const bool light,
397  const int16_t sleep = -1, const int16_t clock = -1);
398 #endif // SEND_WHIRLPOOL_AC
399 static stdAc::state_t cleanState(const stdAc::state_t state);
400 static stdAc::state_t handleToggles(const stdAc::state_t desired,
401  const stdAc::state_t *prev = NULL);
402 }; // IRac class
403 
404 namespace IRAcUtils {
405  String resultAcToString(const decode_results * const results);
406  bool decodeToState(const decode_results *decode, stdAc::state_t *result,
407  const stdAc::state_t *prev = NULL);
408 } // namespace IRAcUtils
409 #endif // IRAC_H_
IRPanasonicAc
Class for handling detailed Panasonic A/C messages.
Definition: ir_Panasonic.h:98
ir_Kelvinator.h
Support for Kelvinator A/C protocols.
IRSamsungAc
Class for handling detailed Samsung A/C messages.
Definition: ir_Samsung.h:95
IRac::hitachi
void hitachi(IRHitachiAc *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const stdAc::swingh_t swingh)
Send a Hitachi A/C message with the supplied settings.
Definition: IRac.cpp:1020
IRToshibaAC
Class for handling detailed Toshiba A/C messages.
Definition: ir_Toshiba.h:62
decode_type_t
decode_type_t
Enumerator for defining and numbering of supported IR protocol.
Definition: IRremoteESP8266.h:714
IRac::getStatePrev
stdAc::state_t getStatePrev(void)
Get the previous internal A/C climate state that should have already been sent to the device....
Definition: IRac.cpp:128
IRac::getState
stdAc::state_t getState(void)
Get the current internal A/C climate state.
Definition: IRac.cpp:123
IRMitsubishiHeavy152Ac
Class for handling detailed Mitsubishi Heavy 152-bit A/C messages.
Definition: ir_MitsubishiHeavy.h:133
IRac::strToSwingH
static stdAc::swingh_t strToSwingH(const char *str, const stdAc::swingh_t def=stdAc::swingh_t::kOff)
Convert the supplied str into the appropriate enum.
Definition: IRac.cpp:2499
IRac::hitachi344
void hitachi344(IRHitachiAc344 *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const stdAc::swingh_t swingh)
Send a Hitachi 344-bit A/C message with the supplied settings.
Definition: IRac.cpp:1096
stdAc::opmode_t::kAuto
@ kAuto
ir_Electra.h
Support for Electra A/C protocols.
IRac::markAsSent
void markAsSent(void)
Update the previous state to the current one.
Definition: IRac.cpp:2362
stdAc::swingv_t
swingv_t
Common A/C settings for Vertical Swing.
Definition: IRsend.h:70
IRac::daikin2
void daikin2(IRDaikin2 *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const stdAc::swingh_t swingh, const bool quiet, const bool turbo, const bool light, const bool econo, const bool filter, const bool clean, const bool beep, const int16_t sleep=-1, const int16_t clock=-1)
Send a Daikin2 A/C message with the supplied settings.
Definition: IRac.cpp:640
ir_Trotec.h
Support for Trotec protocols.
IRDaikinESP
Class for handling detailed Daikin 280-bit A/C messages.
Definition: ir_Daikin.h:520
IRac::lg
void lg(IRLgAc *ac, const lg_ac_remote_model_t model, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan)
Send a LG A/C message with the supplied settings.
Definition: IRac.cpp:1202
IRDelonghiAc
Class for handling detailed Delonghi A/C messages.
Definition: ir_Delonghi.h:102
IRCoronaAc
Class for handling detailed Corona A/C messages.
Definition: ir_Corona.h:93
IRac::kelvinator
void kelvinator(IRKelvinatorAC *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const stdAc::swingh_t swingh, const bool quiet, const bool turbo, const bool light, const bool filter, const bool clean)
Send a Kelvinator A/C message with the supplied settings.
Definition: IRac.cpp:1168
IRDaikin2
Class for handling detailed Daikin 312-bit A/C messages. Code by crankyoldgit, Reverse engineering an...
Definition: ir_Daikin.h:602
ir_Neoclima.h
Support for Neoclima protocols. Analysis by crankyoldgit & AndreyShpilevoy.
IRDaikin128
Class for handling detailed Daikin 128-bit A/C messages. Code by crankyoldgit. Analysis by Daniel Ven...
Definition: ir_Daikin.h:864
stdAc::fanspeed_t
fanspeed_t
Common A/C settings for Fan Speeds.
Definition: IRsend.h:58
ir_Sharp.h
Support for Sharp protocols.
IRac::fanspeedToString
static String fanspeedToString(const stdAc::fanspeed_t speed)
Convert the supplied fan speed enum into the appropriate String.
Definition: IRac.cpp:2641
whirlpool_ac_remote_model_t
whirlpool_ac_remote_model_t
Whirlpool A/C model numbers.
Definition: IRsend.h:152
ir_Carrier.h
Carrier A/C.
IRac::whirlpool
void whirlpool(IRWhirlpoolAc *ac, const whirlpool_ac_remote_model_t model, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const bool turbo, const bool light, const int16_t sleep=-1, const int16_t clock=-1)
Send a Whirlpool A/C message with the supplied settings.
Definition: IRac.cpp:1814
decode_results
Results returned from the decoder.
Definition: IRrecv.h:92
IRac::daikin64
void daikin64(IRDaikin64 *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const bool quiet, const bool turbo, const int16_t sleep=-1, const int16_t clock=-1)
Send a Daikin 64-bit A/C message with the supplied settings.
Definition: IRac.cpp:709
IRac::tcl112
void tcl112(IRTcl112Ac *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const stdAc::swingh_t swingh, const bool turbo, const bool light, const bool econo, const bool filter)
Send a TCL 112-bit A/C message with the supplied settings.
Definition: IRac.cpp:1640
IRac::sendAc
bool sendAc(void)
Send an A/C message based soley on our internal state.
Definition: IRac.cpp:2368
IRac::cmpStates
static bool cmpStates(const stdAc::state_t a, const stdAc::state_t b)
Compare two AirCon states.
Definition: IRac.cpp:2379
ir_Midea.h
Support for Midea protocols. Midea added by crankyoldgit & bwze.
ir_Daikin.h
Support for Daikin A/C protocols.
gree_ac_remote_model_t
gree_ac_remote_model_t
Gree A/C model numbers.
Definition: IRsend.h:129
IRDaikin64
Class for handling detailed Daikin 64-bit A/C messages.
Definition: ir_Daikin.h:998
ir_Coolix.h
IRac::vestel
void vestel(IRVestelAc *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const bool turbo, const bool filter, const int16_t sleep=-1, const int16_t clock=-1, const bool sendNormal=true)
Send a Vestel A/C message with the supplied settings.
Definition: IRac.cpp:1773
IRHitachiAc424
Class for handling detailed Hitachi 53-byte/424-bit A/C messages.
Definition: ir_Hitachi.h:313
IRac::daikin
void daikin(IRDaikinESP *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const stdAc::swingh_t swingh, const bool quiet, const bool turbo, const bool econo, const bool clean)
Send a Daikin A/C message with the supplied settings.
Definition: IRac.cpp:476
IRac::IRac
IRac(const uint16_t pin, const bool inverted=false, const bool use_modulation=true)
Class constructor.
Definition: IRac.cpp:49
IRDaikin216
Class for handling detailed Daikin 216-bit A/C messages.
Definition: ir_Daikin.h:698
hitachi_ac1_remote_model_t
hitachi_ac1_remote_model_t
HITACHI_AC1 A/C model numbers.
Definition: IRsend.h:135
IRac::samsung
void samsung(IRSamsungAc *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const bool quiet, const bool turbo, const bool light, const bool filter, const bool clean, const bool beep, const bool prevpower=true, const bool forcepower=true)
Send a Samsung A/C message with the supplied settings.
Definition: IRac.cpp:1544
IRac::daikin128
void daikin128(IRDaikin128 *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const bool quiet, const bool turbo, const bool light, const bool econo, const int16_t sleep=-1, const int16_t clock=-1)
Send a Daikin 128-bit A/C message with the supplied settings.
Definition: IRac.cpp:516
IRHitachiAc
Class for handling detailed Hitachi 224-bit A/C messages.
Definition: ir_Hitachi.h:188
kGpioUnused
const int8_t kGpioUnused
Definition: IRac.h:40
IRAcUtils
Definition: IRac.cpp:2710
IRac::haier
void haier(IRHaierAC *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const bool filter, const int16_t sleep=-1, const int16_t clock=-1)
Send a Haier A/C message with the supplied settings.
Definition: IRac.cpp:951
IRWhirlpoolAc
Class for handling detailed Whirlpool A/C messages.
Definition: ir_Whirlpool.h:91
IRHitachiAc344
Class for handling detailed Hitachi 344-bit A/C messages.
Definition: ir_Hitachi.h:401
IRac::boolToString
static String boolToString(const bool value)
Convert the supplied boolean into the appropriate String.
Definition: IRac.cpp:2612
IRac::next
stdAc::state_t next
The state we want the device to be in after we send.
Definition: IRac.h:91
String
std::string String
Definition: IRremoteESP8266.h:1093
IRMitsubishiAC
Class for handling detailed Mitsubishi 144-bit A/C messages. Inspired and derived from the work done ...
Definition: ir_Mitsubishi.h:168
IRac::trotec
void trotec(IRTrotecESP *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const int16_t sleep=-1)
Send a Trotec A/C message with the supplied settings.
Definition: IRac.cpp:1736
IRac::strToModel
static int16_t strToModel(const char *str, const int16_t def=-1)
Convert the supplied str into the appropriate enum.
Definition: IRac.cpp:2539
IRAmcorAc
Class for handling detailed Amcor A/C messages.
Definition: ir_Amcor.h:81
IRMitsubishi112
Definition: ir_Mitsubishi.h:286
IRTcl112Ac
Class for handling detailed TCL A/C messages.
Definition: ir_Tcl.h:63
IRac::daikin176
void daikin176(IRDaikin176 *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingh_t swingh)
Send a Daikin 176-bit A/C message with the supplied settings.
Definition: IRac.cpp:608
IRElectraAc
Class for handling detailed Electra A/C messages.
Definition: ir_Electra.h:80
ir_Tcl.h
Support for TCL protocols.
IRac::hasStateChanged
bool hasStateChanged(void)
Check if the internal state has changed from what was previously sent.
Definition: IRac.cpp:2391
IRac::haierYrwo2
void haierYrwo2(IRHaierACYRW02 *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const bool turbo, const bool filter, const int16_t sleep=-1)
Send a Haier YRWO2 A/C message with the supplied settings.
Definition: IRac.cpp:988
IRac::daikin216
void daikin216(IRDaikin216 *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const stdAc::swingh_t swingh, const bool quiet, const bool turbo)
Send a Daikin 216-bit A/C message with the supplied settings.
Definition: IRac.cpp:679
ir_Hitachi.h
Support for Hitachi A/C protocols.
ir_Panasonic.h
Support for Panasonic protocols.
IRac::handleToggles
static stdAc::state_t handleToggles(const stdAc::state_t desired, const stdAc::state_t *prev=NULL)
Create a new state base on desired & previous states but handle any state changes for options that ne...
Definition: IRac.cpp:1858
IRMitsubishi136
Class for handling detailed Mitsubishi 136-bit A/C messages.
Definition: ir_Mitsubishi.h:232
panasonic_ac_remote_model_t
panasonic_ac_remote_model_t
Panasonic A/C model numbers.
Definition: IRsend.h:141
IRremoteESP8266.h
stdAc::swingh_t
swingh_t
Common A/C settings for Horizontal Swing.
Definition: IRsend.h:83
IRac::mitsubishi112
void mitsubishi112(IRMitsubishi112 *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const stdAc::swingh_t swingh, const bool quiet)
Send a Mitsubishi 112-bit A/C message with the supplied settings.
Definition: IRac.cpp:1306
IRAcUtils::decodeToState
bool decodeToState(const decode_results *decode, stdAc::state_t *result, const stdAc::state_t *prev)
Convert a valid IR A/C remote message that we understand enough into a Common A/C state.
Definition: IRac.cpp:3033
IRHitachiAc1
Class for handling detailed Hitachi 104-bit A/C messages.
Definition: ir_Hitachi.h:245
IRac::hitachi424
void hitachi424(IRHitachiAc424 *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv)
Send a Hitachi 424-bit A/C message with the supplied settings.
Definition: IRac.cpp:1130
ir_Samsung.h
Support for Samsung protocols. Samsung originally added from https://github.com/shirriff/Arduino-IRre...
IRAcUtils::resultAcToString
String resultAcToString(const decode_results *const result)
Display the human readable state of an A/C message if we can.
Definition: IRac.cpp:2716
IRac::daikin152
void daikin152(IRDaikin152 *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const bool quiet, const bool turbo, const bool econo)
Send a Daikin 152-bit A/C message with the supplied settings.
Definition: IRac.cpp:553
fujitsu_ac_remote_model_t
fujitsu_ac_remote_model_t
Fujitsu A/C model numbers.
Definition: IRsend.h:120
ir_Gree.h
Support for Gree A/C protocols.
IRCarrierAc64
Class for handling detailed Carrier 64 bit A/C messages.
Definition: ir_Carrier.h:74
IRMideaAC
Class for handling detailed Midea A/C messages.
Definition: ir_Midea.h:73
IRKelvinatorAC
Class for handling detailed Kelvinator A/C messages.
Definition: ir_Kelvinator.h:137
IRac::_inverted
bool _inverted
Definition: IRac.h:97
IRFujitsuAC
Class for handling detailed Fujitsu A/C messages.
Definition: ir_Fujitsu.h:101
ir_MitsubishiHeavy.h
Support for Mitsubishi Heavy Industry protocols. Code to emulate Mitsubishi Heavy Industries A/C IR r...
IRCoolixAC
Class for handling detailed Coolix A/C messages.
Definition: ir_Coolix.h:105
IRac::panasonic
void panasonic(IRPanasonicAc *ac, const panasonic_ac_remote_model_t model, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const stdAc::swingh_t swingh, const bool quiet, const bool turbo, const bool filter, const int16_t clock=-1)
Send a Panasonic A/C message with the supplied settings.
Definition: IRac.cpp:1500
IRac::swingvToString
static String swingvToString(const stdAc::swingv_t swingv)
Convert the supplied enum into the appropriate String.
Definition: IRac.cpp:2663
ir_Mitsubishi.h
Support for Mitsubishi protocols. Mitsubishi (TV) decoding added from https://github....
IRac::midea
void midea(IRMideaAC *ac, const bool on, const stdAc::opmode_t mode, const bool celsius, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const int16_t sleep=-1)
Send a Midea A/C message with the supplied settings.
Definition: IRac.cpp:1235
IRac
Definition: IRac.h:43
ir_Teco.h
Support for Teco protocols.
IRac::gree
void gree(IRGreeAC *ac, const gree_ac_remote_model_t model, const bool on, const stdAc::opmode_t mode, const bool celsius, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const bool turbo, const bool light, const bool clean, const int16_t sleep=-1)
Send a Gree A/C message with the supplied settings.
Definition: IRac.cpp:913
ir_Delonghi.h
Delonghi A/C.
IRac::electra
void electra(IRElectraAc *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const stdAc::swingh_t swingh, const bool turbo, const bool lighttoggle, const bool clean)
Send an Electra A/C message with the supplied settings.
Definition: IRac.cpp:766
IRac::cleanState
static stdAc::state_t cleanState(const stdAc::state_t state)
Create a new state base on the provided state that has been suitably fixed.
Definition: IRac.cpp:1845
ir_Argo.h
Support for Argo Ulisse 13 DCI Mobile Split ACs.
IRac::mitsubishi
void mitsubishi(IRMitsubishiAC *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const stdAc::swingh_t swingh, const bool quiet, const int16_t clock=-1)
Send a Mitsubishi A/C message with the supplied settings.
Definition: IRac.cpp:1271
IRac::amcor
void amcor(IRAmcorAc *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan)
Send an Amcor A/C message with the supplied settings.
Definition: IRac.cpp:279
IRDaikin152
Class for handling detailed Daikin 152-bit A/C messages.
Definition: ir_Daikin.h:938
IRLgAc
Class for handling detailed LG A/C messages.
Definition: ir_LG.h:63
ir_Fujitsu.h
Support for Fujitsu A/C protocols. Fujitsu A/C support added by Jonny Graham.
IRHaierAC
Class for handling detailed Haier A/C messages.
Definition: ir_Haier.h:217
IRDaikin160
Class for handling detailed Daikin 160-bit A/C messages.
Definition: ir_Daikin.h:754
IRac::opmodeToString
static String opmodeToString(const stdAc::opmode_t mode)
Convert the supplied operation mode into the appropriate String.
Definition: IRac.cpp:2619
IRSharpAc
Class for handling detailed Sharp A/C messages.
Definition: ir_Sharp.h:108
ir_Goodweather.h
Support for Goodweather compatible HVAC protocols.
IRac::argo
void argo(IRArgoAC *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const bool turbo, const int16_t sleep=-1)
Send an Argo A/C message with the supplied settings.
Definition: IRac.cpp:311
lg_ac_remote_model_t
lg_ac_remote_model_t
LG A/C model numbers.
Definition: IRsend.h:158
IRac::mitsubishi136
void mitsubishi136(IRMitsubishi136 *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const bool quiet)
Send a Mitsubishi 136-bit A/C message with the supplied settings.
Definition: IRac.cpp:1342
stdAc::fanspeed_t::kAuto
@ kAuto
IRac::_modulation
bool _modulation
Definition: IRac.h:98
IRac::teco
void teco(IRTecoAc *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const bool light, const int16_t sleep=-1)
Send a Teco A/C message with the supplied settings.
Definition: IRac.cpp:1676
IRac::strToOpmode
static stdAc::opmode_t strToOpmode(const char *str, const stdAc::opmode_t def=stdAc::opmode_t::kAuto)
Convert the supplied str into the appropriate enum.
Definition: IRac.cpp:2397
IRac::hitachi1
void hitachi1(IRHitachiAc1 *ac, const hitachi_ac1_remote_model_t model, const bool on, const bool power_toggle, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const stdAc::swingh_t swingh, const bool swing_toggle, const int16_t sleep=-1)
Send a Hitachi1 A/C message with the supplied settings.
Definition: IRac.cpp:1057
stdAc::swingh_t::kOff
@ kOff
ir_Whirlpool.h
Support for Whirlpool protocols. Decoding help from: @redmusicxd, @josh929800, @raducostea.
IRac::strToBool
static bool strToBool(const char *str, const bool def=false)
Convert the supplied str into the appropriate boolean value.
Definition: IRac.cpp:2594
IRac::toshiba
void toshiba(IRToshibaAC *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan)
Send a Toshiba A/C message with the supplied settings.
Definition: IRac.cpp:1706
IRac::mitsubishiHeavy88
void mitsubishiHeavy88(IRMitsubishiHeavy88Ac *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const stdAc::swingh_t swingh, const bool turbo, const bool econo, const bool clean)
Send a Mitsubishi Heavy 88-bit A/C message with the supplied settings.
Definition: IRac.cpp:1377
IRac::strToSwingV
static stdAc::swingv_t strToSwingV(const char *str, const stdAc::swingv_t def=stdAc::swingv_t::kOff)
Convert the supplied str into the appropriate enum.
Definition: IRac.cpp:2458
IRVestelAc
Class for handling detailed Vestel A/C messages.
Definition: ir_Vestel.h:116
IRac::neoclima
void neoclima(IRNeoclimaAc *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const stdAc::swingh_t swingh, const bool turbo, const bool light, const bool filter, const int16_t sleep=-1)
Send a Neoclima A/C message with the supplied settings.
Definition: IRac.cpp:1460
IRTrotecESP
Class for handling detailed Trotec A/C messages.
Definition: ir_Trotec.h:76
IRTecoAc
Class for handling detailed Teco A/C messages.
Definition: ir_Teco.h:107
IRac::swinghToString
static String swinghToString(const stdAc::swingh_t swingh)
Convert the supplied enum into the appropriate String.
Definition: IRac.cpp:2687
IRac::delonghiac
void delonghiac(IRDelonghiAc *ac, const bool on, const stdAc::opmode_t mode, const bool celsius, const float degrees, const stdAc::fanspeed_t fan, const bool turbo, const int16_t sleep=-1)
Send a Delonghi A/C message with the supplied settings.
Definition: IRac.cpp:739
IRac::_prev
stdAc::state_t _prev
Definition: IRac.h:99
IRHaierACYRW02
Class for handling detailed Haier ACYRW02 A/C messages.
Definition: ir_Haier.h:289
IRac::daikin160
void daikin160(IRDaikin160 *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv)
Send a Daikin 160-bit A/C message with the supplied settings.
Definition: IRac.cpp:586
IRac::corona
void corona(IRCoronaAc *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const bool econo)
Send a Corona A/C message with the supplied settings.
Definition: IRac.cpp:441
IRac::initState
static void initState(stdAc::state_t *state, const decode_type_t vendor, const int16_t model, const bool power, const stdAc::opmode_t mode, const float degrees, const bool celsius, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const stdAc::swingh_t swingh, const bool quiet, const bool turbo, const bool econo, const bool light, const bool filter, const bool clean, const bool beep, const int16_t sleep, const int16_t clock)
Initialse the given state with the supplied settings.
Definition: IRac.cpp:80
IRac::mitsubishiHeavy152
void mitsubishiHeavy152(IRMitsubishiHeavy152Ac *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const stdAc::swingh_t swingh, const bool quiet, const bool turbo, const bool econo, const bool filter, const bool clean, const int16_t sleep=-1)
Send a Mitsubishi Heavy 152-bit A/C message with the supplied settings.
Definition: IRac.cpp:1418
stdAc::swingv_t::kOff
@ kOff
ir_Haier.h
Support for Haier A/C protocols. The specifics of reverse engineering the protocols details:
IRMitsubishiHeavy88Ac
Class for handling detailed Mitsubishi Heavy 88-bit A/C messages.
Definition: ir_MitsubishiHeavy.h:220
IRGreeAC
Class for handling detailed Gree A/C messages.
Definition: ir_Gree.h:117
IRac::coolix
void coolix(IRCoolixAC *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const stdAc::swingh_t swingh, const bool turbo, const bool light, const bool clean, const int16_t sleep=-1)
Send a Coolix A/C message with the supplied settings.
Definition: IRac.cpp:380
IRac::strToFanspeed
static stdAc::fanspeed_t strToFanspeed(const char *str, const stdAc::fanspeed_t def=stdAc::fanspeed_t::kAuto)
Convert the supplied str into the appropriate enum.
Definition: IRac.cpp:2427
ir_Toshiba.h
Support for Toshiba protocols.
IRac::sharp
void sharp(IRSharpAc *ac, const bool on, const bool prev_power, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const bool turbo, const bool filter, const bool clean)
Send a Sharp A/C message with the supplied settings.
Definition: IRac.cpp:1588
IRac::goodweather
void goodweather(IRGoodweatherAc *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const bool turbo, const bool light, const int16_t sleep=-1)
Send a Goodweather A/C message with the supplied settings.
Definition: IRac.cpp:871
stdAc::state_t
Structure to hold a common A/C state.
Definition: IRsend.h:97
IRGoodweatherAc
Class for handling detailed Goodweather A/C messages.
Definition: ir_Goodweather.h:90
ir_Vestel.h
Support for Vestel protocols. Vestel added by Erdem U. Altinyurt.
ir_Corona.h
IRArgoAC
Class for handling detailed Argo A/C messages.
Definition: ir_Argo.h:129
IRac::fujitsu
void fujitsu(IRFujitsuAC *ac, const fujitsu_ac_remote_model_t model, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const stdAc::swingh_t swingh, const bool quiet, const bool turbo, const bool econo, const bool filter, const bool clean)
Send a Fujitsu A/C message with the supplied settings.
Definition: IRac.cpp:808
IRNeoclimaAc
Class for handling detailed Neoclima A/C messages.
Definition: ir_Neoclima.h:86
IRac::isProtocolSupported
static bool isProtocolSupported(const decode_type_t protocol)
Is the given protocol supported by the IRac class?
Definition: IRac.cpp:133
IRDaikin176
Class for handling detailed Daikin 176-bit A/C messages.
Definition: ir_Daikin.h:806
ir_Amcor.h
Amcor A/C protocol.
IRac::_pin
uint16_t _pin
Definition: IRac.h:96
ir_LG.h
Support for LG protocols.
IRac::carrier64
void carrier64(IRCarrierAc64 *ac, const bool on, const stdAc::opmode_t mode, const float degrees, const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv, const int16_t sleep=-1)
Send a Carrier 64-bit A/C message with the supplied settings.
Definition: IRac.cpp:343
stdAc::opmode_t
opmode_t
Common A/C settings for A/C operating modes.
Definition: IRsend.h:46