Merge branch 'development' into prerelease-14.4.1

This commit is contained in:
Theo Arends 2024-12-15 14:17:09 +01:00
commit b352d34565
6 changed files with 116 additions and 72 deletions

View File

@ -9,15 +9,20 @@ All notable changes to this project will be documented in this file.
## [14.4.0.1] 20241215
### Added
- MCP23XXX_DRV control register IOCON in template (#22622)
- ESP32 support for TLS ECDSA (#22649)
### Changed
- Berry make Leds animate calls reentrant (#22643)
- SSL clean up remnants of old fingerprint algorithm (#22645)
- Display removed PWM control of backlight GPIO for universal display regression from v14.1.0
### Fixed
- ESP32 rules operation priority regression from v13.3.0.4 (#22636)
- GUI display power button regression from v14.3.0.5 (#15788)
- MCP23xxx, PCF8574 and Shift595 power control when a display is configured regression from v14.3.0.7
- Display DisplayMode adds a display device while not configured
- GUI intermittent exception on screen updates due to flash access
- GUI timing related divide by zero exception
## [14.4.0] 20241211
- Release Rudolph

View File

@ -116,6 +116,22 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm
## Changelog v14.4.1 Rudolph
### Added
- MCP23XXX_DRV control register IOCON in template [#22622](https://github.com/arendst/Tasmota/issues/22622)
- ESP32 support for TLS ECDSA [#22649](https://github.com/arendst/Tasmota/issues/22649)
### Changed
- Display removed PWM control of backlight GPIO regression from v14.1.0
- SSL clean up remnants of old fingerprint algorithm [#22645](https://github.com/arendst/Tasmota/issues/22645)
- Berry make Leds animate calls reentrant [#22643](https://github.com/arendst/Tasmota/issues/22643)
### Fixed
- Display DisplayMode adds a display device while not configured
- GUI display power button regression from v14.3.0.5 [#15788](https://github.com/arendst/Tasmota/issues/15788)
- MCP23xxx, PCF8574 and Shift595 power control when a display is configured regression from v14.3.0.7
- ESP32 rules operation priority regression from v13.3.0.4 [#22636](https://github.com/arendst/Tasmota/issues/22636)
## Changelog v14.4.0 Rudolph
### Added
- Command `WebColor20` to control color of Button when Off
- Command `SetOption161 1` to disable display of state text [#22515](https://github.com/arendst/Tasmota/issues/22515)
- Command `SetOption162 1` to disable adding export energy to energy today [#22578](https://github.com/arendst/Tasmota/issues/22578)
@ -139,7 +155,6 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm
- Mitsubishi Electric HVAC Outdoor Temperature for MiElHVAC [#22345](https://github.com/arendst/Tasmota/issues/22345)
- Mitsubishi Electric HVAC Compressor Frequency for MiElHVAC [#22347](https://github.com/arendst/Tasmota/issues/22347)
- Mitsubishi Electric HVAC Auto Clear Remote Temp for MiElHVAC [#22370](https://github.com/arendst/Tasmota/issues/22370)
- MCP23XXX_DRV control register IOCON in template [#22622](https://github.com/arendst/Tasmota/issues/22622)
- SolaxX1 Meter mode [#22330](https://github.com/arendst/Tasmota/issues/22330)
- Show Active Power Total with any multi-phase energy monitoring [#22579](https://github.com/arendst/Tasmota/issues/22579)
- ESP32 support for WPA2/3 Enterprise conditional in core v3.1.0.241206 [#22600](https://github.com/arendst/Tasmota/issues/22600)
@ -173,10 +188,8 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm
- DALI set Tasmota light control as default
- Shutter optimized behavior to publish shutter data with sensor request [#22353](https://github.com/arendst/Tasmota/issues/22353)
- Prevent active BLE operations with unencrypted MI-format beacons [#22453](https://github.com/arendst/Tasmota/issues/22453)
- SSL clean up remnants of old fingerprint algorithm [#22645](https://github.com/arendst/Tasmota/issues/22645)
- ESP32 max number of supported switches/buttons/relays from 28 to 32
- ESP32 max number of interlocks from 14 to 16
- Berry make Leds animate calls reentrant [#22643](https://github.com/arendst/Tasmota/issues/22643)
- HASPmota support for page delete and object updates [#22311](https://github.com/arendst/Tasmota/issues/22311)
### Fixed
@ -191,10 +204,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)
- 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)
- MCP23xxx, PCF8574 and Shift595 power control when a display is configured regression from v14.3.0.7
- GUI display power button regression from v14.3.0.5 [#15788](https://github.com/arendst/Tasmota/issues/15788)
- ESP8266 Device Group exception due to lack of stack space [#22271](https://github.com/arendst/Tasmota/issues/22271)
- ESP32 rules operation priority regression from v13.3.0.4 [#22636](https://github.com/arendst/Tasmota/issues/22636)
- 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 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)

View File

@ -788,19 +788,39 @@ extern "C" {
// created with more than two primes, and most numbers, even large ones, can
// be easily factored.
static void pubkeyfingerprint_pubkey_fingerprint(br_x509_pubkeyfingerprint_context *xc) {
br_rsa_public_key rsakey = xc->ctx.pkey.key.rsa;
if (xc->ctx.pkey.key_type == BR_KEYTYPE_RSA) {
br_rsa_public_key rsakey = xc->ctx.pkey.key.rsa;
br_sha1_context shactx;
br_sha1_context shactx;
br_sha1_init(&shactx);
br_sha1_init(&shactx);
// The tag string doesn't really matter, but it should differ depending on
// key type. Since we only support RSA for now, it's a fixed string.
sha1_update_len(&shactx, "ssh-rsa", 7); // tag
sha1_update_len(&shactx, rsakey.e, rsakey.elen); // exponent
sha1_update_len(&shactx, rsakey.n, rsakey.nlen); // modulus
// The tag string doesn't really matter, but it should differ depending on
// key type. For RSA it's a fixed string.
sha1_update_len(&shactx, "ssh-rsa", 7); // tag
sha1_update_len(&shactx, rsakey.e, rsakey.elen); // exponent
sha1_update_len(&shactx, rsakey.n, rsakey.nlen); // modulus
br_sha1_out(&shactx, xc->pubkey_recv_fingerprint); // copy to fingerprint
br_sha1_out(&shactx, xc->pubkey_recv_fingerprint); // copy to fingerprint
}
#ifndef ESP8266
else if (xc->ctx.pkey.key_type == BR_KEYTYPE_EC) {
br_ec_public_key eckey = xc->ctx.pkey.key.ec;
br_sha1_context shactx;
br_sha1_init(&shactx);
// The tag string doesn't really matter, but it should differ depending on
// key type. For ECDSA it's a fixed string.
sha1_update_len(&shactx, "ecdsa-sha2-nistp256", 19); // tag
sha1_update_len(&shactx, eckey.q, eckey.qlen); // exponent
}
#endif
else {
// We don't support anything else, so just set the fingerprint to all zeros.
memset(xc->pubkey_recv_fingerprint, 0, 20);
}
}
// Callback when complete chain has been parsed.
@ -856,11 +876,19 @@ extern "C" {
ctx->fingerprint_all = fingerprint_all;
}
#ifdef ESP8266
// We limit to a single cipher to reduce footprint
// we reference it, don't put in PROGMEM
static const uint16_t suites[] = {
BR_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
};
#else
// add more flexibility on ESP32
static const uint16_t suites[] = {
BR_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
BR_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
};
#endif
// Default initializion for our SSL clients
static void br_ssl_client_base_init(br_ssl_client_context *cc) {
@ -884,6 +912,9 @@ extern "C" {
// we support only P256 EC curve for AWS IoT, no EC curve for Letsencrypt unless forced
br_ssl_engine_set_ec(&cc->eng, &br_ec_p256_m15); // TODO
#ifndef ESP8266
br_ssl_engine_set_ecdsa(&cc->eng, &br_ecdsa_i15_vrfy_asn1);
#endif
}
}

View File

@ -835,6 +835,9 @@ int32_t UpdateDevicesPresent(int32_t change) {
// AddLog(LOG_LEVEL_DEBUG, PSTR("APP: Max 32 devices supported"));
}
TasmotaGlobal.devices_present = devices_present;
// AddLog(LOG_LEVEL_DEBUG_MORE, PSTR("DVC: DevicesPresent %d, Change %d"), TasmotaGlobal.devices_present, change);
return difference;
}

View File

@ -1289,7 +1289,7 @@ void WebGetDeviceCounts(void) {
}
#endif // USE_SHUTTER
// AddLog(LOG_LEVEL_DEBUG_MORE, PSTR("HTP: DP %d, BNLNS %d, SB %08X"), TasmotaGlobal.devices_present, Web.buttons_non_light_non_shutter, Web.light_shutter_button_mask);
// AddLog(LOG_LEVEL_DEBUG, PSTR("HTP: DP %d, BNLNS %d, SB %08X"), TasmotaGlobal.devices_present, Web.buttons_non_light_non_shutter, Web.light_shutter_button_mask);
}
#ifdef USE_LIGHT
@ -1374,7 +1374,6 @@ void HandleRoot(void) {
if (TasmotaGlobal.devices_present) {
WebGetDeviceCounts();
uint32_t button_idx = 1;
if (Web.buttons_non_light_non_shutter) { // Any non light AND non shutter button - Show toggle buttons
WSContentSend_P(HTTP_TABLE100); // "<table style='width:100%%'>"
WSContentSend_P(PSTR("<tr>"));
@ -1400,7 +1399,7 @@ void HandleRoot(void) {
if (Web.buttons_non_light_non_shutter % rows) { cols++; }
uint32_t button_ptr = 0;
for (button_idx = 1; button_idx <= TasmotaGlobal.devices_present; button_idx++) {
for (uint32_t button_idx = 1; button_idx <= TasmotaGlobal.devices_present; button_idx++) {
if (bitRead(Web.light_shutter_button_mask, button_idx -1)) { continue; } // Skip non-sequential light and/or shutter button
bool set_button = ((button_idx <= MAX_BUTTON_TEXT) && strlen(GetWebButton(button_idx -1)));
snprintf_P(stemp, sizeof(stemp), PSTR(" %d"), button_idx);
@ -1457,7 +1456,7 @@ void HandleRoot(void) {
if (TasmotaGlobal.light_type) { // Any light - Show light button and slider(s)
uint32_t light_device = LightDevice();
uint32_t light_devices = LightDevices();
button_idx = light_device;
uint32_t button_idx = light_device;
WSContentSend_P(HTTP_TABLE100); // "<table style='width:100%%'>"
@ -1886,37 +1885,37 @@ bool HandleRootStatusRefresh(void) {
XsnsXdrvCall(FUNC_WEB_SENSOR);
WSContentSend_P(PSTR("</table>"));
if (!Settings->flag6.gui_no_state_text && // SetOption161 - (GUI) Disable display of state text (1)
TasmotaGlobal.devices_present) {
#ifdef USE_SONOFF_IFAN
if (IsModuleIfan()) {
if (!Settings->flag6.gui_no_state_text) { // SetOption161 - (GUI) Disable display of state text (1)
if (!Web.buttons_non_light_non_shutter) { // Might still be zero on restart so chk if we have at least one
WebGetDeviceCounts();
}
if ((Web.buttons_non_light_non_shutter > 0) &&
( Web.buttons_non_light_non_shutter <= 8)) { // We need at least one non light AND non shutter button
WSContentSend_P(PSTR("{t}<tr>"));
WSContentSend_P(HTTP_DEVICE_STATE, 36, (bitRead(TasmotaGlobal.power, 0)) ? PSTR("bold") : PSTR("normal"), 54, GetStateText(bitRead(TasmotaGlobal.power, 0)));
uint32_t fanspeed = GetFanspeed();
snprintf_P(svalue, sizeof(svalue), PSTR("%d"), fanspeed);
WSContentSend_P(HTTP_DEVICE_STATE, 64, (fanspeed) ? PSTR("bold") : PSTR("normal"), 54, (fanspeed) ? svalue : GetStateText(0));
WSContentSend_P(PSTR("</tr></table>"));
} else {
#ifdef USE_SONOFF_IFAN
if (IsModuleIfan()) {
WSContentSend_P(HTTP_DEVICE_STATE, 36, (bitRead(TasmotaGlobal.power, 0)) ? PSTR("bold") : PSTR("normal"), 54, GetStateText(bitRead(TasmotaGlobal.power, 0)));
uint32_t fanspeed = GetFanspeed();
snprintf_P(svalue, sizeof(svalue), PSTR("%d"), fanspeed);
WSContentSend_P(HTTP_DEVICE_STATE, 64, (fanspeed) ? PSTR("bold") : PSTR("normal"), 54, (fanspeed) ? svalue : GetStateText(0));
} else {
#endif // USE_SONOFF_IFAN
if (Web.buttons_non_light_non_shutter <= 8) { // Any non light AND non shutter button
WSContentSend_P(PSTR("{t}<tr>"));
uint32_t cols = Web.buttons_non_light_non_shutter;
uint32_t fontsize = (cols < 5) ? 70 - (cols * 8) : 32;
for (uint32_t idx = 1; idx <= Web.buttons_non_light_non_shutter; idx++) {
if (bitRead(Web.light_shutter_button_mask, idx -1)) { continue; } // Skip non-sequential shutter button
snprintf_P(svalue, sizeof(svalue), PSTR("%d"), bitRead(TasmotaGlobal.power, idx -1));
WSContentSend_P(HTTP_DEVICE_STATE, 100 / cols, (bitRead(TasmotaGlobal.power, idx -1)) ? PSTR("bold") : PSTR("normal"), fontsize,
(cols < 5) ? GetStateText(bitRead(TasmotaGlobal.power, idx -1)) : svalue);
uint32_t button_ptr = 0;
for (uint32_t button_idx = 1; button_idx <= TasmotaGlobal.devices_present; button_idx++) {
if (bitRead(Web.light_shutter_button_mask, button_idx -1)) { continue; } // Skip non-sequential shutter button
bool power_state = bitRead(TasmotaGlobal.power, button_idx -1);
snprintf_P(svalue, sizeof(svalue), PSTR("%d"), power_state);
WSContentSend_P(HTTP_DEVICE_STATE, 100 / cols, (power_state) ? PSTR("bold") : PSTR("normal"), fontsize, (cols < 5) ? GetStateText(power_state) : svalue);
button_ptr++;
if (button_ptr >= Web.buttons_non_light_non_shutter) { break; }
}
WSContentSend_P(PSTR("</tr></table>"));
}
#ifdef USE_SONOFF_IFAN
}
}
#endif // USE_SONOFF_IFAN
WSContentSend_P(PSTR("</tr></table>"));
}
}
if (1 == Web.slider_update_time) {

View File

@ -1852,57 +1852,53 @@ void DisplayLocalSensor(void)
\*********************************************************************************************/
void DisplayInitDriver(void) {
uint32_t display_model = Settings->display_model;
Settings->display_model = 0; // Test if any display_model is available
XdspCall(FUNC_DISPLAY_INIT_DRIVER);
if (Settings->display_model && display_model) { // If any model found keep using user configured one for backward compatibility
Settings->display_model = display_model;
}
if (!Settings->display_model) { return; }
// AddLog(LOG_LEVEL_DEBUG, PSTR(D_LOG_DEBUG "Display model %d"), Settings->display_model);
// AddLog(LOG_LEVEL_DEBUG_MORE, PSTR("DSP: Model %d"), Settings->display_model);
if (Settings->display_model) {
// ApplyDisplayDimmer(); // Not allowed here. Way too early in init sequence. Global power state has not been set at this point in time
// ApplyDisplayDimmer(); // Not allowed here. Way too early in init sequence. Global power state has not been set at this point in time
#ifdef USE_MULTI_DISPLAY
Set_display(0);
Set_display(0);
#endif // USE_MULTI_DISPLAY
if (renderer) {
renderer->setTextFont(Settings->display_font);
renderer->setTextSize(Settings->display_size);
// force opaque mode
renderer->setDrawMode(0);
if (renderer) {
renderer->setTextFont(Settings->display_font);
renderer->setTextSize(Settings->display_size);
// force opaque mode
renderer->setDrawMode(0);
for (uint32_t cnt = 0; cnt < (MAX_INDEXCOLORS - PREDEF_INDEXCOLORS); cnt++) {
index_colors[cnt] = 0;
}
for (uint32_t cnt = 0; cnt < (MAX_INDEXCOLORS - PREDEF_INDEXCOLORS); cnt++) {
index_colors[cnt] = 0;
}
}
#ifdef USE_DT_VARS
free_dt_vars();
free_dt_vars();
#endif
#ifdef USE_UFILESYS
Display_Text_From_File(DISP_BATCH_FILE);
Display_Text_From_File(DISP_BATCH_FILE);
#endif
#ifdef USE_GRAPH
for (uint8_t count = 0; count < NUM_GRAPHS; count++) { graph[count] = 0; }
for (uint8_t count = 0; count < NUM_GRAPHS; count++) { graph[count] = 0; }
#endif
UpdateDevicesPresent(1);
if (!PinUsed(GPIO_BACKLIGHT)) {
if ((LT_PWM1 == TasmotaGlobal.light_type) && // Single PWM light channel
((4 == Settings->display_model) || // ILI9341 legacy
(17 == Settings->display_model)) // Universal
) {
UpdateDevicesPresent(-1); // Assume PWM channel is used for backlight
}
}
disp_device = TasmotaGlobal.devices_present;
UpdateDevicesPresent(1);
disp_device = TasmotaGlobal.devices_present;
#ifndef USE_DISPLAY_MODES1TO5
Settings->display_mode = 0;
Settings->display_mode = 0;
#else
DisplayLogBufferInit();
DisplayLogBufferInit();
#endif // USE_DISPLAY_MODES1TO5
}
}
void DisplaySetPower(void) {