diff --git a/CHANGELOG.md b/CHANGELOG.md index a03f301f6052..414b4e7e6ac3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,11 @@ All notable changes to this project will be documented in this file. ## [Unreleased] - Development -## [9.2.0.4] +## [9.2.0.5] +### Changed +- ESP32 increase number of relay GPIOs from 8 to 28 + +## [9.2.0.4] 20210204 ### Added - Function ``AddLog`` to provide logging for up to 128 (LOGSZ) characters to save stack space - Commands ``ChannelRemap``, ``MultiPWM``, ``AlexaCTRange``, ``PowerOnFade``, ``PWMCT``, ``WhiteBlend`` and ``VirtualCT`` as synonyms for ``SetOption37, 68, 82, 91, 92, 105`` and ``106`` diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 7f07058ff82a..e3a0cdd7393e 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -56,7 +56,7 @@ The attached binaries can also be downloaded from http://ota.tasmota.com/tasmota [Complete list](BUILDS.md) of available feature and sensors. -## Changelog v9.2.0.4 +## Changelog v9.2.0.5 ### Added - Command ``CTRange`` to specify the visible CT range the bulb is capable of [#10311](https://github.com/arendst/Tasmota/issues/10311) - Command ``L1MusicSync <0|Off>|<1|On>|<2|Toggle>, 1..10, 1..100>`` to control Sonoff L1 Music Sync mode sensitivity and speed [#10722](https://github.com/arendst/Tasmota/issues/10722) @@ -120,6 +120,7 @@ The attached binaries can also be downloaded from http://ota.tasmota.com/tasmota - Force initial default state ``SetOption57 1`` to scan wifi network every 44 minutes for strongest signal [#10395](https://github.com/arendst/Tasmota/issues/10395) - PubSubClient MQTT_SOCKET_TIMEOUT from 15 to 4 seconds - Domoticz fixed 2 decimals resolution by user selectable ``TempRes``, ``HumRes`` and ``PressRes`` resolutions +- ESP32 increase number of relay GPIOs from 8 to 28 ### Fixed - Redesign syslog and mqttlog using log buffer [#10164](https://github.com/arendst/Tasmota/issues/10164) diff --git a/tasmota/tasmota.h b/tasmota/tasmota.h index 77853258bf29..5869e248908d 100644 --- a/tasmota/tasmota.h +++ b/tasmota/tasmota.h @@ -48,9 +48,16 @@ const uint32_t POWER_MASK = 0xffffffffUL; // Power (Relay) full mask * Constants \*********************************************************************************************/ +#ifdef ESP8266 +const uint8_t MAX_RELAYS = 8; // Max number of relays +#endif // ESP8266 +#ifdef ESP32 +const uint8_t MAX_RELAYS = 28; // Max number of relays +#endif // ESP32 + // Changes to the following MAX_ defines will impact settings layout const uint8_t MAX_SWITCHES = 8; // Max number of switches -const uint8_t MAX_RELAYS = 8; // Max number of relays +const uint8_t MAX_SHUTTER_RELAYS = 8; // Max number of shutter relays const uint8_t MAX_INTERLOCKS = 4; // Max number of interlock groups (MAX_RELAYS / 2) const uint8_t MAX_LEDS = 4; // Max number of leds const uint8_t MAX_KEYS = 4; // Max number of keys or buttons diff --git a/tasmota/tasmota_version.h b/tasmota/tasmota_version.h index f0a110311d7c..a4a267a0f9d0 100644 --- a/tasmota/tasmota_version.h +++ b/tasmota/tasmota_version.h @@ -20,6 +20,6 @@ #ifndef _TASMOTA_VERSION_H_ #define _TASMOTA_VERSION_H_ -const uint32_t VERSION = 0x09020004; +const uint32_t VERSION = 0x09020005; #endif // _TASMOTA_VERSION_H_ diff --git a/tasmota/xdrv_01_webserver.ino b/tasmota/xdrv_01_webserver.ino index ed9efb56239b..2d4604128bfa 100644 --- a/tasmota/xdrv_01_webserver.ino +++ b/tasmota/xdrv_01_webserver.ino @@ -1447,8 +1447,8 @@ void HandleTemplateConfiguration(void) for (uint32_t i = 0; i < MAX_GPIO_PIN; i++) { if (!FlashPin(i)) { WSContentSend_P(PSTR("" D_GPIO "%d"), - ((9==i)||(10==i)) ? WebColor(COL_TEXT_WARNING) : WebColor(COL_TEXT), i, (0==i) ? PSTR(" style='width:150px'") : "", i, i); - WSContentSend_P(PSTR(""), i); + ((9==i)||(10==i)) ? WebColor(COL_TEXT_WARNING) : WebColor(COL_TEXT), i, (0==i) ? PSTR(" style='width:146px'") : "", i, i); + WSContentSend_P(PSTR(""), i); } } WSContentSend_P(PSTR("")); @@ -1566,9 +1566,9 @@ void HandleModuleConfiguration(void) for (uint32_t i = 0; i < ARRAY_SIZE(template_gp.io); i++) { if (ValidGPIO(i, template_gp.io[i])) { snprintf_P(stemp, 3, PINS_WEMOS +i*2); - WSContentSend_P(PSTR("%s " D_GPIO "%d"), + WSContentSend_P(PSTR("%s " D_GPIO "%d"), (WEMOS==TasmotaGlobal.module_type)?stemp:"", i, i, i); - WSContentSend_P(PSTR(""), i); + WSContentSend_P(PSTR(""), i); } } WSContentSend_P(PSTR("")); diff --git a/tasmota/xdrv_12_home_assistant.ino b/tasmota/xdrv_12_home_assistant.ino index 07dcf9f6bab0..3280c8cb06c1 100644 --- a/tasmota/xdrv_12_home_assistant.ino +++ b/tasmota/xdrv_12_home_assistant.ino @@ -209,8 +209,8 @@ typedef struct HASS { void HassDiscoveryRelays(struct HASS &Hass) { Hass = {.Relay={0,0,0,0,0,0,0,0}, .RelLst={'\0'}}; - uint16_t Shutter[8] = {0,0,0,0,0,0,0,0}; // Array to store a temp list for shutters - uint8_t lightidx = MAX_RELAYS + 1; // Will store the starting position of the lights + uint16_t Shutter[MAX_RELAYS] = { 0 }; // Array to store a temp list for shutters + uint8_t lightidx = MAX_RELAYS + 1; // Will store the starting position of the lights bool iFan = false; Hass.RelPst = TasmotaGlobal.devices_present > 0; @@ -241,7 +241,7 @@ void HassDiscoveryRelays(struct HASS &Hass) if (0 == Settings.shutter_startrelay[k]) { break; } else { - if (Settings.shutter_startrelay[k] > 0 && Settings.shutter_startrelay[k] <= MAX_RELAYS) { + if (Settings.shutter_startrelay[k] > 0 && Settings.shutter_startrelay[k] <= MAX_SHUTTER_RELAYS) { Shutter[Settings.shutter_startrelay[k]-1] = Shutter[Settings.shutter_startrelay[k]] = 1; } } @@ -429,7 +429,7 @@ void HAssAnnounceRelayLight(void) #ifdef USE_SHUTTER if (Settings.flag3.shutter_mode) { for (uint32_t i = 0; i < MAX_SHUTTERS; i++) { - if (Settings.shutter_startrelay[i] > 0 && Settings.shutter_startrelay[i] <= MAX_RELAYS) { + if (Settings.shutter_startrelay[i] > 0 && Settings.shutter_startrelay[i] <= MAX_SHUTTER_RELAYS) { bitSet(shutter_mask, Settings.shutter_startrelay[i] -1); bitSet(shutter_mask, Settings.shutter_startrelay[i]); } @@ -957,7 +957,7 @@ void HAssAnnounceShutters(void) snprintf_P(unique_id, sizeof(unique_id), PSTR("%06X_SHT_%d"), ESP_getChipId(), i + 1); snprintf_P(stopic, sizeof(stopic), PSTR(HOME_ASSISTANT_DISCOVERY_PREFIX "/cover/%s/config"), unique_id); - if (Settings.flag.hass_discovery && Settings.flag3.shutter_mode && Settings.shutter_startrelay[i] > 0 && Settings.shutter_startrelay[i] <= MAX_RELAYS) { + if (Settings.flag.hass_discovery && Settings.flag3.shutter_mode && Settings.shutter_startrelay[i] > 0 && Settings.shutter_startrelay[i] <= MAX_SHUTTER_RELAYS) { ShowTopic = 0; // Show the new generated topic if (i > MAX_FRIENDLYNAMES) { snprintf_P(stemp1, sizeof(stemp1), PSTR("%s Shutter %d"), SettingsText(SET_DEVICENAME), i + 1);