Merge branch 'development' into fif-le01mr

This commit is contained in:
Theo Arends 2020-02-10 14:52:22 +01:00 committed by GitHub
commit d89c14ba27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
332 changed files with 7342 additions and 2380 deletions

1
.gitignore vendored
View File

@ -13,6 +13,7 @@ build
firmware.map
firmware.asm
tasmota*.bin
tasmota*.bin.gz
tasmota*.map
platformio_override.ini

View File

@ -1,3 +1,3 @@
tasks:
- before: pip install -U platformio
- before: pip3 install -U platformio
command: platformio run -e tasmota

View File

@ -128,6 +128,7 @@
| | | | | | | | |
| USE_IR_REMOTE | - | - | x | x | x | x | x |
| USE_IR_RECEIVE | - | - | x | x | x | x | x |
| USE_IR_REMOTE_FULL | - | - | - | - | - | x | - | Enable ALL protocols
| | | | | | | | |
| USE_SR04 | - | - | x | x | x | - | x |
| USE_TM1638 | - | - | - | - | x | - | - |

View File

@ -52,17 +52,33 @@ The following binary downloads have been compiled with ESP8266/Arduino library c
## Changelog
### Version 8.1.0.2
### Version 8.1.0.5
- Change Lights: simplified gamma correction and 10 bits internal computation
- Change commands ``Prefix``, ``Ssid``, ``StateText``, ``NTPServer``, and ``FriendlyName`` displaying all items
- Change IRremoteESP8266 library updated to v2.7.3
- Change Zigbee command prefix from ``Zigbee*`` to ``Zb*``
- Change wifi connectivity stability (#7602)
- Fix Sonoff Bridge, Sc, L1, iFan03 and CSE7766 serial interface to forced speed, config and disable logging
- Fix commands ``Display`` and ``Counter`` from overruling command processing (#7322)
- Fix ``White`` added to light status (#7142)
- Fix Improved fade linearity with gamma correction
- Fix LCD line and column positioning (#7387)
- Fix Display handling of hexadecimal escape characters (#7387)
- Fix ``WakeUp <x>`` ignores provided value (#7473)
- Fix exception 9 restart on log message in Ticker interrupt service routines NTP, Wemos and Hue emulation (#7496)
- Fix ``PowerDelta`` zero power detection (#7515)
- Fix ``RGBWWTable`` ignored (#7572)
- Fix PWM flickering at low levels (#7415)
- Fix Hass sensor discovery part 1/4 by Federico Leoni (#7582, #7548)
- Fix MaxPower functionality (#7647)
- Add command ``SetOption79 0/1`` to enable reset of counters at teleperiod time by Andre Thomas (#7355)
- Add command ``SetOption82 0/1`` to limit the CT range for Alexa to 200..380
- Add command ``SetOption84 1`` to send AWS IoT device shadow updates (alternative to retained)
- Add command ``ShutterButton <parameters>`` to control shutter(s) by to-scho (#7403)
- Add commands ``SwitchMode 8`` ToggleMulti, ``SwitchMode 9`` FollowMulti and ``SwitchMode 10`` FollowMultiInverted (#7522)
- Add commands ``SwitchMode 11`` PushHoldMulti and ``SwitchMode 12`` PushHoldInverted (#7603)
- Add command ``Buzzer -1`` for infinite mode and command ``Buzzer -2`` for following led mode (#7623)
- Add SerialConfig to ``Status 1``
- Add WifiPower to ``Status 5``
- Add support for DS1624, DS1621 Temperature sensor by Leonid Myravjev
@ -71,3 +87,14 @@ The following binary downloads have been compiled with ESP8266/Arduino library c
- Add optional support for Prometheus using file xsns_91_prometheus.ino (#7216)
- Add experimental support for NRF24L01 as BLE-bridge for Mijia Bluetooth sensors by Christian Baars (#7394)
- Add support to BMP driver to enter reset state (sleep enable) when deep sleep is used in Tasmota
- Add support for gzipped binaries
- Add web page sliders when ``SetOption37 128`` is active allowing control of white(s)
- Add most SetOptions as defines to my_user_config.h
- Add SoftwareSerial to CSE7766 driver allowing different GPIOs (#7563)
- Add optional parameter <startcolor> to command ``Scheme <scheme>, <startcolor>`` to control initial start color
- Add rule trigger on one level deeper using syntax with two ``#`` like ``on zigbeereceived#vibration_sensor#aqaracubeside=0 do ...``
- Add support for sensors DS18x20 and DHT family on Shelly 1 and Shelly 1PM using Shelly Add-On adapter (#7469)
- Add support for MI-BLE sensors using HM-10 Bluetooth 4.0 module by Christian Staars (#7683)
- Add BootCount Reset Time as BCResetTime to ``Status 1``
- Add ``ZbZNPReceived``and ``ZbZCLReceived`` being published to MQTT when ``SetOption66 1``
- Add optional Wifi AccessPoint passphrase define WIFI_AP_PASSPHRASE in my_user_config.h (#7690)

View File

@ -3,12 +3,46 @@
//
//var_dump($_FILES);
/**
* GZIPs a file on disk (appending .gz to the name)
*
* From http://stackoverflow.com/questions/6073397/how-do-you-create-a-gz-file-using-php
* Based on function by Kioob at:
* http://www.php.net/manual/en/function.gzwrite.php#34955
*
* @param string $source Path to file that should be compressed
* @param integer $level GZIP compression level (default: 9)
* @return string New filename (with .gz appended) if success, or false if operation fails
*/
function gzCompressFile($source, $level = 9){
$dest = $source . '.gz';
$mode = 'wb' . $level;
$error = false;
if ($fp_out = gzopen($dest, $mode)) {
if ($fp_in = fopen($source,'rb')) {
while (!feof($fp_in))
gzwrite($fp_out, fread($fp_in, 1024 * 512));
fclose($fp_in);
} else {
$error = true;
}
gzclose($fp_out);
} else {
$error = true;
}
if ($error)
return false;
else
return $dest;
}
$image = basename($_FILES["file"]["name"]);
$target_file = "arduino/".$image;
$hostname = $_SERVER['SERVER_NAME'];
if (move_uploaded_file($_FILES["file"]["tmp_name"], $target_file)) {
echo "The file $image has been uploaded to OTA server $hostname. \n";
gzCompressFile($target_file);
echo "The files $image and $image.gz have been uploaded to OTA server $hostname. \n";
} else {
echo "Sorry, there was an error uploading your file $image to OTA server $hostname. \n";
}

View File

@ -1,15 +0,0 @@
// Copyright 2017 David Conran
// Supports:
// Brand: LG, Model: 6711A20083V remote
// Brand: LG, Model: AKB74395308 remote
#ifndef IR_LG_H_
#define IR_LG_H_
#define __STDC_LIMIT_MACROS
#include <stdint.h>
uint8_t calcLGChecksum(uint16_t data);
#endif // IR_LG_H_

View File

@ -1,44 +0,0 @@
// Copyright 2009 Ken Shirriff
// Copyright 2017, 2018 David Conran
// NEC originally added from https://github.com/shirriff/Arduino-IRremote/
#ifndef IR_NEC_H_
#define IR_NEC_H_
#include <stdint.h>
#include "IRremoteESP8266.h"
// Supports:
// Brand: Yamaha, Model: RAV561 remote
// Brand: Yamaha, Model: RXV585B A/V Receiver
// Constants
// Ref:
// http://www.sbprojects.com/knowledge/ir/nec.php
const uint16_t kNecTick = 560;
const uint16_t kNecHdrMarkTicks = 16;
const uint16_t kNecHdrMark = kNecHdrMarkTicks * kNecTick;
const uint16_t kNecHdrSpaceTicks = 8;
const uint16_t kNecHdrSpace = kNecHdrSpaceTicks * kNecTick;
const uint16_t kNecBitMarkTicks = 1;
const uint16_t kNecBitMark = kNecBitMarkTicks * kNecTick;
const uint16_t kNecOneSpaceTicks = 3;
const uint16_t kNecOneSpace = kNecOneSpaceTicks * kNecTick;
const uint16_t kNecZeroSpaceTicks = 1;
const uint16_t kNecZeroSpace = kNecZeroSpaceTicks * kNecTick;
const uint16_t kNecRptSpaceTicks = 4;
const uint16_t kNecRptSpace = kNecRptSpaceTicks * kNecTick;
const uint16_t kNecRptLength = 4;
const uint16_t kNecMinCommandLengthTicks = 193;
const uint32_t kNecMinCommandLength = kNecMinCommandLengthTicks * kNecTick;
const uint32_t kNecMinGap =
kNecMinCommandLength -
(kNecHdrMark + kNecHdrSpace + kNECBits * (kNecBitMark + kNecOneSpace) +
kNecBitMark);
const uint16_t kNecMinGapTicks =
kNecMinCommandLengthTicks -
(kNecHdrMarkTicks + kNecHdrSpaceTicks +
kNECBits * (kNecBitMarkTicks + kNecOneSpaceTicks) + kNecBitMarkTicks);
#endif // IR_NEC_H_

View File

@ -9,8 +9,8 @@
This library enables you to **send _and_ receive** infra-red signals on an [ESP8266](https://github.com/esp8266/Arduino) or an
[ESP32](https://github.com/espressif/arduino-esp32) using the [Arduino framework](https://www.arduino.cc/) using common 940nm IR LEDs and common IR receiver modules. e.g. TSOP{17,22,24,36,38,44,48}* demodulators etc.
## v2.7.1 Now Available
Version 2.7.1 of the library is now [available](https://github.com/crankyoldgit/IRremoteESP8266/releases/latest). You can view the [Release Notes](ReleaseNotes.md) for all the significant changes.
## v2.7.3 Now Available
Version 2.7.3 of the library is now [available](https://github.com/crankyoldgit/IRremoteESP8266/releases/latest). You can view the [Release Notes](ReleaseNotes.md) for all the significant changes.
#### Upgrading from pre-v2.0
Usage of the library has been slightly changed in v2.0. You will need to change your usage to work with v2.0 and beyond. You can read more about the changes required on our [Upgrade to v2.0](https://github.com/crankyoldgit/IRremoteESP8266/wiki/Upgrading-to-v2.0) page.

View File

@ -9,8 +9,8 @@
Cette librairie vous permetra de **recevoir et d'envoyer des signaux** infrarouge sur le protocole [ESP8266](https://github.com/esp8266/Arduino) ou sur le protocole
[ESP32](https://github.com/espressif/arduino-esp32) en utilisant le [Arduino framework](https://www.arduino.cc/) qui utilise la norme 940nm IR LEDs et le module basique de reception d'onde IR. Exemple : TSOP{17,22,24,36,38,44,48}* modules etc.
## v2.7.1 disponible
Version 2.7.1 de la libraire est maintenant [disponible](https://github.com/crankyoldgit/IRremoteESP8266/releases/latest). Vous pouvez voir le [Release Notes](ReleaseNotes.md) pour tous les changements importants.
## v2.7.3 disponible
Version 2.7.3 de la libraire est maintenant [disponible](https://github.com/crankyoldgit/IRremoteESP8266/releases/latest). Vous pouvez voir le [Release Notes](ReleaseNotes.md) pour tous les changements importants.
#### mise à jour depuis pre-v2.0
L'utilisation de la librairie à un peu changer depuis la version in v2.0. Si vous voulez l'utiliser vous devrez changer votre utilisation aussi. Vous pouvez vous renseigner sur les précondition d'utilisation ici : [Upgrade to v2.0](https://github.com/crankyoldgit/IRremoteESP8266/wiki/Upgrading-to-v2.0) page.

View File

@ -1,5 +1,35 @@
# Release Notes
## _v2.7.3 (20200130)_
**[Features]**
- Allow protocols to be enabled or disabled with compiler flags. (#1013, #1012)
- Panasonic AC: Add Ion Filter support for DKE models. (#1025, #1024)
- Add support for sending Sony at 38Khz (#1029, #1018, #1019)
- auto_analyse_raw_data.py: Handle analysing messages with no headers. (#1017)
**[Misc]**
- Fix Coolix unit test errors when using Apple c++ compiler. (#1030, #1028)
- Fix Apple clang c++ compiler error in unit tests. (#1027, #1026)
- Improve/fix scraping of supported devices (#1022)
- Panasonic PKR series A/C uses DKE protocol. (#1020, #1021)
- Update NEC supported devices. (#1018)
- Add note to avoid GPIO16 on the ESP8266 for receiving. (#1016, #1015)
## _v2.7.2 (20200106)_
**[Bug Fixes]**
- Common AC api: Better handle protocols with power toggles. (#1002)
**[Features]**
- Experimental detailed support for LG a/c. (#1008 #1009)
**[Misc]**
- Add remote codes for Aloka LED lamp. (#1005)
- Improve Supported Devices scraping. (#1006)
## _v2.7.1 (20191125)_
**[Bug Fixes]**

View File

@ -1,6 +1,6 @@
<!--- WARNING: Do NOT edit this file directly.
It is generated by './tools/scrape_supported_devices.py'.
Last generated: Mon Nov 25 11:12:06 2019 --->
Last generated: Thu Jan 30 20:05:33 2020 --->
# IR Protocols supported by this library
| Protocol | Brand | Model | A/C Model | Detailed A/C Support |
@ -11,42 +11,45 @@
| [Carrier](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Carrier.cpp) | **Carrier/Surrey** | 42QG5A55970 remote<BR>53NGK009/012 Inverter<BR>619EGX0090E0 A/C<BR>619EGX0120E0 A/C<BR>619EGX0180E0 A/C<BR>619EGX0220E0 A/C | | - |
| [Coolix](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Coolix.cpp) | **[Beko](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Coolix.h)** | BINR 070/071 split-type A/C<BR>BINR 070/071 split-type A/C<BR>RG57K7(B)/BGEF Remote<BR>RG57K7(B)/BGEF Remote | | Yes |
| [Coolix](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Coolix.cpp) | **[Midea](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Coolix.h)** | MS12FU-10HRDN1-QRD0GW(B) A/C<BR>MS12FU-10HRDN1-QRD0GW(B) A/C<BR>MSABAU-07HRFN1-QRD0GW A/C (circa 2016)<BR>MSABAU-07HRFN1-QRD0GW A/C (circa 2016)<BR>RG52D/BGE Remote<BR>RG52D/BGE Remote | | Yes |
| [Coolix](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Coolix.cpp) | **[Tokio](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Coolix.h)** | AATOEMF17-12CHR1SW split-type RG51|50/BGE Remote<BR>AATOEMF17-12CHR1SW split-type RG51|50/BGE Remote | | Yes |
| [Coolix](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Coolix.cpp) | **[Tokio](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Coolix.h)** | AATOEMF17-12CHR1SW split-type RG51\|50/BGE Remote<BR>AATOEMF17-12CHR1SW split-type RG51\|50/BGE Remote | | Yes |
| [Daikin](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Daikin.cpp) | **[Daikin](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Daikin.h)** | 17 Series A/C (DAIKIN128)<BR>ARC423A5 remote<BR>ARC433** remote<BR>ARC433B69 remote<BR>ARC477A1 remote<BR>ARC480A5 remote (DAIKIN152)<BR>BRC4C153 remote<BR>BRC52B63 remote (DAIKIN128)<BR>FTE12HV2S A/C<BR>FTXB09AXVJU A/C (DAIKIN128)<BR>FTXB12AXVJU A/C (DAIKIN128)<BR>FTXZ25NV1B A/C<BR>FTXZ35NV1B A/C<BR>FTXZ50NV1B A/C | | Yes |
| [Denon](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Denon.cpp) | **Unknown** | | | - |
| [Dish](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Dish.cpp) | **DISH NETWORK** | echostar 301 | | - |
| [Electra](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Electra.cpp) | **[AUX](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Electra.h)** | KFR-35GW/BpNFW=3 A/C<BR>YKR-T/011 remote | | Yes |
| [Fujitsu](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Fujitsu.cpp) | **[Fujitsu](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Fujitsu.h)** | AGTV14LAC A/C<BR>AR-DB1 remote<BR>AR-DL10 remote<BR>AR-RAC1E remote<BR>AR-RAE1E remote<BR>AR-RAH2E remote<BR>AR-REB1E remote<BR>AR-RY4 remote<BR>AST9RSGCW A/C<BR>ASTB09LBC A/C<BR>ASU30C1 A/C<BR>ASYG30LFCA A/C<BR>ASYG7LMCA A/C | | Yes |
| [Fujitsu](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Fujitsu.cpp) | **[Fujitsu General](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Fujitsu.h)** | AR-JW2 remote | | Yes |
| [Fujitsu](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Fujitsu.cpp) | **[Fujitsu](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Fujitsu.h)** | AGTV14LAC A/C<BR>AR-DB1 remote<BR>AR-DL10 remote<BR>AR-RAC1E remote<BR>AR-RAE1E remote<BR>AR-RAH2E remote<BR>AR-REB1E remote<BR>AR-RY4 remote<BR>AST9RSGCW A/C<BR>ASTB09LBC A/C<BR>ASU30C1 A/C<BR>ASYG30LFCA A/C<BR>ASYG7LMCA A/C | ARDB1<BR>ARJW2<BR>ARRAH2E<BR>ARREB1E<BR>ARRY4 | Yes |
| [Fujitsu](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Fujitsu.cpp) | **[Fujitsu General](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Fujitsu.h)** | AR-JW2 remote | ARDB1<BR>ARJW2<BR>ARRAH2E<BR>ARREB1E<BR>ARRY4 | Yes |
| [GICable](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_GICable.cpp) | **Unknown** | | | - |
| [GlobalCache](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_GlobalCache.cpp) | **Unknown** | | | - |
| [Goodweather](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Goodweather.cpp) | **[Goodweather](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Goodweather.h)** | ZH/JT-03 remote | | Yes |
| [Gree](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Gree.cpp) | **[EKOKAI](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Gree.h)** | A/C | | Yes |
| [Gree](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Gree.cpp) | **[Green](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Gree.h)** | YBOFB remote<BR>YBOFB2 remote | | Yes |
| [Gree](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Gree.cpp) | **[RusClimate](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Gree.h)** | EACS/I-09HAR_X/N3 A/C<BR>YAW1F remote | | Yes |
| [Gree](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Gree.cpp) | **[Ultimate](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Gree.h)** | Heat Pump | | Yes |
| [Gree](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Gree.cpp) | **[EKOKAI](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Gree.h)** | A/C | YAW1F<BR>YBOFB | Yes |
| [Gree](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Gree.cpp) | **[Green](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Gree.h)** | YBOFB remote<BR>YBOFB2 remote | YAW1F<BR>YBOFB | Yes |
| [Gree](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Gree.cpp) | **[RusClimate](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Gree.h)** | EACS/I-09HAR_X/N3 A/C<BR>YAW1F remote | YAW1F<BR>YBOFB | Yes |
| [Gree](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Gree.cpp) | **[Ultimate](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Gree.h)** | Heat Pump | YAW1F<BR>YBOFB | Yes |
| [Haier](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Haier.cpp) | **[Haier](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Haier.h)** | HSU-09HMC203 A/C<BR>HSU07-HEA03 remote<BR>YR-W02 remote | | Yes |
| [Hitachi](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Hitachi.cpp) | **[Hitachi](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Hitachi.h)** | LT0541-HTA remote<BR>RAR-8P2 remote<BR>RAS-35THA6 remote<BR>RAS-AJ25H A/C<BR>Series VI A/C (Circa 2007) | | Yes |
| [Inax](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Inax.cpp) | **Lixil** | Inax DT-BA283 Toilet | | - |
| [JVC](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_JVC.cpp) | **Unknown** | | | - |
| [Kelvinator](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Kelvinator.cpp) | **[Green](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Kelvinator.h)** | YAPOF3 remote | | Yes |
| [Kelvinator](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Kelvinator.cpp) | **[Kelvinator](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Kelvinator.h)** | KSV26CRC A/C<BR>KSV26HRC A/C<BR>KSV35CRC A/C<BR>KSV35HRC A/C<BR>KSV53HRC A/C<BR>KSV62HRC A/C<BR>KSV70CRC A/C<BR>KSV70HRC A/C<BR>KSV80HRC A/C<BR>YALIF Remote | | Yes |
| [LG](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_LG.cpp) | **[LG](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_LG.h)** | 6711A20083V remote<BR>6711A20083V remote<BR>AKB74395308 remote<BR>AKB74395308 remote | | Yes |
| [LG](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_LG.cpp) | **[General Electric](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_LG.h)** | 6711AR2853M A/C Remote<BR>AG1BH09AW101 Split A/C | | Yes |
| [LG](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_LG.cpp) | **[LG](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_LG.h)** | 6711A20083V remote<BR>6711A20083V remote<BR>AKB74395308 remote<BR>AKB74395308 remote<BR>AKB75215403 remote (LG2)<BR>S4-W12JA3AA A/C (LG2) | | Yes |
| [Lasertag](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Lasertag.cpp) | **Unknown** | | | - |
| [Lego](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Lego.cpp) | **LEGO Power Functions** | IR Receiver | | - |
| [Lutron](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Lutron.cpp) | **Unknown** | | | - |
| [MWM](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_MWM.cpp) | **Unknown** | | | - |
| [Magiquest](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Magiquest.cpp) | **[Unknown](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Magiquest.h)** | | | Yes |
| [Magiquest](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Magiquest.cpp) | **[Unknown](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Magiquest.h)** | | | - |
| [Midea](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Midea.cpp) | **[Comfee](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Midea.h)** | MPD1-12CRN7 A/C | | Yes |
| [Midea](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Midea.cpp) | **[Keystone](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Midea.h)** | RG57H4(B)BGEF remote | | Yes |
| [Midea](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Midea.cpp) | **[Pioneer System](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Midea.h)** | RUBO18GMFILCAD A/C (18K BTU)<BR>RYBO12GMFILCAD A/C (12K BTU) | | Yes |
| [Mitsubishi](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Mitsubishi.cpp) | **[Mitsubishi](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Mitsubishi.h)** | HC3000 Projector<BR>KM14A 0179213 remote<BR>MS-GK24VA A/C<BR>TV | | Yes |
| [Mitsubishi](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Mitsubishi.cpp) | **[Mitsubishi Electric](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Mitsubishi.h)** | 001CP T7WE10714 remote<BR>KPOA remote<BR>MSH-A24WV / MUH-A24WV A/C<BR>PEAD-RP71JAA Ducted A/C | | Yes |
| [MitsubishiHeavy](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_MitsubishiHeavy.cpp) | **[Mitsubishi Heavy Industries](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_MitsubishiHeavy.h)** | RKX502A001C remote<BR>RLA502A700B remote<BR>SRKxxZJ-S A/C<BR>SRKxxZM-S A/C<BR>SRKxxZMXA-S A/C | | Yes |
| [NEC](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_NEC.cpp) | **[Yamaha](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_NEC.h)** | RAV561 remote<BR>RXV585B A/V Receiver | | Yes |
| [NEC](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_NEC.cpp) | **[Aloka](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_NEC.h)** | SleepyLights LED Lamp | | - |
| [NEC](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_NEC.cpp) | **[Toshiba](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_NEC.h)** | 42TL838 LCD TV | | - |
| [NEC](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_NEC.cpp) | **[Yamaha](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_NEC.h)** | RAV561 remote<BR>RXV585B A/V Receiver | | - |
| [Neoclima](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Neoclima.cpp) | **[Neoclima](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Neoclima.h)** | NS-09AHTI A/C<BR>NS-09AHTI A/C<BR>ZH/TY-01 remote<BR>ZH/TY-01 remote | | Yes |
| [Nikai](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Nikai.cpp) | **Unknown** | | | - |
| [Panasonic](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Panasonic.cpp) | **[Panasonic](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Panasonic.h)** | A75C2311 remote (CKP)<BR>A75C3704 remote<BR>A75C3747 remote<BR>A75C3747 remote<BR>A75C3747 remote<BR>A75C3747 remote<BR>CKP series A/C<BR>CS-ME10CKPG A/C<BR>CS-ME12CKPG A/C<BR>CS-ME14CKPG A/C<BR>CS-YW9MKD A/C<BR>CS-Z9RKR A/C<BR>DKE series A/C<BR>JKE series A/C<BR>NKE series A/C<BR>RKR series A/C<BR>TV | | Yes |
| [Panasonic](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Panasonic.cpp) | **[Panasonic](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Panasonic.h)** | A75C2311 remote (CKP)<BR>A75C2616-1 remote (DKE)<BR>A75C3704 remote<BR>A75C3747 remote<BR>CKP series A/C<BR>CS-E7PKR A/C (DKE)<BR>CS-ME10CKPG A/C<BR>CS-ME12CKPG A/C<BR>CS-ME14CKPG A/C<BR>CS-YW9MKD A/C<BR>CS-Z9RKR A/C<BR>DKE series A/C<BR>DKW series A/C (DKE)<BR>JKE series A/C<BR>NKE series A/C<BR>PKR series A/C (DKE)<BR>RKR series A/C<BR>TV | CKP<BR>DKE<BR>JKE<BR>LKE<BR>NKE<BR>RKR | Yes |
| [Pioneer](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Pioneer.cpp) | **Unknown** | | | - |
| [Pronto](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Pronto.cpp) | **Unknown** | | | - |
| [RC5_RC6](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_RC5_RC6.cpp) | **Unknown** | | | - |
@ -55,24 +58,23 @@
| [Sanyo](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Sanyo.cpp) | **Unknown** | | | - |
| [Sharp](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Sharp.cpp) | **[Sharp](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Sharp.h)** | AY-ZP40KR A/C<BR>LC-52D62U TV | | Yes |
| [Sherwood](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Sherwood.cpp) | **Sherwood** | RC-138 remote<BR>RD6505(B) Receiver | | - |
| [Sony](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Sony.cpp) | **Unknown** | | | - |
| [Sony](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Sony.cpp) | **Sony** | HT-CT380 Soundbar (Uses 38kHz & 3 repeats) | | - |
| [Tcl](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Tcl.cpp) | **[Leberg](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Tcl.h)** | LBS-TOR07 A/C | | Yes |
| [Teco](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Teco.cpp) | **[Alaska](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Teco.h)** | SAC9010QC A/C<BR>SAC9010QC remote | | Yes |
| [Toshiba](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Toshiba.cpp) | **[Toshiba](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Toshiba.h)** | Akita EVO II<BR>RAS 18SKP-ES<BR>RAS-B13N3KV2<BR>RAS-B13N3KVP-E<BR>WC-L03SE<BR>WH-TA04NE | | Yes |
| [Trotec](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Trotec.cpp) | **[Unknown](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Trotec.h)** | | | Yes |
| [Vestel](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Vestel.cpp) | **[Vestel](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Vestel.h)** | BIOX CXP-9 A/C (9K BTU) | | Yes |
| [Whirlpool](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Whirlpool.cpp) | **[Whirlpool](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Whirlpool.h)** | DG11J1-04 remote<BR>DG11J1-3A remote<BR>DG11J1-91 remote<BR>SPIS409L A/C<BR>SPIS412L A/C<BR>SPIW409L A/C<BR>SPIW412L A/C<BR>SPIW418L A/C | | Yes |
| [Whirlpool](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Whirlpool.cpp) | **[Whirlpool](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Whirlpool.h)** | DG11J1-04 remote<BR>DG11J1-3A remote<BR>DG11J1-91 remote<BR>SPIS409L A/C<BR>SPIS412L A/C<BR>SPIW409L A/C<BR>SPIW412L A/C<BR>SPIW418L A/C | DG11J13A<BR>DG11J191 | Yes |
| [Whynter](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Whynter.cpp) | **Whynter** | ARC-110WD A/C | | - |
## Send only protocols:
- GLOBALCACHE
- MITSUBISHI112
- PRONTO
- RAW
- SHERWOOD
- TCL112AC
- SONY_38K
## Send & decodable protocols:
@ -113,6 +115,7 @@
- MAGIQUEST
- MIDEA
- MITSUBISHI
- MITSUBISHI112
- MITSUBISHI136
- MITSUBISHI2
- MITSUBISHI_AC
@ -138,10 +141,10 @@
- SHARP
- SHARP_AC
- SONY
- TCL112AC
- TECO
- TOSHIBA_AC
- TROTEC
- VESTEL_AC
- WHIRLPOOL_AC
- WHYNTER
- typeguess

View File

@ -37,6 +37,8 @@
* * Pin 0/D3: Can interfere with the boot/program mode & support circuits.
* * Pin 1/TX/TXD0: Any serial transmissions from the ESP will interfere.
* * Pin 3/RX/RXD0: Any serial transmissions to the ESP will interfere.
* * Pin 16/D0: Has no interrupts on the ESP8266, so can't be used for IR
* receiving with this library.
* * ESP-01 modules are tricky. We suggest you use a module with more GPIOs
* for your first time. e.g. ESP-12 etc.
*
@ -54,6 +56,7 @@
// ==================== start of TUNEABLE PARAMETERS ====================
// The GPIO an IR detector/demodulator is connected to. Recommended: 14 (D5)
// Note: GPIO 16 won't work on the ESP8266 as it does not have interrupts.
const uint16_t kRecvPin = 14;
// GPIO to use to control the IR LED circuit. Recommended: 4 (D2).

View File

@ -47,6 +47,7 @@ const int8_t kDefaultIrLed = 4; // <=- CHANGE_ME (optional)
const bool kInvertTxOutput = false;
// Default GPIO the IR demodulator is connected to/controlled by. GPIO 14 = D5.
// Note: GPIO 16 won't work on the ESP8266 as it does not have interrupts.
const int8_t kDefaultIrRx = 14; // <=- CHANGE_ME (optional)
// Enable/disable receiving/decoding IR messages entirely.

View File

@ -271,7 +271,7 @@
*
* #### Home Assistant MQTT Discovery
* There is an option for this: 'Send MQTT Discovery' under the 'Admin' menu.
* It will produce a single MQTT Cliamte Discovery message for Home Assistant
* It will produce a single MQTT Climate Discovery message for Home Assistant
* provided you have everything configured correctly here and in HA.
* This message has MQTT RETAIN set on it, so it only ever needs to be sent
* once or if the config details change etc.

View File

@ -23,6 +23,7 @@
// An IR detector/demodulator is connected to GPIO pin 14(D5 on a NodeMCU
// board).
// Note: GPIO 16 won't work on the ESP8266 as it does not have interrupts.
const uint16_t kRecvPin = 14;
IRrecv irrecv(kRecvPin);

View File

@ -34,6 +34,7 @@
// ==================== start of TUNEABLE PARAMETERS ====================
// An IR detector/demodulator is connected to GPIO pin 14
// e.g. D5 on a NodeMCU board.
// Note: GPIO 16 won't work on the ESP8266 as it does not have interrupts.
const uint16_t kRecvPin = 14;
// The Serial connection baud rate.

View File

@ -40,6 +40,8 @@
* * Pin 0/D3: Can interfere with the boot/program mode & support circuits.
* * Pin 1/TX/TXD0: Any serial transmissions from the ESP will interfere.
* * Pin 3/RX/RXD0: Any serial transmissions to the ESP will interfere.
* * Pin 16/D0: Has no interrupts on the ESP8266, so can't be used for IR
* receiving with this library.
* * ESP-01 modules are tricky. We suggest you use a module with more GPIOs
* for your first time. e.g. ESP-12 etc.
*
@ -57,6 +59,7 @@
// ==================== start of TUNEABLE PARAMETERS ====================
// The GPIO an IR detector/demodulator is connected to. Recommended: 14 (D5)
// Note: GPIO 16 won't work on the ESP8266 as it does not have interrupts.
const uint16_t kRecvPin = 14;
// GPIO to use to control the IR LED circuit. Recommended: 4 (D2).

View File

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

@ -39,6 +39,7 @@ IRHaierACYRW02 KEYWORD1
IRHitachiAc KEYWORD1
IRHitachiAc424 KEYWORD1
IRKelvinatorAC KEYWORD1
IRLgAc KEYWORD1
IRMideaAC KEYWORD1
IRMitsubishi112 KEYWORD1
IRMitsubishi136 KEYWORD1
@ -66,6 +67,7 @@ fanspeed_t KEYWORD1
fujitsu_ac_remote_model_t KEYWORD1
gree_ac_remote_model_t KEYWORD1
irparams_t KEYWORD1
lg_ac_remote_model_t KEYWORD1
match_result_t KEYWORD1
opmode_t KEYWORD1
panasonic_ac_remote_model_t KEYWORD1
@ -82,6 +84,7 @@ _delayMicroseconds KEYWORD2
_getTime KEYWORD2
_getTimer KEYWORD2
_matchGeneric KEYWORD2
_sendSony KEYWORD2
_setMode KEYWORD2
_setTemp KEYWORD2
_setTime KEYWORD2
@ -346,9 +349,11 @@ isSwingVToggle KEYWORD2
isTimeCommand KEYWORD2
isTimerActive KEYWORD2
isTimerEnabled KEYWORD2
isValidLgAc KEYWORD2
kelvinator KEYWORD2
ledOff KEYWORD2
ledOn KEYWORD2
lg KEYWORD2
mark KEYWORD2
match KEYWORD2
matchAtLeast KEYWORD2
@ -455,6 +460,7 @@ sendSharpAc KEYWORD2
sendSharpRaw KEYWORD2
sendSherwood KEYWORD2
sendSony KEYWORD2
sendSony38 KEYWORD2
sendTcl112Ac KEYWORD2
sendTeco KEYWORD2
sendToshibaAC KEYWORD2
@ -590,6 +596,7 @@ xorBytes KEYWORD2
// LITERAL1
AIWA_RC_T501 LITERAL1
AIWA_RC_T501_BITS LITERAL1
AKB75215403 LITERAL1
ALLOW_DELAY_CALLS LITERAL1
AMCOR LITERAL1
ARDB1 LITERAL1
@ -748,6 +755,7 @@ FUJITSU_AC_SWING_BOTH LITERAL1
FUJITSU_AC_SWING_HORIZ LITERAL1
FUJITSU_AC_SWING_OFF LITERAL1
FUJITSU_AC_SWING_VERT LITERAL1
GE6711AR2853M LITERAL1
GICABLE LITERAL1
GICABLE_BITS LITERAL1
GLOBALCACHE LITERAL1
@ -1018,6 +1026,7 @@ SONY LITERAL1
SONY_12_BITS LITERAL1
SONY_15_BITS LITERAL1
SONY_20_BITS LITERAL1
SONY_38K LITERAL1
TCL112AC LITERAL1
TECO LITERAL1
TIMEOUT_MS LITERAL1
@ -1063,6 +1072,22 @@ kAiwaRcT501PostBits LITERAL1
kAiwaRcT501PostData LITERAL1
kAiwaRcT501PreBits LITERAL1
kAiwaRcT501PreData LITERAL1
kAlokaBits LITERAL1
kAlokaLedBlue LITERAL1
kAlokaLedGreen LITERAL1
kAlokaLedLightGreen LITERAL1
kAlokaLedMidBlue LITERAL1
kAlokaLedOrange LITERAL1
kAlokaLedPink LITERAL1
kAlokaLedPinkRed LITERAL1
kAlokaLedRainbow LITERAL1
kAlokaLedRed LITERAL1
kAlokaLedTreeGrow LITERAL1
kAlokaLedWhite LITERAL1
kAlokaLedYellow LITERAL1
kAlokaNightFade LITERAL1
kAlokaNightTimer LITERAL1
kAlokaPower LITERAL1
kAmcorAuto LITERAL1
kAmcorBits LITERAL1
kAmcorChecksumByte LITERAL1
@ -2094,9 +2119,38 @@ kLg32HdrSpace LITERAL1
kLg32HdrSpaceTicks LITERAL1
kLg32RptHdrMark LITERAL1
kLg32RptHdrMarkTicks LITERAL1
kLgAcAuto LITERAL1
kLgAcChecksumOffset LITERAL1
kLgAcChecksumSize LITERAL1
kLgAcCool LITERAL1
kLgAcDry LITERAL1
kLgAcFan LITERAL1
kLgAcFanAuto LITERAL1
kLgAcFanHigh LITERAL1
kLgAcFanLow LITERAL1
kLgAcFanMedium LITERAL1
kLgAcFanOffset LITERAL1
kLgAcFanSize LITERAL1
kLgAcHeat LITERAL1
kLgAcMaxTemp LITERAL1
kLgAcMinTemp LITERAL1
kLgAcModeOffset LITERAL1
kLgAcModeSize LITERAL1
kLgAcOffCommand LITERAL1
kLgAcPowerOff LITERAL1
kLgAcPowerOffset LITERAL1
kLgAcPowerOn LITERAL1
kLgAcPowerSize LITERAL1
kLgAcSignature LITERAL1
kLgAcSignatureOffset LITERAL1
kLgAcSignatureSize LITERAL1
kLgAcTempAdjust LITERAL1
kLgAcTempOffset LITERAL1
kLgAcTempSize LITERAL1
kLgBitMark LITERAL1
kLgBitMarkTicks LITERAL1
kLgBits LITERAL1
kLgDefaultRepeat LITERAL1
kLgHdrMark LITERAL1
kLgHdrMarkTicks LITERAL1
kLgHdrSpace LITERAL1
@ -2555,6 +2609,8 @@ kPanasonicAcFanMed LITERAL1
kPanasonicAcFanMin LITERAL1
kPanasonicAcFanModeTemp LITERAL1
kPanasonicAcHeat LITERAL1
kPanasonicAcIonFilterByte LITERAL1
kPanasonicAcIonFilterOffset LITERAL1
kPanasonicAcMaxTemp LITERAL1
kPanasonicAcMessageGap LITERAL1
kPanasonicAcMinTemp LITERAL1
@ -2845,6 +2901,7 @@ kSlowStr LITERAL1
kSony12Bits LITERAL1
kSony15Bits LITERAL1
kSony20Bits LITERAL1
kSonyAltFreq LITERAL1
kSonyHdrMark LITERAL1
kSonyHdrMarkTicks LITERAL1
kSonyMinBits LITERAL1
@ -2857,6 +2914,7 @@ kSonyRptLength LITERAL1
kSonyRptLengthTicks LITERAL1
kSonySpace LITERAL1
kSonySpaceTicks LITERAL1
kSonyStdFreq LITERAL1
kSonyTick LITERAL1
kSonyZeroMark LITERAL1
kSonyZeroMarkTicks LITERAL1

View File

@ -1,6 +1,6 @@
{
"name": "IRremoteESP8266",
"version": "2.7.1",
"version": "2.7.3",
"keywords": "infrared, ir, remote, esp8266, esp32",
"description": "Send and receive infrared signals with multiple protocols (ESP8266/ESP32)",
"repository":

View File

@ -1,5 +1,5 @@
name=IRremoteESP8266
version=2.7.1
version=2.7.3
author=David Conran, Sebastien Warin, Mark Szabo, Ken Shirriff
maintainer=Mark Szabo, David Conran, Sebastien Warin, Roi Dayan, Massimiliano Pinto
sentence=Send and receive infrared signals with multiple protocols (ESP8266/ESP32)

View File

@ -25,6 +25,7 @@
#include "ir_Haier.h"
#include "ir_Hitachi.h"
#include "ir_Kelvinator.h"
#include "ir_LG.h"
#include "ir_Midea.h"
#include "ir_Mitsubishi.h"
#include "ir_MitsubishiHeavy.h"
@ -149,6 +150,10 @@ bool IRac::isProtocolSupported(const decode_type_t protocol) {
#if SEND_KELVINATOR
case decode_type_t::KELVINATOR:
#endif
#if SEND_LG
case decode_type_t::LG:
case decode_type_t::LG2:
#endif
#if SEND_MIDEA
case decode_type_t::MIDEA:
#endif
@ -719,6 +724,30 @@ void IRac::kelvinator(IRKelvinatorAC *ac,
}
#endif // SEND_KELVINATOR
#if SEND_LG
void IRac::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) {
ac->begin();
ac->setModel(model);
ac->setPower(on);
ac->setMode(ac->convertMode(mode));
ac->setTemp(degrees);
ac->setFan(ac->convertFan(fan));
// No Vertical swing setting available.
// No Horizontal swing setting available.
// No Quiet setting available.
// No Turbo setting available.
// No Light setting available.
// No Filter setting available.
// No Clean setting available.
// No Beep setting available.
// No Sleep setting available.
// No Clock setting available.
ac->send();
}
#endif // SEND_LG
#if SEND_MIDEA
void IRac::midea(IRMideaAC *ac,
const bool on, const stdAc::opmode_t mode, const bool celsius,
@ -911,7 +940,8 @@ void IRac::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 int16_t clock) {
const bool quiet, const bool turbo, const bool filter,
const int16_t clock) {
ac->begin();
ac->setModel(model);
ac->setPower(on);
@ -922,9 +952,9 @@ void IRac::panasonic(IRPanasonicAc *ac, const panasonic_ac_remote_model_t model,
ac->setSwingHorizontal(ac->convertSwingH(swingh));
ac->setQuiet(quiet);
ac->setPowerful(turbo);
ac->setIon(filter);
// No Light setting available.
// No Econo setting available.
// No Filter setting available.
// No Clean setting available.
// No Beep setting available.
// No Sleep setting available.
@ -1144,6 +1174,20 @@ void IRac::whirlpool(IRWhirlpoolAc *ac, const whirlpool_ac_remote_model_t model,
}
#endif // SEND_WHIRLPOOL_AC
// Create a new state base on the provided state that has been suitably fixed.
// Args:
// state: The state_t structure describing the desired a/c state.
//
// Returns:
// A stdAc::state_t with the needed settings.
stdAc::state_t IRac::cleanState(const stdAc::state_t state) {
stdAc::state_t result = state;
// A hack for Home Assistant, it appears to need/want an Off opmode.
// So enforce the power is off if the mode is also off.
if (state.mode == stdAc::opmode_t::kOff) result.power = false;
return result;
}
// Create a new state base on desired & previous states but handle
// any state changes for options that need to be toggled.
// Args:
@ -1244,23 +1288,18 @@ bool IRac::sendAc(const decode_type_t vendor, const int16_t model,
// Returns:
// boolean: True, if accepted/converted/attempted. False, if unsupported.
bool IRac::sendAc(const stdAc::state_t desired, const stdAc::state_t *prev) {
stdAc::state_t send = this->handleToggles(desired, prev);
// Convert the temperature to Celsius.
float degC;
if (desired.celsius)
degC = send.degrees;
else
degC = fahrenheitToCelsius(desired.degrees);
bool on = desired.power;
// A hack for Home Assistant, it appears to need/want an Off opmode.
if (desired.mode == stdAc::opmode_t::kOff) on = false;
// Convert the temp from Fahrenheit to Celsius if we are not in Celsius mode.
float degC = desired.celsius ? desired.degrees
: fahrenheitToCelsius(desired.degrees);
// special `state_t` that is required to be sent based on that.
stdAc::state_t send = this->handleToggles(this->cleanState(desired), prev);
// Per vendor settings & setup.
switch (send.protocol) {
#if SEND_AMCOR
case AMCOR:
{
IRAmcorAc ac(_pin, _inverted, _modulation);
amcor(&ac, on, send.mode, degC, send.fanspeed);
amcor(&ac, send.power, send.mode, degC, send.fanspeed);
break;
}
#endif // SEND_AMCOR
@ -1268,8 +1307,8 @@ bool IRac::sendAc(const stdAc::state_t desired, const stdAc::state_t *prev) {
case ARGO:
{
IRArgoAC ac(_pin, _inverted, _modulation);
argo(&ac, on, send.mode, degC, send.fanspeed, send.swingv, send.turbo,
send.sleep);
argo(&ac, send.power, send.mode, degC, send.fanspeed, send.swingv,
send.turbo, send.sleep);
break;
}
#endif // SEND_ARGO
@ -1277,8 +1316,8 @@ bool IRac::sendAc(const stdAc::state_t desired, const stdAc::state_t *prev) {
case COOLIX:
{
IRCoolixAC ac(_pin, _inverted, _modulation);
coolix(&ac, on, send.mode, degC, send.fanspeed, send.swingv, send.swingh,
send.turbo, send.light, send.clean, send.sleep);
coolix(&ac, send.power, send.mode, degC, send.fanspeed, send.swingv,
send.swingh, send.turbo, send.light, send.clean, send.sleep);
break;
}
#endif // SEND_COOLIX
@ -1286,8 +1325,8 @@ bool IRac::sendAc(const stdAc::state_t desired, const stdAc::state_t *prev) {
case DAIKIN:
{
IRDaikinESP ac(_pin, _inverted, _modulation);
daikin(&ac, on, send.mode, degC, send.fanspeed, send.swingv, send.swingh,
send.quiet, send.turbo, send.econo, send.clean);
daikin(&ac, send.power, send.mode, degC, send.fanspeed, send.swingv,
send.swingh, send.quiet, send.turbo, send.econo, send.clean);
break;
}
#endif // SEND_DAIKIN
@ -1295,7 +1334,7 @@ bool IRac::sendAc(const stdAc::state_t desired, const stdAc::state_t *prev) {
case DAIKIN128:
{
IRDaikin128 ac(_pin, _inverted, _modulation);
daikin128(&ac, on, send.mode, degC, send.fanspeed, send.swingv,
daikin128(&ac, send.power, send.mode, degC, send.fanspeed, send.swingv,
send.quiet, send.turbo, send.light, send.econo, send.sleep,
send.clock);
break;
@ -1305,7 +1344,7 @@ bool IRac::sendAc(const stdAc::state_t desired, const stdAc::state_t *prev) {
case DAIKIN152:
{
IRDaikin152 ac(_pin, _inverted, _modulation);
daikin152(&ac, on, send.mode, degC, send.fanspeed, send.swingv,
daikin152(&ac, send.power, send.mode, degC, send.fanspeed, send.swingv,
send.quiet, send.turbo, send.econo);
break;
}
@ -1314,7 +1353,7 @@ bool IRac::sendAc(const stdAc::state_t desired, const stdAc::state_t *prev) {
case DAIKIN160:
{
IRDaikin160 ac(_pin, _inverted, _modulation);
daikin160(&ac, on, send.mode, degC, send.fanspeed, send.swingv);
daikin160(&ac, send.power, send.mode, degC, send.fanspeed, send.swingv);
break;
}
#endif // SEND_DAIKIN160
@ -1322,7 +1361,7 @@ bool IRac::sendAc(const stdAc::state_t desired, const stdAc::state_t *prev) {
case DAIKIN176:
{
IRDaikin176 ac(_pin, _inverted, _modulation);
daikin176(&ac, on, send.mode, degC, send.fanspeed, send.swingh);
daikin176(&ac, send.power, send.mode, degC, send.fanspeed, send.swingh);
break;
}
#endif // SEND_DAIKIN176
@ -1330,9 +1369,9 @@ bool IRac::sendAc(const stdAc::state_t desired, const stdAc::state_t *prev) {
case DAIKIN2:
{
IRDaikin2 ac(_pin, _inverted, _modulation);
daikin2(&ac, on, send.mode, degC, send.fanspeed, send.swingv, send.swingh,
send.quiet, send.turbo, send.light, send.econo, send.filter,
send.clean, send.beep, send.sleep, send.clock);
daikin2(&ac, send.power, send.mode, degC, send.fanspeed, send.swingv,
send.swingh, send.quiet, send.turbo, send.light, send.econo,
send.filter, send.clean, send.beep, send.sleep, send.clock);
break;
}
#endif // SEND_DAIKIN2
@ -1340,7 +1379,7 @@ bool IRac::sendAc(const stdAc::state_t desired, const stdAc::state_t *prev) {
case DAIKIN216:
{
IRDaikin216 ac(_pin, _inverted, _modulation);
daikin216(&ac, on, send.mode, degC, send.fanspeed, send.swingv,
daikin216(&ac, send.power, send.mode, degC, send.fanspeed, send.swingv,
send.swingh, send.quiet, send.turbo);
break;
}
@ -1349,7 +1388,7 @@ bool IRac::sendAc(const stdAc::state_t desired, const stdAc::state_t *prev) {
case ELECTRA_AC:
{
IRElectraAc ac(_pin, _inverted, _modulation);
electra(&ac, on, send.mode, degC, send.fanspeed, send.swingv,
electra(&ac, send.power, send.mode, degC, send.fanspeed, send.swingv,
send.swingh);
break;
}
@ -1359,9 +1398,9 @@ bool IRac::sendAc(const stdAc::state_t desired, const stdAc::state_t *prev) {
{
IRFujitsuAC ac(_pin, (fujitsu_ac_remote_model_t)send.model, _inverted,
_modulation);
fujitsu(&ac, (fujitsu_ac_remote_model_t)send.model, on, send.mode, degC,
send.fanspeed, send.swingv, send.swingh, send.quiet, send.turbo,
send.econo, send.filter, send.clean);
fujitsu(&ac, (fujitsu_ac_remote_model_t)send.model, send.power, send.mode,
degC, send.fanspeed, send.swingv, send.swingh, send.quiet,
send.turbo, send.econo, send.filter, send.clean);
break;
}
#endif // SEND_FUJITSU_AC
@ -1369,7 +1408,7 @@ bool IRac::sendAc(const stdAc::state_t desired, const stdAc::state_t *prev) {
case GOODWEATHER:
{
IRGoodweatherAc ac(_pin, _inverted, _modulation);
goodweather(&ac, on, send.mode, degC, send.fanspeed, send.swingv,
goodweather(&ac, send.power, send.mode, degC, send.fanspeed, send.swingv,
send.turbo, send.light, send.sleep);
break;
}
@ -1379,7 +1418,7 @@ bool IRac::sendAc(const stdAc::state_t desired, const stdAc::state_t *prev) {
{
IRGreeAC ac(_pin, (gree_ac_remote_model_t)send.model, _inverted,
_modulation);
gree(&ac, (gree_ac_remote_model_t)send.model, on, send.mode, degC,
gree(&ac, (gree_ac_remote_model_t)send.model, send.power, send.mode, degC,
send.fanspeed, send.swingv, send.turbo, send.light, send.clean,
send.sleep);
break;
@ -1389,8 +1428,8 @@ bool IRac::sendAc(const stdAc::state_t desired, const stdAc::state_t *prev) {
case HAIER_AC:
{
IRHaierAC ac(_pin, _inverted, _modulation);
haier(&ac, on, send.mode, degC, send.fanspeed, send.swingv, send.filter,
send.sleep, send.clock);
haier(&ac, send.power, send.mode, degC, send.fanspeed, send.swingv,
send.filter, send.sleep, send.clock);
break;
}
#endif // SEND_HAIER_AC
@ -1398,7 +1437,7 @@ bool IRac::sendAc(const stdAc::state_t desired, const stdAc::state_t *prev) {
case HAIER_AC_YRW02:
{
IRHaierACYRW02 ac(_pin, _inverted, _modulation);
haierYrwo2(&ac, on, send.mode, degC, send.fanspeed, send.swingv,
haierYrwo2(&ac, send.power, send.mode, degC, send.fanspeed, send.swingv,
send.turbo, send.filter, send.sleep);
break;
}
@ -1407,7 +1446,7 @@ bool IRac::sendAc(const stdAc::state_t desired, const stdAc::state_t *prev) {
case HITACHI_AC:
{
IRHitachiAc ac(_pin, _inverted, _modulation);
hitachi(&ac, on, send.mode, degC, send.fanspeed, send.swingv,
hitachi(&ac, send.power, send.mode, degC, send.fanspeed, send.swingv,
send.swingh);
break;
}
@ -1416,7 +1455,7 @@ bool IRac::sendAc(const stdAc::state_t desired, const stdAc::state_t *prev) {
case HITACHI_AC424:
{
IRHitachiAc424 ac(_pin, _inverted, _modulation);
hitachi424(&ac, on, send.mode, degC, send.fanspeed, send.swingv);
hitachi424(&ac, send.power, send.mode, degC, send.fanspeed, send.swingv);
break;
}
#endif // SEND_HITACHI_AC424
@ -1424,18 +1463,28 @@ bool IRac::sendAc(const stdAc::state_t desired, const stdAc::state_t *prev) {
case KELVINATOR:
{
IRKelvinatorAC ac(_pin, _inverted, _modulation);
kelvinator(&ac, on, send.mode, degC, send.fanspeed, send.swingv,
kelvinator(&ac, send.power, send.mode, degC, send.fanspeed, send.swingv,
send.swingh, send.quiet, send.turbo, send.light, send.filter,
send.clean);
break;
}
#endif // SEND_KELVINATOR
#if SEND_LG
case LG:
case LG2:
{
IRLgAc ac(_pin, _inverted, _modulation);
lg(&ac, (lg_ac_remote_model_t)send.model, send.power, send.mode,
send.degrees, send.fanspeed);
break;
}
#endif // SEND_LG
#if SEND_MIDEA
case MIDEA:
{
IRMideaAC ac(_pin, _inverted, _modulation);
midea(&ac, on, send.mode, send.celsius, send.degrees, send.fanspeed,
send.swingv, send.sleep);
midea(&ac, send.power, send.mode, send.celsius, send.degrees,
send.fanspeed, send.swingv, send.sleep);
break;
}
#endif // SEND_MIDEA
@ -1443,7 +1492,7 @@ bool IRac::sendAc(const stdAc::state_t desired, const stdAc::state_t *prev) {
case MITSUBISHI_AC:
{
IRMitsubishiAC ac(_pin, _inverted, _modulation);
mitsubishi(&ac, on, send.mode, degC, send.fanspeed, send.swingv,
mitsubishi(&ac, send.power, send.mode, degC, send.fanspeed, send.swingv,
send.swingh, send.quiet, send.clock);
break;
}
@ -1452,8 +1501,8 @@ bool IRac::sendAc(const stdAc::state_t desired, const stdAc::state_t *prev) {
case MITSUBISHI112:
{
IRMitsubishi112 ac(_pin, _inverted, _modulation);
mitsubishi112(&ac, on, send.mode, degC, send.fanspeed, send.swingv,
send.swingh, send.quiet);
mitsubishi112(&ac, send.power, send.mode, degC, send.fanspeed,
send.swingv, send.swingh, send.quiet);
break;
}
#endif // SEND_MITSUBISHI112
@ -1461,8 +1510,8 @@ bool IRac::sendAc(const stdAc::state_t desired, const stdAc::state_t *prev) {
case MITSUBISHI136:
{
IRMitsubishi136 ac(_pin, _inverted, _modulation);
mitsubishi136(&ac, on, send.mode, degC, send.fanspeed, send.swingv,
send.quiet);
mitsubishi136(&ac, send.power, send.mode, degC, send.fanspeed,
send.swingv, send.quiet);
break;
}
#endif // SEND_MITSUBISHI136
@ -1470,16 +1519,17 @@ bool IRac::sendAc(const stdAc::state_t desired, const stdAc::state_t *prev) {
case MITSUBISHI_HEAVY_88:
{
IRMitsubishiHeavy88Ac ac(_pin, _inverted, _modulation);
mitsubishiHeavy88(&ac, on, send.mode, degC, send.fanspeed, send.swingv,
send.swingh, send.turbo, send.econo, send.clean);
mitsubishiHeavy88(&ac, send.power, send.mode, degC, send.fanspeed,
send.swingv, send.swingh, send.turbo, send.econo,
send.clean);
break;
}
case MITSUBISHI_HEAVY_152:
{
IRMitsubishiHeavy152Ac ac(_pin, _inverted, _modulation);
mitsubishiHeavy152(&ac, on, send.mode, degC, send.fanspeed, send.swingv,
send.swingh, send.quiet, send.turbo, send.econo,
send.filter, send.clean, send.sleep);
mitsubishiHeavy152(&ac, send.power, send.mode, degC, send.fanspeed,
send.swingv, send.swingh, send.quiet, send.turbo,
send.econo, send.filter, send.clean, send.sleep);
break;
}
#endif // SEND_MITSUBISHIHEAVY
@ -1487,7 +1537,7 @@ bool IRac::sendAc(const stdAc::state_t desired, const stdAc::state_t *prev) {
case NEOCLIMA:
{
IRNeoclimaAc ac(_pin, _inverted, _modulation);
neoclima(&ac, on, send.mode, degC, send.fanspeed, send.swingv,
neoclima(&ac, send.power, send.mode, degC, send.fanspeed, send.swingv,
send.swingh, send.turbo, send.light, send.filter, send.sleep);
break;
}
@ -1496,9 +1546,9 @@ bool IRac::sendAc(const stdAc::state_t desired, const stdAc::state_t *prev) {
case PANASONIC_AC:
{
IRPanasonicAc ac(_pin, _inverted, _modulation);
panasonic(&ac, (panasonic_ac_remote_model_t)send.model, on, send.mode,
degC, send.fanspeed, send.swingv, send.swingh, send.quiet,
send.turbo, send.clock);
panasonic(&ac, (panasonic_ac_remote_model_t)send.model, send.power,
send.mode, degC, send.fanspeed, send.swingv, send.swingh,
send.quiet, send.turbo, send.clock);
break;
}
#endif // SEND_PANASONIC_AC
@ -1506,8 +1556,8 @@ bool IRac::sendAc(const stdAc::state_t desired, const stdAc::state_t *prev) {
case SAMSUNG_AC:
{
IRSamsungAc ac(_pin, _inverted, _modulation);
samsung(&ac, on, send.mode, degC, send.fanspeed, send.swingv, send.quiet,
send.turbo, send.clean, send.beep, prev->power);
samsung(&ac, send.power, send.mode, degC, send.fanspeed, send.swingv,
send.quiet, send.turbo, send.clean, send.beep, prev->power);
break;
}
#endif // SEND_SAMSUNG_AC
@ -1515,7 +1565,7 @@ bool IRac::sendAc(const stdAc::state_t desired, const stdAc::state_t *prev) {
case SHARP_AC:
{
IRSharpAc ac(_pin, _inverted, _modulation);
sharp(&ac, on, send.mode, degC, send.fanspeed);
sharp(&ac, send.power, send.mode, degC, send.fanspeed);
break;
}
#endif // SEND_SHARP_AC
@ -1523,8 +1573,8 @@ bool IRac::sendAc(const stdAc::state_t desired, const stdAc::state_t *prev) {
case TCL112AC:
{
IRTcl112Ac ac(_pin, _inverted, _modulation);
tcl112(&ac, on, send.mode, degC, send.fanspeed, send.swingv, send.swingh,
send.turbo, send.light, send.econo, send.filter);
tcl112(&ac, send.power, send.mode, degC, send.fanspeed, send.swingv,
send.swingh, send.turbo, send.light, send.econo, send.filter);
break;
}
#endif // SEND_TCL112AC
@ -1532,8 +1582,8 @@ bool IRac::sendAc(const stdAc::state_t desired, const stdAc::state_t *prev) {
case TECO:
{
IRTecoAc ac(_pin, _inverted, _modulation);
teco(&ac, on, send.mode, degC, send.fanspeed, send.swingv, send.light,
send.sleep);
teco(&ac, send.power, send.mode, degC, send.fanspeed, send.swingv,
send.light, send.sleep);
break;
}
#endif // SEND_TECO
@ -1541,7 +1591,7 @@ bool IRac::sendAc(const stdAc::state_t desired, const stdAc::state_t *prev) {
case TOSHIBA_AC:
{
IRToshibaAC ac(_pin, _inverted, _modulation);
toshiba(&ac, on, send.mode, degC, send.fanspeed);
toshiba(&ac, send.power, send.mode, degC, send.fanspeed);
break;
}
#endif // SEND_TOSHIBA_AC
@ -1549,7 +1599,7 @@ bool IRac::sendAc(const stdAc::state_t desired, const stdAc::state_t *prev) {
case TROTEC:
{
IRTrotecESP ac(_pin, _inverted, _modulation);
trotec(&ac, on, send.mode, degC, send.fanspeed, send.sleep);
trotec(&ac, send.power, send.mode, degC, send.fanspeed, send.sleep);
break;
}
#endif // SEND_TROTEC
@ -1557,8 +1607,8 @@ bool IRac::sendAc(const stdAc::state_t desired, const stdAc::state_t *prev) {
case VESTEL_AC:
{
IRVestelAc ac(_pin, _inverted, _modulation);
vestel(&ac, on, send.mode, degC, send.fanspeed, send.swingv, send.turbo,
send.filter, send.sleep, send.clock);
vestel(&ac, send.power, send.mode, degC, send.fanspeed, send.swingv,
send.turbo, send.filter, send.sleep, send.clock);
break;
}
#endif // SEND_VESTEL_AC
@ -1566,9 +1616,9 @@ bool IRac::sendAc(const stdAc::state_t desired, const stdAc::state_t *prev) {
case WHIRLPOOL_AC:
{
IRWhirlpoolAc ac(_pin, _inverted, _modulation);
whirlpool(&ac, (whirlpool_ac_remote_model_t)send.model, on, send.mode,
degC, send.fanspeed, send.swingv, send.turbo, send.light,
send.sleep, send.clock);
whirlpool(&ac, (whirlpool_ac_remote_model_t)send.model, send.power,
send.mode, degC, send.fanspeed, send.swingv, send.turbo,
send.light, send.sleep, send.clock);
break;
}
#endif // SEND_WHIRLPOOL_AC
@ -1750,7 +1800,8 @@ int16_t IRac::strToModel(const char *str, const int16_t def) {
return panasonic_ac_remote_model_t::kPanasonicLke;
} else if (!strcasecmp(str, "NKE") || !strcasecmp(str, "PANASONICNKE")) {
return panasonic_ac_remote_model_t::kPanasonicNke;
} else if (!strcasecmp(str, "DKE") || !strcasecmp(str, "PANASONICDKE")) {
} else if (!strcasecmp(str, "DKE") || !strcasecmp(str, "PANASONICDKE") ||
!strcasecmp(str, "PKR") || !strcasecmp(str, "PANASONICPKR")) {
return panasonic_ac_remote_model_t::kPanasonicDke;
} else if (!strcasecmp(str, "JKE") || !strcasecmp(str, "PANASONICJKE")) {
return panasonic_ac_remote_model_t::kPanasonicJke;
@ -2129,6 +2180,21 @@ namespace IRAcUtils {
return ac.toString();
}
#endif // DECODE_TCL112AC
#if DECODE_LG
case decode_type_t::LG:
case decode_type_t::LG2: {
IRLgAc ac(0);
ac.setRaw(result->value); // Like Coolix, use value instead of state.
switch (result->decode_type) {
case decode_type_t::LG2:
ac.setModel(lg_ac_remote_model_t::AKB75215403);
break;
default:
ac.setModel(lg_ac_remote_model_t::GE6711AR2853M);
}
return ac.isValidLgAc() ? ac.toString() : "";
}
#endif // DECODE_LG
default:
return "";
}
@ -2166,6 +2232,7 @@ namespace IRAcUtils {
#if DECODE_COOLIX
case decode_type_t::COOLIX: {
IRCoolixAC ac(kGpioUnused);
ac.on();
ac.setRaw(decode->value); // Uses value instead of state.
*result = ac.toCommon(prev);
break;
@ -2299,6 +2366,23 @@ namespace IRAcUtils {
break;
}
#endif // DECODE_KELVINATOR
#if DECODE_LG
case decode_type_t::LG:
case decode_type_t::LG2: {
IRLgAc ac(kGpioUnused);
ac.setRaw(decode->value); // Uses value instead of state.
if (!ac.isValidLgAc()) return false;
switch (decode->decode_type) {
case decode_type_t::LG2:
ac.setModel(lg_ac_remote_model_t::AKB75215403);
break;
default:
ac.setModel(lg_ac_remote_model_t::GE6711AR2853M);
}
*result = ac.toCommon();
break;
}
#endif // DECODE_LG
#if DECODE_MIDEA
case decode_type_t::MIDEA: {
IRMideaAC ac(kGpioUnused);

View File

@ -18,6 +18,7 @@
#include "ir_Haier.h"
#include "ir_Hitachi.h"
#include "ir_Kelvinator.h"
#include "ir_LG.h"
#include "ir_Midea.h"
#include "ir_Mitsubishi.h"
#include "ir_MitsubishiHeavy.h"
@ -136,16 +137,16 @@ class IRac {
const bool quiet, const bool turbo, const bool econo);
#endif // SEND_DAIKIN152
#if SEND_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);
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);
#endif // SEND_DAIKIN160
#if SEND_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);
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);
#endif // SEND_DAIKIN176
#if SEND_DAIKIN2
void daikin2(IRDaikin2 *ac,
@ -230,6 +231,11 @@ void electra(IRElectraAc *ac,
const bool quiet, const bool turbo, const bool light,
const bool filter, const bool clean);
#endif // SEND_KELVINATOR
#if SEND_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);
#endif // SEND_LG
#if SEND_MIDEA
void midea(IRMideaAC *ac,
const bool on, const stdAc::opmode_t mode, const bool celsius,
@ -286,7 +292,8 @@ 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 quiet, const bool turbo, const int16_t clock = -1);
const bool quiet, const bool turbo, const bool filter,
const int16_t clock = -1);
#endif // SEND_PANASONIC_AC
#if SEND_SAMSUNG_AC
void samsung(IRSamsungAc *ac,
@ -340,6 +347,7 @@ void electra(IRElectraAc *ac,
const bool turbo, const bool light,
const int16_t sleep = -1, const int16_t clock = -1);
#endif // SEND_WHIRLPOOL_AC
static stdAc::state_t cleanState(const stdAc::state_t state);
static stdAc::state_t handleToggles(const stdAc::state_t desired,
const stdAc::state_t *prev = NULL);
}; // IRac class

View File

@ -1,4 +1,4 @@
/***************************************************
/***************************************************
* IRremote for ESP8266
*
* Based on the IRremote library for Arduino by Ken Shirriff
@ -52,428 +52,518 @@
#endif // UNIT_TEST
// Library Version
#define _IRREMOTEESP8266_VERSION_ "2.7.1"
#define _IRREMOTEESP8266_VERSION_ "2.7.3"
// Set the language & locale for the library. See the `locale` dir for options.
#ifndef _IR_LOCALE_
#define _IR_LOCALE_ en-AU
#endif // _IR_LOCALE_
// Do we enable all the protocols by default (true), or disable them (false)?
// This allows users of the library to disable or enable all protocols at
// compile-time with `-D_IR_ENABLE_DEFAULT_=true` or
// `-D_IR_ENABLE_DEFAULT_=false` compiler flags respectively.
// Everything is included by default.
// e.g. If you only want to enable use of he NEC protocol to save program space,
// you would use something like:
// `-D_IR_ENABLE_DEFAULT_=false -DDECODE_NEC=true -DSEND_NEC=true`
//
// or alter your 'platform.ini' file accordingly:
// ```
// build_flags = -D_IR_ENABLE_DEFAULT_=false
// -DDECODE_NEC=true
// -DSEND_NEC=true
// ```
// If you want to enable support for every protocol *except* _decoding_ the
// Kelvinator protocol, you would use:
// `-DDECODE_KELVINATOR=false`
#ifndef _IR_ENABLE_DEFAULT_
#define _IR_ENABLE_DEFAULT_ true // Unless set externally, the default is on.
#endif // _IR_ENABLE_DEFAULT_
// Supported IR protocols
// Each protocol you include costs memory and, during decode, costs time
// Disable (set to false) all the protocols you do not need/want!
// The Air Conditioner protocols are the most expensive memory-wise.
//
#ifdef USE_IR_REMOTE_FULL // full IR protocols
#define DECODE_HASH true // Semi-unique code for unknown messages
#define SEND_RAW true
#define DECODE_NEC true
#define SEND_NEC true
#define DECODE_SHERWOOD true // Doesn't exist. Actually is DECODE_NEC
#define SEND_SHERWOOD true
#define DECODE_RC5 true
#define SEND_RC5 true
#define DECODE_RC6 true
#define SEND_RC6 true
#define DECODE_RCMM true
#define SEND_RCMM true
#define DECODE_SONY true
#define SEND_SONY true
#define DECODE_PANASONIC true
#define SEND_PANASONIC true
#define DECODE_JVC true
#define SEND_JVC true
#define DECODE_SAMSUNG true
#define SEND_SAMSUNG true
#define DECODE_SAMSUNG36 true
#define SEND_SAMSUNG36 true
#define DECODE_SAMSUNG_AC true
#define SEND_SAMSUNG_AC true
#define DECODE_WHYNTER true
#define SEND_WHYNTER true
#define DECODE_AIWA_RC_T501 true
#define SEND_AIWA_RC_T501 true
#define DECODE_LG true
#define SEND_LG true
#define DECODE_SANYO true
#define SEND_SANYO true
#define DECODE_MITSUBISHI true
#define SEND_MITSUBISHI true
#define DECODE_MITSUBISHI2 true
#define SEND_MITSUBISHI2 true
#define DECODE_DISH true
#define SEND_DISH true
#define DECODE_SHARP true
#define SEND_SHARP true
#define DECODE_SHARP_AC true
#define SEND_SHARP_AC true
#define DECODE_DENON true
#define SEND_DENON true
#define DECODE_KELVINATOR true
#define SEND_KELVINATOR true
#define DECODE_MITSUBISHI_AC true // Beta.
#define SEND_MITSUBISHI_AC true
#define DECODE_MITSUBISHI136 true
#define SEND_MITSUBISHI136 true
#define DECODE_MITSUBISHI112 true
#define SEND_MITSUBISHI112 true
#define DECODE_FUJITSU_AC true
#define SEND_FUJITSU_AC true
#define DECODE_INAX true
#define SEND_INAX true
#define DECODE_DAIKIN true
#define SEND_DAIKIN true
#define DECODE_COOLIX true
#define SEND_COOLIX true
#define DECODE_GLOBALCACHE false // Not written.
#define SEND_GLOBALCACHE true
#define DECODE_GOODWEATHER true
#define SEND_GOODWEATHER true
#define DECODE_GREE true
#define SEND_GREE true
#define DECODE_PRONTO false // Not written.
#define SEND_PRONTO true
#define DECODE_ARGO true // Experimental
#define SEND_ARGO true
#define DECODE_TROTEC true
#define SEND_TROTEC true
#define DECODE_NIKAI true
#define SEND_NIKAI true
#define DECODE_TOSHIBA_AC true
#define SEND_TOSHIBA_AC true
#define DECODE_MAGIQUEST true
#define SEND_MAGIQUEST true
#define DECODE_MIDEA true
#define SEND_MIDEA true
#define DECODE_LASERTAG true
#define SEND_LASERTAG true
#define DECODE_CARRIER_AC true
#define SEND_CARRIER_AC true
#define DECODE_HAIER_AC true
#define SEND_HAIER_AC true
#define DECODE_HITACHI_AC true
#define SEND_HITACHI_AC true
#define DECODE_HITACHI_AC1 true
#define SEND_HITACHI_AC1 true
#define DECODE_HITACHI_AC2 true
#define SEND_HITACHI_AC2 true
#define DECODE_GICABLE true
#define SEND_GICABLE true
#define DECODE_HAIER_AC_YRW02 true
#define SEND_HAIER_AC_YRW02 true
#define DECODE_WHIRLPOOL_AC true
#define SEND_WHIRLPOOL_AC true
#define DECODE_LUTRON true
#define SEND_LUTRON true
#define DECODE_ELECTRA_AC true
#define SEND_ELECTRA_AC true
#define DECODE_PANASONIC_AC true
#define SEND_PANASONIC_AC true
#define DECODE_MWM true
#define SEND_MWM true
#define DECODE_PIONEER true
#define SEND_PIONEER true
#define DECODE_DAIKIN2 true
#define SEND_DAIKIN2 true
#define DECODE_VESTEL_AC true
#define SEND_VESTEL_AC true
#define DECODE_TECO true
#define SEND_TECO true
#define DECODE_TCL112AC true
#define SEND_TCL112AC true
#define DECODE_LEGOPF true
#define SEND_LEGOPF true
#define DECODE_MITSUBISHIHEAVY true
#define SEND_MITSUBISHIHEAVY true
#define DECODE_DAIKIN216 true
#define SEND_DAIKIN216 true
#define DECODE_DAIKIN160 true
#define SEND_DAIKIN160 true
#define DECODE_NEOCLIMA true
#define SEND_NEOCLIMA true
#define DECODE_DAIKIN176 true
#define SEND_DAIKIN176 true
#define DECODE_DAIKIN128 true
#define SEND_DAIKIN128 true
#define DECODE_AMCOR true
#define SEND_AMCOR true
#define DECODE_DAIKIN152 true
#define SEND_DAIKIN152 true
#define DECODE_HITACHI_AC424 true
#define SEND_HITACHI_AC424 true
#else // defined(FIRMWARE_IR) || defined(FIRMWARE_IR_CUSTOM) // full IR protocols
// Tasmota supported protocols (less protocols is less code size)
#define DECODE_HASH true // Semi-unique code for unknown messages
#define SEND_RAW false
#define DECODE_NEC true
#define SEND_NEC true
#define DECODE_SHERWOOD false // Doesn't exist. Actually is DECODE_NEC
#define SEND_SHERWOOD false
#define DECODE_RC5 true
#define SEND_RC5 true
#define DECODE_RC6 true
#define SEND_RC6 true
#define DECODE_RCMM false
#define SEND_RCMM false
#define DECODE_SONY false
#define SEND_SONY false
#define DECODE_PANASONIC false
#define SEND_PANASONIC false
#define DECODE_JVC false
#define SEND_JVC false
#define DECODE_SAMSUNG false
#define SEND_SAMSUNG false
#define DECODE_SAMSUNG36 false
#define SEND_SAMSUNG36 false
#define DECODE_SAMSUNG_AC false
#define SEND_SAMSUNG_AC false
#define DECODE_WHYNTER false
#define SEND_WHYNTER false
#define DECODE_AIWA_RC_T501 false
#define SEND_AIWA_RC_T501 false
#define DECODE_LG false
#define SEND_LG false
#define DECODE_SANYO false
#define SEND_SANYO false
#define DECODE_MITSUBISHI false
#define SEND_MITSUBISHI false
#define DECODE_MITSUBISHI2 false
#define SEND_MITSUBISHI2 false
#define DECODE_DISH false
#define SEND_DISH false
#define DECODE_SHARP false
#define SEND_SHARP false
#define DECODE_SHARP_AC false
#define SEND_SHARP_AC false
#define DECODE_DENON false
#define SEND_DENON false
#define DECODE_KELVINATOR false
#define SEND_KELVINATOR false
#define DECODE_MITSUBISHI_AC false // Beta.
#define SEND_MITSUBISHI_AC false
#define DECODE_FUJITSU_AC false
#define SEND_FUJITSU_AC false
#define DECODE_INAX false
#define SEND_INAX false
#define DECODE_DAIKIN false
#define SEND_DAIKIN false
#define DECODE_COOLIX false
#define SEND_COOLIX false
#define DECODE_GLOBALCACHE false // Not written.
#define SEND_GLOBALCACHE false
#define DECODE_GOODWEATHER false
#define SEND_GOODWEATHER false
#define DECODE_GREE false
#define SEND_GREE false
#define DECODE_PRONTO false // Not written.
#define SEND_PRONTO false
#define DECODE_ARGO false // Experimental
#define SEND_ARGO false
#define DECODE_TROTEC false
#define SEND_TROTEC false
#define DECODE_NIKAI false
#define SEND_NIKAI false
#define DECODE_TOSHIBA_AC false
#define SEND_TOSHIBA_AC false
#define DECODE_MAGIQUEST false
#define SEND_MAGIQUEST false
#define DECODE_MIDEA false
#define SEND_MIDEA false
#define DECODE_LASERTAG false
#define SEND_LASERTAG false
#define DECODE_CARRIER_AC false
#define SEND_CARRIER_AC false
#define DECODE_HAIER_AC false
#define SEND_HAIER_AC false
#define DECODE_HITACHI_AC false
#define SEND_HITACHI_AC false
#define DECODE_HITACHI_AC1 false
#define SEND_HITACHI_AC1 false
#define DECODE_HITACHI_AC2 false
#define SEND_HITACHI_AC2 false
#define DECODE_GICABLE false
#define SEND_GICABLE false
#define DECODE_HAIER_AC_YRW02 false
#define SEND_HAIER_AC_YRW02 false
#define DECODE_WHIRLPOOL_AC false
#define SEND_WHIRLPOOL_AC false
#define DECODE_LUTRON false
#define SEND_LUTRON false
#define DECODE_ELECTRA_AC false
#define SEND_ELECTRA_AC false
#define DECODE_PANASONIC_AC false
#define SEND_PANASONIC_AC false
#define DECODE_MWM false
#define SEND_MWM false
#define DECODE_PIONEER false
#define SEND_PIONEER false
#define DECODE_DAIKIN2 false
#define SEND_DAIKIN2 false
#define DECODE_VESTEL_AC false
#define SEND_VESTEL_AC false
#define DECODE_TECO false
#define SEND_TECO false
#define DECODE_TCL112AC false
#define SEND_TCL112AC false
#define DECODE_LEGOPF false
#define SEND_LEGOPF false
#define DECODE_MITSUBISHIHEAVY false
#define SEND_MITSUBISHIHEAVY false
#define DECODE_DAIKIN216 false
#define SEND_DAIKIN216 false
#define DECODE_DAIKIN160 false
#define SEND_DAIKIN160 false
#define DECODE_NEOCLIMA false
#define SEND_NEOCLIMA false
#define DECODE_DAIKIN176 false
#define SEND_DAIKIN176 false
#define DECODE_DAIKIN128 false
#define SEND_DAIKIN128 false
#define DECODE_AMCOR false
#define SEND_AMCOR false
#define DECODE_DAIKIN152 false
#define SEND_DAIKIN152 false
#define DECODE_HITACHI_AC424 false
#define SEND_HITACHI_AC424 false
#endif // defined(FIRMWARE_IR) || defined(FIRMWARE_IR_CUSTOM) // full IR protocols
// Semi-unique code for unknown messages
#ifndef DECODE_HASH
#define DECODE_HASH _IR_ENABLE_DEFAULT_
#endif // DECODE_HASH
#ifndef SEND_RAW
#define SEND_RAW _IR_ENABLE_DEFAULT_
#endif // SEND_RAW
#ifndef DECODE_NEC
#define DECODE_NEC _IR_ENABLE_DEFAULT_
#endif // DECODE_NEC
#ifndef SEND_NEC
#define SEND_NEC _IR_ENABLE_DEFAULT_
#endif // SEND_NEC
#ifndef DECODE_SHERWOOD
#define DECODE_SHERWOOD false // Not applicable. Actually is DECODE_NEC
#endif // DECODE_SHERWOOD
#ifndef SEND_SHERWOOD
#define SEND_SHERWOOD _IR_ENABLE_DEFAULT_
#endif // SEND_SHERWOOD
#ifndef DECODE_RC5
#define DECODE_RC5 _IR_ENABLE_DEFAULT_
#endif // DECODE_RC5
#ifndef SEND_RC5
#define SEND_RC5 _IR_ENABLE_DEFAULT_
#endif // SEND_RC5
#ifndef DECODE_RC6
#define DECODE_RC6 _IR_ENABLE_DEFAULT_
#endif // DECODE_RC6
#ifndef SEND_RC6
#define SEND_RC6 _IR_ENABLE_DEFAULT_
#endif // SEND_RC6
#ifndef DECODE_RCMM
#define DECODE_RCMM _IR_ENABLE_DEFAULT_
#endif // DECODE_RCMM
#ifndef SEND_RCMM
#define SEND_RCMM _IR_ENABLE_DEFAULT_
#endif // SEND_RCMM
#ifndef DECODE_SONY
#define DECODE_SONY _IR_ENABLE_DEFAULT_
#endif // DECODE_SONY
#ifndef SEND_SONY
#define SEND_SONY _IR_ENABLE_DEFAULT_
#endif // SEND_SONY
#ifndef DECODE_PANASONIC
#define DECODE_PANASONIC _IR_ENABLE_DEFAULT_
#endif // DECODE_PANASONIC
#ifndef SEND_PANASONIC
#define SEND_PANASONIC _IR_ENABLE_DEFAULT_
#endif // SEND_PANASONIC
#ifndef DECODE_JVC
#define DECODE_JVC _IR_ENABLE_DEFAULT_
#endif // DECODE_JVC
#ifndef SEND_JVC
#define SEND_JVC _IR_ENABLE_DEFAULT_
#endif // SEND_JVC
#ifndef DECODE_SAMSUNG
#define DECODE_SAMSUNG _IR_ENABLE_DEFAULT_
#endif // DECODE_SAMSUNG
#ifndef SEND_SAMSUNG
#define SEND_SAMSUNG _IR_ENABLE_DEFAULT_
#endif // SEND_SAMSUNG
#ifndef DECODE_SAMSUNG36
#define DECODE_SAMSUNG36 _IR_ENABLE_DEFAULT_
#endif // DECODE_SAMSUNG36
#ifndef SEND_SAMSUNG36
#define SEND_SAMSUNG36 _IR_ENABLE_DEFAULT_
#endif // SEND_SAMSUNG36
#ifndef DECODE_SAMSUNG_AC
#define DECODE_SAMSUNG_AC _IR_ENABLE_DEFAULT_
#endif // DECODE_SAMSUNG_AC
#ifndef SEND_SAMSUNG_AC
#define SEND_SAMSUNG_AC _IR_ENABLE_DEFAULT_
#endif // SEND_SAMSUNG_AC
#ifndef DECODE_WHYNTER
#define DECODE_WHYNTER _IR_ENABLE_DEFAULT_
#endif // DECODE_WHYNTER
#ifndef SEND_WHYNTER
#define SEND_WHYNTER _IR_ENABLE_DEFAULT_
#endif // SEND_WHYNTER
#ifndef DECODE_AIWA_RC_T501
#define DECODE_AIWA_RC_T501 _IR_ENABLE_DEFAULT_
#endif // DECODE_AIWA_RC_T501
#ifndef SEND_AIWA_RC_T501
#define SEND_AIWA_RC_T501 _IR_ENABLE_DEFAULT_
#endif // SEND_AIWA_RC_T501
#ifndef DECODE_LG
#define DECODE_LG _IR_ENABLE_DEFAULT_
#endif // DECODE_LG
#ifndef SEND_LG
#define SEND_LG _IR_ENABLE_DEFAULT_
#endif // SEND_LG
#ifndef DECODE_SANYO
#define DECODE_SANYO _IR_ENABLE_DEFAULT_
#endif // DECODE_SANYO
#ifndef SEND_SANYO
#define SEND_SANYO _IR_ENABLE_DEFAULT_
#endif // SEND_SANYO
#ifndef DECODE_MITSUBISHI
#define DECODE_MITSUBISHI _IR_ENABLE_DEFAULT_
#endif // DECODE_MITSUBISHI
#ifndef SEND_MITSUBISHI
#define SEND_MITSUBISHI _IR_ENABLE_DEFAULT_
#endif // SEND_MITSUBISHI
#ifndef DECODE_MITSUBISHI2
#define DECODE_MITSUBISHI2 _IR_ENABLE_DEFAULT_
#endif // DECODE_MITSUBISHI2
#ifndef SEND_MITSUBISHI2
#define SEND_MITSUBISHI2 _IR_ENABLE_DEFAULT_
#endif // SEND_MITSUBISHI2
#ifndef DECODE_DISH
#define DECODE_DISH _IR_ENABLE_DEFAULT_
#endif // DECODE_DISH
#ifndef SEND_DISH
#define SEND_DISH _IR_ENABLE_DEFAULT_
#endif // SEND_DISH
#ifndef DECODE_SHARP
#define DECODE_SHARP _IR_ENABLE_DEFAULT_
#endif // DECODE_SHARP
#ifndef SEND_SHARP
#define SEND_SHARP _IR_ENABLE_DEFAULT_
#endif // SEND_SHARP
#ifndef DECODE_SHARP_AC
#define DECODE_SHARP_AC _IR_ENABLE_DEFAULT_
#endif // DECODE_SHARP_AC
#ifndef SEND_SHARP_AC
#define SEND_SHARP_AC _IR_ENABLE_DEFAULT_
#endif // SEND_SHARP_AC
#ifndef DECODE_DENON
#define DECODE_DENON _IR_ENABLE_DEFAULT_
#endif // DECODE_DENON
#ifndef SEND_DENON
#define SEND_DENON _IR_ENABLE_DEFAULT_
#endif // SEND_DENON
#ifndef DECODE_KELVINATOR
#define DECODE_KELVINATOR _IR_ENABLE_DEFAULT_
#endif // DECODE_KELVINATOR
#ifndef SEND_KELVINATOR
#define SEND_KELVINATOR _IR_ENABLE_DEFAULT_
#endif // SEND_KELVINATOR
#ifndef DECODE_MITSUBISHI_AC
#define DECODE_MITSUBISHI_AC _IR_ENABLE_DEFAULT_
#endif // DECODE_MITSUBISHI_AC
#ifndef SEND_MITSUBISHI_AC
#define SEND_MITSUBISHI_AC _IR_ENABLE_DEFAULT_
#endif // SEND_MITSUBISHI_AC
#ifndef DECODE_MITSUBISHI136
#define DECODE_MITSUBISHI136 _IR_ENABLE_DEFAULT_
#endif // DECODE_MITSUBISHI136
#ifndef SEND_MITSUBISHI136
#define SEND_MITSUBISHI136 _IR_ENABLE_DEFAULT_
#endif // SEND_MITSUBISHI136
#ifndef DECODE_MITSUBISHI112
#define DECODE_MITSUBISHI112 _IR_ENABLE_DEFAULT_
#endif // DECODE_MITSUBISHI112
#ifndef SEND_MITSUBISHI112
#define SEND_MITSUBISHI112 _IR_ENABLE_DEFAULT_
#endif // SEND_MITSUBISHI112
#ifndef DECODE_FUJITSU_AC
#define DECODE_FUJITSU_AC _IR_ENABLE_DEFAULT_
#endif // DECODE_FUJITSU_AC
#ifndef SEND_FUJITSU_AC
#define SEND_FUJITSU_AC _IR_ENABLE_DEFAULT_
#endif // SEND_FUJITSU_AC
#ifndef DECODE_INAX
#define DECODE_INAX _IR_ENABLE_DEFAULT_
#endif // DECODE_INAX
#ifndef SEND_INAX
#define SEND_INAX _IR_ENABLE_DEFAULT_
#endif // SEND_INAX
#ifndef DECODE_DAIKIN
#define DECODE_DAIKIN _IR_ENABLE_DEFAULT_
#endif // DECODE_DAIKIN
#ifndef SEND_DAIKIN
#define SEND_DAIKIN _IR_ENABLE_DEFAULT_
#endif // SEND_DAIKIN
#ifndef DECODE_COOLIX
#define DECODE_COOLIX _IR_ENABLE_DEFAULT_
#endif // DECODE_COOLIX
#ifndef SEND_COOLIX
#define SEND_COOLIX _IR_ENABLE_DEFAULT_
#endif // SEND_COOLIX
#ifndef DECODE_GLOBALCACHE
#define DECODE_GLOBALCACHE false // Not applicable.
#endif // DECODE_GLOBALCACHE
#ifndef SEND_GLOBALCACHE
#define SEND_GLOBALCACHE _IR_ENABLE_DEFAULT_
#endif // SEND_GLOBALCACHE
#ifndef DECODE_GOODWEATHER
#define DECODE_GOODWEATHER _IR_ENABLE_DEFAULT_
#endif // DECODE_GOODWEATHER
#ifndef SEND_GOODWEATHER
#define SEND_GOODWEATHER _IR_ENABLE_DEFAULT_
#endif // SEND_GOODWEATHER
#ifndef DECODE_GREE
#define DECODE_GREE _IR_ENABLE_DEFAULT_
#endif // DECODE_GREE
#ifndef SEND_GREE
#define SEND_GREE _IR_ENABLE_DEFAULT_
#endif // SEND_GREE
#ifndef DECODE_PRONTO
#define DECODE_PRONTO false // Not applicable.
#endif // DECODE_PRONTO
#ifndef SEND_PRONTO
#define SEND_PRONTO _IR_ENABLE_DEFAULT_
#endif // SEND_PRONTO
#ifndef DECODE_ARGO
#define DECODE_ARGO _IR_ENABLE_DEFAULT_
#endif // DECODE_ARGO
#ifndef SEND_ARGO
#define SEND_ARGO _IR_ENABLE_DEFAULT_
#endif // SEND_ARGO
#ifndef DECODE_TROTEC
#define DECODE_TROTEC _IR_ENABLE_DEFAULT_
#endif // DECODE_TROTEC
#ifndef SEND_TROTEC
#define SEND_TROTEC _IR_ENABLE_DEFAULT_
#endif // SEND_TROTEC
#ifndef DECODE_NIKAI
#define DECODE_NIKAI _IR_ENABLE_DEFAULT_
#endif // DECODE_NIKAI
#ifndef SEND_NIKAI
#define SEND_NIKAI _IR_ENABLE_DEFAULT_
#endif // SEND_NIKAI
#ifndef DECODE_TOSHIBA_AC
#define DECODE_TOSHIBA_AC _IR_ENABLE_DEFAULT_
#endif // DECODE_TOSHIBA_AC
#ifndef SEND_TOSHIBA_AC
#define SEND_TOSHIBA_AC _IR_ENABLE_DEFAULT_
#endif // SEND_TOSHIBA_AC
#ifndef DECODE_MAGIQUEST
#define DECODE_MAGIQUEST _IR_ENABLE_DEFAULT_
#endif // DECODE_MAGIQUEST
#ifndef SEND_MAGIQUEST
#define SEND_MAGIQUEST _IR_ENABLE_DEFAULT_
#endif // SEND_MAGIQUEST
#ifndef DECODE_MIDEA
#define DECODE_MIDEA _IR_ENABLE_DEFAULT_
#endif // DECODE_MIDEA
#ifndef SEND_MIDEA
#define SEND_MIDEA _IR_ENABLE_DEFAULT_
#endif // SEND_MIDEA
#ifndef DECODE_LASERTAG
#define DECODE_LASERTAG _IR_ENABLE_DEFAULT_
#endif // DECODE_LASERTAG
#ifndef SEND_LASERTAG
#define SEND_LASERTAG _IR_ENABLE_DEFAULT_
#endif // SEND_LASERTAG
#ifndef DECODE_CARRIER_AC
#define DECODE_CARRIER_AC _IR_ENABLE_DEFAULT_
#endif // DECODE_CARRIER_AC
#ifndef SEND_CARRIER_AC
#define SEND_CARRIER_AC _IR_ENABLE_DEFAULT_
#endif // SEND_CARRIER_AC
#ifndef DECODE_HAIER_AC
#define DECODE_HAIER_AC _IR_ENABLE_DEFAULT_
#endif // DECODE_HAIER_AC
#ifndef SEND_HAIER_AC
#define SEND_HAIER_AC _IR_ENABLE_DEFAULT_
#endif // SEND_HAIER_AC
#ifndef DECODE_HITACHI_AC
#define DECODE_HITACHI_AC _IR_ENABLE_DEFAULT_
#endif // DECODE_HITACHI_AC
#ifndef SEND_HITACHI_AC
#define SEND_HITACHI_AC _IR_ENABLE_DEFAULT_
#endif // SEND_HITACHI_AC
#ifndef DECODE_HITACHI_AC1
#define DECODE_HITACHI_AC1 _IR_ENABLE_DEFAULT_
#endif // DECODE_HITACHI_AC1
#ifndef SEND_HITACHI_AC1
#define SEND_HITACHI_AC1 _IR_ENABLE_DEFAULT_
#endif // SEND_HITACHI_AC1
#ifndef DECODE_HITACHI_AC2
#define DECODE_HITACHI_AC2 _IR_ENABLE_DEFAULT_
#endif // DECODE_HITACHI_AC2
#ifndef SEND_HITACHI_AC2
#define SEND_HITACHI_AC2 _IR_ENABLE_DEFAULT_
#endif // SEND_HITACHI_AC2
#ifndef DECODE_GICABLE
#define DECODE_GICABLE _IR_ENABLE_DEFAULT_
#endif // DECODE_GICABLE
#ifndef SEND_GICABLE
#define SEND_GICABLE _IR_ENABLE_DEFAULT_
#endif // SEND_GICABLE
#ifndef DECODE_HAIER_AC_YRW02
#define DECODE_HAIER_AC_YRW02 _IR_ENABLE_DEFAULT_
#endif // DECODE_HAIER_AC_YRW02
#ifndef SEND_HAIER_AC_YRW02
#define SEND_HAIER_AC_YRW02 _IR_ENABLE_DEFAULT_
#endif // SEND_HAIER_AC_YRW02
#ifndef DECODE_WHIRLPOOL_AC
#define DECODE_WHIRLPOOL_AC _IR_ENABLE_DEFAULT_
#endif // DECODE_WHIRLPOOL_AC
#ifndef SEND_WHIRLPOOL_AC
#define SEND_WHIRLPOOL_AC _IR_ENABLE_DEFAULT_
#endif // SEND_WHIRLPOOL_AC
#ifndef DECODE_LUTRON
#define DECODE_LUTRON _IR_ENABLE_DEFAULT_
#endif // DECODE_LUTRON
#ifndef SEND_LUTRON
#define SEND_LUTRON _IR_ENABLE_DEFAULT_
#endif // SEND_LUTRON
#ifndef DECODE_ELECTRA_AC
#define DECODE_ELECTRA_AC _IR_ENABLE_DEFAULT_
#endif // DECODE_ELECTRA_AC
#ifndef SEND_ELECTRA_AC
#define SEND_ELECTRA_AC _IR_ENABLE_DEFAULT_
#endif // SEND_ELECTRA_AC
#ifndef DECODE_PANASONIC_AC
#define DECODE_PANASONIC_AC _IR_ENABLE_DEFAULT_
#endif // DECODE_PANASONIC_AC
#ifndef SEND_PANASONIC_AC
#define SEND_PANASONIC_AC _IR_ENABLE_DEFAULT_
#endif // SEND_PANASONIC_AC
#ifndef DECODE_MWM
#define DECODE_MWM _IR_ENABLE_DEFAULT_
#endif // DECODE_MWM
#ifndef SEND_MWM
#define SEND_MWM _IR_ENABLE_DEFAULT_
#endif // SEND_MWM
#ifndef DECODE_PIONEER
#define DECODE_PIONEER _IR_ENABLE_DEFAULT_
#endif // DECODE_PIONEER
#ifndef SEND_PIONEER
#define SEND_PIONEER _IR_ENABLE_DEFAULT_
#endif // SEND_PIONEER
#ifndef DECODE_DAIKIN2
#define DECODE_DAIKIN2 _IR_ENABLE_DEFAULT_
#endif // DECODE_DAIKIN2
#ifndef SEND_DAIKIN2
#define SEND_DAIKIN2 _IR_ENABLE_DEFAULT_
#endif // SEND_DAIKIN2
#ifndef DECODE_VESTEL_AC
#define DECODE_VESTEL_AC _IR_ENABLE_DEFAULT_
#endif // DECODE_VESTEL_AC
#ifndef SEND_VESTEL_AC
#define SEND_VESTEL_AC _IR_ENABLE_DEFAULT_
#endif // SEND_VESTEL_AC
#ifndef DECODE_TECO
#define DECODE_TECO _IR_ENABLE_DEFAULT_
#endif // DECODE_TECO
#ifndef SEND_TECO
#define SEND_TECO _IR_ENABLE_DEFAULT_
#endif // SEND_TECO
#ifndef DECODE_TCL112AC
#define DECODE_TCL112AC _IR_ENABLE_DEFAULT_
#endif // DECODE_TCL112AC
#ifndef SEND_TCL112AC
#define SEND_TCL112AC _IR_ENABLE_DEFAULT_
#endif // SEND_TCL112AC
#ifndef DECODE_LEGOPF
#define DECODE_LEGOPF _IR_ENABLE_DEFAULT_
#endif // DECODE_LEGOPF
#ifndef SEND_LEGOPF
#define SEND_LEGOPF _IR_ENABLE_DEFAULT_
#endif // SEND_LEGOPF
#ifndef DECODE_MITSUBISHIHEAVY
#define DECODE_MITSUBISHIHEAVY _IR_ENABLE_DEFAULT_
#endif // DECODE_MITSUBISHIHEAVY
#ifndef SEND_MITSUBISHIHEAVY
#define SEND_MITSUBISHIHEAVY _IR_ENABLE_DEFAULT_
#endif // SEND_MITSUBISHIHEAVY
#ifndef DECODE_DAIKIN216
#define DECODE_DAIKIN216 _IR_ENABLE_DEFAULT_
#endif // DECODE_DAIKIN216
#ifndef SEND_DAIKIN216
#define SEND_DAIKIN216 _IR_ENABLE_DEFAULT_
#endif // SEND_DAIKIN216
#ifndef DECODE_DAIKIN160
#define DECODE_DAIKIN160 _IR_ENABLE_DEFAULT_
#endif // DECODE_DAIKIN160
#ifndef SEND_DAIKIN160
#define SEND_DAIKIN160 _IR_ENABLE_DEFAULT_
#endif // SEND_DAIKIN160
#ifndef DECODE_NEOCLIMA
#define DECODE_NEOCLIMA _IR_ENABLE_DEFAULT_
#endif // DECODE_NEOCLIMA
#ifndef SEND_NEOCLIMA
#define SEND_NEOCLIMA _IR_ENABLE_DEFAULT_
#endif // SEND_NEOCLIMA
#ifndef DECODE_DAIKIN176
#define DECODE_DAIKIN176 _IR_ENABLE_DEFAULT_
#endif // DECODE_DAIKIN176
#ifndef SEND_DAIKIN176
#define SEND_DAIKIN176 _IR_ENABLE_DEFAULT_
#endif // SEND_DAIKIN176
#ifndef DECODE_DAIKIN128
#define DECODE_DAIKIN128 _IR_ENABLE_DEFAULT_
#endif // DECODE_DAIKIN128
#ifndef SEND_DAIKIN128
#define SEND_DAIKIN128 _IR_ENABLE_DEFAULT_
#endif // SEND_DAIKIN128
#ifndef DECODE_AMCOR
#define DECODE_AMCOR _IR_ENABLE_DEFAULT_
#endif // DECODE_AMCOR
#ifndef SEND_AMCOR
#define SEND_AMCOR _IR_ENABLE_DEFAULT_
#endif // SEND_AMCOR
#ifndef DECODE_DAIKIN152
#define DECODE_DAIKIN152 _IR_ENABLE_DEFAULT_
#endif // DECODE_DAIKIN152
#ifndef SEND_DAIKIN152
#define SEND_DAIKIN152 _IR_ENABLE_DEFAULT_
#endif // SEND_DAIKIN152
#ifndef DECODE_HITACHI_AC424
#define DECODE_HITACHI_AC424 _IR_ENABLE_DEFAULT_
#endif // DECODE_HITACHI_AC424
#ifndef SEND_HITACHI_AC424
#define SEND_HITACHI_AC424 _IR_ENABLE_DEFAULT_
#endif // SEND_HITACHI_AC424
#if (DECODE_ARGO || DECODE_DAIKIN || DECODE_FUJITSU_AC || DECODE_GREE || \
DECODE_KELVINATOR || DECODE_MITSUBISHI_AC || DECODE_TOSHIBA_AC || \
@ -495,7 +585,9 @@
// Note: If you plan to send IR messages in the callbacks of the AsyncWebserver
// library, you need to set ALLOW_DELAY_CALLS to false.
// Ref: https://github.com/crankyoldgit/IRremoteESP8266/issues/430
#ifndef ALLOW_DELAY_CALLS
#define ALLOW_DELAY_CALLS true
#endif // ALLOW_DELAY_CALLS
/*
* Always add to the end of the list and should never remove entries
@ -578,8 +670,9 @@ enum decode_type_t {
MITSUBISHI136,
MITSUBISHI112,
HITACHI_AC424,
SONY_38K,
// Add new entries before this one, and update it to point to the last entry.
kLastDecodeType = HITACHI_AC424,
kLastDecodeType = SONY_38K,
};
// Message lengths & required repeat values
@ -588,6 +681,7 @@ const uint16_t kSingleRepeat = 1;
const uint16_t kAiwaRcT501Bits = 15;
const uint16_t kAiwaRcT501MinRepeats = kSingleRepeat;
const uint16_t kAlokaBits = 32;
const uint16_t kAmcorStateLength = 8;
const uint16_t kAmcorBits = kAmcorStateLength * 8;
const uint16_t kAmcorDefaultRepeat = kSingleRepeat;
@ -668,6 +762,7 @@ const uint16_t kLegoPfBits = 16;
const uint16_t kLegoPfMinRepeat = kNoRepeat;
const uint16_t kLgBits = 28;
const uint16_t kLg32Bits = 32;
const uint16_t kLgDefaultRepeat = kNoRepeat;
const uint16_t kLutronBits = 35;
const uint16_t kMagiquestBits = 56;
const uint16_t kMideaBits = 48;

View File

@ -515,6 +515,8 @@ uint16_t IRsend::minRepeats(const decode_type_t protocol) {
return kDishMinRepeat;
case SONY:
return kSonyMinRepeat;
case SONY_38K:
return kSonyMinRepeat + 1;
default:
return kNoRepeat;
}
@ -545,6 +547,7 @@ uint16_t IRsend::defaultBits(const decode_type_t protocol) {
return 16;
case RC6:
case SONY:
case SONY_38K:
return 20;
case COOLIX:
case INAX:
@ -818,6 +821,9 @@ bool IRsend::send(const decode_type_t type, const uint64_t data,
case SONY:
sendSony(data, nbits, min_repeat);
break;
case SONY_38K:
sendSony38(data, nbits, min_repeat);
break;
#endif
#if SEND_TECO
case TECO:

View File

@ -130,7 +130,7 @@ enum panasonic_ac_remote_model_t {
kPanasonicUnknown = 0,
kPanasonicLke = 1,
kPanasonicNke = 2,
kPanasonicDke = 3,
kPanasonicDke = 3, // PKR too.
kPanasonicJke = 4,
kPanasonicCkp = 5,
kPanasonicRkr = 6,
@ -141,6 +141,11 @@ enum whirlpool_ac_remote_model_t {
DG11J191,
};
enum lg_ac_remote_model_t {
GE6711AR2853M = 1, // (1) LG 28-bit Protocol (default)
AKB75215403, // (2) LG2 28-bit Protocol
};
// Classes
class IRsend {
@ -198,6 +203,8 @@ class IRsend {
// a Sony command that will be accepted be a device.
void sendSony(uint64_t data, uint16_t nbits = kSony20Bits,
uint16_t repeat = kSonyMinRepeat);
void sendSony38(uint64_t data, uint16_t nbits = kSony20Bits,
uint16_t repeat = kSonyMinRepeat + 1);
uint32_t encodeSony(uint16_t nbits, uint16_t command, uint16_t address,
uint16_t extended = 0);
#endif
@ -556,6 +563,10 @@ class IRsend {
uint8_t _dutycycle;
bool modulation;
uint32_t calcUSecPeriod(uint32_t hz, bool use_offset = true);
#if SEND_SONY
void _sendSony(uint64_t data, uint16_t nbits,
uint16_t repeat, uint16_t freq);
#endif
};
#endif // IRSEND_H_

View File

@ -228,6 +228,8 @@ decode_type_t strToDecodeType(const char * const str) {
return decode_type_t::SHERWOOD;
else if (!strcasecmp(str, "SONY"))
return decode_type_t::SONY;
else if (!strcasecmp(str, "SONY_38K"))
return decode_type_t::SONY_38K;
else if (!strcasecmp(str, "TCL112AC"))
return decode_type_t::TCL112AC;
else if (!strcasecmp(str, "TECO"))
@ -461,6 +463,9 @@ String typeToString(const decode_type_t protocol, const bool isRepeat) {
case SONY:
result = F("SONY");
break;
case SONY_38K:
result = F("SONY_38K");
break;
case TCL112AC:
result = F("TCL112AC");
break;
@ -824,13 +829,6 @@ namespace irutils {
String modelToStr(const decode_type_t protocol, const int16_t model) {
switch (protocol) {
case decode_type_t::GREE:
switch (model) {
case gree_ac_remote_model_t::YAW1F: return F("YAW1F");
case gree_ac_remote_model_t::YBOFB: return F("YBOFB");
default: return kUnknownStr;
}
break;
case decode_type_t::FUJITSU_AC:
switch (model) {
case fujitsu_ac_remote_model_t::ARRAH2E: return F("ARRAH2E");
@ -841,6 +839,21 @@ namespace irutils {
default: return kUnknownStr;
}
break;
case decode_type_t::GREE:
switch (model) {
case gree_ac_remote_model_t::YAW1F: return F("YAW1F");
case gree_ac_remote_model_t::YBOFB: return F("YBOFB");
default: return kUnknownStr;
}
break;
case decode_type_t::LG:
case decode_type_t::LG2:
switch (model) {
case lg_ac_remote_model_t::GE6711AR2853M: return F("GE6711AR2853M");
case lg_ac_remote_model_t::AKB75215403: return F("AKB75215403");
default: return kUnknownStr;
}
break;
case decode_type_t::PANASONIC_AC:
switch (model) {
case panasonic_ac_remote_model_t::kPanasonicLke: return F("LKE");

Some files were not shown because too many files have changed in this diff Show More