52 Commits
Author SHA1 Message Date
Sleeper85 c3affb8a10 Add a Board name text sensor and show it in the HA dashboards
The board_name substitution of each board_*.yaml only reached the
telemetry POST. Home Assistant had no way to read it: the device model is
replaced by the project name, and a sub-device carries no model.

device_base.yaml declares a "Board name" diagnostic text sensor on the
board sub-device. Its value is a constant, so it is published once from
the existing on_boot at priority 600, and update_interval is never: the
API resends the stored state on every connection.

The Diagnostic card of the HA dashboards shows it in a Board row, under
Chip.

The RPi Pico board does not include device_base.yaml and has no such
sensor.
2026-11-14 16:00:27 +01:00
Sleeper85 67b6892e24 Set ESPHome min_version to 2026.11.0 and declare sub-device relation
ESPHome 2026.11 makes `relation` a required option for every entry under
`esphome: devices:`, and 2026.10 rejects that key. Both changes have to
land together, so raise min_version to 2026.11.0 in the same commit.

Use `relation: via` on all ten device declarations (BMS, sniffer, shunt,
balancer, Deye stack, board, YamBMS instance, CAN and RS485 links). It is
the value the API assumed before the key existed, so Home Assistant keeps
showing the devices exactly as before. `child` would fit the board, the
YamBMS instance and the inverter links better, but it is left for later:
a Home Assistant release that reads the field without supporting `child`
drops those devices and their entities.

Docs: ESPHome 2026.11.0 in README and Installation_procedure (which still
said 2025.11.0), Design_decisions no longer equates min_version with the
flow_control requirement, and Coding_conventions documents the
`relation: via` rule.
2026-11-09 00:06:28 +01:00
Sleeper85 4fd0bd796c Set YamBMS version to 1.8.2 2026-11-08 23:45:59 +01:00
Sleeper85 e3f35aedb0 Packages: Declare each UART in the package that consumes it
Each package now imports its UART from its *_uart_id var and keeps its own baud
rate key. WK2168 channels work the same way, uart_flow_control_pin replaces the
flow control include, and min_version moves to 2026.10.0. Breaking change.
2026-11-08 23:08:34 +01:00
Sleeper85 281d39ac18 New inverter brand select drives the CAN and RS485 protocol
BREAKING CHANGE: both inverter link selects are renamed, so their stored value is
reset. The link stays inactive until an inverter brand is selected. See
documents/README/changelog/Changelog_Inverter_brand_and_protocol.md

New `Inverter brand` select (16 brands) and reworked `Protocol` select, now
defaulting to `Automatic`. Selecting the brand is enough, the protocol follows;
an explicit protocol still takes priority over the brand.

The protocol is resolved once, at boot and on every select change, into
`canbus${canbus_id}_active_protocol` / `rs485${rs485_id}_active_protocol`.
Everything else reads that integer instead of dispatching on `active_index()`,
where `== 5` meant LuxPower purely by convention of the option order.

New shared `yambms_inverter_registry.yaml`: protocol dictionary (`YB_PROTO_*`),
brand to protocol mapping, and the battery mode and note of each couple.

Removed the `YamBMS name` select: the manufacturer name sent on CAN frame 0x35E
now derives from the protocol in use, which is what `Automatic` already did.

Removed the `canbus_extended_ack` substitution: both the 11-bit and the 29-bit
ACK triggers are registered, so the Schneider XW Pro needs no configuration.

Renamed CAN `PYLON 1.2` to `PYLON V1` and RS485 `Pylontech` to `PYLON`.

New per-link diagnostics `Inverter link protocol`, `Inverter battery mode` and
`Note`, with a markdown card in the dashboards, alongside a system fault card.

Telemetry: `comm_bus` / `comm_protocol` replaced by `inverter_brand`,
`inverter_bus`, `inverter_protocol` and `inverter_protocol_source`, one slot per
declared link instead of a single value overwritten by the last one.

RS485 packages split: `yambms_rs485.yaml` is the entry point carrying the selects,
`yambms_rs485_pylon.yaml` the protocol implementation. The baud rate is applied
with `set_baud_rate()` + `load_settings()` instead of extending the uart
component, so boards using a UART expander no longer need their own include.

Fixes:
- the CAN bus kept re-emitting the last frame every 100 ms when the protocol was
  set to `Disabled` at runtime
- the RS485 link kept answering the inverter with stale data on `Disabled`, the
  proxy sensors it reads are now invalidated
- a `Disabled` link no longer lights the fault LED, it is unregistered from the
  fault registry instead of being reported as failing
- the reported bus and protocol were overwritten when a node declares several
  inverter links
- changing the protocol restarts the CAN frames immediately instead of waiting up
  to 30 s for the next retry tick
2026-11-08 23:08:33 +01:00
Sleeper85 668b50d7a0 Set YamBMS version to 1.8.1 2026-11-08 23:08:33 +01:00
Sleeper85 7c8abeec0a Set ESPHome min_version to 2026.10.0 2026-11-08 23:08:33 +01:00
Sleeper85 3e596ea82a Reworked the update and telemetry services
- update and telemetry are now gated independently by substitution;
  var_service and its Update service switch are removed
- the uptime text sensor is published by its source instead of polling
  it, which fixes the 24855d readings that reached the telemetry, and
  the raw seconds are now sent instead of the formatted string
- the MAC address is replaced by a salted SHA-256, derived identically
  server side so no pairing window is needed
2026-11-08 23:08:33 +01:00
Sleeper85 7d00721dfe Charging cycles published 0 instead of NaN when no BMS is combined
bms_base_charging_cycles.yaml coerced a NaN raw reading to 0 before adding
the user offset, instead of letting NaN propagate like the sensors fixed
in dee203e4 ("Sensors published to NAN when no BMS is combined"). *_raw is
NaN until the first trusted BMS frame arrives after a reboot, so both
`charging cycles` and `total charging cycle capacity` published a literal
0 during that transient - with `state_class: total`, that 0 also landed
in Home Assistant's long-term statistics.

Fix is to drop the two `if (isnan(...)) = 0;` coercions and let
`NaN + offset == NaN` propagate, so both sensors go unavailable through
the transient instead of reporting 0.

Both sensors also moved from `or: [throttle: 10s, delta: 1]` to the
NaN-safe rate-limit filter already used throughout yambms_core.yaml, since
the built-in `delta` filter drops a NaN transition without updating its
reference and would otherwise freeze the sensor on its last value for up
to 10s.

That filter is extracted from yambms_core.yaml into
packages/base/device_base.yaml, which every node loads via its board_*.yaml
regardless of whether it runs the YamBMS engine - unlike yambms_core.yaml,
which is absent from a multi-node Modbus-server node that only exposes
BMS/Shunt packages. Renamed yambms_rate_limit_filter to rate_limit_filter
now that it is no longer engine-specific.
2026-11-08 23:08:33 +01:00
Sleeper85 c9b7cf7b84 Set esphome min_version to 2026.8.0 2026-11-08 23:08:33 +01:00
Sleeper85 e78df61e6f CRLF to LF conversion 2026-11-08 23:08:33 +01:00
Sleeper85 31314847d9 YamBMS core 1.8.0 - CVL, CCL and DCL code improvements 2026-11-08 23:08:32 +01:00
Sleeper85 c633227c97 Set esphome min_version to esphome 2026.7.0 2026-11-08 23:08:32 +01:00
Sleeper85 f49a0520cf Set YamBMS version to 1.7.1 2026-11-08 23:08:31 +01:00
Sleeper85 23d549ab38 Set esphome min_version to 2026.6.0 2026-06-28 19:51:51 +02:00
Sleeper85 f117319007 Improved Sub-Devices and entity names 2026-03-24 00:37:48 +01:00
Sleeper85 fcad4d6fc1 Added new LVGL display 800x400 basic blue 2026-02-18 10:36:17 +01:00
Sleeper85 893741d8d0 Set esphome min_version to 2026.1.5 2026-02-16 15:24:36 +01:00
Sleeper85 2c4022d54c Updated ESPHome min_version 2026-02-09 08:27:36 +01:00
MrPabloUK e846ff8ea2 Update fault registry source sensors to trigger on initial state (#203) 2026-02-05 23:44:42 +01:00
MrPabloUK 9c664bd5fb RP2040 fix - remove global fault mask logging (#198) 2026-02-05 12:36:56 +01:00
MrPabloUK 447a18b832 Component Fault Registry & Advanced LED Control (#194) 2026-02-05 09:26:49 +01:00
Sleeper85 089338ace1 New YamBMS 1.7.0 three steps lambdas 2026-01-30 16:56:04 +01:00
Sleeper85 a343ee32ab Fixed entity names following sub_device PR #134 2025-12-23 12:25:13 +01:00
Sleeper85 da8e3f0200 Fixed sub_device 2025-12-17 22:04:05 +01:00
MrPabloUK 547b824b5e Sub device support (#134) 2025-12-17 00:42:53 +01:00
Sleeper85 dcbf3e6b8a YamBMS 1.6.0 - 2025.11.23 2025-11-24 14:34:30 +01:00
Sleeper85 c451514d4d Split YamBMS YAML and change version to 1.5.9 2025-08-13 18:11:04 +02:00
Sleeper85 bc12a8e1a0 Updated YAML version 2025-08-12 21:31:00 +02:00
Sleeper85 b3f203bd58 Added Factory Reset button 2025-08-12 21:29:07 +02:00
Sleeper85 5ddf954d0f Updated YamBMS multi-node modbus YAMLs 2025-08-02 11:02:28 +02:00
Sleeper85 4c89aeef61 Dashboards 1.5.8 compatible with CANBUS / RS485 inverter communication protocol 2025-07-30 11:32:09 +02:00
Sebastian 77f657415a Add options to restrict max. charge and discharge current
This adds 'yambms_max_inverter_charge_current' and 'yambms_max_inverter_discharge_current' substitutions. They are used to restrict the range of the charge/discharge current for easier control when the battery currents are much higher than the inverter currents.
2025-07-12 21:00:14 +02:00
Sleeper85 53d8a189b2 Replaced % with percent in entity names. 2025-07-11 14:31:24 +02:00
Sleeper85 c00aa954f5 esphome min_version changed to 2025.6.0 2025-06-22 14:04:16 +02:00
Sleeper85 a0cfea8b5d YamBMS 1.5.7 2025-06-19 22:12:34 +02:00
Sleeper85 6c4e710f45 Base 1.5.6 2025-06-12 20:46:27 +02:00
k2dp2k 64e4c7f0e0 Update device_base.yaml 2025-06-10 20:22:34 +02:00
k2dp2k 71a7643ca2 chore: update headers for recent changes 2025-06-10 20:16:56 +02:00
k2dp2k 679baa2068 chore: remove trailing whitespace for yamllint 2025-06-08 22:04:16 +02:00
Sleeper85 6b7c178093 Fix double name issue after HA PR #143049
https://github.com/home-assistant/core/pull/143049
2025-05-11 16:07:40 +02:00
Sleeper85 de8927ce36 YamBMS 1.5.5 2025-04-04 01:13:49 +02:00
Sleeper85 ae276bb0eb Set min_version to 2025.3.0 2025-03-21 19:44:25 +01:00
Shivam Maurya 17d5edb2f0 Update device_base.yaml 2025-03-21 17:24:41 +05:30
Shivam Maurya 3127c7b3d7 Update device_base.yaml
removed external component PR#7547 after merge
2025-02-25 13:30:08 +05:30
Sleeper85 8777dc8688 device_class warnings fixed 2025-01-30 23:33:00 +01:00
Sleeper85 7af47f5b2e YamBMS 1.5.4 2025-01-26 19:22:56 +01:00
Sleeper85 e9e3600686 YamBMS 1.5.3 2025-01-20 08:47:24 +01:00
Sleeper85 29e25e36b6 YamBMS 1.5.3 2025-01-18 06:35:01 +01:00
Sleeper85 70a00ff733 YamBMS 1.5.2 2024-12-23 22:42:35 +01:00