Merge branch 'development' into pre-release

This commit is contained in:
Theo Arends 2020-04-28 16:05:06 +02:00
commit ade7b4b96e
774 changed files with 123363 additions and 4766 deletions

View File

@ -6,6 +6,7 @@
- [ ] The pull request is done against the latest dev branch - [ ] The pull request is done against the latest dev branch
- [ ] Only relevant files were touched - [ ] Only relevant files were touched
- [ ] Only one feature/fix was added per PR. - [ ] Only one feature/fix was added per PR.
- [ ] The code change is tested and works on core Tasmota_core_stage - [ ] The code change is tested and works on core Tasmota_core
- [ ] The code change is tested and works on core ESP32
- [ ] The code change pass travis tests. **Your PR cannot be merged unless tests pass** - [ ] The code change pass travis tests. **Your PR cannot be merged unless tests pass**
- [ ] I accept the [CLA](https://github.com/arendst/Tasmota/blob/development/CONTRIBUTING.md#contributor-license-agreement-cla). - [ ] I accept the [CLA](https://github.com/arendst/Tasmota/blob/development/CONTRIBUTING.md#contributor-license-agreement-cla).

View File

@ -145,6 +145,7 @@ People helping to keep the show on the road:
- Jacek Ziółkowski for his [TDM](https://github.com/jziolkowski/tdm) management tool and [Tasmotizer](https://github.com/tasmota/tasmotizer) flashing tool - Jacek Ziółkowski for his [TDM](https://github.com/jziolkowski/tdm) management tool and [Tasmotizer](https://github.com/tasmota/tasmotizer) flashing tool
- Christian Staars for NRF24L01 and HM-10 Bluetooth sensor support - Christian Staars for NRF24L01 and HM-10 Bluetooth sensor support
- Pail Diem for UDP Group communication support - Pail Diem for UDP Group communication support
- Jörg Schüler-Maroldt for his initial ESP32 port
- Many more providing Tips, Wips, Pocs, PRs and Donations - Many more providing Tips, Wips, Pocs, PRs and Donations
## License ## License

View File

@ -54,11 +54,14 @@ The following binary downloads have been compiled with ESP8266/Arduino library c
### Version 8.3.0 Fred ### Version 8.3.0 Fred
- Breaking Change Device Groups multicast address and port (#8270)
- Change PWM implementation to Arduino #7231 removing support for Core versions before 2.6.3
- Change default PWM Frequency to 223 Hz instead of 880 Hz for less interrupt pressure
- Change HM-10 sensor type detection and add features (#7962) - Change HM-10 sensor type detection and add features (#7962)
- Change light scheme 2,3,4 cycle time speed from 24,48,72,... seconds to 4,6,12,24,36,48,... seconds (#8034) - Change light scheme 2,3,4 cycle time speed from 24,48,72,... seconds to 4,6,12,24,36,48,... seconds (#8034)
- Change remove floating point libs from IRAM - Change remove floating point libs from IRAM
- Change remove MQTT Info messages on restart for DeepSleep Wake (#8044) - Change remove MQTT Info messages on restart for DeepSleep Wake (#8044)
- Change IRremoteESP8266 library updated to v2.7.5 - Change IRremoteESP8266 library updated to v2.7.6
- Fix possible Relay toggle on (OTA) restart - Fix possible Relay toggle on (OTA) restart
- Fix PWM flickering during wifi connection (#8046) - Fix PWM flickering during wifi connection (#8046)
- Fix Zigbee sending wrong Sat value with Hue emulation - Fix Zigbee sending wrong Sat value with Hue emulation
@ -70,10 +73,12 @@ The following binary downloads have been compiled with ESP8266/Arduino library c
- Add commands ``CounterDebounceLow`` and ``CounterDebounceHigh`` to control debouncing (#8021) - Add commands ``CounterDebounceLow`` and ``CounterDebounceHigh`` to control debouncing (#8021)
- Add commands ``NrfPage``, ``NrfIgnore``, ``NrfScan`` and ``NrfBeacon`` to NRF24 Bluetooth driver (#8075) - Add commands ``NrfPage``, ``NrfIgnore``, ``NrfScan`` and ``NrfBeacon`` to NRF24 Bluetooth driver (#8075)
- Add commands ``GlobalTemp`` and ``GlobalHum`` to init sensor data (#8152) - Add commands ``GlobalTemp`` and ``GlobalHum`` to init sensor data (#8152)
- Add command ``SO`` as shortcut for command ``SetOption``
- Add command ``SetOption41 <x>`` to force sending gratuitous ARP every <x> seconds - Add command ``SetOption41 <x>`` to force sending gratuitous ARP every <x> seconds
- Add command ``SetOption73 1`` for button decoupling and send multi-press and hold MQTT messages by Federico Leoni (#8235) - Add command ``SetOption73 1`` for button decoupling and send multi-press and hold MQTT messages by Federico Leoni (#8235)
- Add command ``SetOption90 1`` to disable non-json MQTT messages (#8044) - Add command ``SetOption90 1`` to disable non-json MQTT messages (#8044)
- Add command ``SetOption91 1`` to enable fading at startup / power on - Add command ``SetOption91 1`` to enable fading at startup / power on
- Add command ``SetOption92 1`` to set PWM Mode from regular PWM to ColorTemp control (Xiaomi Philips ...)
- Add command ``Sensor10 0/1/2`` to control BH1750 resolution - 0 = High (default), 1 = High2, 2 = Low (#8016) - Add command ``Sensor10 0/1/2`` to control BH1750 resolution - 0 = High (default), 1 = High2, 2 = Low (#8016)
- Add command ``Sensor10 31..254`` to control BH1750 measurement time which defaults to 69 (#8016) - Add command ``Sensor10 31..254`` to control BH1750 measurement time which defaults to 69 (#8016)
- Add command ``Sensor18 0..32000`` to control PMS5003 sensor interval to extend lifetime by Gene Ruebsamen (#8128) - Add command ``Sensor18 0..32000`` to control PMS5003 sensor interval to extend lifetime by Gene Ruebsamen (#8128)

View File

@ -24,8 +24,6 @@ SOFTWARE.
#include <twi.h> #include <twi.h>
#include <FrogmoreScd30.h> #include <FrogmoreScd30.h>
#ifdef ESP8266
#define COMMAND_SCD30_CONTINUOUS_MEASUREMENT 0x0010 #define COMMAND_SCD30_CONTINUOUS_MEASUREMENT 0x0010
#define COMMAND_SCD30_MEASUREMENT_INTERVAL 0x4600 #define COMMAND_SCD30_MEASUREMENT_INTERVAL 0x4600
#define COMMAND_SCD30_GET_DATA_READY 0x0202 #define COMMAND_SCD30_GET_DATA_READY 0x0202
@ -60,7 +58,9 @@ void FrogmoreScd30::begin(TwoWire *pWire, uint8_t i2cAddress)
} }
co2NewDataLocation = -1; // indicates there is no data, so the 1st data point needs to fill up the median filter co2NewDataLocation = -1; // indicates there is no data, so the 1st data point needs to fill up the median filter
#ifdef ESP8266
this->pWire->setClockStretchLimit(200000); this->pWire->setClockStretchLimit(200000);
#endif
this->ambientPressure = 0; this->ambientPressure = 0;
} }
@ -108,7 +108,11 @@ int FrogmoreScd30::clearI2CBus(void)
snprintf_P(scd30log_data, sizeof(scd30log_data), "clearI2CBus"); snprintf_P(scd30log_data, sizeof(scd30log_data), "clearI2CBus");
AddLog(LOG_LEVEL_DEBUG_MORE); AddLog(LOG_LEVEL_DEBUG_MORE);
#endif #endif
#ifdef ESP8266
return (twi_status()); return (twi_status());
#else
return 0;
#endif
} }
#ifdef SCD30_DEBUG #ifdef SCD30_DEBUG
@ -652,5 +656,3 @@ int FrogmoreScd30::stopMeasuring(void)
{ {
return (sendCommand(COMMAND_SCD30_STOP_MEASUREMENT)); return (sendCommand(COMMAND_SCD30_STOP_MEASUREMENT));
} }
#endif // ESP8266

View File

@ -1,46 +0,0 @@
[platformio]
src_dir = .
[env]
; Default platform
platform = espressif8266
; Default board
board = nodemcuv2
framework = arduino
lib_extra_dirs = ../../
lib_ldf_mode = deep+
lib_ignore = examples
build_flags = ; -D_IR_LOCALE_=en-AU
[env:nodemcuv2]
board = nodemcuv2
; build_flags = -D_IR_LOCALE_=en-AU
[env:esp32dev]
platform = espressif32
board = esp32dev
; build_flags = -D_IR_LOCALE_=en-AU
[env:de-CH]
build_flags = -D_IR_LOCALE_=de-CH
[env:de-DE]
build_flags = -D_IR_LOCALE_=de-DE
[env:en-AU]
build_flags = -D_IR_LOCALE_=en-AU
[env:en-IE]
build_flags = -D_IR_LOCALE_=en-IE
[env:en-UK]
build_flags = -D_IR_LOCALE_=en-UK
[env:en-US]
build_flags = -D_IR_LOCALE_=en-US
[env:es-ES]
build_flags = -D_IR_LOCALE_=es-ES
[env:fr-FR]
build_flags = -D_IR_LOCALE_=fr-FR

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 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. [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.5 Now Available ## v2.7.6 Now Available
Version 2.7.5 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. Version 2.7.6 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 #### 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. 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 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. [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.5 disponible ## v2.7.6 disponible
Version 2.7.5 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. Version 2.7.6 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 #### 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. 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,17 @@
# Release Notes # Release Notes
## _v2.7.6 (20200425)_
**[Features]**
- IRMQTTServer: Use more i18n text. (#1086)
- Convert Protocol names to shared text. Saves ~3k of flash. (#1078)
- Add Chinese translation (zh-CN) & add utf-8 support. (#1080, #1085)
**[Misc]**
- IRMQTTServer: Ensure MQTT_MAX_PACKET_SIZE is correctly set. (#1084)
- Add Italian locale to IRrecvDumpV2 platformio file.
## _v2.7.5 (20200409)_ ## _v2.7.5 (20200409)_
**[Features]** **[Features]**

View File

@ -239,7 +239,7 @@ const uint16_t kJsonAcStateMaxSize = 1024; // Bytes
// ----------------- End of User Configuration Section ------------------------- // ----------------- End of User Configuration Section -------------------------
// Constants // Constants
#define _MY_VERSION_ "v1.4.7" #define _MY_VERSION_ "v1.4.9"
const uint8_t kRebootTime = 15; // Seconds const uint8_t kRebootTime = 15; // Seconds
const uint8_t kQuickDisplayTime = 2; // Seconds const uint8_t kQuickDisplayTime = 2; // Seconds

View File

@ -358,12 +358,17 @@
#include <IRutils.h> #include <IRutils.h>
#include <IRac.h> #include <IRac.h>
#if MQTT_ENABLE #if MQTT_ENABLE
#include <PubSubClient.h>
// -------------------------------------------------------------------- // --------------------------------------------------------------------
// * * * IMPORTANT * * * // * * * IMPORTANT * * *
// You must change <PubSubClient.h> to have the following value. // You must change <PubSubClient.h> to have the following value.
// #define MQTT_MAX_PACKET_SIZE 768 // #define MQTT_MAX_PACKET_SIZE 768
// -------------------------------------------------------------------- // --------------------------------------------------------------------
#include <PubSubClient.h> // Check that the user has set MQTT_MAX_PACKET_SIZE to an appropriate size.
#if MQTT_MAX_PACKET_SIZE < 768
#error "MQTT_MAX_PACKET_SIZE in <PubSubClient.h> is too small. "\
"Increase the value per comments."
#endif // MQTT_MAX_PACKET_SIZE < 768
#endif // MQTT_ENABLE #endif // MQTT_ENABLE
#include <algorithm> // NOLINT(build/include) #include <algorithm> // NOLINT(build/include)
#include <memory> #include <memory>
@ -622,7 +627,7 @@ bool loadConfigFile(void) {
String timeElapsed(uint32_t const msec) { String timeElapsed(uint32_t const msec) {
String result = msToString(msec); String result = msToString(msec);
if (result.equalsIgnoreCase("Now")) if (result.equalsIgnoreCase(D_STR_NOW))
return result; return result;
else else
return result + F(" ago"); return result + F(" ago");
@ -642,7 +647,7 @@ String timeSince(uint32_t const start) {
String gpioToString(const int16_t gpio) { String gpioToString(const int16_t gpio) {
if (gpio == kGpioUnused) if (gpio == kGpioUnused)
return F("Unused"); return F(D_STR_UNUSED);
else else
return String(gpio); return String(gpio);
} }
@ -715,13 +720,13 @@ void handleRoot(void) {
html += F( html += F(
"<h3>Send a simple IR message</h3><p>" "<h3>Send a simple IR message</h3><p>"
"<form method='POST' action='/ir' enctype='multipart/form-data'>" "<form method='POST' action='/ir' enctype='multipart/form-data'>"
"Type: "); D_STR_PROTOCOL ": ");
html += htmlSelectAcStateProtocol(KEY_TYPE, decode_type_t::NEC, true); html += htmlSelectAcStateProtocol(KEY_TYPE, decode_type_t::NEC, true);
html += F( html += F(
" Code: 0x<input type='text' name='code' min='0' value='0' size='16'" " " D_STR_CODE ": 0x<input type='text' name='" KEY_CODE "' min='0' "
" maxlength='16'>" "value='0' size='16' maxlength='16'> "
" Bit size: " D_STR_BITS ": "
"<select name='bits'>" "<select name='" KEY_BITS "'>"
"<option selected='selected' value='0'>Default</option>"); // Default "<option selected='selected' value='0'>Default</option>"); // Default
for (uint8_t i = 0; i < sizeof(kCommonBitSizes); i++) { for (uint8_t i = 0; i < sizeof(kCommonBitSizes); i++) {
String num = String(kCommonBitSizes[i]); String num = String(kCommonBitSizes[i]);
@ -733,18 +738,18 @@ void handleRoot(void) {
} }
html += F( html += F(
"</select>" "</select>"
" Repeats: <input type='number' name='repeats' min='0' max='99' value='0'" " " D_STR_REPEAT ": <input type='number' name='" KEY_REPEAT "' min='0' "
"size='2' maxlength='2'>" "max='99' value='0' size='2' maxlength='2'>"
" <input type='submit' value='Send IR'>" " <input type='submit' value='Send " D_STR_CODE "'>"
"</form>" "</form>"
"<br><hr>" "<br><hr>"
"<h3>Send a complex (Air Conditioner) IR message</h3><p>" "<h3>Send a complex (Air Conditioner) IR message</h3><p>"
"<form method='POST' action='/ir' enctype='multipart/form-data'>" "<form method='POST' action='/ir' enctype='multipart/form-data'>"
"Type: "); D_STR_PROTOCOL ": ");
html += htmlSelectAcStateProtocol(KEY_TYPE, decode_type_t::KELVINATOR, false); html += htmlSelectAcStateProtocol(KEY_TYPE, decode_type_t::KELVINATOR, false);
html += F( html += F(
" State code: 0x" " State " D_STR_CODE ": 0x"
"<input type='text' name='code' size='"); "<input type='text' name='" KEY_CODE "' size='");
html += String(kStateSizeMax * 2); html += String(kStateSizeMax * 2);
html += F("' maxlength='"); html += F("' maxlength='");
html += String(kStateSizeMax * 2); html += String(kStateSizeMax * 2);
@ -754,14 +759,14 @@ void handleRoot(void) {
"190B8050000000E0190B8070000010F0" "190B8050000000E0190B8070000010F0"
#endif // EXAMPLES_ENABLE #endif // EXAMPLES_ENABLE
"'>" "'>"
" <input type='submit' value='Send A/C State'>" " <input type='submit' value='Send A/C " D_STR_CODE "'>"
"</form>" "</form>"
"<br><hr>" "<br><hr>"
"<h3>Send an IRremote Raw IR message</h3><p>" "<h3>Send an IRremote Raw IR message</h3><p>"
"<form method='POST' action='/ir' enctype='multipart/form-data'>" "<form method='POST' action='/ir' enctype='multipart/form-data'>"
"<input type='hidden' name='type' value='30'>" "<input type='hidden' name='" KEY_TYPE "' value='30'>"
"String: (freq,array data) <input type='text' name='code' size='132'" "String: (freq,array data) <input type='text' name='" KEY_CODE "'"
" value='" " size='132' value='"
#if EXAMPLES_ENABLE #if EXAMPLES_ENABLE
"38000,4420,4420,520,1638,520,1638,520,1638,520,520,520,520,520," "38000,4420,4420,520,1638,520,1638,520,1638,520,520,520,520,520,"
"520,520,520,520,520,520,1638,520,1638,520,1638,520,520,520," "520,520,520,520,520,520,1638,520,1638,520,1638,520,520,520,"
@ -776,8 +781,8 @@ void handleRoot(void) {
"<h3>Send a <a href='https://irdb.globalcache.com/'>GlobalCache</a>" "<h3>Send a <a href='https://irdb.globalcache.com/'>GlobalCache</a>"
" IR message</h3><p>" " IR message</h3><p>"
"<form method='POST' action='/ir' enctype='multipart/form-data'>" "<form method='POST' action='/ir' enctype='multipart/form-data'>"
"<input type='hidden' name='type' value='31'>" "<input type='hidden' name='" KEY_TYPE "' value='31'>"
"String: 1:1,1,<input type='text' name='code' size='132'" "String: 1:1,1,<input type='text' name='" KEY_CODE "' size='132'"
" value='" " value='"
#if EXAMPLES_ENABLE #if EXAMPLES_ENABLE
"38000,1,1,170,170,20,63,20,63,20,63,20,20,20,20,20,20,20,20,20," "38000,1,1,170,170,20,63,20,63,20,63,20,20,20,20,20,20,20,20,20,"
@ -792,9 +797,9 @@ void handleRoot(void) {
"<h3>Send a <a href='http://www.remotecentral.com/cgi-bin/files/rcfiles.cgi" "<h3>Send a <a href='http://www.remotecentral.com/cgi-bin/files/rcfiles.cgi"
"?area=pronto&db=discrete'>Pronto code</a> IR message</h3><p>" "?area=pronto&db=discrete'>Pronto code</a> IR message</h3><p>"
"<form method='POST' action='/ir' enctype='multipart/form-data'>" "<form method='POST' action='/ir' enctype='multipart/form-data'>"
"<input type='hidden' name='type' value='25'>" "<input type='hidden' name='" KEY_TYPE "' value='25'>"
"String (comma separated): <input type='text' name='code' size='132'" "String (comma separated): <input type='text' name='" KEY_CODE "'"
" value='" " size='132' value='"
#if EXAMPLES_ENABLE #if EXAMPLES_ENABLE
"0000,0067,0000,0015,0060,0018,0018,0018,0030,0018,0030,0018," "0000,0067,0000,0015,0060,0018,0018,0018,0030,0018,0030,0018,"
"0030,0018,0018,0018,0030,0018,0018,0018,0018,0018,0030,0018,0018," "0030,0018,0018,0018,0030,0018,0018,0018,0018,0018,0030,0018,0018,"
@ -802,8 +807,8 @@ void handleRoot(void) {
"0018,0018,0018,0018,0030,0018,0018,03f6" "0018,0018,0018,0018,0030,0018,0018,03f6"
#endif // EXAMPLES_ENABLE #endif // EXAMPLES_ENABLE
"'>" "'>"
" Repeats: <input type='number' name='repeats' min='0' max='99' value='0'" " " D_STR_REPEAT ": <input type='number' name='" KEY_REPEAT "' min='0' "
"size='2' maxlength='2'>" "max='99' value='0' size='2' maxlength='2'>"
" <input type='submit' value='Send Pronto'>" " <input type='submit' value='Send Pronto'>"
"</form>" "</form>"
"<br>"); "<br>");
@ -825,7 +830,7 @@ String addJsReloadUrl(const String url, const uint16_t timeout_s,
if (notify && timeout_s) { if (notify && timeout_s) {
html += F(" document.write(\"You will be redirected to the main page in "); html += F(" document.write(\"You will be redirected to the main page in ");
html += String(timeout_s); html += String(timeout_s);
html += F(" seconds.\");\n"); html += F(" " D_STR_SECONDS ".\");\n");
} }
html += F(" setTimeout('Redirect()', "); html += F(" setTimeout('Redirect()', ");
html += String(timeout_s * 1000); // Convert to mSecs html += String(timeout_s * 1000); // Convert to mSecs
@ -848,35 +853,44 @@ void handleExamples(void) {
html += htmlMenu(); html += htmlMenu();
html += F( html += F(
"<h3>Hardcoded examples</h3>" "<h3>Hardcoded examples</h3>"
"<p><a href=\"ir?code=38000,1,69,341,171,21,64,21,64,21,21,21,21,21,21,21," "<p><a href=\"ir?" KEY_CODE "=38000,1,69,341,171,21,64,21,64,21,21,21,21,"
"21,21,21,21,64,21,64,21,21,21,64,21,21,21,21,21,21,21,64,21,21,21,64," "21,21,21,21,21,21,21,64,21,64,21,21,21,64,21,21,21,21,21,21,21,64,21,"
"21,21,21,21,21,21,21,64,21,21,21,21,21,21,21,21,21,64,21,64,21,64,21," "21,21,64,21,21,21,21,21,21,21,64,21,21,21,21,21,21,21,21,21,64,21,64,"
"21,21,64,21,64,21,64,21,1600,341,85,21,3647&type=31\">" "21,64,21,21,21,64,21,64,21,64,21,1600,341,85,21,3647"
"Sherwood Amp On (GlobalCache)</a></p>" "&" KEY_TYPE "=31\">Sherwood Amp " D_STR_ON " (GlobalCache)</a></p>"
"<p><a href=\"ir?code=38000,8840,4446,546,1664,546,1664,546,546,546,546," "<p><a href=\"ir?" KEY_CODE "=38000,8840,4446,546,1664,546,1664,546,546,"
"546,546,546,546,546,546,546,1664,546,1664,546,546,546,1664,546,546," "546,546,546,546,546,546,546,546,546,1664,546,1664,546,546,546,1664,"
"546,546,546,546,546,1664,546,546,546,1664,546,546,546,1664,546,1664," "546,546,546,546,546,546,546,1664,546,546,546,1664,546,546,546,1664,"
"546,1664,546,546,546,546,546,546,546,546,546,1664,546,546,546,546,546," "546,1664,546,1664,546,546,546,546,546,546,546,546,546,1664,546,546,"
"546,546,1664,546,1664,546,1664,546,41600,8840,2210,546&type=30\">" "546,546,546,546,546,1664,546,1664,546,1664,546,41600,8840,2210,546"
"Sherwood Amp Off (Raw)</a></p>" "&" KEY_TYPE "=30\">Sherwood Amp " D_STR_OFF " (Raw)</a></p>"
"<p><a href=\"ir?code=0000,006E,0022,0002,0155,00AA,0015,0040,0015,0040" "<p><a href=\"ir?" KEY_CODE "=0000,006E,0022,0002,0155,00AA,0015,0040,0015,"
",0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0040,0015,0040" "0040,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0040,0015,"
",0015,0015,0015,0040,0015,0015,0015,0015,0015,0015,0015,0040,0015,0015" "0040,0015,0015,0015,0040,0015,0015,0015,0015,0015,0015,0015,0040,0015,"
",0015,0015,0015,0040,0015,0040,0015,0015,0015,0015,0015,0015,0015,0015" "0015,0015,0015,0015,0040,0015,0040,0015,0015,0015,0015,0015,0015,0015,"
",0015,0015,0015,0040,0015,0015,0015,0015,0015,0040,0015,0040,0015,0040" "0015,0015,0015,0015,0040,0015,0015,0015,0015,0015,0040,0015,0040,0015,"
",0015,0040,0015,0040,0015,0640,0155,0055,0015,0E40" "0040,0015,0040,0015,0040,0015,0640,0155,0055,0015,0E40"
"&type=25&repeats=1\">" "&" KEY_TYPE "=25&" KEY_REPEAT "=1\">"
"Sherwood Amp Input TAPE (Pronto)</a></p>" "Sherwood Amp Input TAPE (Pronto)</a></p>"
"<p><a href=\"ir?type=7&code=E0E09966\">TV on (Samsung)</a></p>" "<p><a href=\"ir?" KEY_TYPE "=7&" KEY_CODE "=E0E09966\">TV " D_STR_ON
"<p><a href=\"ir?type=4&code=0xf50&bits=12\">Power Off (Sony 12bit)</a></p>" " (Samsung)</a></p>"
"<p><a href=\"aircon/set?protocol=PANASONIC_AC&model=LKE&power=on&" "<p><a href=\"ir?" KEY_TYPE "=4&" KEY_CODE "=0xf50&bits=12\">" D_STR_POWER
"mode=auto&fanspeed=min&temp=23\">" " " D_STR_OFF " (Sony 12 " D_STR_BITS ")</a></p>"
"Panasonic A/C LKE model, On, Auto mode, Min fan, 23C" "<p><a href=\"aircon/set?protocol=PANASONIC_AC&"
KEY_MODEL "=LKE&"
KEY_POWER "=on&"
KEY_MODE "=auto&"
KEY_FANSPEED "=min&"
KEY_TEMP "=23\">"
"Panasonic A/C " D_STR_MODEL " LKE, " D_STR_ON ", " D_STR_AUTO " "
D_STR_MODE ", " D_STR_MIN " " D_STR_FAN ", 23C"
" <i>(via HTTP aircon interface)</i></a></p>" " <i>(via HTTP aircon interface)</i></a></p>"
"<p><a href=\"aircon/set?temp=27\">" "<p><a href=\"aircon/set?" KEY_TEMP "=27\">"
"Change just the temp to 27C <i>(via HTTP aircon interface)</i></a></p>" "Change just the " D_STR_TEMP " to 27C <i>"
"<p><a href=\"aircon/set?power=off&mode=off\">" "(via HTTP aircon interface)</i></a></p>"
"Turn OFF the current A/C <i>(via HTTP aircon interface)</i></a></p>" "<p><a href=\"aircon/set?" KEY_POWER "=off&" KEY_MODE "=off\">"
"Turn " D_STR_OFF " the current A/C <i>("
"via HTTP aircon interface)</i></a></p>"
"<br><hr>"); "<br><hr>");
html += htmlEnd(); html += htmlEnd();
server.send(200, "text/html", html); server.send(200, "text/html", html);
@ -996,7 +1010,9 @@ String htmlSelectSwingh(const String name, const stdAc::swingh_t def) {
String htmlHeader(const String title, const String h1_text) { String htmlHeader(const String title, const String h1_text) {
String html = F("<html><head><title>"); String html = F("<html><head><title>");
html += title; html += title;
html += F("</title></head><body><center><h1>"); html += F("</title><meta http-equiv=\"Content-Type\" "
"content=\"text/html;charset=utf-8\">"
"</head><body><center><h1>");
if (h1_text.length()) if (h1_text.length())
html += h1_text; html += h1_text;
else else
@ -1042,20 +1058,20 @@ void handleAirCon(void) {
"<input type='hidden' name='" KEY_CHANNEL "' value='" + String(chan) + "<input type='hidden' name='" KEY_CHANNEL "' value='" + String(chan) +
"'>" + "'>" +
"<table style='width:33%'>" "<table style='width:33%'>"
"<tr><td>Protocol</td><td>" + "<tr><td>" D_STR_PROTOCOL "</td><td>" +
htmlSelectClimateProtocol(KEY_PROTOCOL, htmlSelectClimateProtocol(KEY_PROTOCOL,
climate[chan]->next.protocol) + climate[chan]->next.protocol) +
"</td></tr>" "</td></tr>"
"<tr><td>Model</td><td>" + "<tr><td>" D_STR_MODEL "</td><td>" +
htmlSelectModel(KEY_MODEL, climate[chan]->next.model) + htmlSelectModel(KEY_MODEL, climate[chan]->next.model) +
"</td></tr>" "</td></tr>"
"<tr><td>Power</td><td>" + "<tr><td>" D_STR_POWER "</td><td>" +
htmlSelectBool(KEY_POWER, climate[chan]->next.power) + htmlSelectBool(KEY_POWER, climate[chan]->next.power) +
"</td></tr>" "</td></tr>"
"<tr><td>Mode</td><td>" + "<tr><td>" D_STR_MODE "</td><td>" +
htmlSelectMode(KEY_MODE, climate[chan]->next.mode) + htmlSelectMode(KEY_MODE, climate[chan]->next.mode) +
"</td></tr>" "</td></tr>"
"<tr><td>Temp</td><td>" "<tr><td>" D_STR_TEMP "</td><td>"
"<input type='number' name='" KEY_TEMP "' min='16' max='90' " "<input type='number' name='" KEY_TEMP "' min='16' max='90' "
"step='0.5' value='" + String(climate[chan]->next.degrees, 1) + "'>" "step='0.5' value='" + String(climate[chan]->next.degrees, 1) + "'>"
"<select name='" KEY_CELSIUS "'>" "<select name='" KEY_CELSIUS "'>"
@ -1066,34 +1082,34 @@ void handleAirCon(void) {
(!climate[chan]->next.celsius ? " selected='selected'" : "") + (!climate[chan]->next.celsius ? " selected='selected'" : "") +
">F</option>" ">F</option>"
"</select></td></tr>" "</select></td></tr>"
"<tr><td>Fan Speed</td><td>" + "<tr><td>" D_STR_FAN "</td><td>" +
htmlSelectFanspeed(KEY_FANSPEED, climate[chan]->next.fanspeed) + htmlSelectFanspeed(KEY_FANSPEED, climate[chan]->next.fanspeed) +
"</td></tr>" "</td></tr>"
"<tr><td>Swing (V)</td><td>" + "<tr><td>" D_STR_SWINGV "</td><td>" +
htmlSelectSwingv(KEY_SWINGV, climate[chan]->next.swingv) + htmlSelectSwingv(KEY_SWINGV, climate[chan]->next.swingv) +
"</td></tr>" "</td></tr>"
"<tr><td>Swing (H)</td><td>" + "<tr><td>" D_STR_SWINGH "</td><td>" +
htmlSelectSwingh(KEY_SWINGH, climate[chan]->next.swingh) + htmlSelectSwingh(KEY_SWINGH, climate[chan]->next.swingh) +
"</td></tr>" "</td></tr>"
"<tr><td>Quiet</td><td>" + "<tr><td>" D_STR_QUIET "</td><td>" +
htmlSelectBool(KEY_QUIET, climate[chan]->next.quiet) + htmlSelectBool(KEY_QUIET, climate[chan]->next.quiet) +
"</td></tr>" "</td></tr>"
"<tr><td>Turbo</td><td>" + "<tr><td>" D_STR_TURBO "</td><td>" +
htmlSelectBool(KEY_TURBO, climate[chan]->next.turbo) + htmlSelectBool(KEY_TURBO, climate[chan]->next.turbo) +
"</td></tr>" "</td></tr>"
"<tr><td>Econo</td><td>" + "<tr><td>" D_STR_ECONO "</td><td>" +
htmlSelectBool(KEY_ECONO, climate[chan]->next.econo) + htmlSelectBool(KEY_ECONO, climate[chan]->next.econo) +
"</td></tr>" "</td></tr>"
"<tr><td>Light</td><td>" + "<tr><td>" D_STR_LIGHT "</td><td>" +
htmlSelectBool(KEY_LIGHT, climate[chan]->next.light) + htmlSelectBool(KEY_LIGHT, climate[chan]->next.light) +
"</td></tr>" "</td></tr>"
"<tr><td>Filter</td><td>" + "<tr><td>" D_STR_FILTER "</td><td>" +
htmlSelectBool(KEY_FILTER, climate[chan]->next.filter) + htmlSelectBool(KEY_FILTER, climate[chan]->next.filter) +
"</td></tr>" "</td></tr>"
"<tr><td>Clean</td><td>" + "<tr><td>" D_STR_CLEAN "</td><td>" +
htmlSelectBool(KEY_CLEAN, climate[chan]->next.clean) + htmlSelectBool(KEY_CLEAN, climate[chan]->next.clean) +
"</td></tr>" "</td></tr>"
"<tr><td>Beep</td><td>" + "<tr><td>" D_STR_BEEP "</td><td>" +
htmlSelectBool(KEY_BEEP, climate[chan]->next.beep) + htmlSelectBool(KEY_BEEP, climate[chan]->next.beep) +
"</td></tr>" "</td></tr>"
"<tr><td>Force resend</td><td>" + "<tr><td>Force resend</td><td>" +
@ -1260,9 +1276,9 @@ void handleInfo(void) {
"Last IR Received: " + lastIrReceived + "Last IR Received: " + lastIrReceived +
" <i>(" + timeSince(lastIrReceivedTime) + ")</i><br>" " <i>(" + timeSince(lastIrReceivedTime) + ")</i><br>"
#endif // IR_RX #endif // IR_RX
"Duplicate Wifi networks: " + "Duplicate " D_STR_WIFI " networks: " +
String(HIDE_DUPLICATE_NETWORKS ? "Hide" : "Show") + "<br>" String(HIDE_DUPLICATE_NETWORKS ? "Hide" : "Show") + "<br>"
"Min Wifi signal required: " "Min " D_STR_WIFI " signal required: "
#ifdef MIN_SIGNAL_STRENGTH #ifdef MIN_SIGNAL_STRENGTH
+ String(static_cast<int>(MIN_SIGNAL_STRENGTH)) + + String(static_cast<int>(MIN_SIGNAL_STRENGTH)) +
#else // MIN_SIGNAL_STRENGTH #else // MIN_SIGNAL_STRENGTH
@ -1271,9 +1287,9 @@ void handleInfo(void) {
"%<br>" "%<br>"
"Serial debugging: " "Serial debugging: "
#if DEBUG #if DEBUG
+ String(isSerialGpioUsedByIr() ? "Off" : "On") + + String(isSerialGpioUsedByIr() ? D_STR_OFF : D_STR_ON) +
#else // DEBUG #else // DEBUG
"Off" D_STR_OFF
#endif // DEBUG #endif // DEBUG
"<br>" "<br>"
#if REPORT_VCC #if REPORT_VCC
@ -1289,6 +1305,7 @@ void handleInfo(void) {
: "Disconnected " + timeSince(lastConnectedTime)) + : "Disconnected " + timeSince(lastConnectedTime)) +
")</i><br>" ")</i><br>"
"Disconnections: " + String(mqttDisconnectCounter - 1) + "<br>" "Disconnections: " + String(mqttDisconnectCounter - 1) + "<br>"
"Max Packet Size: " + MQTT_MAX_PACKET_SIZE + " bytes<br>"
"Client id: " + MqttClientId + "<br>" "Client id: " + MqttClientId + "<br>"
"Command topic(s): " + listOfCommandTopics() + "<br>" "Command topic(s): " + listOfCommandTopics() + "<br>"
"Acknowledgements topic: " + MqttAck + "<br>" "Acknowledgements topic: " + MqttAck + "<br>"
@ -1330,6 +1347,7 @@ void handleInfo(void) {
timeElapsed(lastDiscovery.elapsed()) : timeElapsed(lastDiscovery.elapsed()) :
String("<i>Never</i>"))) + String("<i>Never</i>"))) +
"<br>" "<br>"
"Discovery topic: " + MqttDiscovery + "<br>" +
#endif // MQTT_DISCOVERY_ENABLE #endif // MQTT_DISCOVERY_ENABLE
"Command topics: " + MqttClimate + channel_re + '/' + MQTT_CLIMATE_CMND + "Command topics: " + MqttClimate + channel_re + '/' + MQTT_CLIMATE_CMND +
'/' + kClimateTopics + '/' + kClimateTopics +
@ -1339,7 +1357,7 @@ void handleInfo(void) {
"</p>" "</p>"
// Page footer // Page footer
"<hr><p><small><center>" "<hr><p><small><center>"
"<i>(Note: Page will refresh every 60 seconds.)</i>" "<i>(Note: Page will refresh every 60 " D_STR_SECONDS ".)</i>"
"<centre></small></p>"; "<centre></small></p>";
html += addJsReloadUrl(kUrlInfo, 60, false); html += addJsReloadUrl(kUrlInfo, 60, false);
html += htmlEnd(); html += htmlEnd();
@ -1401,7 +1419,7 @@ void handleClearMqtt(void) {
htmlHeader(F("Clearing saved info from MQTT"), htmlHeader(F("Clearing saved info from MQTT"),
F("Removing all saved settings for this device from " F("Removing all saved settings for this device from "
"MQTT.")) + "MQTT.")) +
"<p>Device restarting. Try connecting in a few seconds.</p>" + "<p>Device restarting. Try connecting in a few " D_STR_SECONDS ".</p>" +
addJsReloadUrl(kUrlRoot, 10, true) + addJsReloadUrl(kUrlRoot, 10, true) +
htmlEnd()); htmlEnd());
// Do the clearing. // Do the clearing.
@ -1423,7 +1441,7 @@ void handleReset(void) {
server.send(200, "text/html", server.send(200, "text/html",
htmlHeader(F("Reset WiFi Config"), htmlHeader(F("Reset WiFi Config"),
F("Resetting the WiFiManager config back to defaults.")) + F("Resetting the WiFiManager config back to defaults.")) +
"<p>Device restarting. Try connecting in a few seconds.</p>" + "<p>Device restarting. Try connecting in a few " D_STR_SECONDS ".</p>" +
addJsReloadUrl(kUrlRoot, 10, true) + addJsReloadUrl(kUrlRoot, 10, true) +
htmlEnd()); htmlEnd());
// Do the reset. // Do the reset.
@ -1456,7 +1474,7 @@ void handleReboot() {
#endif #endif
server.send(200, "text/html", server.send(200, "text/html",
htmlHeader(F("Device restarting.")) + htmlHeader(F("Device restarting.")) +
"<p>Try connecting in a few seconds.</p>" + "<p>Try connecting in a few " D_STR_SECONDS ".</p>" +
addJsReloadUrl(kUrlRoot, kRebootTime, true) + addJsReloadUrl(kUrlRoot, kRebootTime, true) +
htmlEnd()); htmlEnd());
doRestart("Reboot requested"); doRestart("Reboot requested");
@ -2012,7 +2030,8 @@ void setup_wifi(void) {
if (!wifiManager.autoConnect()) if (!wifiManager.autoConnect())
// Reboot. A.k.a. "Have you tried turning it Off and On again?" // Reboot. A.k.a. "Have you tried turning it Off and On again?"
doRestart("Wifi failed to connect and hit timeout. Rebooting...", true); doRestart(D_STR_WIFI " failed to connect and hit timeout. Rebooting...",
true);
#if MQTT_ENABLE #if MQTT_ENABLE
strncpy(MqttServer, custom_mqtt_server.getValue(), kHostnameLength); strncpy(MqttServer, custom_mqtt_server.getValue(), kHostnameLength);
@ -2184,7 +2203,8 @@ void setup(void) {
server.send(200, "text/html", server.send(200, "text/html",
htmlHeader(F("Updating firmware")) + htmlHeader(F("Updating firmware")) +
"<hr>" "<hr>"
"<h3>Warning! Don't power off the device for 60 seconds!</h3>" "<h3>Warning! Don't " D_STR_POWER " " D_STR_OFF " the device for "
"60 " D_STR_SECONDS "!</h3>"
"<p>The firmware is uploading and will try to flash itself. " "<p>The firmware is uploading and will try to flash itself. "
"It is important to not interrupt the process.</p>" "It is important to not interrupt the process.</p>"
"<p>The firmware upload seems to have " + "<p>The firmware upload seems to have " +
@ -2768,12 +2788,12 @@ bool sendIRCode(IRsend *irsend, decode_type_t const ir_type,
} else { } else {
debug("Failed to send IR Message:"); debug("Failed to send IR Message:");
} }
debug("Type:"); debug(D_STR_PROTOCOL ": ");
debug(String(ir_type).c_str()); debug(String(ir_type).c_str());
// For "long" codes we basically repeat what we got. // For "long" codes we basically repeat what we got.
if (hasACState(ir_type) || ir_type == PRONTO || ir_type == RAW || if (hasACState(ir_type) || ir_type == PRONTO || ir_type == RAW ||
ir_type == GLOBALCACHE) { ir_type == GLOBALCACHE) {
debug("Code: "); debug(D_STR_CODE ": ");
debug(code_str); debug(code_str);
// Confirm what we were asked to send was sent. // Confirm what we were asked to send was sent.
#if MQTT_ENABLE #if MQTT_ENABLE
@ -2792,9 +2812,9 @@ bool sendIRCode(IRsend *irsend, decode_type_t const ir_type,
} }
#endif // MQTT_ENABLE #endif // MQTT_ENABLE
} else { // For "short" codes, we break it down a bit more before we report. } else { // For "short" codes, we break it down a bit more before we report.
debug(("Code: 0x" + uint64ToString(code, 16)).c_str()); debug((D_STR_CODE ": 0x" + uint64ToString(code, 16)).c_str());
debug(("Bits: " + String(bits)).c_str()); debug((D_STR_BITS ": " + String(bits)).c_str());
debug(("Repeats: " + String(repeat)).c_str()); debug((D_STR_REPEAT ": " + String(repeat)).c_str());
#if MQTT_ENABLE #if MQTT_ENABLE
if (success) { if (success) {
mqtt_client.publish(MqttAck.c_str(), (String(ir_type) + mqtt_client.publish(MqttAck.c_str(), (String(ir_type) +

View File

@ -65,7 +65,10 @@ IRsend irsend(kIrLed); // Set the GPIO to be used to sending the message.
void handleRoot() { void handleRoot() {
server.send(200, "text/html", server.send(200, "text/html",
"<html>" \ "<html>" \
"<head><title>" HOSTNAME " Demo</title></head>" \ "<head><title>" HOSTNAME " Demo </title>" \
"<meta http-equiv=\"Content-Type\" " \
"content=\"text/html;charset=utf-8\">" \
"</head>" \
"<body>" \ "<body>" \
"<h1>Hello from " HOSTNAME ", you can send NEC encoded IR" \ "<h1>Hello from " HOSTNAME ", you can send NEC encoded IR" \
"signals from here!</h1>" \ "signals from here!</h1>" \

View File

@ -0,0 +1,52 @@
[platformio]
src_dir = .
[env]
; Default platform
platform = espressif8266
; Default board
board = nodemcuv2
framework = arduino
lib_extra_dirs = ../../
lib_ldf_mode = deep+
lib_ignore = examples
build_flags = ; -D_IR_LOCALE_=en-AU
[env:nodemcuv2]
board = nodemcuv2
; build_flags = -D_IR_LOCALE_=en-AU
[env:esp32dev]
platform = espressif32
board = esp32dev
; build_flags = -D_IR_LOCALE_=en-AU
[env:de-CH]
build_flags = -D_IR_LOCALE_=de-CH ; German (Swiss)
[env:de-DE]
build_flags = -D_IR_LOCALE_=de-DE ; German
[env:en-AU]
build_flags = -D_IR_LOCALE_=en-AU ; English (Australian) (Default)
[env:en-IE]
build_flags = -D_IR_LOCALE_=en-IE ; English (Irish)
[env:en-UK]
build_flags = -D_IR_LOCALE_=en-UK ; English (UK)
[env:en-US]
build_flags = -D_IR_LOCALE_=en-US ; English (Simplified) (USA)
[env:es-ES]
build_flags = -D_IR_LOCALE_=es-ES ; Spanish
[env:fr-FR]
build_flags = -D_IR_LOCALE_=fr-FR ; French
[env:it-IT]
build_flags = -D_IR_LOCALE_=it-IT ; Italian
[env:zh-CN]
build_flags = -D_IR_LOCALE_=zh-CN ; Chinese (Simplified)

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

@ -629,6 +629,7 @@ xorBytes KEYWORD2
# Constants (LITERAL1) # Constants (LITERAL1)
####################################### #######################################
*kAllProtocolNamesStr LITERAL1
// LITERAL1 // LITERAL1
AIRWELL LITERAL1 AIRWELL LITERAL1
AIWA_RC_T501 LITERAL1 AIWA_RC_T501 LITERAL1

View File

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

View File

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

View File

@ -0,0 +1,21 @@
[platformio]
# Default to building IRrecvDumpV2 if not in a specific example directory.
src_dir = examples/IRrecvDumpV2
[env]
lib_extra_dirs = .
lib_ldf_mode = deep+
lib_ignore = examples
framework = arduino
platform = espressif8266
build_flags = ; -D_IR_LOCALE_=en-AU
[env:nodemcuv2]
board = nodemcuv2
[env:d1_mini]
board = d1_mini
[env:esp32dev]
platform = espressif32
board = esp32dev

View File

@ -52,7 +52,7 @@
#endif // UNIT_TEST #endif // UNIT_TEST
// Library Version // Library Version
#define _IRREMOTEESP8266_VERSION_ "2.7.5" #define _IRREMOTEESP8266_VERSION_ "2.7.6"
// Set the language & locale for the library. See the `locale` dir for options. // Set the language & locale for the library. See the `locale` dir for options.
#ifndef _IR_LOCALE_ #ifndef _IR_LOCALE_

View File

@ -163,3 +163,88 @@ const PROGMEM char* kFalseStr = D_STR_FALSE;
const PROGMEM char* kRepeatStr = D_STR_REPEAT; const PROGMEM char* kRepeatStr = D_STR_REPEAT;
const PROGMEM char* kCodeStr = D_STR_CODE; const PROGMEM char* kCodeStr = D_STR_CODE;
const PROGMEM char* kBitsStr = D_STR_BITS; const PROGMEM char* kBitsStr = D_STR_BITS;
// Protocol Names
// Needs to be in decode_type_t order.
const PROGMEM char *kAllProtocolNamesStr =
D_STR_UNUSED "\x0"
D_STR_RC5 "\x0"
D_STR_RC6 "\x0"
D_STR_NEC "\x0"
D_STR_SONY "\x0"
D_STR_PANASONIC "\x0"
D_STR_JVC "\x0"
D_STR_SAMSUNG "\x0"
D_STR_WHYNTER "\x0"
D_STR_AIWA_RC_T501 "\x0"
D_STR_LG "\x0"
D_STR_SANYO "\x0"
D_STR_MITSUBISHI "\x0"
D_STR_DISH "\x0"
D_STR_SHARP "\x0"
D_STR_COOLIX "\x0"
D_STR_DAIKIN "\x0"
D_STR_DENON "\x0"
D_STR_KELVINATOR "\x0"
D_STR_SHERWOOD "\x0"
D_STR_MITSUBISHI_AC "\x0"
D_STR_RCMM "\x0"
D_STR_SANYO_LC7461 "\x0"
D_STR_RC5X "\x0"
D_STR_GREE "\x0"
D_STR_PRONTO "\x0"
D_STR_NEC_LIKE "\x0"
D_STR_ARGO "\x0"
D_STR_TROTEC "\x0"
D_STR_NIKAI "\x0"
D_STR_RAW "\x0"
D_STR_GLOBALCACHE "\x0"
D_STR_TOSHIBA_AC "\x0"
D_STR_FUJITSU_AC "\x0"
D_STR_MIDEA "\x0"
D_STR_MAGIQUEST "\x0"
D_STR_LASERTAG "\x0"
D_STR_CARRIER_AC "\x0"
D_STR_HAIER_AC "\x0"
D_STR_MITSUBISHI2 "\x0"
D_STR_HITACHI_AC "\x0"
D_STR_HITACHI_AC1 "\x0"
D_STR_HITACHI_AC2 "\x0"
D_STR_GICABLE "\x0"
D_STR_HAIER_AC_YRW02 "\x0"
D_STR_WHIRLPOOL_AC "\x0"
D_STR_SAMSUNG_AC "\x0"
D_STR_LUTRON "\x0"
D_STR_ELECTRA_AC "\x0"
D_STR_PANASONIC_AC "\x0"
D_STR_PIONEER "\x0"
D_STR_LG2 "\x0"
D_STR_MWM "\x0"
D_STR_DAIKIN2 "\x0"
D_STR_VESTEL_AC "\x0"
D_STR_TECO "\x0"
D_STR_SAMSUNG36 "\x0"
D_STR_TCL112AC "\x0"
D_STR_LEGOPF "\x0"
D_STR_MITSUBISHI_HEAVY_88 "\x0"
D_STR_MITSUBISHI_HEAVY_152 "\x0"
D_STR_DAIKIN216 "\x0"
D_STR_SHARP_AC "\x0"
D_STR_GOODWEATHER "\x0"
D_STR_INAX "\x0"
D_STR_DAIKIN160 "\x0"
D_STR_NEOCLIMA "\x0"
D_STR_DAIKIN176 "\x0"
D_STR_DAIKIN128 "\x0"
D_STR_AMCOR "\x0"
D_STR_DAIKIN152 "\x0"
D_STR_MITSUBISHI136 "\x0"
D_STR_MITSUBISHI112 "\x0"
D_STR_HITACHI_AC424 "\x0"
D_STR_SONY_38K "\x0"
D_STR_EPSON "\x0"
D_STR_SYMPHONY "\x0"
D_STR_HITACHI_AC3 "\x0"
D_STR_DAIKIN64 "\x0"
D_STR_AIRWELL "\x0"
"\x0"; // This string requires double null termination.

View File

@ -17,6 +17,7 @@ extern const char* k3DStr;
extern const char* k6thSenseStr; extern const char* k6thSenseStr;
extern const char* k8CHeatStr; extern const char* k8CHeatStr;
extern const char* kAirFlowStr; extern const char* kAirFlowStr;
extern const char *kAllProtocolNamesStr;
extern const char* kAutomaticStr; extern const char* kAutomaticStr;
extern const char* kAutoStr; extern const char* kAutoStr;
extern const char* kBeepStr; extern const char* kBeepStr;

View File

@ -91,169 +91,14 @@ void serialPrintUint64(uint64_t input, uint8_t base) {
// Returns: // Returns:
// A decode_type_t enum. // A decode_type_t enum.
decode_type_t strToDecodeType(const char * const str) { decode_type_t strToDecodeType(const char * const str) {
if (!strcasecmp(str, kUnknownStr)) const char *ptr = kAllProtocolNamesStr;
return decode_type_t::UNKNOWN; uint16_t length = strlen(ptr);
else if (!strcasecmp(str, "UNUSED")) for (uint16_t i = 0; length; i++) {
return decode_type_t::UNUSED; if (!strcasecmp(str, ptr)) return (decode_type_t)i;
else if (!strcasecmp(str, "AIRWELL")) ptr += length + 1;
return decode_type_t::AIRWELL; length = strlen(ptr);
else if (!strcasecmp(str, "AIWA_RC_T501")) }
return decode_type_t::AIWA_RC_T501;
else if (!strcasecmp(str, "AMCOR"))
return decode_type_t::AMCOR;
else if (!strcasecmp(str, "ARGO"))
return decode_type_t::ARGO;
else if (!strcasecmp(str, "CARRIER_AC"))
return decode_type_t::CARRIER_AC;
else if (!strcasecmp(str, "COOLIX"))
return decode_type_t::COOLIX;
else if (!strcasecmp(str, "DAIKIN"))
return decode_type_t::DAIKIN;
else if (!strcasecmp(str, "DAIKIN128"))
return decode_type_t::DAIKIN128;
else if (!strcasecmp(str, "DAIKIN152"))
return decode_type_t::DAIKIN152;
else if (!strcasecmp(str, "DAIKIN160"))
return decode_type_t::DAIKIN160;
else if (!strcasecmp(str, "DAIKIN176"))
return decode_type_t::DAIKIN176;
else if (!strcasecmp(str, "DAIKIN2"))
return decode_type_t::DAIKIN2;
else if (!strcasecmp(str, "DAIKIN216"))
return decode_type_t::DAIKIN216;
else if (!strcasecmp(str, "DAIKIN64"))
return decode_type_t::DAIKIN64;
else if (!strcasecmp(str, "DENON"))
return decode_type_t::DENON;
else if (!strcasecmp(str, "DISH"))
return decode_type_t::DISH;
else if (!strcasecmp(str, "ELECTRA_AC"))
return decode_type_t::ELECTRA_AC;
else if (!strcasecmp(str, "EPSON"))
return decode_type_t::EPSON;
else if (!strcasecmp(str, "FUJITSU_AC"))
return decode_type_t::FUJITSU_AC;
else if (!strcasecmp(str, "GICABLE"))
return decode_type_t::GICABLE;
else if (!strcasecmp(str, "GLOBALCACHE"))
return decode_type_t::GLOBALCACHE;
else if (!strcasecmp(str, "GOODWEATHER"))
return decode_type_t::GOODWEATHER;
else if (!strcasecmp(str, "GREE"))
return decode_type_t::GREE;
else if (!strcasecmp(str, "HAIER_AC"))
return decode_type_t::HAIER_AC;
else if (!strcasecmp(str, "HAIER_AC_YRW02"))
return decode_type_t::HAIER_AC_YRW02;
else if (!strcasecmp(str, "HITACHI_AC"))
return decode_type_t::HITACHI_AC;
else if (!strcasecmp(str, "HITACHI_AC1"))
return decode_type_t::HITACHI_AC1;
else if (!strcasecmp(str, "HITACHI_AC2"))
return decode_type_t::HITACHI_AC2;
else if (!strcasecmp(str, "HITACHI_AC3"))
return decode_type_t::HITACHI_AC3;
else if (!strcasecmp(str, "HITACHI_AC424"))
return decode_type_t::HITACHI_AC424;
else if (!strcasecmp(str, "INAX"))
return decode_type_t::INAX;
else if (!strcasecmp(str, "JVC"))
return decode_type_t::JVC;
else if (!strcasecmp(str, "KELVINATOR"))
return decode_type_t::KELVINATOR;
else if (!strcasecmp(str, "LEGOPF"))
return decode_type_t::LEGOPF;
else if (!strcasecmp(str, "LG"))
return decode_type_t::LG;
else if (!strcasecmp(str, "LG2"))
return decode_type_t::LG2;
else if (!strcasecmp(str, "LASERTAG"))
return decode_type_t::LASERTAG;
else if (!strcasecmp(str, "LUTRON"))
return decode_type_t::LUTRON;
else if (!strcasecmp(str, "MAGIQUEST"))
return decode_type_t::MAGIQUEST;
else if (!strcasecmp(str, "MIDEA"))
return decode_type_t::MIDEA;
else if (!strcasecmp(str, "MITSUBISHI"))
return decode_type_t::MITSUBISHI;
else if (!strcasecmp(str, "MITSUBISHI2"))
return decode_type_t::MITSUBISHI2;
else if (!strcasecmp(str, "MITSUBISHI_AC"))
return decode_type_t::MITSUBISHI_AC;
else if (!strcasecmp(str, "MITSUBISHI136"))
return decode_type_t::MITSUBISHI136;
else if (!strcasecmp(str, "MITSUBISHI112"))
return decode_type_t::MITSUBISHI112;
else if (!strcasecmp(str, "MITSUBISHI_HEAVY_88"))
return decode_type_t::MITSUBISHI_HEAVY_88;
else if (!strcasecmp(str, "MITSUBISHI_HEAVY_152"))
return decode_type_t::MITSUBISHI_HEAVY_152;
else if (!strcasecmp(str, "MWM"))
return decode_type_t::MWM;
else if (!strcasecmp(str, "NEOCLIMA"))
return decode_type_t::NEOCLIMA;
else if (!strcasecmp(str, "NEC"))
return decode_type_t::NEC;
else if (!strcasecmp(str, "NEC_LIKE") ||
!strcasecmp(str, "NEC (NON-STRICT)"))
return decode_type_t::NEC_LIKE;
else if (!strcasecmp(str, "NIKAI"))
return decode_type_t::NIKAI;
else if (!strcasecmp(str, "PANASONIC"))
return decode_type_t::PANASONIC;
else if (!strcasecmp(str, "PANASONIC_AC"))
return decode_type_t::PANASONIC_AC;
else if (!strcasecmp(str, "PIONEER"))
return decode_type_t::PIONEER;
else if (!strcasecmp(str, "PRONTO"))
return decode_type_t::PRONTO;
else if (!strcasecmp(str, "RAW"))
return decode_type_t::RAW;
else if (!strcasecmp(str, "RC5"))
return decode_type_t::RC5;
else if (!strcasecmp(str, "RC5X"))
return decode_type_t::RC5X;
else if (!strcasecmp(str, "RC6"))
return decode_type_t::RC6;
else if (!strcasecmp(str, "RCMM"))
return decode_type_t::RCMM;
else if (!strcasecmp(str, "SAMSUNG"))
return decode_type_t::SAMSUNG;
else if (!strcasecmp(str, "SAMSUNG36"))
return decode_type_t::SAMSUNG36;
else if (!strcasecmp(str, "SAMSUNG_AC"))
return decode_type_t::SAMSUNG_AC;
else if (!strcasecmp(str, "SANYO"))
return decode_type_t::SANYO;
else if (!strcasecmp(str, "SANYO_LC7461"))
return decode_type_t::SANYO_LC7461;
else if (!strcasecmp(str, "SHARP"))
return decode_type_t::SHARP;
else if (!strcasecmp(str, "SHARP_AC"))
return decode_type_t::SHARP_AC;
else if (!strcasecmp(str, "SHERWOOD"))
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, "SYMPHONY"))
return decode_type_t::SYMPHONY;
else if (!strcasecmp(str, "TCL112AC"))
return decode_type_t::TCL112AC;
else if (!strcasecmp(str, "TECO"))
return decode_type_t::TECO;
else if (!strcasecmp(str, "TOSHIBA_AC"))
return decode_type_t::TOSHIBA_AC;
else if (!strcasecmp(str, "TROTEC"))
return decode_type_t::TROTEC;
else if (!strcasecmp(str, "VESTEL_AC"))
return decode_type_t::VESTEL_AC;
else if (!strcasecmp(str, "WHIRLPOOL_AC"))
return decode_type_t::WHIRLPOOL_AC;
else if (!strcasecmp(str, "WHYNTER"))
return decode_type_t::WHYNTER;
// Handle integer values of the type by converting to a string and back again. // Handle integer values of the type by converting to a string and back again.
decode_type_t result = strToDecodeType( decode_type_t result = strToDecodeType(
typeToString((decode_type_t)atoi(str)).c_str()); typeToString((decode_type_t)atoi(str)).c_str());
@ -271,251 +116,17 @@ decode_type_t strToDecodeType(const char * const str) {
// A string containing the protocol name. // A string containing the protocol name.
String typeToString(const decode_type_t protocol, const bool isRepeat) { String typeToString(const decode_type_t protocol, const bool isRepeat) {
String result = ""; String result = "";
switch (protocol) { const char *ptr = kAllProtocolNamesStr;
case UNUSED: if (protocol > kLastDecodeType || protocol == decode_type_t::UNKNOWN) {
result = F("UNUSED"); result = kUnknownStr;
break; } else {
case AIRWELL: for (uint16_t i = 0; i <= protocol && strlen(ptr); i++) {
result = F("AIRWELL"); if (i == protocol) {
break; result = ptr;
case AIWA_RC_T501: break;
result = F("AIWA_RC_T501"); }
break; ptr += strlen(ptr) + 1;
case AMCOR: }
result = F("AMCOR");
break;
case ARGO:
result = F("ARGO");
break;
case CARRIER_AC:
result = F("CARRIER_AC");
break;
case COOLIX:
result = F("COOLIX");
break;
case DAIKIN:
result = F("DAIKIN");
break;
case DAIKIN128:
result = F("DAIKIN128");
break;
case DAIKIN152:
result = F("DAIKIN152");
break;
case DAIKIN160:
result = F("DAIKIN160");
break;
case DAIKIN176:
result = F("DAIKIN176");
break;
case DAIKIN2:
result = F("DAIKIN2");
break;
case DAIKIN216:
result = F("DAIKIN216");
break;
case DAIKIN64:
result = F("DAIKIN64");
break;
case DENON:
result = F("DENON");
break;
case DISH:
result = F("DISH");
break;
case ELECTRA_AC:
result = F("ELECTRA_AC");
break;
case EPSON:
result = F("EPSON");
break;
case FUJITSU_AC:
result = F("FUJITSU_AC");
break;
case GICABLE:
result = F("GICABLE");
break;
case GLOBALCACHE:
result = F("GLOBALCACHE");
break;
case GOODWEATHER:
result = F("GOODWEATHER");
break;
case GREE:
result = F("GREE");
break;
case HAIER_AC:
result = F("HAIER_AC");
break;
case HAIER_AC_YRW02:
result = F("HAIER_AC_YRW02");
break;
case HITACHI_AC:
result = F("HITACHI_AC");
break;
case HITACHI_AC1:
result = F("HITACHI_AC1");
break;
case HITACHI_AC2:
result = F("HITACHI_AC2");
break;
case HITACHI_AC3:
result = F("HITACHI_AC3");
break;
case HITACHI_AC424:
result = F("HITACHI_AC424");
break;
case INAX:
result = F("INAX");
break;
case JVC:
result = F("JVC");
break;
case KELVINATOR:
result = F("KELVINATOR");
break;
case LEGOPF:
result = F("LEGOPF");
break;
case LG:
result = F("LG");
break;
case LG2:
result = F("LG2");
break;
case LASERTAG:
result = F("LASERTAG");
break;
case LUTRON:
result = F("LUTRON");
break;
case MAGIQUEST:
result = F("MAGIQUEST");
break;
case MIDEA:
result = F("MIDEA");
break;
case MITSUBISHI:
result = F("MITSUBISHI");
break;
case MITSUBISHI2:
result = F("MITSUBISHI2");
break;
case MITSUBISHI_AC:
result = F("MITSUBISHI_AC");
break;
case MITSUBISHI136:
result = F("MITSUBISHI136");
break;
case MITSUBISHI112:
result = F("MITSUBISHI112");
break;
case MITSUBISHI_HEAVY_88:
result = F("MITSUBISHI_HEAVY_88");
break;
case MITSUBISHI_HEAVY_152:
result = F("MITSUBISHI_HEAVY_152");
break;
case MWM:
result = F("MWM");
break;
case NEOCLIMA:
result = F("NEOCLIMA");
break;
case NEC:
result = F("NEC");
break;
case NEC_LIKE:
result = F("NEC (non-strict)");
break;
case NIKAI:
result = F("NIKAI");
break;
case PANASONIC:
result = F("PANASONIC");
break;
case PANASONIC_AC:
result = F("PANASONIC_AC");
break;
case PIONEER:
result = F("PIONEER");
break;
case PRONTO:
result = F("PRONTO");
break;
case RAW:
result = F("RAW");
break;
case RC5:
result = F("RC5");
break;
case RC5X:
result = F("RC5X");
break;
case RC6:
result = F("RC6");
break;
case RCMM:
result = F("RCMM");
break;
case SAMSUNG:
result = F("SAMSUNG");
break;
case SAMSUNG36:
result = F("SAMSUNG36");
break;
case SAMSUNG_AC:
result = F("SAMSUNG_AC");
break;
case SANYO:
result = F("SANYO");
break;
case SANYO_LC7461:
result = F("SANYO_LC7461");
break;
case SHARP:
result = F("SHARP");
break;
case SHARP_AC:
result = F("SHARP_AC");
break;
case SHERWOOD:
result = F("SHERWOOD");
break;
case SONY:
result = F("SONY");
break;
case SONY_38K:
result = F("SONY_38K");
break;
case SYMPHONY:
result = F("SYMPHONY");
break;
case TCL112AC:
result = F("TCL112AC");
break;
case TECO:
result = F("TECO");
break;
case TOSHIBA_AC:
result = F("TOSHIBA_AC");
break;
case TROTEC:
result = F("TROTEC");
break;
case VESTEL_AC:
result = F("VESTEL_AC");
break;
case WHIRLPOOL_AC:
result = F("WHIRLPOOL_AC");
break;
case WHYNTER:
result = F("WHYNTER");
break;
case UNKNOWN:
default:
result = kUnknownStr;
break;
} }
if (isRepeat) { if (isRepeat) {
result += kSpaceLBraceStr; result += kSpaceLBraceStr;

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