From e27acee4b61a9da78cbad9c28f0a54bda050c78e Mon Sep 17 00:00:00 2001 From: Florian <1technophile@users.noreply.github.com> Date: Tue, 25 Aug 2020 09:53:25 -0500 Subject: [PATCH] [IR] Update IRRemoteESP8266 to 2.7.9 (#743) Add HITACHI_AC344 CORONA_AC MIDEA24 ZEPEAL SANYO_AC --- main/ZgatewayIR.ino | 51 +++++++++++++++++++++++++++++++++++++++++++++ main/config_IR.h | 5 +++++ platformio.ini | 2 +- 3 files changed, 57 insertions(+), 1 deletion(-) diff --git a/main/ZgatewayIR.ino b/main/ZgatewayIR.ino index 786df32..00c6022 100644 --- a/main/ZgatewayIR.ino +++ b/main/ZgatewayIR.ino @@ -1131,6 +1131,57 @@ bool sendIdentifiedProtocol(const char* protocol_name, SIGNAL_SIZE_UL_ULL data, irsend.sendCarrierAC64(data, valueBITS, valueRPT); return true; } +# endif +# ifdef IR_HITACHI_AC344 + if (strcmp(protocol_name, "HITACHI_AC344") == 0) { + Log.notice(F("Sending IR signal with %s" CR), protocol_name); + if (valueRPT == repeatIRwNumber) + valueRPT = std::max(valueRPT, kHitachiAcDefaultRepeat); + if (valueBITS == 0) + valueBITS = kHitachiAc344StateLength; + irsend.sendHitachiAc344(dataarray, valueBITS, valueRPT); + return true; + } +# endif +# ifdef IR_CORONA_AC + if (strcmp(protocol_name, "CORONA_AC") == 0) { + Log.notice(F("Sending IR signal with %s" CR), protocol_name); + if (valueBITS == 0) + valueBITS = kCoronaAcStateLength; + irsend.sendCoronaAc(dataarray, valueBITS, valueRPT); + return true; + } +# endif +# ifdef IR_MIDEA24 + if (strcmp(protocol_name, "MIDEA24") == 0) { + Log.notice(F("Sending IR signal with %s" CR), protocol_name); + if (valueRPT == repeatIRwNumber) + valueRPT = std::max(valueRPT, kMidea24MinRepeat); + if (valueBITS == 0) + valueBITS = kMidea24Bits; + irsend.sendMidea24(data, valueBITS, valueRPT); + return true; + } +# endif +# ifdef IR_ZEPEAL + if (strcmp(protocol_name, "ZEPEAL") == 0) { + Log.notice(F("Sending IR signal with %s" CR), protocol_name); + if (valueRPT == repeatIRwNumber) + valueRPT = std::max(valueRPT, kZepealMinRepeat); + if (valueBITS == 0) + valueBITS = kZepealBits; + irsend.sendZepeal(data, valueBITS, valueRPT); + return true; + } +# endif +# ifdef IR_SANYO_AC + if (strcmp(protocol_name, "SANYO_AC") == 0) { + Log.notice(F("Sending IR signal with %s" CR), protocol_name); + if (valueBITS == 0) + valueBITS = kSanyoAcStateLength; + irsend.sendSanyoAc(dataarray, valueBITS, valueRPT); + return true; + } # endif Log.warning(F("Unknown IR protocol" CR)); return false; diff --git a/main/config_IR.h b/main/config_IR.h index 992d501..3033bcf 100644 --- a/main/config_IR.h +++ b/main/config_IR.h @@ -132,6 +132,11 @@ extern void MQTTtoIR(char* topicOri, JsonObject& RFdata); # define IR_MULTIBRACKETS # define IR_CARRIER_AC40 # define IR_CARRIER_AC64 +# define IR_HITACHI_AC344 +# define IR_CORONA_AC +# define IR_MIDEA24 +# define IR_ZEPEAL +# define IR_SANYO_AC #elif __AVR_ATmega2560__ # define IR_COOLIX # define IR_Whynter diff --git a/platformio.ini b/platformio.ini index 41f6e3b..423c557 100644 --- a/platformio.ini +++ b/platformio.ini @@ -74,7 +74,7 @@ pubsubclient = PubSubClient@2.8 rc-switch = https://github.com/1technophile/rc-switch.git#385a7e0 newremoteswitch = https://github.com/1technophile/NewRemoteSwitch.git#8eb980e ble = https://github.com/h2zero/NimBLE-Arduino.git#1.0.0 -irremoteesp = IRremoteESP8266@2.7.7 +irremoteesp = IRremoteESP8266@2.7.9 irremote = https://github.com/z3t0/Arduino-IRremote.git#1c08a37 lora = https://github.com/sandeepmistry/arduino-LoRa.git#f4a1d27 esppilight = ESPiLight@0.16.2