Commit Graph
573 Commits
Author SHA1 Message Date
Chris Sutcliff cdf6375c71 fix(mqtt): 8 KB MQTT task stack when TLS verifies a CA certificate
On boards with PSRAM the MQTT client runs in its own task with a 5120
byte stack. Verifying an EC certificate chain against a CA, such as
Let's Encrypt ISRG Root X2, needs about 6 KB, so the task overflowed
and the board boot looped on every connect.

The espMqttClient constructors now take the stack size, and
startClient() passes EMSESP_MQTT_STACKSIZE_CA (8192) when TLS is on
with a CA, keeping the 5120 default for insecure TLS and plain MQTT.
The client is recreated when that changes. The stack usage log
reports against the size the task was created with.
2026-10-20 12:40:59 +01:00
Proddy ed0aedcce0 Merge branch 'dev' into dev 2026-10-20 13:07:40 +02:00
proddy fe7bc1c40f fix SoftAP fallback to keep retrying WiFi STA after cold boot 2026-10-20 13:06:26 +02:00
Proddy f20c064a2c Merge pull request #3306 from csutcliff/pr/upload-406-response
fix(upload): send the 406 response for a rejected upload
2026-10-19 22:45:27 +02:00
Chris Sutcliff 8cd23c3265 fix(upload): send the 406 response for a rejected upload 2026-10-19 21:07:40 +01:00
Chris Sutcliff 05575a28d5 fix(upload): don't crash when an upload is rejected 2026-10-19 20:52:21 +01:00
proddy 4fa3319caf #3297 2026-10-18 16:14:49 +02:00
proddy 93a986be7f updates with recent changes in dev-19 2026-10-17 15:23:07 +02:00
proddy 88be02aae2 update 2026-10-17 15:10:21 +02:00
proddy 65fb1ea299 update 2026-10-17 14:35:40 +02:00
proddy cbe8ea21af update 2026-10-17 13:45:13 +02:00
Chris Sutcliff 69a58e64ca fix(upload): restart after a firmware upload when the client closes the connection
uploadComplete() leaves _is_firmware / _is_filesystem set after a
successful upload. When the client then closes the connection,
handleDisconnect() sees the flags, treats it as an aborted upload and
sets the status back to NORMAL, cancelling the pending restart. The WebUI
gets away with it because its status poll turns the pending restart into
a requested one first; an upload from curl or a script is accepted
(md5_ok) but the device keeps running the old firmware until something
else restarts it.

Clear the flags once the upload has completed.
2026-10-14 00:52:28 +01:00
proddy 68d7f6e444 New Entity: Cooling status for free cooling
Fixes #3097
2026-10-13 22:40:09 +02:00
proddy bbacd7021a another fix for #3283 2026-10-13 18:37:39 +02:00
proddy e9bb68eeb5 update 2026-10-13 08:03:59 +02:00
Proddy 8ee23dd8dc Merge branch 'emsesp:dev' into dev 2026-10-13 07:51:57 +02:00
hkuehl 4861d50c21 fix: restart from WebUI no longer needs the browser tab to stay open
A restart requested from the WebUI (Restart button, firmware upload,
firmware update from URL, settings or customization upload) is set to
PENDING_RESTART and was only escalated to RESTART_REQUESTED when the
WebUI's SystemMonitor polled /rest/systemStatus. If the tab was closed,
nothing ever escalated it and the generic 5 minute status timeout reset
it back to NORMAL, so the restart was dropped and an uploaded firmware
was never booted.

- System::loop() now escalates a pending restart itself if it hasn't been
  picked up within 10 seconds (the SystemMonitor polls every second)
- the generic status reset timeout skips PENDING_RESTART, and its timer is
  cleared whenever the status is back to normal, so a start time left over
  from an earlier status can't reset a later one (e.g. a pending restart
  right after a firmware download) immediately
2026-10-13 05:15:13 +00:00
proddy 4fb5d366d9 fixes #3283 2026-10-12 19:56:55 +02:00
proddy f1e158d2a6 update 2026-10-12 19:50:50 +02:00
Proddy 546e07a534 Merge branch 'dev' into dev 2026-10-11 16:25:01 +02:00
proddy 956f7ab098 show recovery app in Version page 2026-10-11 16:23:08 +02:00
gnakhandClaude Opus 5.5 0c8e496296 Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into disinfect-duration-3278
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 17:48:05 +02:00
proddy 62f2987b56 update changelog, use new core libs 2026-10-10 12:59:46 +02:00
proddyandCursor e10983cca1 Merge branch 'feat/custom-sdkconfig' into dev
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-10 12:34:51 +02:00
gnakhandClaude Opus 5.5 84bc0afeb7 add heat pump dhw/disinfectduration (0xEA offset 15), #3278
The DHW thermal disinfection duration (time allowed to reach the
disinfection temperature; on timeout HPC4x0 reports A01(5284)) is
sent in UBAParameterWWPlus 0xEA offset 15 in steps of 10 min, but was
not decoded. Add boiler/dhw/disinfectduration for heat pumps,
readable and writeable, range 120-240 min as on the HPC410 menu.

Tested on a Bosch Compress 3400AW with HPC410: changing the duration
on the controller writes 0xEA offset 15 (150 min -> 0F, 180 -> 12),
and writing 0B 08 EA 0F 11 from EMS-ESP made the HPC410 menu show
170 min without errors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 11:09:03 +02:00
proddy c959cb1e8a #3275 2026-10-09 23:55:15 +02:00
Proddy e19a45f5b8 Merge branch 'emsesp:dev' into feat/recovery-partition 2026-10-09 16:20:04 +02:00
MichaelDvP 037451ace8 Merge remote-tracking branch 'emsesp/dev' into dev 2026-10-09 11:59:08 +02:00
MichaelDvP 7fc094d6f7 changelog 2026-10-09 11:55:39 +02:00
proddy 105ef8cf40 update dev-16 2026-10-08 18:21:37 +02:00
proddy 6fa08808dd update dev-16 2026-10-08 18:03:46 +02:00
proddyandCursor 6411b6ffbd add recovery firmware with OTA updater and recovery web interface
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-06 22:57:25 +02:00
proddy 61eaee2ffa enable internal pull-up on the UART Rx 2026-10-04 09:22:40 +02:00
proddy e4f9d4a96d #3257 summermode back and a test for #3094 2026-10-01 17:52:52 +02:00
proddy 52b24d5641 #3257 2026-09-30 18:04:34 +02:00
proddy 333e2d83d7 update 2026-09-27 15:10:45 +02:00
Proddy 1e49bd54a0 Merge branch 'dev' into pool-signals 2026-09-27 09:39:20 +02:00
Bingo2023andClaude Opus 5.5 8cdd9f5d79 rename pool translations to MP100 block, shorter names
- block comment `// mixer pool` -> `// MP100 pool module`, hydrTemp moved to `// water`
- `poolpump` -> `poolrequest` (pool request, MP100 input contacts)
- shorter en/de texts: pool setpoint / Pool Soll, valve status / Ventil Status,
  valve actual / Ventil Ist, valve setpoint / Ventil Soll
- existing short names (poolsettemp, pooltemp, poolshuntstatus, poolshunt) unchanged

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013YrkDbvxEv3ZMS7SPSKCGd
2026-09-25 18:42:45 +02:00
proddy f05105861e update doc 2026-09-24 18:43:02 +02:00
Bingo2023andClaude Opus 5.5 1d2b916935 add heatpump pool on/off, pool active, MP100 shunt setpoint and pool pump
Tested with a heatpump (0x08) and MP100 pool module (0x11), custom entities
compared against RC300 operation and a power meter on the circulation pump.

- boiler `poolon` (0x48A offset 0), writable, RC300 writes 01/00
- boiler `hppoolon` (0x488 offset 0 bit 6), pool heating actually active
- pool `poolshuntset` (0x5C4 offset 0, heatpump -> MP100), shunt setpoint;
  `poolshunt` follows within ~2 min
- pool `poolpump` (0x5BA offset 4), 0 = running, 2 = off. This byte is only
  in MP100 -> heatpump telegrams, so the pool module now also handles
  telegrams it sends to other devices
- simulator: `test pool`

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013YrkDbvxEv3ZMS7SPSKCGd
2026-09-24 17:24:47 +02:00
Proddy 4eae732801 Merge pull request #3248 from proddy/littlefs-migrate
Littlefs migrate
2026-09-20 22:38:39 +02:00
proddy 7a338f465d add gateway ipv6 (#3246) 2026-09-20 12:28:25 +02:00
proddyandCursor 15ece2030e auto-convert older 3.8.x filesystem to the 3.9.0 format
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-20 11:20:37 +02:00
proddy 307ae9247f fixes #3246 2026-09-19 15:24:23 +02:00
Proddy c7f696a9dd Merge branch 'dev' into fix/maxheat-enum-12-15kw 2026-09-18 15:08:00 +02:00
Jaano RosinandClaude Opus 5 5cc45b97bc fix: add 12 kW and 15 kW steps to enum_maxHeat
The heat limit registers on heat pumps using EMS_DEVICE_FLAG_HEATPUMP
(product 172/173) are bytes 2/3/4 of telegram 0x0492, read as a direct
index into enum_maxHeat. That table has only six entries, so any unit
whose auxiliary electric heater goes above 9 kW reports an index the
table cannot resolve.

Nothing bounds-checks the raw byte on the way in, and every render path
guards on `value < options_size`, so an out-of-range index is dropped
silently: no value is published to MQTT, the API omits the field, Home
Assistant shows `unknown`, and nothing appears in the log. Helpers::
value2enum stops at the same boundary, so the value cannot be written
back from EMS-ESP either, leaving the entity permanently stuck.

Measured on a Bosch Compress 7000i AW (CS7000iAW 13 OR-T, product 172)
with a 15 kW auxiliary heater, by setting each limit from the unit's own
display and reading telegram 0x0492 back:

    display 12 / 9 / 6 kW  ->  0x0492 data: 03 00 06 05 04

    raw  kW   note
      0   0   agrees with the existing table
      1   2   not offered by this heater
      2   3   not offered by this heater
      3   4   not offered by this heater
      4   6   agrees with the existing table
      5   9   agrees with the existing table
      6  12   new
      7  15   new

Indices 0, 4 and 5 match what EMS-ESP already decodes, which confirms the
existing entries and their ordering; the table was correct, just short.
The 2 kW and 4 kW entries belong to the 4-stufig (2/4/6/9 kW) heater
variant described in the HPC 410 service manual section 4.2.2, so a
3 kW-stepped heater simply skips them and walks 0, 3, 6, 9, 12, 15 kW,
i.e. raw 0, 2, 4, 5, 6, 7. The same sparse pattern is already encoded for
CS6800 devices in Boiler::process_HpHeaterConfig, which maps raw
{0, 2, 4, 5} onto {0, 3, 6, 9} kW.

Only devices carrying EMS_DEVICE_FLAG_HEATPUMP are affected; CS6800
devices use enum_maxHeat1/enum_maxHeat2 and are unchanged. Verified with
the standalone build: `test entity_dump` differs from the committed
docs/dump_entities.csv in exactly the six maxheat rows of products 172
and 173, and nowhere else.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-16 13:17:37 +03:00
proddy f240c1bb91 update 2026-09-15 21:57:39 +02:00
proddy 167f194bdf add auto check for firmware updates 2026-09-14 19:33:20 +02:00
proddy 7ae9d87a72 possible fix for #3201 2026-09-14 15:48:29 +02:00
MichaelDvP 65aca1b9c1 remove HA config for excluded entity, dev.9 2026-09-13 08:06:16 +02:00