Commit Graph
1565 Commits
Author SHA1 Message Date
s-hadinger 0ad5879abe Heap Map optional feature fur detailed memory usage at boot (#25186) 2026-10-24 12:31:28 +02:00
Adam Matthews 4df6fa1d4b HttpClientLight: keep read timeouts longer than 65 s (#25180)
The read timeout was kept in 16 bits, so a longer one wrapped: Berry's
webclient.set_timeouts(80000) gave up after about 14.5 s, and 70000
after 4.5 s. Keep it in 32 bits, in HttpClientLight and
AsyncHttpClientLight, as ESPEasy's copy of the client now does.
2026-10-23 22:42:22 +02:00
Adam Matthews 06d51e8fc2 Matter: encode strings longer than 255 bytes (#25185)
Matter_TLV.tlv2raw() wrote a UTF2 string with bytes().frostring(), a
typo for fromstring(), so encoding any string of more than 255 bytes
(which is given type UTF2 automatically) raised attribute_error.
2026-10-23 22:40:50 +02:00
SoWizardandClaude Opus 5.5 185e41c274 Matter: fix stale host test fixtures (#25161)
run_tests.be and button_stability_tests.be stop with assert_failed right
after "Matter epoch conversion for UTC and local time: OK" on development.
Three test-only mistakes, each hiding the next:

- run_tests.be checked the RSSI item's stored TLV type before encoding.
  "Clamp RSSI" (#25126) stores signed values as I4; the encoded bytes are
  still the 1-byte 00C3, which the next assert checks. Check the value only.
- TestGarageDevice (run_tests.be) lacks disable_bridge_mode, which
  Matter_Plugin_Device.init() reads since #25099.
- StabilityDevice (button_stability_tests.be) lacks it too.

Tests only; no firmware files change.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 10:32:35 +02:00
Zhaoqi Xu 81fdbb0bbe Matter: list Window Covering commands in AcceptedCommandList (#25149)
The Shutter and Shutter + Tilt plugins handle UpOrOpen, DownOrClose,
StopMotion and GoToLiftPercentage (and GoToTiltPercentage for tilt) in
invoke_request(), but AcceptedCommandList (0xFFF9) of the Window
Covering cluster was empty. Controllers that build their feature set
from this list, such as Home Assistant, then don't offer setting the
position or tilt.

Override get_accepted_commands() in both plugins to report the
commands they implement.

Fixes #25146
2026-10-19 10:31:39 +02:00
s-hadinger 6389d75c66 LVGL/HASPmota visual touch pointer (dot under finger) (#25158) 2026-10-19 09:49:11 +02:00
s-hadinger 47f3dbc09f Berry webclient.connected() was implemented but not exposed (#25145) 2026-10-15 17:30:25 +02:00
Adam Matthews ece53a64f8 AsyncHttpClientLight: end a body read when the server goes silent or closes (#25141)
* AsyncHttpClientLight: 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 without
closing leaves connected() true, so the worker never finishes and the
caller, waiting in runJob(), never returns. Give up after _tcpTimeout
without data and return HTTPC_ERROR_READ_TIMEOUT, as HttpClientLight
now does (#25139).

* AsyncHttpClientLight: notice when the server closes after the last byte

AsyncTcpAdapter only saw the peer close inside read(), and callers only
read when available() > 0. A body without Content-Length that ends with
the server closing left connected() true for ever, so
writeToStreamDataBlock() never returned. connected() now peeks at the
socket, as WiFiClient::connected() does: data still buffered keeps it
connected, an orderly close after it does not.

* AsyncHttpClientLight: address review of the read timeout

- connected() only reports a peer close and no longer calls stop(): it can
  be called from another task than the worker using the socket.
- writeToStreamDataBlock() closes the connection on a read timeout, as the
  chunked readers do, so a stalled connection is not reused.
- readBodyToStreamString(): the identity branch used by async GET/POST now
  times out after _tcpTimeout without data, and notices a close: with no
  Content-Length it ends the body, with one it is a lost connection.
2026-10-15 15:10:46 +02:00
Adam Matthews 90754c5b93 AsyncHttpClientLight: finish a chunked body at the empty line after the last chunk (#25142)
After the zero-size chunk the readers read one line unconditionally,
then waited for another empty line. The first read already consumed the
empty line that ends the body, so every chunked body waited for a line
that never came and failed with HTTPC_ERROR_READ_TIMEOUT after
_tcpTimeout. Read trailer lines up to the first empty one instead.
2026-10-15 09:35:15 +02:00
Adam Matthews c95c241fa3 HttpClientLight: time out reading a body when the server goes silent (#25139)
writeToStreamDataBlock() looped for as long as connected() held, waiting
for the rest of the body with no time limit. A server that stops sending
part way through a body without closing the connection - a computer that
sleeps, a cable pulled, a network that drops between the two ends - leaves
connected() true for ever, so the read never returned. Called from the main
loop, as Berry's webclient get_string() is, it left the device answering
nothing, not even its web page, until it was power-cycled.

Give up after _tcpTimeout without data, returning HTTPC_ERROR_READ_TIMEOUT,
as handleHeaderResponse() already does for the headers. A body that keeps
arriving, however slowly, is unaffected: each piece resets the clock.
2026-10-14 15:12:37 +02:00
s-hadinger 1bb26b29c4 Fix Matter MQTT subscription when Matter is disabled (#25140) 2026-10-14 15:08:29 +02:00
SoWizard df1d8d5aa3 Matter: clean up incomplete initial subscriptions (#25137) 2026-10-12 11:35:49 +02:00
Jason2866 68157a2629 support for ESP32-C61 (#25135)
* support for ESP32-C61

* disable C61 in CI since there is no safeboot on OTA Server yet
2026-10-11 18:33:11 +02:00
SoWizardands-hadinger f1244e5bb4 Matter: report HTTP bridged-device reachability changes (#25115)
* Matter: report HTTP bridged-device reachability changes

* Update Matter_HTTP_remote.be

* Update http_recovery_tests.be

---------

Co-authored-by: s-hadinger <49731213+s-hadinger@users.noreply.github.com>
2026-10-11 18:02:52 +02:00
bcc37a50ab Matter add Wi-Fi Network Diagnostics cluster (0x0036) (#25126)
* Matter add Wi-Fi Network Diagnostics cluster (0x0036)

Expose BSSID, SecurityType, WiFiVersion, ChannelNumber and RSSI on the
Root endpoint so controllers (Apple Home, Home Assistant) can show which
access point and channel a device uses. BSSID and channel changes are
reported to subscribers when the device roams.

tasmota.wifi() now also reports `channel`, `security` and `phy`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Clamp RSSI

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: s-hadinger <49731213+s-hadinger@users.noreply.github.com>
2026-10-11 17:41:47 +02:00
s-hadinger ddec734fa1 Berry fix formatting for long strings (#25132) 2026-10-10 19:43:00 +02:00
Jason2866 c6b19bb70c Initial ESP32-S31 support (#25130)
* ESP32-S31 support (#588)

* Arduino IDF 6.1 based framework only for S31

* code review changes Thei for tasmota_types.h
2026-10-10 17:50:13 +02:00
SoWizardands-hadinger edd93777ae Matter: add virtual Generic Switch button events via MtrUpdate (#25091)
* Matter: add virtual Generic Switch button events via MtrUpdate

* Matter: add repeated virtual-button memory regression

* Update MATTER_CLASS_HIERARCHY.md

---------

Co-authored-by: s-hadinger <49731213+s-hadinger@users.noreply.github.com>
2026-10-10 10:47:34 +02:00
s-hadinger a55cfa251a Matter support for Light RBG+CT (5 channels) and refactoring of lights (#25123) 2026-10-09 19:34:23 +02:00
s-hadinger e2a665dfca Berry format support width for %c format (#25122) 2026-10-09 18:48:23 +02:00
SoWizard af56a31050 Matter: complete subscription reports on StatusResponse (#25096) 2026-10-09 14:28:33 +02:00
s-hadinger 11ba5be41b Berry fix varname (#25104) 2026-10-05 10:47:33 +02:00
s-hadinger 42be813c79 Matter remove superfluous log (#25101) 2026-10-03 23:39:41 +02:00
s-hadinger 78902044e2 Matter fix non-bridge endpoint topology (#25099) 2026-10-03 23:22:05 +02:00
SoWizardands-hadinger 1d16504489 Berry: safely collect partially constructed native closures (#25093)
* Berry: safely collect partially constructed native closures

* Update be_func.py

---------

Co-authored-by: s-hadinger <49731213+s-hadinger@users.noreply.github.com>
2026-10-03 00:23:09 +02:00
s-hadinger 2692124c3e Berry transpose fix to Python port 2026-10-02 21:39:03 +02:00
SoWizard 3ec4b0308e Berry: release native int64 result allocations (#25092) 2026-10-02 20:57:04 +02:00
s-hadinger b5a73b8a71 Berry fix walrus to not create variable (#25090) 2026-09-30 17:18:28 +02:00
s-hadinger ddc0ae61d9 Matter physical and virtual Garage Door device types with Closure Control cluster (#25089)
* Matter physical and virtual Garage Door device types with Closure Control cluster

* fix CHANGELOG
2026-09-29 22:08:42 +02:00
s-hadinger a242811ec8 Matter Soil Sensor device type with Soil Measurement cluster (Matter 1.6.0) (#25088) 2026-09-29 15:50:13 +02:00
s-hadinger 1f543a3374 Matter simplify TLV type with generalized integers (#25087) 2026-09-29 14:36:02 +02:00
s-hadinger 835813e423 Add leftover from previous PR #25086 2026-09-29 12:49:01 +02:00
s-hadinger 4d4dd78be2 Matter v1.6.1 more improvements (#25086) 2026-09-29 12:46:50 +02:00
Ludovic BOUÉ c4327653db feat(matter): Phase 1 - Update Root Node for Matter 1.6.0 (#25078)
* docs(matter): Update to Matter 1.6.0 specification

- Add MATTER_1.6.0_DETAILED_GAP_ANALYSIS.md: Comprehensive spec analysis with 4-phase implementation roadmap covering Closures unified architecture, Energy Management clusters (Commodity Price/Tariff, Device EM), Soil Sensor device type
- Add MATTER_1.4.1_TO_1.6.0_CHANGELOG.md: Version-by-version changelog (1.5.0, 1.5.1, 1.6.0) with CSA spec references and GitHub release links
- Update ROOT_PLUGIN_COMPLIANCE_ANALYSIS.md: Add Matter 1.6.0 delta impact analysis covering DataModelRevision 18→20, Access Control read attributes, Group Key Management rev 2→4 bump
- Explicitly defer Groupcast (0x0006) to v1.6.1+ evaluation; out of scope for current release
- Verified cluster/device type IDs from official CSA PDFs (23-27350 Application Cluster Spec, 23-27351 Device Library Spec)
- Target: Tasmota Matter 1.6.0 compliance (DataModelRevision = 20)

* feat(matter): Phase 1 - Update Root Node for Matter 1.6.0

- Update DataModelRevision: 18 → 20 (Matter 1.4.1 → Matter 1.6.0)
- Add Access Control (0x001F) read_attribute handlers for 3 mandatory attributes:
  - SubjectsPerAccessControlEntry (0x0002) = 4
  - TargetsPerAccessControlEntry (0x0003) = 3
  - AccessControlEntriesPerFabric (0x0004) = 4
- Bump Group Key Management (0x003F) cluster revision: 2 → 4 (Matter 1.6.0)
- Add Group Key Management read_attribute handlers for 3 missing attributes:
  - GroupTable (0x0001) = empty list
  - MaxGroupsPerFabric (0x0002) = 4
  - MaxGroupKeysPerFabric (0x0003) = 3
- Update documentation headers to reflect Matter 1.6.0 target

Fixes ROOT_PLUGIN_COMPLIANCE_ANALYSIS.md high-priority gaps for v1.6.0 compliance.
Effort: Phase 1 complete (~1-2 weeks planned in roadmap, actual implementation ~2 hours).
2026-09-28 21:12:12 +02:00
s-hadinger f93502ca5f Matter update specs to 1.6.1 (to be used by AI) (#25083) 2026-09-28 19:51:16 +02:00
c683ec3bce Matter: add Electrical Power Measurement cluster to On/Off Plug-in Unit (#24922)
* Matter: add Electrical Power Measurement cluster to On/Off Plug-in Unit

Adds a new "relay_power" plugin type (Matter_Plugin_OnOff_Power) that extends
the existing relay/OnOff Plug-in Unit (0x010A) with the Electrical Power
Measurement cluster (0x0090), reporting Voltage, Current, ActivePower,
ApparentPower, ReactivePower, Frequency and PowerFactor from Tasmota's ENERGY
sensor JSON, so Matter controllers can display live power usage for smart
plugs with energy monitoring.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* Matter: add v_relay_power virtual variant for Electrical Power Measurement

Adds Matter_Plugin_Virt_OnOff_Power ("v_relay_power") so the new
ElectricalPowerMeasurement-enabled plug can be exercised without physical
hardware, driven entirely via `MtrUpdate` (e.g. Voltage/Current/ActivePower/
ApparentPower/ReactivePower/Factor/Frequency).

Also guards Matter_Plugin_OnOff_Power.parse_sensors() against VIRTUAL
instances (it must not read the local ENERGY sensor) and declares
UPDATE_COMMANDS so MtrUpdate accepts the new measurement keys. The wattage
key is named `ActivePower` rather than `Power` since `Power` is already the
inherited On/Off boolean command.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* Matter: register new plugin headers in be_matter_module.c

be_matter_module.c maintains an explicit, hand-written list of solidified
Berry header includes (no auto-discovery). The new OnOff_Power and
Virt_OnOff_Power plugin files were missing from that list, so their classes
were never defined, causing the "undeclared" build failures reported by CI
(be_class_Matter_Plugin_OnOff_Power / be_class_Matter_Plugin_Virt_OnOff_Power)
even though matter.plugins_classes referenced them by name.

* Matter: add http_relay_power bridge variant for Electrical Power Measurement

Adds Matter_Plugin_Bridge_OnOff_Power ("http_relay_power") so the
ElectricalPowerMeasurement-enabled plug can also be bridged from a remote
Tasmota device over HTTP (polling `Status 10`), completing the local/virtual/
bridge trio already used by other plugins (relay, relay_power now included).

Refactors the ENERGY-object parsing in Matter_Plugin_OnOff_Power into a
shared `_parse_energy()` helper used by both `parse_sensors()` (local device)
and the new `parse_status()` override (bridge, index 10 / Status 10), and
guards `parse_sensors()` against BRIDGE instances so a bridge endpoint never
reads the local gateway's own ENERGY sensor by mistake.

Registers the new solidified header in be_matter_module.c (missed this for
the previous two plugin files, which broke CI) and adds http_relay_power to
the bridge type dropdown in Matter_UI.be.

Verified with a full PlatformIO build for tasmota32s3 (SUCCESS).

* Matter: auto-detect relay_power on remote bridge devices with an ENERGY sensor

The "Add Remote sensor or device" auto-detection always suggested plain
light0/relay for every detected relay channel, even when the remote device
reports an ENERGY sensor (e.g. a NOUS A5T 4-outlet power strip with a single
shared CSE7766 meter) - so relay+power devices showed up as plain "Light 0
OnOff" with no way to pick relay_power from that screen (the type column is
static text for already-detected rows, only editable for a brand new blank
row).

generate_config_from_status() now tags the first detected relay as
relay_power when ENERGY is present, leaving the rest as plain relays: most
Tasmota energy-monitoring boards have a single meter for the whole device,
not one per relay, so duplicating the cluster across every channel would
misleadingly show the same aggregate reading on each endpoint.

* Matter: compose Electrical Sensor device type onto the power-monitoring plug

Adds device type 0x0510 (Electrical Sensor) alongside 0x010A (On/Off
Plug-in Unit) on the same endpoint for relay_power/v_relay_power/
http_relay_power, plus the mandatory Power Topology cluster (0x009C) with
the NODE feature (this single ENERGY sensor meters the whole device, not a
subset of endpoints - matches Tasmota's non-indexed ENERGY object).

Matches the Matter 1.4.1 Device Library requirement that Electrical Power
Measurement lives on an Electrical Sensor device type, while keeping the
cluster on the plug's own endpoint (composed DeviceTypeList) rather than a
separate endpoint, since controllers only recognize the measurement
capability when the Electrical Sensor device type is actually declared.

Verified on real ESP32-S3 hardware via chip-tool: endpoint 2 now reports
DeviceTypeList = [266 (On/Off Plug-in Unit), 1296/0x0510 (Electrical
Sensor), 19 (Bridged Node)], and Power Topology FeatureMap = 1 (NODE).

---------

Co-authored-by: Ludovic BOUÉ <938089+lboue@users.noreply.github.com>
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-27 15:35:46 +02:00
Jason2866 a622f395d4 fix: be_matter_module.c:280:19: error: #if with no expression (#25075) 2026-09-27 14:37:51 +02:00
s-hadinger f151ad8145 Fix Matter commissioning mDNS announcements (#25069) 2026-09-26 15:18:39 +02:00
s-hadinger 5bb6c38cfb Fix Berry parsing from upstream (#25064) 2026-09-24 19:21:33 +02:00
s-hadinger f55fe444d7 MQTT 5.0 with focus on request/response (optional) (#25050) 2026-09-22 10:24:51 +02:00
s-hadinger 9fac74bac5 Berry rare register allocation bug (#25010) 2026-09-06 13:04:54 +02:00
gudinis e17a83c510 Matter: fix autoconfiguration after configuration reset (#24997) 2026-09-05 13:56:40 +02:00
s-hadinger a3c97ad00a Berry sortedmap support for json.dump (#24999) 2026-09-02 23:07:06 +02:00
Theo Arends da3e0d12cb Simplify berry virtual buttons 2026-09-02 17:49:22 +02:00
Theo Arends 079718527b Add Berry virtual button support 2026-09-02 15:18:49 +02:00
Theo Arends 559a9e0275 Fix berry I2C driver message 2026-09-01 15:36:51 +02:00
Christian Baars 48393544b5 MI32: improve dashboard and widget handling (#24972)
- Preserve fractional values in Berry MI32.set_temp() and MI32.set_hum().
- Limit saved MI32 configurations safely to 32 sensors.
- Respect the configured temperature unit (SetOption8) in dashboard temperature and dew-point values.
- Update browser-side age counters using real elapsed time.
- Allow a Berry widget response to contain multiple independent cards.
- Send dashboard metrics in a dedicated response every ten seconds.
- Pause dashboard polling while the browser tab is hidden.
- Display chained knob button presses as their numeric count.
- Various small improvements.
2026-08-22 12:49:16 +02:00
s-hadinger ff8130c59a Berry fix sortedmap to act like a map (#24964) 2026-08-18 10:17:24 +02:00
s-hadinger fc2b58652d Berry make sortedmap subclass of map (#24961) 2026-08-18 08:27:41 +02:00
s-hadinger db56cd62aa Berry extend sortedmap constructor (#24955) 2026-08-12 17:02:22 +02:00