Commit Graph
2526 Commits
Author SHA1 Message Date
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 a8d91f4acb MQTT tolerate delayed PINGRESP (#25067)
* MQTT tolerate delayed PINGRESP

* Add default MQTT_MAX_PING_OUTSTANDING
2026-09-26 16:37:52 +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
Theo Arends 22079e531d Add uDisplay I2C contast control (DisplayDimmer) 2026-09-13 15:53:23 +02:00
Theo Arends 50d9e8a13c Add support for M5Stack Unit6CL display 2026-09-11 09:50:05 +02:00
Theo Arends 7e51b9e87d Add SSD1306 SPI support 2026-09-07 16:05:14 +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
52b2d232e1 Fix build error: use #ifdef for USE_UNIVERSAL_TOUCH in UDSP_DEBUG block (#24957)
Building with UDSP_DEBUG enabled fails:

  lib/lib_display/UDisplay/src/uDisplay.cpp:908:24: error: #if with no expression
    908 | #if USE_UNIVERSAL_TOUCH
        |                        ^

USE_UNIVERSAL_TOUCH is defined without a value (my_user_config.h and the
user_config_override.h convention both use a bare `#define`), so `#if` expands
to an empty expression and the preprocessor errors out.

Every other test of this macro already uses #ifdef:

  uDisplay.cpp:47        #ifdef USE_UNIVERSAL_TOUCH
  uDisplay.cpp:792       #ifdef USE_UNIVERSAL_TOUCH
  uDisplay_touch.cpp:4   #ifdef USE_UNIVERSAL_TOUCH

so this looks like a typo rather than a deliberate value test.

Introduced in a1639507d ("Udisp SPI fix for mono color display", #24899). It
goes unnoticed in normal builds because the block sits inside #ifdef
UDSP_DEBUG, which ships commented out at uDisplay.cpp:27 — it only surfaces
for anyone who turns that debug logging on. Found on an ESP32-P4 build with
UDSP_DEBUG enabled for DSI init diagnostics.

Co-authored-by: Ari Friedman <afriedman@millsupplyco.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-08-15 13:30:40 +02:00
s-hadinger db56cd62aa Berry extend sortedmap constructor (#24955) 2026-08-12 17:02:22 +02:00
Christian Baars b626d38df1 Fixes broken sensor table layout when HTTP/MQTT bridges run alongside local sensors (#24953) 2026-08-12 16:49:43 +02:00
s-hadinger 650d525699 Berry json.dump() works with subclasses of map and list (#24954) 2026-08-12 15:41:17 +02:00
Christian BaarsandChristian Baars d8578c5a3f add remote devices via MQTT (#24951)
Co-authored-by: Christian Baars <christianbaars@MacStudio-von-Christian.local>
2026-08-12 07:49:44 +02:00
s-hadinger 7e2157d591 HASPmota better support for textarea (#24946) 2026-08-08 17:10:40 +02:00
s-hadinger 6f7f91f1be Fix potential race condition in UdpListener (#24932) 2026-08-01 16:59:12 +02:00
s-hadinger 0e12192a88 Add LList README (#24930) 2026-07-31 22:19:30 +02:00
s-hadinger b6590fef1c TLS fix public key fingerprint for ECDSA certificates (#24928) 2026-07-31 17:06:26 +02:00
s-hadinger fabc35f034 Minor fixes in LList (#24927) 2026-07-31 16:15:03 +02:00
s-hadinger 6fbf626977 MQTT more hardening and fixes from pubsub3 (#24920) 2026-07-26 21:54:04 +02:00
s-hadinger 2d340102a3 PubSub lib renamed TasmotaPubSub, hardening fixes and comprehensive non-regression tests (#24916) 2026-07-23 20:49:54 +02:00
s-hadinger c144ac9639 TLS support for EC P-384 curve in server certificate (#24909) 2026-07-20 21:40:53 +02:00
gionag 3dd46b0b44 Fix ESP8266 crash-loop on PZEM/Modbus: move stray delay() inside rx-enable guard (#24886) 2026-07-20 15:52:18 +02:00
s-hadinger 5614aaec2a HASPmota and LVGL stripes widget (#24907) 2026-07-18 17:34:55 +02:00
Christian Baars a1639507d1 Udisp SPI fix for mono color display (#24899)
* fix union offset for SPI mono display

* fix debug log to correcty use USE_UNIVERSAL_TOUCH
2026-07-14 19:03:57 +02:00
5acc4a368b Add Matter virtual IR HVAC thermostat support (#24821)
* Add Matter virtual IR HVAC thermostat support

Introduce a generic Matter thermostat plugin and a virtual HVAC plugin that maps thermostat state changes to Tasmota IRHVAC commands.

Add virtual HVAC option switches for IRHVAC boolean options such as Econo, Quiet, Turbo, Light, Filter, Clean, Beep, and iFeel. These option endpoints are attached to the HVAC endpoint PartsList instead of being listed as top-level aggregator parts.

Expose the new virtual device types in the Matter UI and refresh endpoint PartsList attributes when endpoint composition changes.

* Warn on invalid Matter v.HVAC vendor

* Fix regression

* Matter virtual IR HVAC thermostat support

* Revert

---------

Co-authored-by: Jean-Laurent Girod <macjl@users.noreply.github.com>
Co-authored-by: s-hadinger <49731213+s-hadinger@users.noreply.github.com>
2026-07-07 20:00:24 +02:00
s-hadinger 0e4f4c7a97 HASPmota new style for demo (#24875) 2026-07-05 17:54:01 +02:00
s-hadinger aec8e2395a HASPmota ability to set default screen background on p0b0 object (#24874) 2026-07-04 12:47:01 +02:00
s-hadinger e352266405 Berry fix warnings when running unit tests (#24859) 2026-06-26 15:52:27 +02:00
s-hadinger 39ad0f57a4 Berry bytes methods setbits/getbits transposed to native and support for big endian (#24857) 2026-06-26 09:23:33 +02:00
Theo Arends ee435ea968 Fix possible buffer overflow 2026-06-22 15:24:06 +02:00
Štěpán Dalecký 6c208a6b5f Enhance Matter plugin functionality for On/Off control and add support for Global Scene Control and related commands (#24854) 2026-06-21 10:18:54 +02:00
s-hadinger ba6159f78a Berry LVGL mapping refactor (#24844) 2026-06-16 12:32:38 +02:00
s-hadinger 43a5153cab Berry more multiple minor fixes (#24843) 2026-06-16 09:34:55 +02:00
s-hadinger 88eff2ce51 AsyncHttpClientLifght code analysis (#24841) 2026-06-15 22:11:49 +02:00
s-hadinger bd466806fe Berry optimized solidified structures for code constants and maps (#24838) 2026-06-14 20:59:19 +02:00
s-hadinger b29f6926e1 Berry fix rare GC bug in deinit (#24837) 2026-06-14 19:54:35 +02:00
s-hadinger fc1c2a563f Berry fix rare GC bug in bytecode (#24836) 2026-06-14 19:35:49 +02:00
Theo Arends c15ea2852e Fix RTSP strncpy buffer overflow 2026-06-10 14:35:35 +02:00
Theo Arends cd38f60218 Change Sensirion_Core library from v0.7.2 to arduino-core v0.7.3 2026-06-05 16:42:08 +02:00
Theo Arends 01d044cedc Changed SCD30 library FrogmoreScd30 to Sensirion arduino-i2c-scd30 v1.1.1 2026-06-05 15:31:11 +02:00