Commit Graph
21887 Commits
Author SHA1 Message Date
Theo Arends db3ae7e027 Merge branch 'development' into prerelease-15.6.0 v15.6.0 2026-08-25 10:43:03 +02:00
Theo Arends 8ce646231a Update change logs 2026-08-25 10:42:40 +02:00
CT Tsai a46e750b28 Keep the first panic in the ESP32 crash recorder (#24976)
* Keep the first panic in the ESP32 crash recorder

When the panic handler stalls, the interrupt watchdog re-enters through
panicHandler() and custom_crash_recorder() replaced the record of the
original exception with a frame that only shows the panic handler itself
(EPC inside xt_unhandled_exception, exccause 6 reported as
"IntegerDivideByZero" although it is PANIC_RSN_INTWDT_CPU1).

Record only the first panic of a boot, remember whether it came in via
panicHandler() and decode its exccause with the PANIC_RSN_* names in
that case.

* Move pseudo exccause names to PROGMEM
2026-08-25 10:33:24 +02:00
Theo Arends ea70d9438f Merge branch 'development' into prerelease-15.6.0 2026-08-24 11:43:45 +02:00
Theo Arends 5dfbd59be9 Update meta data 2026-08-24 11:42:43 +02:00
Theo Arends a0a94f52b9 Prep v15.6.0 2026-08-24 11:34:26 +02:00
Theo Arends 65733940dd Merge branch 'development' into prerelease-15.6.0 2026-08-24 10:51:12 +02:00
Theo Arends c69d88e8a9 BTHome fix initial last button 2026-08-24 10:17:06 +02:00
Theo Arends 3c184e43d9 Update change logs 2026-08-24 09:56:04 +02:00
Theo Arends 76a450080c Add BTHome unparsed to JSON and redesign button and events JSON 2026-08-23 16:22:18 +02:00
Christian Baars 37fed605ba MI32: improve logging and BLE.info (#24974)
* MI32: improve logging and BLE.info

* add declaration to prevent compile error in other environments
2026-08-23 10:25:27 +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
LesNewell accf05b21b Fix Zigbee multi-endpoint attribute suffix using insertion order instead of endpoint (#24948)
Z_Data::toAttributes() added attributes with no explicit suffix, so
Z_attribute_list::addAttribute defaulted to key_suffix =
countAttribute(attr.key) - an insertion-order counter, not the
device's real endpoint. Since toAttributes() is called once per
device.data element, the suffix each endpoint's attribute landed on
depended on device.data's internal list order, which isn't guaranteed
to be endpoint-ascending. On a 4-gang relay whose endpoints were
discovered as [2,1,3,4], this mapped endpoint 2 to bare "Power" and
endpoint 1 to "Power2" - swapped - while 3 and 4 happened to land
correctly.

SetOption101 does not fix this: it's only applied in
Z_postProcessAttributes(), which runs on the live per-message
ZbReceived path and correctly uses the frame's true src_ep. That
corrected data does get merged into device.attr_list, but
zigbee.find(name).info()/ZbStatus2 read from the separate device.data
store via toAttributes(), a parallel path Z_postProcessAttributes()
never touches.

Fix: suffix by the record's true endpoint (Z_Data::getEndpoint()),
matching the same key_suffix = src_ep convention
Z_postProcessAttributes() already uses. getEndpoint() == 0 ("any
endpoint") falls back to the original count-based behavior, unchanged.

Verified on hardware: a Tuya TS0004 4-gang relay with a non-ascending
Config list now reports all 4 endpoints under their correct suffix,
with no regression on a naturally-ordered multi-endpoint device.
2026-08-21 11:51:58 +02:00
Rene Hexel c988ddfc2f Add Shelly emulation for ESP32 (#24952)
* Add Shelly emulation for ESP32 (EMUL_SHELLY)

Presents Tasmota as a generation 2 Shelly Pro 2PM to controllers
speaking the Shelly Gen2 RPC protocol, such as the Sigenergy
mySigen application.

The emulation follows Belkin WeMo and Hue Bridge: compiled in
with USE_EMULATION_SHELLY (ESP32 only, as it needs the IDF mDNS
component) and selected at runtime with `Emulation 3` or on the
Configure Other web page, where it appears as "Shelly single
device".

When selected, the driver advertises _shelly._tcp over mDNS with
the IPv4 and IPv6 addresses of all active interfaces and serves
/shelly and /rpc. Up to two switch, two input and two metering
channels are mapped onto Tasmota relays, switches and the energy
driver. Channels beyond the relays configured keep their state
in NVS so a controller still sees two working outputs.

Shelly controllers discard mDNS replies that do not carry the
RFC 6762 TTL of 255, which Espressif's mDNS component only sets
on multicast, so the driver raises the TTL on the mDNS sockets
after registration.

* Make Shelly emulation opt-in and renumber driver
2026-08-21 11:50:19 +02:00
SteWers dafc19ba8a [EQ3-TRV] More code refactoring (#24969)
* [EQ3-TRV] More code refactoring

Here is the next major refactoring of the EQ3/TRV ESP32 BLE driver.

Below are the key highlights, alongside many other changes:

* **Optimize data presentation:** Hide sensor data in the Web UI if it is too old.
* **Minimize RAM footprint:** Sort `eq3_device_t` structure members to eliminate compiler memory padding.
* **Robust subcommand queue:** Rework command queue handling utilizing C++ container types to completely prevent memory leaks and minimize heap fragmentation.
* **Streamline device discovery:** Rework `Add device` logic to improve search performance and adapt to an index-free approach.
* **Decouple timeout handling:** Move slot cleanup into the cyclic `EQ3EverySecond` task for deterministic background execution.
* **Smart poll scheduling:** Rewrite polling routines to distribute requests evenly over `EQ3Period` while preventing Bluetooth stack congestion.
* **Unify command syntax:** Change CLI/MQTT commands from `TRV <CMD>` to `TRV<CMD>`.
* **Improve type safety:** Introduce strongly-typed `enum` definitions for driver operation results.
* **Modern C++ practices:** Replace legacy index-based arrays with range-based for loops (*for-each*) when possible.

* Uppercase TRV

* Simplify prefix matching
2026-08-21 11:47:29 +02:00
Christian Baars 03d9c93472 MI32: harden Berry BLE client and server handling (#24970)
Fix write and subscription behavior, reuse GATT discovery caches, preserve notification metadata, and harden server buffers, event headers, and BLE.info diagnostics.
2026-08-20 13:59:47 +02:00
Theo Arends 40276f2a92 Merge branch 'development' of https://github.com/arendst/Tasmota into development 2026-08-19 16:10:13 +02:00
Theo Arends 68760f2a61 Add more BTHome decodes 2026-08-19 16:10:02 +02:00
Christian Baars 9e05c4440d MI32: Harden packet parsing and BLE operation state (#24967) 2026-08-19 16:07:46 +02:00
Theo Arends cc310d0a34 Reduce code size and add support from Mi32Block 2026-08-19 10:50:18 +02:00
Theo Arends e4e56b6ba4 BTHome: fix decryption counter issue 2026-08-18 17:08:18 +02:00
Christian Baars c9087e48b6 MI32: Harden Berry BLE buffer handling (#24966) 2026-08-18 17:01:44 +02:00
Theo Arends 9978459714 Update change logs 2026-08-18 11:47:31 +02:00
Norbert Richter 168ec0de54 NeoPool delocalize all JSON outputs (#24965) 2026-08-18 11:10:34 +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
Theo Arends 88c6ec4dfd Make BLE GUI look nicer 2026-08-17 14:06:11 +02:00
Theo Arends 3e9ebb7d50 Fix intermittent lost ble webpage 2026-08-17 13:54:03 +02:00
Theo Arends 63e278de74 Update change logs 2026-08-17 11:01:49 +02:00
Norbert Richter 1d682c823a NeoPool fix issue with localized JSON key (#24962) 2026-08-17 10:56:18 +02:00
Theo Arends 0e940c955f Add BTHome acceleration decoding 2026-08-16 15:10:57 +02:00
Theo Arends 7c5a9104e3 Add BTHome max 8 button support 2026-08-16 12:50:26 +02:00
Theo Arends ed3650b7f0 Add chk for duplicates 2026-08-15 22:47:08 +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
Theo Arends deb9a42ad1 BTHome disable event on button none 2026-08-14 14:43:22 +02:00
Theo Arends b20522054a Clean up and sync messages 2026-08-13 17:06:15 +02:00
Theo Arends 0d651080b9 Extend BTHome decoding with pressure and voltage 2026-08-13 16:31:46 +02:00
Theo Arends 4999f2bd5e Update change logs 2026-08-13 14:02:12 +02:00
SteWers 1e769b93ca [EQ3-TRV] Code refactor (#24956)
Large refactor of the EQ3/TRV ESP32 BLE driver. The primary goal was to replace `strcmp`-based logic in TRV subcommand handling with an index-driven approach.

Additional improvements included:
* Optimizing ESP32 memory management using `constexpr` and removing obsolete `PSTR` and `PROGMEM` statements
* Adjusting variable types for better efficiency
* Improving overall code readability
* Enabling safer, compile-time constants

These changes reduce binary size, flash usage, RAM footprint, and CPU overhead.
Functional behavior remains entirely unchanged.
2026-08-13 13:18:44 +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
Theo Arends 53b5911ce6 Prep BTHome more sensor decoding 2026-08-11 15:56:38 +02:00
SteWers 6a7ac34eaa [EQ3-TRV] Add command names to log (#24944)
* [EQ3-TRV] Add command names to log

Enhance EQ3 TRV logging to include command names and clearer messages.

* Log queued command
2026-08-10 14:22:57 +02:00
Theo Arends 58907cf579 Update change logs 2026-08-10 14:22:15 +02:00
s-hadinger 7e2157d591 HASPmota better support for textarea (#24946) 2026-08-08 17:10:40 +02:00
Theo Arends 351a1e64ec Add some more checks 2026-08-06 16:42:22 +02:00
Theo Arends bb8ce1773e Add limited support for BLE BTHome (#20763) 2026-08-06 14:56:48 +02:00
Theo Arends 552ddc5b1d Restructure source file header 2026-08-05 15:40:34 +02:00