mirror of https://github.com/arendst/Tasmota.git
Fix ESP8266 Device Group exception due to lack of stack space (#22271)
This commit is contained in:
parent
23e5a4dec2
commit
71dfae2d9d
|
@ -41,6 +41,7 @@ All notable changes to this project will be documented in this file.
|
||||||
- ESP32-C2 TasmotaLED from not present I2S to SPI (#22575)
|
- ESP32-C2 TasmotaLED from not present I2S to SPI (#22575)
|
||||||
- KNX Scenes index change regression from v14.2.0.4 (#22405)
|
- KNX Scenes index change regression from v14.2.0.4 (#22405)
|
||||||
- Add GUI submenu headers and refresh configuration button text (#22592)
|
- Add GUI submenu headers and refresh configuration button text (#22592)
|
||||||
|
- ESP8266 Device Group exception due to lack of stack space (#22271)
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
|
|
||||||
|
|
|
@ -36,9 +36,9 @@ While fallback or downgrading is common practice it was never supported due to S
|
||||||
|
|
||||||
This release will be supported from ESP8266/Arduino library Core version **2.7.8** due to reported security and stability issues on previous Core version. This will also support gzipped binaries.
|
This release will be supported from ESP8266/Arduino library Core version **2.7.8** due to reported security and stability issues on previous Core version. This will also support gzipped binaries.
|
||||||
|
|
||||||
This release will be supported from ESP32/Arduino library Core version **v3.1.0.240926**.
|
This release will be supported from ESP32/Arduino library Core version **v3.1.0.241206**.
|
||||||
|
|
||||||
Support of ESP8266 Core versions before 2.7.8 and ESP32 Core versions before v3.1.0.240926 have been removed.
|
Support of ESP8266 Core versions before 2.7.8 and ESP32 Core versions before v3.1.0.241206 have been removed.
|
||||||
|
|
||||||
## Support of TLS
|
## Support of TLS
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ Historical binaries can be downloaded from
|
||||||
The latter links can be used for OTA upgrades too like ``OtaUrl http://ota.tasmota.com/tasmota/release/tasmota.bin.gz``
|
The latter links can be used for OTA upgrades too like ``OtaUrl http://ota.tasmota.com/tasmota/release/tasmota.bin.gz``
|
||||||
|
|
||||||
### ESP32, ESP32-C2, ESP32-C3, ESP32-C6, ESP32-S2 and ESP32-S3 based
|
### ESP32, ESP32-C2, ESP32-C3, ESP32-C6, ESP32-S2 and ESP32-S3 based
|
||||||
The following binary downloads have been compiled with ESP32/Arduino library core version **v3.1.0.240926**.
|
The following binary downloads have been compiled with ESP32/Arduino library core version **v3.1.0.241206**.
|
||||||
|
|
||||||
- **tasmota32.bin** = The Tasmota version with most drivers including additional sensors and KNX for 4M+ flash. **RECOMMENDED RELEASE BINARY**
|
- **tasmota32.bin** = The Tasmota version with most drivers including additional sensors and KNX for 4M+ flash. **RECOMMENDED RELEASE BINARY**
|
||||||
- **tasmota32solo1.bin** = The Tasmota version with most drivers including additional sensors and KNX for single core ESP32 and 4M+ flash.
|
- **tasmota32solo1.bin** = The Tasmota version with most drivers including additional sensors and KNX for single core ESP32 and 4M+ flash.
|
||||||
|
@ -188,6 +188,7 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm
|
||||||
- Mitsubishi Electric HVAC Standby Stage for MiElHVAC [#22430](https://github.com/arendst/Tasmota/issues/22430)
|
- Mitsubishi Electric HVAC Standby Stage for MiElHVAC [#22430](https://github.com/arendst/Tasmota/issues/22430)
|
||||||
- EQ3 TRV firmware version 1.46 fails if the default true is used in subscribe on the notify characteristic [#22328](https://github.com/arendst/Tasmota/issues/22328)
|
- EQ3 TRV firmware version 1.46 fails if the default true is used in subscribe on the notify characteristic [#22328](https://github.com/arendst/Tasmota/issues/22328)
|
||||||
- Ethernet on -DFRAMEWORK_ARDUINO_ITEAD framework regression from v14.3.0 [#22367](https://github.com/arendst/Tasmota/issues/22367)
|
- Ethernet on -DFRAMEWORK_ARDUINO_ITEAD framework regression from v14.3.0 [#22367](https://github.com/arendst/Tasmota/issues/22367)
|
||||||
|
- ESP8266 Device Group exception due to lack of stack space (#22271)[#22271](https://github.com/arendst/Tasmota/issues/22271)
|
||||||
- ESP32 Upgrade by file upload response based on file size [#22500](https://github.com/arendst/Tasmota/issues/22500)
|
- ESP32 Upgrade by file upload response based on file size [#22500](https://github.com/arendst/Tasmota/issues/22500)
|
||||||
- ESP32 Arduino Core IPv6 zones used by Matter [#22378](https://github.com/arendst/Tasmota/issues/22378)
|
- ESP32 Arduino Core IPv6 zones used by Matter [#22378](https://github.com/arendst/Tasmota/issues/22378)
|
||||||
- ESP32, ESP32-S2 and ESP32-S3 re-enable touch buttons [#22446](https://github.com/arendst/Tasmota/issues/22446)
|
- ESP32, ESP32-S2 and ESP32-S3 re-enable touch buttons [#22446](https://github.com/arendst/Tasmota/issues/22446)
|
||||||
|
|
|
@ -2654,11 +2654,12 @@ void AddLogData(uint32_t loglevel, const char* log_data, const char* log_data_pa
|
||||||
// Each entry has this format: [index][loglevel][log data]['\1']
|
// Each entry has this format: [index][loglevel][log data]['\1']
|
||||||
|
|
||||||
// Truncate log messages longer than MAX_LOGSZ which is the log buffer size minus 64 spare
|
// Truncate log messages longer than MAX_LOGSZ which is the log buffer size minus 64 spare
|
||||||
|
char *too_long = nullptr;
|
||||||
uint32_t log_data_len = strlen(log_data) + strlen(log_data_payload) + strlen(log_data_retained);
|
uint32_t log_data_len = strlen(log_data) + strlen(log_data_payload) + strlen(log_data_retained);
|
||||||
char too_long[TOPSZ];
|
|
||||||
if (log_data_len > MAX_LOGSZ) {
|
if (log_data_len > MAX_LOGSZ) {
|
||||||
snprintf_P(too_long, sizeof(too_long) - 20, PSTR("%s%s"), log_data, log_data_payload); // 20 = strlen("... 123456 truncated")
|
too_long = (char*)malloc(TOPSZ); // Use heap in favour of stack
|
||||||
snprintf_P(too_long, sizeof(too_long), PSTR("%s... %d truncated"), too_long, log_data_len);
|
snprintf_P(too_long, TOPSZ - 20, PSTR("%s%s"), log_data, log_data_payload); // 20 = strlen("... 123456 truncated")
|
||||||
|
snprintf_P(too_long, TOPSZ, PSTR("%s... %d truncated"), too_long, log_data_len);
|
||||||
log_data = too_long;
|
log_data = too_long;
|
||||||
log_data_payload = empty;
|
log_data_payload = empty;
|
||||||
log_data_retained = empty;
|
log_data_retained = empty;
|
||||||
|
@ -2679,6 +2680,9 @@ void AddLogData(uint32_t loglevel, const char* log_data, const char* log_data_pa
|
||||||
}
|
}
|
||||||
snprintf_P(TasmotaGlobal.log_buffer, LOG_BUFFER_SIZE, PSTR("%s%c%c%s%s%s%s\1"),
|
snprintf_P(TasmotaGlobal.log_buffer, LOG_BUFFER_SIZE, PSTR("%s%c%c%s%s%s%s\1"),
|
||||||
TasmotaGlobal.log_buffer, TasmotaGlobal.log_buffer_pointer++, '0'+loglevel, mxtime, log_data, log_data_payload, log_data_retained);
|
TasmotaGlobal.log_buffer, TasmotaGlobal.log_buffer_pointer++, '0'+loglevel, mxtime, log_data, log_data_payload, log_data_retained);
|
||||||
|
if (too_long) {
|
||||||
|
free(too_long);
|
||||||
|
}
|
||||||
TasmotaGlobal.log_buffer_pointer &= 0xFF;
|
TasmotaGlobal.log_buffer_pointer &= 0xFF;
|
||||||
if (!TasmotaGlobal.log_buffer_pointer) {
|
if (!TasmotaGlobal.log_buffer_pointer) {
|
||||||
TasmotaGlobal.log_buffer_pointer++; // Index 0 is not allowed as it is the end of char string
|
TasmotaGlobal.log_buffer_pointer++; // Index 0 is not allowed as it is the end of char string
|
||||||
|
|
|
@ -348,6 +348,13 @@ void ExecuteCommand(const char *cmnd, uint32_t source)
|
||||||
CommandHandler(stopic, svalue, strlen(svalue));
|
CommandHandler(stopic, svalue, strlen(svalue));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool GetFallbackTopicFlag(char* topicBuf) {
|
||||||
|
// Use this function to free CommandHandler stack space from TOPSZ
|
||||||
|
char stemp1[TOPSZ];
|
||||||
|
GetFallbackTopic_P(stemp1, ""); // Full Fallback topic = cmnd/DVES_xxxxxxxx_fb/
|
||||||
|
return (!strncmp(topicBuf, stemp1, strlen(stemp1)));
|
||||||
|
}
|
||||||
|
|
||||||
/********************************************************************************************/
|
/********************************************************************************************/
|
||||||
|
|
||||||
// topicBuf: /power1 dataBuf: toggle = Console command
|
// topicBuf: /power1 dataBuf: toggle = Console command
|
||||||
|
@ -369,9 +376,7 @@ void CommandHandler(char* topicBuf, char* dataBuf, uint32_t data_len) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
char stemp1[TOPSZ];
|
TasmotaGlobal.fallback_topic_flag = GetFallbackTopicFlag(topicBuf);
|
||||||
GetFallbackTopic_P(stemp1, ""); // Full Fallback topic = cmnd/DVES_xxxxxxxx_fb/
|
|
||||||
TasmotaGlobal.fallback_topic_flag = (!strncmp(topicBuf, stemp1, strlen(stemp1)));
|
|
||||||
|
|
||||||
char *type = strrchr(topicBuf, '/'); // Last part of received topic is always the command (type)
|
char *type = strrchr(topicBuf, '/'); // Last part of received topic is always the command (type)
|
||||||
|
|
||||||
|
@ -416,11 +421,13 @@ void CommandHandler(char* topicBuf, char* dataBuf, uint32_t data_len) {
|
||||||
}
|
}
|
||||||
|
|
||||||
Response_P(PSTR("_1")); // Signal error message for either Command Error or Command Unknown
|
Response_P(PSTR("_1")); // Signal error message for either Command Error or Command Unknown
|
||||||
char number[12];
|
char stemp1[16];
|
||||||
char command_line[64];
|
// char command_line[64];
|
||||||
snprintf_P(command_line, sizeof(command_line), PSTR("%s%s%s%s"),
|
// snprintf_P(command_line, sizeof(command_line), PSTR("%s%s%s%s"),
|
||||||
|
char *command_line = (char*)malloc(64); // Use heap in favour of stack
|
||||||
|
snprintf_P(command_line, 64, PSTR("%s%s%s%s"),
|
||||||
type,
|
type,
|
||||||
(index != 1) ? itoa(index, number, 10) : "",
|
(index != 1) ? itoa(index, stemp1, 10) : "",
|
||||||
(data_len) ? " " : "",
|
(data_len) ? " " : "",
|
||||||
(data_len) ? (binary_data) ? HexToString((uint8_t*)dataBuf, data_len).c_str() : EscapeJSONString(dataBuf).c_str() : "");
|
(data_len) ? (binary_data) ? HexToString((uint8_t*)dataBuf, data_len).c_str() : EscapeJSONString(dataBuf).c_str() : "");
|
||||||
|
|
||||||
|
@ -483,6 +490,7 @@ void CommandHandler(char* topicBuf, char* dataBuf, uint32_t data_len) {
|
||||||
}
|
}
|
||||||
ResponseAppend_P(PSTR(",\"Input\":\"%s\"}"), command_line);
|
ResponseAppend_P(PSTR(",\"Input\":\"%s\"}"), command_line);
|
||||||
}
|
}
|
||||||
|
free(command_line);
|
||||||
|
|
||||||
if (ResponseLength()) {
|
if (ResponseLength()) {
|
||||||
if (TasmotaGlobal.no_mqtt_response){ // If it is activated, Tasmota will not publish MQTT messages, but it will proccess event trigger rules
|
if (TasmotaGlobal.no_mqtt_response){ // If it is activated, Tasmota will not publish MQTT messages, but it will proccess event trigger rules
|
||||||
|
|
|
@ -566,7 +566,8 @@ bool MqttPublishLib(const char* topic, const uint8_t* payload, unsigned int plen
|
||||||
|
|
||||||
MqttClient.endPublish();
|
MqttClient.endPublish();
|
||||||
|
|
||||||
yield(); // #3313
|
// yield(); // #3313
|
||||||
|
delay(0);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue