18174 Commits
Author SHA1 Message Date
TD-er ebaf41e7fd Merge pull request #5672 from goodprogrammist/bugfix/clearTask-OLD_TaskDeviceID-overflow
[Settings] Fix clearTask() overwriting pins of other tasks
2026-10-24 21:14:14 +02:00
Aleksandr ZharovandClaude Opus 5.5 a513c8d631 [Settings] Fix clearTask() overwriting pins of other tasks
OLD_TaskDeviceID only has N_TASKS - 9 elements, but clearTask() still wrote
OLD_TaskDeviceID[task]. For task index 3 and up this writes past the array
into TaskDevicePin1..3/TaskDevicePort of other tasks. The array is unused, so
the write is removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 22:02:13 +05:00
TD-er 42b03c17ff Merge pull request #5669 from goodprogrammist/bugfix/P163-failed-init-cleanup
[P163] Fix double-free after failed RadSens initialization
2026-10-23 13:32:45 +02:00
Aleksandr ZharovandClaude Opus 5.5 3e82efee33 [P163] Drop the redundant initialized flag
sensor is only non-null after a successful init(), so isInitialized() can
just check the pointer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 15:03:31 +05:00
Aleksandr ZharovandClaude Opus 5.5 d1e06e5507 [P163] Check sensor pointer before use
isInitialized() now also requires a valid sensor pointer, so plugin_read()
and plugin_write() never dereference a null sensor. setOutputValues() checks
it as well, and init() deletes a previous sensor object before allocating a
new one, so calling it again does not leak.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 13:52:54 +05:00
Aleksandr Zharov 646a95bf5b [P163] Fix double-free after failed RadSens initialization 2026-10-23 02:29:44 +05:00
TD-er 2164531742 Merge pull request #5656 from TD-er/build/use_cpp_static_functiondecl
[Build] Reduce build size using static functions
2026-10-18 23:50:55 +02:00
TD-er fe2c86f0b0 [Provisioning] downloadFile() fails to fetch via https (#5663)
Fixes: #5663
2026-10-18 22:30:14 +02:00
TD-er 89950db921 [HTTP] SendToHTTPS reboots ESP32 (#5661)
Fixes: #5661
2026-10-18 21:13:31 +02:00
TD-er 161d7d4cff Merge remote-tracking branch 'letscontrolit/mega' into build/use_cpp_static_functiondecl 2026-10-18 20:01:52 +02:00
TD-er 1c34d2fece [KeyValueStruct] Keep bool type when collecting sysinfo 2026-10-18 20:01:43 +02:00
TD-er 6d83d96a82 Merge pull request #5649 from adamsthws/fix/httpclientlight-read-timeout
[HttpClientLight] Time out reading a body when the server goes silent
2026-10-18 19:59:55 +02:00
TD-er 755d357694 [Rules] Calculation: operators get lost or are applied to the wrong operands #5660
Fixes: #5660
Credits to @mschlenstedt
2026-10-18 14:42:22 +02:00
Claude 12af5cd8e4 [Rules] Fix build with WEBSERVER_NEW_RULES
- handle_rules_edit(String, bool) is static now, but ESPEasy_WebServer.cpp
  still called it for /rules/add, which no longer compiles:
  "too many arguments to function 'bool handle_rules_edit(const String&)'"
  Add handle_rules_add() in Rules.cpp and use that instead.
- Rules.cpp uses validIntFromString() without including Numerical.h
  (this was already broken on mega when WEBSERVER_NEW_RULES is defined).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018S3oPMc7qQGQGGGyMUvcaf
2026-10-18 14:11:18 +02:00
TD-er 412a9e64fb [Build] Use static func. MQTT helper, NWPlugin Helper, NW import/export 2026-10-18 02:43:36 +02:00
TD-er ff9a7f6150 [Build] Reduce build size by using static functions (src/WebServer) 2nd 2026-10-18 00:53:03 +02:00
Claude da96905f27 [Dallas] Keep 1-Wire ISR functions in IRAM on ESP32
Dallas_read_bit_ISR() and Dallas_write_bit_ISR() have only a single
caller, Dallas_read_bit() / Dallas_write_bit(), which is not in IRAM.
The ESP32 builds use LTO (-flto=auto, set by the build flags of the
arduino-esp32 framework package), so GCC inlines these functions into
their caller and the timing critical code with interrupts disabled runs
from flash. DALLAS_IRAM_ATTR thus had no effect for these functions.
Without LTO the same happens as soon as these functions are static
(-finline-functions-called-once is enabled at -Os).

Add noinline to DALLAS_IRAM_ATTR on ESP32.
ESP8266 is not affected, as DALLAS_IRAM_ATTR is empty there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018S3oPMc7qQGQGGGyMUvcaf
2026-10-17 23:58:26 +02:00
Claude 55828c8851 [NodeType] Return empty string again for unknown node types
After splitting toNodeTypeDisplayString(), every node type which is not
ESP Easy, ESP Easy Mega, RPI Easy, Arduino Easy or Nano Easy was shown as
"ESP Easy 32". For example nodeType 0, the default of NodeStruct::nodeType.
Before, an empty string was returned for unknown node types.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018S3oPMc7qQGQGGGyMUvcaf
2026-10-17 23:56:07 +02:00
TD-er 396504655e [Build] Reduce build size using static functions in src/WebServer 2026-10-17 23:55:19 +02:00
TD-er 5961277bf8 [Build] Reduce build size by static only functions in .cpp files 2026-10-17 18:03:37 +02:00
TD-er 11070fbd17 [Build] Reduce build size using static functions
As suggested here: https://github.com/letscontrolit/ESPEasy/pull/5654#issuecomment-6222575013
2026-10-17 03:32:20 +02:00
TD-er 680517fa4c Merge pull request #5654 from goodprogrammist/bugfix/Rules_unknown_braces_endless_loop
[Rules] Fix endless loop on unknown {...} in rules on ESP8266
2026-10-17 01:08:32 +02:00
Adam Matthews d143a4b93d [HttpClientLight] Widen the TCP timeout to 32 bits 2026-10-16 17:28:38 +01:00
Aleksandr ZharovandClaude Opus 5.5 f23953d428 [Rules] Make the escape/mask helpers static
hideEscaped(), hideMasked() and restoreMaskedAndEscaped() are only used in
ESPEasyRules.cpp. With internal linkage GCC inlines them where they are
called once (builds without FEATURE_EXTENDED_STRING_FUNCTIONS), so the
ESP8266 build is the same size as before the previous commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 20:21:12 +05:00
Aleksandr ZharovandClaude Opus 5.5 0cf0b0df25 [Rules] Use the escape/mask helpers also without FEATURE_EXTENDED_STRING_FUNCTIONS
parse_string_commands() had #else copies of hideEscaped(), hideMasked()
and restoreMaskedAndEscaped() for builds without
FEATURE_EXTENDED_STRING_FUNCTIONS, and the previous commit fixed a bug in
one of those copies. Build the helpers always and keep only the escaped
colon (\:) handling under FEATURE_EXTENDED_STRING_FUNCTIONS, the same as
in stripEscapeCharacters() / addEscapeCharacters().

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 19:34:33 +05:00
Aleksandr ZharovandClaude Opus 5.5 fbd7e43d5d [Rules] Fix endless loop on unknown {...} in rules on ESP8266
In parse_string_commands() the branch without FEATURE_EXTENDED_STRING_FUNCTIONS
masked '{' and '}' in the whole line instead of in replacement (regression from
4e191fc5b). The following line.replace() put the unmasked braces back, so
get_next_inner_bracket() found them again and the loop never ended
(SW watchdog / exception reset). Mask replacement, as before 4e191fc5b.

Fixes #5653

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 17:01:26 +05:00
TD-er ed56769e43 Merge pull request #5652 from goodprogrammist/bugfix/P056_ReadAverage_by_reference
[P056] Fix SDS011 always reporting 0 (ReadAverage by reference)
2026-10-16 11:12:35 +02:00
Aleksandr Zharov 31ba12eeae [P056] Fix ReadAverage() output params passed by value, always returning 0
Regression from #5369: P056_data_struct::ReadAverage() took float pm25/pm10 by value, so the averaged values never reached the caller and the task values stayed 0. Pass them by reference like CjkSDS011::ReadAverage().
2026-10-16 11:07:06 +05:00
Adam Matthews 08d2ab0500 [HttpClientLight] Time out reading a body when the server goes silent
writeToStreamDataBlock() waited for the rest of a body for as long as
connected() held. A server that stops sending part way through a body
without closing the connection leaves connected() true, so getString()
never returned and the unit stopped responding. Give up after
_tcpTimeout without data and return HTTPC_ERROR_READ_TIMEOUT, as
handleHeaderResponse() already does. Same fix as arendst/Tasmota#25139.
2026-10-15 00:30:28 +01:00
TD-er 0c5d756fd1 Merge pull request #5645 from Firat17aze/fix/hdc10xx-read-errors
[P072] Reject failed HDC10xx sensor reads
2026-10-10 15:47:27 +02:00
Firat17aze ae1ff88401 Only mark HDC10xx values invalid on read errors
Avoid provisional NAN writes on valid reads because setFloat dispatches formulas. Use the invalid-value handler only after a failed register selection or short response. Add the requested GitHub changelog attribution.

OpenAI Codex automation prepared and validated this follow-up. The submitted plugin fails four new setter-order regression scenarios; all 12 revised host scenarios pass with ASan/UBSan. Both complete climate-A ESP8266/ESP32 firmware builds pass, retaining existing warnings in unchanged sources. No physical ESP board or HDC10xx sensor was tested.
2026-10-09 17:08:03 -04:00
Firat17aze d14fc2f7a9 Reject failed HDC10xx I2C reads 2026-10-09 15:30:33 -04:00
TD-er d4efae2f20 Merge pull request #5623 from vaibhav8a/fix-typo-noticeable
docs: fix the misspellings across docs/source
2026-10-07 21:56:56 +02:00
TD-er a31a417540 Merge pull request #5639 from BrainHunter/Fix_SHT1x_SendDataOption
Fixed SendDataOption in P031_SHT1X.ino
2026-10-07 21:55:52 +02:00
TD-er 06b2d3a037 Merge pull request #5642 from tonhuisman/bugfix/Command-udpport-argument-parsing
[Commands] UdpPort argument processing fix
2026-10-07 21:54:56 +02:00
TD-er e826e12969 Merge pull request #5644 from tonhuisman/bugfix/MQTT-discovery-sysname-not-made-ha-compliant
[Bugfix] MQTT AutoDiscovery should use HA-compliant SysName
2026-10-07 21:54:07 +02:00
Ton Huisman 85e60c479b [Bugfix] MQTT AutoDiscovery should use HA-compliant SysName 2026-10-07 21:47:48 +02:00
Ton Huisman 80ebf9a8b7 Merge branch 'mega' into bugfix/Command-udpport-argument-parsing 2026-10-07 21:40:36 +02:00
TD-er 8ca31acb52 Merge pull request #5637 from TD-er/bugfix/load_1wire_page_after_save
[1Wire] Fix caching issue + multiple attempts scan sensors after save
2026-10-07 13:04:59 +02:00
TD-er 02b8acc73e [WiFi] Fix wrong sign check in set TX power (ESP32) 2026-10-07 09:34:54 +02:00
TD-er 050017b2b0 [DNS] Fix hostByName returning negative values when lookup failed
`hostByName` does only return `1` on success, however it may return a negative value when lookup failed.
So need to check for the exact return value and not consider it a boolean return type.
2026-10-07 08:27:40 +02:00
TD-er 488cb70ba9 [WiFi] Fix setting TX power on ESP32 when not exactly matching pwr value 2026-10-07 08:23:54 +02:00
Ton Huisman 55d20f0f65 [Commands] UdpPort argument processing fix 2026-09-28 23:30:24 +02:00
TD-er 3533142af4 Merge remote-tracking branch 'letscontrolit/mega' into bugfix/load_1wire_page_after_save 2026-09-23 00:36:37 +02:00
TD-er 2c53b7b82a [Time] Speedup getting first NTP time sync 2026-09-22 23:51:29 +02:00
TD-er 7f5f5d4f35 Merge pull request #5640 from tonhuisman/bugfix/Rules-taskname-command-prefix-issue
[Tasks] Taskname prefix for commands not always working
2026-09-21 22:30:02 +02:00
Ton Huisman 3634fded80 [Tasks] Taskname prefix for commands not always working 2026-09-21 21:21:28 +02:00
BrainHunter f410cd6e1a Fixed P031_SHT1X.ino to set SendDataOption to true since it was missing
This allows the device to be configured to send data as expected.
2026-09-20 19:00:57 +02:00
TD-er a6b95f8851 [1Wire] Fix caching issue + multiple attempts scan sensors after save 2026-09-18 00:26:28 +02:00
TD-er b1ecd19790 Merge pull request #5636 from TD-er/bugfix/1wire_show_sensors
[1Wire] Fix not always showing 1-wire sensor & correct saving sensor
2026-09-16 23:58:49 +02:00