Commit Graph
766 Commits
Author SHA1 Message Date
Sleeper85 6973cee171 PVbrain2 board split into two DevKitC-1 pin variants
The DevKitC-1 swapped the RGB LED between V1.0 (GPIO 48) and V1.1 (GPIO 38),
and the freed pin is the one PVbrain2 uses for CAN TX. Both pins are therefore
board-revision dependent and cannot stay hardcoded in a single board file.

board_ESP32-S3_DevKitC-1_PVbrain2.yaml becomes the common base :
- tx_pin_4 / rx_pin_4 and the LED strip pin are removed from it
- esp_light now reads ${rgb_led_pin}
- GPLv3 header added, which was missing

Two thin wrappers provide the revision-specific pins and include the base :
- board_ESP32-S3_DevKitC-1_PVbrain2_LED-48.yaml : V1.0, LED 48 / CAN TX 38
- board_ESP32-S3_DevKitC-1_PVbrain2_LED-38.yaml : V1.1, LED 38 / CAN TX 48

YamBMS_LP_PVbrain2.yaml and YamBMS_RP_PVbrain2.yaml include the LED-48 variant,
the LED-38 line being commented right next to it.

Same split applied to the RS485 Pylontech package : the content moves to
yambms_rs485_pylon_core.yaml and yambms_rs485_pylon.yaml keeps only the uart
baud_rate extend, so PVbrain2 — whose board already declares the UART — can
include the core directly.

PCB LED 1 / PCB LED 2 / ESP32 LED are no longer prefixed by ${name}, and the
`name` substitution is added to the PVbrain2 root YAMLs.
2026-11-08 23:08:33 +01:00
Sleeper85 0783bc8ab0 Added battery_capacity number 2026-11-08 23:08:33 +01:00
Sleeper85 cb3b0eedba Installed Battery Capacity now follows a capacity change at runtime
The installed total was accumulated once per BMS per boot, latched by
bms<id>_combined_once, so a BMS reconfigured with a different capacity
kept contributing its boot value until the next reboot.

Each BMS now remembers the last capacity it contributed in
bms<id>_installed_capacity and applies only the difference to the total.

- the update runs in the can_be_combined branch, so an offline BMS simply
  stops updating its contribution, which stays in the total : the installed
  capacity still never shrinks on an uncombine, as before
- a BMS coming back with a different capacity is applied as a delta, with
  no double counting
- combined_once had no other reader and is removed

The total is deliberately not turned into a per-round accumulator reset in
the Global vars reset block like the other totals : its sensor is polled
independently of STEP 2 and its state is written straight into CAN frame
0x379 with no has_state() guard, so a transient zero would announce 0 Ah of
installed capacity to the inverter. See Design_decisions.md.
2026-11-08 23:08:33 +01:00
Sleeper85 bf044c159d Migrating canbus ESP_LOGI to ESP_LOGD 2026-11-08 23:08:33 +01:00
Sleeper85 1af8514863 LED capabilities detected at runtime, rgb_order migrated to channel_colors
board_options_led_control.yaml called set_brightness() unconditionally, so
every board whose status LED is a `binary` light logged
"'esp_light': brightness not supported" on each state change. Only the RGB
setter was guarded, by the per-board `board_has_rgb` substitution.

Both setters are now guarded by what the light itself reports:

    led->get_traits().supports_color_capability(...)

- `board_has_rgb` removed from 21 board files: its only two readers were the
  two lines in board_options_led_control.yaml
- the runtime test reproduces the flag exactly on every board - the 15 boards
  declaring "true" all drive an addressable strip (esp32_rmt_led_strip, or
  spi_led_strip on T-Connect), the 6 declaring "false" all drive a binary
  light - so RGB rendering is unchanged and only the warning disappears
- a monochromatic LED now gets brightness without RGB, which a single boolean
  could not express

Also migrated 16 `rgb_order: GRB` to `channel_colors: GRB`, deprecated in
ESPHome and removed in 2027.3.0. Same value, no behaviour change.
2026-11-08 23:08:33 +01:00
Sleeper85 e78df61e6f CRLF to LF conversion 2026-11-08 23:08:33 +01:00
Sleeper85 415f12d04f Enforce LF line endings for YAML files
A CRLF file rewritten by a Windows contributor shows up as a whole-file
diff, which hides the real change and conflicts on every rebase.
.gitattributes was itself listed in .gitignore, so it could never be
committed and protected nothing.
2026-11-08 23:08:33 +01:00
Sleeper85 39febc31d4 Support of the new errors_bitmask_hex from JK-BLE 2026-11-08 23:08:33 +01:00
Sleeper85 0f7bf94111 Added KS BMS support #151 2026-11-08 23:08:33 +01:00
Sleeper85 b7bb2e93ea Moved Auto CCL Current Taper section 2026-11-08 23:08:33 +01:00
Sleeper85 e4b8aacc0a Fixed 6h reboot on networks that filter the ESP32 outbound traffic
http_request runs on the loop task, which has a 4s budget before the
5s task WDT panics. A dropped connect() blocks for 4.5s (the ESPHome
default timeout) and a filtered port 53 blocks for a fixed 7s, which
timeout does not cover.

- timeout 3s and watchdog_timeout 60s cover the two blocking paths
- a failure counter stops the service after 3 network-level failures,
  instead of freezing the loop 14s every 6h forever
- the POST is now skipped when the GET failed

Reproduced and measured on OPNsense.
See Design_decisions.md.
2026-11-08 23:08:33 +01:00
Sleeper85 9f90436849 Multi-inverter support, division of CCL/DCL by the number of inverters/chargers 2026-11-08 23:08:33 +01:00
Sleeper85 96ddd2a075 Fixed Combiner stall detector false positive and dashboards
The detector compared var_to_combine_bms/shunt_number with its value on
the previous round, but samples it before the STEP 2 reset - so in a
healthy setup the sampled value is identical every round and was read as
a stall ("Shunt id 2 of 1 declared").

Replaced by an exact completeness test: a chain is complete once its
number is past the number of declared devices. Threshold raised to 5
rounds to absorb interval phase offsets at boot.
2026-11-08 23:08:33 +01:00
Sleeper85 23384f4677 Rollback : don't reset Auto functions vars in core 2026-11-08 23:08:33 +01:00
Sleeper85 803c84d7da Sensors published to NAN when no BMS is combined 2026-11-08 23:08:33 +01:00
Sleeper85 807c9ed841 refactor: convert pylontech_rs485 to list format 2026-11-08 23:08:33 +01:00
Sleeper85 4d4d11e832 Auto CVL - Float / Stop (suspended) 2026-11-08 23:08:32 +01:00
Andrew Rankin 40daa229b5 Update EG4 LL-V2 component to v1.1.0 (fixes zero-value BMS readings) (#315)
* Update EG4 LL-V2 component to v1.1.0

Fixes RAR/esphome-eg4-bms#7: some EG4 LL-V2 units intermittently answer
with a CRC-valid function-03 response whose register data area is
entirely zero. The component published those zeroes as a real reading,
collapsing SoC, pack voltage and capacity for one poll cycle.

v1.1.0 rejects implausible blocks and no longer lets them refresh the
online tracker, so a unit stuck returning zeroes now goes offline
instead of reporting a flat-zero battery.

No YamBMS-side changes are required: neither EG4 package uses the
removed designed_capacity sensor, and both already use the
cell_average_voltage key.
2026-11-08 23:08:32 +01:00
Sleeper85 fa9f101d1b Move vars bms_model & bms_protocol 2026-11-08 23:08:32 +01:00
Sleeper85 3394976529 New vars Communication Bus & Protocol 2026-11-08 23:08:32 +01:00
Sleeper85 da0e5c8c23 Updated secrets.yaml examples 2026-11-08 23:08:32 +01:00
Sleeper85 bfa36fb15f Added dev README 2026-11-08 23:08:32 +01:00
Sleeper85 6e23ffe202 Added Combiner stall detector 2026-11-08 23:08:32 +01:00
Sleeper85 2cdc61e8b4 Fixed Auto CVL Float lockup at Rebulk threshold
Rewrote Auto CVL from template sensor lambdas to interval
lambdas, splitting each into a value sensor and a delta sensor.

Fixed a bug confirmed in production: Auto CVL's Float floor coincided
exactly with the Rebulk V. threshold, letting it trigger its own rebulk.
The floor is now capped relative to the live target instead of a fixed
chemistry constant, the Float/Stop integral term can no longer get stuck
once clamped, and PI state now resets when crossing the Bulk <-> Float/Stop
boundary.
2026-11-08 23:08:32 +01:00
Sleeper85 5226455f76 Auto Float adapted and reorganized to an interval lambda
Rewrote Auto Float from template sensor lambdas to interval
lambdas, splitting each into a value sensor and a delta sensor.
2026-11-08 23:08:32 +01:00
Sleeper85 717503e73a Added HA entities cleanup readme 2026-11-08 23:08:32 +01:00
Sleeper85 4c2776508c Dashboards 1.8.0 - Fixed Current Taper switch 2026-11-08 23:08:32 +01:00
Sleeper85 485fd8f7a4 YamBMS 1.8.0 changelog 2026-11-08 23:08:32 +01:00
Sleeper85 4bf2362723 Delete YamBMS_multi-node_RS485_modbus_solution.md 2026-11-08 23:08:32 +01:00
Sleeper85 20dd8bcd23 Updated README 2026-11-08 23:08:32 +01:00
Sleeper85 ace139dec0 Moved README 2026-11-08 23:08:32 +01:00
Sleeper85 fd4ee6e903 Current Taper - Compliance with YamBMS core 1.8.0
See Changelog_Auto_CCL_Current_Taper_1.1.2.md
2026-11-08 23:08:32 +01:00
Sleeper85 ab3633b0d9 Auto CVL - Compliance with YamBMS core 1.8.0
Updated to support `Float` and `Stop` CVL.
See Changelog_YamBMS_1.8.0_Auto_CVL.md
2026-11-08 23:08:32 +01:00
Sleeper85 b050aa95a3 Auto Float - Compliance with YamBMS core 1.8.0
Returns `0` if `charging_instruction` is different from `Float`.
2026-11-08 23:08:32 +01:00
Sleeper85 31314847d9 YamBMS core 1.8.0 - CVL, CCL and DCL code improvements 2026-11-08 23:08:32 +01:00
Sleeper85 bd01a127ab YamBMS 1.8.0 examples 2026-11-08 23:08:32 +01:00
Sleeper85 5b424a529b Auto max_index 2026-11-08 23:08:32 +01:00
haysdb a927f7c9b3 Auto CCL Current Taper (#303)
This YAML file implements the Auto CCL Current Taper feature for the YamBMS project, defining various parameters and logic for charge current tapering during battery charging.
2026-11-08 23:08:32 +01:00
Sleeper85 ecfa08c4ae Update yambms_config.yaml 2026-11-08 23:08:32 +01:00
Sleeper85 0003d97614 Update yambms_custom.yaml 2026-11-08 23:08:32 +01:00
Sleeper85 e758b96c95 Allow a negative charger_offset_v 2026-11-08 23:08:32 +01:00
Sleeper85 80ccf671f3 Create Understanding_ESPHome_Modbus.md 2026-11-08 23:08:32 +01:00
Sleeper85 9b2787ecca Improved PACE BMS modbus (esphome >= 2026.7.0) 2026-11-08 23:08:32 +01:00
Sleeper85 f078e3635c Fixed charger_offset_v 2026-11-08 23:08:32 +01:00
Sleeper85 00ced86660 Added PVbrain2 packages section 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 2474c1d89f Fixed warning: format '%d' expects argument of type 'int', but argument 5 has type 'uint32_t' 2026-11-08 23:08:32 +01:00
Sleeper85 bcda702fea Fixed warning: suggest braces around empty body 2026-11-08 23:08:32 +01:00
Sleeper85 c82af08d3c Updated multi-node modbus default settings + documentation #310 2026-11-08 23:08:32 +01:00
Sleeper85 c9162e659e Updated default PSRAM options (ESP-IDF 5.5+) + documentation 2026-11-08 23:08:32 +01:00