135 Commits
Author SHA1 Message Date
Sleeper85 62be2cf496 README - Add a Support section 2026-11-19 04:18:57 +01:00
Sleeper85 7d347ae626 Examples - Add bms_fake_equalizing_enabled
Every example including a BMS that ships Fake Equalizing (EG4 LL V2,
Seplos V1/V2, Seplos V3, Demo BMS) now declares
bms_fake_equalizing_enabled on each BMS, with a comment explaining what
enabling it does and warning that a BMS without a balancer can stay in
Cut-Off for a long time before reaching EOC.

The EG4 and Seplos examples set it to 'false', the package default. The
DEMO examples set it to 'true'.
2026-11-19 04:18:57 +01:00
Sleeper85 c428e3470f Examples - EG4 LL V2 RP example: BMS 3 used bms_id 2
The third BMS block of RP_BMS_example_EG4_LLV2_RS485_Modbus.yaml declared
bms_id: '2', a duplicate of BMS 2. It now uses bms_id: '3'.
2026-11-19 02:31:42 +01:00
Sleeper85 25727029f6 Fake Equalizing - Disabled by default
The inferred balancing flag stops the Cut-Off timer while the cell spread
stays above bms_balance_trigger_voltage. A pack that does not actually
balance (no balancer, balancing disabled, or a balancer too weak for the
pack) never closes its spread, so the charge stayed in Cut-Off until the
EOC timer ended it, or indefinitely with the EOC timer switch off.

bms_fake_equalizing_enabled now defaults to 'false' for every BMS that
includes the package (EG4 LL V2, Seplos V1/V2, Seplos V3, JK RS485
DISPLAY, Fake/Demo BMS): the flag reports the constant false these
packages used to hardcode. Set it to 'true' per BMS to enable it.

Charging_logic.md and Changelog_Fake_Equalizing.md describe the new
default and the warning.
2026-11-19 02:31:42 +01:00
Sleeper85 dc038954e6 Shunt - Refresh the Junctek and Victron UART components every 60min
The Junctek KHF component was refreshed on every build (0s) and the
Victron UART component every 60s. Both are now refreshed every 60min.

The GitHub header of the two Victron UART packages pointed to
KinDR007/VictronMPPT-ESPHOME, while the component comes from
GHswitt/VictronMPPT-ESPHOME. It now names GHswitt.
2026-11-19 01:26:15 +01:00
Sleeper85 867db48329 Victron SmartShunt BLE - Switch to darek-margas/esphome-victron_ble
Fabian-Schmidt/esphome-victron_ble no longer compiles with current
ESPHome. The external component now comes from the
darek-margas/esphome-victron_ble fork, and the GitHub header of the
three Victron BLE packages points to it.

The component is now refreshed every 60min instead of on every build.
2026-11-19 01:26:15 +01:00
Sleeper85 bd7c20cd7e Auto Float - Keep the Bulk CVL when Float starts (#353)
Outside Float, the Auto Float interval cleared var_auto_float to 0. When
Float started, the CVL dropped to the final Float voltage for up to 60s,
then rose back to Bulk on the next interval tick before the step-down.

The delta is now kept armed at Bulk - Float outside Float. The core only
adds it while the instruction is Float, so Bulk and Stop are unchanged,
and the first Float CVL is the Bulk voltage.

Issue #353
2026-11-17 20:28:11 +01:00
Sleeper85 6a448e1696 YamBMS - Stop the Cut-Off and EOC timers from a single script
The same two lines stopping the Cut-Off and EOC timers were repeated in
five places: entering Bulk, both Wait branches, the suspended charging
logic and the EOC script. They are replaced by a call to the new
yambms_script_stop_timers script.

The script has no delay, so execute() runs both stops before returning
to the caller: the timers are stopped before the next line runs, as
before. No behaviour change.
2026-11-17 20:17:06 +01:00
Andrew Rankin a7e190b8e1 EG4 LL-V2: no General alarm for a full pack, component v1.1.4 (#349)
Fixes #342

* EG4 LL-V2: no General alarm for a full pack, component v1.1.2

EG4 packs hold protection bit 12 ("Low Capacity") while they are full and
have stopped charging, and it clears once they discharge. It was mapped to
General alarm, so every full charge raised a YamBMS alarm and sent it to
the inverter over CAN (#342). It is no longer mapped.

Discharge over temperature (0x0200) and discharge under temperature
(0x0800) protection were not mapped; they now raise the high and low
temperature alarms, as charge OT/UT already raise the charge ones.

Component v1.1.2 tracks each register block on its own
(RAR/esphome-eg4-bms#9): a pack goes offline when either block stops
giving valid replies, and that block's sensors publish NaN, so the
bitmask lambda now reads a NaN bitmask as no bits.

* EG4 LL-V2: component v1.1.3 (bus turnaround gap)

v1.1.2 took packs offline on a shared bus: a request sent right after
another pack's reply was often not answered. v1.1.3 waits a turnaround
time (50 ms) after each reply (RAR/esphome-eg4-bms#9).

* EG4 LL-V2: update date and version of the changed YAMLs
* EG4 LL-V2: component v1.1.4 (only the awaited reply ends the wait)
2026-11-16 20:50:55 +01:00
Sleeper85 28393af4cf Add yambms_errors_bitmask_number to DEMO dashboard 2026-11-14 20:45:04 +01:00
Sleeper85 dfbe4805ad Auto SoC Limit - Follow the Max Charge Current while the CCL limit is held
In the CCL and Float + CCL modes, the offset -(Max Charge Current - Auto
SoC Limit CCL) was computed once, when the target SoC was reached, and
then kept until the SoC dropped below the hysteresis. If the Max Charge
Current increased in the meantime (a pack rejoining the bank, a BMS
raising its limit), the cached offset applied to the larger maximum
released the limit: e.g. 141A requested instead of 1A.

While the target is reached in a CCL mode, the offset is now recomputed
on every pass, before the 60s throttle. A NaN Max Charge Current leaves
the previous offset in place.

Reported in #352
2026-11-14 20:24:19 +01:00
Sleeper85 eee476340d YamBMS - Stop the Cut-Off and EOC timers in Wait and while no BMS is combined
The cut-off timer (180s) and the EOC timer (30min) were only stopped when
the Bulk phase was re-entered. While the charging logic was suspended (no
BMS combined) or in Wait (charging not allowed), they kept running, so a
dropout or a charge block during the Cut-Off phase could declare an EOC
with no BMS data to confirm it: the status went to Float or EOC, SoC 100%
could be sent and the rebulk days counter was reset.

Both timers are now stopped while the logic is suspended and whenever the
status is set to Wait. With bms_options_charging_logic.yaml, Wait is only
entered when the Charging switch is off, so the Cut-Off performed by
YamBMS itself is not affected. When charging is allowed again after a
Wait in Cut-Off, a new Bulk starts and the Cut-Off phase is run again.

Charging_logic.md is updated accordingly.

Reported in #352
2026-11-14 20:24:19 +01:00
Sleeper85 21c0251309 YamBMS - Apply the Auto Float adjustment to the Float voltage only
The 1.8.0 CVL rework added the Auto Float delta to the requested charge
voltage for every charging instruction. Auto Float clears that delta on
its own 60s interval once the instruction is no longer Float, so after a
Float => Bulk transition (Force Bulk, rebulk rules, Force Charge) the CVL
was the Bulk voltage plus the delta for up to 60s. The delta can reach
Bulk - Float when Float has just been entered.

The delta is now added in the Float branch only, as in 1.7.0. Auto CVL
and the custom CVL still apply to every instruction.

Reported in #352
2026-11-14 20:24:12 +01:00
Sleeper85 e569bfbac9 CAN 0x35A - Send inactive alarms and warnings as OK (10), not 00
Each alarm and warning of 0x35A is a 2-bit field : 1 is active, 2 is
inactive (OK), 0 and 3 mean not supported. YamBMS only set the active
bit and left 00 otherwise, so an inverter read every field that was not
in alarm as "not supported" instead of OK.

Every field is now written explicitly, active or inactive, and a frame
with no alarm is AA AA AA 02 AA AA AA 02, which is what a BYD battery
sends at rest. The reserved fields of bytes 3 and 7 stay at 0. The
mapping of the YamBMS bits is unchanged.

The frame is sent by PYLON V2, SMA and Victron. SMA calls the two bits
"arrive" and "leave", with the same meaning. The alarms are only
displayed and logged by the inverter, they do not change how it charges.

Design_decisions.md records why OK must never be sent as 0.
2026-11-14 19:50:47 +01:00
Sleeper85 6085e6ff24 PYLON CAN 0x359 - Send Charge Over Current on bit 0, stop sending UnBalanced Cell (#345)
Charge Over Current was set with 0x80 in bytes 1 and 3, a copy of the
Discharge Over Current value of byte 0. PYLON V1 and V2, LuxPower and the
other 0x359 specifications put it on bit 0 of both bytes, which is also
where 0x35A already sends it. Bit 7 is undefined, so the inverter never
saw the alarm.

UnBalanced Cell was sent on bit 4 of bytes 1 and 3. PYLON V2 defines byte
1 bit 4 as an external communication timeout that stops charge and
discharge, so a cell imbalance alarm could stop the inverter. Byte 3 bit
4 is reserved. Neither is sent any more; cell imbalance is still sent on
0x35A.

The frame layout is the same in PYLON V1 and V2, so the fix applies to
both, and to LuxPower which shares frame 5.
2026-11-14 19:50:47 +01:00
Sleeper85 0ef4ab355b Send the protection alarms when all combined BMS are in alarm (#344)
The alarm bitmask was published only when the number of BMS in alarm
equalled var_bms_counter, the number of configured BMS. But only
combined BMS are counted in alarm, so with one BMS offline or missing a
value the alarm could never be raised : the inverter received only the
warning bits, and the "Alarm" text sensor showed "Warning".

STEP 2 now compares with var_to_combine_bms_counter. An uncombined BMS
is offline or has missing data, it does not count as "not in alarm".
This matches the rest of the combiner, where charge and discharge are
already decided by the combined BMS only.

The "Alarm" text sensor no longer compares counters : it is derived from
the published alarm and warning bitmasks, so it shows what is sent to
the inverter.

The comment on the alarm sensor said "bitwise AND", it is an OR.
2026-11-14 19:08:36 +01:00
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 0db1572953 Docs: Add JK RS485 1.2 to the 1.8.2 changelog 2026-11-13 08:12:00 +01:00
Sleeper85 bb071e6565 JK RS485 - Load the components 1.2 from @dev and remove protocol_version
The sniffer packages load the JK RS485 components from the dev branch of
Sleeper85/esphome-components (JK RS485 1.2) until it is tested and merged
into main ; they will then go back to @main.

JK RS485 1.2 removes the protocol_version key of jk_rs485_sniffer (the
JK-PB RS485 protocol has only one version) and refuses it, while 1.1
requires it : both changes have to be made together. The sniffer packages
no longer pass it, and the sniffer_protocol var is removed from the JK-B
and JK-PB RS485 YAML and examples. A user YAML that still defines
sniffer_protocol keeps working, the var is simply unused.
2026-11-13 08:02:20 +01:00
Sleeper85 6940efb357 JK RS485 - Remove the precharging, operation status and battery type entities
The JK RS485 component never published a value for them : the
"precharging" switch had no register and wrote nothing, and the
"operation status" and "battery type" text sensors were never decoded.
They stayed unknown in Home Assistant and are removed from the component
in JK RS485 1.2.

The "status precharging" binary sensor, which works, is kept.
2026-11-12 17:52:48 +01:00
Sleeper85 8ade0b4ce6 JK RS485 - The sniffer dev package declares its UART
Same declaration as the other sniffer packages: the UART comes from
board_options_itf_${sniffer_uart_id}.yaml, with sniffer_uart_baud_rate
(default 115200).
2026-11-12 17:52:43 +01:00
Sleeper85 a9fb4df7bc HA dashboards 1.8.2 - Restore the Cut-Off Cell Voltage select
The select.yambms_1_cut_off_cell_voltage entity was dropped from the
"YamBMS - Charging Settings" card by mistake in 9febfa4. Put it back
after Charger Offset V in every dashboard.
2026-11-12 13:59:50 +01:00
Sleeper85 249541420e Restore Float or EOC when charging is allowed again after Wait (#343)
When charging was not allowed, the status went to Wait, also from Float or
EOC. When charging was allowed again, the Init / Wait -> Bulk rule came
first in the rebulk chain, so a full battery got the Bulk voltage again
after any short block, without any rebulk rule being checked.

The status is now kept in var_charge_status_before_wait on entering Wait.
When charging is allowed again, Float or EOC is restored before the Force
Bulk and rebulk rules, which then decide whether a new Bulk is needed.
Any other status goes to Bulk as before.

A dedicated variable is used rather than var_eoc: Auto SoC Limit sets
Float without a full charge and leaves var_eoc false on purpose, and that
Float must be restored too.

Charging_logic documents when the status goes to Wait and what happens
when charging is allowed again.

Fixes #343
2026-11-11 00:41:13 +01:00
Sleeper85 fcbe5023af Suspend the charging logic while no BMS is combined
The STEP 3 guard tested its values with has_state(), which ESPHome sets on
every publication, NaN included. STEP 2 publishes NaN when no BMS is
combined, so STEP 3 ran on every tick of a boot or a BMS dropout. The
charging logic then saw "Charging allowed" false and set the status to
Wait, and the Init/Wait -> Bulk rebulk rule restarted a Bulk on a full
battery as soon as the BMS came back.

- The guard follows the can_be_combined rules: isnan() or a comparison
  for sensors, has_state() for binary sensors. It reads the live
  var_to_combine_bms_counter rather than bms_combined, which STEP 2 only
  publishes once per round.
- The inner "At least one BMS combined" check is removed: the guard is
  now the single test. CVL, DVL, CCL, DCL and Requested Force Charge
  move up one level.
- A new else branch suspends the logic: var_charge_status keeps its
  value, the instructions and requested values are cleared for Home
  Assistant, and var_initialized is set to false.
- The end of STEP 3 no longer tests bms_combined and total_voltage,
  already guaranteed by the guard.

This fixes the dropout case of #343. A BMS that blocks charging while
combined still goes through Wait.

Charging_logic documents the BMS dropout behaviour, Design_decisions the
guard and its else branch.

Refs #343
2026-11-11 00:20:09 +01:00
Sleeper85 2fcfc4f44f Silence the Voltronic LIB link until YamBMS is initialized
The CAN and PYLON links only send data while var_initialized is true and
at least one BMS is combined. The LIB link only checked its protocol, so
it kept answering the inverter during a boot or a BMS dropout, and its
read_lambdas converted the NaN values to integers, which is undefined.

The 100 ms interval now moves the Modbus server to address 248, the
mechanism already used for Disabled, until YamBMS is initialized. The
status mirroring still follows the protocol only: an active link left
silent serves no request, its Status goes false and raises the fault,
like the other links during a dropout.

Design_decisions documents the second condition.
2026-11-11 00:00:27 +01:00
Sleeper85 77237e7c6c Reject NaN values in the BMS and shunt can_be_combined conditions
The BMS condition tested most sensors with has_state(), which ESPHome sets
on every publication, NaN included. A BMS that had published NaN once on a
mandatory sensor (for example the PACE power template, which returns NaN
when the current is unknown) stayed combinable, and the NaN corrupted the
totals that drive the inverter.

- Sensors are tested with !std::isnan(): a sensor's state starts at NaN,
  so it also covers a sensor that never published.
- cell_ovp and cell_uvp use > 0, like total_voltage and battery_capacity.
  JK, KS and PACE packages declare them as a number, whose state starts
  at 0, so isnan() alone would combine the BMS before its protection
  settings are read.
- Binary sensors keep has_state(), a bool cannot be NaN.

The shunt condition only checked the switch and online_status. It now
also checks the four values the combiner reads: voltage > 0, and current,
power and soc with isnan(). A combined shunt replaces the BMS values, so a
NaN there reached the inverter directly.

Both conditions move from the binary sensor lambda to STEP 1, on the
device's turn, and are published to "Can be combined". A template binary
sensor with a lambda runs it on every loop, about 60 times per second per
device, for a value read once per round.

Design_decisions documents which test applies to which entity type, that
every entity in the conditions is mandatory, and why they are evaluated in
STEP 1.
2026-11-10 22:54:46 +01:00
Sleeper85 c9502bd196 Fix Requested Force Charge turning on while no BMS is combined (#346)
The binary sensor lambda was evaluated on every loop, including while no
BMS was combined (boot, BMS dropout). The SoC was NaN then, and
`int soc = NaN` is undefined: the request could turn on, and with a real
SoC between Start and Stop it stayed on until Stop SoC once the packs came
back.

The rule now runs in STEP 3, inside the "At least one BMS combined" block,
and publishes the sensor. While no BMS is combined it is not evaluated, so
the request keeps its last state. The SoC is read as a float: a NaN fails
both comparisons and keeps the current state too. The "Request force
charge" switch clears the request at once with an on_turn_off, even while
no BMS is combined.

Reported in #346, first fix proposed in #347.
2026-11-10 22:02:11 +01:00
Sleeper85 239f9137c3 Docs: Add inferred balancing to the 1.8.1 upgrade guide
EG4 LL V2, Seplos V1/V2, Seplos V3 and JK RS485 DISPLAY now infer their
balancing state. It changes when the charge ends without any validation
error, so it belongs in the biggest changes of the upgrade guide.
2026-11-10 13:20:24 +01:00
Andrew Rankin 8b24872878 Update EG4 LL-V2 component to v1.1.1 (builds on ESPHome 2026.11) (#341)
Update EG4 LL-V2 component to v1.1.1 (builds on ESPHome 2026.11)

ESPHome 2026.11 removed format_hex_pretty(), which v1.1.0 used in its frame
logs, so every EG4 LL-V2 config failed to compile on dev:
'format_hex_pretty' was not declared in this scope. v1.1.1 uses its own
formatter (same output) and changes nothing else.

Checked with the EG4 LL-V2 example (3 BMS, ESP32) on ESPHome 2026.11.0b3.
2026-11-09 23:19:31 +01:00
Sleeper85 a36677320c Docs: Add the 1.8.2 changelog 2026-11-09 00:18:43 +01:00
Sleeper85 b7ad915ea8 Remove the WS Touch-LCD enable_pin overrides
ESPHome 2026.11 includes esphome#21605: a default enable pin that is used
elsewhere in the config is dropped automatically. The model's ch422g pin 2
no longer conflicts with backlight_output, so the overrides added for
2026.10 are no longer needed. The resolved enable_pin is unchanged: ch422g
pin 6 on the 7", none on the 4.3 and 4.3B.
2026-11-09 00:14:59 +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 d2001d8394 Docs: Add the hub daily energy fix (#336) to the 1.8.1 changelog 2026-11-08 23:11:30 +01:00
MrPabloUK 2e21aa73c0 Fix hub daily energy by publishing 0 W on the unused charge/discharge sign (#336)
- Hub `battery_charging_power` / `battery_discharging_power` left the unused sign as NAN, while the shunt already publishes 0 W.
- ESPHome `total_daily_energy` (`method: right`) skips NAN without advancing `last_update_`, so the next finite watt is multiplied by the whole gap (for example a charge spike after a long discharge).
- Publish 0 W on the unused sign (and when power is NAN / no BMS is combined) so both daily meters keep integrating.
2026-11-08 23:11:30 +01:00
Sleeper85 b3af7e89a9 YamBMS 1.8.1 DEMO firmware 2026-11-08 23:08:34 +01:00
Sleeper85 1cf367f333 Docs: Add the 1.8.1 upgrade guide and complete the changelog
New Changelog_upgrade_to_YamBMS_1.8.1.md: a short step-by-step guide to
move a 1.7.0 or 1.8.0 YAML to 1.8.1, starting from the example YAML. It
covers the biggest changes (inverter brand, UART and CAN declared by the
packages, RS485 entry point, C-Rate defaults, CCL/DCL divided by the
number of declared links), CAN and RS485 examples with the valid UART
ids, the inverter brand selection, the 1.8.1 dashboard, the common
validation errors and the PVbrain2 board files.

Changelog.md: link the new documentation pages and the 1.8.1 dashboards,
and list the remaining 1.8.1 changes (services and telemetry, Auto CCL,
0 A limits, fixes and merged PRs).
2026-11-08 23:08:34 +01:00
Sleeper85 faad9e60ce YamBMS 1.8.1 LP/RP examples
Update the root YAML and the examples for the UART and CAN declarations, the
RS485 block and the Board Options section.
2026-11-08 23:08:34 +01:00
Sleeper85 cab5a63e0e Docs: Rewrite the inverter brand and protocol section
Lead with the three setup steps: select the inverter brand, leave
Protocol on Automatic, then configure the inverter from the dashboard.
Forcing a protocol moves to its own subsection, as the exception it is.

The screenshot now shows the brand and protocol selects and the active
protocol card, and replaces YamBMS_CANBUS_Protocol.png.
2026-11-08 23:08:34 +01:00
Sleeper85 cb9638653d Docs: The CCL/DCL divider counts declared links
Document that every declared CAN or RS485 inverter link divides the requested
CCL/DCL, including a link whose protocol is `Disabled` or left on `Automatic`
with no brand, and that only links actually wired to an inverter should be
declared.

Design_decisions.md records why the divider must not be restricted to active
links: a disabled link usually still has an inverter drawing from the bank, an
unconfigured link is the state every link starts in after 1.8.0, and a lost
link must never raise the current sent to the remaining inverters.

YamBMS_functions.md: fix the RS485 package name (`yambms_rs485.yaml`).
2026-11-08 23:08:34 +01:00
Sleeper85 00e04df04b Docs: Add the Telemetry page and change the services URL
Replace the README Data collection section with Telemetry.md and point
the update and telemetry requests to script.yambms.org.
2026-11-08 23:08:34 +01:00
Sebastian a4844fc947 YamBMS: Auto EOC 24h charging window (#338)
Auto EOC assumed daylight charging: the target was always today and the
target hour was limited to 12-23, so a night window could not be planned.

- New Auto EOC Start Hour/Minute define the charging window from the
  start time to the next target time. It may cross midnight
  (e.g. 22:00 -> 06:00 for grid charging); start = target is 24h.
- Target hour can be set from 0 to 23.
- Outside the window the status is "Wait: Starts at hh:mm" instead of
  "Stop: Target time passed". The 1h grace period is unchanged and has
  priority over a window starting within it.
- Times are local and DST safe.
- Default start 00:00 keeps the previous daylight behaviour.
- Dashboards, docs and changelog updated.
2026-11-08 23:08:34 +01:00
Sebastian 61424486c0 Round daily energy sensors to 10 Wh (#339)
Daily Charging/Discharging Energy (YamBMS and per BMS) were published
with 1 Wh resolution. Home Assistant records every float change, so a
new state was written every few seconds while charging or discharging.

- Add a round: 2 filter and set accuracy_decimals to 2 (0.01 kWh).
- bms_base_daily_energy 1.1.4, changelog updated.
2026-11-08 23:08:34 +01:00
Sleeper85 7b750a4b35 Docs: Fix 1.8.1 changelog errors and discharge C-Rate comment 2026-11-08 23:08:34 +01:00
Sleeper85 a17fa3aea8 HA dashboards 1.8.1
Update the dashboard headers and show one more character of the ESPHome version.
2026-11-08 23:08:34 +01:00
Sleeper85 9203dd09f9 Docs: Add why_yambms and update the Cut-Off diagram
Explain why YamBMS is useful when the BMS already talks to the inverter, and
refresh the Cut-Off charging logic diagram.
2026-11-08 23:08:34 +01:00
Sleeper85 58c03ac83f Packages: Declare each CAN node in the package that consumes it
yambms_canbus.yaml and the Deye top packages now import their node from
canbus_platform (esp32_can, mcp2515 or external). canbus_bitrate replaces
esp32_canbus_bitrate and mcp2515_canbus_bitrate. Breaking change.
2026-11-08 23:08:34 +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 5c171aea14 Docs: Explain the 0 A limit in the combiner
Document why the combiner accepts 0 A as a valid charge and discharge limit.
2026-11-08 23:08:34 +01:00
Sleeper85 ee12380087 YamBMS: Inverter brand registry and RS485 entry point
Rename the inverter registry to yambms_brand_registry.yaml and add the new brands.
yambms_rs485.yaml becomes the file to include, with a rs485_protocol var that
selects PYLON or Voltronic LIB.
2026-11-08 23:08:34 +01:00
Sleeper85 9febfa4161 Dashboards 1.8.1 2026-11-08 23:08:34 +01:00
Sleeper85 51cf3972ed Added RS485 Voltronic LIB protocol
Added RS485 Voltronic LIB protocol

Experimental support for Voltronic Power's own Modbus RTU protocol
(YB_PROTO_RS485_VOLTRONIC_LIB), distinct from Pylontech and confirmed by
an independent Epever cross-reference (PRO=26, same document authors).
Implemented natively via ESPHome's modbus_server rather than an external
component, since it's plain Modbus RTU unlike Pylontech's own framing.

Voltronic (Axpert/InfiniSolar) and MPP Solar share this protocol and are
added to both inverter brand selects - confirmed identical by MPP Solar's
own manual. Required splitting the RS485 entry point the other way round
(yambms_rs485_pylon.yaml/yambms_rs485_voltronic.yaml now include the
shared yambms_rs485.yaml, not the reverse) so a node can run a different
protocol on each RS485 link.

Scope is deliberately reduced to what the inverter firmware actually
honors: per Voltronic's own documentation only the charge voltage limit
is applied, so Auto CCL Current Taper and Auto Float have no effect
through this link - accurate SOC/telemetry and charge/discharge
enable/disable are the real value here. Unverified on real hardware.
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
Sebastian c7e498d5ca Improve Deye support (#337)
* Fix Deye power update interval
* Keep batteries the report CCL/DCL 0A

A battery that reports a charge limit (CCL) or discharge limit (DCL) of 0 A now stays in the combine. Before, a full Deye at 0 A CCL, or an empty one at 0 A DCL, dropped out of capacity, SoC and the totals.

- Missing values are still caught: a CCL or DCL with no value yet still fails >= 0, because comparisons with NaN are always false.
- No effect on the limits: CCL and DCL are added up, so a battery at 0 A adds 0 A to the total.
- All BMS models are affected

https://github.com/Sleeper85/esphome-yambms/issues/335
2026-11-08 23:08:33 +01:00
Sleeper85 0d56db9849 Board: Waveshare Touch-LCD backlight pin conflict (ESPHome 2026.10)
ESPHome 2026.10 fails to validate the Waveshare ESP32-S3 Touch-LCD 4.3,
4.3B and 7 boards with "Pin 2 is used in multiple places". The mipi_rgb
models now set ch422g pin 2 (backlight) as a default enable_pin, and
the board already uses that pin for backlight_output, which drives the
backlight light used by the LVGL designs to turn the screen off and on.

- Override enable_pin to leave out pin 2, so the backlight stays under
  light control: pin 6 only on the 7 board, none on the 4.3 and 4.3B.
- This matches what esphome/esphome#21605 will do automatically. The
  override can be removed once min_version includes that change.
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 abcc715d33 BMS: PACE word_from_hex_str moved to modbus::helpers (ESPHome 2026.10) 2026-11-08 23:08:33 +01:00
Sleeper85 35332227a4 BMS: PACE Modbus compatibility with ESPHome 2026.10 #332 2026-11-08 23:08:33 +01:00
Lewa-Reka 35e839f1fd Add CrowPanel Advanced (ESP32-P4) board and Blue Navy 1024x600 HA display (#322)
* add crowpanel board
* add blue navy layout 1024x600
2026-11-08 23:08:33 +01:00
Sebastian 14dd332412 YamBMS: Auto CCL smooths max cell voltage, minimum 1 A (#329)
Near the top of charge the Auto CCL curve is steep (about 3.5 A per mV
at 3.46 V/cell). The max cell voltage arrives only every 10-15 s in
1 mV steps and moves a few mV with the charge current. Each new reading
moved the target by 10-20 A. Cuts are applied at once and increases
ramp up, so the requested CCL swung between about 8 A and 45 A every
20-40 s.

- Smooth the max cell voltage used for the curve with a time-based
  moving average (auto_ccl_max_cell_v_tau, default 30 s, '0' disables).
- Safety guard: a raw reading more than auto_ccl_max_cell_v_guard
  (default 5 mV) above the average is used instead (minus the guard),
  so real voltage rises still cut the current at once.
- Add auto_ccl_min_current (default 1 A): Auto CCL never requests less,
  also above the end of its curve or with an invalid float/OVP setting.
  Other limits can still request 0 A.
2026-11-08 23:08:33 +01:00
Sebastian 4a23cb6b47 BMS: Fix sensor device_class and state_class (#331)
Several sensors had a device_class that did not match their unit, so
Home Assistant shows warnings and handles them wrongly (unit
conversion, statistics).

- Power sensors in W used device_class 'current'; now 'power'
  (BASEN RS485, DEYE CAN module full/minimal, FAKE).
- Ah sensors had a device_class that does not accept Ah ('battery',
  'energy', 'energy_storage'). Removed it, since Home Assistant has no
  device_class for Ah (BASEN RS485, DEYE CAN module/top full/minimal,
  JK RS485 Display, Modbus client).
- DEYE battery capacity used state_class 'total_increasing', but the
  value is not a counter. Changed to 'measurement'.
2026-11-08 23:08:33 +01:00
Sleeper85 0fb9cc8116 Refresh 60min 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 9dd22fa56b Inferred equalizing for BMS that do not report a balancing flag
Some BMS balance their cells but never expose a balancing flag, so
`bms_equalizing` stays false and the core cannot tell a pack that is still
balancing from one that has finished. This is not cosmetic : while
equalizing is true, yambms_core.yaml stops the Cut-Off timer and lets the
charge run to the EOC timer instead of terminating early.

bms_options_fake_equalizing.yaml infers that flag from the pack itself. No
absolute cell voltage is hardcoded : the anchor is bulk_voltage / cell
count, the same derivation as cell_bulk_v in yambms_core.yaml, so it
follows `yambms_battery_chemistry`, the cell count and the configured bulk
voltage automatically.

  START when BOTH are true
    max cell >= cell_bulk_v                     the pack is at the setpoint
    AND (max - min) >= trigger voltage          its own balancing threshold

  STOP when EITHER is true
    max cell <  cell_bulk_v - hysteresis        the pack dropped off the setpoint
    OR (max - min) <  trigger - delta hyst.     the spread closed back below it

Only two deltas and one offset are configurable, and none of the three
depends on the chemistry - LFP, Li-ion and LTO all want the same few tens
of mV. The absolute anchor they hang off comes from the core, for free.

The delta condition is what keeps this honest : a pack that reaches the
setpoint perfectly balanced has nothing to equalize, so it reports false
and the Cut-Off timer does its job. A plain voltage comparison would report
balancing forever and terminate every charge on the EOC timer.

It extends bms<id>_bms_equalizing, the raw BMS flag, and not the combined
bms<id>_equalizing sensor. bms_base_balancer.yaml is therefore neither
modified nor duplicated, and keeps giving an external balancer priority
whenever one is online : the inference only applies when no balancer
reports for this pack.

This commit only adds the package. Nothing includes it yet, so no existing
configuration changes behaviour. Candidates sharing the same case are
Seplos V3, Seplos V1/V2, EG4 LL V2 and JK RS485 DISPLAY, whose
bms_equalizing is a hardcoded `return false;`.
2026-11-08 23:08:33 +01:00
Sleeper85 17360765d4 Update Changelog.md 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 3bbb37eadf Added digest auth 2026-11-08 23:08:33 +01:00
Sleeper85 7fc55192c8 Updated Auto CVL changelog 1.8.0 2026-11-08 23:08:33 +01:00
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
Sleeper85 9ddd618da7 Added loop_task_stack_size option + documentation #306 2026-11-08 23:08:32 +01:00
Sebastian c1579fed98 Check if Auto SoC Limit has reached its target (#308) 2026-11-08 23:08:32 +01:00
Sebastian 59f844d650 Add grace period to Auto EOC (#290)
* Add grace period to Auto EOC
* Smooth remaining capacity for Auto EOC
2026-11-08 23:08:32 +01:00
Sleeper85 978c634eb9 Improved YamBMS 1.7.1 Cut-Off charging logic 2026-11-08 23:08:32 +01:00
Sleeper85 54febc11b3 Create How_to_perform_a_PR_to_the_dev_branch.md 2026-11-08 23:08:31 +01:00
Sleeper85 489e41c38c Added device_class to number 2026-11-08 23:08:31 +01:00
Sleeper85 fd43abd718 Added substitutions for Custom CCL/DCL Derating Reason 2026-11-08 23:08:31 +01:00
Sleeper85 ace919a175 Improved README after adding max currend c-rate based limit 2026-11-08 23:08:31 +01:00
Sleeper85 00047cb418 New dashboards 1.7.1 with weblink to README 2026-11-08 23:08:31 +01:00
Sleeper85 1005b38779 Added max current c-rate based limit 2026-11-08 23:08:31 +01:00
Sleeper85 f57771e263 Inverter to Charger Offset V. 2026-11-08 23:08:31 +01:00
Sleeper85 f49a0520cf Set YamBMS version to 1.7.1 2026-11-08 23:08:31 +01:00
Sleeper85 11a6c6d4cf CCL/DCL auto_limit reorganization allowing custom codes 2026-11-08 23:08:31 +01:00
Sleeper85 d8b1431ab2 Float slider min/max values extended 2026-11-08 23:08:31 +01:00
Sleeper85 cd385bc462 Removal of max_dishcarge_current limit (processed in yambms_core) 2026-11-08 23:08:31 +01:00
298 changed files with 16709 additions and 5064 deletions

No files matched your search

+5
View File
@@ -0,0 +1,5 @@
# Every YAML in this repository is stored and checked out with LF endings.
# Without this, a contributor working on Windows can silently reintroduce CRLF
# and rewrite a whole file in the diff for nothing.
*.yaml text eol=lf
*.yml text eol=lf
+1
View File
@@ -1 +1,2 @@
buy_me_a_coffee: sleeper85
custom: ["https://paypal.me/Sleeper85"]
@@ -1,5 +1,5 @@
# Updated : 2026.06.17
# Version : 1.7.0
# Updated : 2026.11.14
# Version : 1.8.2
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -25,7 +25,7 @@ views:
- type: grid
cards:
- type: heading
heading: YamBMS - Battery
heading: 🔋 YamBMS - Battery
- graph: line
type: sensor
entity: sensor.yambms_demo_total_voltage
@@ -125,7 +125,7 @@ views:
- type: grid
cards:
- type: heading
heading: YamBMS - Status
heading: 📟 YamBMS - Status
- type: tile
entity: binary_sensor.yambms_demo_inverter_communication_status
name: Inverter comm. status
@@ -191,7 +191,7 @@ views:
cards:
- type: heading
heading_style: title
heading: BMS control
heading: ⚙️ BMS control
- type: entities
entities:
- entity: switch.bms_1_online_status_switch
@@ -224,220 +224,622 @@ views:
card:
title: DEMO
- title: Settings
cards:
- type: entity-filter
entities:
- entity: select.yambms_demo_canbus_1_yambms_name
name: CANBUS YamBMS name
- entity: select.yambms_demo_canbus_1_yambms_protocol
name: CANBUS YamBMS protocol
- entity: select.yambms_demo_rs485_1_yambms_protocol
name: RS485 YamBMS protocol
conditions:
- condition: state
state_not: unavailable
card:
title: YamBMS - Inverter Comm. Protocol
- type: entities
entities:
- entity: switch.yambms_demo_charge_enabled
name: Charge enabled
- entity: switch.yambms_demo_discharge_enabled
name: Discharge enabled
- entity: binary_sensor.yambms_demo_charging_allowed
name: Charging allowed
- entity: binary_sensor.yambms_demo_discharging_allowed
name: Discharging allowed
title: YamBMS - Charge / Discharge switch
show_header_toggle: false
- type: entities
entities:
- entity: sensor.yambms_demo_charging_status
name: Charging Status
- entity: sensor.yambms_demo_charging_instruction
name: Charging Instruction
- entity: switch.yambms_demo_float_charge_enabled
name: Float charge enabled
- entity: switch.yambms_demo_eoc_timer_enabled
name: EOC timer enabled
- entity: number.yambms_demo_bulk_voltage
name: Bulk voltage
- entity: number.yambms_demo_float_voltage
name: Float voltage
- entity: number.yambms_demo_inverter_offset_v
name: Inverter Offset V.
title: YamBMS - Charging Settings
show_header_toggle: false
- type: entities
entities:
- entity: number.yambms_demo_rebulk_soc
name: Rebulk SoC
- entity: number.yambms_demo_rebulk_v
name: Rebulk V.
- entity: number.yambms_demo_rebulk_days
name: Rebulk Days
- entity: switch.yambms_demo_force_bulk
name: Force Bulk
title: YamBMS - ReBulk
- type: entities
entities:
- entity: number.yambms_demo_max_requested_charge_current
name: Max charge current
- entity: number.yambms_demo_max_requested_discharge_current
name: Max discharge current
- entity: switch.yambms_demo_temperature_based_current_limitation
name: Temperature-based current limitation
- entity: sensor.yambms_demo_ccl_derating_reason
name: CCL Derating Reason
- entity: sensor.yambms_demo_dcl_derating_reason
name: DCL Derating Reason
title: YamBMS - Max requested current
- type: entities
entities:
- entity: switch.yambms_demo_request_force_charge
name: Request force charge
- entity: number.yambms_demo_request_force_charge_start_soc
name: Force charge Start SoC
- entity: number.yambms_demo_request_force_charge_stop_soc
name: Force charge Stop SoC
- entity: binary_sensor.yambms_demo_requested_force_charge
name: Requested Force Charge
title: YamBMS - Request force charge
- type: entities
entities:
- entity: sensor.yambms_demo_requested_charge_voltage
name: Requested Charge Voltage
- entity: sensor.yambms_demo_requested_discharge_voltage
name: Requested Discharge Voltage
- entity: sensor.yambms_demo_requested_charge_current
name: Requested Charge Current
- entity: sensor.yambms_demo_requested_discharge_current
name: Requested Discharge Current
title: YamBMS - Requested Values
type: sections
max_columns: 3
sections:
- type: grid
column_span: 1
cards:
- type: entity-filter
entities:
- entity: select.yambms_demo_canbus_1_inverter_brand
name: CANBUS 1 Inverter brand
- entity: select.yambms_demo_canbus_1_protocol
name: CANBUS 1 Protocol
- entity: select.yambms_demo_canbus_2_inverter_brand
name: CANBUS 2 Inverter brand
- entity: select.yambms_demo_canbus_2_protocol
name: CANBUS 2 Protocol
- entity: select.yambms_demo_canbus_3_inverter_brand
name: CANBUS 3 Inverter brand
- entity: select.yambms_demo_canbus_3_protocol
name: CANBUS 3 Protocol
- entity: select.yambms_demo_rs485_1_inverter_brand
name: RS485 1 Inverter brand
- entity: select.yambms_demo_rs485_1_protocol
name: RS485 1 Protocol
- entity: select.yambms_demo_rs485_2_inverter_brand
name: RS485 2 Inverter brand
- entity: select.yambms_demo_rs485_2_protocol
name: RS485 2 Protocol
- entity: select.yambms_demo_rs485_3_inverter_brand
name: RS485 3 Inverter brand
- entity: select.yambms_demo_rs485_3_protocol
name: RS485 3 Protocol
conditions:
- condition: state
state_not: unavailable
card:
title: YamBMS - Inverter protocol
- type: markdown
title: YamBMS - Inverter active protocol
content: |-
{% set links = [
('CANBUS 1', 'sensor.yambms_demo_canbus_1_inverter_link_protocol', 'binary_sensor.yambms_demo_canbus_1_status'),
('CANBUS 2', 'sensor.yambms_demo_canbus_2_inverter_link_protocol', 'binary_sensor.yambms_demo_canbus_2_status'),
('CANBUS 3', 'sensor.yambms_demo_canbus_3_inverter_link_protocol', 'binary_sensor.yambms_demo_canbus_3_status'),
('RS485 1', 'sensor.yambms_demo_rs485_1_inverter_link_protocol', 'binary_sensor.yambms_demo_rs485_1_status'),
('RS485 2', 'sensor.yambms_demo_rs485_2_inverter_link_protocol', 'binary_sensor.yambms_demo_rs485_2_status'),
('RS485 3', 'sensor.yambms_demo_rs485_3_inverter_link_protocol', 'binary_sensor.yambms_demo_rs485_3_status') ] %}
{%- for label, e, s in links %}
{%- set p = states(e) %}
{%- if p not in ['unknown', 'unavailable'] %}
{%- set m = states(e | replace('inverter_link_protocol', 'inverter_battery_mode')) %}
{%- set n = states(e | replace('inverter_link_protocol', 'note')) %}
{%- set st = states(s) %}
{%- set link = label ~ (' - ON' if st == 'on' else (' - OFF' if st == 'off' else '')) %}
**{{ link }} :**
* {{ p }}
{%- if m not in ['unknown', 'unavailable', ''] %}
{%- if m == 'See inverter manual' %}
* {{ m }}
{%- else %}
* Set your inverter battery mode to **{{ m }}**
{%- endif %}
{%- endif %}
{%- if n not in ['unknown', 'unavailable', ''] %}
* {{ n }}
{%- endif %}
{%- endif %}
{%- endfor %}
- type: entities
entities:
- entity: switch.yambms_demo_charge_enabled
name: Charge enabled
- entity: switch.yambms_demo_discharge_enabled
name: Discharge enabled
- entity: binary_sensor.yambms_demo_charging_allowed
name: Charging allowed
- entity: binary_sensor.yambms_demo_discharging_allowed
name: Discharging allowed
title: YamBMS - Charge / Discharge switch
show_header_toggle: false
- type: entities
entities:
- entity: switch.yambms_demo_request_force_charge
name:
type: entity
- entity: number.yambms_demo_request_force_charge_start_soc
name: Start SoC
- entity: number.yambms_demo_request_force_charge_stop_soc
name: Stop SoC
- entity: binary_sensor.yambms_demo_requested_force_charge
name:
type: entity
- type: weblink
url: >-
https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_functions.md#request-force-charge
name: README
icon: mdi:book-open-variant
title: YamBMS - Request force charge
- type: grid
column_span: 1
cards:
- type: entities
entities:
- entity: sensor.yambms_demo_charging_status
name:
type: entity
- entity: sensor.yambms_demo_charging_instruction
name:
type: entity
- entity: switch.yambms_demo_float_charge_enabled
name:
type: entity
- entity: switch.yambms_demo_eoc_timer_enabled
name:
type: entity
- entity: number.yambms_demo_bulk_voltage
name:
type: entity
- entity: number.yambms_demo_float_voltage
name:
type: entity
- entity: number.yambms_demo_charger_offset_v
name:
type: entity
- entity: select.yambms_demo_cut_off_cell_voltage
name:
type: entity
- type: weblink
url: >-
https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_functions.md#charging-settings
name: README
icon: mdi:book-open-variant
title: YamBMS - Charging Settings
show_header_toggle: false
- type: entities
entities:
- entity: sensor.yambms_demo_requested_charge_voltage
name: Requested Charge Voltage
- entity: sensor.yambms_demo_requested_discharge_voltage
name: Requested Discharge Voltage
- entity: sensor.yambms_demo_requested_charge_current
name: Requested Charge Current
- entity: sensor.yambms_demo_requested_discharge_current
name: Requested Discharge Current
- type: weblink
url: >-
https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_functions.md#requested-values
name: README
icon: mdi:book-open-variant
title: YamBMS - Requested Values
- type: grid
column_span: 1
cards:
- type: entities
entities:
- entity: number.yambms_demo_max_requested_charge_current
name: Max charge current
- entity: number.yambms_demo_max_requested_discharge_current
name: Max discharge current
- entity: number.yambms_demo_max_charge_c_rate
name:
type: entity
- entity: number.yambms_demo_max_discharge_c_rate
name:
type: entity
- entity: switch.yambms_demo_temperature_based_current_limitation
name:
type: entity
- entity: sensor.yambms_demo_ccl_derating_reason
name:
type: entity
- entity: sensor.yambms_demo_dcl_derating_reason
name:
type: entity
- type: weblink
url: >-
https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_functions.md#max-requested-current
name: README
icon: mdi:book-open-variant
title: YamBMS - Max requested current
- type: entities
entities:
- entity: number.yambms_demo_rebulk_soc
name:
type: entity
- entity: number.yambms_demo_rebulk_v
name:
type: entity
- entity: number.yambms_demo_rebulk_days
name:
type: entity
- entity: switch.yambms_demo_force_bulk
name:
type: entity
- type: weblink
url: >-
https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_functions.md#rebulk
name: README
icon: mdi:book-open-variant
title: YamBMS - ReBulk
- title: Auto Functions
cards:
- type: entities
entities:
- entity: switch.yambms_demo_automatic_charge_voltage
name: Automatic Charge Voltage
- entity: number.yambms_demo_auto_cvl_boost_charge_v
name: Auto CVL Boost Charge V.
title: YamBMS - Auto CVL
- type: entities
entities:
- entity: select.yambms_demo_automatic_float_voltage
name: Automatic Float Voltage
- entity: sensor.yambms_demo_auto_float_voltage
name: Auto Float Voltage
- entity: number.yambms_demo_auto_float_update_interval
name: Update Interval
- entity: number.yambms_demo_auto_float_voltage_step
name: Voltage Step
title: YamBMS - Auto Float
- type: entities
entities:
- entity: switch.yambms_demo_automatic_charge_current
name: Automatic Charge Current
- entity: switch.yambms_demo_automatic_discharge_current
name: Automatic Discharge Current
title: YamBMS - Auto CCL / DCL
show_header_toggle: false
- type: entities
entities:
- entity: switch.yambms_demo_automatic_soc_limit
name: Automatic SoC Limit
- entity: number.yambms_demo_auto_soc_limit
name: SoC Limit
- entity: number.yambms_demo_auto_soc_limit_hysteresis
name: SoC Limit Hysteresis
- entity: select.yambms_demo_auto_soc_limit_mode
name: Auto SoC Limit Mode
- entity: sensor.yambms_demo_auto_soc_limit_status
name: Auto SoC Limit Status
title: YamBMS - Auto SoC Limit
- type: entities
entities:
- entity: switch.yambms_demo_automatic_eoc_current
name: Automatic EOC Current
- entity: sensor.yambms_demo_auto_eoc_status
name: Status
- entity: sensor.yambms_demo_auto_eoc_current
name: Required Current
- entity: number.yambms_demo_auto_eoc_target_hour
name: Target hour
- entity: number.yambms_demo_auto_eoc_target_minute
name: Target minute
- entity: number.yambms_demo_auto_eoc_correction
name: Current Correction
- entity: number.yambms_demo_auto_eoc_capacity_modifier
name: Capacity Modifier
- entity: number.yambms_demo_auto_eoc_increase_stop_hours
name: Stop hours
- entity: number.yambms_demo_auto_eoc_increase_stop_soc
name: Stop SoC
title: YamBMS - Auto EOC
type: sections
max_columns: 3
sections:
- type: grid
column_span: 1
cards:
- type: entities
entities:
- entity: switch.yambms_demo_automatic_charge_voltage
name: Automatic Charge Voltage
- entity: number.yambms_demo_auto_cvl_boost_charge_v
name: Auto CVL Boost Charge V.
- type: weblink
url: >-
https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_functions.md#auto-cvl
name: README
icon: mdi:book-open-variant
title: YamBMS - Auto CVL
- type: entities
entities:
- entity: select.yambms_demo_automatic_float_voltage
name: Automatic Float Voltage
- entity: sensor.yambms_demo_auto_float_voltage
name: Auto Float Voltage
- entity: number.yambms_demo_auto_float_update_interval
name: Update Interval
- entity: number.yambms_demo_auto_float_voltage_step
name: Voltage Step
- type: weblink
url: >-
https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_functions.md#auto-float-voltage
name: README
icon: mdi:book-open-variant
title: YamBMS - Auto Float Voltage
- type: grid
column_span: 1
cards:
- type: entities
entities:
- entity: switch.yambms_demo_automatic_charge_current
name: Automatic Charge Current
- entity: switch.yambms_demo_automatic_discharge_current
name: Automatic Discharge Current
- type: weblink
url: >-
https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_functions.md#auto-ccl--dcl
name: README
icon: mdi:book-open-variant
title: YamBMS - Auto CCL / DCL
show_header_toggle: false
- type: entities
title: Auto CCL - Current Taper
show_header_toggle: false
entities:
- entity: switch.yambms_demo_auto_ccl_current_taper
name: Current Taper
- type: conditional
conditions:
- entity: switch.yambms_demo_auto_ccl_current_taper
state: "on"
row:
entity: number.yambms_demo_auto_ccl_ct_knee_voltage
name: Knee Voltage
- type: conditional
conditions:
- entity: switch.yambms_demo_auto_ccl_current_taper
state: "on"
row:
entity: number.yambms_demo_auto_ccl_ct_knee_c_rate
name: Knee C-Rate
- type: conditional
conditions:
- entity: switch.yambms_demo_auto_ccl_current_taper
state: "on"
row:
entity: sensor.yambms_demo_auto_ccl_ct_knee_amps
name: Knee Amps
- type: conditional
conditions:
- entity: switch.yambms_demo_auto_ccl_current_taper
state: "on"
row:
entity: number.yambms_demo_auto_ccl_ct_bulk_c_rate
name: Bulk C-Rate
- type: conditional
conditions:
- entity: switch.yambms_demo_auto_ccl_current_taper
state: "on"
row:
entity: sensor.yambms_demo_auto_ccl_ct_bulk_amps
name: Bulk Amps
- type: conditional
conditions:
- entity: switch.yambms_demo_auto_ccl_current_taper
state: "on"
row:
entity: number.yambms_demo_auto_ccl_ct_balance_current
name: Balance Current
- type: weblink
url: >-
https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_functions.md#auto-ccl-current-taper
name: README
icon: mdi:book-open-variant
- type: grid
column_span: 1
cards:
- type: entities
entities:
- entity: switch.yambms_demo_automatic_soc_limit
name: Automatic SoC Limit
- entity: number.yambms_demo_auto_soc_limit
name: SoC Limit
- entity: number.yambms_demo_auto_soc_limit_hysteresis
name: SoC Limit Hysteresis
- entity: select.yambms_demo_auto_soc_limit_mode
name: Auto SoC Limit Mode
- entity: sensor.yambms_demo_auto_soc_limit_status
name: Auto SoC Limit Status
- type: weblink
url: >-
https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_functions.md#auto-soc-limit
name: README
icon: mdi:book-open-variant
title: YamBMS - Auto SoC Limit
- type: entities
entities:
- entity: switch.yambms_demo_automatic_eoc_current
name: Automatic EOC Current
- type: conditional
conditions:
- entity: switch.yambms_demo_automatic_eoc_current
state: "on"
row:
entity: sensor.yambms_demo_auto_eoc_status
name: Status
- type: conditional
conditions:
- entity: switch.yambms_demo_automatic_eoc_current
state: "on"
row:
entity: sensor.yambms_demo_auto_eoc_current
name: Required Current
- type: conditional
conditions:
- entity: switch.yambms_demo_automatic_eoc_current
state: "on"
row:
entity: number.yambms_demo_auto_eoc_start_hour
name: Start hour
- type: conditional
conditions:
- entity: switch.yambms_demo_automatic_eoc_current
state: "on"
row:
entity: number.yambms_demo_auto_eoc_start_minute
name: Start minute
- type: conditional
conditions:
- entity: switch.yambms_demo_automatic_eoc_current
state: "on"
row:
entity: number.yambms_demo_auto_eoc_target_hour
name: Target hour
- type: conditional
conditions:
- entity: switch.yambms_demo_automatic_eoc_current
state: "on"
row:
entity: number.yambms_demo_auto_eoc_target_minute
name: Target minute
- type: conditional
conditions:
- entity: switch.yambms_demo_automatic_eoc_current
state: "on"
row:
entity: number.yambms_demo_auto_eoc_correction
name: Current Correction
- type: conditional
conditions:
- entity: switch.yambms_demo_automatic_eoc_current
state: "on"
row:
entity: number.yambms_demo_auto_eoc_capacity_modifier
name: Capacity Modifier
- type: conditional
conditions:
- entity: switch.yambms_demo_automatic_eoc_current
state: "on"
row:
entity: number.yambms_demo_auto_eoc_increase_stop_hours
name: Stop hours
- type: conditional
conditions:
- entity: switch.yambms_demo_automatic_eoc_current
state: "on"
row:
entity: number.yambms_demo_auto_eoc_increase_stop_soc
name: Stop SoC
- type: weblink
url: >-
https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_functions.md#auto-eoc
name: README
icon: mdi:book-open-variant
title: YamBMS - Auto EOC
- title: Diagnostic
cards:
- type: entity-filter
entities:
- entity: sensor.yambms_demo_board_debug_free_psram_percent
name: Debug Free PSRAM (%)
- entity: sensor.yambms_demo_board_debug_free_psram
name: Debug Free PSRAM
- entity: sensor.yambms_demo_board_debug_heap_free_percent
name: Debug Heap free (%)
- entity: sensor.yambms_demo_board_debug_heap_free
name: Debug Heap free
- entity: sensor.yambms_demo_board_debug_heap_max_block_percent
name: Debug Heap max block (%)
- entity: sensor.yambms_demo_board_debug_heap_max_block
name: Debug Heap max block
- entity: sensor.yambms_demo_board_debug_loop_time
name: Debug Loop time
- entity: sensor.yambms_demo_board_debug_reset_reason
name: Debug Reset reason
- entity: sensor.yambms_demo_board_uptime
name: Board Uptime
- entity: sensor.yambms_demo_board_esphome_version
name: ESPHome version
- entity: button.yambms_demo_board_restart
name: Board Restart
conditions:
- condition: state
state_not: unavailable
card:
title: YamBMS - Diagnostic
- type: entities
entities:
- entity: sensor.yambms_demo_requested_charge_voltage
name: Requested Charge Voltage
- entity: sensor.yambms_demo_requested_discharge_voltage
name: Requested Discharge Voltage
- entity: sensor.yambms_demo_requested_charge_current
name: Requested Charge Current
- entity: sensor.yambms_demo_requested_discharge_current
name: Requested Discharge Current
title: YamBMS - Requested Values
- type: entity-filter
entities:
- entity: binary_sensor.yambms_demo_canbus_1_status
name: CANBUS Status
- entity: switch.yambms_demo_canbus_1_inverter_heartbeat_monitoring
name: CANBUS Inverter Heartbeat Monitoring
- entity: sensor.yambms_demo_canbus_1_inverter_heartbeat
name: CANBUS Inverter Heartbeat
- entity: binary_sensor.yambms_demo_rs485_1_status
name: RS485 Status
- entity: switch.yambms_demo_rs485_1_inverter_heartbeat_monitoring
name: RS485 Inverter Heartbeat Monitoring
- entity: sensor.yambms_demo_rs485_1_inverter_heartbeat
name: RS485 Inverter Heartbeat
conditions:
- condition: state
state_not: unavailable
card:
title: YamBMS - Inverter Status & Heartbeat
type: masonry
type: sections
max_columns: 3
sections:
- type: grid
column_span: 1
cards:
- type: markdown
content: |-
{%- set raw = states('sensor.yambms_demo_board_system_fault_data') %}
{%- set names = ['API / MQTT', 'BMS', 'CAN->INV', 'RS485->INV', 'Shunt', 'Balancer', 'Network', 'Aux 1', 'Cat 8', 'Cat 9', 'Cat 10', 'Cat 11', 'Cat 12', 'Cat 13', 'Cat 14', 'Cat 15'] %}
{%- if raw in ['unknown', 'unavailable', 'none', ''] %}
Initializing...
{%- else %}
{%- set data = raw | from_json %}
| Component | Instance status |
| :--- | :--- |
{%- for cat_idx in range(0, 16) %}
{%- if data | count > cat_idx and data[cat_idx] | count > 0 %}
{%- set ns = namespace(visual='') %}
{%- for inst in data[cat_idx] %}
{%- set icon = '❌' if inst == 1 else ('✅' if inst == 0 else '➖') %}
{%- set ns.visual = ns.visual ~ icon ~ ' ' %}
{%- endfor %}
| {{ names[cat_idx] }} | {{ ns.visual }} |
{%- endif %}
{%- endfor %}
{%- endif %}
title: 🚨 YamBMS - Fault status
- type: markdown
content: |-
{% set on = '<font color="#4CAF50"><b>ON</b></font>' %}
{% set off = '<font color="#9e9e9e">OFF</font>' %}
<table>
<tr>
<td>CCL Derating Reason</td>
<td>{% set v = states('sensor.yambms_demo_ccl_derating_reason') %}{% if v == 'No Derating' %}<font color="#4CAF50">{{ v }}</font>{% else %}<font color="#FFC107">{{ v }}</font>{% endif %} — {{ states('sensor.yambms_demo_requested_charge_current')|float|round }} A</td>
</tr>
<tr>
<td>DCL Derating Reason</td>
<td>{% set v = states('sensor.yambms_demo_dcl_derating_reason') %}{% if v == 'No Derating' %}<font color="#4CAF50">{{ v }}</font>{% else %}<font color="#FFC107">{{ v }}</font>{% endif %} — {{ states('sensor.yambms_demo_requested_discharge_current')|float|round }} A</td>
</tr>
{% if is_state('switch.yambms_demo_temperature_based_current_limitation','on') %}
<tr>
<td>Temp. Based Current Limit</td>
<td>{{ on }}</td>
</tr>
{% endif %}
{% if is_state('switch.yambms_demo_automatic_charge_voltage','on') %}
<tr>
<td>Automatic Charge Voltage</td>
<td>{{ on }}</td>
</tr>
{% endif %}
{% if is_state('switch.yambms_demo_automatic_charge_current','on') %}
<tr>
<td>Automatic Charge Current</td>
<td>{{ on }}</td>
</tr>
{% endif %}
{% if is_state('switch.yambms_demo_automatic_discharge_current','on') %}
<tr>
<td>Automatic Discharge Current</td>
<td>{{ on }}</td>
</tr>
{% endif %}
{% if is_state('switch.yambms_demo_automatic_eoc_current','on') %}
<tr>
<td>Automatic EOC Current</td>
<td>{% set eoc_status = states('sensor.yambms_demo_auto_eoc_status') %}{% set eoc_val %}{{ states('number.yambms_demo_auto_eoc_start_hour') | int }}:{{ '%02d' % (states('number.yambms_demo_auto_eoc_start_minute') | int) }}–{{ states('number.yambms_demo_auto_eoc_target_hour') | int }}:{{ '%02d' % (states('number.yambms_demo_auto_eoc_target_minute') | int) }} — {{ eoc_status }}{% endset %}{% if eoc_status.startswith('Stop:') %}<font color="#FFC107">{{ eoc_val }}</font>{% elif eoc_status.startswith('Run') %}<font color="#4CAF50">{{ eoc_val }}</font>{% else %}{{ eoc_val }}{% endif %}</td>
</tr>
{% endif %}
{% if is_state('switch.yambms_demo_automatic_soc_limit','on') %}
<tr>
<td>Automatic SoC Limit</td>
<td>{% set soc_status = states('sensor.yambms_demo_auto_soc_limit_status') %}{% if soc_status.startswith('Stop:') %}<font color="#FFC107">{{ states('number.yambms_demo_auto_soc_limit') }} % — {{ soc_status }}</font>{% elif soc_status == 'Run' %}<font color="#4CAF50">{{ states('number.yambms_demo_auto_soc_limit') }} % — {{ soc_status }}</font>{% else %}{{ states('number.yambms_demo_auto_soc_limit') }} % — {{ soc_status }}{% endif %}</td>
</tr>
{% endif %}
{% set rebulk_days = states('number.yambms_demo_rebulk_days') | int %}
{% if rebulk_days != 0 %}
<tr>
<td>Rebulk Days</td>
<td>{% set last = strptime(states('sensor.yambms_demo_last_complete_charge') | trim, '%H:%M %d %b %Y') %}{% set remaining = (last.date() + timedelta(days=rebulk_days) - now().date()).days %}{{ rebulk_days }} days — {% if remaining < 0 %}<font color="#F44336">{{ remaining | abs }} overdue</font>{% elif remaining == 0 %}<font color="#F44336">{{ remaining }} remaining</font>{% elif remaining <= 2 %}<font color="#FFC107">{{ remaining }} remaining</font>{% else %}<font color="#4CAF50">{{ remaining }} remaining</font>{% endif %}</td>
</tr>
{% endif %}
<tr>
<td>Rebulk SoC</td>
<td>{{ states('number.yambms_demo_rebulk_soc')|float|round }} %</td>
</tr>
<tr>
<td>Rebulk Voltage</td>
<td>{{ states('number.yambms_demo_rebulk_v')|float|round(2) }} V</td>
</tr>
</table>
- type: markdown
content: |2
<table>
<tr>
<td>Node ID hash</td>
<td>{{ states('sensor.yambms_demo_board_node_id_hash') }}</td>
</tr>
<tr>
<td>MAC address</td>
<td>{{ states('sensor.yambms_demo_board_mac_address') }}</td>
</tr>
<tr>
<td>IP address</td>
<td>{{ states('sensor.yambms_demo_board_ip_address') }}</td>
</tr>
</table>
title: 🌐 YamBMS - Network
- type: grid
column_span: 1
cards:
- type: markdown
title: 🔍 YamBMS - Diagnostic
content: |2
<table>
<tr>
<td>Chip</td>
<td>{% set info = states('sensor.yambms_demo_board_debug_device_info') %}{% if info not in ['unknown', 'unavailable', ''] and '|' in info %}{{ info.split('|')[1].split('Features:')[0].replace('Chip:', '').strip() }}{% else %}{{ info }}{% endif %}</td>
</tr>
<tr>
<td>Board</td>
<td>{{ states('sensor.yambms_demo_board_board_name') }}</td>
</tr>
<tr>
<td>Board Uptime</td>
<td>{{ states('sensor.yambms_demo_board_uptime') }}</td>
</tr>
<tr>
<td>Entities</td>
<td>{{ integration_entities(config_entry_attr(config_entry_id('sensor.yambms_demo_board_uptime'), 'title')) | count }}</td>
</tr>
<tr>
<td>PSRAM</td>
<td>{% set psram = states('sensor.yambms_demo_board_debug_free_psram') %}{% if psram|float(0) > 0 %}<font color="#4CAF50">Active — {{ states('sensor.yambms_demo_board_debug_free_psram_percent')|float|round }} % free</font>{% else %}Not active{% endif %}</td>
</tr>
<tr>
<td>Debug Free PSRAM (%)</td>
<td>{{ states('sensor.yambms_demo_board_debug_free_psram_percent')|float(0)|round }} %</td>
</tr>
<tr>
<td>Debug Free PSRAM</td>
<td>{{ states('sensor.yambms_demo_board_debug_free_psram')|float(0)|round }} B</td>
</tr>
<tr>
<td>Debug Heap free (%)</td>
<td>{{ states('sensor.yambms_demo_board_debug_heap_free_percent')|float(0)|round }} %</td>
</tr>
<tr>
<td>Debug Heap free</td>
<td>{{ states('sensor.yambms_demo_board_debug_heap_free')|float(0)|round }} B</td>
</tr>
<tr>
<td>Debug Heap max block (%)</td>
<td>{{ states('sensor.yambms_demo_board_debug_heap_max_block_percent')|float(0)|round }} %</td>
</tr>
<tr>
<td>Debug Heap max block</td>
<td>{{ states('sensor.yambms_demo_board_debug_heap_max_block')|float(0)|round }} B</td>
</tr>
<tr>
<td>Debug Loop time</td>
<td>{{ states('sensor.yambms_demo_board_debug_loop_time')|float(0)|round }} ms</td>
</tr>
<tr>
<td>Debug Reset reason</td>
<td>{{ states('sensor.yambms_demo_board_debug_reset_reason') }}</td>
</tr>
<tr>
<td>YamBMS Running version</td>
<td>{{ states('sensor.yambms_demo_running_version') }}</td>
</tr>
<tr>
<td>YamBMS Last version</td>
<td>{{ states('sensor.yambms_demo_last_version') }}</td>
</tr>
<tr>
<td>ESPHome version</td>
<td>{{ states('sensor.yambms_demo_board_esphome_version')[:9] }}</td>
</tr>
</table>
- type: grid
column_span: 1
cards:
- type: entity-filter
entities:
- entity: binary_sensor.yambms_demo_canbus_1_status
name: CANBUS Status
- entity: switch.yambms_demo_canbus_1_inverter_heartbeat_monitoring
name: CANBUS Inverter Heartbeat Monitoring
- entity: sensor.yambms_demo_canbus_1_inverter_heartbeat
name: CANBUS Inverter Heartbeat
- entity: binary_sensor.yambms_demo_rs485_1_status
name: RS485 Status
- entity: switch.yambms_demo_rs485_1_inverter_heartbeat_monitoring
name: RS485 Inverter Heartbeat Monitoring
- entity: sensor.yambms_demo_rs485_1_inverter_heartbeat
name: RS485 Inverter Heartbeat
conditions:
- condition: state
state_not: unavailable
card:
title: 💓 YamBMS - Inverter Status & Heartbeat
- type: entities
entities:
- entity: button.yambms_demo_board_restart
name: Board Restart
show_header_toggle: false
- title: BMS
type: sections
max_columns: 3
@@ -587,12 +989,14 @@ views:
- entity: switch.bms_1_online_status_switch
- entity: switch.bms_1_charge_switch
- entity: switch.bms_1_discharge_switch
- entity: number.bms_1_battery_capacity_number
- entity: number.bms_1_battery_soc_number
- entity: number.bms_1_current_number
- entity: number.bms_1_min_cell_voltage_number
- entity: number.bms_1_max_cell_voltage_number
- entity: number.bms_1_min_temperature_number
- entity: number.bms_1_max_temperature_number
- entity: number.bms_1_yambms_errors_bitmask_number
conditions:
- condition: state
state_not: unavailable
@@ -741,12 +1145,14 @@ views:
- entity: switch.bms_2_online_status_switch
- entity: switch.bms_2_charge_switch
- entity: switch.bms_2_discharge_switch
- entity: number.bms_2_battery_capacity_number
- entity: number.bms_2_battery_soc_number
- entity: number.bms_2_current_number
- entity: number.bms_2_min_cell_voltage_number
- entity: number.bms_2_max_cell_voltage_number
- entity: number.bms_2_min_temperature_number
- entity: number.bms_2_max_temperature_number
- entity: number.bms_2_yambms_errors_bitmask_number
conditions:
- condition: state
state_not: unavailable
@@ -895,12 +1301,14 @@ views:
- entity: switch.bms_3_online_status_switch
- entity: switch.bms_3_charge_switch
- entity: switch.bms_3_discharge_switch
- entity: number.bms_3_battery_capacity_number
- entity: number.bms_3_battery_soc_number
- entity: number.bms_3_current_number
- entity: number.bms_3_min_cell_voltage_number
- entity: number.bms_3_max_cell_voltage_number
- entity: number.bms_3_min_temperature_number
- entity: number.bms_3_max_temperature_number
- entity: number.bms_3_yambms_errors_bitmask_number
conditions:
- condition: state
state_not: unavailable
@@ -1,5 +1,5 @@
# Updated : 2026.06.17
# Version : 1.7.0
# Updated : 2026.11.14
# Version : 1.8.2
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -25,7 +25,8 @@ views:
- type: grid
cards:
- type: heading
heading: YamBMS - Battery
heading: 🔋 YamBMS - Battery
heading_style: title
- graph: line
type: sensor
entity: sensor.yambms_1_total_voltage
@@ -125,7 +126,8 @@ views:
- type: grid
cards:
- type: heading
heading: YamBMS - Status
heading: 📟 YamBMS - Status
heading_style: title
- type: tile
entity: binary_sensor.yambms_1_inverter_communication_status
name: Inverter comm. status
@@ -190,7 +192,7 @@ views:
- type: grid
cards:
- type: heading
heading: YamBMS - Overview
heading: 📋 YamBMS - Overview
heading_style: title
- type: markdown
content: |-
@@ -232,7 +234,7 @@ views:
{% if is_state('switch.yambms_1_automatic_eoc_current','on') %}
<tr>
<td>Automatic EOC Current</td>
<td>{% set eoc_status = states('sensor.yambms_1_auto_eoc_status') %}{% set eoc_val %}{{ states('number.yambms_1_auto_eoc_target_hour') | int }}:{{ '%02d' % (states('number.yambms_1_auto_eoc_target_minute') | int) }} — {{ eoc_status }}{% endset %}{% if eoc_status.startswith('Stop:') %}<font color="#FFC107">{{ eoc_val }}</font>{% elif eoc_status.startswith('Run') %}<font color="#4CAF50">{{ eoc_val }}</font>{% else %}{{ eoc_val }}{% endif %}</td>
<td>{% set eoc_status = states('sensor.yambms_1_auto_eoc_status') %}{% set eoc_val %}{{ states('number.yambms_1_auto_eoc_start_hour') | int }}:{{ '%02d' % (states('number.yambms_1_auto_eoc_start_minute') | int) }}–{{ states('number.yambms_1_auto_eoc_target_hour') | int }}:{{ '%02d' % (states('number.yambms_1_auto_eoc_target_minute') | int) }} — {{ eoc_status }}{% endset %}{% if eoc_status.startswith('Stop:') %}<font color="#FFC107">{{ eoc_val }}</font>{% elif eoc_status.startswith('Run') %}<font color="#4CAF50">{{ eoc_val }}</font>{% else %}{{ eoc_val }}{% endif %}</td>
</tr>
{% endif %}
{% if is_state('switch.yambms_1_automatic_soc_limit','on') %}
@@ -258,15 +260,51 @@ views:
</tr>
</table>
- type: heading
heading: YamBMS - Diagnostic
heading: 🚨 YamBMS - Fault status
heading_style: title
- type: markdown
content: |-
{%- set raw = states('sensor.yambms_board_system_fault_data') %}
{%- set names = ['API / MQTT', 'BMS', 'CAN->INV', 'RS485->INV', 'Shunt', 'Balancer', 'Network', 'Aux 1', 'Cat 8', 'Cat 9', 'Cat 10', 'Cat 11', 'Cat 12', 'Cat 13', 'Cat 14', 'Cat 15'] %}
{%- if raw in ['unknown', 'unavailable', 'none', ''] %}
Initializing...
{%- else %}
{%- set data = raw | from_json %}
| Component | Instance status |
| :--- | :--- |
{%- for cat_idx in range(0, 16) %}
{%- if data | count > cat_idx and data[cat_idx] | count > 0 %}
{%- set ns = namespace(visual='') %}
{%- for inst in data[cat_idx] %}
{%- set icon = '❌' if inst == 1 else ('✅' if inst == 0 else '➖') %}
{%- set ns.visual = ns.visual ~ icon ~ ' ' %}
{%- endfor %}
| {{ names[cat_idx] }} | {{ ns.visual }} |
{%- endif %}
{%- endfor %}
{%- endif %}
- type: heading
heading: 🔍 YamBMS - Diagnostic
heading_style: title
- type: markdown
content: |2
<table>
<tr>
<td>Uptime</td>
<td>Chip</td>
<td>{% set info = states('sensor.yambms_board_debug_device_info') %}{% if info not in ['unknown', 'unavailable', ''] and '|' in info %}{{ info.split('|')[1].split('Features:')[0].replace('Chip:', '').strip() }}{% else %}{{ info }}{% endif %}</td>
</tr>
<tr>
<td>Board</td>
<td>{{ states('sensor.yambms_board_board_name') }}</td>
</tr>
<tr>
<td>Board Uptime</td>
<td>{{ states('sensor.yambms_board_uptime') }}</td>
</tr>
<tr>
<td>Entities</td>
<td>{{ integration_entities(config_entry_attr(config_entry_id('sensor.yambms_board_uptime'), 'title')) | count }}</td>
</tr>
<tr>
<td>Loop Time</td>
<td>{{ states('sensor.yambms_board_debug_loop_time')|float|round }} ms</td>
@@ -275,6 +313,10 @@ views:
<td>Heap Free Memory</td>
<td>{{ states('sensor.yambms_board_debug_heap_free_percent')|float|round }} %</td>
</tr>
<tr>
<td>PSRAM</td>
<td>{% set psram = states('sensor.yambms_board_debug_free_psram') %}{% if psram|float(0) > 0 %}<font color="#4CAF50">Active — {{ states('sensor.yambms_board_debug_free_psram_percent')|float|round }} % free</font>{% else %}Not active{% endif %}</td>
</tr>
<tr>
<td>YamBMS Running version</td>
<td>{{ states('sensor.yambms_1_running_version') }}</td>
@@ -285,224 +327,561 @@ views:
</tr>
<tr>
<td>ESPHome Version</td>
<td>{{ states('sensor.yambms_board_esphome_version')[:8] }}</td>
<td>{{ states('sensor.yambms_board_esphome_version')[:9] }}</td>
</tr>
</table>
- title: Settings
cards:
- type: entity-filter
entities:
- entity: select.yambms_1_canbus_1_yambms_name
name: CANBUS YamBMS name
- entity: select.yambms_1_canbus_1_yambms_protocol
name: CANBUS YamBMS protocol
- entity: select.yambms_1_rs485_1_yambms_protocol
name: RS485 YamBMS protocol
conditions:
- condition: state
state_not: unavailable
card:
title: YamBMS - Inverter Comm. Protocol
- type: entities
entities:
- entity: switch.yambms_1_charge_enabled
name: Charge enabled
- entity: switch.yambms_1_discharge_enabled
name: Discharge enabled
- entity: binary_sensor.yambms_1_charging_allowed
name: Charging allowed
- entity: binary_sensor.yambms_1_discharging_allowed
name: Discharging allowed
title: YamBMS - Charge / Discharge switch
show_header_toggle: false
- type: entities
entities:
- entity: sensor.yambms_1_charging_status
name: Charging Status
- entity: sensor.yambms_1_charging_instruction
name: Charging Instruction
- entity: switch.yambms_1_float_charge_enabled
name: Float charge enabled
- entity: switch.yambms_1_eoc_timer_enabled
name: EOC timer enabled
- entity: number.yambms_1_bulk_voltage
name: Bulk voltage
- entity: number.yambms_1_float_voltage
name: Float voltage
- entity: number.yambms_1_inverter_offset_v
name: Inverter Offset V.
title: YamBMS - Charging Settings
show_header_toggle: false
- type: entities
entities:
- entity: number.yambms_1_rebulk_soc
name: Rebulk SoC
- entity: number.yambms_1_rebulk_v
name: Rebulk V.
- entity: number.yambms_1_rebulk_days
name: Rebulk Days
- entity: switch.yambms_1_force_bulk
name: Force Bulk
title: YamBMS - ReBulk
- type: entities
entities:
- entity: number.yambms_1_max_requested_charge_current
name: Max charge current
- entity: number.yambms_1_max_requested_discharge_current
name: Max discharge current
- entity: switch.yambms_1_temperature_based_current_limitation
name: Temperature-based current limitation
- entity: sensor.yambms_1_ccl_derating_reason
name: CCL Derating Reason
- entity: sensor.yambms_1_dcl_derating_reason
name: DCL Derating Reason
title: YamBMS - Max requested current
- type: entities
entities:
- entity: switch.yambms_1_request_force_charge
name: Request force charge
- entity: number.yambms_1_request_force_charge_start_soc
name: Force charge Start SoC
- entity: number.yambms_1_request_force_charge_stop_soc
name: Force charge Stop SoC
- entity: binary_sensor.yambms_1_requested_force_charge
name: Requested Force Charge
title: YamBMS - Request force charge
- type: entities
entities:
- entity: sensor.yambms_1_requested_charge_voltage
name: Requested Charge Voltage
- entity: sensor.yambms_1_requested_discharge_voltage
name: Requested Discharge Voltage
- entity: sensor.yambms_1_requested_charge_current
name: Requested Charge Current
- entity: sensor.yambms_1_requested_discharge_current
name: Requested Discharge Current
title: YamBMS - Requested Values
type: sections
max_columns: 3
sections:
- type: grid
column_span: 1
cards:
- type: entity-filter
entities:
- entity: select.yambms_1_canbus_1_inverter_brand
name: CANBUS 1 Inverter brand
- entity: select.yambms_1_canbus_1_protocol
name: CANBUS 1 Protocol
- entity: select.yambms_1_canbus_2_inverter_brand
name: CANBUS 2 Inverter brand
- entity: select.yambms_1_canbus_2_protocol
name: CANBUS 2 Protocol
- entity: select.yambms_1_canbus_3_inverter_brand
name: CANBUS 3 Inverter brand
- entity: select.yambms_1_canbus_3_protocol
name: CANBUS 3 Protocol
- entity: select.yambms_1_rs485_1_inverter_brand
name: RS485 1 Inverter brand
- entity: select.yambms_1_rs485_1_protocol
name: RS485 1 Protocol
- entity: select.yambms_1_rs485_2_inverter_brand
name: RS485 2 Inverter brand
- entity: select.yambms_1_rs485_2_protocol
name: RS485 2 Protocol
- entity: select.yambms_1_rs485_3_inverter_brand
name: RS485 3 Inverter brand
- entity: select.yambms_1_rs485_3_protocol
name: RS485 3 Protocol
conditions:
- condition: state
state_not: unavailable
card:
title: YamBMS - Inverter protocol
- type: markdown
title: YamBMS - Inverter active protocol
content: |-
{% set links = [
('CANBUS 1', 'sensor.yambms_1_canbus_1_inverter_link_protocol', 'binary_sensor.yambms_1_canbus_1_status'),
('CANBUS 2', 'sensor.yambms_1_canbus_2_inverter_link_protocol', 'binary_sensor.yambms_1_canbus_2_status'),
('CANBUS 3', 'sensor.yambms_1_canbus_3_inverter_link_protocol', 'binary_sensor.yambms_1_canbus_3_status'),
('RS485 1', 'sensor.yambms_1_rs485_1_inverter_link_protocol', 'binary_sensor.yambms_1_rs485_1_status'),
('RS485 2', 'sensor.yambms_1_rs485_2_inverter_link_protocol', 'binary_sensor.yambms_1_rs485_2_status'),
('RS485 3', 'sensor.yambms_1_rs485_3_inverter_link_protocol', 'binary_sensor.yambms_1_rs485_3_status') ] %}
{%- for label, e, s in links %}
{%- set p = states(e) %}
{%- if p not in ['unknown', 'unavailable'] %}
{%- set m = states(e | replace('inverter_link_protocol', 'inverter_battery_mode')) %}
{%- set n = states(e | replace('inverter_link_protocol', 'note')) %}
{%- set st = states(s) %}
{%- set link = label ~ (' - ON' if st == 'on' else (' - OFF' if st == 'off' else '')) %}
**{{ link }} :**
* {{ p }}
{%- if m not in ['unknown', 'unavailable', ''] %}
{%- if m == 'See inverter manual' %}
* {{ m }}
{%- else %}
* Set your inverter battery mode to **{{ m }}**
{%- endif %}
{%- endif %}
{%- if n not in ['unknown', 'unavailable', ''] %}
* {{ n }}
{%- endif %}
{%- endif %}
{%- endfor %}
- type: entities
entities:
- entity: switch.yambms_1_charge_enabled
name: Charge enabled
- entity: switch.yambms_1_discharge_enabled
name: Discharge enabled
- entity: binary_sensor.yambms_1_charging_allowed
name: Charging allowed
- entity: binary_sensor.yambms_1_discharging_allowed
name: Discharging allowed
title: YamBMS - Charge / Discharge switch
show_header_toggle: false
- type: entities
entities:
- entity: switch.yambms_1_request_force_charge
name:
type: entity
- entity: number.yambms_1_request_force_charge_start_soc
name: Start SoC
- entity: number.yambms_1_request_force_charge_stop_soc
name: Stop SoC
- entity: binary_sensor.yambms_1_requested_force_charge
name:
type: entity
- type: weblink
url: >-
https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_functions.md#request-force-charge
name: README
icon: mdi:book-open-variant
title: YamBMS - Request force charge
- type: grid
column_span: 1
cards:
- type: entities
entities:
- entity: sensor.yambms_1_charging_status
name:
type: entity
- entity: sensor.yambms_1_charging_instruction
name:
type: entity
- entity: switch.yambms_1_float_charge_enabled
name:
type: entity
- entity: switch.yambms_1_eoc_timer_enabled
name:
type: entity
- entity: number.yambms_1_bulk_voltage
name:
type: entity
- entity: number.yambms_1_float_voltage
name:
type: entity
- entity: number.yambms_1_charger_offset_v
name:
type: entity
- entity: select.yambms_1_cut_off_cell_voltage
name:
type: entity
- type: weblink
url: >-
https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_functions.md#charging-settings
name: README
icon: mdi:book-open-variant
title: YamBMS - Charging Settings
show_header_toggle: false
- type: entities
entities:
- entity: sensor.yambms_1_requested_charge_voltage
name: Requested Charge Voltage
- entity: sensor.yambms_1_requested_discharge_voltage
name: Requested Discharge Voltage
- entity: sensor.yambms_1_requested_charge_current
name: Requested Charge Current
- entity: sensor.yambms_1_requested_discharge_current
name: Requested Discharge Current
- type: weblink
url: >-
https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_functions.md#requested-values
name: README
icon: mdi:book-open-variant
title: YamBMS - Requested Values
- type: grid
column_span: 1
cards:
- type: entities
entities:
- entity: number.yambms_1_max_requested_charge_current
name: Max charge current
- entity: number.yambms_1_max_requested_discharge_current
name: Max discharge current
- entity: number.yambms_1_max_charge_c_rate
name:
type: entity
- entity: number.yambms_1_max_discharge_c_rate
name:
type: entity
- entity: switch.yambms_1_temperature_based_current_limitation
name:
type: entity
- entity: sensor.yambms_1_ccl_derating_reason
name:
type: entity
- entity: sensor.yambms_1_dcl_derating_reason
name:
type: entity
- type: weblink
url: >-
https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_functions.md#max-requested-current
name: README
icon: mdi:book-open-variant
title: YamBMS - Max requested current
- type: entities
entities:
- entity: number.yambms_1_rebulk_soc
name:
type: entity
- entity: number.yambms_1_rebulk_v
name:
type: entity
- entity: number.yambms_1_rebulk_days
name:
type: entity
- entity: switch.yambms_1_force_bulk
name:
type: entity
- type: weblink
url: >-
https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_functions.md#rebulk
name: README
icon: mdi:book-open-variant
title: YamBMS - ReBulk
- title: Auto Functions
cards:
- type: entities
entities:
- entity: switch.yambms_1_automatic_charge_voltage
name: Automatic Charge Voltage
- entity: number.yambms_1_auto_cvl_boost_charge_v
name: Auto CVL Boost Charge V.
title: YamBMS - Auto CVL
- type: entities
entities:
- entity: select.yambms_1_automatic_float_voltage
name: Automatic Float Voltage
- entity: sensor.yambms_1_auto_float_voltage
name: Auto Float Voltage
- entity: number.yambms_1_auto_float_update_interval
name: Update Interval
- entity: number.yambms_1_auto_float_voltage_step
name: Voltage Step
title: YamBMS - Auto Float
- type: entities
entities:
- entity: switch.yambms_1_automatic_charge_current
name: Automatic Charge Current
- entity: switch.yambms_1_automatic_discharge_current
name: Automatic Discharge Current
title: YamBMS - Auto CCL / DCL
show_header_toggle: false
- type: entities
entities:
- entity: switch.yambms_1_automatic_soc_limit
name: Automatic SoC Limit
- entity: number.yambms_1_auto_soc_limit
name: SoC Limit
- entity: number.yambms_1_auto_soc_limit_hysteresis
name: SoC Limit Hysteresis
- entity: select.yambms_1_auto_soc_limit_mode
name: Auto SoC Limit Mode
- entity: sensor.yambms_1_auto_soc_limit_status
name: Auto SoC Limit Status
title: YamBMS - Auto SoC Limit
- type: entities
entities:
- entity: switch.yambms_1_automatic_eoc_current
name: Automatic EOC Current
- entity: sensor.yambms_1_auto_eoc_status
name: Status
- entity: sensor.yambms_1_auto_eoc_current
name: Required Current
- entity: number.yambms_1_auto_eoc_target_hour
name: Target hour
- entity: number.yambms_1_auto_eoc_target_minute
name: Target minute
- entity: number.yambms_1_auto_eoc_correction
name: Current Correction
- entity: number.yambms_1_auto_eoc_capacity_modifier
name: Capacity Modifier
- entity: number.yambms_1_auto_eoc_increase_stop_hours
name: Stop hours
- entity: number.yambms_1_auto_eoc_increase_stop_soc
name: Stop SoC
title: YamBMS - Auto EOC
type: sections
max_columns: 3
sections:
- type: grid
column_span: 1
cards:
- type: entities
entities:
- entity: switch.yambms_1_automatic_charge_voltage
name: Automatic Charge Voltage
- entity: number.yambms_1_auto_cvl_boost_charge_v
name: Auto CVL Boost Charge V.
- type: weblink
url: >-
https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_functions.md#auto-cvl
name: README
icon: mdi:book-open-variant
title: YamBMS - Auto CVL
- type: entities
entities:
- entity: select.yambms_1_automatic_float_voltage
name: Automatic Float Voltage
- entity: sensor.yambms_1_auto_float_voltage
name: Auto Float Voltage
- entity: number.yambms_1_auto_float_update_interval
name: Update Interval
- entity: number.yambms_1_auto_float_voltage_step
name: Voltage Step
- type: weblink
url: >-
https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_functions.md#auto-float-voltage
name: README
icon: mdi:book-open-variant
title: YamBMS - Auto Float Voltage
- type: grid
column_span: 1
cards:
- type: entities
entities:
- entity: switch.yambms_1_automatic_charge_current
name: Automatic Charge Current
- entity: switch.yambms_1_automatic_discharge_current
name: Automatic Discharge Current
- type: weblink
url: >-
https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_functions.md#auto-ccl--dcl
name: README
icon: mdi:book-open-variant
title: YamBMS - Auto CCL / DCL
show_header_toggle: false
- type: entities
title: Auto CCL - Current Taper
show_header_toggle: false
entities:
- entity: switch.yambms_1_auto_ccl_current_taper
name: Current Taper
- type: conditional
conditions:
- entity: switch.yambms_1_auto_ccl_current_taper
state: "on"
row:
entity: number.yambms_1_auto_ccl_ct_knee_voltage
name: Knee Voltage
- type: conditional
conditions:
- entity: switch.yambms_1_auto_ccl_current_taper
state: "on"
row:
entity: number.yambms_1_auto_ccl_ct_knee_c_rate
name: Knee C-Rate
- type: conditional
conditions:
- entity: switch.yambms_1_auto_ccl_current_taper
state: "on"
row:
entity: sensor.yambms_1_auto_ccl_ct_knee_amps
name: Knee Amps
- type: conditional
conditions:
- entity: switch.yambms_1_auto_ccl_current_taper
state: "on"
row:
entity: number.yambms_1_auto_ccl_ct_bulk_c_rate
name: Bulk C-Rate
- type: conditional
conditions:
- entity: switch.yambms_1_auto_ccl_current_taper
state: "on"
row:
entity: sensor.yambms_1_auto_ccl_ct_bulk_amps
name: Bulk Amps
- type: conditional
conditions:
- entity: switch.yambms_1_auto_ccl_current_taper
state: "on"
row:
entity: number.yambms_1_auto_ccl_ct_balance_current
name: Balance Current
- type: weblink
url: >-
https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_functions.md#auto-ccl-current-taper
name: README
icon: mdi:book-open-variant
- type: grid
column_span: 1
cards:
- type: entities
entities:
- entity: switch.yambms_1_automatic_soc_limit
name: Automatic SoC Limit
- entity: number.yambms_1_auto_soc_limit
name: SoC Limit
- entity: number.yambms_1_auto_soc_limit_hysteresis
name: SoC Limit Hysteresis
- entity: select.yambms_1_auto_soc_limit_mode
name: Auto SoC Limit Mode
- entity: sensor.yambms_1_auto_soc_limit_status
name: Auto SoC Limit Status
- type: weblink
url: >-
https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_functions.md#auto-soc-limit
name: README
icon: mdi:book-open-variant
title: YamBMS - Auto SoC Limit
- type: entities
entities:
- entity: switch.yambms_1_automatic_eoc_current
name: Automatic EOC Current
- type: conditional
conditions:
- entity: switch.yambms_1_automatic_eoc_current
state: "on"
row:
entity: sensor.yambms_1_auto_eoc_status
name: Status
- type: conditional
conditions:
- entity: switch.yambms_1_automatic_eoc_current
state: "on"
row:
entity: sensor.yambms_1_auto_eoc_current
name: Required Current
- type: conditional
conditions:
- entity: switch.yambms_1_automatic_eoc_current
state: "on"
row:
entity: number.yambms_1_auto_eoc_start_hour
name: Start hour
- type: conditional
conditions:
- entity: switch.yambms_1_automatic_eoc_current
state: "on"
row:
entity: number.yambms_1_auto_eoc_start_minute
name: Start minute
- type: conditional
conditions:
- entity: switch.yambms_1_automatic_eoc_current
state: "on"
row:
entity: number.yambms_1_auto_eoc_target_hour
name: Target hour
- type: conditional
conditions:
- entity: switch.yambms_1_automatic_eoc_current
state: "on"
row:
entity: number.yambms_1_auto_eoc_target_minute
name: Target minute
- type: conditional
conditions:
- entity: switch.yambms_1_automatic_eoc_current
state: "on"
row:
entity: number.yambms_1_auto_eoc_correction
name: Current Correction
- type: conditional
conditions:
- entity: switch.yambms_1_automatic_eoc_current
state: "on"
row:
entity: number.yambms_1_auto_eoc_capacity_modifier
name: Capacity Modifier
- type: conditional
conditions:
- entity: switch.yambms_1_automatic_eoc_current
state: "on"
row:
entity: number.yambms_1_auto_eoc_increase_stop_hours
name: Stop hours
- type: conditional
conditions:
- entity: switch.yambms_1_automatic_eoc_current
state: "on"
row:
entity: number.yambms_1_auto_eoc_increase_stop_soc
name: Stop SoC
- type: weblink
url: >-
https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_functions.md#auto-eoc
name: README
icon: mdi:book-open-variant
title: YamBMS - Auto EOC
- title: Diagnostic
cards:
- type: entity-filter
entities:
- entity: sensor.yambms_board_debug_free_psram_percent
name: Debug Free PSRAM (%)
- entity: sensor.yambms_board_debug_free_psram
name: Debug Free PSRAM
- entity: sensor.yambms_board_debug_heap_free_percent
name: Debug Heap free (%)
- entity: sensor.yambms_board_debug_heap_free
name: Debug Heap free
- entity: sensor.yambms_board_debug_heap_max_block_percent
name: Debug Heap max block (%)
- entity: sensor.yambms_board_debug_heap_max_block
name: Debug Heap max block
- entity: sensor.yambms_board_debug_loop_time
name: Debug Loop time
- entity: sensor.yambms_board_debug_reset_reason
name: Debug Reset reason
- entity: sensor.yambms_board_uptime
name: Board Uptime
- entity: sensor.yambms_board_esphome_version
name: ESPHome version
- entity: button.yambms_board_restart
name: Board Restart
conditions:
- condition: state
state_not: unavailable
card:
title: YamBMS - Diagnostic
- type: entities
entities:
- entity: sensor.yambms_1_requested_charge_voltage
name: Requested Charge Voltage
- entity: sensor.yambms_1_requested_discharge_voltage
name: Requested Discharge Voltage
- entity: sensor.yambms_1_requested_charge_current
name: Requested Charge Current
- entity: sensor.yambms_1_requested_discharge_current
name: Requested Discharge Current
title: YamBMS - Requested Values
- type: entity-filter
entities:
- entity: binary_sensor.yambms_1_canbus_1_status
name: CANBUS Status
- entity: switch.yambms_1_canbus_1_inverter_heartbeat_monitoring
name: CANBUS Inverter Heartbeat Monitoring
- entity: sensor.yambms_1_canbus_1_inverter_heartbeat
name: CANBUS Inverter Heartbeat
- entity: binary_sensor.yambms_1_rs485_1_status
name: RS485 Status
- entity: switch.yambms_1_rs485_1_inverter_heartbeat_monitoring
name: RS485 Inverter Heartbeat Monitoring
- entity: sensor.yambms_1_rs485_1_inverter_heartbeat
name: RS485 Inverter Heartbeat
conditions:
- condition: state
state_not: unavailable
card:
title: YamBMS - Inverter Status & Heartbeat
type: masonry
type: sections
max_columns: 3
sections:
- type: grid
column_span: 1
cards:
- type: markdown
content: |-
{%- set raw = states('sensor.yambms_board_system_fault_data') %}
{%- set names = ['API / MQTT', 'BMS', 'CAN->INV', 'RS485->INV', 'Shunt', 'Balancer', 'Network', 'Aux 1', 'Cat 8', 'Cat 9', 'Cat 10', 'Cat 11', 'Cat 12', 'Cat 13', 'Cat 14', 'Cat 15'] %}
{%- if raw in ['unknown', 'unavailable', 'none', ''] %}
Initializing...
{%- else %}
{%- set data = raw | from_json %}
| Component | Instance status |
| :--- | :--- |
{%- for cat_idx in range(0, 16) %}
{%- if data | count > cat_idx and data[cat_idx] | count > 0 %}
{%- set ns = namespace(visual='') %}
{%- for inst in data[cat_idx] %}
{%- set icon = '❌' if inst == 1 else ('✅' if inst == 0 else '➖') %}
{%- set ns.visual = ns.visual ~ icon ~ ' ' %}
{%- endfor %}
| {{ names[cat_idx] }} | {{ ns.visual }} |
{%- endif %}
{%- endfor %}
{%- endif %}
title: 🚨 YamBMS - Fault status
- type: markdown
content: |2
<table>
<tr>
<td>Node ID hash</td>
<td>{{ states('sensor.yambms_board_node_id_hash') }}</td>
</tr>
<tr>
<td>MAC address</td>
<td>{{ states('sensor.yambms_board_mac_address') }}</td>
</tr>
<tr>
<td>IP address</td>
<td>{{ states('sensor.yambms_board_ip_address') }}</td>
</tr>
</table>
title: 🌐 YamBMS - Network
- type: grid
column_span: 1
cards:
- type: markdown
title: 🔍 YamBMS - Diagnostic
content: |2
<table>
<tr>
<td>Chip</td>
<td>{% set info = states('sensor.yambms_board_debug_device_info') %}{% if info not in ['unknown', 'unavailable', ''] and '|' in info %}{{ info.split('|')[1].split('Features:')[0].replace('Chip:', '').strip() }}{% else %}{{ info }}{% endif %}</td>
</tr>
<tr>
<td>Board</td>
<td>{{ states('sensor.yambms_board_board_name') }}</td>
</tr>
<tr>
<td>Board Uptime</td>
<td>{{ states('sensor.yambms_board_uptime') }}</td>
</tr>
<tr>
<td>Entities</td>
<td>{{ integration_entities(config_entry_attr(config_entry_id('sensor.yambms_board_uptime'), 'title')) | count }}</td>
</tr>
<tr>
<td>PSRAM</td>
<td>{% set psram = states('sensor.yambms_board_debug_free_psram') %}{% if psram|float(0) > 0 %}<font color="#4CAF50">Active — {{ states('sensor.yambms_board_debug_free_psram_percent')|float|round }} % free</font>{% else %}Not active{% endif %}</td>
</tr>
<tr>
<td>Debug Free PSRAM (%)</td>
<td>{{ states('sensor.yambms_board_debug_free_psram_percent')|float(0)|round }} %</td>
</tr>
<tr>
<td>Debug Free PSRAM</td>
<td>{{ states('sensor.yambms_board_debug_free_psram')|float(0)|round }} B</td>
</tr>
<tr>
<td>Debug Heap free (%)</td>
<td>{{ states('sensor.yambms_board_debug_heap_free_percent')|float(0)|round }} %</td>
</tr>
<tr>
<td>Debug Heap free</td>
<td>{{ states('sensor.yambms_board_debug_heap_free')|float(0)|round }} B</td>
</tr>
<tr>
<td>Debug Heap max block (%)</td>
<td>{{ states('sensor.yambms_board_debug_heap_max_block_percent')|float(0)|round }} %</td>
</tr>
<tr>
<td>Debug Heap max block</td>
<td>{{ states('sensor.yambms_board_debug_heap_max_block')|float(0)|round }} B</td>
</tr>
<tr>
<td>Debug Loop time</td>
<td>{{ states('sensor.yambms_board_debug_loop_time')|float(0)|round }} ms</td>
</tr>
<tr>
<td>Debug Reset reason</td>
<td>{{ states('sensor.yambms_board_debug_reset_reason') }}</td>
</tr>
<tr>
<td>YamBMS Running version</td>
<td>{{ states('sensor.yambms_1_running_version') }}</td>
</tr>
<tr>
<td>YamBMS Last version</td>
<td>{{ states('sensor.yambms_1_last_version') }}</td>
</tr>
<tr>
<td>ESPHome version</td>
<td>{{ states('sensor.yambms_board_esphome_version')[:9] }}</td>
</tr>
</table>
- type: grid
column_span: 1
cards:
- type: entity-filter
entities:
- entity: binary_sensor.yambms_1_canbus_1_status
name: CANBUS Status
- entity: switch.yambms_1_canbus_1_inverter_heartbeat_monitoring
name: CANBUS Inverter Heartbeat Monitoring
- entity: sensor.yambms_1_canbus_1_inverter_heartbeat
name: CANBUS Inverter Heartbeat
- entity: binary_sensor.yambms_1_rs485_1_status
name: RS485 Status
- entity: switch.yambms_1_rs485_1_inverter_heartbeat_monitoring
name: RS485 Inverter Heartbeat Monitoring
- entity: sensor.yambms_1_rs485_1_inverter_heartbeat
name: RS485 Inverter Heartbeat
conditions:
- condition: state
state_not: unavailable
card:
title: 💓 YamBMS - Inverter Status & Heartbeat
- type: entities
entities:
- entity: button.yambms_board_restart
name: Board Restart
show_header_toggle: false
- title: BMS
type: sections
max_columns: 3
@@ -1,5 +1,5 @@
# Updated : 2026.06.17
# Version : 1.7.0
# Updated : 2026.11.14
# Version : 1.8.2
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -25,7 +25,8 @@ views:
- type: grid
cards:
- type: heading
heading: YamBMS - Battery
heading: 🔋 YamBMS - Battery
heading_style: title
- graph: line
type: sensor
entity: sensor.yambms_1_total_voltage
@@ -125,7 +126,8 @@ views:
- type: grid
cards:
- type: heading
heading: YamBMS - Status
heading: 📟 YamBMS - Status
heading_style: title
- type: tile
entity: binary_sensor.yambms_1_inverter_communication_status
name: Inverter comm. status
@@ -190,7 +192,7 @@ views:
- type: grid
cards:
- type: heading
heading: YamBMS - Overview
heading: 📋 YamBMS - Overview
heading_style: title
- type: markdown
content: |-
@@ -232,7 +234,7 @@ views:
{% if is_state('switch.yambms_1_automatic_eoc_current','on') %}
<tr>
<td>Automatic EOC Current</td>
<td>{% set eoc_status = states('sensor.yambms_1_auto_eoc_status') %}{% set eoc_val %}{{ states('number.yambms_1_auto_eoc_target_hour') | int }}:{{ '%02d' % (states('number.yambms_1_auto_eoc_target_minute') | int) }} — {{ eoc_status }}{% endset %}{% if eoc_status.startswith('Stop:') %}<font color="#FFC107">{{ eoc_val }}</font>{% elif eoc_status.startswith('Run') %}<font color="#4CAF50">{{ eoc_val }}</font>{% else %}{{ eoc_val }}{% endif %}</td>
<td>{% set eoc_status = states('sensor.yambms_1_auto_eoc_status') %}{% set eoc_val %}{{ states('number.yambms_1_auto_eoc_start_hour') | int }}:{{ '%02d' % (states('number.yambms_1_auto_eoc_start_minute') | int) }}–{{ states('number.yambms_1_auto_eoc_target_hour') | int }}:{{ '%02d' % (states('number.yambms_1_auto_eoc_target_minute') | int) }} — {{ eoc_status }}{% endset %}{% if eoc_status.startswith('Stop:') %}<font color="#FFC107">{{ eoc_val }}</font>{% elif eoc_status.startswith('Run') %}<font color="#4CAF50">{{ eoc_val }}</font>{% else %}{{ eoc_val }}{% endif %}</td>
</tr>
{% endif %}
{% if is_state('switch.yambms_1_automatic_soc_limit','on') %}
@@ -258,15 +260,51 @@ views:
</tr>
</table>
- type: heading
heading: YamBMS - Diagnostic
heading: 🚨 YamBMS - Fault status
heading_style: title
- type: markdown
content: |-
{%- set raw = states('sensor.yambms_board_system_fault_data') %}
{%- set names = ['API / MQTT', 'BMS', 'CAN->INV', 'RS485->INV', 'Shunt', 'Balancer', 'Network', 'Aux 1', 'Cat 8', 'Cat 9', 'Cat 10', 'Cat 11', 'Cat 12', 'Cat 13', 'Cat 14', 'Cat 15'] %}
{%- if raw in ['unknown', 'unavailable', 'none', ''] %}
Initializing...
{%- else %}
{%- set data = raw | from_json %}
| Component | Instance status |
| :--- | :--- |
{%- for cat_idx in range(0, 16) %}
{%- if data | count > cat_idx and data[cat_idx] | count > 0 %}
{%- set ns = namespace(visual='') %}
{%- for inst in data[cat_idx] %}
{%- set icon = '❌' if inst == 1 else ('✅' if inst == 0 else '➖') %}
{%- set ns.visual = ns.visual ~ icon ~ ' ' %}
{%- endfor %}
| {{ names[cat_idx] }} | {{ ns.visual }} |
{%- endif %}
{%- endfor %}
{%- endif %}
- type: heading
heading: 🔍 YamBMS - Diagnostic
heading_style: title
- type: markdown
content: |2
<table>
<tr>
<td>Uptime</td>
<td>Chip</td>
<td>{% set info = states('sensor.yambms_board_debug_device_info') %}{% if info not in ['unknown', 'unavailable', ''] and '|' in info %}{{ info.split('|')[1].split('Features:')[0].replace('Chip:', '').strip() }}{% else %}{{ info }}{% endif %}</td>
</tr>
<tr>
<td>Board</td>
<td>{{ states('sensor.yambms_board_board_name') }}</td>
</tr>
<tr>
<td>Board Uptime</td>
<td>{{ states('sensor.yambms_board_uptime') }}</td>
</tr>
<tr>
<td>Entities</td>
<td>{{ integration_entities(config_entry_attr(config_entry_id('sensor.yambms_board_uptime'), 'title')) | count }}</td>
</tr>
<tr>
<td>Loop Time</td>
<td>{{ states('sensor.yambms_board_debug_loop_time')|float|round }} ms</td>
@@ -275,6 +313,10 @@ views:
<td>Heap Free Memory</td>
<td>{{ states('sensor.yambms_board_debug_heap_free_percent')|float|round }} %</td>
</tr>
<tr>
<td>PSRAM</td>
<td>{% set psram = states('sensor.yambms_board_debug_free_psram') %}{% if psram|float(0) > 0 %}<font color="#4CAF50">Active — {{ states('sensor.yambms_board_debug_free_psram_percent')|float|round }} % free</font>{% else %}Not active{% endif %}</td>
</tr>
<tr>
<td>YamBMS Running version</td>
<td>{{ states('sensor.yambms_1_running_version') }}</td>
@@ -285,224 +327,561 @@ views:
</tr>
<tr>
<td>ESPHome Version</td>
<td>{{ states('sensor.yambms_board_esphome_version')[:8] }}</td>
<td>{{ states('sensor.yambms_board_esphome_version')[:9] }}</td>
</tr>
</table>
- title: Settings
cards:
- type: entity-filter
entities:
- entity: select.yambms_1_canbus_1_yambms_name
name: CANBUS YamBMS name
- entity: select.yambms_1_canbus_1_yambms_protocol
name: CANBUS YamBMS protocol
- entity: select.yambms_1_rs485_1_yambms_protocol
name: RS485 YamBMS protocol
conditions:
- condition: state
state_not: unavailable
card:
title: YamBMS - Inverter Comm. Protocol
- type: entities
entities:
- entity: switch.yambms_1_charge_enabled
name: Charge enabled
- entity: switch.yambms_1_discharge_enabled
name: Discharge enabled
- entity: binary_sensor.yambms_1_charging_allowed
name: Charging allowed
- entity: binary_sensor.yambms_1_discharging_allowed
name: Discharging allowed
title: YamBMS - Charge / Discharge switch
show_header_toggle: false
- type: entities
entities:
- entity: sensor.yambms_1_charging_status
name: Charging Status
- entity: sensor.yambms_1_charging_instruction
name: Charging Instruction
- entity: switch.yambms_1_float_charge_enabled
name: Float charge enabled
- entity: switch.yambms_1_eoc_timer_enabled
name: EOC timer enabled
- entity: number.yambms_1_bulk_voltage
name: Bulk voltage
- entity: number.yambms_1_float_voltage
name: Float voltage
- entity: number.yambms_1_inverter_offset_v
name: Inverter Offset V.
title: YamBMS - Charging Settings
show_header_toggle: false
- type: entities
entities:
- entity: number.yambms_1_rebulk_soc
name: Rebulk SoC
- entity: number.yambms_1_rebulk_v
name: Rebulk V.
- entity: number.yambms_1_rebulk_days
name: Rebulk Days
- entity: switch.yambms_1_force_bulk
name: Force Bulk
title: YamBMS - ReBulk
- type: entities
entities:
- entity: number.yambms_1_max_requested_charge_current
name: Max charge current
- entity: number.yambms_1_max_requested_discharge_current
name: Max discharge current
- entity: switch.yambms_1_temperature_based_current_limitation
name: Temperature-based current limitation
- entity: sensor.yambms_1_ccl_derating_reason
name: CCL Derating Reason
- entity: sensor.yambms_1_dcl_derating_reason
name: DCL Derating Reason
title: YamBMS - Max requested current
- type: entities
entities:
- entity: switch.yambms_1_request_force_charge
name: Request force charge
- entity: number.yambms_1_request_force_charge_start_soc
name: Force charge Start SoC
- entity: number.yambms_1_request_force_charge_stop_soc
name: Force charge Stop SoC
- entity: binary_sensor.yambms_1_requested_force_charge
name: Requested Force Charge
title: YamBMS - Request force charge
- type: entities
entities:
- entity: sensor.yambms_1_requested_charge_voltage
name: Requested Charge Voltage
- entity: sensor.yambms_1_requested_discharge_voltage
name: Requested Discharge Voltage
- entity: sensor.yambms_1_requested_charge_current
name: Requested Charge Current
- entity: sensor.yambms_1_requested_discharge_current
name: Requested Discharge Current
title: YamBMS - Requested Values
type: sections
max_columns: 3
sections:
- type: grid
column_span: 1
cards:
- type: entity-filter
entities:
- entity: select.yambms_1_canbus_1_inverter_brand
name: CANBUS 1 Inverter brand
- entity: select.yambms_1_canbus_1_protocol
name: CANBUS 1 Protocol
- entity: select.yambms_1_canbus_2_inverter_brand
name: CANBUS 2 Inverter brand
- entity: select.yambms_1_canbus_2_protocol
name: CANBUS 2 Protocol
- entity: select.yambms_1_canbus_3_inverter_brand
name: CANBUS 3 Inverter brand
- entity: select.yambms_1_canbus_3_protocol
name: CANBUS 3 Protocol
- entity: select.yambms_1_rs485_1_inverter_brand
name: RS485 1 Inverter brand
- entity: select.yambms_1_rs485_1_protocol
name: RS485 1 Protocol
- entity: select.yambms_1_rs485_2_inverter_brand
name: RS485 2 Inverter brand
- entity: select.yambms_1_rs485_2_protocol
name: RS485 2 Protocol
- entity: select.yambms_1_rs485_3_inverter_brand
name: RS485 3 Inverter brand
- entity: select.yambms_1_rs485_3_protocol
name: RS485 3 Protocol
conditions:
- condition: state
state_not: unavailable
card:
title: YamBMS - Inverter protocol
- type: markdown
title: YamBMS - Inverter active protocol
content: |-
{% set links = [
('CANBUS 1', 'sensor.yambms_1_canbus_1_inverter_link_protocol', 'binary_sensor.yambms_1_canbus_1_status'),
('CANBUS 2', 'sensor.yambms_1_canbus_2_inverter_link_protocol', 'binary_sensor.yambms_1_canbus_2_status'),
('CANBUS 3', 'sensor.yambms_1_canbus_3_inverter_link_protocol', 'binary_sensor.yambms_1_canbus_3_status'),
('RS485 1', 'sensor.yambms_1_rs485_1_inverter_link_protocol', 'binary_sensor.yambms_1_rs485_1_status'),
('RS485 2', 'sensor.yambms_1_rs485_2_inverter_link_protocol', 'binary_sensor.yambms_1_rs485_2_status'),
('RS485 3', 'sensor.yambms_1_rs485_3_inverter_link_protocol', 'binary_sensor.yambms_1_rs485_3_status') ] %}
{%- for label, e, s in links %}
{%- set p = states(e) %}
{%- if p not in ['unknown', 'unavailable'] %}
{%- set m = states(e | replace('inverter_link_protocol', 'inverter_battery_mode')) %}
{%- set n = states(e | replace('inverter_link_protocol', 'note')) %}
{%- set st = states(s) %}
{%- set link = label ~ (' - ON' if st == 'on' else (' - OFF' if st == 'off' else '')) %}
**{{ link }} :**
* {{ p }}
{%- if m not in ['unknown', 'unavailable', ''] %}
{%- if m == 'See inverter manual' %}
* {{ m }}
{%- else %}
* Set your inverter battery mode to **{{ m }}**
{%- endif %}
{%- endif %}
{%- if n not in ['unknown', 'unavailable', ''] %}
* {{ n }}
{%- endif %}
{%- endif %}
{%- endfor %}
- type: entities
entities:
- entity: switch.yambms_1_charge_enabled
name: Charge enabled
- entity: switch.yambms_1_discharge_enabled
name: Discharge enabled
- entity: binary_sensor.yambms_1_charging_allowed
name: Charging allowed
- entity: binary_sensor.yambms_1_discharging_allowed
name: Discharging allowed
title: YamBMS - Charge / Discharge switch
show_header_toggle: false
- type: entities
entities:
- entity: switch.yambms_1_request_force_charge
name:
type: entity
- entity: number.yambms_1_request_force_charge_start_soc
name: Start SoC
- entity: number.yambms_1_request_force_charge_stop_soc
name: Stop SoC
- entity: binary_sensor.yambms_1_requested_force_charge
name:
type: entity
- type: weblink
url: >-
https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_functions.md#request-force-charge
name: README
icon: mdi:book-open-variant
title: YamBMS - Request force charge
- type: grid
column_span: 1
cards:
- type: entities
entities:
- entity: sensor.yambms_1_charging_status
name:
type: entity
- entity: sensor.yambms_1_charging_instruction
name:
type: entity
- entity: switch.yambms_1_float_charge_enabled
name:
type: entity
- entity: switch.yambms_1_eoc_timer_enabled
name:
type: entity
- entity: number.yambms_1_bulk_voltage
name:
type: entity
- entity: number.yambms_1_float_voltage
name:
type: entity
- entity: number.yambms_1_charger_offset_v
name:
type: entity
- entity: select.yambms_1_cut_off_cell_voltage
name:
type: entity
- type: weblink
url: >-
https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_functions.md#charging-settings
name: README
icon: mdi:book-open-variant
title: YamBMS - Charging Settings
show_header_toggle: false
- type: entities
entities:
- entity: sensor.yambms_1_requested_charge_voltage
name: Requested Charge Voltage
- entity: sensor.yambms_1_requested_discharge_voltage
name: Requested Discharge Voltage
- entity: sensor.yambms_1_requested_charge_current
name: Requested Charge Current
- entity: sensor.yambms_1_requested_discharge_current
name: Requested Discharge Current
- type: weblink
url: >-
https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_functions.md#requested-values
name: README
icon: mdi:book-open-variant
title: YamBMS - Requested Values
- type: grid
column_span: 1
cards:
- type: entities
entities:
- entity: number.yambms_1_max_requested_charge_current
name: Max charge current
- entity: number.yambms_1_max_requested_discharge_current
name: Max discharge current
- entity: number.yambms_1_max_charge_c_rate
name:
type: entity
- entity: number.yambms_1_max_discharge_c_rate
name:
type: entity
- entity: switch.yambms_1_temperature_based_current_limitation
name:
type: entity
- entity: sensor.yambms_1_ccl_derating_reason
name:
type: entity
- entity: sensor.yambms_1_dcl_derating_reason
name:
type: entity
- type: weblink
url: >-
https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_functions.md#max-requested-current
name: README
icon: mdi:book-open-variant
title: YamBMS - Max requested current
- type: entities
entities:
- entity: number.yambms_1_rebulk_soc
name:
type: entity
- entity: number.yambms_1_rebulk_v
name:
type: entity
- entity: number.yambms_1_rebulk_days
name:
type: entity
- entity: switch.yambms_1_force_bulk
name:
type: entity
- type: weblink
url: >-
https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_functions.md#rebulk
name: README
icon: mdi:book-open-variant
title: YamBMS - ReBulk
- title: Auto Functions
cards:
- type: entities
entities:
- entity: switch.yambms_1_automatic_charge_voltage
name: Automatic Charge Voltage
- entity: number.yambms_1_auto_cvl_boost_charge_v
name: Auto CVL Boost Charge V.
title: YamBMS - Auto CVL
- type: entities
entities:
- entity: select.yambms_1_automatic_float_voltage
name: Automatic Float Voltage
- entity: sensor.yambms_1_auto_float_voltage
name: Auto Float Voltage
- entity: number.yambms_1_auto_float_update_interval
name: Update Interval
- entity: number.yambms_1_auto_float_voltage_step
name: Voltage Step
title: YamBMS - Auto Float
- type: entities
entities:
- entity: switch.yambms_1_automatic_charge_current
name: Automatic Charge Current
- entity: switch.yambms_1_automatic_discharge_current
name: Automatic Discharge Current
title: YamBMS - Auto CCL / DCL
show_header_toggle: false
- type: entities
entities:
- entity: switch.yambms_1_automatic_soc_limit
name: Automatic SoC Limit
- entity: number.yambms_1_auto_soc_limit
name: SoC Limit
- entity: number.yambms_1_auto_soc_limit_hysteresis
name: SoC Limit Hysteresis
- entity: select.yambms_1_auto_soc_limit_mode
name: Auto SoC Limit Mode
- entity: sensor.yambms_1_auto_soc_limit_status
name: Auto SoC Limit Status
title: YamBMS - Auto SoC Limit
- type: entities
entities:
- entity: switch.yambms_1_automatic_eoc_current
name: Automatic EOC Current
- entity: sensor.yambms_1_auto_eoc_status
name: Status
- entity: sensor.yambms_1_auto_eoc_current
name: Required Current
- entity: number.yambms_1_auto_eoc_target_hour
name: Target hour
- entity: number.yambms_1_auto_eoc_target_minute
name: Target minute
- entity: number.yambms_1_auto_eoc_correction
name: Current Correction
- entity: number.yambms_1_auto_eoc_capacity_modifier
name: Capacity Modifier
- entity: number.yambms_1_auto_eoc_increase_stop_hours
name: Stop hours
- entity: number.yambms_1_auto_eoc_increase_stop_soc
name: Stop SoC
title: YamBMS - Auto EOC
type: sections
max_columns: 3
sections:
- type: grid
column_span: 1
cards:
- type: entities
entities:
- entity: switch.yambms_1_automatic_charge_voltage
name: Automatic Charge Voltage
- entity: number.yambms_1_auto_cvl_boost_charge_v
name: Auto CVL Boost Charge V.
- type: weblink
url: >-
https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_functions.md#auto-cvl
name: README
icon: mdi:book-open-variant
title: YamBMS - Auto CVL
- type: entities
entities:
- entity: select.yambms_1_automatic_float_voltage
name: Automatic Float Voltage
- entity: sensor.yambms_1_auto_float_voltage
name: Auto Float Voltage
- entity: number.yambms_1_auto_float_update_interval
name: Update Interval
- entity: number.yambms_1_auto_float_voltage_step
name: Voltage Step
- type: weblink
url: >-
https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_functions.md#auto-float-voltage
name: README
icon: mdi:book-open-variant
title: YamBMS - Auto Float Voltage
- type: grid
column_span: 1
cards:
- type: entities
entities:
- entity: switch.yambms_1_automatic_charge_current
name: Automatic Charge Current
- entity: switch.yambms_1_automatic_discharge_current
name: Automatic Discharge Current
- type: weblink
url: >-
https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_functions.md#auto-ccl--dcl
name: README
icon: mdi:book-open-variant
title: YamBMS - Auto CCL / DCL
show_header_toggle: false
- type: entities
title: Auto CCL - Current Taper
show_header_toggle: false
entities:
- entity: switch.yambms_1_auto_ccl_current_taper
name: Current Taper
- type: conditional
conditions:
- entity: switch.yambms_1_auto_ccl_current_taper
state: "on"
row:
entity: number.yambms_1_auto_ccl_ct_knee_voltage
name: Knee Voltage
- type: conditional
conditions:
- entity: switch.yambms_1_auto_ccl_current_taper
state: "on"
row:
entity: number.yambms_1_auto_ccl_ct_knee_c_rate
name: Knee C-Rate
- type: conditional
conditions:
- entity: switch.yambms_1_auto_ccl_current_taper
state: "on"
row:
entity: sensor.yambms_1_auto_ccl_ct_knee_amps
name: Knee Amps
- type: conditional
conditions:
- entity: switch.yambms_1_auto_ccl_current_taper
state: "on"
row:
entity: number.yambms_1_auto_ccl_ct_bulk_c_rate
name: Bulk C-Rate
- type: conditional
conditions:
- entity: switch.yambms_1_auto_ccl_current_taper
state: "on"
row:
entity: sensor.yambms_1_auto_ccl_ct_bulk_amps
name: Bulk Amps
- type: conditional
conditions:
- entity: switch.yambms_1_auto_ccl_current_taper
state: "on"
row:
entity: number.yambms_1_auto_ccl_ct_balance_current
name: Balance Current
- type: weblink
url: >-
https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_functions.md#auto-ccl-current-taper
name: README
icon: mdi:book-open-variant
- type: grid
column_span: 1
cards:
- type: entities
entities:
- entity: switch.yambms_1_automatic_soc_limit
name: Automatic SoC Limit
- entity: number.yambms_1_auto_soc_limit
name: SoC Limit
- entity: number.yambms_1_auto_soc_limit_hysteresis
name: SoC Limit Hysteresis
- entity: select.yambms_1_auto_soc_limit_mode
name: Auto SoC Limit Mode
- entity: sensor.yambms_1_auto_soc_limit_status
name: Auto SoC Limit Status
- type: weblink
url: >-
https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_functions.md#auto-soc-limit
name: README
icon: mdi:book-open-variant
title: YamBMS - Auto SoC Limit
- type: entities
entities:
- entity: switch.yambms_1_automatic_eoc_current
name: Automatic EOC Current
- type: conditional
conditions:
- entity: switch.yambms_1_automatic_eoc_current
state: "on"
row:
entity: sensor.yambms_1_auto_eoc_status
name: Status
- type: conditional
conditions:
- entity: switch.yambms_1_automatic_eoc_current
state: "on"
row:
entity: sensor.yambms_1_auto_eoc_current
name: Required Current
- type: conditional
conditions:
- entity: switch.yambms_1_automatic_eoc_current
state: "on"
row:
entity: number.yambms_1_auto_eoc_start_hour
name: Start hour
- type: conditional
conditions:
- entity: switch.yambms_1_automatic_eoc_current
state: "on"
row:
entity: number.yambms_1_auto_eoc_start_minute
name: Start minute
- type: conditional
conditions:
- entity: switch.yambms_1_automatic_eoc_current
state: "on"
row:
entity: number.yambms_1_auto_eoc_target_hour
name: Target hour
- type: conditional
conditions:
- entity: switch.yambms_1_automatic_eoc_current
state: "on"
row:
entity: number.yambms_1_auto_eoc_target_minute
name: Target minute
- type: conditional
conditions:
- entity: switch.yambms_1_automatic_eoc_current
state: "on"
row:
entity: number.yambms_1_auto_eoc_correction
name: Current Correction
- type: conditional
conditions:
- entity: switch.yambms_1_automatic_eoc_current
state: "on"
row:
entity: number.yambms_1_auto_eoc_capacity_modifier
name: Capacity Modifier
- type: conditional
conditions:
- entity: switch.yambms_1_automatic_eoc_current
state: "on"
row:
entity: number.yambms_1_auto_eoc_increase_stop_hours
name: Stop hours
- type: conditional
conditions:
- entity: switch.yambms_1_automatic_eoc_current
state: "on"
row:
entity: number.yambms_1_auto_eoc_increase_stop_soc
name: Stop SoC
- type: weblink
url: >-
https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_functions.md#auto-eoc
name: README
icon: mdi:book-open-variant
title: YamBMS - Auto EOC
- title: Diagnostic
cards:
- type: entity-filter
entities:
- entity: sensor.yambms_board_debug_free_psram_percent
name: Debug Free PSRAM (%)
- entity: sensor.yambms_board_debug_free_psram
name: Debug Free PSRAM
- entity: sensor.yambms_board_debug_heap_free_percent
name: Debug Heap free (%)
- entity: sensor.yambms_board_debug_heap_free
name: Debug Heap free
- entity: sensor.yambms_board_debug_heap_max_block_percent
name: Debug Heap max block (%)
- entity: sensor.yambms_board_debug_heap_max_block
name: Debug Heap max block
- entity: sensor.yambms_board_debug_loop_time
name: Debug Loop time
- entity: sensor.yambms_board_debug_reset_reason
name: Debug Reset reason
- entity: sensor.yambms_board_uptime
name: Board Uptime
- entity: sensor.yambms_board_esphome_version
name: ESPHome version
- entity: button.yambms_board_restart
name: Board Restart
conditions:
- condition: state
state_not: unavailable
card:
title: YamBMS - Diagnostic
- type: entities
entities:
- entity: sensor.yambms_1_requested_charge_voltage
name: Requested Charge Voltage
- entity: sensor.yambms_1_requested_discharge_voltage
name: Requested Discharge Voltage
- entity: sensor.yambms_1_requested_charge_current
name: Requested Charge Current
- entity: sensor.yambms_1_requested_discharge_current
name: Requested Discharge Current
title: YamBMS - Requested Values
- type: entity-filter
entities:
- entity: binary_sensor.yambms_1_canbus_1_status
name: CANBUS Status
- entity: switch.yambms_1_canbus_1_inverter_heartbeat_monitoring
name: CANBUS Inverter Heartbeat Monitoring
- entity: sensor.yambms_1_canbus_1_inverter_heartbeat
name: CANBUS Inverter Heartbeat
- entity: binary_sensor.yambms_1_rs485_1_status
name: RS485 Status
- entity: switch.yambms_1_rs485_1_inverter_heartbeat_monitoring
name: RS485 Inverter Heartbeat Monitoring
- entity: sensor.yambms_1_rs485_1_inverter_heartbeat
name: RS485 Inverter Heartbeat
conditions:
- condition: state
state_not: unavailable
card:
title: YamBMS - Inverter Status & Heartbeat
type: masonry
type: sections
max_columns: 3
sections:
- type: grid
column_span: 1
cards:
- type: markdown
content: |-
{%- set raw = states('sensor.yambms_board_system_fault_data') %}
{%- set names = ['API / MQTT', 'BMS', 'CAN->INV', 'RS485->INV', 'Shunt', 'Balancer', 'Network', 'Aux 1', 'Cat 8', 'Cat 9', 'Cat 10', 'Cat 11', 'Cat 12', 'Cat 13', 'Cat 14', 'Cat 15'] %}
{%- if raw in ['unknown', 'unavailable', 'none', ''] %}
Initializing...
{%- else %}
{%- set data = raw | from_json %}
| Component | Instance status |
| :--- | :--- |
{%- for cat_idx in range(0, 16) %}
{%- if data | count > cat_idx and data[cat_idx] | count > 0 %}
{%- set ns = namespace(visual='') %}
{%- for inst in data[cat_idx] %}
{%- set icon = '❌' if inst == 1 else ('✅' if inst == 0 else '➖') %}
{%- set ns.visual = ns.visual ~ icon ~ ' ' %}
{%- endfor %}
| {{ names[cat_idx] }} | {{ ns.visual }} |
{%- endif %}
{%- endfor %}
{%- endif %}
title: 🚨 YamBMS - Fault status
- type: markdown
content: |2
<table>
<tr>
<td>Node ID hash</td>
<td>{{ states('sensor.yambms_board_node_id_hash') }}</td>
</tr>
<tr>
<td>MAC address</td>
<td>{{ states('sensor.yambms_board_mac_address') }}</td>
</tr>
<tr>
<td>IP address</td>
<td>{{ states('sensor.yambms_board_ip_address') }}</td>
</tr>
</table>
title: 🌐 YamBMS - Network
- type: grid
column_span: 1
cards:
- type: markdown
title: 🔍 YamBMS - Diagnostic
content: |2
<table>
<tr>
<td>Chip</td>
<td>{% set info = states('sensor.yambms_board_debug_device_info') %}{% if info not in ['unknown', 'unavailable', ''] and '|' in info %}{{ info.split('|')[1].split('Features:')[0].replace('Chip:', '').strip() }}{% else %}{{ info }}{% endif %}</td>
</tr>
<tr>
<td>Board</td>
<td>{{ states('sensor.yambms_board_board_name') }}</td>
</tr>
<tr>
<td>Board Uptime</td>
<td>{{ states('sensor.yambms_board_uptime') }}</td>
</tr>
<tr>
<td>Entities</td>
<td>{{ integration_entities(config_entry_attr(config_entry_id('sensor.yambms_board_uptime'), 'title')) | count }}</td>
</tr>
<tr>
<td>PSRAM</td>
<td>{% set psram = states('sensor.yambms_board_debug_free_psram') %}{% if psram|float(0) > 0 %}<font color="#4CAF50">Active — {{ states('sensor.yambms_board_debug_free_psram_percent')|float|round }} % free</font>{% else %}Not active{% endif %}</td>
</tr>
<tr>
<td>Debug Free PSRAM (%)</td>
<td>{{ states('sensor.yambms_board_debug_free_psram_percent')|float(0)|round }} %</td>
</tr>
<tr>
<td>Debug Free PSRAM</td>
<td>{{ states('sensor.yambms_board_debug_free_psram')|float(0)|round }} B</td>
</tr>
<tr>
<td>Debug Heap free (%)</td>
<td>{{ states('sensor.yambms_board_debug_heap_free_percent')|float(0)|round }} %</td>
</tr>
<tr>
<td>Debug Heap free</td>
<td>{{ states('sensor.yambms_board_debug_heap_free')|float(0)|round }} B</td>
</tr>
<tr>
<td>Debug Heap max block (%)</td>
<td>{{ states('sensor.yambms_board_debug_heap_max_block_percent')|float(0)|round }} %</td>
</tr>
<tr>
<td>Debug Heap max block</td>
<td>{{ states('sensor.yambms_board_debug_heap_max_block')|float(0)|round }} B</td>
</tr>
<tr>
<td>Debug Loop time</td>
<td>{{ states('sensor.yambms_board_debug_loop_time')|float(0)|round }} ms</td>
</tr>
<tr>
<td>Debug Reset reason</td>
<td>{{ states('sensor.yambms_board_debug_reset_reason') }}</td>
</tr>
<tr>
<td>YamBMS Running version</td>
<td>{{ states('sensor.yambms_1_running_version') }}</td>
</tr>
<tr>
<td>YamBMS Last version</td>
<td>{{ states('sensor.yambms_1_last_version') }}</td>
</tr>
<tr>
<td>ESPHome version</td>
<td>{{ states('sensor.yambms_board_esphome_version')[:9] }}</td>
</tr>
</table>
- type: grid
column_span: 1
cards:
- type: entity-filter
entities:
- entity: binary_sensor.yambms_1_canbus_1_status
name: CANBUS Status
- entity: switch.yambms_1_canbus_1_inverter_heartbeat_monitoring
name: CANBUS Inverter Heartbeat Monitoring
- entity: sensor.yambms_1_canbus_1_inverter_heartbeat
name: CANBUS Inverter Heartbeat
- entity: binary_sensor.yambms_1_rs485_1_status
name: RS485 Status
- entity: switch.yambms_1_rs485_1_inverter_heartbeat_monitoring
name: RS485 Inverter Heartbeat Monitoring
- entity: sensor.yambms_1_rs485_1_inverter_heartbeat
name: RS485 Inverter Heartbeat
conditions:
- condition: state
state_not: unavailable
card:
title: 💓 YamBMS - Inverter Status & Heartbeat
- type: entities
entities:
- entity: button.yambms_board_restart
name: Board Restart
show_header_toggle: false
- title: BMS
type: sections
max_columns: 3
@@ -1,5 +1,5 @@
# Updated : 2026.06.17
# Version : 1.7.0
# Updated : 2026.11.14
# Version : 1.8.2
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -25,7 +25,8 @@ views:
- type: grid
cards:
- type: heading
heading: YamBMS - Battery
heading: 🔋 YamBMS - Battery
heading_style: title
- graph: line
type: sensor
entity: sensor.yambms_1_total_voltage
@@ -125,7 +126,8 @@ views:
- type: grid
cards:
- type: heading
heading: YamBMS - Status
heading: 📟 YamBMS - Status
heading_style: title
- type: tile
entity: binary_sensor.yambms_1_inverter_communication_status
name: Inverter comm. status
@@ -190,7 +192,7 @@ views:
- type: grid
cards:
- type: heading
heading: YamBMS - Overview
heading: 📋 YamBMS - Overview
heading_style: title
- type: markdown
content: |-
@@ -232,7 +234,7 @@ views:
{% if is_state('switch.yambms_1_automatic_eoc_current','on') %}
<tr>
<td>Automatic EOC Current</td>
<td>{% set eoc_status = states('sensor.yambms_1_auto_eoc_status') %}{% set eoc_val %}{{ states('number.yambms_1_auto_eoc_target_hour') | int }}:{{ '%02d' % (states('number.yambms_1_auto_eoc_target_minute') | int) }} — {{ eoc_status }}{% endset %}{% if eoc_status.startswith('Stop:') %}<font color="#FFC107">{{ eoc_val }}</font>{% elif eoc_status.startswith('Run') %}<font color="#4CAF50">{{ eoc_val }}</font>{% else %}{{ eoc_val }}{% endif %}</td>
<td>{% set eoc_status = states('sensor.yambms_1_auto_eoc_status') %}{% set eoc_val %}{{ states('number.yambms_1_auto_eoc_start_hour') | int }}:{{ '%02d' % (states('number.yambms_1_auto_eoc_start_minute') | int) }}–{{ states('number.yambms_1_auto_eoc_target_hour') | int }}:{{ '%02d' % (states('number.yambms_1_auto_eoc_target_minute') | int) }} — {{ eoc_status }}{% endset %}{% if eoc_status.startswith('Stop:') %}<font color="#FFC107">{{ eoc_val }}</font>{% elif eoc_status.startswith('Run') %}<font color="#4CAF50">{{ eoc_val }}</font>{% else %}{{ eoc_val }}{% endif %}</td>
</tr>
{% endif %}
{% if is_state('switch.yambms_1_automatic_soc_limit','on') %}
@@ -258,15 +260,51 @@ views:
</tr>
</table>
- type: heading
heading: YamBMS - Diagnostic
heading: 🚨 YamBMS - Fault status
heading_style: title
- type: markdown
content: |-
{%- set raw = states('sensor.yambms_board_system_fault_data') %}
{%- set names = ['API / MQTT', 'BMS', 'CAN->INV', 'RS485->INV', 'Shunt', 'Balancer', 'Network', 'Aux 1', 'Cat 8', 'Cat 9', 'Cat 10', 'Cat 11', 'Cat 12', 'Cat 13', 'Cat 14', 'Cat 15'] %}
{%- if raw in ['unknown', 'unavailable', 'none', ''] %}
Initializing...
{%- else %}
{%- set data = raw | from_json %}
| Component | Instance status |
| :--- | :--- |
{%- for cat_idx in range(0, 16) %}
{%- if data | count > cat_idx and data[cat_idx] | count > 0 %}
{%- set ns = namespace(visual='') %}
{%- for inst in data[cat_idx] %}
{%- set icon = '❌' if inst == 1 else ('✅' if inst == 0 else '➖') %}
{%- set ns.visual = ns.visual ~ icon ~ ' ' %}
{%- endfor %}
| {{ names[cat_idx] }} | {{ ns.visual }} |
{%- endif %}
{%- endfor %}
{%- endif %}
- type: heading
heading: 🔍 YamBMS - Diagnostic
heading_style: title
- type: markdown
content: |2
<table>
<tr>
<td>Uptime</td>
<td>Chip</td>
<td>{% set info = states('sensor.yambms_board_debug_device_info') %}{% if info not in ['unknown', 'unavailable', ''] and '|' in info %}{{ info.split('|')[1].split('Features:')[0].replace('Chip:', '').strip() }}{% else %}{{ info }}{% endif %}</td>
</tr>
<tr>
<td>Board</td>
<td>{{ states('sensor.yambms_board_board_name') }}</td>
</tr>
<tr>
<td>Board Uptime</td>
<td>{{ states('sensor.yambms_board_uptime') }}</td>
</tr>
<tr>
<td>Entities</td>
<td>{{ integration_entities(config_entry_attr(config_entry_id('sensor.yambms_board_uptime'), 'title')) | count }}</td>
</tr>
<tr>
<td>Loop Time</td>
<td>{{ states('sensor.yambms_board_debug_loop_time')|float|round }} ms</td>
@@ -275,6 +313,10 @@ views:
<td>Heap Free Memory</td>
<td>{{ states('sensor.yambms_board_debug_heap_free_percent')|float|round }} %</td>
</tr>
<tr>
<td>PSRAM</td>
<td>{% set psram = states('sensor.yambms_board_debug_free_psram') %}{% if psram|float(0) > 0 %}<font color="#4CAF50">Active — {{ states('sensor.yambms_board_debug_free_psram_percent')|float|round }} % free</font>{% else %}Not active{% endif %}</td>
</tr>
<tr>
<td>YamBMS Running version</td>
<td>{{ states('sensor.yambms_1_running_version') }}</td>
@@ -285,224 +327,561 @@ views:
</tr>
<tr>
<td>ESPHome Version</td>
<td>{{ states('sensor.yambms_board_esphome_version')[:8] }}</td>
<td>{{ states('sensor.yambms_board_esphome_version')[:9] }}</td>
</tr>
</table>
- title: Settings
cards:
- type: entity-filter
entities:
- entity: select.yambms_1_canbus_1_yambms_name
name: CANBUS YamBMS name
- entity: select.yambms_1_canbus_1_yambms_protocol
name: CANBUS YamBMS protocol
- entity: select.yambms_1_rs485_1_yambms_protocol
name: RS485 YamBMS protocol
conditions:
- condition: state
state_not: unavailable
card:
title: YamBMS - Inverter Comm. Protocol
- type: entities
entities:
- entity: switch.yambms_1_charge_enabled
name: Charge enabled
- entity: switch.yambms_1_discharge_enabled
name: Discharge enabled
- entity: binary_sensor.yambms_1_charging_allowed
name: Charging allowed
- entity: binary_sensor.yambms_1_discharging_allowed
name: Discharging allowed
title: YamBMS - Charge / Discharge switch
show_header_toggle: false
- type: entities
entities:
- entity: sensor.yambms_1_charging_status
name: Charging Status
- entity: sensor.yambms_1_charging_instruction
name: Charging Instruction
- entity: switch.yambms_1_float_charge_enabled
name: Float charge enabled
- entity: switch.yambms_1_eoc_timer_enabled
name: EOC timer enabled
- entity: number.yambms_1_bulk_voltage
name: Bulk voltage
- entity: number.yambms_1_float_voltage
name: Float voltage
- entity: number.yambms_1_inverter_offset_v
name: Inverter Offset V.
title: YamBMS - Charging Settings
show_header_toggle: false
- type: entities
entities:
- entity: number.yambms_1_rebulk_soc
name: Rebulk SoC
- entity: number.yambms_1_rebulk_v
name: Rebulk V.
- entity: number.yambms_1_rebulk_days
name: Rebulk Days
- entity: switch.yambms_1_force_bulk
name: Force Bulk
title: YamBMS - ReBulk
- type: entities
entities:
- entity: number.yambms_1_max_requested_charge_current
name: Max charge current
- entity: number.yambms_1_max_requested_discharge_current
name: Max discharge current
- entity: switch.yambms_1_temperature_based_current_limitation
name: Temperature-based current limitation
- entity: sensor.yambms_1_ccl_derating_reason
name: CCL Derating Reason
- entity: sensor.yambms_1_dcl_derating_reason
name: DCL Derating Reason
title: YamBMS - Max requested current
- type: entities
entities:
- entity: switch.yambms_1_request_force_charge
name: Request force charge
- entity: number.yambms_1_request_force_charge_start_soc
name: Force charge Start SoC
- entity: number.yambms_1_request_force_charge_stop_soc
name: Force charge Stop SoC
- entity: binary_sensor.yambms_1_requested_force_charge
name: Requested Force Charge
title: YamBMS - Request force charge
- type: entities
entities:
- entity: sensor.yambms_1_requested_charge_voltage
name: Requested Charge Voltage
- entity: sensor.yambms_1_requested_discharge_voltage
name: Requested Discharge Voltage
- entity: sensor.yambms_1_requested_charge_current
name: Requested Charge Current
- entity: sensor.yambms_1_requested_discharge_current
name: Requested Discharge Current
title: YamBMS - Requested Values
type: sections
max_columns: 3
sections:
- type: grid
column_span: 1
cards:
- type: entity-filter
entities:
- entity: select.yambms_1_canbus_1_inverter_brand
name: CANBUS 1 Inverter brand
- entity: select.yambms_1_canbus_1_protocol
name: CANBUS 1 Protocol
- entity: select.yambms_1_canbus_2_inverter_brand
name: CANBUS 2 Inverter brand
- entity: select.yambms_1_canbus_2_protocol
name: CANBUS 2 Protocol
- entity: select.yambms_1_canbus_3_inverter_brand
name: CANBUS 3 Inverter brand
- entity: select.yambms_1_canbus_3_protocol
name: CANBUS 3 Protocol
- entity: select.yambms_1_rs485_1_inverter_brand
name: RS485 1 Inverter brand
- entity: select.yambms_1_rs485_1_protocol
name: RS485 1 Protocol
- entity: select.yambms_1_rs485_2_inverter_brand
name: RS485 2 Inverter brand
- entity: select.yambms_1_rs485_2_protocol
name: RS485 2 Protocol
- entity: select.yambms_1_rs485_3_inverter_brand
name: RS485 3 Inverter brand
- entity: select.yambms_1_rs485_3_protocol
name: RS485 3 Protocol
conditions:
- condition: state
state_not: unavailable
card:
title: YamBMS - Inverter protocol
- type: markdown
title: YamBMS - Inverter active protocol
content: |-
{% set links = [
('CANBUS 1', 'sensor.yambms_1_canbus_1_inverter_link_protocol', 'binary_sensor.yambms_1_canbus_1_status'),
('CANBUS 2', 'sensor.yambms_1_canbus_2_inverter_link_protocol', 'binary_sensor.yambms_1_canbus_2_status'),
('CANBUS 3', 'sensor.yambms_1_canbus_3_inverter_link_protocol', 'binary_sensor.yambms_1_canbus_3_status'),
('RS485 1', 'sensor.yambms_1_rs485_1_inverter_link_protocol', 'binary_sensor.yambms_1_rs485_1_status'),
('RS485 2', 'sensor.yambms_1_rs485_2_inverter_link_protocol', 'binary_sensor.yambms_1_rs485_2_status'),
('RS485 3', 'sensor.yambms_1_rs485_3_inverter_link_protocol', 'binary_sensor.yambms_1_rs485_3_status') ] %}
{%- for label, e, s in links %}
{%- set p = states(e) %}
{%- if p not in ['unknown', 'unavailable'] %}
{%- set m = states(e | replace('inverter_link_protocol', 'inverter_battery_mode')) %}
{%- set n = states(e | replace('inverter_link_protocol', 'note')) %}
{%- set st = states(s) %}
{%- set link = label ~ (' - ON' if st == 'on' else (' - OFF' if st == 'off' else '')) %}
**{{ link }} :**
* {{ p }}
{%- if m not in ['unknown', 'unavailable', ''] %}
{%- if m == 'See inverter manual' %}
* {{ m }}
{%- else %}
* Set your inverter battery mode to **{{ m }}**
{%- endif %}
{%- endif %}
{%- if n not in ['unknown', 'unavailable', ''] %}
* {{ n }}
{%- endif %}
{%- endif %}
{%- endfor %}
- type: entities
entities:
- entity: switch.yambms_1_charge_enabled
name: Charge enabled
- entity: switch.yambms_1_discharge_enabled
name: Discharge enabled
- entity: binary_sensor.yambms_1_charging_allowed
name: Charging allowed
- entity: binary_sensor.yambms_1_discharging_allowed
name: Discharging allowed
title: YamBMS - Charge / Discharge switch
show_header_toggle: false
- type: entities
entities:
- entity: switch.yambms_1_request_force_charge
name:
type: entity
- entity: number.yambms_1_request_force_charge_start_soc
name: Start SoC
- entity: number.yambms_1_request_force_charge_stop_soc
name: Stop SoC
- entity: binary_sensor.yambms_1_requested_force_charge
name:
type: entity
- type: weblink
url: >-
https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_functions.md#request-force-charge
name: README
icon: mdi:book-open-variant
title: YamBMS - Request force charge
- type: grid
column_span: 1
cards:
- type: entities
entities:
- entity: sensor.yambms_1_charging_status
name:
type: entity
- entity: sensor.yambms_1_charging_instruction
name:
type: entity
- entity: switch.yambms_1_float_charge_enabled
name:
type: entity
- entity: switch.yambms_1_eoc_timer_enabled
name:
type: entity
- entity: number.yambms_1_bulk_voltage
name:
type: entity
- entity: number.yambms_1_float_voltage
name:
type: entity
- entity: number.yambms_1_charger_offset_v
name:
type: entity
- entity: select.yambms_1_cut_off_cell_voltage
name:
type: entity
- type: weblink
url: >-
https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_functions.md#charging-settings
name: README
icon: mdi:book-open-variant
title: YamBMS - Charging Settings
show_header_toggle: false
- type: entities
entities:
- entity: sensor.yambms_1_requested_charge_voltage
name: Requested Charge Voltage
- entity: sensor.yambms_1_requested_discharge_voltage
name: Requested Discharge Voltage
- entity: sensor.yambms_1_requested_charge_current
name: Requested Charge Current
- entity: sensor.yambms_1_requested_discharge_current
name: Requested Discharge Current
- type: weblink
url: >-
https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_functions.md#requested-values
name: README
icon: mdi:book-open-variant
title: YamBMS - Requested Values
- type: grid
column_span: 1
cards:
- type: entities
entities:
- entity: number.yambms_1_max_requested_charge_current
name: Max charge current
- entity: number.yambms_1_max_requested_discharge_current
name: Max discharge current
- entity: number.yambms_1_max_charge_c_rate
name:
type: entity
- entity: number.yambms_1_max_discharge_c_rate
name:
type: entity
- entity: switch.yambms_1_temperature_based_current_limitation
name:
type: entity
- entity: sensor.yambms_1_ccl_derating_reason
name:
type: entity
- entity: sensor.yambms_1_dcl_derating_reason
name:
type: entity
- type: weblink
url: >-
https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_functions.md#max-requested-current
name: README
icon: mdi:book-open-variant
title: YamBMS - Max requested current
- type: entities
entities:
- entity: number.yambms_1_rebulk_soc
name:
type: entity
- entity: number.yambms_1_rebulk_v
name:
type: entity
- entity: number.yambms_1_rebulk_days
name:
type: entity
- entity: switch.yambms_1_force_bulk
name:
type: entity
- type: weblink
url: >-
https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_functions.md#rebulk
name: README
icon: mdi:book-open-variant
title: YamBMS - ReBulk
- title: Auto Functions
cards:
- type: entities
entities:
- entity: switch.yambms_1_automatic_charge_voltage
name: Automatic Charge Voltage
- entity: number.yambms_1_auto_cvl_boost_charge_v
name: Auto CVL Boost Charge V.
title: YamBMS - Auto CVL
- type: entities
entities:
- entity: select.yambms_1_automatic_float_voltage
name: Automatic Float Voltage
- entity: sensor.yambms_1_auto_float_voltage
name: Auto Float Voltage
- entity: number.yambms_1_auto_float_update_interval
name: Update Interval
- entity: number.yambms_1_auto_float_voltage_step
name: Voltage Step
title: YamBMS - Auto Float
- type: entities
entities:
- entity: switch.yambms_1_automatic_charge_current
name: Automatic Charge Current
- entity: switch.yambms_1_automatic_discharge_current
name: Automatic Discharge Current
title: YamBMS - Auto CCL / DCL
show_header_toggle: false
- type: entities
entities:
- entity: switch.yambms_1_automatic_soc_limit
name: Automatic SoC Limit
- entity: number.yambms_1_auto_soc_limit
name: SoC Limit
- entity: number.yambms_1_auto_soc_limit_hysteresis
name: SoC Limit Hysteresis
- entity: select.yambms_1_auto_soc_limit_mode
name: Auto SoC Limit Mode
- entity: sensor.yambms_1_auto_soc_limit_status
name: Auto SoC Limit Status
title: YamBMS - Auto SoC Limit
- type: entities
entities:
- entity: switch.yambms_1_automatic_eoc_current
name: Automatic EOC Current
- entity: sensor.yambms_1_auto_eoc_status
name: Status
- entity: sensor.yambms_1_auto_eoc_current
name: Required Current
- entity: number.yambms_1_auto_eoc_target_hour
name: Target hour
- entity: number.yambms_1_auto_eoc_target_minute
name: Target minute
- entity: number.yambms_1_auto_eoc_correction
name: Current Correction
- entity: number.yambms_1_auto_eoc_capacity_modifier
name: Capacity Modifier
- entity: number.yambms_1_auto_eoc_increase_stop_hours
name: Stop hours
- entity: number.yambms_1_auto_eoc_increase_stop_soc
name: Stop SoC
title: YamBMS - Auto EOC
type: sections
max_columns: 3
sections:
- type: grid
column_span: 1
cards:
- type: entities
entities:
- entity: switch.yambms_1_automatic_charge_voltage
name: Automatic Charge Voltage
- entity: number.yambms_1_auto_cvl_boost_charge_v
name: Auto CVL Boost Charge V.
- type: weblink
url: >-
https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_functions.md#auto-cvl
name: README
icon: mdi:book-open-variant
title: YamBMS - Auto CVL
- type: entities
entities:
- entity: select.yambms_1_automatic_float_voltage
name: Automatic Float Voltage
- entity: sensor.yambms_1_auto_float_voltage
name: Auto Float Voltage
- entity: number.yambms_1_auto_float_update_interval
name: Update Interval
- entity: number.yambms_1_auto_float_voltage_step
name: Voltage Step
- type: weblink
url: >-
https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_functions.md#auto-float-voltage
name: README
icon: mdi:book-open-variant
title: YamBMS - Auto Float Voltage
- type: grid
column_span: 1
cards:
- type: entities
entities:
- entity: switch.yambms_1_automatic_charge_current
name: Automatic Charge Current
- entity: switch.yambms_1_automatic_discharge_current
name: Automatic Discharge Current
- type: weblink
url: >-
https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_functions.md#auto-ccl--dcl
name: README
icon: mdi:book-open-variant
title: YamBMS - Auto CCL / DCL
show_header_toggle: false
- type: entities
title: Auto CCL - Current Taper
show_header_toggle: false
entities:
- entity: switch.yambms_1_auto_ccl_current_taper
name: Current Taper
- type: conditional
conditions:
- entity: switch.yambms_1_auto_ccl_current_taper
state: "on"
row:
entity: number.yambms_1_auto_ccl_ct_knee_voltage
name: Knee Voltage
- type: conditional
conditions:
- entity: switch.yambms_1_auto_ccl_current_taper
state: "on"
row:
entity: number.yambms_1_auto_ccl_ct_knee_c_rate
name: Knee C-Rate
- type: conditional
conditions:
- entity: switch.yambms_1_auto_ccl_current_taper
state: "on"
row:
entity: sensor.yambms_1_auto_ccl_ct_knee_amps
name: Knee Amps
- type: conditional
conditions:
- entity: switch.yambms_1_auto_ccl_current_taper
state: "on"
row:
entity: number.yambms_1_auto_ccl_ct_bulk_c_rate
name: Bulk C-Rate
- type: conditional
conditions:
- entity: switch.yambms_1_auto_ccl_current_taper
state: "on"
row:
entity: sensor.yambms_1_auto_ccl_ct_bulk_amps
name: Bulk Amps
- type: conditional
conditions:
- entity: switch.yambms_1_auto_ccl_current_taper
state: "on"
row:
entity: number.yambms_1_auto_ccl_ct_balance_current
name: Balance Current
- type: weblink
url: >-
https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_functions.md#auto-ccl-current-taper
name: README
icon: mdi:book-open-variant
- type: grid
column_span: 1
cards:
- type: entities
entities:
- entity: switch.yambms_1_automatic_soc_limit
name: Automatic SoC Limit
- entity: number.yambms_1_auto_soc_limit
name: SoC Limit
- entity: number.yambms_1_auto_soc_limit_hysteresis
name: SoC Limit Hysteresis
- entity: select.yambms_1_auto_soc_limit_mode
name: Auto SoC Limit Mode
- entity: sensor.yambms_1_auto_soc_limit_status
name: Auto SoC Limit Status
- type: weblink
url: >-
https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_functions.md#auto-soc-limit
name: README
icon: mdi:book-open-variant
title: YamBMS - Auto SoC Limit
- type: entities
entities:
- entity: switch.yambms_1_automatic_eoc_current
name: Automatic EOC Current
- type: conditional
conditions:
- entity: switch.yambms_1_automatic_eoc_current
state: "on"
row:
entity: sensor.yambms_1_auto_eoc_status
name: Status
- type: conditional
conditions:
- entity: switch.yambms_1_automatic_eoc_current
state: "on"
row:
entity: sensor.yambms_1_auto_eoc_current
name: Required Current
- type: conditional
conditions:
- entity: switch.yambms_1_automatic_eoc_current
state: "on"
row:
entity: number.yambms_1_auto_eoc_start_hour
name: Start hour
- type: conditional
conditions:
- entity: switch.yambms_1_automatic_eoc_current
state: "on"
row:
entity: number.yambms_1_auto_eoc_start_minute
name: Start minute
- type: conditional
conditions:
- entity: switch.yambms_1_automatic_eoc_current
state: "on"
row:
entity: number.yambms_1_auto_eoc_target_hour
name: Target hour
- type: conditional
conditions:
- entity: switch.yambms_1_automatic_eoc_current
state: "on"
row:
entity: number.yambms_1_auto_eoc_target_minute
name: Target minute
- type: conditional
conditions:
- entity: switch.yambms_1_automatic_eoc_current
state: "on"
row:
entity: number.yambms_1_auto_eoc_correction
name: Current Correction
- type: conditional
conditions:
- entity: switch.yambms_1_automatic_eoc_current
state: "on"
row:
entity: number.yambms_1_auto_eoc_capacity_modifier
name: Capacity Modifier
- type: conditional
conditions:
- entity: switch.yambms_1_automatic_eoc_current
state: "on"
row:
entity: number.yambms_1_auto_eoc_increase_stop_hours
name: Stop hours
- type: conditional
conditions:
- entity: switch.yambms_1_automatic_eoc_current
state: "on"
row:
entity: number.yambms_1_auto_eoc_increase_stop_soc
name: Stop SoC
- type: weblink
url: >-
https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_functions.md#auto-eoc
name: README
icon: mdi:book-open-variant
title: YamBMS - Auto EOC
- title: Diagnostic
cards:
- type: entity-filter
entities:
- entity: sensor.yambms_board_debug_free_psram_percent
name: Debug Free PSRAM (%)
- entity: sensor.yambms_board_debug_free_psram
name: Debug Free PSRAM
- entity: sensor.yambms_board_debug_heap_free_percent
name: Debug Heap free (%)
- entity: sensor.yambms_board_debug_heap_free
name: Debug Heap free
- entity: sensor.yambms_board_debug_heap_max_block_percent
name: Debug Heap max block (%)
- entity: sensor.yambms_board_debug_heap_max_block
name: Debug Heap max block
- entity: sensor.yambms_board_debug_loop_time
name: Debug Loop time
- entity: sensor.yambms_board_debug_reset_reason
name: Debug Reset reason
- entity: sensor.yambms_board_uptime
name: Board Uptime
- entity: sensor.yambms_board_esphome_version
name: ESPHome version
- entity: button.yambms_board_restart
name: Board Restart
conditions:
- condition: state
state_not: unavailable
card:
title: YamBMS - Diagnostic
- type: entities
entities:
- entity: sensor.yambms_1_requested_charge_voltage
name: Requested Charge Voltage
- entity: sensor.yambms_1_requested_discharge_voltage
name: Requested Discharge Voltage
- entity: sensor.yambms_1_requested_charge_current
name: Requested Charge Current
- entity: sensor.yambms_1_requested_discharge_current
name: Requested Discharge Current
title: YamBMS - Requested Values
- type: entity-filter
entities:
- entity: binary_sensor.yambms_1_canbus_1_status
name: CANBUS Status
- entity: switch.yambms_1_canbus_1_inverter_heartbeat_monitoring
name: CANBUS Inverter Heartbeat Monitoring
- entity: sensor.yambms_1_canbus_1_inverter_heartbeat
name: CANBUS Inverter Heartbeat
- entity: binary_sensor.yambms_1_rs485_1_status
name: RS485 Status
- entity: switch.yambms_1_rs485_1_inverter_heartbeat_monitoring
name: RS485 Inverter Heartbeat Monitoring
- entity: sensor.yambms_1_rs485_1_inverter_heartbeat
name: RS485 Inverter Heartbeat
conditions:
- condition: state
state_not: unavailable
card:
title: YamBMS - Inverter Status & Heartbeat
type: masonry
type: sections
max_columns: 3
sections:
- type: grid
column_span: 1
cards:
- type: markdown
content: |-
{%- set raw = states('sensor.yambms_board_system_fault_data') %}
{%- set names = ['API / MQTT', 'BMS', 'CAN->INV', 'RS485->INV', 'Shunt', 'Balancer', 'Network', 'Aux 1', 'Cat 8', 'Cat 9', 'Cat 10', 'Cat 11', 'Cat 12', 'Cat 13', 'Cat 14', 'Cat 15'] %}
{%- if raw in ['unknown', 'unavailable', 'none', ''] %}
Initializing...
{%- else %}
{%- set data = raw | from_json %}
| Component | Instance status |
| :--- | :--- |
{%- for cat_idx in range(0, 16) %}
{%- if data | count > cat_idx and data[cat_idx] | count > 0 %}
{%- set ns = namespace(visual='') %}
{%- for inst in data[cat_idx] %}
{%- set icon = '❌' if inst == 1 else ('✅' if inst == 0 else '➖') %}
{%- set ns.visual = ns.visual ~ icon ~ ' ' %}
{%- endfor %}
| {{ names[cat_idx] }} | {{ ns.visual }} |
{%- endif %}
{%- endfor %}
{%- endif %}
title: 🚨 YamBMS - Fault status
- type: markdown
content: |2
<table>
<tr>
<td>Node ID hash</td>
<td>{{ states('sensor.yambms_board_node_id_hash') }}</td>
</tr>
<tr>
<td>MAC address</td>
<td>{{ states('sensor.yambms_board_mac_address') }}</td>
</tr>
<tr>
<td>IP address</td>
<td>{{ states('sensor.yambms_board_ip_address') }}</td>
</tr>
</table>
title: 🌐 YamBMS - Network
- type: grid
column_span: 1
cards:
- type: markdown
title: 🔍 YamBMS - Diagnostic
content: |2
<table>
<tr>
<td>Chip</td>
<td>{% set info = states('sensor.yambms_board_debug_device_info') %}{% if info not in ['unknown', 'unavailable', ''] and '|' in info %}{{ info.split('|')[1].split('Features:')[0].replace('Chip:', '').strip() }}{% else %}{{ info }}{% endif %}</td>
</tr>
<tr>
<td>Board</td>
<td>{{ states('sensor.yambms_board_board_name') }}</td>
</tr>
<tr>
<td>Board Uptime</td>
<td>{{ states('sensor.yambms_board_uptime') }}</td>
</tr>
<tr>
<td>Entities</td>
<td>{{ integration_entities(config_entry_attr(config_entry_id('sensor.yambms_board_uptime'), 'title')) | count }}</td>
</tr>
<tr>
<td>PSRAM</td>
<td>{% set psram = states('sensor.yambms_board_debug_free_psram') %}{% if psram|float(0) > 0 %}<font color="#4CAF50">Active — {{ states('sensor.yambms_board_debug_free_psram_percent')|float|round }} % free</font>{% else %}Not active{% endif %}</td>
</tr>
<tr>
<td>Debug Free PSRAM (%)</td>
<td>{{ states('sensor.yambms_board_debug_free_psram_percent')|float(0)|round }} %</td>
</tr>
<tr>
<td>Debug Free PSRAM</td>
<td>{{ states('sensor.yambms_board_debug_free_psram')|float(0)|round }} B</td>
</tr>
<tr>
<td>Debug Heap free (%)</td>
<td>{{ states('sensor.yambms_board_debug_heap_free_percent')|float(0)|round }} %</td>
</tr>
<tr>
<td>Debug Heap free</td>
<td>{{ states('sensor.yambms_board_debug_heap_free')|float(0)|round }} B</td>
</tr>
<tr>
<td>Debug Heap max block (%)</td>
<td>{{ states('sensor.yambms_board_debug_heap_max_block_percent')|float(0)|round }} %</td>
</tr>
<tr>
<td>Debug Heap max block</td>
<td>{{ states('sensor.yambms_board_debug_heap_max_block')|float(0)|round }} B</td>
</tr>
<tr>
<td>Debug Loop time</td>
<td>{{ states('sensor.yambms_board_debug_loop_time')|float(0)|round }} ms</td>
</tr>
<tr>
<td>Debug Reset reason</td>
<td>{{ states('sensor.yambms_board_debug_reset_reason') }}</td>
</tr>
<tr>
<td>YamBMS Running version</td>
<td>{{ states('sensor.yambms_1_running_version') }}</td>
</tr>
<tr>
<td>YamBMS Last version</td>
<td>{{ states('sensor.yambms_1_last_version') }}</td>
</tr>
<tr>
<td>ESPHome version</td>
<td>{{ states('sensor.yambms_board_esphome_version')[:9] }}</td>
</tr>
</table>
- type: grid
column_span: 1
cards:
- type: entity-filter
entities:
- entity: binary_sensor.yambms_1_canbus_1_status
name: CANBUS Status
- entity: switch.yambms_1_canbus_1_inverter_heartbeat_monitoring
name: CANBUS Inverter Heartbeat Monitoring
- entity: sensor.yambms_1_canbus_1_inverter_heartbeat
name: CANBUS Inverter Heartbeat
- entity: binary_sensor.yambms_1_rs485_1_status
name: RS485 Status
- entity: switch.yambms_1_rs485_1_inverter_heartbeat_monitoring
name: RS485 Inverter Heartbeat Monitoring
- entity: sensor.yambms_1_rs485_1_inverter_heartbeat
name: RS485 Inverter Heartbeat
conditions:
- condition: state
state_not: unavailable
card:
title: 💓 YamBMS - Inverter Status & Heartbeat
- type: entities
entities:
- entity: button.yambms_board_restart
name: Board Restart
show_header_toggle: false
- title: BMS
type: sections
max_columns: 3
@@ -1,5 +1,5 @@
# Updated : 2026.06.17
# Version : 1.7.0
# Updated : 2026.11.14
# Version : 1.8.2
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -25,7 +25,8 @@ views:
- type: grid
cards:
- type: heading
heading: YamBMS - Battery
heading: 🔋 YamBMS - Battery
heading_style: title
- graph: line
type: sensor
entity: sensor.yambms_1_total_voltage
@@ -125,7 +126,8 @@ views:
- type: grid
cards:
- type: heading
heading: YamBMS - Status
heading: 📟 YamBMS - Status
heading_style: title
- type: tile
entity: binary_sensor.yambms_1_inverter_communication_status
name: Inverter comm. status
@@ -190,7 +192,7 @@ views:
- type: grid
cards:
- type: heading
heading: YamBMS - Overview
heading: 📋 YamBMS - Overview
heading_style: title
- type: markdown
content: |-
@@ -232,7 +234,7 @@ views:
{% if is_state('switch.yambms_1_automatic_eoc_current','on') %}
<tr>
<td>Automatic EOC Current</td>
<td>{% set eoc_status = states('sensor.yambms_1_auto_eoc_status') %}{% set eoc_val %}{{ states('number.yambms_1_auto_eoc_target_hour') | int }}:{{ '%02d' % (states('number.yambms_1_auto_eoc_target_minute') | int) }} — {{ eoc_status }}{% endset %}{% if eoc_status.startswith('Stop:') %}<font color="#FFC107">{{ eoc_val }}</font>{% elif eoc_status.startswith('Run') %}<font color="#4CAF50">{{ eoc_val }}</font>{% else %}{{ eoc_val }}{% endif %}</td>
<td>{% set eoc_status = states('sensor.yambms_1_auto_eoc_status') %}{% set eoc_val %}{{ states('number.yambms_1_auto_eoc_start_hour') | int }}:{{ '%02d' % (states('number.yambms_1_auto_eoc_start_minute') | int) }}–{{ states('number.yambms_1_auto_eoc_target_hour') | int }}:{{ '%02d' % (states('number.yambms_1_auto_eoc_target_minute') | int) }} — {{ eoc_status }}{% endset %}{% if eoc_status.startswith('Stop:') %}<font color="#FFC107">{{ eoc_val }}</font>{% elif eoc_status.startswith('Run') %}<font color="#4CAF50">{{ eoc_val }}</font>{% else %}{{ eoc_val }}{% endif %}</td>
</tr>
{% endif %}
{% if is_state('switch.yambms_1_automatic_soc_limit','on') %}
@@ -258,15 +260,51 @@ views:
</tr>
</table>
- type: heading
heading: YamBMS - Diagnostic
heading: 🚨 YamBMS - Fault status
heading_style: title
- type: markdown
content: |-
{%- set raw = states('sensor.yambms_board_system_fault_data') %}
{%- set names = ['API / MQTT', 'BMS', 'CAN->INV', 'RS485->INV', 'Shunt', 'Balancer', 'Network', 'Aux 1', 'Cat 8', 'Cat 9', 'Cat 10', 'Cat 11', 'Cat 12', 'Cat 13', 'Cat 14', 'Cat 15'] %}
{%- if raw in ['unknown', 'unavailable', 'none', ''] %}
Initializing...
{%- else %}
{%- set data = raw | from_json %}
| Component | Instance status |
| :--- | :--- |
{%- for cat_idx in range(0, 16) %}
{%- if data | count > cat_idx and data[cat_idx] | count > 0 %}
{%- set ns = namespace(visual='') %}
{%- for inst in data[cat_idx] %}
{%- set icon = '❌' if inst == 1 else ('✅' if inst == 0 else '➖') %}
{%- set ns.visual = ns.visual ~ icon ~ ' ' %}
{%- endfor %}
| {{ names[cat_idx] }} | {{ ns.visual }} |
{%- endif %}
{%- endfor %}
{%- endif %}
- type: heading
heading: 🔍 YamBMS - Diagnostic
heading_style: title
- type: markdown
content: |2
<table>
<tr>
<td>Uptime</td>
<td>Chip</td>
<td>{% set info = states('sensor.yambms_board_debug_device_info') %}{% if info not in ['unknown', 'unavailable', ''] and '|' in info %}{{ info.split('|')[1].split('Features:')[0].replace('Chip:', '').strip() }}{% else %}{{ info }}{% endif %}</td>
</tr>
<tr>
<td>Board</td>
<td>{{ states('sensor.yambms_board_board_name') }}</td>
</tr>
<tr>
<td>Board Uptime</td>
<td>{{ states('sensor.yambms_board_uptime') }}</td>
</tr>
<tr>
<td>Entities</td>
<td>{{ integration_entities(config_entry_attr(config_entry_id('sensor.yambms_board_uptime'), 'title')) | count }}</td>
</tr>
<tr>
<td>Loop Time</td>
<td>{{ states('sensor.yambms_board_debug_loop_time')|float|round }} ms</td>
@@ -275,6 +313,10 @@ views:
<td>Heap Free Memory</td>
<td>{{ states('sensor.yambms_board_debug_heap_free_percent')|float|round }} %</td>
</tr>
<tr>
<td>PSRAM</td>
<td>{% set psram = states('sensor.yambms_board_debug_free_psram') %}{% if psram|float(0) > 0 %}<font color="#4CAF50">Active — {{ states('sensor.yambms_board_debug_free_psram_percent')|float|round }} % free</font>{% else %}Not active{% endif %}</td>
</tr>
<tr>
<td>YamBMS Running version</td>
<td>{{ states('sensor.yambms_1_running_version') }}</td>
@@ -285,221 +327,558 @@ views:
</tr>
<tr>
<td>ESPHome Version</td>
<td>{{ states('sensor.yambms_board_esphome_version')[:8] }}</td>
<td>{{ states('sensor.yambms_board_esphome_version')[:9] }}</td>
</tr>
</table>
- title: Settings
cards:
- type: entity-filter
entities:
- entity: select.yambms_1_canbus_1_yambms_name
name: CANBUS YamBMS name
- entity: select.yambms_1_canbus_1_yambms_protocol
name: CANBUS YamBMS protocol
- entity: select.yambms_1_rs485_1_yambms_protocol
name: RS485 YamBMS protocol
conditions:
- condition: state
state_not: unavailable
card:
title: YamBMS - Inverter Comm. Protocol
- type: entities
entities:
- entity: switch.yambms_1_charge_enabled
name: Charge enabled
- entity: switch.yambms_1_discharge_enabled
name: Discharge enabled
- entity: binary_sensor.yambms_1_charging_allowed
name: Charging allowed
- entity: binary_sensor.yambms_1_discharging_allowed
name: Discharging allowed
title: YamBMS - Charge / Discharge switch
show_header_toggle: false
- type: entities
entities:
- entity: sensor.yambms_1_charging_status
name: Charging Status
- entity: sensor.yambms_1_charging_instruction
name: Charging Instruction
- entity: switch.yambms_1_float_charge_enabled
name: Float charge enabled
- entity: switch.yambms_1_eoc_timer_enabled
name: EOC timer enabled
- entity: number.yambms_1_bulk_voltage
name: Bulk voltage
- entity: number.yambms_1_float_voltage
name: Float voltage
- entity: number.yambms_1_inverter_offset_v
name: Inverter Offset V.
title: YamBMS - Charging Settings
show_header_toggle: false
- type: entities
entities:
- entity: number.yambms_1_rebulk_soc
name: Rebulk SoC
- entity: number.yambms_1_rebulk_v
name: Rebulk V.
- entity: number.yambms_1_rebulk_days
name: Rebulk Days
- entity: switch.yambms_1_force_bulk
name: Force Bulk
title: YamBMS - ReBulk
- type: entities
entities:
- entity: number.yambms_1_max_requested_charge_current
name: Max charge current
- entity: number.yambms_1_max_requested_discharge_current
name: Max discharge current
- entity: switch.yambms_1_temperature_based_current_limitation
name: Temperature-based current limitation
- entity: sensor.yambms_1_ccl_derating_reason
name: CCL Derating Reason
- entity: sensor.yambms_1_dcl_derating_reason
name: DCL Derating Reason
title: YamBMS - Max requested current
- type: entities
entities:
- entity: switch.yambms_1_request_force_charge
name: Request force charge
- entity: number.yambms_1_request_force_charge_start_soc
name: Force charge Start SoC
- entity: number.yambms_1_request_force_charge_stop_soc
name: Force charge Stop SoC
- entity: binary_sensor.yambms_1_requested_force_charge
name: Requested Force Charge
title: YamBMS - Request force charge
- type: entities
entities:
- entity: sensor.yambms_1_requested_charge_voltage
name: Requested Charge Voltage
- entity: sensor.yambms_1_requested_discharge_voltage
name: Requested Discharge Voltage
- entity: sensor.yambms_1_requested_charge_current
name: Requested Charge Current
- entity: sensor.yambms_1_requested_discharge_current
name: Requested Discharge Current
title: YamBMS - Requested Values
type: sections
max_columns: 3
sections:
- type: grid
column_span: 1
cards:
- type: entity-filter
entities:
- entity: select.yambms_1_canbus_1_inverter_brand
name: CANBUS 1 Inverter brand
- entity: select.yambms_1_canbus_1_protocol
name: CANBUS 1 Protocol
- entity: select.yambms_1_canbus_2_inverter_brand
name: CANBUS 2 Inverter brand
- entity: select.yambms_1_canbus_2_protocol
name: CANBUS 2 Protocol
- entity: select.yambms_1_canbus_3_inverter_brand
name: CANBUS 3 Inverter brand
- entity: select.yambms_1_canbus_3_protocol
name: CANBUS 3 Protocol
- entity: select.yambms_1_rs485_1_inverter_brand
name: RS485 1 Inverter brand
- entity: select.yambms_1_rs485_1_protocol
name: RS485 1 Protocol
- entity: select.yambms_1_rs485_2_inverter_brand
name: RS485 2 Inverter brand
- entity: select.yambms_1_rs485_2_protocol
name: RS485 2 Protocol
- entity: select.yambms_1_rs485_3_inverter_brand
name: RS485 3 Inverter brand
- entity: select.yambms_1_rs485_3_protocol
name: RS485 3 Protocol
conditions:
- condition: state
state_not: unavailable
card:
title: YamBMS - Inverter protocol
- type: markdown
title: YamBMS - Inverter active protocol
content: |-
{% set links = [
('CANBUS 1', 'sensor.yambms_1_canbus_1_inverter_link_protocol', 'binary_sensor.yambms_1_canbus_1_status'),
('CANBUS 2', 'sensor.yambms_1_canbus_2_inverter_link_protocol', 'binary_sensor.yambms_1_canbus_2_status'),
('CANBUS 3', 'sensor.yambms_1_canbus_3_inverter_link_protocol', 'binary_sensor.yambms_1_canbus_3_status'),
('RS485 1', 'sensor.yambms_1_rs485_1_inverter_link_protocol', 'binary_sensor.yambms_1_rs485_1_status'),
('RS485 2', 'sensor.yambms_1_rs485_2_inverter_link_protocol', 'binary_sensor.yambms_1_rs485_2_status'),
('RS485 3', 'sensor.yambms_1_rs485_3_inverter_link_protocol', 'binary_sensor.yambms_1_rs485_3_status') ] %}
{%- for label, e, s in links %}
{%- set p = states(e) %}
{%- if p not in ['unknown', 'unavailable'] %}
{%- set m = states(e | replace('inverter_link_protocol', 'inverter_battery_mode')) %}
{%- set n = states(e | replace('inverter_link_protocol', 'note')) %}
{%- set st = states(s) %}
{%- set link = label ~ (' - ON' if st == 'on' else (' - OFF' if st == 'off' else '')) %}
**{{ link }} :**
* {{ p }}
{%- if m not in ['unknown', 'unavailable', ''] %}
{%- if m == 'See inverter manual' %}
* {{ m }}
{%- else %}
* Set your inverter battery mode to **{{ m }}**
{%- endif %}
{%- endif %}
{%- if n not in ['unknown', 'unavailable', ''] %}
* {{ n }}
{%- endif %}
{%- endif %}
{%- endfor %}
- type: entities
entities:
- entity: switch.yambms_1_charge_enabled
name: Charge enabled
- entity: switch.yambms_1_discharge_enabled
name: Discharge enabled
- entity: binary_sensor.yambms_1_charging_allowed
name: Charging allowed
- entity: binary_sensor.yambms_1_discharging_allowed
name: Discharging allowed
title: YamBMS - Charge / Discharge switch
show_header_toggle: false
- type: entities
entities:
- entity: switch.yambms_1_request_force_charge
name:
type: entity
- entity: number.yambms_1_request_force_charge_start_soc
name: Start SoC
- entity: number.yambms_1_request_force_charge_stop_soc
name: Stop SoC
- entity: binary_sensor.yambms_1_requested_force_charge
name:
type: entity
- type: weblink
url: >-
https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_functions.md#request-force-charge
name: README
icon: mdi:book-open-variant
title: YamBMS - Request force charge
- type: grid
column_span: 1
cards:
- type: entities
entities:
- entity: sensor.yambms_1_charging_status
name:
type: entity
- entity: sensor.yambms_1_charging_instruction
name:
type: entity
- entity: switch.yambms_1_float_charge_enabled
name:
type: entity
- entity: switch.yambms_1_eoc_timer_enabled
name:
type: entity
- entity: number.yambms_1_bulk_voltage
name:
type: entity
- entity: number.yambms_1_float_voltage
name:
type: entity
- entity: number.yambms_1_charger_offset_v
name:
type: entity
- entity: select.yambms_1_cut_off_cell_voltage
name:
type: entity
- type: weblink
url: >-
https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_functions.md#charging-settings
name: README
icon: mdi:book-open-variant
title: YamBMS - Charging Settings
show_header_toggle: false
- type: entities
entities:
- entity: sensor.yambms_1_requested_charge_voltage
name: Requested Charge Voltage
- entity: sensor.yambms_1_requested_discharge_voltage
name: Requested Discharge Voltage
- entity: sensor.yambms_1_requested_charge_current
name: Requested Charge Current
- entity: sensor.yambms_1_requested_discharge_current
name: Requested Discharge Current
- type: weblink
url: >-
https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_functions.md#requested-values
name: README
icon: mdi:book-open-variant
title: YamBMS - Requested Values
- type: grid
column_span: 1
cards:
- type: entities
entities:
- entity: number.yambms_1_max_requested_charge_current
name: Max charge current
- entity: number.yambms_1_max_requested_discharge_current
name: Max discharge current
- entity: number.yambms_1_max_charge_c_rate
name:
type: entity
- entity: number.yambms_1_max_discharge_c_rate
name:
type: entity
- entity: switch.yambms_1_temperature_based_current_limitation
name:
type: entity
- entity: sensor.yambms_1_ccl_derating_reason
name:
type: entity
- entity: sensor.yambms_1_dcl_derating_reason
name:
type: entity
- type: weblink
url: >-
https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_functions.md#max-requested-current
name: README
icon: mdi:book-open-variant
title: YamBMS - Max requested current
- type: entities
entities:
- entity: number.yambms_1_rebulk_soc
name:
type: entity
- entity: number.yambms_1_rebulk_v
name:
type: entity
- entity: number.yambms_1_rebulk_days
name:
type: entity
- entity: switch.yambms_1_force_bulk
name:
type: entity
- type: weblink
url: >-
https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_functions.md#rebulk
name: README
icon: mdi:book-open-variant
title: YamBMS - ReBulk
- title: Auto Functions
cards:
- type: entities
entities:
- entity: switch.yambms_1_automatic_charge_voltage
name: Automatic Charge Voltage
- entity: number.yambms_1_auto_cvl_boost_charge_v
name: Auto CVL Boost Charge V.
title: YamBMS - Auto CVL
- type: entities
entities:
- entity: select.yambms_1_automatic_float_voltage
name: Automatic Float Voltage
- entity: sensor.yambms_1_auto_float_voltage
name: Auto Float Voltage
- entity: number.yambms_1_auto_float_update_interval
name: Update Interval
- entity: number.yambms_1_auto_float_voltage_step
name: Voltage Step
title: YamBMS - Auto Float
- type: entities
entities:
- entity: switch.yambms_1_automatic_charge_current
name: Automatic Charge Current
- entity: switch.yambms_1_automatic_discharge_current
name: Automatic Discharge Current
title: YamBMS - Auto CCL / DCL
show_header_toggle: false
- type: entities
entities:
- entity: switch.yambms_1_automatic_soc_limit
name: Automatic SoC Limit
- entity: number.yambms_1_auto_soc_limit
name: SoC Limit
- entity: number.yambms_1_auto_soc_limit_hysteresis
name: SoC Limit Hysteresis
- entity: select.yambms_1_auto_soc_limit_mode
name: Auto SoC Limit Mode
- entity: sensor.yambms_1_auto_soc_limit_status
name: Auto SoC Limit Status
title: YamBMS - Auto SoC Limit
- type: entities
entities:
- entity: switch.yambms_1_automatic_eoc_current
name: Automatic EOC Current
- entity: sensor.yambms_1_auto_eoc_status
name: Status
- entity: sensor.yambms_1_auto_eoc_current
name: Required Current
- entity: number.yambms_1_auto_eoc_target_hour
name: Target hour
- entity: number.yambms_1_auto_eoc_target_minute
name: Target minute
- entity: number.yambms_1_auto_eoc_correction
name: Current Correction
- entity: number.yambms_1_auto_eoc_capacity_modifier
name: Capacity Modifier
- entity: number.yambms_1_auto_eoc_increase_stop_hours
name: Stop hours
- entity: number.yambms_1_auto_eoc_increase_stop_soc
name: Stop SoC
title: YamBMS - Auto EOC
type: sections
max_columns: 3
sections:
- type: grid
column_span: 1
cards:
- type: entities
entities:
- entity: switch.yambms_1_automatic_charge_voltage
name: Automatic Charge Voltage
- entity: number.yambms_1_auto_cvl_boost_charge_v
name: Auto CVL Boost Charge V.
- type: weblink
url: >-
https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_functions.md#auto-cvl
name: README
icon: mdi:book-open-variant
title: YamBMS - Auto CVL
- type: entities
entities:
- entity: select.yambms_1_automatic_float_voltage
name: Automatic Float Voltage
- entity: sensor.yambms_1_auto_float_voltage
name: Auto Float Voltage
- entity: number.yambms_1_auto_float_update_interval
name: Update Interval
- entity: number.yambms_1_auto_float_voltage_step
name: Voltage Step
- type: weblink
url: >-
https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_functions.md#auto-float-voltage
name: README
icon: mdi:book-open-variant
title: YamBMS - Auto Float Voltage
- type: grid
column_span: 1
cards:
- type: entities
entities:
- entity: switch.yambms_1_automatic_charge_current
name: Automatic Charge Current
- entity: switch.yambms_1_automatic_discharge_current
name: Automatic Discharge Current
- type: weblink
url: >-
https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_functions.md#auto-ccl--dcl
name: README
icon: mdi:book-open-variant
title: YamBMS - Auto CCL / DCL
show_header_toggle: false
- type: entities
title: Auto CCL - Current Taper
show_header_toggle: false
entities:
- entity: switch.yambms_1_auto_ccl_current_taper
name: Current Taper
- type: conditional
conditions:
- entity: switch.yambms_1_auto_ccl_current_taper
state: "on"
row:
entity: number.yambms_1_auto_ccl_ct_knee_voltage
name: Knee Voltage
- type: conditional
conditions:
- entity: switch.yambms_1_auto_ccl_current_taper
state: "on"
row:
entity: number.yambms_1_auto_ccl_ct_knee_c_rate
name: Knee C-Rate
- type: conditional
conditions:
- entity: switch.yambms_1_auto_ccl_current_taper
state: "on"
row:
entity: sensor.yambms_1_auto_ccl_ct_knee_amps
name: Knee Amps
- type: conditional
conditions:
- entity: switch.yambms_1_auto_ccl_current_taper
state: "on"
row:
entity: number.yambms_1_auto_ccl_ct_bulk_c_rate
name: Bulk C-Rate
- type: conditional
conditions:
- entity: switch.yambms_1_auto_ccl_current_taper
state: "on"
row:
entity: sensor.yambms_1_auto_ccl_ct_bulk_amps
name: Bulk Amps
- type: conditional
conditions:
- entity: switch.yambms_1_auto_ccl_current_taper
state: "on"
row:
entity: number.yambms_1_auto_ccl_ct_balance_current
name: Balance Current
- type: weblink
url: >-
https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_functions.md#auto-ccl-current-taper
name: README
icon: mdi:book-open-variant
- type: grid
column_span: 1
cards:
- type: entities
entities:
- entity: switch.yambms_1_automatic_soc_limit
name: Automatic SoC Limit
- entity: number.yambms_1_auto_soc_limit
name: SoC Limit
- entity: number.yambms_1_auto_soc_limit_hysteresis
name: SoC Limit Hysteresis
- entity: select.yambms_1_auto_soc_limit_mode
name: Auto SoC Limit Mode
- entity: sensor.yambms_1_auto_soc_limit_status
name: Auto SoC Limit Status
- type: weblink
url: >-
https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_functions.md#auto-soc-limit
name: README
icon: mdi:book-open-variant
title: YamBMS - Auto SoC Limit
- type: entities
entities:
- entity: switch.yambms_1_automatic_eoc_current
name: Automatic EOC Current
- type: conditional
conditions:
- entity: switch.yambms_1_automatic_eoc_current
state: "on"
row:
entity: sensor.yambms_1_auto_eoc_status
name: Status
- type: conditional
conditions:
- entity: switch.yambms_1_automatic_eoc_current
state: "on"
row:
entity: sensor.yambms_1_auto_eoc_current
name: Required Current
- type: conditional
conditions:
- entity: switch.yambms_1_automatic_eoc_current
state: "on"
row:
entity: number.yambms_1_auto_eoc_start_hour
name: Start hour
- type: conditional
conditions:
- entity: switch.yambms_1_automatic_eoc_current
state: "on"
row:
entity: number.yambms_1_auto_eoc_start_minute
name: Start minute
- type: conditional
conditions:
- entity: switch.yambms_1_automatic_eoc_current
state: "on"
row:
entity: number.yambms_1_auto_eoc_target_hour
name: Target hour
- type: conditional
conditions:
- entity: switch.yambms_1_automatic_eoc_current
state: "on"
row:
entity: number.yambms_1_auto_eoc_target_minute
name: Target minute
- type: conditional
conditions:
- entity: switch.yambms_1_automatic_eoc_current
state: "on"
row:
entity: number.yambms_1_auto_eoc_correction
name: Current Correction
- type: conditional
conditions:
- entity: switch.yambms_1_automatic_eoc_current
state: "on"
row:
entity: number.yambms_1_auto_eoc_capacity_modifier
name: Capacity Modifier
- type: conditional
conditions:
- entity: switch.yambms_1_automatic_eoc_current
state: "on"
row:
entity: number.yambms_1_auto_eoc_increase_stop_hours
name: Stop hours
- type: conditional
conditions:
- entity: switch.yambms_1_automatic_eoc_current
state: "on"
row:
entity: number.yambms_1_auto_eoc_increase_stop_soc
name: Stop SoC
- type: weblink
url: >-
https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_functions.md#auto-eoc
name: README
icon: mdi:book-open-variant
title: YamBMS - Auto EOC
- title: Diagnostic
cards:
- type: entity-filter
entities:
- entity: sensor.yambms_board_debug_free_psram_percent
name: Debug Free PSRAM (%)
- entity: sensor.yambms_board_debug_free_psram
name: Debug Free PSRAM
- entity: sensor.yambms_board_debug_heap_free_percent
name: Debug Heap free (%)
- entity: sensor.yambms_board_debug_heap_free
name: Debug Heap free
- entity: sensor.yambms_board_debug_heap_max_block_percent
name: Debug Heap max block (%)
- entity: sensor.yambms_board_debug_heap_max_block
name: Debug Heap max block
- entity: sensor.yambms_board_debug_loop_time
name: Debug Loop time
- entity: sensor.yambms_board_debug_reset_reason
name: Debug Reset reason
- entity: sensor.yambms_board_uptime
name: Board Uptime
- entity: sensor.yambms_board_esphome_version
name: ESPHome version
- entity: button.yambms_board_restart
name: Board Restart
conditions:
- condition: state
state_not: unavailable
card:
title: YamBMS - Diagnostic
- type: entities
entities:
- entity: sensor.yambms_1_requested_charge_voltage
name: Requested Charge Voltage
- entity: sensor.yambms_1_requested_discharge_voltage
name: Requested Discharge Voltage
- entity: sensor.yambms_1_requested_charge_current
name: Requested Charge Current
- entity: sensor.yambms_1_requested_discharge_current
name: Requested Discharge Current
title: YamBMS - Requested Values
- type: entity-filter
entities:
- entity: binary_sensor.yambms_1_canbus_1_status
name: CANBUS Status
- entity: switch.yambms_1_canbus_1_inverter_heartbeat_monitoring
name: CANBUS Inverter Heartbeat Monitoring
- entity: sensor.yambms_1_canbus_1_inverter_heartbeat
name: CANBUS Inverter Heartbeat
- entity: binary_sensor.yambms_1_rs485_1_status
name: RS485 Status
- entity: switch.yambms_1_rs485_1_inverter_heartbeat_monitoring
name: RS485 Inverter Heartbeat Monitoring
- entity: sensor.yambms_1_rs485_1_inverter_heartbeat
name: RS485 Inverter Heartbeat
conditions:
- condition: state
state_not: unavailable
card:
title: YamBMS - Inverter Status & Heartbeat
type: masonry
type: sections
max_columns: 3
sections:
- type: grid
column_span: 1
cards:
- type: markdown
content: |-
{%- set raw = states('sensor.yambms_board_system_fault_data') %}
{%- set names = ['API / MQTT', 'BMS', 'CAN->INV', 'RS485->INV', 'Shunt', 'Balancer', 'Network', 'Aux 1', 'Cat 8', 'Cat 9', 'Cat 10', 'Cat 11', 'Cat 12', 'Cat 13', 'Cat 14', 'Cat 15'] %}
{%- if raw in ['unknown', 'unavailable', 'none', ''] %}
Initializing...
{%- else %}
{%- set data = raw | from_json %}
| Component | Instance status |
| :--- | :--- |
{%- for cat_idx in range(0, 16) %}
{%- if data | count > cat_idx and data[cat_idx] | count > 0 %}
{%- set ns = namespace(visual='') %}
{%- for inst in data[cat_idx] %}
{%- set icon = '❌' if inst == 1 else ('✅' if inst == 0 else '➖') %}
{%- set ns.visual = ns.visual ~ icon ~ ' ' %}
{%- endfor %}
| {{ names[cat_idx] }} | {{ ns.visual }} |
{%- endif %}
{%- endfor %}
{%- endif %}
title: 🚨 YamBMS - Fault status
- type: markdown
content: |2
<table>
<tr>
<td>Node ID hash</td>
<td>{{ states('sensor.yambms_board_node_id_hash') }}</td>
</tr>
<tr>
<td>MAC address</td>
<td>{{ states('sensor.yambms_board_mac_address') }}</td>
</tr>
<tr>
<td>IP address</td>
<td>{{ states('sensor.yambms_board_ip_address') }}</td>
</tr>
</table>
title: 🌐 YamBMS - Network
- type: grid
column_span: 1
cards:
- type: markdown
title: 🔍 YamBMS - Diagnostic
content: |2
<table>
<tr>
<td>Chip</td>
<td>{% set info = states('sensor.yambms_board_debug_device_info') %}{% if info not in ['unknown', 'unavailable', ''] and '|' in info %}{{ info.split('|')[1].split('Features:')[0].replace('Chip:', '').strip() }}{% else %}{{ info }}{% endif %}</td>
</tr>
<tr>
<td>Board</td>
<td>{{ states('sensor.yambms_board_board_name') }}</td>
</tr>
<tr>
<td>Board Uptime</td>
<td>{{ states('sensor.yambms_board_uptime') }}</td>
</tr>
<tr>
<td>Entities</td>
<td>{{ integration_entities(config_entry_attr(config_entry_id('sensor.yambms_board_uptime'), 'title')) | count }}</td>
</tr>
<tr>
<td>PSRAM</td>
<td>{% set psram = states('sensor.yambms_board_debug_free_psram') %}{% if psram|float(0) > 0 %}<font color="#4CAF50">Active — {{ states('sensor.yambms_board_debug_free_psram_percent')|float|round }} % free</font>{% else %}Not active{% endif %}</td>
</tr>
<tr>
<td>Debug Free PSRAM (%)</td>
<td>{{ states('sensor.yambms_board_debug_free_psram_percent')|float(0)|round }} %</td>
</tr>
<tr>
<td>Debug Free PSRAM</td>
<td>{{ states('sensor.yambms_board_debug_free_psram')|float(0)|round }} B</td>
</tr>
<tr>
<td>Debug Heap free (%)</td>
<td>{{ states('sensor.yambms_board_debug_heap_free_percent')|float(0)|round }} %</td>
</tr>
<tr>
<td>Debug Heap free</td>
<td>{{ states('sensor.yambms_board_debug_heap_free')|float(0)|round }} B</td>
</tr>
<tr>
<td>Debug Heap max block (%)</td>
<td>{{ states('sensor.yambms_board_debug_heap_max_block_percent')|float(0)|round }} %</td>
</tr>
<tr>
<td>Debug Heap max block</td>
<td>{{ states('sensor.yambms_board_debug_heap_max_block')|float(0)|round }} B</td>
</tr>
<tr>
<td>Debug Loop time</td>
<td>{{ states('sensor.yambms_board_debug_loop_time')|float(0)|round }} ms</td>
</tr>
<tr>
<td>Debug Reset reason</td>
<td>{{ states('sensor.yambms_board_debug_reset_reason') }}</td>
</tr>
<tr>
<td>YamBMS Running version</td>
<td>{{ states('sensor.yambms_1_running_version') }}</td>
</tr>
<tr>
<td>YamBMS Last version</td>
<td>{{ states('sensor.yambms_1_last_version') }}</td>
</tr>
<tr>
<td>ESPHome version</td>
<td>{{ states('sensor.yambms_board_esphome_version')[:9] }}</td>
</tr>
</table>
- type: grid
column_span: 1
cards:
- type: entity-filter
entities:
- entity: binary_sensor.yambms_1_canbus_1_status
name: CANBUS Status
- entity: switch.yambms_1_canbus_1_inverter_heartbeat_monitoring
name: CANBUS Inverter Heartbeat Monitoring
- entity: sensor.yambms_1_canbus_1_inverter_heartbeat
name: CANBUS Inverter Heartbeat
- entity: binary_sensor.yambms_1_rs485_1_status
name: RS485 Status
- entity: switch.yambms_1_rs485_1_inverter_heartbeat_monitoring
name: RS485 Inverter Heartbeat Monitoring
- entity: sensor.yambms_1_rs485_1_inverter_heartbeat
name: RS485 Inverter Heartbeat
conditions:
- condition: state
state_not: unavailable
card:
title: 💓 YamBMS - Inverter Status & Heartbeat
- type: entities
entities:
- entity: button.yambms_board_restart
name: Board Restart
show_header_toggle: false
+28 -28
View File
@@ -5,7 +5,7 @@
![GitHub stars](https://img.shields.io/github/stars/Sleeper85/esphome-yambms)
![GitHub forks](https://img.shields.io/github/forks/Sleeper85/esphome-yambms)
![GitHub watchers](https://img.shields.io/github/watchers/Sleeper85/esphome-yambms)
[!["Buy Me A Coffee"](https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg)](https://www.buymeacoffee.com/sleeper85)
[![Badge Support](https://img.shields.io/badge/Support-YamBMS-FFDD00?logo=buymeacoffee&logoColor=black)](#support)
> [!TIP]
> This page contains many links to other README.
@@ -25,13 +25,19 @@
> [!IMPORTANT]
> The most important thing for proper functioning of YamBMS is that **the voltage of your BMS is well calibrated**.
> YamBMS logic is based on the `min_cell_voltage` and `max_cell_voltage` voltages of your `BMS`.
> If you use `YamBMS`, the internal charging logic of the `JK-PB BMS` will not be used.
> Please read the [documentation](README.md#contents) and the [setup instructions](documents/README/Hardware_and_schematic_instructions.md).
> YamBMS logic is based on the cell voltages of your `BMS`.
| ESPHome application to `combine` information coming from<br>your `BMS / Balancer / Shunt` and adds a smart layer before<br>transmitting instructions to your inverter on `RS485 or CAN bus`<br>using the protocols `PYLON`, `SMA`, `Victron` or `LuxPower` (EG4). | <a href="https://www.buymeacoffee.com/Sleeper85" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height: 60px !important;width: 217px !important;" ></a> |
| --- | --- |
| **Note: Pylontech uses 15S/48V and many others uses 16S/51.2V !**<br><br>Other battery profiles that utilise the **`PYLON`** protocol with different cell counts<br>may also work, e.g. Alpha Ess Smile, BYD Battery-Box LV Flex Lite.<br>Select the correct battery profile in the inverter to match your battery pack !<br><br>**DISCLAIMER:** Working with battery systems involves electrical hazards.<br>Please read the complete documentation before installation and use<br>this project at your own risk. | <a href="https://www.buymeacoffee.com/Sleeper85" target="_blank"><img src="images/BMC_QR.png" alt="Buy Me A Coffee" style="height: 217px !important;width: 217px !important;" ></a> |
> [!CAUTION]
> **DISCLAIMER:** Working with battery systems involves electrical hazards.
> Please read the [documentation](README.md#contents) and the [setup instructions](documents/README/Hardware_and_schematic_instructions.md)
> before installation and use this project at your own risk.
ESPHome application to `combine` information coming from your `BMS / Balancer / Shunt` and adds a smart layer before transmitting instructions to your inverter on `RS485 or CAN bus` using the protocols `PYLON`, `SMA`, `Victron` or `LuxPower` (EG4).
**Note: Pylontech uses 15S/48V and many others uses 16S/51.2V !**
Other battery profiles that utilise the **`PYLON`** protocol with different cell counts may also work, e.g. Alpha Ess Smile, BYD Battery-Box LV Flex Lite.
Select the correct battery profile in the inverter to match your battery pack !
**Sends over CAN / RS485 bus to your inverter :**
- Battery Voltage
@@ -60,7 +66,8 @@ Come and discuss it on the [DIY Solar Forum dedicated topic](https://diysolarfor
5) [YamBMS charging logic](documents/README/Charging_logic.md)
6) [Installation procedure](documents/README/Installation_procedure.md)
7) [Troubleshooting](documents/README/Troubleshooting.md)
8) [Changelog](documents/README/Changelog.md)
8) [Changelog](documents/README/changelog/Changelog.md)
9) [Telemetry](documents/README/Telemetry.md)
## YamBMS ( Yet another multi-BMS Merging Solution )
@@ -173,7 +180,7 @@ rx_pin: 22 # to CAN board CRX (with 4.7K resistor except for SN65HVD230)
## Requirements
* [ESPHome 2026.6.0 or higher](https://github.com/esphome/esphome/releases)
* [ESPHome 2026.11.0 or higher](https://github.com/esphome/esphome/releases)
* ESP32 MCU (buying a board with ≥8MB flash is advised if you intend to monitor multiple BMS)
* CAN transceiver (only with TJA1050/TJA1051 => 4.7K resistor for 5V to 3V3 level shifing)
* BMS JK, JBD, Seplos (other BMS brands already integrated with ESPhome can be added easily)
@@ -181,25 +188,6 @@ rx_pin: 22 # to CAN board CRX (with 4.7K resistor except for SN65HVD230)
* Optional: 48V to 5V DC-DC converter to power the ESP32 from the JK-BMS VBAT pin (URB4805YMD-10WR3 or VRB4805S-6WR3)
* Optional: JK RS485 adaptor and RS485 to TTL 3V3 adaptor (see schematic section)
## Data collection
> [!NOTE]
> For your information, in January 2026 there were `160` YamBMS users.
If the ESP32 has an internet connection, the following data is sent to [this script](http://script.opentel.be/yambms.post.php)
for statistics collection. Only [@Sleeper85](https://github.com/Sleeper85) have access to this information for the production of statistics, the support and the update service.
- ESP32 MAC address
- YamBMS version
- Board chip
- Board name
- BMS model
- BMS count
- CAN bus name
- CAN bus protocol
- Uptime
- Current date and time
## References
* Thanks to [@syssi](https://github.com/syssi/) for help and developing many BMS components (JK, JBD, Seplos, Pace, etc.).
@@ -208,3 +196,15 @@ for statistics collection. Only [@Sleeper85](https://github.com/Sleeper85) have
* Thanks to [@Fahmula](https://github.com/Fahmula) for developing the `PYLON RS485` component.
* Thanks to [@uksa007](https://www.patreon.com/Uksa007Codedevelopment) for the development of the first CANBUS code.
* Thanks to all the [contributors](https://github.com/Sleeper85/esphome-yambms/graphs/contributors).
## Support
YamBMS is free and open source, and will stay that way — no paid features,
no supporter-only functions, no locked code.
Hosting, the domain and the tools I use to develop it come to about $300 a year,
out of my own pocket. If YamBMS saved you time or money, a coffee helps cover
the bill. It doesn't buy anything — the project stays exactly the same either way.
[!["Buy Me A Coffee"](https://img.shields.io/badge/Buy%20Me%20a%20Coffee-FFDD00?logo=buymeacoffee&logoColor=black)](https://www.buymeacoffee.com/sleeper85)
[!["PayPal"](https://img.shields.io/badge/PayPal-003087?logo=paypal&logoColor=white)](https://paypal.me/Sleeper85)
+48 -42
View File
@@ -1,5 +1,5 @@
# Updated : 2026.06.29
# Version : 1.7.0
# Updated : 2026.11.19
# Version : 1.8.2
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -35,7 +35,7 @@
# dns2: 8.8.4.4
logger:
level: DEBUG # VERBOSE / DEBUG / INFO / WARN
level: INFO # VERBOSE / DEBUG / INFO / WARN
# baud_rate: 115200 # Send logs to the `hardware_uart` USB output (this consumes a UART interface)
# hardware_uart: UART0 # UART0 / USB_SERIAL_JTAG
@@ -90,7 +90,7 @@ substitutions:
# This timer can be deactivated with a switch
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '60'
yambms_cutoff_timer: '180'
# Max. charge current : corresponds to the maximum charge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_charge_current: '300' # in Ampere
@@ -132,6 +132,16 @@ substitutions:
{ 60.0, 0.00 }
}
# +--------------------------------------+
# | YamBMS services |
# +--------------------------------------+
# Update service : checks GitHub for a newer YamBMS version.
# Telemetry service : sends anonymous data about your setup (BMS model, board,
# inverter protocol, YamBMS version). It is what tells me which hardware is
# actually in use, so I know where to spend my time. Public stats and details
# on what is collected : stats.yambms.org
yambms_update_service: 'true' # Set to false to disable update checks
yambms_telemetry_service: 'true' # Set to false to disable the sending of telemetry data
# +--------------------------------------+
# | Shunt Settings |
# +--------------------------------------+
shunt_update_interval: '3s' # frequency at which Shunt data is refreshed
@@ -144,6 +154,12 @@ substitutions:
# +--------------------------------------+
enable_led_logging: 'false' # Set to true to see if an led is assigned to a component correctly, logged every 60 seconds
enable_health_logging: 'false' # Set to true to see if component health for all component instances, logged every 60 seconds
# +--------------------------------------+
# | Advanced options |
# +--------------------------------------+
# Increase the `loop_task_stack_size` value for a large number of BMS
# See https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/LOOP_TASK_STACK.md before changing
loop_task_stack_size: "8192" # 8192 / 16384 / 32768 bytes
@@ -213,36 +229,6 @@ packages:
# | >>> Uncomment your interfaces and options
# +------------------------------------------------------------------------------+
# UART 1 (uart_id: uart_esp_1)
uart_esp_1: !include packages/board/board_options_itf_uart_esp_1.yaml
# UART 2 (uart_id: uart_esp_2)
# uart_esp_2: !include packages/board/board_options_itf_uart_esp_2.yaml
# UART 3 (uart_id: uart_esp_3)
# uart_esp_3: !include packages/board/board_options_itf_uart_esp_3.yaml
# UART flow control
# uart_flow_control: !include
# file: packages/board/board_options_itf_uart_flow_control.yaml
# vars:
# uart_id: 'uart_esp_1'
# uart_flow_control_pin: ${talk_pin}
# CAN transceiver - ESP32_CAN (TJA105x, SN65HVD230, M5Stack CAN base/unit)
canbus_node_1: !include
file: packages/board/board_options_itf_canbus_esp32_can.yaml
vars:
# to bms = canbus_bms_1
# to inverter = canbus_inverter_1
canbus_node_id: 'canbus_inverter_1'
# CAN transceiver - MCP2515
# canbus_node_2: !include
# file: packages/board/board_options_itf_canbus_mcp2515.yaml
# vars:
# # to bms = canbus_bms_1
# # to inverter = canbus_inverter_1
# canbus_node_id: 'canbus_inverter_1'
# PSRAM octal 80Mhz
# psram_octal_80Mhz: !include packages/board/board_options_PSRAM_octal_80Mhz.yaml
@@ -299,6 +285,11 @@ packages:
bms_cell_ovp: '3.650' # V Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V Used by 'Auto CVL' functions
# Fake Equalizing: this BMS does not report its balancing state. When enabled, YamBMS infers it
# from the cell spread and holds the Cut-Off timer while the pack balances, instead of ending the charge.
# Warning: a BMS without a balancer (or with balancing disabled) never closes its cell spread, so it can
# stay in Cut-Off a long time, until the EOC timer (30min default) ends the charge, or forever if disabled.
bms_fake_equalizing_enabled: 'true' # true/false, false by default
bms_charging_cycles: '178' # charging cycles number Used to calculate the SoH
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
@@ -321,6 +312,11 @@ packages:
bms_cell_ovp: '3.650' # V Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V Used by 'Auto CVL' functions
# Fake Equalizing: this BMS does not report its balancing state. When enabled, YamBMS infers it
# from the cell spread and holds the Cut-Off timer while the pack balances, instead of ending the charge.
# Warning: a BMS without a balancer (or with balancing disabled) never closes its cell spread, so it can
# stay in Cut-Off a long time, until the EOC timer (30min default) ends the charge, or forever if disabled.
bms_fake_equalizing_enabled: 'true' # true/false, false by default
bms_charging_cycles: '226' # charging cycles number Used to calculate the SoH
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
@@ -343,6 +339,11 @@ packages:
bms_cell_ovp: '3.650' # V Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V Used by 'Auto CVL' functions
# Fake Equalizing: this BMS does not report its balancing state. When enabled, YamBMS infers it
# from the cell spread and holds the Cut-Off timer while the pack balances, instead of ending the charge.
# Warning: a BMS without a balancer (or with balancing disabled) never closes its cell spread, so it can
# stay in Cut-Off a long time, until the EOC timer (30min default) ends the charge, or forever if disabled.
bms_fake_equalizing_enabled: 'true' # true/false, false by default
bms_charging_cycles: '194' # charging cycles number Used to calculate the SoH
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
@@ -365,12 +366,14 @@ packages:
vars:
canbus_id: '1' # Must be a number
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_inverter_1' # CAN bus node to which your inverter is connected
canbus_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# CAN frames sending will be paused for `30s` if the inverter does not respond with an ACK (can_id 0x305) before the end of the `canbus_link_timer` (5s by default).
canbus_link_timer_enabled: 'true' # Set it to 'false' if your inverter/charger is not sending ACK (can_id 0x305) every `1s` as specified by the protocol
canbus_link_timer: '5s'
canbus_extended_ack: 'false' # Set to 'true' for enable extended 29-bit IDs for the ACK can_id 0x305 (required for Schneider XW Pro)
canbus_link_timer: '10s' # min 6s with Deye
# CAN setup
canbus_platform: 'esp32_can' # esp32_can / mcp2515
canbus_node_id: 'canbus_inverter_1' # CAN bus node to which your inverter is connected
canbus_bitrate: '500kbps' # Default : 500kbps
@@ -378,15 +381,18 @@ packages:
# | >>> RS485 bus to Inverter
# +------------------------------------------------------------------------------+
# rs485_pylon: !include
# file: packages/yambms/yambms_rs485_pylon.yaml # yambms_rs485_pylon_web_server.yaml
# rs485_1: !include
# file: 'packages/yambms/yambms_rs485.yaml'
# # file: 'packages/yambms/yambms_rs485_web_server.yaml'
# vars:
# rs485_id: '1' # Must be a number
# rs485_id: '1' # Must be a number
# rs485_name: 'RS485 1'
# rs485_uart_id: 'uart_esp_3' # UART interface to which your inverter is connected
# rs485_uart_baud_rate: '9600'
# rs485_protocol: 'pylon' # pylon / voltronic
# rs485_update_timeout: '10s'
# rs485_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# # UART setup
# rs485_uart_id: 'uart_esp_3' # UART interface to which your inverter is connected
# rs485_uart_baud_rate: '9600' # Default : 9600 / Epever : 115200
+66 -49
View File
@@ -1,5 +1,5 @@
# Updated : 2026.06.29
# Version : 1.7.0
# Updated : 2026.11.08
# Version : 1.8.2
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -64,6 +64,7 @@ substitutions:
# This allows to group entities into logical devices that appear separately in Home Assistant.
hostname: 'pvbrain2' # Name of your ESPHome node registered on the IP network (DNS name must be unique)
friendly_name : 'PVbrain2' # Name of your board (prefix for board entities)
name: '' # This name can be added as a second prefix, both for the `entity display name` and the `entity id`, you can leave it blank.
# +--------------------------------------+
# | YamBMS Settings |
# +--------------------------------------+
@@ -90,7 +91,7 @@ substitutions:
# This timer can be deactivated with a switch
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '60'
yambms_cutoff_timer: '180'
# Max. charge current : corresponds to the maximum charge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_charge_current: '300' # in Ampere
@@ -132,6 +133,16 @@ substitutions:
{ 60.0, 0.00 }
}
# +--------------------------------------+
# | YamBMS services |
# +--------------------------------------+
# Update service : checks GitHub for a newer YamBMS version.
# Telemetry service : sends anonymous data about your setup (BMS model, board,
# inverter protocol, YamBMS version). It is what tells me which hardware is
# actually in use, so I know where to spend my time. Public stats and details
# on what is collected : stats.yambms.org
yambms_update_service: 'true' # Set to false to disable update checks
yambms_telemetry_service: 'true' # Set to false to disable the sending of telemetry data
# +--------------------------------------+
# | Shunt Settings |
# +--------------------------------------+
shunt_update_interval: '3s' # frequency at which Shunt data is refreshed
@@ -145,16 +156,22 @@ substitutions:
enable_led_logging: 'false' # Set to true to see if an led is assigned to a component correctly, logged every 60 seconds
enable_health_logging: 'false' # Set to true to see if component health for all component instances, logged every 60 seconds
# +--------------------------------------+
# | Advanced options |
# +--------------------------------------+
# Increase the `loop_task_stack_size` value for a large number of BMS / entities
# See https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/LOOP_TASK_STACK.md before changing
loop_task_stack_size: "8192" # 8192 / 16384 / 32768 bytes
# +--------------------------------------+
# | UART expander WK2168 |
# +--------------------------------------+
uart0_baudrate: '2400' # uart_id : uart_${uart_hub_bus}_0 WKS {RJ45-UART0}
uart1_baudrate: '38400' # uart_id : uart_${uart_hub_bus}_1 JSY193
uart2_baudrate: '19200' # uart_id : uart_${uart_hub_bus}_2 SmartShunt
uart3_baudrate: '9600' # uart_id : uart_${uart_hub_bus}_3 SRNE {RJ45-UART3}
uart4_baudrate: '115200' # uart_id : uart_${uart_hub_bus}_4 JK-BMS 1
uart5_baudrate: '115200' # uart_id : uart_${uart_hub_bus}_5 JK-BMS 2
uart6_baudrate: '115200' # uart_id : uart_${uart_hub_bus}_6 Pylontech
uart7_baudrate: '9600' # uart_id : uart_${uart_hub_bus}_7 EPEVER {RJ45-UART7}
# uart_spi_0 : 2400 WKS {RJ45-UART0}
# uart_spi_1 : 38400 JSY193
# uart_spi_2 : 19200 SmartShunt
# uart_spi_3 : 9600 SRNE {RJ45-UART3}
# uart_spi_4 : 115200 JK-BMS 1
# uart_spi_5 : 115200 JK-BMS 2
# uart_spi_6 : 115200 Pylontech
# uart_spi_7 : 9600 EPEVER {RJ45-UART7}
@@ -167,7 +184,8 @@ substitutions:
packages:
board: !include
file: packages/board/board_ESP32-S3_DevKitC-1_PVbrain2.yaml
file: packages/board/board_ESP32-S3_DevKitC-1_PVbrain2_LED-48.yaml # DevKitC-1 V1.0
# file: packages/board/board_ESP32-S3_DevKitC-1_PVbrain2_LED-38.yaml # DevKitC-1 V1.1
# vars:
# server_status_led_id: 'virtual_status_light' # led used to show status. Default = esp_light, set specific led or set to 'virtual_status_light' to disable
# network_status_led_id: 'virtual_status_light' # led used to show status. Default = esp_light, set specific led or set to 'virtual_status_light' to disable
@@ -179,43 +197,36 @@ packages:
# | >>> Uncomment your interfaces and options
# +------------------------------------------------------------------------------+
# UART 1 (uart_id: uart_esp_1)
# uart_esp_1: !include packages/board/board_options_itf_uart_esp_1.yaml
# UART 2 (uart_id: uart_esp_2)
# uart_esp_2: !include packages/board/board_options_itf_uart_esp_2.yaml
# UART 3 (uart_id: uart_esp_3)
# uart_esp_3: !include packages/board/board_options_itf_uart_esp_3.yaml
# BUS
# spi_bus: !include packages/board/board_options_itf_bus_spi.yaml # SPI bus for MCP2515
# spi_bus: !include packages/board/board_options_itf_bus_spi.yaml # SPI bus
# i2c_bus: !include packages/board/board_options_itf_bus_i2c.yaml # I2C bus for SX1509 and BME280/BMP280
# one_wire_bus: !include packages/board/board_options_itf_bus_one_wire.yaml # One wire bus for Dallas Temperature Sensor
# WK2168 UART/IO Expander
wk2168_spi: !include packages/board/board_options_itf_pvbrain2_wk2168_spi.yaml
# wk2168_i2c: !include packages/board/board_options_itf_pvbrain2_wk2168_i2c.yaml
wk2168_spi: !include packages/board/board_options_itf_wk2168_spi.yaml
# wk2168_i2c: !include packages/board/board_options_itf_wk2168_i2c.yaml
# Modbus 1
# modbus_1: !include
# file: 'packages/board/board_options_itf_modbus.yaml'
# vars:
# modbus_id: '1' # can be a number or text or a mixture of both, e.g. full id = modbus_client_1
# modbus_role: 'client' # client / server
# modbus_uart_id: 'uart_spi_1'
# Modbus 2
# modbus_2: !include
# file: 'packages/board/board_options_itf_modbus.yaml'
# vars:
# modbus_id: '2' # can be a number or text or a mixture of both, e.g. full id = modbus_client_2
# modbus_role: 'client' # client / server
# modbus_uart_id: 'uart_spi_2'
# SX1509 16 channel I/O Expander
# sx1509: !include packages/board/board_options_itf_pvbrain2_sx1509.yaml
# CAN transceiver - ESP32_CAN (TJA105x, SN65HVD230, M5Stack CAN base/unit)
canbus_node_1: !include
file: packages/board/board_options_itf_canbus_esp32_can.yaml
vars:
# to bms = canbus_bms_1
# to inverter = canbus_inverter_1
canbus_node_id: 'canbus_inverter_1'
# CAN transceiver - MCP2515
# canbus_node_2: !include
# file: packages/board/board_options_itf_canbus_mcp2515.yaml
# vars:
# # to bms = canbus_bms_1
# # to inverter = canbus_inverter_1
# canbus_node_id: 'canbus_inverter_1'
# PSRAM octal 80Mhz
# psram_octal_80Mhz: !include packages/board/board_options_PSRAM_octal_80Mhz.yaml
psram_octal_80Mhz: !include packages/board/board_options_PSRAM_octal_80Mhz.yaml
# Web Server
# web_server: !include packages/yambms/yambms_web_server.yaml
@@ -258,12 +269,14 @@ packages:
vars:
canbus_id: '1' # Must be a number
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_inverter_1' # CAN bus node to which your inverter is connected
canbus_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# CAN frames sending will be paused for `30s` if the inverter does not respond with an ACK (can_id 0x305) before the end of the `canbus_link_timer` (5s by default).
canbus_link_timer_enabled: 'true' # Set it to 'false' if your inverter/charger is not sending ACK (can_id 0x305) every `1s` as specified by the protocol
canbus_link_timer: '5s'
canbus_extended_ack: 'false' # Set to 'true' for enable extended 29-bit IDs for the ACK can_id 0x305 (required for Schneider XW Pro)
canbus_link_timer: '10s' # min 6s with Deye
# CAN setup
canbus_platform: 'esp32_can' # esp32_can / mcp2515
canbus_node_id: 'canbus_inverter_1' # CAN bus node to which your inverter is connected
canbus_bitrate: '500kbps' # Default : 500kbps
@@ -271,15 +284,19 @@ packages:
# | >>> RS485 bus to Inverter
# +------------------------------------------------------------------------------+
# rs485_pylon: !include
# file: packages/yambms/yambms_rs485_pylon.yaml # yambms_rs485_pylon_web_server.yaml
# rs485_1: !include
# file: 'packages/yambms/yambms_rs485.yaml'
# # file: 'packages/yambms/yambms_rs485_web_server.yaml'
# vars:
# rs485_id: '1' # Must be a number
# rs485_id: '1' # Must be a number
# rs485_name: 'RS485 1'
# rs485_uart_id: 'uart_esp_3' # UART interface to which your inverter is connected
# rs485_uart_baud_rate: '9600'
# rs485_protocol: 'pylon' # pylon / voltronic
# rs485_update_timeout: '10s'
# rs485_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# # UART setup
# rs485_uart_id: 'uart_spi_3' # UART interface to which your inverter is connected
# rs485_uart_baud_rate: '9600' # Default : 9600 / Epever : 115200
# +------------------------------------------------------------------------------+
@@ -287,8 +304,8 @@ packages:
# +------------------------------------------------------------------------------+
device_debug: !include
file: packages/base/device_debug_ESP32.yaml
# file: packages/base/device_debug_ESP32_PSRAM.yaml
# file: packages/base/device_debug_ESP32.yaml
file: packages/base/device_debug_ESP32_PSRAM.yaml
vars:
debug_name: 'Debug'
debug_update_interval: '5s'
+44 -50
View File
@@ -1,5 +1,5 @@
# Updated : 2026.06.29
# Version : 1.7.0
# Updated : 2026.11.08
# Version : 1.8.2
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -90,7 +90,7 @@ substitutions:
# This timer can be deactivated with a switch
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '60'
yambms_cutoff_timer: '180'
# Max. charge current : corresponds to the maximum charge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_charge_current: '300' # in Ampere
@@ -117,7 +117,7 @@ substitutions:
{ 55.0, 0.50 },
{ 60.0, 0.00 }
}
# Temperature °C -> Discharge Rate (0.0C to 1.0C)
# Temperature °C -> Discharge Rate (0.0C to 1.0C)
yambms_discharging_rate_table: |
{
{-30.0, 0.00 },
@@ -132,18 +132,34 @@ substitutions:
{ 60.0, 0.00 }
}
# +--------------------------------------+
# | YamBMS services |
# +--------------------------------------+
# Update service : checks GitHub for a newer YamBMS version.
# Telemetry service : sends anonymous data about your setup (BMS model, board,
# inverter protocol, YamBMS version). It is what tells me which hardware is
# actually in use, so I know where to spend my time. Public stats and details
# on what is collected : stats.yambms.org
yambms_update_service: 'true' # Set to false to disable update checks
yambms_telemetry_service: 'true' # Set to false to disable the sending of telemetry data
# +--------------------------------------+
# | Shunt Settings |
# +--------------------------------------+
shunt_update_interval: '3s' # frequency at which Shunt data is refreshed
shunt_update_interval: '3s' # frequency at which Shunt data is refreshed
# +--------------------------------------+
# | BMS Settings |
# +--------------------------------------+
bms_update_interval: '3s' # frequency at which BMS data is refreshed, going below '3s' can cause problems
bms_update_interval: '3s' # frequency at which BMS data is refreshed, going below '3s' can cause problems
# +--------------------------------------+
# | Health & LED Assignment Logs |
# +--------------------------------------+
enable_led_logging: 'false' # Set to true to see if an led is assigned to a component correctly, logged every 60 seconds
enable_health_logging: 'false' # Set to true to see if component health for all component instances, logged every 60 seconds
enable_led_logging: 'false' # Set to true to see if an led is assigned to a component correctly, logged every 60 seconds
enable_health_logging: 'false' # Set to true to see if component health for all component instances, logged every 60 seconds
# +--------------------------------------+
# | Advanced options |
# +--------------------------------------+
# Increase the `loop_task_stack_size` value for a large number of BMS
# See https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/LOOP_TASK_STACK.md before changing
loop_task_stack_size: "8192" # 8192 / 16384 / 32768 bytes
@@ -213,36 +229,6 @@ packages:
# | >>> Uncomment your interfaces and options
# +------------------------------------------------------------------------------+
# UART 1 (uart_id: uart_esp_1)
uart_esp_1: !include packages/board/board_options_itf_uart_esp_1.yaml
# UART 2 (uart_id: uart_esp_2)
# uart_esp_2: !include packages/board/board_options_itf_uart_esp_2.yaml
# UART 3 (uart_id: uart_esp_3)
# uart_esp_3: !include packages/board/board_options_itf_uart_esp_3.yaml
# UART flow control
# uart_flow_control: !include
# file: packages/board/board_options_itf_uart_flow_control.yaml
# vars:
# uart_id: 'uart_esp_1'
# uart_flow_control_pin: ${talk_pin}
# CAN transceiver - ESP32_CAN (TJA105x, SN65HVD230, M5Stack CAN base/unit)
canbus_node_1: !include
file: packages/board/board_options_itf_canbus_esp32_can.yaml
vars:
# to bms = canbus_bms_1
# to inverter = canbus_inverter_1
canbus_node_id: 'canbus_inverter_1'
# CAN transceiver - MCP2515
# canbus_node_2: !include
# file: packages/board/board_options_itf_canbus_mcp2515.yaml
# vars:
# # to bms = canbus_bms_1
# # to inverter = canbus_inverter_1
# canbus_node_id: 'canbus_inverter_1'
# PSRAM octal 80Mhz
# psram_octal_80Mhz: !include packages/board/board_options_PSRAM_octal_80Mhz.yaml
@@ -283,16 +269,19 @@ packages:
# +------------------------------------------------------------------------------+
canbus1: !include
file: packages/yambms/yambms_canbus.yaml # yambms_canbus_web_server.yaml
file: packages/yambms/yambms_canbus.yaml
# file: packages/yambms/yambms_canbus_web_server.yaml
vars:
canbus_id: '1' # Must be a number
canbus_id: '1' # Must be a number
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_inverter_1' # CAN bus node to which your inverter is connected
canbus_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
canbus_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# CAN frames sending will be paused for `30s` if the inverter does not respond with an ACK (can_id 0x305) before the end of the `canbus_link_timer` (5s by default).
canbus_link_timer_enabled: 'true' # Set it to 'false' if your inverter/charger is not sending ACK (can_id 0x305) every `1s` as specified by the protocol
canbus_link_timer: '5s'
canbus_extended_ack: 'false' # Set to 'true' for enable extended 29-bit IDs for the ACK can_id 0x305 (required for Schneider XW Pro)
canbus_link_timer_enabled: 'true' # Set it to 'false' if your inverter/charger is not sending ACK (can_id 0x305) every `1s` as specified by the protocol
canbus_link_timer: '10s' # min 6s with Deye
# CAN setup
canbus_platform: 'esp32_can' # esp32_can / mcp2515
canbus_node_id: 'canbus_inverter_1' # CAN bus node to which your inverter is connected
canbus_bitrate: '500kbps' # Default : 500kbps
@@ -300,15 +289,20 @@ packages:
# | >>> RS485 bus to Inverter
# +------------------------------------------------------------------------------+
# rs485_pylon: !include
# file: packages/yambms/yambms_rs485_pylon.yaml # yambms_rs485_pylon_web_server.yaml
# rs485_1: !include
# file: 'packages/yambms/yambms_rs485.yaml'
# # file: 'packages/yambms/yambms_rs485_web_server.yaml'
# vars:
# rs485_id: '1' # Must be a number
# rs485_id: '1' # Must be a number
# rs485_name: 'RS485 1'
# rs485_uart_id: 'uart_esp_3' # UART interface to which your inverter is connected
# rs485_uart_baud_rate: '9600'
# rs485_protocol: 'pylon' # pylon / voltronic
# rs485_update_timeout: '10s'
# rs485_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# # UART setup
# rs485_uart_id: 'uart_esp_3' # UART interface to which your inverter is connected
# # ESP32 : uart_esp_1 to uart_esp_3
# # WK2168 : uart_spi_0 to uart_spi_7 / uart_i2c_0 to uart_i2c_7
# rs485_uart_baud_rate: '9600' # Default : 9600 / Epever : 115200
+31 -37
View File
@@ -1,5 +1,5 @@
# Updated : 2026.06.29
# Version : 1.7.0
# Updated : 2026.11.08
# Version : 1.8.2
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -90,7 +90,7 @@ substitutions:
# This timer can be deactivated with a switch
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '60'
yambms_cutoff_timer: '180'
# Max. charge current : corresponds to the maximum charge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_charge_current: '300' # in Ampere
@@ -132,6 +132,16 @@ substitutions:
{ 60.0, 0.00 }
}
# +--------------------------------------+
# | YamBMS services |
# +--------------------------------------+
# Update service : checks GitHub for a newer YamBMS version.
# Telemetry service : sends anonymous data about your setup (BMS model, board,
# inverter protocol, YamBMS version). It is what tells me which hardware is
# actually in use, so I know where to spend my time. Public stats and details
# on what is collected : stats.yambms.org
yambms_update_service: 'true' # Set to false to disable update checks
yambms_telemetry_service: 'true' # Set to false to disable the sending of telemetry data
# +--------------------------------------+
# | Shunt Settings |
# +--------------------------------------+
shunt_update_interval: '3s' # frequency at which Shunt data is refreshed
@@ -144,6 +154,12 @@ substitutions:
# +--------------------------------------+
enable_led_logging: 'false' # Set to true to see if an led is assigned to a component correctly, logged every 60 seconds
enable_health_logging: 'false' # Set to true to see if component health for all component instances, logged every 60 seconds
# +--------------------------------------+
# | Advanced options |
# +--------------------------------------+
# Increase the `loop_task_stack_size` value for a large number of BMS
# See https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/LOOP_TASK_STACK.md before changing
loop_task_stack_size: "8192" # 8192 / 16384 / 32768 bytes
@@ -214,33 +230,6 @@ packages:
# | >>> Uncomment your interfaces and options
# +------------------------------------------------------------------------------+
# UART 1 (uart_id: uart_esp_1)
- path: 'packages/board/board_options_itf_uart_esp_1.yaml'
# UART 2 (uart_id: uart_esp_2)
# - path: 'packages/board/board_options_itf_uart_esp_2.yaml'
# UART 3 (uart_id: uart_esp_3)
# - path: 'packages/board/board_options_itf_uart_esp_3.yaml'
# UART flow control
# - path: 'packages/board/board_options_itf_uart_flow_control.yaml'
# vars:
# uart_id: 'uart_esp_1'
# uart_flow_control_pin: ${talk_pin}
# CAN transceiver - ESP32_CAN (TJA105x, SN65HVD230, M5Stack CAN base/unit)
- path: 'packages/board/board_options_itf_canbus_esp32_can.yaml'
vars:
# to bms = canbus_bms_1
# to inverter = canbus_inverter_1
canbus_node_id: 'canbus_inverter_1'
# CAN transceiver - MCP2515
# - path: 'packages/board/board_options_itf_canbus_mcp2515.yaml'
# vars:
# # to bms = canbus_bms_1
# # to inverter = canbus_inverter_1
# canbus_node_id: 'canbus_inverter_1'
# PSRAM octal 80Mhz
# - path: 'packages/board/board_options_PSRAM_octal_80Mhz.yaml'
@@ -308,12 +297,14 @@ packages:
vars:
canbus_id: '1' # must be a number
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_inverter_1' # CAN bus node to which your inverter is connected
canbus_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# CAN frames sending will be paused for `30s` if the inverter does not respond with an ACK (can_id 0x305) before the end of the `canbus_link_timer` (5s by default).
canbus_link_timer_enabled: 'true' # Set it to 'false' if your inverter/charger is not sending ACK (can_id 0x305) every `1s` as specified by the protocol
canbus_link_timer: '5s'
canbus_extended_ack: 'false' # Set to 'true' for enable extended 29-bit IDs (required for Schneider XW Pro)
canbus_link_timer: '10s' # min 6s with Deye
# CAN setup
canbus_platform: 'esp32_can' # esp32_can / mcp2515
canbus_node_id: 'canbus_inverter_1' # CAN bus node to which your inverter is connected
canbus_bitrate: '500kbps' # Default : 500kbps
@@ -321,14 +312,17 @@ packages:
# | >>> RS485 bus to Inverter
# +------------------------------------------------------------------------------+
# - path: 'packages/yambms/yambms_rs485_pylon.yaml' # yambms_rs485_pylon_web_server.yaml
# - path: 'packages/yambms/yambms_rs485.yaml'
# # - path: 'packages/yambms/yambms_rs485_web_server.yaml'
# vars:
# rs485_id: '1' # Must be a number
# rs485_id: '1' # Must be a number
# rs485_name: 'RS485 1'
# rs485_uart_id: 'uart_esp_3' # UART interface to which your inverter is connected
# rs485_uart_baud_rate: '9600'
# rs485_protocol: 'pylon' # pylon / voltronic
# rs485_update_timeout: '10s'
# rs485_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# # UART setup
# rs485_uart_id: 'uart_esp_3' # UART interface to which your inverter is connected
# rs485_uart_baud_rate: '9600' # Default : 9600 / Epever : 115200
+33 -37
View File
@@ -1,5 +1,5 @@
# Updated : 2026.06.29
# Version : 1.7.0
# Updated : 2026.11.08
# Version : 1.8.2
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -90,7 +90,7 @@ substitutions:
# This timer can be deactivated with a switch
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '60'
yambms_cutoff_timer: '180'
# Max. charge current : corresponds to the maximum charge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_charge_current: '300' # in Ampere
@@ -132,6 +132,16 @@ substitutions:
{ 60.0, 0.00 }
}
# +--------------------------------------+
# | YamBMS services |
# +--------------------------------------+
# Update service : checks GitHub for a newer YamBMS version.
# Telemetry service : sends anonymous data about your setup (BMS model, board,
# inverter protocol, YamBMS version). It is what tells me which hardware is
# actually in use, so I know where to spend my time. Public stats and details
# on what is collected : stats.yambms.org
yambms_update_service: 'true' # Set to false to disable update checks
yambms_telemetry_service: 'true' # Set to false to disable the sending of telemetry data
# +--------------------------------------+
# | Shunt Settings |
# +--------------------------------------+
shunt_update_interval: '3s' # frequency at which Shunt data is refreshed
@@ -144,6 +154,12 @@ substitutions:
# +--------------------------------------+
enable_led_logging: 'false' # Set to true to see if an led is assigned to a component correctly, logged every 60 seconds
enable_health_logging: 'false' # Set to true to see if component health for all component instances, logged every 60 seconds
# +--------------------------------------+
# | Advanced options |
# +--------------------------------------+
# Increase the `loop_task_stack_size` value for a large number of BMS
# See https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/LOOP_TASK_STACK.md before changing
loop_task_stack_size: "8192" # 8192 / 16384 / 32768 bytes
@@ -215,33 +231,6 @@ packages:
# | >>> Uncomment your interfaces and options
# +------------------------------------------------------------------------------+
# UART 1 (uart_id: uart_esp_1)
# - path: 'packages/board/board_options_itf_uart_esp_1.yaml'
# UART 2 (uart_id: uart_esp_2)
# - path: 'packages/board/board_options_itf_uart_esp_2.yaml'
# UART 3 (uart_id: uart_esp_3)
# - path: 'packages/board/board_options_itf_uart_esp_3.yaml'
# UART flow control
# - path: 'packages/board/board_options_itf_uart_flow_control.yaml'
# vars:
# uart_id: 'uart_esp_1'
# uart_flow_control_pin: ${talk_pin}
# CAN transceiver - ESP32_CAN (TJA105x, SN65HVD230, M5Stack CAN base/unit)
- path: 'packages/board/board_options_itf_canbus_esp32_can.yaml'
vars:
# to bms = canbus_bms_1
# to inverter = canbus_inverter_1
canbus_node_id: 'canbus_inverter_1'
# CAN transceiver - MCP2515
- path: 'packages/board/board_options_itf_canbus_mcp2515.yaml'
vars:
# to bms = canbus_bms_1
# to inverter = canbus_inverter_1
canbus_node_id: 'canbus_bms_1'
# PSRAM octal 80Mhz
# - path: 'packages/board/board_options_PSRAM_octal_80Mhz.yaml'
@@ -274,6 +263,8 @@ packages:
vars:
# CAN BUS ID
canbus_id: 'canbus_bms_1'
canbus_platform: 'mcp2515' # esp32_can / mcp2515
canbus_bitrate: '500kbps' # Default : 500kbps
deye_name: 'DEYE-Top 1'
deye_id: '1'
# Deye module 1
@@ -317,12 +308,14 @@ packages:
vars:
canbus_id: '1' # must be a number
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_inverter_1' # CAN bus node to which your inverter is connected
canbus_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# CAN frames sending will be paused for `30s` if the inverter does not respond with an ACK (can_id 0x305) before the end of the `canbus_link_timer` (5s by default).
canbus_link_timer_enabled: 'true' # Set it to 'false' if your inverter/charger is not sending ACK (can_id 0x305) every `1s` as specified by the protocol
canbus_link_timer: '5s'
canbus_extended_ack: 'false' # Set to 'true' for enable extended 29-bit IDs (required for Schneider XW Pro)
canbus_link_timer: '10s' # min 6s with Deye
# CAN setup
canbus_platform: 'esp32_can' # esp32_can / mcp2515
canbus_node_id: 'canbus_inverter_1' # CAN bus node to which your inverter is connected
canbus_bitrate: '500kbps' # Default : 500kbps
@@ -330,14 +323,17 @@ packages:
# | >>> RS485 bus to Inverter
# +------------------------------------------------------------------------------+
# - path: 'packages/yambms/yambms_rs485_pylon.yaml' # yambms_rs485_pylon_web_server.yaml
# - path: 'packages/yambms/yambms_rs485.yaml'
# # - path: 'packages/yambms/yambms_rs485_web_server.yaml'
# vars:
# rs485_id: '1' # Must be a number
# rs485_id: '1' # Must be a number
# rs485_name: 'RS485 1'
# rs485_uart_id: 'uart_esp_3' # UART interface to which your inverter is connected
# rs485_uart_baud_rate: '9600'
# rs485_protocol: 'pylon' # pylon / voltronic
# rs485_update_timeout: '10s'
# rs485_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# # UART setup
# rs485_uart_id: 'uart_esp_3' # UART interface to which your inverter is connected
# rs485_uart_baud_rate: '9600' # Default : 9600 / Epever : 115200
+49 -37
View File
@@ -1,5 +1,5 @@
# Updated : 2026.06.29
# Version : 1.7.0
# Updated : 2026.11.19
# Version : 1.8.2
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -90,7 +90,7 @@ substitutions:
# This timer can be deactivated with a switch
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '60'
yambms_cutoff_timer: '180'
# Max. charge current : corresponds to the maximum charge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_charge_current: '300' # in Ampere
@@ -132,6 +132,16 @@ substitutions:
{ 60.0, 0.00 }
}
# +--------------------------------------+
# | YamBMS services |
# +--------------------------------------+
# Update service : checks GitHub for a newer YamBMS version.
# Telemetry service : sends anonymous data about your setup (BMS model, board,
# inverter protocol, YamBMS version). It is what tells me which hardware is
# actually in use, so I know where to spend my time. Public stats and details
# on what is collected : stats.yambms.org
yambms_update_service: 'true' # Set to false to disable update checks
yambms_telemetry_service: 'true' # Set to false to disable the sending of telemetry data
# +--------------------------------------+
# | Shunt Settings |
# +--------------------------------------+
shunt_update_interval: '3s' # frequency at which Shunt data is refreshed
@@ -144,6 +154,12 @@ substitutions:
# +--------------------------------------+
enable_led_logging: 'false' # Set to true to see if an led is assigned to a component correctly, logged every 60 seconds
enable_health_logging: 'false' # Set to true to see if component health for all component instances, logged every 60 seconds
# +--------------------------------------+
# | Advanced options |
# +--------------------------------------+
# Increase the `loop_task_stack_size` value for a large number of BMS
# See https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/LOOP_TASK_STACK.md before changing
loop_task_stack_size: "8192" # 8192 / 16384 / 32768 bytes
@@ -214,33 +230,6 @@ packages:
# | >>> Uncomment your interfaces and options
# +------------------------------------------------------------------------------+
# UART 1 (uart_id: uart_esp_1)
- path: 'packages/board/board_options_itf_uart_esp_1.yaml'
# UART 2 (uart_id: uart_esp_2)
# - path: 'packages/board/board_options_itf_uart_esp_2.yaml'
# UART 3 (uart_id: uart_esp_3)
# - path: 'packages/board/board_options_itf_uart_esp_3.yaml'
# UART flow control
# - path: 'packages/board/board_options_itf_uart_flow_control.yaml'
# vars:
# uart_id: 'uart_esp_1'
# uart_flow_control_pin: ${talk_pin}
# CAN transceiver - ESP32_CAN (TJA105x, SN65HVD230, M5Stack CAN base/unit)
- path: 'packages/board/board_options_itf_canbus_esp32_can.yaml'
vars:
# to bms = canbus_bms_1
# to inverter = canbus_inverter_1
canbus_node_id: 'canbus_inverter_1'
# CAN transceiver - MCP2515
# - path: 'packages/board/board_options_itf_canbus_mcp2515.yaml'
# vars:
# # to bms = canbus_bms_1
# # to inverter = canbus_inverter_1
# canbus_node_id: 'canbus_inverter_1'
# PSRAM octal 80Mhz
# - path: 'packages/board/board_options_PSRAM_octal_80Mhz.yaml'
@@ -280,6 +269,12 @@ packages:
bms_name: 'EG4-BMS 1'
## BMS address must start at 2 with EG4 LLV2, ID 1 is a special case and has different output.
bms_address: 2 # BMS 1 modbus address
bms_balance_trigger_voltage: '0.030' # V. Cell spread at which the BMS balances, set yours
# Fake Equalizing: this BMS does not report its balancing state. When enabled, YamBMS infers it
# from the cell spread and holds the Cut-Off timer while the pack balances, instead of ending the charge.
# Warning: a BMS without a balancer (or with balancing disabled) never closes its cell spread, so it can
# stay in Cut-Off a long time, until the EOC timer (30min default) ends the charge, or forever if disabled.
bms_fake_equalizing_enabled: 'false' # true/false, false by default
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# BMS 2
- path: 'packages/bms/bms_combine_EG4_LLV2_RS485_bms_full.yaml'
@@ -287,6 +282,12 @@ packages:
bms_id: '2' # must be a number
bms_name: 'EG4-BMS 2'
bms_address: 3 # BMS 2 modbus address
bms_balance_trigger_voltage: '0.030' # V. Cell spread at which the BMS balances, set yours
# Fake Equalizing: this BMS does not report its balancing state. When enabled, YamBMS infers it
# from the cell spread and holds the Cut-Off timer while the pack balances, instead of ending the charge.
# Warning: a BMS without a balancer (or with balancing disabled) never closes its cell spread, so it can
# stay in Cut-Off a long time, until the EOC timer (30min default) ends the charge, or forever if disabled.
bms_fake_equalizing_enabled: 'false' # true/false, false by default
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# BMS 3
- path: 'packages/bms/bms_combine_EG4_LLV2_RS485_bms_full.yaml'
@@ -294,6 +295,12 @@ packages:
bms_id: '3' # must be a number
bms_name: 'EG4-BMS 3'
bms_address: 4 # BMS 3 modbus address
bms_balance_trigger_voltage: '0.030' # V. Cell spread at which the BMS balances, set yours
# Fake Equalizing: this BMS does not report its balancing state. When enabled, YamBMS infers it
# from the cell spread and holds the Cut-Off timer while the pack balances, instead of ending the charge.
# Warning: a BMS without a balancer (or with balancing disabled) never closes its cell spread, so it can
# stay in Cut-Off a long time, until the EOC timer (30min default) ends the charge, or forever if disabled.
bms_fake_equalizing_enabled: 'false' # true/false, false by default
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
@@ -314,12 +321,14 @@ packages:
vars:
canbus_id: '1' # must be a number
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_inverter_1' # CAN bus node to which your inverter is connected
canbus_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# CAN frames sending will be paused for `30s` if the inverter does not respond with an ACK (can_id 0x305) before the end of the `canbus_link_timer` (5s by default).
canbus_link_timer_enabled: 'true' # Set it to 'false' if your inverter/charger is not sending ACK (can_id 0x305) every `1s` as specified by the protocol
canbus_link_timer: '5s'
canbus_extended_ack: 'false' # Set to 'true' for enable extended 29-bit IDs (required for Schneider XW Pro)
canbus_link_timer: '10s' # min 6s with Deye
# CAN setup
canbus_platform: 'esp32_can' # esp32_can / mcp2515
canbus_node_id: 'canbus_inverter_1' # CAN bus node to which your inverter is connected
canbus_bitrate: '500kbps' # Default : 500kbps
@@ -327,14 +336,17 @@ packages:
# | >>> RS485 bus to Inverter
# +------------------------------------------------------------------------------+
# - path: 'packages/yambms/yambms_rs485_pylon.yaml' # yambms_rs485_pylon_web_server.yaml
# - path: 'packages/yambms/yambms_rs485.yaml'
# # - path: 'packages/yambms/yambms_rs485_web_server.yaml'
# vars:
# rs485_id: '1' # Must be a number
# rs485_id: '1' # Must be a number
# rs485_name: 'RS485 1'
# rs485_uart_id: 'uart_esp_3' # UART interface to which your inverter is connected
# rs485_uart_baud_rate: '9600'
# rs485_protocol: 'pylon' # pylon / voltronic
# rs485_update_timeout: '10s'
# rs485_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# # UART setup
# rs485_uart_id: 'uart_esp_3' # UART interface to which your inverter is connected
# rs485_uart_baud_rate: '9600' # Default : 9600 / Epever : 115200
+32 -37
View File
@@ -1,5 +1,5 @@
# Updated : 2026.06.29
# Version : 1.7.0
# Updated : 2026.11.08
# Version : 1.8.2
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -90,7 +90,7 @@ substitutions:
# This timer can be deactivated with a switch
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '60'
yambms_cutoff_timer: '180'
# Max. charge current : corresponds to the maximum charge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_charge_current: '300' # in Ampere
@@ -132,6 +132,16 @@ substitutions:
{ 60.0, 0.00 }
}
# +--------------------------------------+
# | YamBMS services |
# +--------------------------------------+
# Update service : checks GitHub for a newer YamBMS version.
# Telemetry service : sends anonymous data about your setup (BMS model, board,
# inverter protocol, YamBMS version). It is what tells me which hardware is
# actually in use, so I know where to spend my time. Public stats and details
# on what is collected : stats.yambms.org
yambms_update_service: 'true' # Set to false to disable update checks
yambms_telemetry_service: 'true' # Set to false to disable the sending of telemetry data
# +--------------------------------------+
# | Shunt Settings |
# +--------------------------------------+
shunt_update_interval: '3s' # frequency at which Shunt data is refreshed
@@ -144,6 +154,12 @@ substitutions:
# +--------------------------------------+
enable_led_logging: 'false' # Set to true to see if an led is assigned to a component correctly, logged every 60 seconds
enable_health_logging: 'false' # Set to true to see if component health for all component instances, logged every 60 seconds
# +--------------------------------------+
# | Advanced options |
# +--------------------------------------+
# Increase the `loop_task_stack_size` value for a large number of BMS
# See https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/LOOP_TASK_STACK.md before changing
loop_task_stack_size: "8192" # 8192 / 16384 / 32768 bytes
@@ -214,33 +230,6 @@ packages:
# | >>> Uncomment your interfaces and options
# +------------------------------------------------------------------------------+
# UART 1 (uart_id: uart_esp_1)
- path: 'packages/board/board_options_itf_uart_esp_1.yaml'
# UART 2 (uart_id: uart_esp_2)
# - path: 'packages/board/board_options_itf_uart_esp_2.yaml'
# UART 3 (uart_id: uart_esp_3)
# - path: 'packages/board/board_options_itf_uart_esp_3.yaml'
# UART flow control
# - path: 'packages/board/board_options_itf_uart_flow_control.yaml'
# vars:
# uart_id: 'uart_esp_1'
# uart_flow_control_pin: ${talk_pin}
# CAN transceiver - ESP32_CAN (TJA105x, SN65HVD230, M5Stack CAN base/unit)
- path: 'packages/board/board_options_itf_canbus_esp32_can.yaml'
vars:
# to bms = canbus_bms_1
# to inverter = canbus_inverter_1
canbus_node_id: 'canbus_inverter_1'
# CAN transceiver - MCP2515
# - path: 'packages/board/board_options_itf_canbus_mcp2515.yaml'
# vars:
# # to bms = canbus_bms_1
# # to inverter = canbus_inverter_1
# canbus_node_id: 'canbus_inverter_1'
# PSRAM octal 80Mhz
# - path: 'packages/board/board_options_PSRAM_octal_80Mhz.yaml'
@@ -315,12 +304,14 @@ packages:
vars:
canbus_id: '1' # must be a number
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_inverter_1' # CAN bus node to which your inverter is connected
canbus_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# CAN frames sending will be paused for `30s` if the inverter does not respond with an ACK (can_id 0x305) before the end of the `canbus_link_timer` (5s by default).
canbus_link_timer_enabled: 'true' # Set it to 'false' if your inverter/charger is not sending ACK (can_id 0x305) every `1s` as specified by the protocol
canbus_link_timer: '5s'
canbus_extended_ack: 'false' # Set to 'true' for enable extended 29-bit IDs (required for Schneider XW Pro)
canbus_link_timer: '10s' # min 6s with Deye
# CAN setup
canbus_platform: 'esp32_can' # esp32_can / mcp2515
canbus_node_id: 'canbus_inverter_1' # CAN bus node to which your inverter is connected
canbus_bitrate: '500kbps' # Default : 500kbps
@@ -328,14 +319,18 @@ packages:
# | >>> RS485 bus to Inverter
# +------------------------------------------------------------------------------+
# - path: 'packages/yambms/yambms_rs485_pylon.yaml' # yambms_rs485_pylon_web_server.yaml
# - path: 'packages/yambms/yambms_rs485.yaml'
# # - path: 'packages/yambms/yambms_rs485_web_server.yaml'
# vars:
# rs485_id: '1' # Must be a number
# rs485_id: '1' # Must be a number
# rs485_name: 'RS485 1'
# rs485_uart_id: 'uart_esp_3' # UART interface to which your inverter is connected
# rs485_uart_baud_rate: '9600'
# rs485_protocol: 'pylon' # pylon / voltronic
# rs485_update_timeout: '10s'
# rs485_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# # UART setup
# rs485_uart_id: 'uart_esp_3' # UART interface to which your inverter is connected
# rs485_uart_baud_rate: '9600' # Default : 9600 / Epever : 115200
# +------------------------------------------------------------------------------+
+31 -37
View File
@@ -1,5 +1,5 @@
# Updated : 2026.06.29
# Version : 1.7.0
# Updated : 2026.11.08
# Version : 1.8.2
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -90,7 +90,7 @@ substitutions:
# This timer can be deactivated with a switch
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '60'
yambms_cutoff_timer: '180'
# Max. charge current : corresponds to the maximum charge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_charge_current: '300' # in Ampere
@@ -132,6 +132,16 @@ substitutions:
{ 60.0, 0.00 }
}
# +--------------------------------------+
# | YamBMS services |
# +--------------------------------------+
# Update service : checks GitHub for a newer YamBMS version.
# Telemetry service : sends anonymous data about your setup (BMS model, board,
# inverter protocol, YamBMS version). It is what tells me which hardware is
# actually in use, so I know where to spend my time. Public stats and details
# on what is collected : stats.yambms.org
yambms_update_service: 'true' # Set to false to disable update checks
yambms_telemetry_service: 'true' # Set to false to disable the sending of telemetry data
# +--------------------------------------+
# | Shunt Settings |
# +--------------------------------------+
shunt_update_interval: '3s' # frequency at which Shunt data is refreshed
@@ -144,6 +154,12 @@ substitutions:
# +--------------------------------------+
enable_led_logging: 'false' # Set to true to see if an led is assigned to a component correctly, logged every 60 seconds
enable_health_logging: 'false' # Set to true to see if component health for all component instances, logged every 60 seconds
# +--------------------------------------+
# | Advanced options |
# +--------------------------------------+
# Increase the `loop_task_stack_size` value for a large number of BMS
# See https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/LOOP_TASK_STACK.md before changing
loop_task_stack_size: "8192" # 8192 / 16384 / 32768 bytes
@@ -214,33 +230,6 @@ packages:
# | >>> Uncomment your interfaces and options
# +------------------------------------------------------------------------------+
# UART 1 (uart_id: uart_esp_1)
- path: 'packages/board/board_options_itf_uart_esp_1.yaml'
# UART 2 (uart_id: uart_esp_2)
# - path: 'packages/board/board_options_itf_uart_esp_2.yaml'
# UART 3 (uart_id: uart_esp_3)
# - path: 'packages/board/board_options_itf_uart_esp_3.yaml'
# UART flow control
# - path: 'packages/board/board_options_itf_uart_flow_control.yaml'
# vars:
# uart_id: 'uart_esp_1'
# uart_flow_control_pin: ${talk_pin}
# CAN transceiver - ESP32_CAN (TJA105x, SN65HVD230, M5Stack CAN base/unit)
- path: 'packages/board/board_options_itf_canbus_esp32_can.yaml'
vars:
# to bms = canbus_bms_1
# to inverter = canbus_inverter_1
canbus_node_id: 'canbus_inverter_1'
# CAN transceiver - MCP2515
# - path: 'packages/board/board_options_itf_canbus_mcp2515.yaml'
# vars:
# # to bms = canbus_bms_1
# # to inverter = canbus_inverter_1
# canbus_node_id: 'canbus_inverter_1'
# PSRAM octal 80Mhz
# - path: 'packages/board/board_options_PSRAM_octal_80Mhz.yaml'
@@ -324,12 +313,14 @@ packages:
vars:
canbus_id: '1' # must be a number
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_inverter_1' # CAN bus node to which your inverter is connected
canbus_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# CAN frames sending will be paused for `30s` if the inverter does not respond with an ACK (can_id 0x305) before the end of the `canbus_link_timer` (5s by default).
canbus_link_timer_enabled: 'true' # Set it to 'false' if your inverter/charger is not sending ACK (can_id 0x305) every `1s` as specified by the protocol
canbus_link_timer: '5s'
canbus_extended_ack: 'false' # Set to 'true' for enable extended 29-bit IDs (required for Schneider XW Pro)
canbus_link_timer: '10s' # min 6s with Deye
# CAN setup
canbus_platform: 'esp32_can' # esp32_can / mcp2515
canbus_node_id: 'canbus_inverter_1' # CAN bus node to which your inverter is connected
canbus_bitrate: '500kbps' # Default : 500kbps
@@ -337,14 +328,17 @@ packages:
# | >>> RS485 bus to Inverter
# +------------------------------------------------------------------------------+
# - path: 'packages/yambms/yambms_rs485_pylon.yaml' # yambms_rs485_pylon_web_server.yaml
# - path: 'packages/yambms/yambms_rs485.yaml'
# # - path: 'packages/yambms/yambms_rs485_web_server.yaml'
# vars:
# rs485_id: '1' # Must be a number
# rs485_id: '1' # Must be a number
# rs485_name: 'RS485 1'
# rs485_uart_id: 'uart_esp_3' # UART interface to which your inverter is connected
# rs485_uart_baud_rate: '9600'
# rs485_protocol: 'pylon' # pylon / voltronic
# rs485_update_timeout: '10s'
# rs485_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# # UART setup
# rs485_uart_id: 'uart_esp_3' # UART interface to which your inverter is connected
# rs485_uart_baud_rate: '9600' # Default : 9600 / Epever : 115200
+32 -44
View File
@@ -1,5 +1,5 @@
# Updated : 2026.06.29
# Version : 1.7.0
# Updated : 2026.11.11
# Version : 1.8.2
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -90,7 +90,7 @@ substitutions:
# This timer can be deactivated with a switch
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '60'
yambms_cutoff_timer: '180'
# Max. charge current : corresponds to the maximum charge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_charge_current: '300' # in Ampere
@@ -132,6 +132,16 @@ substitutions:
{ 60.0, 0.00 }
}
# +--------------------------------------+
# | YamBMS services |
# +--------------------------------------+
# Update service : checks GitHub for a newer YamBMS version.
# Telemetry service : sends anonymous data about your setup (BMS model, board,
# inverter protocol, YamBMS version). It is what tells me which hardware is
# actually in use, so I know where to spend my time. Public stats and details
# on what is collected : stats.yambms.org
yambms_update_service: 'true' # Set to false to disable update checks
yambms_telemetry_service: 'true' # Set to false to disable the sending of telemetry data
# +--------------------------------------+
# | Shunt Settings |
# +--------------------------------------+
shunt_update_interval: '3s' # frequency at which Shunt data is refreshed
@@ -144,6 +154,12 @@ substitutions:
# +--------------------------------------+
enable_led_logging: 'false' # Set to true to see if an led is assigned to a component correctly, logged every 60 seconds
enable_health_logging: 'false' # Set to true to see if component health for all component instances, logged every 60 seconds
# +--------------------------------------+
# | Advanced options |
# +--------------------------------------+
# Increase the `loop_task_stack_size` value for a large number of BMS
# See https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/LOOP_TASK_STACK.md before changing
loop_task_stack_size: "8192" # 8192 / 16384 / 32768 bytes
@@ -214,33 +230,6 @@ packages:
# | >>> Uncomment your interfaces and options
# +------------------------------------------------------------------------------+
# UART 1 (uart_id: uart_esp_1)
- path: 'packages/board/board_options_itf_uart_esp_1.yaml'
# UART 2 (uart_id: uart_esp_2)
# - path: 'packages/board/board_options_itf_uart_esp_2.yaml'
# UART 3 (uart_id: uart_esp_3)
# - path: 'packages/board/board_options_itf_uart_esp_3.yaml'
# UART flow control
# - path: 'packages/board/board_options_itf_uart_flow_control.yaml'
# vars:
# uart_id: 'uart_esp_1'
# uart_flow_control_pin: ${talk_pin}
# CAN transceiver - ESP32_CAN (TJA105x, SN65HVD230, M5Stack CAN base/unit)
- path: 'packages/board/board_options_itf_canbus_esp32_can.yaml'
vars:
# to bms = canbus_bms_1
# to inverter = canbus_inverter_1
canbus_node_id: 'canbus_inverter_1'
# CAN transceiver - MCP2515
# - path: 'packages/board/board_options_itf_canbus_mcp2515.yaml'
# vars:
# # to bms = canbus_bms_1
# # to inverter = canbus_inverter_1
# canbus_node_id: 'canbus_inverter_1'
# PSRAM octal 80Mhz
# - path: 'packages/board/board_options_PSRAM_octal_80Mhz.yaml'
@@ -268,17 +257,11 @@ packages:
# RS485 Sniffer with talk_pin (WS-RS485-CAN and other RS485 boards with a flow_control_pin)
# - path: 'packages/bms/bms_combine_JK_RS485_Modbus_sniffer_talk_pin.yaml'
# vars:
# sniffer_protocol: 'JK02_32S'
# sniffer_uart_id: 'uart_esp_1'
# sniffer_talk_pin: ${talk_pin} # can be replaced by the GPIO number
# RS485 Sniffer
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_sniffer.yaml'
vars:
sniffer_protocol: 'JK02_32S'
sniffer_uart_id: 'uart_esp_1'
# uart_flow_control_pin: ${talk_pin} # WS-RS485-CAN and other RS485 boards with a flow_control_pin
# BMS 1
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_JK-B_standard.yaml'
vars:
@@ -354,12 +337,14 @@ packages:
vars:
canbus_id: '1' # must be a number
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_inverter_1' # CAN bus node to which your inverter is connected
canbus_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# CAN frames sending will be paused for `30s` if the inverter does not respond with an ACK (can_id 0x305) before the end of the `canbus_link_timer` (5s by default).
canbus_link_timer_enabled: 'true' # Set it to 'false' if your inverter/charger is not sending ACK (can_id 0x305) every `1s` as specified by the protocol
canbus_link_timer: '5s'
canbus_extended_ack: 'false' # Set to 'true' for enable extended 29-bit IDs (required for Schneider XW Pro)
canbus_link_timer: '10s' # min 6s with Deye
# CAN setup
canbus_platform: 'esp32_can' # esp32_can / mcp2515
canbus_node_id: 'canbus_inverter_1' # CAN bus node to which your inverter is connected
canbus_bitrate: '500kbps' # Default : 500kbps
@@ -367,14 +352,17 @@ packages:
# | >>> RS485 bus to Inverter
# +------------------------------------------------------------------------------+
# - path: 'packages/yambms/yambms_rs485_pylon.yaml' # yambms_rs485_pylon_web_server.yaml
# - path: 'packages/yambms/yambms_rs485.yaml'
# # - path: 'packages/yambms/yambms_rs485_web_server.yaml'
# vars:
# rs485_id: '1' # Must be a number
# rs485_id: '1' # Must be a number
# rs485_name: 'RS485 1'
# rs485_uart_id: 'uart_esp_3' # UART interface to which your inverter is connected
# rs485_uart_baud_rate: '9600'
# rs485_protocol: 'pylon' # pylon / voltronic
# rs485_update_timeout: '10s'
# rs485_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# # UART setup
# rs485_uart_id: 'uart_esp_3' # UART interface to which your inverter is connected
# rs485_uart_baud_rate: '9600' # Default : 9600 / Epever : 115200
+32 -44
View File
@@ -1,5 +1,5 @@
# Updated : 2026.06.29
# Version : 1.7.0
# Updated : 2026.11.11
# Version : 1.8.2
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -90,7 +90,7 @@ substitutions:
# This timer can be deactivated with a switch
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '60'
yambms_cutoff_timer: '180'
# Max. charge current : corresponds to the maximum charge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_charge_current: '300' # in Ampere
@@ -132,6 +132,16 @@ substitutions:
{ 60.0, 0.00 }
}
# +--------------------------------------+
# | YamBMS services |
# +--------------------------------------+
# Update service : checks GitHub for a newer YamBMS version.
# Telemetry service : sends anonymous data about your setup (BMS model, board,
# inverter protocol, YamBMS version). It is what tells me which hardware is
# actually in use, so I know where to spend my time. Public stats and details
# on what is collected : stats.yambms.org
yambms_update_service: 'true' # Set to false to disable update checks
yambms_telemetry_service: 'true' # Set to false to disable the sending of telemetry data
# +--------------------------------------+
# | Shunt Settings |
# +--------------------------------------+
shunt_update_interval: '3s' # frequency at which Shunt data is refreshed
@@ -144,6 +154,12 @@ substitutions:
# +--------------------------------------+
enable_led_logging: 'false' # Set to true to see if an led is assigned to a component correctly, logged every 60 seconds
enable_health_logging: 'false' # Set to true to see if component health for all component instances, logged every 60 seconds
# +--------------------------------------+
# | Advanced options |
# +--------------------------------------+
# Increase the `loop_task_stack_size` value for a large number of BMS
# See https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/LOOP_TASK_STACK.md before changing
loop_task_stack_size: "8192" # 8192 / 16384 / 32768 bytes
@@ -214,33 +230,6 @@ packages:
# | >>> Uncomment your interfaces and options
# +------------------------------------------------------------------------------+
# UART 1 (uart_id: uart_esp_1)
- path: 'packages/board/board_options_itf_uart_esp_1.yaml'
# UART 2 (uart_id: uart_esp_2)
# - path: 'packages/board/board_options_itf_uart_esp_2.yaml'
# UART 3 (uart_id: uart_esp_3)
# - path: 'packages/board/board_options_itf_uart_esp_3.yaml'
# UART flow control
# - path: 'packages/board/board_options_itf_uart_flow_control.yaml'
# vars:
# uart_id: 'uart_esp_1'
# uart_flow_control_pin: ${talk_pin}
# CAN transceiver - ESP32_CAN (TJA105x, SN65HVD230, M5Stack CAN base/unit)
- path: 'packages/board/board_options_itf_canbus_esp32_can.yaml'
vars:
# to bms = canbus_bms_1
# to inverter = canbus_inverter_1
canbus_node_id: 'canbus_inverter_1'
# CAN transceiver - MCP2515
# - path: 'packages/board/board_options_itf_canbus_mcp2515.yaml'
# vars:
# # to bms = canbus_bms_1
# # to inverter = canbus_inverter_1
# canbus_node_id: 'canbus_inverter_1'
# PSRAM octal 80Mhz
# - path: 'packages/board/board_options_PSRAM_octal_80Mhz.yaml'
@@ -268,17 +257,11 @@ packages:
# RS485 Sniffer with talk_pin (WS-RS485-CAN and other RS485 boards with a flow_control_pin)
# - path: 'packages/bms/bms_combine_JK_RS485_Modbus_sniffer_talk_pin.yaml'
# vars:
# sniffer_protocol: 'JK02_32S'
# sniffer_uart_id: 'uart_esp_1'
# sniffer_talk_pin: ${talk_pin} # can be replaced by the GPIO number
# RS485 Sniffer
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_sniffer.yaml'
vars:
sniffer_protocol: 'JK02_32S'
sniffer_uart_id: 'uart_esp_1'
# uart_flow_control_pin: ${talk_pin} # WS-RS485-CAN and other RS485 boards with a flow_control_pin
# BMS 1
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.yaml'
vars:
@@ -354,12 +337,14 @@ packages:
vars:
canbus_id: '1' # must be a number
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_inverter_1' # CAN bus node to which your inverter is connected
canbus_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# CAN frames sending will be paused for `30s` if the inverter does not respond with an ACK (can_id 0x305) before the end of the `canbus_link_timer` (5s by default).
canbus_link_timer_enabled: 'true' # Set it to 'false' if your inverter/charger is not sending ACK (can_id 0x305) every `1s` as specified by the protocol
canbus_link_timer: '5s'
canbus_extended_ack: 'false' # Set to 'true' for enable extended 29-bit IDs (required for Schneider XW Pro)
canbus_link_timer: '10s' # min 6s with Deye
# CAN setup
canbus_platform: 'esp32_can' # esp32_can / mcp2515
canbus_node_id: 'canbus_inverter_1' # CAN bus node to which your inverter is connected
canbus_bitrate: '500kbps' # Default : 500kbps
@@ -367,14 +352,17 @@ packages:
# | >>> RS485 bus to Inverter
# +------------------------------------------------------------------------------+
# - path: 'packages/yambms/yambms_rs485_pylon.yaml' # yambms_rs485_pylon_web_server.yaml
# - path: 'packages/yambms/yambms_rs485.yaml'
# # - path: 'packages/yambms/yambms_rs485_web_server.yaml'
# vars:
# rs485_id: '1' # Must be a number
# rs485_id: '1' # Must be a number
# rs485_name: 'RS485 1'
# rs485_uart_id: 'uart_esp_3' # UART interface to which your inverter is connected
# rs485_uart_baud_rate: '9600'
# rs485_protocol: 'pylon' # pylon / voltronic
# rs485_update_timeout: '10s'
# rs485_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# # UART setup
# rs485_uart_id: 'uart_esp_3' # UART interface to which your inverter is connected
# rs485_uart_baud_rate: '9600' # Default : 9600 / Epever : 115200
+31 -37
View File
@@ -1,5 +1,5 @@
# Updated : 2026.06.29
# Version : 1.7.0
# Updated : 2026.11.08
# Version : 1.8.2
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -90,7 +90,7 @@ substitutions:
# This timer can be deactivated with a switch
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '60'
yambms_cutoff_timer: '180'
# Max. charge current : corresponds to the maximum charge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_charge_current: '300' # in Ampere
@@ -132,6 +132,16 @@ substitutions:
{ 60.0, 0.00 }
}
# +--------------------------------------+
# | YamBMS services |
# +--------------------------------------+
# Update service : checks GitHub for a newer YamBMS version.
# Telemetry service : sends anonymous data about your setup (BMS model, board,
# inverter protocol, YamBMS version). It is what tells me which hardware is
# actually in use, so I know where to spend my time. Public stats and details
# on what is collected : stats.yambms.org
yambms_update_service: 'true' # Set to false to disable update checks
yambms_telemetry_service: 'true' # Set to false to disable the sending of telemetry data
# +--------------------------------------+
# | Shunt Settings |
# +--------------------------------------+
shunt_update_interval: '3s' # frequency at which Shunt data is refreshed
@@ -144,6 +154,12 @@ substitutions:
# +--------------------------------------+
enable_led_logging: 'false' # Set to true to see if an led is assigned to a component correctly, logged every 60 seconds
enable_health_logging: 'false' # Set to true to see if component health for all component instances, logged every 60 seconds
# +--------------------------------------+
# | Advanced options |
# +--------------------------------------+
# Increase the `loop_task_stack_size` value for a large number of BMS
# See https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/LOOP_TASK_STACK.md before changing
loop_task_stack_size: "8192" # 8192 / 16384 / 32768 bytes
@@ -214,33 +230,6 @@ packages:
# | >>> Uncomment your interfaces and options
# +------------------------------------------------------------------------------+
# UART 1 (uart_id: uart_esp_1)
# - path: 'packages/board/board_options_itf_uart_esp_1.yaml'
# UART 2 (uart_id: uart_esp_2)
# - path: 'packages/board/board_options_itf_uart_esp_2.yaml'
# UART 3 (uart_id: uart_esp_3)
# - path: 'packages/board/board_options_itf_uart_esp_3.yaml'
# UART flow control
# - path: 'packages/board/board_options_itf_uart_flow_control.yaml'
# vars:
# uart_id: 'uart_esp_1'
# uart_flow_control_pin: ${talk_pin}
# CAN transceiver - ESP32_CAN (TJA105x, SN65HVD230, M5Stack CAN base/unit)
- path: 'packages/board/board_options_itf_canbus_esp32_can.yaml'
vars:
# to bms = canbus_bms_1
# to inverter = canbus_inverter_1
canbus_node_id: 'canbus_inverter_1'
# CAN transceiver - MCP2515
# - path: 'packages/board/board_options_itf_canbus_mcp2515.yaml'
# vars:
# # to bms = canbus_bms_1
# # to inverter = canbus_inverter_1
# canbus_node_id: 'canbus_inverter_1'
# PSRAM octal 80Mhz
# - path: 'packages/board/board_options_PSRAM_octal_80Mhz.yaml'
@@ -309,12 +298,14 @@ packages:
vars:
canbus_id: '1' # must be a number
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_inverter_1' # CAN bus node to which your inverter is connected
canbus_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# CAN frames sending will be paused for `30s` if the inverter does not respond with an ACK (can_id 0x305) before the end of the `canbus_link_timer` (5s by default).
canbus_link_timer_enabled: 'true' # Set it to 'false' if your inverter/charger is not sending ACK (can_id 0x305) every `1s` as specified by the protocol
canbus_link_timer: '5s'
canbus_extended_ack: 'false' # Set to 'true' for enable extended 29-bit IDs (required for Schneider XW Pro)
canbus_link_timer: '10s' # min 6s with Deye
# CAN setup
canbus_platform: 'esp32_can' # esp32_can / mcp2515
canbus_node_id: 'canbus_inverter_1' # CAN bus node to which your inverter is connected
canbus_bitrate: '500kbps' # Default : 500kbps
@@ -322,14 +313,17 @@ packages:
# | >>> RS485 bus to Inverter
# +------------------------------------------------------------------------------+
# - path: 'packages/yambms/yambms_rs485_pylon.yaml' # yambms_rs485_pylon_web_server.yaml
# - path: 'packages/yambms/yambms_rs485.yaml'
# # - path: 'packages/yambms/yambms_rs485_web_server.yaml'
# vars:
# rs485_id: '1' # Must be a number
# rs485_id: '1' # Must be a number
# rs485_name: 'RS485 1'
# rs485_uart_id: 'uart_esp_3' # UART interface to which your inverter is connected
# rs485_uart_baud_rate: '9600'
# rs485_protocol: 'pylon' # pylon / voltronic
# rs485_update_timeout: '10s'
# rs485_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# # UART setup
# rs485_uart_id: 'uart_esp_3' # UART interface to which your inverter is connected
# rs485_uart_baud_rate: '9600' # Default : 9600 / Epever : 115200
+31 -37
View File
@@ -1,5 +1,5 @@
# Updated : 2026.06.29
# Version : 1.7.0
# Updated : 2026.11.08
# Version : 1.8.2
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -90,7 +90,7 @@ substitutions:
# This timer can be deactivated with a switch
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '60'
yambms_cutoff_timer: '180'
# Max. charge current : corresponds to the maximum charge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_charge_current: '300' # in Ampere
@@ -132,6 +132,16 @@ substitutions:
{ 60.0, 0.00 }
}
# +--------------------------------------+
# | YamBMS services |
# +--------------------------------------+
# Update service : checks GitHub for a newer YamBMS version.
# Telemetry service : sends anonymous data about your setup (BMS model, board,
# inverter protocol, YamBMS version). It is what tells me which hardware is
# actually in use, so I know where to spend my time. Public stats and details
# on what is collected : stats.yambms.org
yambms_update_service: 'true' # Set to false to disable update checks
yambms_telemetry_service: 'true' # Set to false to disable the sending of telemetry data
# +--------------------------------------+
# | Shunt Settings |
# +--------------------------------------+
shunt_update_interval: '3s' # frequency at which Shunt data is refreshed
@@ -144,6 +154,12 @@ substitutions:
# +--------------------------------------+
enable_led_logging: 'false' # Set to true to see if an led is assigned to a component correctly, logged every 60 seconds
enable_health_logging: 'false' # Set to true to see if component health for all component instances, logged every 60 seconds
# +--------------------------------------+
# | Advanced options |
# +--------------------------------------+
# Increase the `loop_task_stack_size` value for a large number of BMS
# See https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/LOOP_TASK_STACK.md before changing
loop_task_stack_size: "8192" # 8192 / 16384 / 32768 bytes
@@ -214,33 +230,6 @@ packages:
# | >>> Uncomment your interfaces and options
# +------------------------------------------------------------------------------+
# UART 1 (uart_id: uart_esp_1)
- path: 'packages/board/board_options_itf_uart_esp_1.yaml'
# UART 2 (uart_id: uart_esp_2)
- path: 'packages/board/board_options_itf_uart_esp_2.yaml'
# UART 3 (uart_id: uart_esp_3)
# - path: 'packages/board/board_options_itf_uart_esp_3.yaml'
# UART flow control
# - path: 'packages/board/board_options_itf_uart_flow_control.yaml'
# vars:
# uart_id: 'uart_esp_1'
# uart_flow_control_pin: ${talk_pin}
# CAN transceiver - ESP32_CAN (TJA105x, SN65HVD230, M5Stack CAN base/unit)
- path: 'packages/board/board_options_itf_canbus_esp32_can.yaml'
vars:
# to bms = canbus_bms_1
# to inverter = canbus_inverter_1
canbus_node_id: 'canbus_inverter_1'
# CAN transceiver - MCP2515
# - path: 'packages/board/board_options_itf_canbus_mcp2515.yaml'
# vars:
# # to bms = canbus_bms_1
# # to inverter = canbus_inverter_1
# canbus_node_id: 'canbus_inverter_1'
# PSRAM octal 80Mhz
# - path: 'packages/board/board_options_PSRAM_octal_80Mhz.yaml'
@@ -307,12 +296,14 @@ packages:
vars:
canbus_id: '1' # must be a number
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_inverter_1' # CAN bus node to which your inverter is connected
canbus_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# CAN frames sending will be paused for `30s` if the inverter does not respond with an ACK (can_id 0x305) before the end of the `canbus_link_timer` (5s by default).
canbus_link_timer_enabled: 'true' # Set it to 'false' if your inverter/charger is not sending ACK (can_id 0x305) every `1s` as specified by the protocol
canbus_link_timer: '5s'
canbus_extended_ack: 'false' # Set to 'true' for enable extended 29-bit IDs (required for Schneider XW Pro)
canbus_link_timer: '10s' # min 6s with Deye
# CAN setup
canbus_platform: 'esp32_can' # esp32_can / mcp2515
canbus_node_id: 'canbus_inverter_1' # CAN bus node to which your inverter is connected
canbus_bitrate: '500kbps' # Default : 500kbps
@@ -320,14 +311,17 @@ packages:
# | >>> RS485 bus to Inverter
# +------------------------------------------------------------------------------+
# - path: 'packages/yambms/yambms_rs485_pylon.yaml' # yambms_rs485_pylon_web_server.yaml
# - path: 'packages/yambms/yambms_rs485.yaml'
# # - path: 'packages/yambms/yambms_rs485_web_server.yaml'
# vars:
# rs485_id: '1' # Must be a number
# rs485_id: '1' # Must be a number
# rs485_name: 'RS485 1'
# rs485_uart_id: 'uart_esp_3' # UART interface to which your inverter is connected
# rs485_uart_baud_rate: '9600'
# rs485_protocol: 'pylon' # pylon / voltronic
# rs485_update_timeout: '10s'
# rs485_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# # UART setup
# rs485_uart_id: 'uart_esp_3' # UART interface to which your inverter is connected
# rs485_uart_baud_rate: '9600' # Default : 9600 / Epever : 115200
+31 -37
View File
@@ -1,5 +1,5 @@
# Updated : 2026.06.29
# Version : 1.7.0
# Updated : 2026.11.08
# Version : 1.8.2
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -90,7 +90,7 @@ substitutions:
# This timer can be deactivated with a switch
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '60'
yambms_cutoff_timer: '180'
# Max. charge current : corresponds to the maximum charge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_charge_current: '300' # in Ampere
@@ -132,6 +132,16 @@ substitutions:
{ 60.0, 0.00 }
}
# +--------------------------------------+
# | YamBMS services |
# +--------------------------------------+
# Update service : checks GitHub for a newer YamBMS version.
# Telemetry service : sends anonymous data about your setup (BMS model, board,
# inverter protocol, YamBMS version). It is what tells me which hardware is
# actually in use, so I know where to spend my time. Public stats and details
# on what is collected : stats.yambms.org
yambms_update_service: 'true' # Set to false to disable update checks
yambms_telemetry_service: 'true' # Set to false to disable the sending of telemetry data
# +--------------------------------------+
# | Shunt Settings |
# +--------------------------------------+
shunt_update_interval: '3s' # frequency at which Shunt data is refreshed
@@ -144,6 +154,12 @@ substitutions:
# +--------------------------------------+
enable_led_logging: 'false' # Set to true to see if an led is assigned to a component correctly, logged every 60 seconds
enable_health_logging: 'false' # Set to true to see if component health for all component instances, logged every 60 seconds
# +--------------------------------------+
# | Advanced options |
# +--------------------------------------+
# Increase the `loop_task_stack_size` value for a large number of BMS
# See https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/LOOP_TASK_STACK.md before changing
loop_task_stack_size: "8192" # 8192 / 16384 / 32768 bytes
@@ -214,33 +230,6 @@ packages:
# | >>> Uncomment your interfaces and options
# +------------------------------------------------------------------------------+
# UART 1 (uart_id: uart_esp_1)
- path: 'packages/board/board_options_itf_uart_esp_1.yaml'
# UART 2 (uart_id: uart_esp_2)
# - path: 'packages/board/board_options_itf_uart_esp_2.yaml'
# UART 3 (uart_id: uart_esp_3)
# - path: 'packages/board/board_options_itf_uart_esp_3.yaml'
# UART flow control
# - path: 'packages/board/board_options_itf_uart_flow_control.yaml'
# vars:
# uart_id: 'uart_esp_1'
# uart_flow_control_pin: ${talk_pin}
# CAN transceiver - ESP32_CAN (TJA105x, SN65HVD230, M5Stack CAN base/unit)
- path: 'packages/board/board_options_itf_canbus_esp32_can.yaml'
vars:
# to bms = canbus_bms_1
# to inverter = canbus_inverter_1
canbus_node_id: 'canbus_inverter_1'
# CAN transceiver - MCP2515
# - path: 'packages/board/board_options_itf_canbus_mcp2515.yaml'
# vars:
# # to bms = canbus_bms_1
# # to inverter = canbus_inverter_1
# canbus_node_id: 'canbus_inverter_1'
# PSRAM octal 80Mhz
# - path: 'packages/board/board_options_PSRAM_octal_80Mhz.yaml'
@@ -304,12 +293,14 @@ packages:
vars:
canbus_id: '1' # must be a number
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_inverter_1' # CAN bus node to which your inverter is connected
canbus_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# CAN frames sending will be paused for `30s` if the inverter does not respond with an ACK (can_id 0x305) before the end of the `canbus_link_timer` (5s by default).
canbus_link_timer_enabled: 'true' # Set it to 'false' if your inverter/charger is not sending ACK (can_id 0x305) every `1s` as specified by the protocol
canbus_link_timer: '5s'
canbus_extended_ack: 'false' # Set to 'true' for enable extended 29-bit IDs (required for Schneider XW Pro)
canbus_link_timer: '10s' # min 6s with Deye
# CAN setup
canbus_platform: 'esp32_can' # esp32_can / mcp2515
canbus_node_id: 'canbus_inverter_1' # CAN bus node to which your inverter is connected
canbus_bitrate: '500kbps' # Default : 500kbps
@@ -317,14 +308,17 @@ packages:
# | >>> RS485 bus to Inverter
# +------------------------------------------------------------------------------+
# - path: 'packages/yambms/yambms_rs485_pylon.yaml' # yambms_rs485_pylon_web_server.yaml
# - path: 'packages/yambms/yambms_rs485.yaml'
# # - path: 'packages/yambms/yambms_rs485_web_server.yaml'
# vars:
# rs485_id: '1' # Must be a number
# rs485_id: '1' # Must be a number
# rs485_name: 'RS485 1'
# rs485_uart_id: 'uart_esp_3' # UART interface to which your inverter is connected
# rs485_uart_baud_rate: '9600'
# rs485_protocol: 'pylon' # pylon / voltronic
# rs485_update_timeout: '10s'
# rs485_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# # UART setup
# rs485_uart_id: 'uart_esp_3' # UART interface to which your inverter is connected
# rs485_uart_baud_rate: '9600' # Default : 9600 / Epever : 115200
+46 -37
View File
@@ -1,5 +1,5 @@
# Updated : 2026.06.29
# Version : 1.7.0
# Updated : 2026.11.19
# Version : 1.8.2
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -90,7 +90,7 @@ substitutions:
# This timer can be deactivated with a switch
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '60'
yambms_cutoff_timer: '180'
# Max. charge current : corresponds to the maximum charge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_charge_current: '300' # in Ampere
@@ -132,6 +132,16 @@ substitutions:
{ 60.0, 0.00 }
}
# +--------------------------------------+
# | YamBMS services |
# +--------------------------------------+
# Update service : checks GitHub for a newer YamBMS version.
# Telemetry service : sends anonymous data about your setup (BMS model, board,
# inverter protocol, YamBMS version). It is what tells me which hardware is
# actually in use, so I know where to spend my time. Public stats and details
# on what is collected : stats.yambms.org
yambms_update_service: 'true' # Set to false to disable update checks
yambms_telemetry_service: 'true' # Set to false to disable the sending of telemetry data
# +--------------------------------------+
# | Shunt Settings |
# +--------------------------------------+
shunt_update_interval: '3s' # frequency at which Shunt data is refreshed
@@ -144,6 +154,12 @@ substitutions:
# +--------------------------------------+
enable_led_logging: 'false' # Set to true to see if an led is assigned to a component correctly, logged every 60 seconds
enable_health_logging: 'false' # Set to true to see if component health for all component instances, logged every 60 seconds
# +--------------------------------------+
# | Advanced options |
# +--------------------------------------+
# Increase the `loop_task_stack_size` value for a large number of BMS
# See https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/LOOP_TASK_STACK.md before changing
loop_task_stack_size: "8192" # 8192 / 16384 / 32768 bytes
@@ -214,33 +230,6 @@ packages:
# | >>> Uncomment your interfaces and options
# +------------------------------------------------------------------------------+
# UART 1 (uart_id: uart_esp_1)
- path: 'packages/board/board_options_itf_uart_esp_1.yaml'
# UART 2 (uart_id: uart_esp_2)
# - path: 'packages/board/board_options_itf_uart_esp_2.yaml'
# UART 3 (uart_id: uart_esp_3)
# - path: 'packages/board/board_options_itf_uart_esp_3.yaml'
# UART flow control
# - path: 'packages/board/board_options_itf_uart_flow_control.yaml'
# vars:
# uart_id: 'uart_esp_1'
# uart_flow_control_pin: ${talk_pin}
# CAN transceiver - ESP32_CAN (TJA105x, SN65HVD230, M5Stack CAN base/unit)
- path: 'packages/board/board_options_itf_canbus_esp32_can.yaml'
vars:
# to bms = canbus_bms_1
# to inverter = canbus_inverter_1
canbus_node_id: 'canbus_inverter_1'
# CAN transceiver - MCP2515
# - path: 'packages/board/board_options_itf_canbus_mcp2515.yaml'
# vars:
# # to bms = canbus_bms_1
# # to inverter = canbus_inverter_1
# canbus_node_id: 'canbus_inverter_1'
# PSRAM octal 80Mhz
# - path: 'packages/board/board_options_PSRAM_octal_80Mhz.yaml'
@@ -288,6 +277,11 @@ packages:
bms_cell_ovp: '3.650' # V. Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V. Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V. Used by 'Auto CVL' functions
# Fake Equalizing: this BMS does not report its balancing state. When enabled, YamBMS infers it
# from the cell spread and holds the Cut-Off timer while the pack balances, instead of ending the charge.
# Warning: a BMS without a balancer (or with balancing disabled) never closes its cell spread, so it can
# stay in Cut-Off a long time, until the EOC timer (30min default) ends the charge, or forever if disabled.
bms_fake_equalizing_enabled: 'false' # true/false, false by default
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# BMS 2
- path: 'packages/bms/bms_combine_SEPLOS_V1_V2_RS485_bms_full.yaml'
@@ -304,6 +298,11 @@ packages:
bms_cell_ovp: '3.650' # V. Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V. Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V. Used by 'Auto CVL' functions
# Fake Equalizing: this BMS does not report its balancing state. When enabled, YamBMS infers it
# from the cell spread and holds the Cut-Off timer while the pack balances, instead of ending the charge.
# Warning: a BMS without a balancer (or with balancing disabled) never closes its cell spread, so it can
# stay in Cut-Off a long time, until the EOC timer (30min default) ends the charge, or forever if disabled.
bms_fake_equalizing_enabled: 'false' # true/false, false by default
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# BMS 3
- path: 'packages/bms/bms_combine_SEPLOS_V1_V2_RS485_bms_full.yaml'
@@ -320,6 +319,11 @@ packages:
bms_cell_ovp: '3.650' # V. Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V. Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V. Used by 'Auto CVL' functions
# Fake Equalizing: this BMS does not report its balancing state. When enabled, YamBMS infers it
# from the cell spread and holds the Cut-Off timer while the pack balances, instead of ending the charge.
# Warning: a BMS without a balancer (or with balancing disabled) never closes its cell spread, so it can
# stay in Cut-Off a long time, until the EOC timer (30min default) ends the charge, or forever if disabled.
bms_fake_equalizing_enabled: 'false' # true/false, false by default
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
@@ -340,12 +344,14 @@ packages:
vars:
canbus_id: '1' # must be a number
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_inverter_1' # CAN bus node to which your inverter is connected
canbus_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# CAN frames sending will be paused for `30s` if the inverter does not respond with an ACK (can_id 0x305) before the end of the `canbus_link_timer` (5s by default).
canbus_link_timer_enabled: 'true' # Set it to 'false' if your inverter/charger is not sending ACK (can_id 0x305) every `1s` as specified by the protocol
canbus_link_timer: '5s'
canbus_extended_ack: 'false' # Set to 'true' for enable extended 29-bit IDs (required for Schneider XW Pro)
canbus_link_timer: '10s' # min 6s with Deye
# CAN setup
canbus_platform: 'esp32_can' # esp32_can / mcp2515
canbus_node_id: 'canbus_inverter_1' # CAN bus node to which your inverter is connected
canbus_bitrate: '500kbps' # Default : 500kbps
@@ -353,14 +359,17 @@ packages:
# | >>> RS485 bus to Inverter
# +------------------------------------------------------------------------------+
# - path: 'packages/yambms/yambms_rs485_pylon.yaml' # yambms_rs485_pylon_web_server.yaml
# - path: 'packages/yambms/yambms_rs485.yaml'
# # - path: 'packages/yambms/yambms_rs485_web_server.yaml'
# vars:
# rs485_id: '1' # Must be a number
# rs485_id: '1' # Must be a number
# rs485_name: 'RS485 1'
# rs485_uart_id: 'uart_esp_3' # UART interface to which your inverter is connected
# rs485_uart_baud_rate: '9600'
# rs485_protocol: 'pylon' # pylon / voltronic
# rs485_update_timeout: '10s'
# rs485_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# # UART setup
# rs485_uart_id: 'uart_esp_3' # UART interface to which your inverter is connected
# rs485_uart_baud_rate: '9600' # Default : 9600 / Epever : 115200
@@ -1,5 +1,5 @@
# Updated : 2026.06.29
# Version : 1.7.0
# Updated : 2026.11.19
# Version : 1.8.2
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -90,7 +90,7 @@ substitutions:
# This timer can be deactivated with a switch
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '60'
yambms_cutoff_timer: '180'
# Max. charge current : corresponds to the maximum charge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_charge_current: '300' # in Ampere
@@ -132,6 +132,16 @@ substitutions:
{ 60.0, 0.00 }
}
# +--------------------------------------+
# | YamBMS services |
# +--------------------------------------+
# Update service : checks GitHub for a newer YamBMS version.
# Telemetry service : sends anonymous data about your setup (BMS model, board,
# inverter protocol, YamBMS version). It is what tells me which hardware is
# actually in use, so I know where to spend my time. Public stats and details
# on what is collected : stats.yambms.org
yambms_update_service: 'true' # Set to false to disable update checks
yambms_telemetry_service: 'true' # Set to false to disable the sending of telemetry data
# +--------------------------------------+
# | Shunt Settings |
# +--------------------------------------+
shunt_update_interval: '3s' # frequency at which Shunt data is refreshed
@@ -144,6 +154,12 @@ substitutions:
# +--------------------------------------+
enable_led_logging: 'false' # Set to true to see if an led is assigned to a component correctly, logged every 60 seconds
enable_health_logging: 'false' # Set to true to see if component health for all component instances, logged every 60 seconds
# +--------------------------------------+
# | Advanced options |
# +--------------------------------------+
# Increase the `loop_task_stack_size` value for a large number of BMS
# See https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/LOOP_TASK_STACK.md before changing
loop_task_stack_size: "8192" # 8192 / 16384 / 32768 bytes
@@ -214,33 +230,6 @@ packages:
# | >>> Uncomment your interfaces and options
# +------------------------------------------------------------------------------+
# UART 1 (uart_id: uart_esp_1)
- path: 'packages/board/board_options_itf_uart_esp_1.yaml'
# UART 2 (uart_id: uart_esp_2)
# - path: 'packages/board/board_options_itf_uart_esp_2.yaml'
# UART 3 (uart_id: uart_esp_3)
# - path: 'packages/board/board_options_itf_uart_esp_3.yaml'
# UART flow control
# - path: 'packages/board/board_options_itf_uart_flow_control.yaml'
# vars:
# uart_id: 'uart_esp_1'
# uart_flow_control_pin: ${talk_pin}
# CAN transceiver - ESP32_CAN (TJA105x, SN65HVD230, M5Stack CAN base/unit)
- path: 'packages/board/board_options_itf_canbus_esp32_can.yaml'
vars:
# to bms = canbus_bms_1
# to inverter = canbus_inverter_1
canbus_node_id: 'canbus_inverter_1'
# CAN transceiver - MCP2515
# - path: 'packages/board/board_options_itf_canbus_mcp2515.yaml'
# vars:
# # to bms = canbus_bms_1
# # to inverter = canbus_inverter_1
# canbus_node_id: 'canbus_inverter_1'
# PSRAM octal 80Mhz
# - path: 'packages/board/board_options_PSRAM_octal_80Mhz.yaml'
@@ -289,6 +278,11 @@ packages:
bms_cell_ovp: '3.650' # V. Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V. Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V. Used by 'Auto CVL' functions
# Fake Equalizing: this BMS does not report its balancing state. When enabled, YamBMS infers it
# from the cell spread and holds the Cut-Off timer while the pack balances, instead of ending the charge.
# Warning: a BMS without a balancer (or with balancing disabled) never closes its cell spread, so it can
# stay in Cut-Off a long time, until the EOC timer (30min default) ends the charge, or forever if disabled.
bms_fake_equalizing_enabled: 'false' # true/false, false by default
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# BMS 2
- path: 'packages/bms/bms_combine_SEPLOS_V3_RS485_bms_full.yaml'
@@ -304,6 +298,11 @@ packages:
bms_cell_ovp: '3.650' # V. Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V. Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V. Used by 'Auto CVL' functions
# Fake Equalizing: this BMS does not report its balancing state. When enabled, YamBMS infers it
# from the cell spread and holds the Cut-Off timer while the pack balances, instead of ending the charge.
# Warning: a BMS without a balancer (or with balancing disabled) never closes its cell spread, so it can
# stay in Cut-Off a long time, until the EOC timer (30min default) ends the charge, or forever if disabled.
bms_fake_equalizing_enabled: 'false' # true/false, false by default
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# BMS 3
- path: 'packages/bms/bms_combine_SEPLOS_V3_RS485_bms_full.yaml'
@@ -319,6 +318,11 @@ packages:
bms_cell_ovp: '3.650' # V. Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V. Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V. Used by 'Auto CVL' functions
# Fake Equalizing: this BMS does not report its balancing state. When enabled, YamBMS infers it
# from the cell spread and holds the Cut-Off timer while the pack balances, instead of ending the charge.
# Warning: a BMS without a balancer (or with balancing disabled) never closes its cell spread, so it can
# stay in Cut-Off a long time, until the EOC timer (30min default) ends the charge, or forever if disabled.
bms_fake_equalizing_enabled: 'false' # true/false, false by default
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
@@ -339,12 +343,14 @@ packages:
vars:
canbus_id: '1' # must be a number
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_inverter_1' # CAN bus node to which your inverter is connected
canbus_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# CAN frames sending will be paused for `30s` if the inverter does not respond with an ACK (can_id 0x305) before the end of the `canbus_link_timer` (5s by default).
canbus_link_timer_enabled: 'true' # Set it to 'false' if your inverter/charger is not sending ACK (can_id 0x305) every `1s` as specified by the protocol
canbus_link_timer: '5s'
canbus_extended_ack: 'false' # Set to 'true' for enable extended 29-bit IDs (required for Schneider XW Pro)
canbus_link_timer: '10s' # min 6s with Deye
# CAN setup
canbus_platform: 'esp32_can' # esp32_can / mcp2515
canbus_node_id: 'canbus_inverter_1' # CAN bus node to which your inverter is connected
canbus_bitrate: '500kbps' # Default : 500kbps
@@ -352,14 +358,17 @@ packages:
# | >>> RS485 bus to Inverter
# +------------------------------------------------------------------------------+
# - path: 'packages/yambms/yambms_rs485_pylon.yaml' # yambms_rs485_pylon_web_server.yaml
# - path: 'packages/yambms/yambms_rs485.yaml'
# # - path: 'packages/yambms/yambms_rs485_web_server.yaml'
# vars:
# rs485_id: '1' # Must be a number
# rs485_id: '1' # Must be a number
# rs485_name: 'RS485 1'
# rs485_uart_id: 'uart_esp_3' # UART interface to which your inverter is connected
# rs485_uart_baud_rate: '9600'
# rs485_protocol: 'pylon' # pylon / voltronic
# rs485_update_timeout: '10s'
# rs485_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# # UART setup
# rs485_uart_id: 'uart_esp_3' # UART interface to which your inverter is connected
# rs485_uart_baud_rate: '9600' # Default : 9600 / Epever : 115200
+31 -37
View File
@@ -1,5 +1,5 @@
# Updated : 2026.06.29
# Version : 1.7.0
# Updated : 2026.11.08
# Version : 1.8.2
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -90,7 +90,7 @@ substitutions:
# This timer can be deactivated with a switch
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '60'
yambms_cutoff_timer: '180'
# Max. charge current : corresponds to the maximum charge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_charge_current: '300' # in Ampere
@@ -132,6 +132,16 @@ substitutions:
{ 60.0, 0.00 }
}
# +--------------------------------------+
# | YamBMS services |
# +--------------------------------------+
# Update service : checks GitHub for a newer YamBMS version.
# Telemetry service : sends anonymous data about your setup (BMS model, board,
# inverter protocol, YamBMS version). It is what tells me which hardware is
# actually in use, so I know where to spend my time. Public stats and details
# on what is collected : stats.yambms.org
yambms_update_service: 'true' # Set to false to disable update checks
yambms_telemetry_service: 'true' # Set to false to disable the sending of telemetry data
# +--------------------------------------+
# | Shunt Settings |
# +--------------------------------------+
shunt_update_interval: '3s' # frequency at which Shunt data is refreshed
@@ -144,6 +154,12 @@ substitutions:
# +--------------------------------------+
enable_led_logging: 'false' # Set to true to see if an led is assigned to a component correctly, logged every 60 seconds
enable_health_logging: 'false' # Set to true to see if component health for all component instances, logged every 60 seconds
# +--------------------------------------+
# | Advanced options |
# +--------------------------------------+
# Increase the `loop_task_stack_size` value for a large number of BMS
# See https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/LOOP_TASK_STACK.md before changing
loop_task_stack_size: "8192" # 8192 / 16384 / 32768 bytes
@@ -214,33 +230,6 @@ packages:
# | >>> Uncomment your interfaces and options
# +------------------------------------------------------------------------------+
# UART 1 (uart_id: uart_esp_1)
- path: 'packages/board/board_options_itf_uart_esp_1.yaml'
# UART 2 (uart_id: uart_esp_2)
# - path: 'packages/board/board_options_itf_uart_esp_2.yaml'
# UART 3 (uart_id: uart_esp_3)
# - path: 'packages/board/board_options_itf_uart_esp_3.yaml'
# UART flow control
# - path: 'packages/board/board_options_itf_uart_flow_control.yaml'
# vars:
# uart_id: 'uart_esp_1'
# uart_flow_control_pin: ${talk_pin}
# CAN transceiver - ESP32_CAN (TJA105x, SN65HVD230, M5Stack CAN base/unit)
- path: 'packages/board/board_options_itf_canbus_esp32_can.yaml'
vars:
# to bms = canbus_bms_1
# to inverter = canbus_inverter_1
canbus_node_id: 'canbus_inverter_1'
# CAN transceiver - MCP2515
# - path: 'packages/board/board_options_itf_canbus_mcp2515.yaml'
# vars:
# # to bms = canbus_bms_1
# # to inverter = canbus_inverter_1
# canbus_node_id: 'canbus_inverter_1'
# PSRAM octal 80Mhz
# - path: 'packages/board/board_options_PSRAM_octal_80Mhz.yaml'
@@ -322,12 +311,14 @@ packages:
vars:
canbus_id: '1' # must be a number
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_inverter_1' # CAN bus node to which your inverter is connected
canbus_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# CAN frames sending will be paused for `30s` if the inverter does not respond with an ACK (can_id 0x305) before the end of the `canbus_link_timer` (5s by default).
canbus_link_timer_enabled: 'true' # Set it to 'false' if your inverter/charger is not sending ACK (can_id 0x305) every `1s` as specified by the protocol
canbus_link_timer: '5s'
canbus_extended_ack: 'false' # Set to 'true' for enable extended 29-bit IDs (required for Schneider XW Pro)
canbus_link_timer: '10s' # min 6s with Deye
# CAN setup
canbus_platform: 'esp32_can' # esp32_can / mcp2515
canbus_node_id: 'canbus_inverter_1' # CAN bus node to which your inverter is connected
canbus_bitrate: '500kbps' # Default : 500kbps
@@ -335,14 +326,17 @@ packages:
# | >>> RS485 bus to Inverter
# +------------------------------------------------------------------------------+
# - path: 'packages/yambms/yambms_rs485_pylon.yaml' # yambms_rs485_pylon_web_server.yaml
# - path: 'packages/yambms/yambms_rs485.yaml'
# # - path: 'packages/yambms/yambms_rs485_web_server.yaml'
# vars:
# rs485_id: '1' # Must be a number
# rs485_id: '1' # Must be a number
# rs485_name: 'RS485 1'
# rs485_uart_id: 'uart_esp_3' # UART interface to which your inverter is connected
# rs485_uart_baud_rate: '9600'
# rs485_protocol: 'pylon' # pylon / voltronic
# rs485_update_timeout: '10s'
# rs485_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# # UART setup
# rs485_uart_id: 'uart_esp_3' # UART interface to which your inverter is connected
# rs485_uart_baud_rate: '9600' # Default : 9600 / Epever : 115200
+46 -37
View File
@@ -1,5 +1,5 @@
# Updated : 2026.06.29
# Version : 1.7.0
# Updated : 2026.11.19
# Version : 1.8.2
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -90,7 +90,7 @@ substitutions:
# This timer can be deactivated with a switch
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '60'
yambms_cutoff_timer: '180'
# Max. charge current : corresponds to the maximum charge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_charge_current: '300' # in Ampere
@@ -132,6 +132,16 @@ substitutions:
{ 60.0, 0.00 }
}
# +--------------------------------------+
# | YamBMS services |
# +--------------------------------------+
# Update service : checks GitHub for a newer YamBMS version.
# Telemetry service : sends anonymous data about your setup (BMS model, board,
# inverter protocol, YamBMS version). It is what tells me which hardware is
# actually in use, so I know where to spend my time. Public stats and details
# on what is collected : stats.yambms.org
yambms_update_service: 'true' # Set to false to disable update checks
yambms_telemetry_service: 'true' # Set to false to disable the sending of telemetry data
# +--------------------------------------+
# | Shunt Settings |
# +--------------------------------------+
shunt_update_interval: '3s' # frequency at which Shunt data is refreshed
@@ -144,6 +154,12 @@ substitutions:
# +--------------------------------------+
enable_led_logging: 'false' # Set to true to see if an led is assigned to a component correctly, logged every 60 seconds
enable_health_logging: 'false' # Set to true to see if component health for all component instances, logged every 60 seconds
# +--------------------------------------+
# | Advanced options |
# +--------------------------------------+
# Increase the `loop_task_stack_size` value for a large number of BMS
# See https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/LOOP_TASK_STACK.md before changing
loop_task_stack_size: "8192" # 8192 / 16384 / 32768 bytes
@@ -214,33 +230,6 @@ packages:
# | >>> Uncomment your interfaces and options
# +------------------------------------------------------------------------------+
# UART 1 (uart_id: uart_esp_1)
# - path: 'packages/board/board_options_itf_uart_esp_1.yaml'
# UART 2 (uart_id: uart_esp_2)
# - path: 'packages/board/board_options_itf_uart_esp_2.yaml'
# UART 3 (uart_id: uart_esp_3)
# - path: 'packages/board/board_options_itf_uart_esp_3.yaml'
# UART flow control
# - path: 'packages/board/board_options_itf_uart_flow_control.yaml'
# vars:
# uart_id: 'uart_esp_1'
# uart_flow_control_pin: ${talk_pin}
# CAN transceiver - ESP32_CAN (TJA105x, SN65HVD230, M5Stack CAN base/unit)
- path: 'packages/board/board_options_itf_canbus_esp32_can.yaml'
vars:
# to bms = canbus_bms_1
# to inverter = canbus_inverter_1
canbus_node_id: 'canbus_inverter_1'
# CAN transceiver - MCP2515
# - path: 'packages/board/board_options_itf_canbus_mcp2515.yaml'
# vars:
# # to bms = canbus_bms_1
# # to inverter = canbus_inverter_1
# canbus_node_id: 'canbus_inverter_1'
# PSRAM octal 80Mhz
# - path: 'packages/board/board_options_PSRAM_octal_80Mhz.yaml'
@@ -289,6 +278,11 @@ packages:
bms_cell_ovp: '3.650' # V Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V Used by 'Auto CVL' functions
# Fake Equalizing: this BMS does not report its balancing state. When enabled, YamBMS infers it
# from the cell spread and holds the Cut-Off timer while the pack balances, instead of ending the charge.
# Warning: a BMS without a balancer (or with balancing disabled) never closes its cell spread, so it can
# stay in Cut-Off a long time, until the EOC timer (30min default) ends the charge, or forever if disabled.
bms_fake_equalizing_enabled: 'true' # true/false, false by default
bms_charging_cycles: '178' # charging cycles number Used to calculate the SoH
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
@@ -311,6 +305,11 @@ packages:
bms_cell_ovp: '3.650' # V Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V Used by 'Auto CVL' functions
# Fake Equalizing: this BMS does not report its balancing state. When enabled, YamBMS infers it
# from the cell spread and holds the Cut-Off timer while the pack balances, instead of ending the charge.
# Warning: a BMS without a balancer (or with balancing disabled) never closes its cell spread, so it can
# stay in Cut-Off a long time, until the EOC timer (30min default) ends the charge, or forever if disabled.
bms_fake_equalizing_enabled: 'true' # true/false, false by default
bms_charging_cycles: '226' # charging cycles number Used to calculate the SoH
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
@@ -333,6 +332,11 @@ packages:
bms_cell_ovp: '3.650' # V Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V Used by 'Auto CVL' functions
# Fake Equalizing: this BMS does not report its balancing state. When enabled, YamBMS infers it
# from the cell spread and holds the Cut-Off timer while the pack balances, instead of ending the charge.
# Warning: a BMS without a balancer (or with balancing disabled) never closes its cell spread, so it can
# stay in Cut-Off a long time, until the EOC timer (30min default) ends the charge, or forever if disabled.
bms_fake_equalizing_enabled: 'true' # true/false, false by default
bms_charging_cycles: '194' # charging cycles number Used to calculate the SoH
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
@@ -354,12 +358,14 @@ packages:
vars:
canbus_id: '1' # must be a number
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_inverter_1' # CAN bus node to which your inverter is connected
canbus_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# CAN frames sending will be paused for `30s` if the inverter does not respond with an ACK (can_id 0x305) before the end of the `canbus_link_timer` (5s by default).
canbus_link_timer_enabled: 'true' # Set it to 'false' if your inverter/charger is not sending ACK (can_id 0x305) every `1s` as specified by the protocol
canbus_link_timer: '5s'
canbus_extended_ack: 'false' # Set to 'true' for enable extended 29-bit IDs (required for Schneider XW Pro)
canbus_link_timer: '10s' # min 6s with Deye
# CAN setup
canbus_platform: 'esp32_can' # esp32_can / mcp2515
canbus_node_id: 'canbus_inverter_1' # CAN bus node to which your inverter is connected
canbus_bitrate: '500kbps' # Default : 500kbps
@@ -367,14 +373,17 @@ packages:
# | >>> RS485 bus to Inverter
# +------------------------------------------------------------------------------+
# - path: 'packages/yambms/yambms_rs485_pylon.yaml' # yambms_rs485_pylon_web_server.yaml
# - path: 'packages/yambms/yambms_rs485.yaml'
# # - path: 'packages/yambms/yambms_rs485_web_server.yaml'
# vars:
# rs485_id: '1' # Must be a number
# rs485_id: '1' # Must be a number
# rs485_name: 'RS485 1'
# rs485_uart_id: 'uart_esp_3' # UART interface to which your inverter is connected
# rs485_uart_baud_rate: '9600'
# rs485_protocol: 'pylon' # pylon / voltronic
# rs485_update_timeout: '10s'
# rs485_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# # UART setup
# rs485_uart_id: 'uart_esp_3' # UART interface to which your inverter is connected
# rs485_uart_baud_rate: '9600' # Default : 9600 / Epever : 115200
+31 -37
View File
@@ -1,5 +1,5 @@
# Updated : 2026.06.29
# Version : 1.7.0
# Updated : 2026.11.08
# Version : 1.8.2
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -90,7 +90,7 @@ substitutions:
# This timer can be deactivated with a switch
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '60'
yambms_cutoff_timer: '180'
# Max. charge current : corresponds to the maximum charge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_charge_current: '300' # in Ampere
@@ -132,6 +132,16 @@ substitutions:
{ 60.0, 0.00 }
}
# +--------------------------------------+
# | YamBMS services |
# +--------------------------------------+
# Update service : checks GitHub for a newer YamBMS version.
# Telemetry service : sends anonymous data about your setup (BMS model, board,
# inverter protocol, YamBMS version). It is what tells me which hardware is
# actually in use, so I know where to spend my time. Public stats and details
# on what is collected : stats.yambms.org
yambms_update_service: 'true' # Set to false to disable update checks
yambms_telemetry_service: 'true' # Set to false to disable the sending of telemetry data
# +--------------------------------------+
# | Shunt Settings |
# +--------------------------------------+
shunt_update_interval: '3s' # frequency at which Shunt data is refreshed
@@ -144,6 +154,12 @@ substitutions:
# +--------------------------------------+
enable_led_logging: 'false' # Set to true to see if an led is assigned to a component correctly, logged every 60 seconds
enable_health_logging: 'false' # Set to true to see if component health for all component instances, logged every 60 seconds
# +--------------------------------------+
# | Advanced options |
# +--------------------------------------+
# Increase the `loop_task_stack_size` value for a large number of BMS
# See https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/LOOP_TASK_STACK.md before changing
loop_task_stack_size: "8192" # 8192 / 16384 / 32768 bytes
@@ -181,33 +197,6 @@ packages:
# | >>> Uncomment your interfaces and options
# +------------------------------------------------------------------------------+
# UART 1 (uart_id: uart_esp_1)
- path: 'packages/board/board_options_itf_uart_esp_1.yaml'
# UART 2 (uart_id: uart_esp_2)
# - path: 'packages/board/board_options_itf_uart_esp_2.yaml'
# UART 3 (uart_id: uart_esp_3)
# - path: 'packages/board/board_options_itf_uart_esp_3.yaml'
# UART flow control
# - path: 'packages/board/board_options_itf_uart_flow_control.yaml'
# vars:
# uart_id: 'uart_esp_1'
# uart_flow_control_pin: ${talk_pin}
# CAN transceiver - ESP32_CAN (TJA105x, SN65HVD230, M5Stack CAN base/unit)
- path: 'packages/board/board_options_itf_canbus_esp32_can.yaml'
vars:
# to bms = canbus_bms_1
# to inverter = canbus_inverter_1
canbus_node_id: 'canbus_inverter_1'
# CAN transceiver - MCP2515
# - path: 'packages/board/board_options_itf_canbus_mcp2515.yaml'
# vars:
# # to bms = canbus_bms_1
# # to inverter = canbus_inverter_1
# canbus_node_id: 'canbus_inverter_1'
# PSRAM octal 80Mhz
# - path: 'packages/board/board_options_PSRAM_octal_80Mhz.yaml'
@@ -251,12 +240,14 @@ packages:
vars:
canbus_id: '1' # must be a number
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_inverter_1' # CAN bus node to which your inverter is connected
canbus_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# CAN frames sending will be paused for `30s` if the inverter does not respond with an ACK (can_id 0x305) before the end of the `canbus_link_timer` (5s by default).
canbus_link_timer_enabled: 'true' # Set it to 'false' if your inverter/charger is not sending ACK (can_id 0x305) every `1s` as specified by the protocol
canbus_link_timer: '5s'
canbus_extended_ack: 'false' # Set to 'true' for enable extended 29-bit IDs (required for Schneider XW Pro)
canbus_link_timer: '10s' # min 6s with Deye
# CAN setup
canbus_platform: 'esp32_can' # esp32_can / mcp2515
canbus_node_id: 'canbus_inverter_1' # CAN bus node to which your inverter is connected
canbus_bitrate: '500kbps' # Default : 500kbps
@@ -264,14 +255,17 @@ packages:
# | >>> RS485 bus to Inverter
# +------------------------------------------------------------------------------+
# - path: 'packages/yambms/yambms_rs485_pylon.yaml' # yambms_rs485_pylon_web_server.yaml
# - path: 'packages/yambms/yambms_rs485.yaml'
# # - path: 'packages/yambms/yambms_rs485_web_server.yaml'
# vars:
# rs485_id: '1' # Must be a number
# rs485_id: '1' # Must be a number
# rs485_name: 'RS485 1'
# rs485_uart_id: 'uart_esp_3' # UART interface to which your inverter is connected
# rs485_uart_baud_rate: '9600'
# rs485_protocol: 'pylon' # pylon / voltronic
# rs485_update_timeout: '10s'
# rs485_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# # UART setup
# rs485_uart_id: 'uart_esp_3' # UART interface to which your inverter is connected
# rs485_uart_baud_rate: '9600' # Default : 9600 / Epever : 115200
+13 -30
View File
@@ -1,5 +1,5 @@
# Updated : 2026.06.29
# Version : 1.7.0
# Updated : 2026.11.08
# Version : 1.8.2
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -54,6 +54,12 @@ substitutions:
# This allows to group entities into logical devices that appear separately in Home Assistant.
hostname: 'yambms-display' # Name of your ESPHome node registered on the IP network (DNS name must be unique)
friendly_name : 'YamBMS Display' # Name of your board (prefix for board entities)
# +--------------------------------------+
# | Advanced options |
# +--------------------------------------+
# Increase the `loop_task_stack_size` value for a large number of entities
# See https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/LOOP_TASK_STACK.md before changing
loop_task_stack_size: "8192" # 8192 / 16384 / 32768 bytes
# +--------------------------------------+
# | Packages |
@@ -76,6 +82,7 @@ packages:
# - path: 'packages/board/board_ESP32-S3_WS-Touch-LCD-4.3.yaml' # 800x480
- path: 'packages/board/board_ESP32-S3_WS-Touch-LCD-7.yaml' # 800x480
# - path: 'packages/board/board_ESP32-P4_M5Stack-Tab5.yaml' # 1280x720
# - path: 'packages/board/board_ESP32-P4_Elecrow-CrowPanel-Advanced-7-10.yaml' # 1024x600
# +------------------------------------------------------------------------------+
# | >>> Board Display
@@ -83,7 +90,9 @@ packages:
# +------------------------------------------------------------------------------+
- path: 'packages/board/board_options_display_lvgl_package_800x480_blue_navy_ha_yambms.yaml' # 800x480 Blue Navy display - YamBMS pages
# - path: 'packages/board/board_options_display_lvgl_package_800x480_blue_navy_ha_full.yaml' # 800x480 Blue Navy display - Overview + YamBMS pages
# - path: 'packages/board/board_options_display_lvgl_package_800x480_blue_navy_ha_full.yaml' # 800x480 Blue Navy display - Overview + YamBMS pages
# - path: 'packages/board/board_options_display_lvgl_package_1024x600_blue_navy_ha_yambms.yaml' # 1024x600 Blue Navy display - YamBMS pages
# - path: 'packages/board/board_options_display_lvgl_package_1024x600_blue_navy_ha_full.yaml' # 1024x600 Blue Navy display - Overview + YamBMS pages
# - path: 'packages/board/board_options_display_lvgl_package_1280x720_Tab5_ha.yaml' # 1280x720 Tab5 display
vars:
@@ -94,6 +103,7 @@ packages:
# +------------------------------------------------------------------------------+
# | >>> Uncomment the variables below to use the following YAMLs :
# | >>> board_options_display_lvgl_package_800x480_blue_navy_ha_full.yaml
# | >>> board_options_display_lvgl_package_1024x600_blue_navy_ha_full.yaml
# +------------------------------------------------------------------------------+
# Overview page inputs
@@ -134,33 +144,6 @@ packages:
# | >>> Uncomment your interfaces and options
# +------------------------------------------------------------------------------+
# UART 1 (uart_id: uart_esp_1)
# - path: 'packages/board/board_options_itf_uart_esp_1.yaml'
# UART 2 (uart_id: uart_esp_2)
# - path: 'packages/board/board_options_itf_uart_esp_2.yaml'
# UART 3 (uart_id: uart_esp_3)
# - path: 'packages/board/board_options_itf_uart_esp_3.yaml'
# UART flow control
# - path: 'packages/board/board_options_itf_uart_flow_control.yaml'
# vars:
# uart_id: 'uart_esp_1'
# uart_flow_control_pin: ${talk_pin}
# CAN transceiver - ESP32_CAN (TJA105x, SN65HVD230, M5Stack CAN base/unit)
# - path: 'packages/board/board_options_itf_canbus_esp32_can.yaml'
# vars:
# # to bms = canbus_bms_1
# # to inverter = canbus_inverter_1
# canbus_node_id: 'canbus_inverter_1'
# CAN transceiver - MCP2515
# - path: 'packages/board/board_options_itf_canbus_mcp2515.yaml'
# vars:
# # to bms = canbus_bms_1
# # to inverter = canbus_inverter_1
# canbus_node_id: 'canbus_inverter_1'
# PSRAM octal 80Mhz
# - path: 'packages/board/board_options_PSRAM_octal_80Mhz.yaml'
+77 -49
View File
@@ -1,5 +1,5 @@
# Updated : 2026.06.29
# Version : 1.7.0
# Updated : 2026.11.08
# Version : 1.8.2
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -64,6 +64,7 @@ substitutions:
# This allows to group entities into logical devices that appear separately in Home Assistant.
hostname: 'pvbrain2' # Name of your ESPHome node registered on the IP network (DNS name must be unique)
friendly_name : 'PVbrain2' # Name of your board (prefix for board entities)
name: '' # This name can be added as a second prefix, both for the `entity display name` and the `entity id`, you can leave it blank.
# +--------------------------------------+
# | YamBMS Settings |
# +--------------------------------------+
@@ -90,7 +91,7 @@ substitutions:
# This timer can be deactivated with a switch
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '60'
yambms_cutoff_timer: '180'
# Max. charge current : corresponds to the maximum charge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_charge_current: '300' # in Ampere
@@ -132,6 +133,16 @@ substitutions:
{ 60.0, 0.00 }
}
# +--------------------------------------+
# | YamBMS services |
# +--------------------------------------+
# Update service : checks GitHub for a newer YamBMS version.
# Telemetry service : sends anonymous data about your setup (BMS model, board,
# inverter protocol, YamBMS version). It is what tells me which hardware is
# actually in use, so I know where to spend my time. Public stats and details
# on what is collected : stats.yambms.org
yambms_update_service: 'true' # Set to false to disable update checks
yambms_telemetry_service: 'true' # Set to false to disable the sending of telemetry data
# +--------------------------------------+
# | Shunt Settings |
# +--------------------------------------+
shunt_update_interval: '3s' # frequency at which Shunt data is refreshed
@@ -145,16 +156,29 @@ substitutions:
enable_led_logging: 'false' # Set to true to see if an led is assigned to a component correctly, logged every 60 seconds
enable_health_logging: 'false' # Set to true to see if component health for all component instances, logged every 60 seconds
# +--------------------------------------+
# | Advanced options |
# +--------------------------------------+
# Increase the `loop_task_stack_size` value for a large number of BMS / entities
# See https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/LOOP_TASK_STACK.md before changing
loop_task_stack_size: "16384" # 8192 / 16384 / 32768 bytes
# +--------------------------------------+
# | PVbrain2 settings |
# +--------------------------------------+
my_second: '59'
my_minute: '59'
my_hours: '23'
# +--------------------------------------+
# | UART expander WK2168 |
# +--------------------------------------+
uart0_baudrate: '2400' # uart_id : uart_${uart_hub_bus}_0 WKS {RJ45-UART0}
uart1_baudrate: '38400' # uart_id : uart_${uart_hub_bus}_1 JSY193
uart2_baudrate: '19200' # uart_id : uart_${uart_hub_bus}_2 SmartShunt
uart3_baudrate: '9600' # uart_id : uart_${uart_hub_bus}_3 SRNE {RJ45-UART3}
uart4_baudrate: '115200' # uart_id : uart_${uart_hub_bus}_4 JK-BMS 1
uart5_baudrate: '115200' # uart_id : uart_${uart_hub_bus}_5 JK-BMS 2
uart6_baudrate: '115200' # uart_id : uart_${uart_hub_bus}_6 Pylontech
uart7_baudrate: '9600' # uart_id : uart_${uart_hub_bus}_7 EPEVER {RJ45-UART7}
# uart_spi_0 : 2400 WKS {RJ45-UART0}
# uart_spi_1 : 38400 JSY193
# uart_spi_2 : 19200 SmartShunt
# uart_spi_3 : 9600 SRNE {RJ45-UART3}
# uart_spi_4 : 115200 JK-BMS 1
# uart_spi_5 : 115200 JK-BMS 2
# uart_spi_6 : 115200 Pylontech
# uart_spi_7 : 9600 EPEVER {RJ45-UART7}
@@ -172,7 +196,8 @@ packages:
files:
# Board
- path: 'packages/board/board_ESP32-S3_DevKitC-1_PVbrain2.yaml'
- path: 'packages/board/board_ESP32-S3_DevKitC-1_PVbrain2_LED-48.yaml' # DevKitC-1 V1.0
# - path: 'packages/board/board_ESP32-S3_DevKitC-1_PVbrain2_LED-38.yaml' # DevKitC-1 V1.1
# vars:
# server_status_led_id: 'virtual_status_light' # led used to show status. Default = esp_light, set specific led or set to 'virtual_status_light' to disable
# network_status_led_id: 'virtual_status_light' # led used to show status. Default = esp_light, set specific led or set to 'virtual_status_light' to disable
@@ -184,41 +209,34 @@ packages:
# | >>> Uncomment your interfaces and options
# +------------------------------------------------------------------------------+
# UART 1 (uart_id: uart_esp_1)
# - path: 'packages/board/board_options_itf_uart_esp_1.yaml'
# UART 2 (uart_id: uart_esp_2)
# - path: 'packages/board/board_options_itf_uart_esp_2.yaml'
# UART 3 (uart_id: uart_esp_3)
# - path: 'packages/board/board_options_itf_uart_esp_3.yaml'
# BUS
# - path: 'packages/board/board_options_itf_bus_spi.yaml' # SPI bus for MCP2515
# - path: 'packages/board/board_options_itf_bus_spi.yaml' # SPI bus
# - path: 'packages/board/board_options_itf_bus_i2c.yaml' # I2C bus for SX1509 and BME280/BMP280
# - path: 'packages/board/board_options_itf_bus_one_wire.yaml' # One wire bus for Dallas Temperature Sensor
# WK2168 UART/IO Expander
- path: 'packages/board/board_options_itf_pvbrain2_wk2168_spi.yaml'
# - path: 'packages/board/board_options_itf_pvbrain2_wk2168_i2c.yaml'
- path: 'packages/board/board_options_itf_wk2168_spi.yaml'
# - path: 'packages/board/board_options_itf_wk2168_i2c.yaml'
# Modbus 1
# - path: 'packages/board/board_options_itf_modbus.yaml'
# vars:
# modbus_id: '1' # can be a number or text or a mixture of both, e.g. full id = modbus_client_1
# modbus_role: 'client' # client / server
# modbus_uart_id: 'uart_spi_1'
# Modbus 2
# - path: 'packages/board/board_options_itf_modbus.yaml'
# vars:
# modbus_id: '2' # can be a number or text or a mixture of both, e.g. full id = modbus_client_2
# modbus_role: 'client' # client / server
# modbus_uart_id: 'uart_spi_2'
# SX1509 16 channel I/O Expander
# - path: 'packages/board/board_options_itf_pvbrain2_sx1509.yaml'
# CAN transceiver - ESP32_CAN (TJA105x, SN65HVD230, M5Stack CAN base/unit)
- path: 'packages/board/board_options_itf_canbus_esp32_can.yaml'
vars:
# to bms = canbus_bms_1
# to inverter = canbus_inverter_1
canbus_node_id: 'canbus_inverter_1'
# CAN transceiver - MCP2515
# - path: 'packages/board/board_options_itf_canbus_mcp2515.yaml'
# vars:
# # to bms = canbus_bms_1
# # to inverter = canbus_inverter_1
# canbus_node_id: 'canbus_inverter_1'
# PSRAM octal 80Mhz
# - path: 'packages/board/board_options_PSRAM_octal_80Mhz.yaml'
- path: 'packages/board/board_options_PSRAM_octal_80Mhz.yaml'
# Web Server
# - path: 'packages/yambms/yambms_web_server.yaml'
@@ -262,12 +280,14 @@ packages:
vars:
canbus_id: '1' # must be a number
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_inverter_1' # CAN bus node to which your inverter is connected
canbus_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# CAN frames sending will be paused for `30s` if the inverter does not respond with an ACK (can_id 0x305) before the end of the `canbus_link_timer` (5s by default).
canbus_link_timer_enabled: 'true' # Set it to 'false' if your inverter/charger is not sending ACK (can_id 0x305) every `1s` as specified by the protocol
canbus_link_timer: '5s'
canbus_extended_ack: 'false' # Set to 'true' for enable extended 29-bit IDs (required for Schneider XW Pro)
canbus_link_timer: '10s' # min 6s with Deye
# CAN setup
canbus_platform: 'esp32_can' # esp32_can / mcp2515
canbus_node_id: 'canbus_inverter_1' # CAN bus node to which your inverter is connected
canbus_bitrate: '500kbps' # Default : 500kbps
@@ -275,14 +295,17 @@ packages:
# | >>> RS485 bus to Inverter
# +------------------------------------------------------------------------------+
# - path: 'packages/yambms/yambms_rs485_pylon.yaml' # yambms_rs485_pylon_web_server.yaml
# - path: 'packages/yambms/yambms_rs485.yaml'
# # - path: 'packages/yambms/yambms_rs485_web_server.yaml'
# vars:
# rs485_id: '1' # Must be a number
# rs485_id: '1' # Must be a number
# rs485_name: 'RS485 1'
# rs485_uart_id: 'uart_esp_3' # UART interface to which your inverter is connected
# rs485_uart_baud_rate: '9600'
# rs485_protocol: 'pylon' # pylon / voltronic
# rs485_update_timeout: '10s'
# rs485_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# # UART setup
# rs485_uart_id: 'uart_spi_3' # UART interface to which your inverter is connected
# rs485_uart_baud_rate: '9600' # Default : 9600 / Epever : 115200
@@ -290,8 +313,8 @@ packages:
# | >>> DEBUG ( logger level must be DEBUG )
# +------------------------------------------------------------------------------+
- path: packages/base/device_debug_ESP32.yaml
# - path: packages/base/device_debug_ESP32_PSRAM.yaml
# - path: packages/base/device_debug_ESP32.yaml
- path: packages/base/device_debug_ESP32_PSRAM.yaml
vars:
debug_name: 'Debug'
debug_update_interval: '5s'
@@ -302,11 +325,16 @@ packages:
# +------------------------------------------------------------------------------+
# | >>> Add your custom packages below
# | >>> PVbrain2 packages
# +------------------------------------------------------------------------------+
# Custom packages
# yambms_custom: !include yambms_custom.yaml
# pvbrain2_packages:
# url: https://github.com/SeByDocKy/pvbrain2
# ref: main
# refresh: 0s
# files:
# # Add here your PVbrain2 packages
# +------------------------------------------------------------------------------+
# | >>> Add your custom YAML below
+2 -10
View File
@@ -1,5 +1,5 @@
# Updated : 2026.06.29
# Version : 1.7.0
# Updated : 2026.11.08
# Version : 1.8.2
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -68,14 +68,6 @@ packages:
# server_status_led_id: 'virtual_status_light' # led used to show status. Default = esp_light, set specific led or set to 'virtual_status_light' to disable
# network_status_led_id: 'virtual_status_light' # led used to show status. Default = esp_light, set specific led or set to 'virtual_status_light' to disable
# uart
- path: packages/board/board_options_itf_uart_1.yaml
- path: packages/board/board_options_itf_uart_2.yaml
- path: packages/board/board_options_itf_uart_3.yaml
- path: packages/board/board_options_itf_uart_4.yaml
- path: packages/board/board_options_itf_uart_5.yaml
- path: packages/board/board_options_itf_uart_6.yaml
# modbus
- path: packages/board/board_options_itf_modbus.yaml
vars:
+34 -37
View File
@@ -1,5 +1,5 @@
# Updated : 2026.06.29
# Version : 1.7.0
# Updated : 2026.11.08
# Version : 1.8.2
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -90,7 +90,7 @@ substitutions:
# This timer can be deactivated with a switch
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '60'
yambms_cutoff_timer: '180'
# Max. charge current : corresponds to the maximum charge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_charge_current: '300' # in Ampere
@@ -132,6 +132,16 @@ substitutions:
{ 60.0, 0.00 }
}
# +--------------------------------------+
# | YamBMS services |
# +--------------------------------------+
# Update service : checks GitHub for a newer YamBMS version.
# Telemetry service : sends anonymous data about your setup (BMS model, board,
# inverter protocol, YamBMS version). It is what tells me which hardware is
# actually in use, so I know where to spend my time. Public stats and details
# on what is collected : stats.yambms.org
yambms_update_service: 'true' # Set to false to disable update checks
yambms_telemetry_service: 'true' # Set to false to disable the sending of telemetry data
# +--------------------------------------+
# | Shunt Settings |
# +--------------------------------------+
shunt_update_interval: '3s' # frequency at which Shunt data is refreshed
@@ -144,6 +154,12 @@ substitutions:
# +--------------------------------------+
enable_led_logging: 'false' # Set to true to see if an led is assigned to a component correctly, logged every 60 seconds
enable_health_logging: 'false' # Set to true to see if component health for all component instances, logged every 60 seconds
# +--------------------------------------+
# | Advanced options |
# +--------------------------------------+
# Increase the `loop_task_stack_size` value for a large number of BMS
# See https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/LOOP_TASK_STACK.md before changing
loop_task_stack_size: "8192" # 8192 / 16384 / 32768 bytes
@@ -214,33 +230,6 @@ packages:
# | >>> Uncomment your interfaces and options
# +------------------------------------------------------------------------------+
# UART 1 (uart_id: uart_esp_1)
- path: 'packages/board/board_options_itf_uart_esp_1.yaml'
# UART 2 (uart_id: uart_esp_2)
# - path: 'packages/board/board_options_itf_uart_esp_2.yaml'
# UART 3 (uart_id: uart_esp_3)
# - path: 'packages/board/board_options_itf_uart_esp_3.yaml'
# UART flow control
# - path: 'packages/board/board_options_itf_uart_flow_control.yaml'
# vars:
# uart_id: 'uart_esp_1'
# uart_flow_control_pin: ${talk_pin}
# CAN transceiver - ESP32_CAN (TJA105x, SN65HVD230, M5Stack CAN base/unit)
- path: 'packages/board/board_options_itf_canbus_esp32_can.yaml'
vars:
# to bms = canbus_bms_1
# to inverter = canbus_inverter_1
canbus_node_id: 'canbus_inverter_1'
# CAN transceiver - MCP2515
# - path: 'packages/board/board_options_itf_canbus_mcp2515.yaml'
# vars:
# # to bms = canbus_bms_1
# # to inverter = canbus_inverter_1
# canbus_node_id: 'canbus_inverter_1'
# PSRAM octal 80Mhz
# - path: 'packages/board/board_options_PSRAM_octal_80Mhz.yaml'
@@ -284,12 +273,14 @@ packages:
vars:
canbus_id: '1' # must be a number
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_inverter_1' # CAN bus node to which your inverter is connected
canbus_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# CAN frames sending will be paused for `30s` if the inverter does not respond with an ACK (can_id 0x305) before the end of the `canbus_link_timer` (5s by default).
canbus_link_timer_enabled: 'true' # Set it to 'false' if your inverter/charger is not sending ACK (can_id 0x305) every `1s` as specified by the protocol
canbus_link_timer: '5s'
canbus_extended_ack: 'false' # Set to 'true' for enable extended 29-bit IDs (required for Schneider XW Pro)
canbus_link_timer: '10s' # min 6s with Deye
# CAN setup
canbus_platform: 'esp32_can' # esp32_can / mcp2515
canbus_node_id: 'canbus_inverter_1' # CAN bus node to which your inverter is connected
canbus_bitrate: '500kbps' # Default : 500kbps
@@ -297,14 +288,20 @@ packages:
# | >>> RS485 bus to Inverter
# +------------------------------------------------------------------------------+
# - path: 'packages/yambms/yambms_rs485_pylon.yaml' # yambms_rs485_pylon_web_server.yaml
# - path: 'packages/yambms/yambms_rs485.yaml'
# # - path: 'packages/yambms/yambms_rs485_web_server.yaml'
# vars:
# rs485_id: '1' # Must be a number
# rs485_id: '1' # Must be a number
# rs485_name: 'RS485 1'
# rs485_uart_id: 'uart_esp_3' # UART interface to which your inverter is connected
# rs485_uart_baud_rate: '9600'
# rs485_protocol: 'pylon' # pylon / voltronic
# rs485_update_timeout: '10s'
# rs485_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# # UART setup
# rs485_uart_id: 'uart_esp_3' # UART interface to which your inverter is connected
# # ESP32 : uart_esp_1 to uart_esp_3
# # WK2168 : uart_spi_0 to uart_spi_7 / uart_i2c_0 to uart_i2c_7
# rs485_uart_baud_rate: '9600' # Default : 9600 / Epever : 115200
# +------------------------------------------------------------------------------+
+32 -37
View File
@@ -1,5 +1,5 @@
# Updated : 2026.06.29
# Version : 1.7.0
# Updated : 2026.11.08
# Version : 1.8.2
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -90,7 +90,7 @@ substitutions:
# This timer can be deactivated with a switch
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '60'
yambms_cutoff_timer: '180'
# Max. charge current : corresponds to the maximum charge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_charge_current: '300' # in Ampere
@@ -132,6 +132,16 @@ substitutions:
{ 60.0, 0.00 }
}
# +--------------------------------------+
# | YamBMS services |
# +--------------------------------------+
# Update service : checks GitHub for a newer YamBMS version.
# Telemetry service : sends anonymous data about your setup (BMS model, board,
# inverter protocol, YamBMS version). It is what tells me which hardware is
# actually in use, so I know where to spend my time. Public stats and details
# on what is collected : stats.yambms.org
yambms_update_service: 'true' # Set to false to disable update checks
yambms_telemetry_service: 'true' # Set to false to disable the sending of telemetry data
# +--------------------------------------+
# | Shunt Settings |
# +--------------------------------------+
shunt_update_interval: '3s' # frequency at which Shunt data is refreshed
@@ -144,6 +154,12 @@ substitutions:
# +--------------------------------------+
enable_led_logging: 'false' # Set to true to see if an led is assigned to a component correctly, logged every 60 seconds
enable_health_logging: 'false' # Set to true to see if component health for all component instances, logged every 60 seconds
# +--------------------------------------+
# | Advanced options |
# +--------------------------------------+
# Increase the `loop_task_stack_size` value for a large number of BMS
# See https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/LOOP_TASK_STACK.md before changing
loop_task_stack_size: "8192" # 8192 / 16384 / 32768 bytes
@@ -214,33 +230,6 @@ packages:
# | >>> Uncomment your interfaces and options
# +------------------------------------------------------------------------------+
# UART 1 (uart_id: uart_esp_1)
- path: 'packages/board/board_options_itf_uart_esp_1.yaml'
# UART 2 (uart_id: uart_esp_2)
# - path: 'packages/board/board_options_itf_uart_esp_2.yaml'
# UART 3 (uart_id: uart_esp_3)
# - path: 'packages/board/board_options_itf_uart_esp_3.yaml'
# UART flow control
# - path: 'packages/board/board_options_itf_uart_flow_control.yaml'
# vars:
# uart_id: 'uart_esp_1'
# uart_flow_control_pin: ${talk_pin}
# CAN transceiver - ESP32_CAN (TJA105x, SN65HVD230, M5Stack CAN base/unit)
- path: 'packages/board/board_options_itf_canbus_esp32_can.yaml'
vars:
# to bms = canbus_bms_1
# to inverter = canbus_inverter_1
canbus_node_id: 'canbus_inverter_1'
# CAN transceiver - MCP2515
# - path: 'packages/board/board_options_itf_canbus_mcp2515.yaml'
# vars:
# # to bms = canbus_bms_1
# # to inverter = canbus_inverter_1
# canbus_node_id: 'canbus_inverter_1'
# PSRAM octal 80Mhz
# - path: 'packages/board/board_options_PSRAM_octal_80Mhz.yaml'
@@ -284,12 +273,14 @@ packages:
vars:
canbus_id: '1' # must be a number
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_inverter_1' # CAN bus node to which your inverter is connected
canbus_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# CAN frames sending will be paused for `30s` if the inverter does not respond with an ACK (can_id 0x305) before the end of the `canbus_link_timer` (5s by default).
canbus_link_timer_enabled: 'true' # Set it to 'false' if your inverter/charger is not sending ACK (can_id 0x305) every `1s` as specified by the protocol
canbus_link_timer: '5s'
canbus_extended_ack: 'false' # Set to 'true' for enable extended 29-bit IDs (required for Schneider XW Pro)
canbus_link_timer: '10s' # min 6s with Deye
# CAN setup
canbus_platform: 'esp32_can' # esp32_can / mcp2515
canbus_node_id: 'canbus_inverter_1' # CAN bus node to which your inverter is connected
canbus_bitrate: '500kbps' # Default : 500kbps
@@ -297,14 +288,18 @@ packages:
# | >>> RS485 bus to Inverter
# +------------------------------------------------------------------------------+
# - path: 'packages/yambms/yambms_rs485_pylon.yaml' # yambms_rs485_pylon_web_server.yaml
# - path: 'packages/yambms/yambms_rs485.yaml'
# # - path: 'packages/yambms/yambms_rs485_web_server.yaml'
# vars:
# rs485_id: '1' # Must be a number
# rs485_id: '1' # Must be a number
# rs485_name: 'RS485 1'
# rs485_uart_id: 'uart_esp_3' # UART interface to which your inverter is connected
# rs485_uart_baud_rate: '9600'
# rs485_protocol: 'pylon' # pylon / voltronic
# rs485_update_timeout: '10s'
# rs485_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# # UART setup
# rs485_uart_id: 'uart_esp_3' # UART interface to which your inverter is connected
# rs485_uart_baud_rate: '9600' # Default : 9600 / Epever : 115200
# +------------------------------------------------------------------------------+
@@ -8,6 +8,7 @@
> [!IMPORTANT]
> This board uses a `flow_control_pin`, also called a `talk_pin` in the YamBMS documentation and used to manage the direction of data transmission for RS485 transceiver that do not handle this automatically. This `talk_pin` must be specified in your YAML.
> Set it with `uart_flow_control_pin: ${talk_pin}` in the `vars:` of the package that uses the UART.
## Overview
-191
View File
@@ -1,191 +0,0 @@
# YamBMS changelog
[![Badge License: GPLv3](https://img.shields.io/badge/License-GPLv3-brightgreen.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![Badge Version](https://img.shields.io/github/v/release/Sleeper85/esphome-yambms?include_prereleases&color=yellow&logo=DocuSign&logoColor=white)](https://github.com/Sleeper85/esphome-yambms/releases/latest)
![GitHub stars](https://img.shields.io/github/stars/Sleeper85/esphome-yambms)
![GitHub forks](https://img.shields.io/github/forks/Sleeper85/esphome-yambms)
![GitHub watchers](https://img.shields.io/github/watchers/Sleeper85/esphome-yambms)
* YamBMS 1.7.0 :
* Partial rewrite of `yambms_core` and merging of C++ code into a single lambda in several stages with increased datas control.
* Added LVGL display dashboard for Waveshare Touch-LCD 4.3" and 7" (Blue Navy 800x480 design)
* Fixed [issue 10](https://github.com/Sleeper85/esphome-yambms/issues/10) Sending CAN bus data before the end of the combination process
* Fixed [issue 154](https://github.com/Sleeper85/esphome-yambms/issues/154) Add `Enerkey Balancers` balance stop diff voltage setting (register 0x1A)
* Fixed [issue 160](https://github.com/Sleeper85/esphome-yambms/issues/160) The SOH sensor is interpreted as a battery percentage
* Fixed [issue 182](https://github.com/Sleeper85/esphome-yambms/issues/182) Compliance of Auto functions for YamBMS 1.7.0
* Fixed [issue 268](https://github.com/Sleeper85/esphome-yambms/issues/268) [Add an option] The inverter is not sending ACK CAN ID 0x305
* Fixed [issue 282](https://github.com/Sleeper85/esphome-yambms/issues/282) JK errors_bitmask has been removed
* Merged [PR 281](https://github.com/Sleeper85/esphome-yambms/pull/281) Add WS Touch-LCD-4.3B board
* Merged [PR 261](https://github.com/Sleeper85/esphome-yambms/pull/261) Add LilyGo T-Connect Pro Lite board (without screen)
* Merged [PR 259](https://github.com/Sleeper85/esphome-yambms/pull/259) Add support for Rebulk Days
* Merged [PR 258](https://github.com/Sleeper85/esphome-yambms/pull/258) Auto EOC: Factor in Auto SoC Limit for battery capacity calculation
* Merged [PR 255](https://github.com/Sleeper85/esphome-yambms/pull/255) Add support for Auto SoC Limit
* Merged [PR 236](https://github.com/Sleeper85/esphome-yambms/pull/236) Switch to VictronMPPT-ESPHOME fork
* Merged [PR 235](https://github.com/Sleeper85/esphome-yambms/pull/235) Basen: Add "Enable communication" switch
* Merged [PR 200](https://github.com/Sleeper85/esphome-yambms/pull/200) Add M5Stack Tab5 with LVGL display
* Merged [PR 199](https://github.com/Sleeper85/esphome-yambms/pull/199) Add Ecoworthy BMS integration for YamBMS
* Merged [PR 194](https://github.com/Sleeper85/esphome-yambms/pull/194) Component Fault Registry & Advanced LED Control
* Merged [PR 178](https://github.com/Sleeper85/esphome-yambms/pull/178) Basen BMS: Add heating control
* Merged [PR 170](https://github.com/Sleeper85/esphome-yambms/pull/170) Add Freenove S3 board
* Merged [PR 162](https://github.com/Sleeper85/esphome-yambms/pull/162) PACE Sensor Fixes
* Merged [PR 158](https://github.com/Sleeper85/esphome-yambms/pull/158) Automatically disable shunt when connected BMSs are going offline
* YamBMS 1.6.0 :
* New dashboards `1.6.0`
* Added `iBMS V3.3` board
* Updated `JK-PB` readme with **V19** warning and SoC 100% reset solution 1 and 2
* Added board option `UART flow control` allows you to activate a `talk_pin` for the UART of your choice (e.g. WS-RS485-CAN)
* Added AtomS3 GPIOs for `Atomic RS485 base` (uart_esp_3)
* Disabled the `reboot_timeout` after 15 minutes in case of WiFi unavailability
* New `Hardware highlighted` documentation (LilyGo / Waveshare / M5Stack)
* New readme for **LilyGo T-Connect, WS RS485-CAN and M5Stack AtomS3** boards
* Improved documentation.
* Fixed [issue 83](https://github.com/Sleeper85/esphome-yambms/issues/83) Add esphome-pace-bms
* Fixed [issue 94](https://github.com/Sleeper85/esphome-yambms/issues/94) Multi-BMS Seplos V3 don't work
* Fixed [issue 96](https://github.com/Sleeper85/esphome-yambms/issues/96) Improve the SoC returned at the end of discharge
* Fixed [issue 100](https://github.com/Sleeper85/esphome-yambms/issues/100) Improve the BMS Seplos V1 V2 examples
* Fixed [issue 102](https://github.com/Sleeper85/esphome-yambms/issues/102) Improve Remaining Capacity when using a shunt
* Added [issue 106](https://github.com/Sleeper85/esphome-yambms/issues/106) [FEATURE REQUEST] Temperature-based current limiting
* Fixed [issue 108](https://github.com/Sleeper85/esphome-yambms/issues/108) [WARNING] esphome::select::Select::state` is deprecated
* Fixed [issue 122](https://github.com/Sleeper85/esphome-yambms/issues/122) Adjust `bms_name` in all example YAML to something unique
* Fixed [issue 128](https://github.com/Sleeper85/esphome-yambms/issues/128) Align the names of the shunt entities
* Fixed [issue 142](https://github.com/Sleeper85/esphome-yambms/issues/142) Maximum capacity needs to be increased for `JK_RS485` BMS
* Merged [PR 76](https://github.com/Sleeper85/esphome-yambms/pull/76) Add `Auto EOC` function
* Merged [PR 82](https://github.com/Sleeper85/esphome-yambms/pull/82) Add support for external balancer
* Merged [PR 85](https://github.com/Sleeper85/esphome-yambms/pull/85) Adding `EG4 LLV2` BMS
* Merged [PR 97](https://github.com/Sleeper85/esphome-yambms/pull/97) Add `Basen controller` version with talk/flow control pin
* Merged [PR 99](https://github.com/Sleeper85/esphome-yambms/pull/99) Basen: Use new binary sensors for charging/discharging
* Merged [PR 112](https://github.com/Sleeper85/esphome-yambms/pull/112) Adding `FLIP_C3` board
* Merged [PR 117](https://github.com/Sleeper85/esphome-yambms/pull/117) Round requested charge/discharge current to nearest integer
* Change [PR 119](https://github.com/Sleeper85/esphome-yambms/pull/119) Updated `Power` gauge (-10kW to 10kW)
* Merged [PR 133](https://github.com/Sleeper85/esphome-yambms/pull/133) Add `Studer XTM-4000` to supported inverters
* Merged [PR 142](https://github.com/Sleeper85/esphome-yambms/pull/142) Sub device support
* Merged [PR 143](https://github.com/Sleeper85/esphome-yambms/pull/143) Improved `Cut-Off charging` logic equation and documentation
* Merged [PR 147](https://github.com/Sleeper85/esphome-yambms/pull/147) Improved `CCL`, `DCL` and `Temp-based` current control
* Merged [PR 155](https://github.com/Sleeper85/esphome-yambms/pull/155) Update temperature sensor filters to reduce noise
* YamBMS 1.5.8 :
* New Dashboards `1.5.8` compatible with `CANBUS` and `RS485` inverter communication protocol
* Added BMS `SEPLOS V3` (beta)
* Added YamBMS `Web Server v3`
* Added `WiFi AP`
* `WiFi AP` and `Web Server` credentials centralized in `secrets.yaml`
* Added `WT32-ETH01` board
* Fixed [issue 8](https://github.com/Sleeper85/esphome-yambms/issues/8) ETH01-EVO board - Davicom DM9051 SPI Ethernet Controller is now integrated in esphome `2025.7`
* Fixed [issue 24](https://github.com/Sleeper85/esphome-yambms/issues/24) [JK-PB] SoC never reaches 100%
* Fixed [issue 63](https://github.com/Sleeper85/esphome-yambms/issues/63) [JK RS485 component] Fix *.*_SCHEMA deprecations
* Merged [PR 67](https://github.com/Sleeper85/esphome-yambms/pull/67) Add options to restrict max. charge and discharge current
* Merged [PR 72](https://github.com/Sleeper85/esphome-yambms/pull/72) Add Pylontech RS485 inverter protocol
* Merged [PR 74](https://github.com/Sleeper85/esphome-yambms/pull/74) `PYLON RS485` link status, Heartbeat and Requested Force Charge
* Merged [PR 75](https://github.com/Sleeper85/esphome-yambms/pull/75) Round `Auto CCL` / `Auto DCL` values
* Merged [PR 77](https://github.com/Sleeper85/esphome-yambms/pull/77) `PYLON RS485` prevent stale data on BMS disconnect
* Merged [PR 80](https://github.com/Sleeper85/esphome-yambms/pull/80) BMS Modbus client: Return 0 when not online
* Merged [PR 81](https://github.com/Sleeper85/esphome-yambms/pull/81) Fix balance trigger voltage for Basen and Deye
* YamBMS 1.5.7 :
* Adapted the default `min/max` values ​​for the `Float` slider
* Merged [PR 53](https://github.com/Sleeper85/esphome-yambms/pull/53) Add feature `Auto Float Voltage`
* New dashboard for `Auto Float Voltage` function
* Defining `state_class` for all YamBMS sensors
* Set esphome `min_version` to `2025.6.0`
* Fixed: change `Charge Status` to `Bulk` when `Force Charge` is requested
* Merged [PR 70](https://github.com/Sleeper85/esphome-yambms/pull/70) Dashboards compatible with `HA 2025.7`
* Merged [PR 70](https://github.com/Sleeper85/esphome-yambms/pull/71) Dashboard `max/min` cell voltage in color using macro
* Removed all special characters in entities name + dashboards correction
* YamBMS 1.5.6 :
* Fixed [issue 58](https://github.com/Sleeper85/esphome-yambms/issues/58) Compilation problem with `esphome 2025.5.0`
* Fixed [issue 55](https://github.com/Sleeper85/esphome-yambms/issues/55) New CPU frequency option
* Fixed [issue 65](https://github.com/Sleeper85/esphome-yambms/issues/65) JBD Circular dependency error
* Fixed [issue 35](https://github.com/Sleeper85/esphome-yambms/issues/35) BMS Charging Cycles Offset
* Merged [PR 51](https://github.com/Sleeper85/esphome-yambms/pull/51) Support for RP2040 RPi Pico
* Merged [PR 56](https://github.com/Sleeper85/esphome-yambms/pull/56) Add support for Basengreen BMS
* Merged [PR 60](https://github.com/Sleeper85/esphome-yambms/pull/60) Fixes for new ESPHome and add of BMS Cycle Count offset
* Merged [PR 61](https://github.com/Sleeper85/esphome-yambms/pull/61) Set Modbus BMS values to 0 when BMS goes offline
* New `board_ESP32-S3_Touch-LCD-4.3.yaml` board
* New `board_ESP32-S3_Touch-LCD-7.yaml` board
* New `board_ESP32-S3_YBoard_DJK.yaml` board
* New `board_RP2040_RPi_Pico.yaml` board
* YamBMS 1.5.5 :
* New `main.yaml` with LP (local packages) and RP (remote packages) versions
* New `board.yaml` with modular UART/CAN interfaces
* The name of the JK `bms.yaml` is no longer linked to a specific model
* SoC calculation is now based on remaining capacity for more accuracy (BMS only) [issues #39](https://github.com/Sleeper85/esphome-yambms/issues/39)
* SoH calculation is moved to BMS level (for those who do not provide this information)
* Improvement of the Victron SmartShunt doc [issues #38](https://github.com/Sleeper85/esphome-yambms/issues/38)
* YamBMS 1.5.4 :
* New low SoC corrected at each BMS level (the corrected SoC is the one transmitted to YamBMS)
* New BMS dashboard
* New end of charge logic at each BMS level, the charge switch turns off when the cells are equalized (disabled by default)
* Fixed `errors_bitamsk` for JK-PB RS485, test OK with YamBMS (forked component)
* YamBMS 1.5.3 :
* Broadcasting JK-PB settings to all BMS set to OFF by default
* Reorganizing the `board` folder and YAMLs (device_base.yaml moved to board.yaml)
* `device_base.yaml` should no longer be part of `YamBMS_main.yaml`
* New `RGB LED status` light effects (red, green, blue, cyan) as an `options` packages for `board.yaml`
* Increased CPU frequency to `240Mhz` as an `options` packages for `board.yaml`
* Added `ESP32 Generic`, `LilyGo T-CAN485`, `LilyGo T-Connect` and `XIAO` boards
* Fixed SoC logic (low SoC will be detected at BMS level and no longer at YamBMS level)
* Simplified combination logic (removal of the combine switch) + dashboard update
* Check `Battery Capacity` is `> 0` before combining info (see [issue #14](https://github.com/Sleeper85/esphome-yambms/issues/14))
* Improved alarm logic with a common `YamBMS errors bitmask` for all BMS models (see OTP vs UTP bug reported by @ChrisG)
* Added [PR #7547](https://github.com/esphome/esphome/pull/7547) regarding publishing entities via the API
* Removed `captive_portal` because it increases the `loop time` too much
* `PSRAM` will no longer be enabled by default as this has a bad impact on `BLE BMS`
* YamBMS 1.5.2 :
* Added shunt `Online Status` binary_sensor
* Shunt combine condition based on the new binary_sensor `Online Status`
* Logger `baud_rate: 0` by default (frees the 3rd UART and avoids some bugs like "WK2168 with canbus" or "BLE client with RS485 modbus")
* Changed names of `bms` and `shunt` YAMLs for modbus `multi-node` solution
* Added shared configuration file to simplify main YAML (centralization of parameters)
* Simplification (fewer options) when importing `BMS / Shunt` YAMLs
* New `multi-node` solution using `RS485 modbus` to communicate information to YamBMS
* New board `espBerry` with `2-CH-CAN HAT`
* YamBMS 1.5.1 :
* The conditions for `combining` BMS and the `charging` and `discharging` instructions no longer have any relation with the `errors_bitmask` sensor, the new system relies on the three **binary_sensor** `online status`, `charging allowed` and `discharging allowed` being linked to the status of alarms and switches.
* The BMS combination procedure has been completely rewritten.
* Improved structure and ID names of `bms.yaml`.
* The `yambms.yaml` and `yambms_combine.yaml` global variable names have been changed for better code reading.
* Improved code regarding the CAN bus `esp_light` status for boards without integrated LED.
* New `Atom S3R` board and `Smartshunt BLE` shunt.
* New `JBD`, `Seplos V1 V2`, `JK-B RS485` (display port) and `FAKE` BMS.
* New `YamBMS DEMO` YAML and firmware offered to test and discover how `YamBMS` works.
* New management of temperature sensors (no longer limited to two sensors).
* **@Der_Hannes** fixed the AtomS3 `black screen` issue (with **esphome > 2024.7.3**) and developed new code for display management based on the [ili9xxx](https://esphome.io/components/display/ili9xxx.html) platform.
* `Auto CCL/DCL` functions have been fixed to work with `JK-PB` and `new JK-B` BMS, [see this issue](https://github.com/Sleeper85/esphome-yambms/issues/11).
* The `UVPR` and `OVPR` sensors are no longer used and replaced by `UVP` and `OVP` to ensure operation with all BMS.
* **@txubelaxu** fixed a bug in the `JK-PB RS485` component that could cause a false battery voltage value to be sent, [see this issue](https://github.com/Sleeper85/esphome-yambms/issues/10).
* Improved documentation, added a `HowTo` to create its main YAML, warning about galvanic isolation.
* CANBUS 2.3.7 : If there is no response from the inverter, the time before a new communication test has been reduced from `120s` to `60s`, added Victron `0x372` nbr. of modules `blocking charge/discharge`.
* YamBMS 1.4.5 : Changed the way to configure WiFi/Ethernet network, added `ESP32-C3 ETH01-EVO` ethernet board, reduction of the number of YAML bms files, UART `rx_buffer_size` is set to `512` by default for JK-B and JK-PB, new JK-BMS BLE sensors (last commits of @syssi) and new BLE `standard` version
* CANBUS 2.3.6 : Sending CAN frames stops immediately if there are no combined BMS
* YamBMS 1.4.4 : Multi-shunt support, Simplified and new YamBMS option `battery chemistry`, slider `min/max` values ​​are automatically configured based on the battery chemistry and cell count, added `YamBMS Fallback Hotspot`, added YamBMS `Update service`, added PVbrain2 and Atom Matrix board, added PSRAM settings YAML (not enabled by default), new MIN/MAX temperature sensor, added DC current icon, fixed dual sensor `Cell UVPR (MAX)` bug, Improved `combine` code, Breaking change : Atom S3 `GPIOs 1 and 2` reversed
* CANBUS 2.3.5 : New MIN/MAX temperature / sensor ID, Improved Victron protocol (online/offline battery modules, installed/available battery capacity)
* CANBUS 2.3.4 : Fixed bug of canbus link validation without inverter connected
* YamBMS 1.4.3 : Added Victron and Junctek KH-F `Shunt` support and `Requested Force Charge` function based on `SoC start/stop`, new `Total Daily Energy` sensors
* CANBUS 2.3.3 : Added `Automatic` BMS name selection and `Requested Force Charge` Bit 3/4/5 (PYLON 0x35C)
* CANBUS 2.3.2 : Added `LuxPower` protocol with updated `can_id` 0x355, 0x356, 0x359 and 0x35C
* CANBUS 2.3.1 : Improved the procedure for sending canbus frames with reduced loop time, rewritten of the canbus link validation code and added `Inverter Heartbeat Monitoring` function
* YamBMS 1.4.2 : Added new `Auto CVL Boost V.` and `Rebulk SoC` functions, new debug.yaml for ESP32 and ESP32-S3, improved code and comments
* YamBMS 1.4.1 : Rewriting of the alarm system, bug fixes and improvement of the charging logic (new status `Cut-Off`), icon allocation for each sensor, UART and CANBUS `!extend ${vars}`, New sensor `YamBMS Delta Cell V.`, Improved `Battery SOC` logic
* YamBMS 1.3.2 : New var `yambms_cell_count`, the BMS charge or discharge switches can be activated separately without causing the decombination of the BMS, new `minimal` version of the BMS YAML in order to reduce the loop time
* YamBMS 1.3.1 : First multi-BMS version named `YamBMS`
@@ -0,0 +1,59 @@
# YamBMS - Charging a battery with CVL and CCL
[![Badge License: GPLv3](https://img.shields.io/badge/License-GPLv3-brightgreen.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![Badge Version](https://img.shields.io/github/v/release/Sleeper85/esphome-yambms?include_prereleases&color=yellow&logo=DocuSign&logoColor=white)](https://github.com/Sleeper85/esphome-yambms/releases/latest)
![GitHub stars](https://img.shields.io/github/stars/Sleeper85/esphome-yambms)
![GitHub forks](https://img.shields.io/github/forks/Sleeper85/esphome-yambms)
![GitHub watchers](https://img.shields.io/github/watchers/Sleeper85/esphome-yambms)
## Charging a battery: pressure (CVL) and flow (CCL)
Think of charge voltage as water pressure and charge current as flow. The inverter is the pump pushing at the requested pressure (CVL); the battery pushes back with its own counter-pressure, which rises as it fills. Flow depends on the *difference* between the two. There are three ways to end a charge:
### 1. CCL based — full pressure, closing valve (native Pylontech)
The source pressure stays at maximum (53.2 V) from start to finish. Charge termination is handled entirely by a valve (CCL) that is progressively closed as SOC approaches 100%, until it shuts completely (CCL = 0). This gives direct, precise control over how fast energy enters the battery — but the safety of the whole system rests on the valve's obedience. The pipe remains fully pressurized behind a closed valve: if the inverter ignores or reacts slowly to the CCL command (as with Victron's DC feed-in behavior), the full pressure is still there, ready to push. The result is the hydraulic equivalent of water hammer — overcharge spikes, high-voltage alarms, Victron error #29, and cells held permanently at elevated voltage, which accelerates calendar aging.
### 2. CVL based (Classic Float) — pressure lowered to a fixed value
After full charge, the source pressure drops to a preset float level. Inherently safer: with reduced pressure, over-filling becomes physically impossible regardless of how the downstream equipment behaves. But the fixed value is a compromise — too high and a residual trickle keeps stressing the cells; too low and the battery must discharge into the loads to reach the setpoint, causing micro-cycling and the SOC sawtooth.
### 3. CVL based (Float Follow/Immediate) — pressure tracking the battery's natural relaxation (YamBMS)
Instead of picking an arbitrary float value, the source pressure follows the battery's counter-pressure as it settles after charging, the way LFP cells naturally relax toward their resting voltage once charge current is removed. The differential stays near zero, so no meaningful flow in either direction: the battery rests at its true equilibrium voltage as if disconnected, while remaining online and ready to resume charging. It combines the built-in safety of pressure control with none of the compromises of a fixed float value.
### The key takeaway
Controlling charge through the valve alone (CCL) offers authority over flow, but keeping the pipe at full pressure behind a closed valve means safety depends entirely on the valve holding. Lowering the pressure itself (CVL) makes overcharge impossible by construction — and letting that pressure follow the battery's own relaxation is the gentlest way to do it.
## YamBMS safe-charging functions
YamBMS controls charging through both levers available on the CAN/RS485 bus — voltage (the pressure the inverter pushes at, CVL) and current (the flow admitted into the battery, CCL/DCL) — and layers several automatic protections on top of the staged charging logic.
### Charging logic (Bulk / Balancing / Cut-Off / EOC or Float)
The foundation is a staged charge profile driven by cell-level measurements, with chemistry-aware thresholds set at startup (for LFP: 3.37 V = fully charged at rest, 3.65 V = max cell voltage).
The **Cut-Off phase** is where YamBMS decides the battery is genuinely full, and it does so with an IR-compensated criterion rather than a naive voltage or tail-current test. The core computes a pseudo internal resistance, `cutoff_resistance = (cv_max − cv_min) / battery_capacity / 0.05`, then evaluates the highest cell's *compensated* voltage while charging: `cutoff_voltage = max_cell_v − cutoff_resistance × current`. This estimates what the runner cell would read *at rest*, stripped of the voltage inflation caused by charge current flowing through its internal resistance. When that compensated value reaches the "fully charged at rest" threshold (3.37 V for LFP), the cell is truly full — regardless of how much current is still flowing. The criterion must hold continuously for 10 s before entering Cut-Off (and symmetrically 10 s to fall back to Bulk), filtering out spurious BMS readings; a grey zone between the two conditions resets both timers so the state can't oscillate. Once in Cut-Off, two timers manage the exit: if the BMS reports active equalization, YamBMS holds the phase so balancing can finish; otherwise a short cut-off timer (60 s default) confirms end of charge. An overarching EOC timer (30 min default) caps the whole phase so a poorly balanced multi-battery bank can't keep the system pinned at high voltage for hours — though it can be deliberately disabled to let YamBMS rebalance a badly drifted pack over many hours. At EOC, the state moves to Float if enabled, otherwise to EOC, and only then is SOC 100% reported to the inverter.
### Auto CVL — the pressure regulator
When a runner cell starts exceeding the bulk target, YamBMS automatically lowers the requested charge voltage so that cell is held at or near its target (e.g. 3.45 V) while the balancer brings up the lagging cells. It serves a double purpose: keeping the runner at bulk voltage for effective balancing, *and* preventing it from ever climbing to the OVP threshold. In the water analogy, this is regulating the pump pressure itself: as soon as one cell's back-pressure rises too fast, the source pressure is dialed down, so overpressure — an OVP trip — becomes impossible by construction. It uses the BMS's balance trigger voltage as its reference and also tames a deliberately raised Boost Charge voltage back down at the end of charge. This is the control mode Victron and others recommend, but its effectiveness depends on how faithfully the inverter follows CVL commands.
### Auto CCL & DCL — the safety valve
Complementary current-based protection against OVP and UVP alarms. Auto CCL progressively closes the valve — throttling the admitted flow — when a cell approaches the BMS's overvoltage cutoff, keeping it just below the limit even if the pressure upstream stays high. Auto DCL mirrors this on discharge as a cell nears UVP + 0.2 V. Where Auto CVL acts on the pressure and needs a well-behaved inverter, Auto CCL acts on the flow and works with virtually any CAN/RS485-controlled inverter. Together they cover each other's weaknesses.
### Auto Float Voltage — controlled pressure release
Some inverters (e.g. Deye) interpret the Bulk-to-Float CVL drop as battery overvoltage and dump current into the grid at maximum discharge rate. Auto Float releases the pressure gradually in configurable steps (default 0.1 V every 3 minutes) instead of all at once. In *Follow* mode it waits for the battery's own voltage to relax below the current CVL before stepping down further — the source pressure tracks the battery's natural post-charge settling, keeping the differential near zero so no meaningful flow occurs in either direction. *Immediately* mode steps down on a timer regardless of battery voltage.
### Max Requested Current — layered current limiting
The requested charge/discharge current starts from the lowest of three static ceilings: a user-defined hard maximum that can never be exceeded, the aggregate BMS capability (sum of OCP values × 0.9), and the nominal current of the battery bank (total capacity × a configurable C-Rate, 0.5C by default as recommended by most LFP cell datasheets, e.g. EVE MB31). On top of that baseline, the active functions can each further reduce the current in real time: Auto Temp-Based Current, Auto CCL, Auto SoC Limit and Auto EOC act on the charge current (CCL), while Auto Temp-Based Current and Auto DCL act on the discharge current (DCL). The final CCL/DCL sent to the inverter is always the lowest value among them. The three ceilings define how far the valve may ever open in the first place — with the C-Rate ceiling anchoring it to what the cells are actually rated for, rather than to a protection threshold — then each active function closes it further as conditions require: a cold pack, a runner cell nearing OVP, a weak cell sagging toward UVP, a SoC target, or a scheduled end-of-charge time. The CCL/DCL derating reason is exposed as a diagnostic sensor so you can always see which function is currently holding the valve.
### Auto SoC Limit and Auto EOC — supervisory limits
Auto SoC Limit stops charging at a target SoC by switching to Float, clamping the CCL to a configurable small value (avoiding the 0 A requests some inverters mishandle), or both, with hysteresis to prevent oscillation around the threshold. Auto EOC slows the charge so the battery reaches full at a chosen time instead of sitting fully charged all day — a calendar-aging benefit, since it minimizes time spent at high pressure.
### ReBulk and Request Force Charge
Recharge is re-triggered by SoC, voltage, or days since last full charge (useful for periodic SOC recalibration and top balancing), and a grid force-charge can be requested between configurable start/stop SoC values on PYLON, LuxPower and Victron protocols. Force Bulk automatically disengages once the pack enters Cut-Off.
### Supporting safeguards
A 16-bit alarm bitmask consolidates protections across all connected BMS units (OVP, UVP, temperature, overcurrent, short circuit, imbalance…), distinguishing a single unit in alarm ("Warning") from a bank-wide condition. An Inverter Offset compensates for cable voltage drop or inverters that under-deliver the requested voltage, and Inverter Heartbeat Monitoring helps detect a failing CAN/RS485 link — the silent failure mode where an inverter charges blind.
### In short
Auto CVL regulates the pump pressure so no cell can ever be over-pressurized, Auto CCL is the valve that closes when a cell rises too fast despite the pressure, Auto Float releases the pressure at the battery's own relaxation rate, the three-way current minimum decides how far the valve may open at all — and the Cut-Off logic knows the tank is full by reading what the pressure would be with the flow removed, rather than trusting the inflated reading while water is still rushing in.
+97 -4
View File
@@ -9,12 +9,46 @@
> [!NOTE]
> Please read the documentation regarding the [charging settings](YamBMS_functions.md#charging-settings).
> [!NOTE]
> Please read the [YamBMS 1.7.1 Cut-Off charging logic release note](Release_note_YamBMS_1.7.1_Cut-Off_charging_logic.md).
## Charging Logic Diagram
The charging voltage and current correspond to the default values in the YAML script and can be modified.
![Image](../../images/YamBMS_Charging_Logic_Diagram.png "YamBMS Charging Logic")
## BMS dropout
While no BMS is combined (boot, reboot, OTA update, RS485 or BLE dropout), the charging logic is suspended:
- the `Charging Status` keeps its value: a battery in `Float` or `EOC` stays there and is not sent back to `Bulk` when the BMS returns;
- the cut-off timer and the EOC timer are stopped: a dropout during the `Cut-Off` phase cannot declare an EOC with no BMS to confirm it;
- the `Charging Instruction` is `Stop`, the `Discharging Instruction` is off, and the requested values (CVL, DVL, CCL, DCL) are unknown;
- nothing is sent to the inverter until YamBMS is initialized again.
When a BMS is combined again, the logic resumes from the kept status, and the usual rebulk rules apply: if the battery was discharged during the dropout, `Rebulk voltage`, `Rebulk SoC` or `Rebulk days` start a new `Bulk`.
## Charging blocked (Wait)
While at least one BMS is combined, the `Charging Status` goes to `Wait` when charging is not allowed:
- without `bms_options_charging_logic.yaml`: when the `Charging` switch is off, or when no combined BMS allows charging (protection, charge switch off);
- with `bms_options_charging_logic.yaml`: only when the `Charging` switch is off. In that mode YamBMS turns the BMS charge switch off itself at Cut-Off, and that block must not change the status.
In `Wait` the `Charging Instruction` is `Stop`, and the cut-off timer and the EOC timer are stopped: an EOC is only declared while charging is allowed.
When charging is allowed again:
- a battery that was in `Float` or `EOC` goes back there, unless a rebulk rule applies (`Rebulk voltage`, `Rebulk SoC`, `Rebulk days`, `Force Bulk` or `Request Force Charge`), in which case a new `Bulk` starts;
- any other status (`Init`, `Bulk`, `Cut-Off`, `Balancing`) goes to `Bulk`.
## Bulk to Float with Auto Float
With `Automatic Float Voltage` enabled and a bulk voltage above the float voltage, the `Requested Charge Voltage (CVL)` does not drop when `Float` starts: the first `Float` CVL is the bulk voltage, and it is then lowered step by step down to the float voltage. See [Auto Float Voltage](YamBMS_functions.md#auto-float-voltage).
If the bulk or float voltage is changed less than a minute before `Float` starts, the first `Float` CVL can still use the previous values until the next Auto Float update, at most 60 s later.
## Cut-Off Charging Logic Equation
Source: [Charging Marine Lithium Battery Banks](https://nordkyndesign.com/charging-marine-lithium-battery-banks)
@@ -25,29 +59,88 @@ Note: The equations below can be adopted for other chemistries like Li-ion and L
<img src="../..//images/YamBMS_Cut-Off_Charging_Logic_Equation.png" width="500"> <img src="../..//images/YamBMS_Cut-Off_Charging_Logic_Plot.png" width="500">
The physical anchor of the equation is **CVmin**, the resting voltage of a fully charged cell (~3.37 V for LFP): a cell above `cv_min` at zero current is full, and a cell cannot become full while staying below `cv_min + R·I` under current. The current taper therefore inevitably crosses the criterion when the battery is genuinely full, even if the requested charge voltage is never reached (e.g. low PV production days).
## Cut-Off Cell Voltage source
The `Cut-Off Cell Voltage` select defines which cell voltage feeds the whole Cut-Off logic below (`cell_v` in this document):
- `Max Cell Voltage` (default): `cell_v = max_cell_v`. Conservative, the end of charge depends on the highest cell.
- `Average Cell Voltage`: `cell_v = battery_voltage / cell_count`. The end of charge reflects the state of the whole pack, giving a consistent charge termination voltage from one day to the next. Recommended for packs built from unmatched cells (different internal resistances), packs with a runner cell, or a BMS that does not report its equalizing status.
> [!WARNING]
> With `Average Cell Voltage`, the highest cell no longer stops the charge. Cell-level protection **must** be ensured by `Auto CVL` and/or `Auto CCL`, the BMS `OVP` remaining the last resort. If your inverter does not respect the requested charge voltage, only the `Auto CCL` is effective.
## Cut-Off Charging Logic Diagram (what's happening in the yellow diamond)
Note: The diagram below is valid for other chemistries like Li-ion and LTO but with other CVmin and CVmax values.
> [!NOTE]
> The diagram below is valid for other chemistries like Li-ion and LTO but with other CVmin and CVmax values.
> [!WARNING]
> This diagram no longer reflects reality and needs to be updated.
![Image](../../images/YamBMS_Cut-Off_Charging_Logic_Diagram.png "YamBMS Cut-Off Charging Logic Diagram")
The logic evaluates the battery current first, in three zones:
**1. Current deadband** (`current < 0.005C`, ≈1.4 A on a 280 Ah pack) — the current is within sensor noise or PV starvation, the compensated equation is not meaningful. Three outcomes:
- `cell_v ≥ cv_min` and `SoC ≥ 95 %` → **Cut-Off conditions valid**. This is the *fully charged at rest* signature: `cv_min` is by definition the resting voltage of a full cell, so a battery that stops accepting current with `cell_v` above it has completed its charge — without ever needing to reach the bulk voltage.
- `cell_v < cv_min` → **Bulk conditions valid**: the battery cannot be full, any running timer is stopped.
- otherwise → **grey zone**: no conclusion is drawn, the charge status is left unchanged.
**2. Charging** (`current > deadband`) — the **Cut-Off conditions are valid** when both:
- `cutoff_voltage ≥ cv_min` where `cutoff_voltage = cell_v − cutoff_resistance × current` (the compensated criterion, see the equation above);
- `SoC ≥ 95 %` (`yambms_eoc_min_soc`, configurable, max 98 %) — a safety net against premature Cut-Off caused by a runner cell or a transient voltage reading.
Otherwise the **Bulk conditions are valid**.
**3. Discharging** — the **Bulk conditions are valid** when `cell_v < cell_bulk_v − cell_hysteresis_v` (20 mV/cell by default). Otherwise nothing changes (grey zone).
The Bulk or Cut-Off **conditions must hold continuously for 10s** before the corresponding phase is entered. Transient states (cloud passages, load spikes) that flip the conditions back and forth never change the phase.
Once the **Cut-Off phase** is entered:
- if the cells are reported — or inferred — as **equalizing**, the cut-off timer is stopped: the charge is held so the balancer can work;
- otherwise the **cut-off timer** starts (`180s` default): if the Cut-Off conditions still hold when it expires, the **EOC** (End Of Charge) is declared;
- in parallel, if the `EOC timer` switch is enabled, the **EOC timer** (`30min` default) guarantees that the Cut-Off phase ends at the latest when it expires, even if cells are still equalizing.
Returning to the Bulk phase, going to `Wait` or a BMS dropout stops both timers.
Some BMS balance their cells but never expose a balancing flag. YamBMS infers it for
them, from the max cell reaching the bulk setpoint together with a cell spread that has
reached `bms_balance_trigger_voltage`, the threshold at which that pack's own balancer
engages, so the cut-off timer is held exactly as it would be with a
BMS that reports the flag. A real external balancer, when one is online, always takes
priority over the inference. It is available, but **disabled by default**, for Seplos V3,
Seplos V1/V2, EG4 LL v2 and JK RS485 DISPLAY: enable it per BMS with
`bms_fake_equalizing_enabled: 'true'`. A pack that does not actually balance (no balancer,
balancing disabled, or a balancer too weak for the pack) never closes its cell spread, so
the charge can stay in Cut-Off until the EOC timer ends it, or indefinitely if the
`EOC Timer enabled` switch is off. See
[Changelog_Fake_Equalizing.md](changelog/Changelog_Fake_Equalizing.md) for the references
it uses and how to tune it.
## LFP Cut-Off Values
- Nominal : 3.20 V
- CV min : 3.37 V
- CV max : 3.65 V
To enter the **Cut-Off phase** the only condition is that **cutoff_voltage > cv_min**.
To enter the **Cut-Off phase** while charging, **cutoff_voltage ≥ cv_min** and **SoC ≥ 95 %** must hold for 10s.
![Image](../../images/YamBMS_LFP_Cut-Off_Values.png "LFP Cut-Off Values")
Reading example at 5A: the Cut-Off conditions become valid when `cell_v` reaches **3.47 V** (the row where `Cut-Off A.` equals the instantaneous current). The `Cut-Off V.` column shows the compensated voltage for each `cell_v`, which must exceed `cv_min`.
## Li-ion Cut-Off Values
- Nominal : 3.60 V
- CV min : 3.90 V
- CV max : 4.20 V
To enter the **Cut-Off phase** the only condition is that **cutoff_voltage > cv_min**.
To enter the **Cut-Off phase** while charging, **cutoff_voltage ≥ cv_min** and **SoC ≥ 95 %** must hold for 10s.
![Image](../../images/YamBMS_Li-ion_Cut-Off_Values.png "Li-ion Cut-Off Values")
@@ -57,6 +150,6 @@ To enter the **Cut-Off phase** the only condition is that **cutoff_voltage > cv_
- CV min : 2.55 V
- CV max : 2.85 V
To enter the **Cut-Off phase** the only condition is that **cutoff_voltage > cv_min**.
To enter the **Cut-Off phase** while charging, **cutoff_voltage ≥ cv_min** and **SoC ≥ 95 %** must hold for 10s.
![Image](../../images/YamBMS_LTO_Cut-Off_Values.png "LTO Cut-Off Value")
+189
View File
@@ -0,0 +1,189 @@
# Cleaning up Home Assistant entities after a YamBMS update
[![Badge License: GPLv3](https://img.shields.io/badge/License-GPLv3-brightgreen.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![Badge Version](https://img.shields.io/github/v/release/Sleeper85/esphome-yambms?include_prereleases&color=yellow&logo=DocuSign&logoColor=white)](https://github.com/Sleeper85/esphome-yambms/releases/latest)
![GitHub stars](https://img.shields.io/github/stars/Sleeper85/esphome-yambms)
![GitHub forks](https://img.shields.io/github/forks/Sleeper85/esphome-yambms)
![GitHub watchers](https://img.shields.io/github/watchers/Sleeper85/esphome-yambms)
After renaming your ESPHome node, its sub-devices (BMS, Shunt, Balancer…) or individual entities, Home
Assistant does **not** update the existing `entity_id`s. Only the *friendly names* follow — the entity IDs
keep the slug that was generated the very first time the entity was discovered.
The result is a registry that slowly drifts away from the YAML:
- entity IDs still carrying the old node name, e.g. `sensor.yambms_bms_1_battery_soc`
instead of `sensor.bms_1_battery_soc`;
- duplicated entities suffixed with `_2` when a new entity claims an ID that is already taken;
- long-term statistics left in the recorder database for entity IDs that no longer exist.
This guide covers the two maintenance operations that fix this:
1. [Fix entity names](#1-fix-entity-names) — regenerate the entity IDs so they match the current names.
2. [Remove old entities](#2-remove-old-entities) — delete the orphaned long-term statistics left behind.
Run them **in this order**: renaming first, cleanup second. What remains flagged after step 1 is genuinely
orphaned data.
---
## Before you start
| Requirement | Why |
|---|---|
| **Take a full backup** (*Settings → System → Backups*) | Both operations write to the entity registry and to the recorder database. Neither can be undone from the UI. |
| **Bring the ESPHome node online** | Entities that are unavailable cannot have their ID regenerated, and their statistics will be wrongly reported as orphaned. |
| **Flash the final YAML first** | Do the cleanup *after* all renames are done, not between two iterations. |
| **Recent Home Assistant version** | *Recreate entity IDs* and *Select all with issues* are recent additions to the UI. Update HA if the menu entries described below are missing. |
> [!WARNING]
> Recreating an entity ID **does not** update anything that references it: automations, scripts, scenes,
> dashboards, template sensors, utility meters, the Energy dashboard, or external consumers such as
> InfluxDB, Grafana or Node-RED. Plan to review those afterwards — see
> [After the rename](#after-the-rename).
---
## 1. Fix entity names
This procedure makes Home Assistant recompute every selected `entity_id` from the entity's current name and
its device name.
### Step 1 — Open the entity list and filter it
Go to **Settings → Devices & Services** and open the **Entities** tab `(1)`.
In the left sidebar, expand **Integrations** and tick **ESPHome** `(2)`. This restricts the list to entities
provided by ESPHome, so nothing else in your installation can be touched by mistake.
Then switch the table to selection mode with the button on the left of the search field `(3)`.
![Filter the entity list on the ESPHome integration and enter selection mode](../../images/HA_fix_entities_name_1.png)
> [!IMPORTANT]
> The **ESPHome** filter selects the entities of **all** your ESPHome nodes, not just YamBMS. If you run
> other ESPHome devices whose entity IDs must stay untouched, filter on the **Devices** section instead and
> pick only the YamBMS device and its sub-devices.
### Step 2 — Select the entities and launch the operation
Tick the checkbox in the table header to select everything currently displayed `(4)`, then open the
overflow menu (⋮) in the top-right corner and choose **Recreate entity IDs of selected** `(5)`.
![Select all filtered entities and choose Recreate entity IDs of selected](../../images/HA_fix_entities_name_2.png)
### Step 3 — Review the summary and confirm
Home Assistant shows what it is about to do before applying anything. Each line can be expanded to list the
entities concerned:
| Line | Meaning |
|---|---|
| *N entity IDs will be renamed* | Entities whose current ID no longer matches their name — this is what you want to fix. |
| *N entity IDs cannot be regenerated because they are not available* | Entities with no live state (offline node, entity removed from the YAML). Bring the device online and run the procedure again, or remove them from the registry. |
| *N entity IDs will not change* | Entities already consistent — they are left alone. |
Expand the first line and skim the proposed IDs. If they look right, click **Update** `(6)`.
![Confirmation dialog listing the entity IDs that will be renamed](../../images/HA_fix_entities_name_3.png)
The change is applied immediately; no restart is required.
### After the rename
Long-term statistics follow the rename automatically — the recorder updates the `statistic_id` along with
the entity ID, so your energy history is preserved.
Everything else must be updated by hand. Search your configuration for the old IDs:
- **Automations, scripts, scenes** — *Settings → Automations & Scenes*, or a text search in
`automations.yaml` / `scripts.yaml`.
- **Dashboards** — open the raw configuration editor of each dashboard (⋮ → *Edit dashboard* → ⋮ → *Raw
configuration editor*) and search for the old prefix.
- **Templates, `configuration.yaml`, utility meters, Energy dashboard**.
- **External integrations** — InfluxDB / Grafana queries, Node-RED flows, MQTT bridges, mobile app
shortcuts.
A broken reference is easy to spot afterwards: the card shows *Entity not available* and the automation
trace fails on the missing entity.
---
## 2. Remove old entities
Renaming and removing entities leaves behind long-term statistics that are still stored in the recorder
database but no longer point to any existing entity. Home Assistant flags them with
*There is no state available for this entity.*
They serve no purpose, they grow the database, and they pollute the entity pickers of the statistics and
energy cards.
### Step 1 — Open the statistics list
Go to **Developer tools → Statistics**, then switch the table to selection mode with the button on the left
of the search field.
Take a moment to look at the **Issue** column: every row listed here has a problem, and the *Statistic ID*
tells you which entity it belonged to.
![Developer tools Statistics tab, entering selection mode](../../images/HA_remove_old_entities_1.png)
> [!TIP]
> If a row corresponds to an entity you **renamed** and whose history you want to keep, do not delete it —
> click **Fix issue** on that row instead. Home Assistant then offers to remap the statistics to the new
> entity ID. Handle those cases one by one *before* the bulk deletion below.
### Step 2 — Select all entries with issues
Open the **Select** dropdown and choose **Select all with issues**. Only the problematic rows are selected;
healthy statistics are left untouched.
![Select dropdown with the Select all with issues option](../../images/HA_remove_old_entities_2.png)
### Step 3 — Check the count and delete
The header shows how many statistics are selected. Verify that the number is consistent with what you saw
in the list, then click **Delete selected statistics**.
![Selected statistics count and Delete selected statistics button](../../images/HA_remove_old_entities_3.png)
### Step 4 — Confirm
The final dialog states how many entities are affected. Click **Delete**.
![Confirmation dialog for the permanent deletion of long-term statistics](../../images/HA_remove_old_entities_4.png)
> [!CAUTION]
> This deletion is **permanent** and removes the long-term history of the selected statistic IDs from the
> database. On energy or charge counters (`shunt_x_daily_charging_energy`, …) this data cannot be
> reconstructed. Make sure your ESPHome node was online when you built the list, otherwise its live
> entities may have been flagged as having issues and would be deleted along with the real orphans.
---
## Optional — remove stale entities from the registry
Entities that no longer exist in your YamBMS YAML remain registered as *restored* and stay visible as
unavailable. To clear them:
1. Go to **Settings → Devices & Services → Entities**.
2. In the **Status** filter, select *Unavailable* / *Not available* (and enable *Show restored entities* if
your version exposes that option).
3. Confirm that the ESPHome node is online — otherwise all of its entities will appear here.
4. Select the leftovers and use **Delete selected**.
If the node is online and the entities still cannot be deleted, they are still being published by the
firmware; remove them from the YAML and reflash first.
---
## Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
| New entities appear with a `_2` suffix | The desired entity ID is still taken by an old registry entry. | Delete the stale entity from the registry, then run [Fix entity names](#1-fix-entity-names). |
| *Recreate entity IDs of selected* is missing from the menu | Home Assistant version too old, or the table is not in selection mode. | Update Home Assistant; make sure you clicked the selection-mode button first. |
| Entities reported as *not available* during the rename | The node is offline, or the entity no longer exists in the firmware. | Bring the node online and retry, or delete the obsolete registry entries. |
| Statistics still flagged after the cleanup | The corresponding device was offline when the list was built. | Bring it online, reload the Statistics page and check the remaining rows individually. |
| Dashboards or automations broken after the rename | References are not updated automatically. | Search and replace the old entity IDs — see [After the rename](#after-the-rename). |
| Energy dashboard lost a source | Its entity ID changed. | Re-select the sensor in *Settings → Dashboards → Energy*. |
+13 -13
View File
@@ -33,17 +33,17 @@ Copy, past and enter your credentials :
```YAML
# WiFi
wifi_ssid: YourSSID
wifi_password: YourPassword
wifi_ssid: Your_SSID
wifi_password: Your_Password
domain: .local
# WiFi AP
wifi_ap_ssid: YamBMS
wifi_ap_password: Y4mBM$85
wifi_ap_ssid: Your_AP_SSID
wifi_ap_password: Your_AP_Password
# Web Server
web_server_username: yambms
web_server_password: Y4mBM$85
web_server_username: Your_Username
web_server_password: Your_Password
```
### 2. Add your `ESP32` by clicking on `+ NEW DEVICE` at the bottom right
@@ -67,7 +67,7 @@ In Home Assistant under **" Settings > Devices and services > Add Intergration "
### 1. Install ESPHome on your computer
Before you can flash your ESP32 you need to install the [ESPHome 2025.11.0 or higher](https://github.com/esphome/esphome/releases) command line application.<br>
Before you can flash your ESP32 you need to install the [ESPHome 2026.11.0 or higher](https://github.com/esphome/esphome/releases) command line application.<br>
[Follow these instructions for installation on Windows, Mac or Linux.](https://esphome.io/guides/installing_esphome)
> [!TIP]
@@ -102,17 +102,17 @@ cd esphome-yambms
```YAML
# WiFi
wifi_ssid: YourSSID
wifi_password: YourPassword
wifi_ssid: Your_SSID
wifi_password: Your_Password
domain: .local
# WiFi AP
wifi_ap_ssid: YamBMS
wifi_ap_password: Y4mBM$85
wifi_ap_ssid: Your_AP_SSID
wifi_ap_password: Your_AP_Password
# Web Server
web_server_username: yambms
web_server_password: Y4mBM$85
web_server_username: Your_Username
web_server_password: Your_Password
```
### 4. Install the `YamBMS.yaml` into your ESP32
+174
View File
@@ -0,0 +1,174 @@
# YamBMS - loop_task_stack_size
[![Badge License: GPLv3](https://img.shields.io/badge/License-GPLv3-brightgreen.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![Badge Version](https://img.shields.io/github/v/release/Sleeper85/esphome-yambms?include_prereleases&color=yellow&logo=DocuSign&logoColor=white)](https://github.com/Sleeper85/esphome-yambms/releases/latest)
![GitHub stars](https://img.shields.io/github/stars/Sleeper85/esphome-yambms)
![GitHub forks](https://img.shields.io/github/forks/Sleeper85/esphome-yambms)
![GitHub watchers](https://img.shields.io/github/watchers/Sleeper85/esphome-yambms)
Reference for the `loop_task_stack_size` option. Read this before changing it.
This document covers **raising** the value. Lowering it below the ESPHome
default is not documented here and is not recommended: the gain is a few
kilobytes, and the failure mode is a rare crash on a code path you did not test.
## Stack and heap in one minute
An ESP32 stores data in two very different ways, and both come out of the same
pool of internal RAM.
| | Stack | Heap |
|---|---|---|
| What it is | Scratch space for the function currently running | A reserve the program borrows from on demand |
| Reserved when | At compile time, one fixed block per task | At runtime, piece by piece |
| Holds | Local variables, return addresses | Objects whose count is not known in advance |
| In YamBMS | The local variables of `setup()` | Every sensor object, every API connection, every network buffer |
| Runs out how | Silently overwrites neighbouring memory | `malloc()` returns null |
The **stack** is a fixed-size block. ESPHome runs `setup()` and the main loop
inside a FreeRTOS task called `loopTask`, whose stack defaults to 8192 bytes.
That block is reserved at compile time and never grows.
The **heap** is everything left over. When YamBMS creates 1,400 sensor objects
at boot, they come from the heap. On a board with PSRAM, most of them end up in
PSRAM rather than internal RAM.
Raising `loop_task_stack_size` enlarges the stack block, which takes internal
RAM away from the heap — byte for byte, nothing else changes.
## Why the default is sometimes not enough
ESPHome generates `setup()` as a single flat function. Every entity
registration adds local variables to the same stack frame, so the frame grows
in direct proportion to the number of entities.
Measured on YamBMS with **YamBMS RS485 BMS (bms_combine_modbus_client.yaml)** packages:
```
setup() frame = 784 + 400 x nb_BMS bytes
12 BMS -> 5,584 B ~2,350 B left for everything else -> boots
16 BMS -> 7,184 B ~760 B left for everything else -> boot loop
```
That frame stays alive while `App.setup()` initialises every component, so the
remaining bytes must also cover component init, NVS reads, log formatting and
CPU register spills. When they do not fit, the overflow writes past the end of
the stack and corrupts whatever sits next to it in memory.
### Symptoms
- Boot loops that start only after adding BMS or entities, with no hard
threshold — it scales with config size.
- `Guru Meditation Error` whose **type changes between reboots**: sometimes
`LoadProhibited`, sometimes an Interrupt WDT, sometimes a cache error.
- No stack overflow message. The FreeRTOS canary is often skipped entirely by
a large stack frame, so nothing warns you.
- Adjusting PSRAM options changes nothing, because the stack is not in PSRAM.
If a boot loop produces **no ESPHome log output at all** and a constant
`abort()`, that is a different problem — the board ran out of internal RAM
before startup. Lower the value rather than raising it, and reduce the config.
## Recommended values
| BMS per node | `loop_task_stack_size` |
|---|---|
| up to 6 | `8192` (ESPHome default — leave unset) |
| 7 to 24 | `16384` |
| 25 to 64 | `32768` (maximum accepted value) |
Values include roughly 4 KB of reserve above the measured `setup()` frame.
**These values are for YamBMS RS485 BMS (bms_combine_modbus_client.yaml).** BLE BMS instantiate
`esp32_ble_tracker` and one `ble_client` per BMS, which gives a different fixed
cost and a different slope. The model above has not been calibrated for them.
**The 16384 and 32768 rows assume a board with PSRAM.** Not because the stack
needs PSRAM — it never lives there — but because a config large enough to need
them will run out of heap long before it runs out of stack. On a board without
PSRAM, keep `8192` unless you have a measured reason not to.
## How to apply it
The value belongs in your main configuration, not in a board or PSRAM package:
it depends on how many BMS you configured, not on your hardware.
```yaml
substitutions:
loop_task_stack_size: "8192" # see LOOP_TASK_STACK.md before changing
esp32:
framework:
advanced:
loop_task_stack_size: ${loop_task_stack_size}
```
## Check the cost before flashing
Raising this value consumes internal RAM permanently. The size report at the end
of every compile tells you the cost, with no hardware required:
```
RAM: [====== ] 59.2% (used 202299 bytes from 341760 bytes)
```
Recompile after changing the value and compare. Going from `8192` to `16384`
should increase the used figure by exactly 8,192 bytes; `8192` to `32768` by
24,576. Anything else means something unexpected happened.
Leave yourself comfortable margin on the free figure. If free internal RAM drops
low, you trade a boot-time crash for runtime symptoms instead: API
disconnections, WiFi failing to reconnect, entities failing to initialise.
To confirm the value actually reached the firmware:
```bash
NM=$(find ~/.cache/esphome/idf/tools -name '*-elf-nm' | head -1)
$NM -SC .esphome/build/<node>/build/<node>.elf | grep loop_task_stack
```
The second column is the size in hex: `00002000` = 8192, `00004000` = 16384,
`00008000` = 32768.
## Confirm on hardware
The size report proves the cost. Only a running device proves the value is
sufficient. Add this temporarily and read the log after boot:
```yaml
esphome:
on_boot:
priority: -100.0
then:
- lambda: 'ESP_LOGW("mem", "loopTask HWM=%u B", uxTaskGetStackHighWaterMark(nullptr));'
```
`HWM` is the smallest amount of stack that was still free — the remaining
margin, in bytes. Below about 2,000, go up one step in the table.
Note that `loopTask` also runs the main loop forever, not just `setup()`. Rare
paths such as an OTA update, an API reconnection or verbose logging can push
deeper than boot does, so keep margin rather than tuning to the exact boot
figure.
## Calibrating for a different node type
If your node is not a standard **YamBMS RS485 BMS (bms_combine_modbus_client.yaml)** setup, measure your own frame
size instead of using the table. Add this and compile twice with a different
number of BMS:
```yaml
esphome:
build_flags:
- "-Wframe-larger-than=4096"
```
The compiler prints the frame size directly:
```
warning: the frame size of 7184 bytes is larger than 4096 bytes
```
Two data points give you the fixed cost and the cost per BMS. Add about 4 KB of
reserve and round up to the next step.
+215
View File
@@ -0,0 +1,215 @@
# YamBMS - PSRAM options
[![Badge License: GPLv3](https://img.shields.io/badge/License-GPLv3-brightgreen.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![Badge Version](https://img.shields.io/github/v/release/Sleeper85/esphome-yambms?include_prereleases&color=yellow&logo=DocuSign&logoColor=white)](https://github.com/Sleeper85/esphome-yambms/releases/latest)
![GitHub stars](https://img.shields.io/github/stars/Sleeper85/esphome-yambms)
![GitHub forks](https://img.shields.io/github/forks/Sleeper85/esphome-yambms)
![GitHub watchers](https://img.shields.io/github/watchers/Sleeper85/esphome-yambms)
Reference for `board_options_PSRAM_options.yaml`, the shared `sdkconfig_options`
included by every `board_options_PSRAM_*.yaml` board file.
## Which boards have PSRAM
PSRAM is a **property of the board or module, not of the chip family**. Two
boards built on the same chip may or may not have it.
| Chip | PSRAM | Modes | Notes |
|---|---|---|---|
| ESP32 | On some modules (WROVER and similar; WROOM has none) | Quad only | 8 MB chips expose only 4 MB through the cache window at a time |
| ESP32-S2 | On some modules | Quad only | |
| ESP32-S3 | On some modules (N8R2, N16R8 …) | Quad or octal | The `R` suffix in the module reference indicates PSRAM |
| ESP32-C3 / C6 / H2 | None | — | These options are inert |
**Check your module before choosing a mode.** Declaring `octal` on a board with
quad PSRAM — or on a chip that has no octal support at all — makes PSRAM
initialisation fail. It does not produce a clear error message; it shows up
later as random cache errors and unstable behaviour. The ESP-IDF boot log
reports what was actually detected.
On the original ESP32, 80 MHz PSRAM has additional constraints tied to the flash
clock, and early chip revisions require a cache workaround that ESP-IDF enables
automatically. If a board misbehaves at 80 MHz, 40 MHz is the safe fallback.
A board file declares the mode and includes this shared options file:
```yaml
psram:
mode: octal
speed: 80MHz
packages:
psram_options: !include board_options_PSRAM_options.yaml
```
If a board has no PSRAM, every option below is silently ignored. They are
harmless, but they do nothing.
## Why these options exist
An ESP32 with PSRAM has two separate pools of RAM:
| Pool | Size | Speed | Used for |
|---|---|---|---|
| Internal RAM | A few hundred KB, fixed by the chip | Fast | Everything by default; the only pool usable for DMA |
| PSRAM | 2–16 MB depending on the module | Slower | Optional overflow, must be explicitly enabled |
Internal RAM is the scarce resource. A YamBMS master with 16 BMS creates roughly
1,400 entity objects on top of WiFi, the native API and several peripherals, and
internal RAM runs out long before PSRAM does.
Every option below does one thing: **move something out of internal RAM and into
PSRAM.**
> **Reference build.** The figures quoted in this document come from a 16-BMS
> master: ESP32-S3, octal PSRAM at 80 MHz, ESPHome 2026.7.3, ESP-IDF 5.5.5.
>
> ```
> DIRAM 202,299 / 341,760 (59.2 %) -> 139,461 B free for the heap
> ```
>
> They are orders of magnitude, not universal constants. The original ESP32 in
> particular splits its internal RAM into separate instruction and data regions
> instead of the unified DIRAM pool the S3 uses, so its size report looks
> different. Compare against your own baseline rather than against these numbers.
## The options
### Moving the network stack to PSRAM
```yaml
CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY: y
CONFIG_SPIRAM_TRY_ALLOCATE_WIFI_LWIP: y
```
**These two must be kept together.** The first turns `EXT_RAM_BSS_ATTR` in
ESP-IDF's `esp_attr.h` into a real section directive — without it the macro
expands to nothing. The second makes the network stack actually use it.
Removing either one cancels the benefit of both.
**Measured gain on the reference build: 12,308 bytes of internal RAM.** The
symbols moved are the socket table, `dns_table`, `dns_requests`, the `tcpip_*`
and `sntp_*` globals, and `select_cb_list`. Without these options internal
`.bss` would be 133,612 instead of 121,304, pushing DIRAM usage from 59.2 % to
62.8 %.
**Why this is safe.** Data in PSRAM is unreachable while the flash cache is
disabled, which is why PSRAM placement is normally risky. That only affects
interrupt handlers flagged to run from IRAM. LWIP has none — these globals are
touched exclusively from the `tcpip` task, in task context, where the cache is
always available.
**Cost:** marginally slower socket and DNS access. Irrelevant at ESPHome traffic
levels.
> **Reading the size report:** this segment is reported by `esp_idf_size` under
> *Flash Data / .bss*, not under internal RAM. That is a tooling artefact —
> flash `.rodata` and PSRAM share the same address window. The data really is in
> PSRAM.
### Internal RAM reservation
```yaml
CONFIG_SPIRAM_MALLOC_RESERVE_INTERNAL: "65536"
```
Bytes kept exclusively for allocations that cannot live in PSRAM — DMA buffers
and internal-only requests. Once free internal RAM drops to this level, generic
allocations fall back to PSRAM instead of starving the reserve.
ESP-IDF's default is 32,768. It is raised here because a YamBMS master runs
WiFi, the native API and several UART / SPI / CAN peripherals concurrently, all
of which need DMA-capable memory.
On a chip with less internal RAM than an S3, 65,536 is a large share of the
total. If free heap gets tight, this is one of the first values to reconsider.
### Allocation size threshold
```yaml
CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL: "4096"
```
Allocations up to this size go to internal RAM first; larger ones go straight to
PSRAM. ESP-IDF's default is 16,384.
**Tuning note.** Entity objects are typically 100–400 bytes, so at 4096 they all
still land in internal RAM. On a node short on internal memory, lowering this to
`"512"` pushes them into PSRAM and gives internal RAM back, at the cost of
slower access to every entity. Measure the free heap before and after — this is
a trade-off, not a free win.
DMA buffers request `MALLOC_CAP_DMA` explicitly and stay internal regardless of
this value.
### Bluetooth (BLE BMS only)
```yaml
CONFIG_BT_ALLOCATION_FROM_SPIRAM_FIRST: y
CONFIG_BT_BLE_DYNAMIC_ENV_MEMORY: y
```
**These two must also be kept together**, for the same reason as the pair above.
`BT_BLE_DYNAMIC_ENV_MEMORY` moves the Bluedroid host environment from static
`.bss` to dynamic allocation; `BT_ALLOCATION_FROM_SPIRAM_FIRST` sends those
allocations to PSRAM first. Alone, the first only shifts the cost from `.bss` to
the internal heap, and the second has nothing to redirect.
**Inert on RS485 / CAN-only builds.** Both are children of `CONFIG_BT_ENABLED`
in ESP-IDF's Kconfig tree, so they are dropped entirely when the Bluetooth
component is not compiled. Verified on a 16-BMS RS485 build: zero `CONFIG_BT_`
lines in the generated `sdkconfig`, zero Bluedroid symbols in the ELF, zero
bytes consumed.
**Caveat.** `BT_BLE_DYNAMIC_ENV_MEMORY` has a history of reliability reports
upstream. If BLE users hit crashes, remove this one first when bisecting;
`BT_ALLOCATION_FROM_SPIRAM_FIRST` alone is far less controversial.
**Note for BLE nodes.** The BLE controller needs internal RAM that PSRAM cannot
replace — buffers accessed during radio windows. A BLE node therefore has less
free internal RAM than the reference figures above.
## Verifying what actually applied
The generated `sdkconfig` is the only source of truth. ESPHome manages some
symbols itself, and those cannot be overridden from `sdkconfig_options`.
```bash
grep -E "SPIRAM|COMPILER_OPTIMIZATION" .esphome/build/<node>/sdkconfig.<node>
```
To confirm that data really landed in PSRAM, look for the external RAM section
in the linker map. This works on any chip:
```bash
grep -n '\.ext_ram\.bss' .esphome/build/<node>/build/<node>.map | head
```
If you prefer to inspect symbols directly, the address tells you where a symbol
lives — but the windows are chip-specific:
| Chip | Internal RAM | PSRAM |
|---|---|---|
| ESP32 | `0x3FF…` | `0x3F8…` – `0x3FB…` |
| ESP32-S3 | `0x3FC…` | `0x3C…` – `0x3D…` |
```bash
NM=$(find ~/.cache/esphome/idf/tools -name '*-elf-nm' | head -1)
$NM -nSC .esphome/build/<node>/build/<node>.elf | awk 'tolower($3)=="b"'
```
The compile size report is the quickest regression check. On the reference
build, internal RAM usage was 202,299 bytes (59.19 %). Any unexpected change
after editing these options means something behaved differently than documented
here — investigate before shipping.
## Note on `loop_task_stack_size`
This option is **not** part of this file, and is documented separately.
It is unrelated to PSRAM: it sizes the stack of the FreeRTOS task that runs
`setup()` and the main loop, and the required value depends on entity count, not
on available memory. It applies on every ESP32, with or without PSRAM, and
raising it consumes internal RAM that a board without PSRAM cannot recover
elsewhere.
+25 -10
View File
@@ -15,6 +15,7 @@
* `BASEN` BMS (RS485)
* `DEYE` BMS (CAN)
* `Ecoworthy` BMS (RS485)
* `KS` BMS (BLE)
**Note: other BMS brands already integrated with ESPhome can be added easily.**
@@ -83,31 +84,45 @@ The following are confirmed and known to work:
| Brand | Model | Inverter bat. mode | CAN/RS485 protocol | Remarks | Reported by |
| --- | --- | --- | --- | --- | --- |
| Deye | SUN-3.6K-SG03LP1-EU | Lithium 00 | CAN : PYLON 1.2 | --- | [@Der_Hannes](https://diysolarforum.com/members/der_hannes.16949/) |
| Deye | SUN-5K-SG03LP1-EU | Lithium 00 | CAN : PYLON 1.2 | --- | [@vdiex](https://github.com/vdiex), [@arzaman](https://github.com/arzaman), [@widget4145](https://diysolarforum.com/members/widget4145.110784/) |
| Deye | SUN-6K-SG03LP1-EU | Lithium 00 | CAN : PYLON 1.2 | --- | [@Sleeper85](https://github.com/Sleeper85), [@Imanol82](https://diysolarforum.com/members/imanol82.122457/) |
| Deye | SUN-12K-SG04LP3-EU | Lithium 00 | CAN : PYLON 1.2 | --- | [@lucize](https://github.com/lucize), [@luckylinux](https://github.com/luckylinux), [@virus100b](https://github.com/virus100b), [@b1ggi](https://diysolarforum.com/members/b1ggi.120910/) |
| Deye | SUN-3.6K-SG03LP1-EU | Lithium 00 | CAN : PYLON V1 | --- | [@Der_Hannes](https://diysolarforum.com/members/der_hannes.16949/) |
| Deye | SUN-5K-SG03LP1-EU | Lithium 00 | CAN : PYLON V1 | --- | [@vdiex](https://github.com/vdiex), [@arzaman](https://github.com/arzaman), [@widget4145](https://diysolarforum.com/members/widget4145.110784/) |
| Deye | SUN-6K-SG03LP1-EU | Lithium 00 | CAN : PYLON V1 | --- | [@Sleeper85](https://github.com/Sleeper85), [@Imanol82](https://diysolarforum.com/members/imanol82.122457/) |
| Deye | SUN-12K-SG04LP3-EU | Lithium 00 | CAN : PYLON V1 | --- | [@lucize](https://github.com/lucize), [@luckylinux](https://github.com/luckylinux), [@virus100b](https://github.com/virus100b), [@b1ggi](https://diysolarforum.com/members/b1ggi.120910/) |
| Goodwe | GW5048-ES | --- | CAN : PYLON V2 | --- | [@jirdol](https://github.com/jirdol) |
| Goodwe | GW5000S-BP | Goodwe LX U5.4-L | CAN : PYLON V2 | --- | [@Uksa007](https://github.com/Uksa007), [@OselDusan7](https://github.com/OselDusan7) |
| Goodwe | GW3600S-BP | --- | CAN : PYLON V2 | --- | [@OselDusan7](https://github.com/OselDusan7) |
| Sofar | ME 3000-SP | --- | --- | --- | [@starman](https://diysolarforum.com/members/starman.65151/) |
| Sofar | HYD 3600-ES | Automatic | CAN : PYLON 1.2 | A 120 Ohm resistor had to be added on the Sofar side. | [@chaosnature](https://diysolarforum.com/members/chaosnature.64395/) |
| Sofar | HYD 3600-ES | Automatic | CAN : PYLON V1 | A 120 Ohm resistor had to be added on the Sofar side. | [@chaosnature](https://diysolarforum.com/members/chaosnature.64395/) |
| Sofar | HYD 5000-ES | --- | --- | --- | [@Paulfrench35](https://diysolarforum.com/members/paulfrench35.78523/) |
| Sofar | HYD 5000-EP | --- | --- | --- | [@tonystrullu](https://diysolarforum.com/members/tonystrullu.91283/) |
| Growatt | SPF 5000ES | CAN L52 | CAN : PYLON 1.2 | --- | [@Paulfrench35](https://diysolarforum.com/members/paulfrench35.78523/), [@cjdell](https://github.com/cjdell), [@cinusik](https://diysolarforum.com/members/cinusik.109738/) |
| Growatt | SPF 5000ES | CAN L52 | CAN : PYLON V1 | --- | [@Paulfrench35](https://diysolarforum.com/members/paulfrench35.78523/), [@cjdell](https://github.com/cjdell), [@cinusik](https://diysolarforum.com/members/cinusik.109738/) |
| Solis | RHI-3.6K-48ES-5G | Pylon LV / AoBo | CAN : PYLON V2 / SMA | CAN transceiver 3V3 required (SN65HVD230) for Pylon LV mode. | [@cjdell](https://github.com/cjdell), [@MrPabloUK](https://github.com/MrPabloUK) |
| Solis | S5-EH1P4.6K-L | Pylon LV | CAN : PYLON V2 | CAN transceiver 3V3 required (SN65HVD230). | [@Baker0052](https://github.com/Baker0052) |
| Solis | S5-EH1P6K-L | AoBo | CAN : SMA | --- | [@MrPabloUK](https://github.com/MrPabloUK) |
| Solis | RHI-3K-48ES | AoBo | CAN : SMA | --- | [@chaosnature](https://diysolarforum.com/members/chaosnature.64395/) |
| LuxPower | LXP SNA 5K | Lithium 6 | CAN : LuxPower | --- | [@shvmm](https://github.com/shvmm), [@yur43](https://diysolarforum.com/members/yur43.121157/) |
| LuxPower | LXP-LB-US 10K | Lithium 6 | CAN : LuxPower | --- | [@Henny101](https://diysolarforum.com/members/henny101.67026/) |
| EG4 | 6000XP | Lithium 2 / Lithium 6 | CAN : PYLON 1.2 / LuxPower | --- | [@ChrisG](https://diysolarforum.com/members/chrisg.483/), [@SGB](https://diysolarforum.com/members/scrotpusgobblebottom.100804/) |
| EG4 | 6000XP | Lithium 2 / Lithium 6 | CAN : PYLON V1 / LuxPower | --- | [@ChrisG](https://diysolarforum.com/members/chrisg.483/), [@SGB](https://diysolarforum.com/members/scrotpusgobblebottom.100804/) |
| EG4 | 12000XP | Lithium 6 | CAN : LuxPower | --- | [@andrewfraley](https://github.com/andrewfraley) |
| EG4 | 18kPV | Lithium 6 | CAN : LuxPower | --- | [@Maintman](https://diysolarforum.com/members/maintman.19007/) |
| Victron | Multiplus 24/1200/25-16 | CAN-bus BMS LV (500 kbit/s) | CAN : Victron | Plugged into Cerbo CAN port (must use supplied Victron terminator in the other port). | [@dmsims](https://diysolarforum.com/members/dmsims.23417/) |
| Victron | MultiPlus-II 48/10000/140 | CAN-bus BMS LV (500 kbit/s) | CAN : Victron | --- | [@cali-clim](https://diysolarforum.com/members/cali-clim.54284/), [@20after4](https://github.com/20after4) |
| MidNite Solar | MN15-12KW-AIO | PYLON | CAN : PYLON 1.2 | --- | [@goldserve](https://diysolarforum.com/members/goldserve.52541/), [@jahyde](https://diysolarforum.com/members/jahyde.7475/) |
| MidNite Solar | MN15-12KW-AIO | PYLON | CAN : PYLON V1 | --- | [@goldserve](https://diysolarforum.com/members/goldserve.52541/), [@jahyde](https://diysolarforum.com/members/jahyde.7475/) |
| SRNE | HESP48120U200-H | UZE | CAN : PYLON V2 | Most PYLON-based protocols show same results. Inverter does not work in PYLON mode, UZE works. Incorrect temp reported. | [@ogremustcrush](https://diysolarforum.com/members/ogremustcrush.116979/) |
| Studer | XTM-4000 | Pylontech | CAN : PYLON V2 | DIP Switch in Xcom-CAN: 11000110 (1 to 8, ON==1). | [@kolins-cz](https://github.com/kolins-cz) |
| Schneider | XW Pro 6848 NA | Voltage Control Li-Ion | CAN : PYLON V2 | Requires enabling the CAN bus option `canbus_extended_ack:` to `true`. | [@AGDorsum](https://diysolarforum.com/members/agdorsum.29403/), [@ngustas](https://diysolarforum.com/members/ngustas.126045/) |
| SMA | Sunny Island | --- | --- | --- | --- |
| Schneider | XW Pro 6848 NA | Voltage Control Li-Ion | CAN : PYLON V2 | The extended 29-bit ACK is handled automatically since YamBMS 1.8.0, no option to set. | [@AGDorsum](https://diysolarforum.com/members/agdorsum.29403/), [@ngustas](https://diysolarforum.com/members/ngustas.126045/) |
| SMA | Sunny Island | --- | CAN : SMA | --- | --- |
## Supported MPPT chargers
The following are confirmed and known to work:
| Brand | Model | Inverter bat. mode | CAN/RS485 protocol | Remarks | Reported by |
| --- | --- | --- | --- | --- | --- |
| Epever | IT-NC | BPRO 21 | RS485 : PYLON | --- | --- |
| Epever | ET-NC | BPRO 21 | RS485 : PYLON | --- | --- |
| Epever | TIS | BPRO 21 | RS485 : PYLON | --- | --- |
| Epever | TES | BPRO 21 | RS485 : PYLON | --- | --- |
| Epever | TEP | BPRO 21 | RS485 : PYLON | --- | --- |
| Epever | TBP | BPRO 21 | RS485 : PYLON | --- | --- |
| Epever | Tracer-AN G3 | BPRO 21 | RS485 : PYLON | --- | --- |
+160
View File
@@ -0,0 +1,160 @@
# Telemetry
[![Badge License: GPLv3](https://img.shields.io/badge/License-GPLv3-brightgreen.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![Badge Version](https://img.shields.io/github/v/release/Sleeper85/esphome-yambms?include_prereleases&color=yellow&logo=DocuSign&logoColor=white)](https://github.com/Sleeper85/esphome-yambms/releases/latest)
![GitHub stars](https://img.shields.io/github/stars/Sleeper85/esphome-yambms)
![GitHub forks](https://img.shields.io/github/forks/Sleeper85/esphome-yambms)
![GitHub watchers](https://img.shields.io/github/watchers/Sleeper85/esphome-yambms)
This page describes YamBMS 1.8.1.
## Summary
Telemetry is **on by default**. Every 6 hours, each ESP32 sends its YamBMS setup :
versions, board, BMS and inverter types, uptime, date, and an identifier derived from its MAC
address. This shows which hardware to support first.
The server also sees your public IP address and sends a reduced form of it to ip-api.com to
find your country. Data has no expiry date. To stop all requests, see [How to disable](#how-to-disable).
## Why
These reports show how YamBMS is really used. They help to:
- decide which BMS, boards and inverters to support first;
- find bad default protocols: if many users of one inverter brand force another protocol, the
default for that brand needs review;
- follow how fast new YamBMS and ESPHome versions are adopted.
## What is sent
The ESP32 sends one HTTP POST to `http://script.yambms.org/yambms.post.php`. This is the complete
list, from [yambms_service.yaml](../../packages/yambms/yambms_service.yaml):
| Field | Example | Meaning |
|---|---|---|
| `node_id_hash` | `0123456789abcdef0123456789abcdef` | Identifier derived from the MAC address, see [Identity](#identity) |
| `version` | `1.8.1` | YamBMS version |
| `board_chip` | `ESP32` | Chip of the board |
| `board_name` | `DevKit V1` | Name of the board |
| `bms_model` | `JK,JK,` | Model of each BMS |
| `bms_protocol` | `UART,UART,` | Protocol of each BMS |
| `bms_count` | `2` | Number of BMS |
| `inverter_brand` | `Deye,SRNE,` | Inverter brand of each link, `Not defined` if not set |
| `inverter_bus` | `CAN,RS485,` | Bus of each link |
| `inverter_protocol` | `PYLON V1,PYLON,` | Protocol of each link, also `None` (not configured) or `Disabled` |
| `inverter_protocol_source` | `auto,manual,` | `auto` if the protocol is set to `Automatic`, `manual` if you forced it |
| `uptime` | `93784` | Seconds since the last boot |
| `date_time_now` | `2026-09-02 12:37:37` | Date and local time of the ESP32 |
| `User-Agent` (HTTP header) | `ESPHome/2026.10.2 (https://esphome.io)` | ESPHome version. The server stores the version only |
`board_name`, `bms_model` and `bms_protocol` come from your YAML, so a value you edited there is
sent as you wrote it. The firmware does not send battery values (voltage, current, SoC), the WiFi
name or password, API or OTA keys, or the device name.
**When:** a first report 5 minutes after each boot, then every 6 hours. Nothing is sent without a
network connection.
**No internet access:** the update and telemetry services turn themselves off. After 3 failed
attempts in a row, about 12 hours after boot, the ESP32 stops trying. It tries again only after
the next reboot.
**Version check:** a separate request, sent at the same times, reads the latest version from
`http://script.yambms.org/yambms.get.php`. It has no data fields, but the server sees your IP
address and `User-Agent`, as with any web request. It writes nothing to the database.
**Plain HTTP:** the reports are not encrypted. Anyone on the network path, such as your internet
provider, can read them. HTTPS is not used because a TLS handshake needs 30 to 40 KB of internal
RAM, which does not fit next to BLE on boards without PSRAM.
## How it is processed
### Identity
- The ESP32 computes a SHA-256 hash of a public salt and its MAC address, and keeps the first 32
characters. This is the **Node ID hash**. A reflash does not change it.
- The server hashes that value again with a secret key, and stores only the result.
- The MAC address and the Node ID hash are not stored in the database.
- The Node ID hash is **not anonymous**. The salt is public, so someone who captures your traffic
can find your MAC address by trying candidates. A database leak alone does not reveal it,
because the secret key is not in the database.
- **Firmware before 1.8.0 sends the MAC address itself**, in clear. The server derives the same
identifier and does not store the MAC.
### IP address
The server reads your public IP address on each report. It does not store it in the database or
in its application logs. It derives two values:
- **Location ID:** a hash of the IP address made with a second secret key (the full IPv4 address,
or the first 64 bits of an IPv6 address). It is stored and replaced at each report. It estimates
how many installations exist when several nodes share one address. It changes when your address
changes, and it does not prove that nodes are in the same home (CGNAT). Someone who has the
secret key could find an address by trying candidates.
- **Country:** a two-letter code, or `XX` if unknown. The server cuts the address down to a network
prefix (/24 for IPv4, /48 for IPv6) and holds it in the database, normally for up to 15 minutes.
It then sends the prefix to [ip-api.com](https://ip-api.com), **a third party, over plain HTTP**
(the free service has no HTTPS). The prefix is sent without any node identifier, and is deleted
from the database once resolved. This happens for a new node, when the address changes, or
while the country is unknown. YamBMS has no control over what ip-api.com does with the prefix.
### Retention
- The server keeps **one row per node**, overwritten at each report. There is no history of
past reports. The row also keeps the date the node was first seen.
- **There is no expiry date.** A row stays forever, even if the node is off or telemetry is
disabled. It is removed only [on request](#access-or-delete-your-data).
- The server also keeps the number of active nodes, once per week, with no per-node data.
Only [@Sleeper85](https://github.com/Sleeper85) can view the per-node data, on a password-protected
page. The hosting provider runs the server that holds it.
### Active nodes
A node is one ESP32 running YamBMS. It is **active** if its last report is less than 3 days old.
This count has limits:
- It counts ESP32 boards, not users. One user can have several nodes.
- A replaced ESP32 is a new node. The old row stays in the table.
- The date comes from the clock of the ESP32, not from the server. A node with a wrong clock can
be counted wrongly.
## What is published
Public statistics are at [stats.yambms.org](https://stats.yambms.org). The page shows aggregated
counts of active nodes only, per version, board, BMS, inverter and country. Any value used by fewer
than 5 nodes is grouped into `Other`, except the number of BMS per node.
The page also shows the best and the average uptime of active nodes, in whole days. The best uptime
comes from a single node, with nothing else attached to it. No other per-node data is published.
## How to disable
Both services are set at compile time. Add this to the `substitutions:` block of your main YAML,
then compile and flash again:
```yaml
substitutions:
yambms_update_service: 'false' # Set to false to disable update checks
yambms_telemetry_service: 'false' # Set to false to disable the sending of telemetry data
```
| `yambms_telemetry_service` | `yambms_update_service` | Result |
|---|---|---|
| `'false'` | `'false'` | **No request is sent at all** |
| `'false'` | `'true'` | No report. The version check still runs |
| `'true'` | `'false'` | Reports are sent. The `Last version` entity no longer updates |
Disabling stops new reports. It does not delete your existing row. The precompiled demo firmware
cannot be changed: build your own firmware to disable telemetry.
## Access or delete your data
Use the form on the [Contact page](https://stats.yambms.org/contact/) of **stats.yambms.org** to ask a question,
get a copy of your data, or have it deleted. For configuration or hardware help, use
[GitHub](https://github.com/Sleeper85/esphome-yambms).
Access and deletion need your Node ID hash: 32 characters, digits and letters `a` to `f`. Find it
in the `Diagnostic` page of the YamBMS dashboard, card `YamBMS - Network`, line `Node ID hash`, or
in the `Node ID hash` diagnostic entity in Home Assistant. Each ESP32 has its own value.
Disable telemetry before asking for deletion. Otherwise, the next report creates a new row.
@@ -0,0 +1,218 @@
# YamBMS - Understanding ESPHome Modbus
[![Badge License: GPLv3](https://img.shields.io/badge/License-GPLv3-brightgreen.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![Badge Version](https://img.shields.io/github/v/release/Sleeper85/esphome-yambms?include_prereleases&color=yellow&logo=DocuSign&logoColor=white)](https://github.com/Sleeper85/esphome-yambms/releases/latest)
![GitHub stars](https://img.shields.io/github/stars/Sleeper85/esphome-yambms)
![GitHub forks](https://img.shields.io/github/forks/Sleeper85/esphome-yambms)
![GitHub watchers](https://img.shields.io/github/watchers/Sleeper85/esphome-yambms)
> **Work in progress.** The ESPHome Modbus stack is being reworked by
> [@exciton](https://github.com/exciton) through a long series of pull requests.
> The first of them landed in ESPHome 2026.7, and more are on the way — including
> a full overhaul of `modbus_controller`
> ([#11781](https://github.com/esphome/esphome/pull/11781)) that will change how
> commands are queued and how offline devices are handled. This page tracks that
> work and will be updated progressively as the PRs are merged.
Starting with **ESPHome 2026.7**, the Modbus client timing defaults have changed
(`send_wait_time` 250 ms → 2000 ms, `turnaround_time` 100 ms → 600 ms).
These new defaults are safe for slow third-party hardware, but they are far too
conservative for a YamBMS setup where many fast ESP32-based servers share one bus.
YamBMS therefore ships its own defaults:
```yaml
substitutions:
# UART
modbus_baud_rate: '19200' # 9600 / 19200 / 115200
# Modbus
modbus_id: '1'
modbus_send_wait_time: '200ms' # Timeout: max time to wait for the FIRST byte of a response
modbus_turnaround_time: '0ms' # Pause after a completed response before the next command
# Modbus Controller
modbus_update_interval: '5s' # Frequency with which BMS/Balancer/Shunt (modbus servers) are queried
modbus_controller:
max_cmd_retries: 1 # Retransmissions after a timeout (default is 4)
offline_skip_updates: 5 # Server re-polled every 30s with an update_interval of 5s
```
> **The one idea to remember:** what costs time on the bus is the **number of
> Modbus commands per cycle**, not the number of servers. A BMS whose register
> map has gaps generates several commands instead of one. Reducing the command
> count is usually worth more than raising the baud rate.
---
## What each parameter does
### `send_wait_time` — response timeout
Maximum time the client waits for the **first byte** of a response. If nothing
has started arriving within this time, the command is treated as failed.
* It is a **latency** budget, not a transmission budget: it does not depend on
the baud rate or on the response length. Once the first byte arrives, the
client waits for the whole response however long it takes.
* It only costs time **when a server does not answer**. Lowering it has no effect
on a healthy bus — it just bounds the price of a failure.
An ESPHome server on ESP32 answers within one pass of its main loop (16 ms by
default). `200ms` leaves ample margin for an occasional slow loop (WiFi burst,
API reconnect, flash write) without ever mistaking a busy server for a dead one.
### `turnaround_time` — inter-command pause
Pause inserted after a completed response, before the next command. It exists to
give slow devices time to get ready for the next frame.
**It is charged per command, not per server** — including between two commands
sent to the same BMS. With 24 BMS generating 4 commands each, a
`turnaround_time` of 100 ms would add 96 × 100 ms = **9.6 s** to every cycle.
`0ms` is the right value for an all-ESPHome bus. It never produces truly
back-to-back frames: the Modbus specification silence (3.5 characters) is always
enforced, and the ESPHome main loop adds its own scheduling delay on both sides.
### `update_interval` — polling frequency
How often each `modbus_controller` reads **all** its register ranges. All
controllers fire at roughly the same time and the resulting commands are
serialized on the bus, one conversation at a time.
### `max_cmd_retries` — retransmissions
Retransmissions of a timed-out command before giving up (not counting the initial
transmission). ESPHome defaults to `4`; YamBMS uses `1`. One retry absorbs a
transient glitch, and a genuinely dead server is handed to `offline_skip_updates`
quickly instead of blocking the bus.
### `offline_skip_updates` — offline back-off
Once a server has exhausted its retries it is marked **offline**, and this many
update cycles are skipped before it is probed again. With `5`, a silent server is
re-polled every `(5 + 1) × update_interval` = **30 s**. As soon as it answers a
probe it is marked online and normal polling resumes — no reboot or manual action
needed.
---
## Reducing the number of commands
ESPHome merges **consecutive** registers into a single range, and reads each
range with one Modbus command. A single unmapped register in the middle splits
the range in two — and every extra command costs a request frame, a response
frame, and a fixed scheduling overhead.
### Fill the gaps with `register_count`
`register_count` can span a gap. Set it on the sensor **before** the gap, sized
to reach the next register you actually want. The registers in between are read
and discarded.
Example — a PACE BMS map with gaps at register 8 and registers 13–14:
| Sensor to modify | Value | Effect |
|------------------|-------|--------|
| last sensor before the gap (address 7) | `register_count: 2` | absorbs register 8 |
| last sensor before the gap (address 12) | `register_count: 3` | absorbs registers 13–14 |
Ranges `0–7`, `9–12` and `15–36` then merge into a **single command covering
0–36**, taking that BMS from 4 commands per cycle down to 2 — roughly a third off
the total cycle time, for the cost of 3 useless registers read (6 bytes).
> Check first that the skipped registers are actually **readable** on your
> device. An invalid register anywhere inside a range makes the whole command
> fail with a Modbus exception.
### `force_new_range` — use sparingly
`force_new_range: true` (default `false`, available on every `modbus_controller`
platform) prevents a sensor from joining the previous range, forcing a separate
command. It works in the *opposite* direction to the optimisation above, so use
it only to isolate genuinely static registers that can then carry a high
`skip_updates`.
Two things to know:
* `skip_updates` applies to the **whole range**, and ESPHome keeps the lowest
non-zero value among its sensors. One fast sensor inside a large block forces
the entire block to the fast rate.
* Sensors marked `force_new_range` are sorted **before** all others, ahead of the
address sort. Marking one sensor in the middle of a block does not split it in
two — it pulls that sensor to the front and lets the rest merge. To split a
block, mark the first sensor of each intended segment.
It is also set automatically for any sensor using `custom_command`.
### Sensors can share a range for free
Several sensors may read the same registers without any extra bus traffic — they
all decode the same response buffer. A `delta cell voltage` sensor declared at the
same address as `cell voltage 1`, with a lambda walking all 16 cells, costs
**zero** additional commands. Two declarations at the same address produce one
transaction, not two.
### YAML order: when it matters
Sensors are sorted internally (by register type, `force_new_range`, address, then
offset), so their order in the file is normally irrelevant.
**Except when two sensors share the same address and offset.** The final
tie-break is allocation order — that is, YAML order — and the sensor that comes
first defines the range's `register_count`.
With `cell voltage 1` (1 register) and `delta cell voltage`
(`register_count: 16`) both at address 15:
* `cell voltage 1` **first** → the range opens with count 1, cells 2–16 extend it
normally → **one command**. ✅
* `delta` **first** → the range opens with count 16, cell 2 no longer fits the
extension test → **a second range starts**, and registers 16–30 are read twice. ❌
Leave a comment in your YAML so nobody reorders these by accident.
---
## Tuning guide
* **`send_wait_time`**: set it to the slowest observed "time to first byte" of any
server on the bus, with generous margin. `200ms` suits all-ESPHome/ESP32 buses.
Raise it only if a device that is genuinely alive produces spurious timeouts.
Do **not** raise it "to be safe": it is the unit price of every dead-server
event.
* **`turnaround_time`**: keep `0ms` on an all-ESPHome bus. For a slow third-party
device try `10–30ms` first; `100ms` (the old ESPHome default) is the safe
fallback for unknown hardware, and `200–600ms` only for VFDs and gateways.
Remember the cost is per command.
* **Mixed buses**: `turnaround_time` belongs to the *hub*, so one slow device
imposes its value on all your BMS. Put slow third-party hardware on a **second
UART** with its own `modbus:` hub rather than raising the global value.
* **`modbus_baud_rate`**: `19200` is a good default. Gains flatten out above it,
because per-command scheduling overhead starts to dominate transmission time —
merge ranges before reaching for a higher baud rate.
* **`update_interval`**: leave enough headroom that the full cycle still fits when
a server is dead. If some entities stop refreshing while others keep updating,
the cycle is overrunning the interval — reduce the command count, raise the
interval, or split the bus.
* **`offline_skip_updates`**: `(value + 1) × update_interval` is the re-probe
period. `5` → every 30 s at a 5 s interval. Lower it to `3` for faster recovery
detection.
---
## Checking your configuration
Set the logger to `DEBUG` (or `VERBOSE` for the range details) and watch a few
cycles:
```yaml
logger:
level: DEBUG
```
* Ranges are logged as they are built — the quickest way to confirm that a
`register_count` gap fill actually merged what you expected.
* `Modbus command timed out` on a device that is alive means `send_wait_time` is
too low, or the bus is saturated.
* `Modbus device=N set offline` / `back online` traces the offline back-off.
+157 -72
View File
@@ -71,6 +71,7 @@ api:
> Please note that enabling this component will take up a lot of memory and may decrease stability and be the cause of reboot depending on the capabilities of the board used.
If you don't use `Home Assistant`, you can activate the `Web Server` and have access to YamBMS information and also interact with the application.
To do so, include the `yambms_web_server.yaml` package, see [Board options](#board-options).
[ESPHome Web Server Component](https://esphome.io/components/web_server.html)
@@ -93,55 +94,52 @@ So just one of the packages below :
### ESP32 Generic
```YAML
device_board: !include packages/board/board_ESP32_Generic.yaml
board: !include packages/board/board_ESP32_Generic.yaml
```
### ESP32 DevKit-V1
```YAML
device_board: !include packages/board/board_ESP32_DevKit-V1.yaml
board: !include packages/board/board_ESP32_DevKit-V1.yaml
```
### ESP32-S3 DevKitC-1
```YAML
# RGB LED to GPIO 38
device_board: !include packages/board/board_ESP32-S3_DevKitC-1_LED-38.yaml
board: !include packages/board/board_ESP32-S3_DevKitC-1_LED-38.yaml
```
```YAML
# RGB LED to GPIO 48
device_board: !include packages/board/board_ESP32-S3_DevKitC-1_LED-48.yaml
board: !include packages/board/board_ESP32-S3_DevKitC-1_LED-48.yaml
```
### Atom S3 Lite
```YAML
device_board: !include packages/board/board_ESP32-S3_AtomS3-Lite.yaml
board: !include packages/board/board_ESP32-S3_AtomS3-Lite.yaml
```
### Atom S3 / S3R (display)
In this case you need to specify the `yambms` and `canbus` IDs to display the information on the screen.
The screen is a separate package, `board_options_display_128x128.yaml`, to include next to the board.
```YAML
device_board: !include
file: packages/board/board_ESP32-S3_AtomS3.yaml
vars:
display_auto_next_page_interval: '5s'
```
board: !include packages/board/board_ESP32-S3_AtomS3.yaml
# board: !include packages/board/board_ESP32-S3_AtomS3R.yaml
```YAML
device_board: !include
file: packages/board/board_ESP32-S3_AtomS3R.yaml
board_display: !include
file: packages/board/board_options_display_128x128.yaml
vars:
display_auto_next_page_interval: '5s'
display_rotation: '0' # 0/90/180/270 rotation angle in degrees
```
### ESP32-C3 DevKitM-1
```YAML
device_board: !include packages/board_ESP32-C3_DevKitM-1.yaml
board: !include packages/board/board_ESP32-C3_DevKitM-1.yaml
```
### ESP32-C3 ETH01-EVO
@@ -149,13 +147,13 @@ In this case you need to specify the `yambms` and `canbus` IDs to display the in
This board has an `Ethernet` port and can be powered from `POE` (optional).
```YAML
device_board: !include packages/board/board_ESP32-C3_ETH01-EVO.yaml
board: !include packages/board/board_ESP32-C3_ETH01-EVO.yaml
```
### ESP32 LilyGo T-CAN485
```YAML
device_board: !include packages/board/board_ESP32_LilyGo-T-CAN485.yaml
board: !include packages/board/board_ESP32_LilyGo-T-CAN485.yaml
```
> [!NOTE]
> The device has an integrated 120 Ohm termination resistor. If used as a node in the middle, this resistor must be removed. ![Image](../../images/MCU_ESP32_LilyGo-T-CAN485_resistors.jpg)
@@ -163,7 +161,7 @@ This board has an `Ethernet` port and can be powered from `POE` (optional).
### ESP32-S3 LilyGo T-Connect
```YAML
device_board: !include packages/board/board_ESP32-S3_LilyGo-T-Connect.yaml
board: !include packages/board/board_ESP32-S3_LilyGo-T-Connect.yaml
```
> [!NOTE]
> The device has an integrated 120 Ohm termination resistor. If used as a node in the middle, this resistor must be removed.
@@ -171,11 +169,34 @@ This board has an `Ethernet` port and can be powered from `POE` (optional).
### ESP32-S3 LilyGo T-Connect Pro
```YAML
device_board: !include packages/board/board_ESP32-S3_LilyGo-T-Connect-Pro.yaml
board: !include packages/board/board_ESP32-S3_LilyGo-T-Connect-Pro.yaml
```
> [!NOTE]
> The device has an integrated 120 Ohm termination resistor. If used as a node in the middle, this resistor must be removed.
## Board options
Uncomment the options you need. Boards with a screen also need their display package, see the
`Board Display` block of the [example YAML](../../YamBMS_Local_Packages_example.yaml).
```YAML
# PSRAM octal 80Mhz
# psram_octal_80Mhz: !include packages/board/board_options_PSRAM_octal_80Mhz.yaml
# Web Server
# web_server: !include packages/yambms/yambms_web_server.yaml
# WiFi AP @ 192.168.4.1
# wifi_ap: !include packages/board/board_options_wifi_ap.yaml
# Captive Portal @ 192.168.4.1
# captive_portal: !include packages/board/board_options_captive_portal.yaml
```
> [!NOTE]
> UART and CAN interfaces are not included here. Each package declares its own, from its
> `*_uart_id` or `canbus_platform` var.
## YamBMS single-node example
```YAML
@@ -184,6 +205,7 @@ This board has an `Ethernet` port and can be powered from `POE` (optional).
vars:
shunt_id: '1' # must be a number
shunt_name: 'Shunt 1'
shunt_uart_id: 'uart_esp_1'
# other settings
# ...
@@ -192,14 +214,16 @@ This board has an `Ethernet` port and can be powered from `POE` (optional).
vars:
bms_id: '1' # must be a number
bms_name: 'BMS 1'
bms_uart_id: 'uart_esp_2'
# other settings
# ...
bms2: !include
file: packages/bms/bms_combine_JBD_UART_full.yaml
file: packages/bms/bms_combine_JBD_BLE_full.yaml
vars:
bms_id: '2' # must be a number
bms_name: 'BMS 2'
bms_ble_mac_address: 11:22:33:44:55:77
# other settings
# ...
@@ -220,7 +244,7 @@ This board has an `Ethernet` port and can be powered from `POE` (optional).
```YAML
modbus: !include
file: packages/base/device_modbus.yaml
file: packages/board/board_options_itf_modbus.yaml
vars:
modbus_role: 'client' # client / server
modbus_uart_id: 'uart_esp_1' # RS485 board
@@ -254,7 +278,7 @@ This board has an `Ethernet` port and can be powered from `POE` (optional).
```YAML
modbus: !include
file: packages/base/device_modbus.yaml
file: packages/board/board_options_itf_modbus.yaml
vars:
modbus_role: 'server' # client / server
modbus_uart_id: 'uart_esp_1' # RS485 board
@@ -287,7 +311,7 @@ This board has an `Ethernet` port and can be powered from `POE` (optional).
```YAML
modbus: !include
file: packages/base/device_modbus.yaml
file: packages/board/board_options_itf_modbus.yaml
vars:
modbus_role: 'server' # client / server
modbus_uart_id: 'uart_esp_1' # RS485 board
@@ -354,40 +378,59 @@ As soon as the balancer is available/online the values ​​`equalizing` and `b
Take the time to configure `YamBMS` correctly according to your battery chemistry type `LFP/Li-ion/LTO` and `cell count`. Charging voltages can be changed in the app.
The YamBMS settings are `substitutions`, not `vars`, because the other packages read them too
(`yambms_id` for instance is used by the CAN and RS485 packages). Set them in the
`substitutions:` block at the top of your YAML :
```YAML
yambms1: !include
file: packages/yambms/yambms.yaml
vars:
# Please read the cut-off charging logic README to understand how the YamBMS works
yambms_id: 'yambms1'
yambms_name: 'YamBMS 1'
yambms_update_interval: '1s'
# Input numbers can be displayed as a slider or an input box, options are 'slider' or 'box'.
yambms_input_number_mode: 'slider'
# Please check and fill in the options below correctly according to your battery chemistry and number of cells in series.
# These parameters are important and used for charging logic.
# Battery Chemistry
yambms_battery_chemistry: '1' # 1-LFP | 2-Li-ion | 3-LTO
# Number of cells in series
yambms_cell_count: '16'
# Bulk / Absorption Voltage : corresponds to the Bulk voltage that will be used to charge the battery. (LFP : 55.2V = 3.45V/Cell for 16S battery)
yambms_bulk_v: '55.2'
# Float Voltage : corresponds to the voltage at which the battery would be maintained at the end of charge. (LFP : 53.6V = 3.35V/Cell for 16S battery)
yambms_float_v: '53.6'
# Rebulk voltage, voltage from which a new Bulk charge can start. (LFP : 52.8V = 3.3V/Cell for 16S battery)
yambms_rebulk_v: '52.8'
# Maximum time in minutes that the cut-off step can last before charging is complete
# If your cells are properly balanced this step ends at the fastest after the `cut-off timer`
# This timer can be deactivated with a switch
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '60'
# Max. charge current : corresponds to the maximum charge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_charge_current: '300' # in Ampere
# Max. discharge current : corresponds to the maximum discharge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_discharge_current: '300' # in Ampere
substitutions:
# Please read the cut-off charging logic README to understand how the YamBMS works
yambms_id: '1' # Number without spaces
yambms_name: 'YamBMS 1' # Prefix for YamBMS entities
yambms_update_interval: '1s'
# Input numbers can be displayed as a slider or an input box, options are 'slider' or 'box'.
yambms_input_number_mode: 'slider'
# Please check and fill in the options below correctly according to your battery chemistry and number of cells in series.
# These parameters are important and used for charging logic.
# Battery Chemistry
yambms_battery_chemistry: '1' # 1-LFP | 2-Li-ion | 3-LTO
# Number of cells in series
yambms_cell_count: '16'
# Bulk / Absorption Voltage : corresponds to the Bulk voltage that will be used to charge the battery. (LFP : 55.2V = 3.45V/Cell for 16S battery)
yambms_bulk_v: '55.2'
# Float Voltage : corresponds to the voltage at which the battery would be maintained at the end of charge. (LFP : 53.6V = 3.35V/Cell for 16S battery)
yambms_float_v: '53.6'
# Rebulk voltage, voltage from which a new Bulk charge can start. (LFP : 52.8V = 3.3V/Cell for 16S battery)
yambms_rebulk_v: '52.8'
# Maximum time in minutes that the cut-off step can last before charging is complete
# If your cells are properly balanced this step ends at the fastest after the `cut-off timer`
# This timer can be deactivated with a switch
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '180'
# Max. charge current : corresponds to the maximum charge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_charge_current: '300' # in Ampere
# Max. discharge current : corresponds to the maximum discharge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_discharge_current: '300' # in Ampere
```
Then include the package below `packages:`, with no `vars:` :
```YAML
yambms: !include packages/yambms/yambms.yaml
```
### YamBMS services
The update service checks for a newer YamBMS version. The telemetry service sends anonymous data
about your setup, see [Telemetry](Telemetry.md). Both are enabled by default and set in the same
`substitutions:` block :
```YAML
yambms_update_service: 'true' # Set to false to disable update checks
yambms_telemetry_service: 'true' # Set to false to disable the sending of telemetry data
```
## CAN bus to Inverter
@@ -396,45 +439,87 @@ Take the time to configure `YamBMS` correctly according to your battery chemistr
> This package is only used with the `YamBMS` main node.
> It's possible to use this package multiple times in order to send information on two different `CAN` bus.
You can keep the default configuration and adapt the `canbus` node on which the component must connect.
> [!WARNING]
> Each declared `CAN` or `RS485` link divides the requested CCL/DCL, even when its `Protocol` is `Disabled`.
> Only declare the links actually wired to an inverter/charger, see [Multi-inverter / multi-charger](YamBMS_functions.md#multi-inverter--multi-charger).
You can keep the default configuration.
The CAN bus connected to your inverter via the CAN transceiver `canbus_inverter_1`.
> [!NOTE]
> A package that uses a CAN bus declares its node itself, so there is no CAN interface to include
> separately. `canbus_platform` selects the controller and has no default :
>
> - `esp32_can` : CAN controller of the ESP32, with a TJA105x, SN65HVD230 or M5Stack CAN base/unit transceiver.
> - `mcp2515` : MCP2515 module on the SPI bus.
> - `external` : the node is already declared, by the board (espBerry) or by another package. This
> is what a second link on the same node must use.
You can keep the default configuration and adapt the `canbus` node on which the component must connect.
```YAML
canbus1: !include
file: packages/yambms/yambms_canbus.yaml
# file: packages/yambms/yambms_canbus_web_server.yaml
vars:
# CANBUS vars
canbus_id: 'canbus1'
canbus_id: '1' # Must be a number
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_inverter_1'
canbus_light_id: 'esp_light'
# The CANBUS link will be considered down if no response from the inverter (ID 0x305) for 5s
# The Deye inverter sends the ACK (can_id 0x305) only when it receives the can_id 0x356
canbus_link_timer: '5s'
canbus_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# CAN frames sending will be paused for `30s` if the inverter does not respond with an ACK (can_id 0x305) before the end of the `canbus_link_timer` (5s by default).
canbus_link_timer_enabled: 'true' # Set it to 'false' if your inverter/charger is not sending ACK (can_id 0x305) every `1s` as specified by the protocol
canbus_link_timer: '10s' # min 6s with Deye
# CAN setup
canbus_platform: 'esp32_can' # esp32_can / mcp2515
canbus_node_id: 'canbus_inverter_1' # CAN bus node to which your inverter is connected
canbus_bitrate: '500kbps' # Default : 500kbps
```
# RS485 bus to Inverter
> [!IMPORTANT]
> After flashing, select the `Inverter brand` of this link in Home Assistant or the web server.
> The link stays inactive until this is done. If your brand is not listed, select `Other` and set
> `Protocol` yourself, see [Supported devices](Supported_devices.md).
## RS485 bus to Inverter
> [!TIP]
> This package is only used with the `YamBMS` main node.
> It's possible to use this package multiple times in order to send information on two different `RS485` bus.
> [!WARNING]
> Each declared `CAN` or `RS485` link divides the requested CCL/DCL, even when its `Protocol` is `Disabled`.
> Only declare the links actually wired to an inverter/charger, see [Multi-inverter / multi-charger](YamBMS_functions.md#multi-inverter--multi-charger).
The RS485 bus connected to your inverter via the RS485 transceiver `uart_esp_3`.
> [!NOTE]
> A package that uses a UART declares it itself from its `*_uart_id` var, so there is no UART to
> include separately. Each UART can only be used by one package. If your RS485 transceiver needs a
> `flow_control_pin`, add `uart_flow_control_pin: ${talk_pin}` to the `vars:` of that package
> (native ESP32 UART only, not on a WK2168 channel).
You can keep the default configuration and adapt the `uart` port on which the component must connect.
```YAML
rs485_pylon: !include
file: packages/yambms/yambms_rs485_pylon.yaml
rs485_1: !include
file: 'packages/yambms/yambms_rs485.yaml'
# file: 'packages/yambms/yambms_rs485_web_server.yaml'
vars:
rs485_id: 'rs485_1'
rs485_id: '1' # Must be a number
rs485_name: 'RS485 1'
rs485_uart_id: 'uart_esp_3' # UART interface to which your inverter is connected
rs485_uart_baud_rate: '9600'
rs485_update_timeout: '5s'
rs485_protocol: 'pylon' # pylon / voltronic
rs485_update_timeout: '10s'
rs485_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# UART setup
rs485_uart_id: 'uart_esp_3' # UART interface to which your inverter is connected
# ESP32 : uart_esp_1 to uart_esp_3
# WK2168 : uart_spi_0 to uart_spi_7 / uart_i2c_0 to uart_i2c_7
rs485_uart_baud_rate: '9600' # Default : 9600 / Epever : 115200
```
> [!IMPORTANT]
> After flashing, select the `Inverter brand` of this link in Home Assistant or the web server.
> The link stays inactive until this is done. If your brand is not listed, select `Other` and set
> `Protocol` yourself, see [Supported devices](Supported_devices.md).
## Debug
The `debug` package will add useful information to refer to if problems occur.
+141 -62
View File
@@ -71,6 +71,7 @@ api:
> Please note that enabling this component will take up a lot of memory and may decrease stability and be the cause of reboot depending on the capabilities of the board used.
If you don't use `Home Assistant`, you can activate the `Web Server` and have access to YamBMS information and also interact with the application.
To do so, include the `yambms_web_server.yaml` package, see [Board options](#board-options).
[ESPHome Web Server Component](https://esphome.io/components/web_server.html)
@@ -137,17 +138,13 @@ So just one of the packages below :
### Atom S3 / S3R (display)
In this case you need to specify the `yambms` and `canbus` IDs to display the information on the screen.
The screen is a separate package, `board_options_display_128x128.yaml`, to include next to the board.
```YAML
- path: 'packages/board/board_ESP32-S3_AtomS3.yaml'
vars:
display_auto_next_page_interval: '5s'
display_rotation: '0' # 0/90/180/270 rotation angle in degrees
```
# - path: 'packages/board/board_ESP32-S3_AtomS3R.yaml'
```YAML
- path: 'packages/board/board_ESP32-S3_AtomS3R.yaml'
- path: 'packages/board/board_options_display_128x128.yaml'
vars:
display_auto_next_page_interval: '5s'
display_rotation: '0' # 0/90/180/270 rotation angle in degrees
@@ -156,7 +153,7 @@ In this case you need to specify the `yambms` and `canbus` IDs to display the in
### ESP32-C3 DevKitM-1
```YAML
- path: 'packages/board_ESP32-C3_DevKitM-1.yaml'
- path: 'packages/board/board_ESP32-C3_DevKitM-1.yaml'
```
### ESP32-C3 ETH01-EVO
@@ -191,6 +188,29 @@ This board has an `Ethernet` port and can be powered from `POE` (optional).
> [!NOTE]
> The device has an integrated 120 Ohm termination resistor. If used as a node in the middle, this resistor must be removed.
## Board options
Uncomment the options you need. Boards with a screen also need their display package, see the
`Board Display` block of the [example YAML](../../YamBMS_Remote_Packages_example.yaml).
```YAML
# PSRAM octal 80Mhz
# - path: 'packages/board/board_options_PSRAM_octal_80Mhz.yaml'
# Web Server
# - path: 'packages/yambms/yambms_web_server.yaml'
# WiFi AP @ 192.168.4.1
# - path: 'packages/board/board_options_wifi_ap.yaml'
# Captive Portal @ 192.168.4.1
# - path: 'packages/board/board_options_captive_portal.yaml'
```
> [!NOTE]
> UART and CAN interfaces are not included here. Each package declares its own, from its
> `*_uart_id` or `canbus_platform` var.
## YamBMS [single-node](../../examples/single-node/) example
```YAML
@@ -206,7 +226,8 @@ This board has an `Ethernet` port and can be powered from `POE` (optional).
vars:
bms_id: '1' # must be a number
bms_name: 'BMS 1'
- # other settings
bms_uart_id: 'uart_esp_2'
# other settings
# ...
# BMS 2
@@ -214,6 +235,7 @@ This board has an `Ethernet` port and can be powered from `POE` (optional).
vars:
bms_id: '2' # must be a number
bms_name: 'BMS 2'
bms_ble_mac_address: 11:22:33:44:55:77
# other settings
# ...
@@ -234,7 +256,7 @@ This board has an `Ethernet` port and can be powered from `POE` (optional).
```YAML
# Modbus client
- path: 'packages/base/device_modbus.yaml'
- path: 'packages/board/board_options_itf_modbus.yaml'
vars:
modbus_role: 'client' # client / server
modbus_uart_id: 'uart_esp_1' # RS485 board
@@ -264,7 +286,7 @@ This board has an `Ethernet` port and can be powered from `POE` (optional).
```YAML
# Modbus server
- path: 'packages/base/device_modbus.yaml'
- path: 'packages/board/board_options_itf_modbus.yaml'
vars:
modbus_role: 'server' # client / server
modbus_uart_id: 'uart_esp_1' # RS485 board
@@ -294,7 +316,7 @@ This board has an `Ethernet` port and can be powered from `POE` (optional).
```YAML
# Modbus server
- path: 'packages/base/device_modbus.yaml'
- path: 'packages/board/board_options_itf_modbus.yaml'
vars:
modbus_role: 'server' # client / server
modbus_uart_id: 'uart_esp_1' # RS485 board
@@ -359,44 +381,59 @@ As soon as the balancer is available/online the values ​​`equalizing` and `b
Take the time to configure `YamBMS` correctly according to your battery chemistry type `LFP/Li-ion/LTO` and `cell count`. Charging voltages can be changed in the app.
The YamBMS settings are `substitutions`, not `vars`, because the other packages read them too
(`yambms_id` for instance is used by the CAN and RS485 packages). Set them in the
`substitutions:` block at the top of your YAML :
```YAML
substitutions:
# Please read the cut-off charging logic README to understand how the YamBMS works
yambms_id: '1' # Number without spaces
yambms_name: 'YamBMS 1' # Prefix for YamBMS entities
yambms_update_interval: '1s'
# Input numbers can be displayed as a slider or an input box, options are 'slider' or 'box'.
yambms_input_number_mode: 'slider'
# Please check and fill in the options below correctly according to your battery chemistry and number of cells in series.
# These parameters are important and used for charging logic.
# Battery Chemistry
yambms_battery_chemistry: '1' # 1-LFP | 2-Li-ion | 3-LTO
# Number of cells in series
yambms_cell_count: '16'
# Bulk / Absorption Voltage : corresponds to the Bulk voltage that will be used to charge the battery. (LFP : 55.2V = 3.45V/Cell for 16S battery)
yambms_bulk_v: '55.2'
# Float Voltage : corresponds to the voltage at which the battery would be maintained at the end of charge. (LFP : 53.6V = 3.35V/Cell for 16S battery)
yambms_float_v: '53.6'
# Rebulk voltage, voltage from which a new Bulk charge can start. (LFP : 52.8V = 3.3V/Cell for 16S battery)
yambms_rebulk_v: '52.8'
# Maximum time in minutes that the cut-off step can last before charging is complete
# If your cells are properly balanced this step ends at the fastest after the `cut-off timer`
# This timer can be deactivated with a switch
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '180'
# Max. charge current : corresponds to the maximum charge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_charge_current: '300' # in Ampere
# Max. discharge current : corresponds to the maximum discharge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_discharge_current: '300' # in Ampere
```
Then include the package, with no `vars:` :
```YAML
yambms:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
- path: 'packages/yambms/yambms.yaml'
vars:
# Please read the cut-off charging logic README to understand how the YamBMS works
yambms_id: 'yambms1'
yambms_name: 'YamBMS 1'
yambms_update_interval: '1s'
# Input numbers can be displayed as a slider or an input box, options are 'slider' or 'box'.
yambms_input_number_mode: 'slider'
# Please check and fill in the options below correctly according to your battery chemistry and number of cells in series.
# These parameters are important and used for charging logic.
# Battery Chemistry
yambms_battery_chemistry: '1' # 1-LFP | 2-Li-ion | 3-LTO
# Number of cells in series
yambms_cell_count: '16'
# Bulk / Absorption Voltage : corresponds to the Bulk voltage that will be used to charge the battery. (LFP : 55.2V = 3.45V/Cell for 16S battery)
yambms_bulk_v: '55.2'
# Float Voltage : corresponds to the voltage at which the battery would be maintained at the end of charge. (LFP : 53.6V = 3.35V/Cell for 16S battery)
yambms_float_v: '53.6'
# Rebulk voltage, voltage from which a new Bulk charge can start. (LFP : 52.8V = 3.3V/Cell for 16S battery)
yambms_rebulk_v: '52.8'
# Maximum time in minutes that the cut-off step can last before charging is complete
# If your cells are properly balanced this step ends at the fastest after the `cut-off timer`
# This timer can be deactivated with a switch
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '60'
# Max. charge current : corresponds to the maximum charge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_charge_current: '300' # in Ampere
# Max. discharge current : corresponds to the maximum discharge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_discharge_current: '300' # in Ampere
```
### YamBMS services
The update service checks for a newer YamBMS version. The telemetry service sends anonymous data
about your setup, see [Telemetry](Telemetry.md). Both are enabled by default and set in the same
`substitutions:` block :
```YAML
yambms_update_service: 'true' # Set to false to disable update checks
yambms_telemetry_service: 'true' # Set to false to disable the sending of telemetry data
```
## CAN bus to Inverter
@@ -405,8 +442,21 @@ Take the time to configure `YamBMS` correctly according to your battery chemistr
> This package is only used with the `YamBMS` main node.
> It's possible to use this package multiple times in order to send information on two different `CAN` bus.
> [!WARNING]
> Each declared `CAN` or `RS485` link divides the requested CCL/DCL, even when its `Protocol` is `Disabled`.
> Only declare the links actually wired to an inverter/charger, see [Multi-inverter / multi-charger](YamBMS_functions.md#multi-inverter--multi-charger).
The CAN bus connected to your inverter via the CAN transceiver `canbus_inverter_1`.
> [!NOTE]
> A package that uses a CAN bus declares its node itself, so there is no CAN interface to include
> separately. `canbus_platform` selects the controller and has no default :
>
> - `esp32_can` : CAN controller of the ESP32, with a TJA105x, SN65HVD230 or M5Stack CAN base/unit transceiver.
> - `mcp2515` : MCP2515 module on the SPI bus.
> - `external` : the node is already declared, by the board (espBerry) or by another package. This
> is what a second link on the same node must use.
You can keep the default configuration and adapt the `canbus` node on which the component must connect.
```YAML
@@ -415,42 +465,71 @@ You can keep the default configuration and adapt the `canbus` node on which the
ref: main
refresh: 0s
files:
- path: 'packages/yambms/yambms_canbus.yaml'
- path: 'packages/yambms/yambms_canbus.yaml' # yambms_canbus_web_server.yaml
vars:
canbus_id: 'canbus1'
canbus_id: '1' # must be a number
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_inverter_1'
canbus_light_id: 'esp_light'
# The CANBUS link will be considered down if no response from the inverter (0x305 frame) for 5s
# The Deye inverter sends the ACK 0x305 only when it receives the 0x356 frame.
canbus_link_timer: '5s'
canbus_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# CAN frames sending will be paused for `30s` if the inverter does not respond with an ACK (can_id 0x305) before the end of the `canbus_link_timer` (5s by default).
canbus_link_timer_enabled: 'true' # Set it to 'false' if your inverter/charger is not sending ACK (can_id 0x305) every `1s` as specified by the protocol
canbus_link_timer: '10s' # min 6s with Deye
# CAN setup
canbus_platform: 'esp32_can' # esp32_can / mcp2515
canbus_node_id: 'canbus_inverter_1' # CAN bus node to which your inverter is connected
canbus_bitrate: '500kbps' # Default : 500kbps
```
# RS485 bus to Inverter
> [!IMPORTANT]
> After flashing, select the `Inverter brand` of this link in Home Assistant or the web server.
> The link stays inactive until this is done. If your brand is not listed, select `Other` and set
> `Protocol` yourself, see [Supported devices](Supported_devices.md).
## RS485 bus to Inverter
> [!TIP]
> This package is only used with the `YamBMS` main node.
> It's possible to use this package multiple times in order to send information on two different `RS485` bus.
> [!WARNING]
> Each declared `CAN` or `RS485` link divides the requested CCL/DCL, even when its `Protocol` is `Disabled`.
> Only declare the links actually wired to an inverter/charger, see [Multi-inverter / multi-charger](YamBMS_functions.md#multi-inverter--multi-charger).
The RS485 bus connected to your inverter via the RS485 transceiver `uart_esp_3`.
> [!NOTE]
> A package that uses a UART declares it itself from its `*_uart_id` var, so there is no UART to
> include separately. Each UART can only be used by one package. If your RS485 transceiver needs a
> `flow_control_pin`, add `uart_flow_control_pin: ${talk_pin}` to the `vars:` of that package
> (native ESP32 UART only, not on a WK2168 channel).
You can keep the default configuration and adapt the `uart` port on which the component must connect.
```YAML
rs485_pylon:
rs485_1:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
- path: 'packages/yambms/yambms_rs485_pylon.yaml'
- path: 'packages/yambms/yambms_rs485.yaml'
# - path: 'packages/yambms/yambms_rs485_web_server.yaml'
vars:
rs485_id: 'rs485_1'
rs485_id: '1' # Must be a number
rs485_name: 'RS485 1'
rs485_uart_id: 'uart_esp_3' # UART interface to which your inverter is connected
rs485_uart_baud_rate: '9600'
rs485_update_timeout: '5s'
rs485_protocol: 'pylon' # pylon / voltronic
rs485_update_timeout: '10s'
rs485_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# UART setup
rs485_uart_id: 'uart_esp_3' # UART interface to which your inverter is connected
# ESP32 : uart_esp_1 to uart_esp_3
# WK2168 : uart_spi_0 to uart_spi_7 / uart_i2c_0 to uart_i2c_7
rs485_uart_baud_rate: '9600' # Default : 9600 / Epever : 115200
```
> [!IMPORTANT]
> After flashing, select the `Inverter brand` of this link in Home Assistant or the web server.
> The link stays inactive until this is done. If your brand is not listed, select `Other` and set
> `Protocol` yourself, see [Supported devices](Supported_devices.md).
## Debug
The `debug` package will add useful information to refer to if problems occur.
+8 -4
View File
@@ -192,19 +192,23 @@ The Deye inverter sends the ACK (can_id `0x305`) only when it receives the can_i
vars:
canbus_id: '1' # must be a number
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_inverter_1' # CAN bus node to which your inverter is connected
canbus_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# The CAN bus link will be paused for `30s` if the inverter does not respond with an ACK (can_id 0x305)
# before the end of the `canbus_link_timer` (5s by default).
canbus_link_timer: '5s'
canbus_extended_ack: 'false' # Set to 'true' for enable extended 29-bit IDs for the ACK can_id 0x305 (required for Schneider XW Pro)
# CAN setup
canbus_platform: 'esp32_can' # esp32_can / mcp2515
canbus_node_id: 'canbus_inverter_1' # CAN bus node to which your inverter is connected
canbus_bitrate: '500kbps' # Default : 500kbps
```
## Warning & Alarms
If all BMS have alarms, the alarms are sent to the `CAN bus` as `Protection Alarms`.
If all combined BMS have alarms, the alarms are sent to the `CAN bus` as `Protection Alarms`.
If at least one BMS has no alarms, the alarms are sent to the CAN bus as `Warning`.
If at least one combined BMS has no alarms, the alarms are sent to the CAN bus as `Warning`.
Only combined BMS are counted. A BMS that is not combined (offline, or with missing data) is ignored, so a single BMS in protection while the others are offline sends `Protection Alarms`.
Both **text_sensor** `Alarm` and `Warning` show the alarms/warnings currently transmitted to the inverter.
+369 -55
View File
@@ -6,30 +6,86 @@
![GitHub forks](https://img.shields.io/github/forks/Sleeper85/esphome-yambms)
![GitHub watchers](https://img.shields.io/github/watchers/Sleeper85/esphome-yambms)
## CAN protocol
## Inverter Brand and Protocol
> [!IMPORTANT]
> You need to check if your inverter model is on the list of [supported inverters](Supported_devices.md#supported-inverter). In any case it must support one of the following `CAN` bus protocols.
> Select your inverter brand and leave `Protocol` on `Automatic`. If your inverter is supported,
> the dashboard then shows how to configure it: the battery mode to set on the inverter and any
> note specific to your brand.
![Image](../../images/YamBMS_CANBUS_Protocol.png "YamBMS_CANBUS_Protocol")
![Image](../../images/YamBMS_Inverter_Brand_and_Protocol.png "YamBMS_Inverter_Brand_and_Protocol")
Choose the CAN protocol that will be sent to your inverter and don't forget to configure your inverter for the protocol you choose.
### Setup in three steps
The table below helps you choose the best protocol depending on your inverter brand.
Other configurations are possible, don't hesitate to communicate what works well for you.
1. **Set `Inverter brand`** to the brand of your inverter. If it is not in the list, select
`Other` and see [Forcing a protocol](#forcing-a-protocol).
2. **Leave `Protocol` on `Automatic`.** YamBMS selects the best protocol known for your brand,
following the [mapping below](#brand-to-protocol-mapping).
3. **Configure your inverter** as shown in the `Inverter active protocol` card: set the battery
mode it gives you, and read the note if there is one.
| Inverter | Battery mode | CAN protocol |
| --- | --- | --- |
| Deye | Lithium 00 | PYLON 1.2 |
| GoodWe | LX U5.4-L | PYLON V2 |
| Sofar | Automatic | PYLON 1.2 |
| Growatt | CAN L52 | PYLON 1.2 |
| Solis | AoBo | SMA |
| LuxPower | Lithium 6 | LuxPower |
| EG4 | Lithium 6 | LuxPower |
| Victron | CAN-bus BMS LV (500 kbit/s) | Victron |
| MidNite Solar | PYLON | PYLON 1.2 |
| SMA | - | SMA |
As long as the brand is `Not defined`, nothing is sent on the bus and your inverter reports a
BMS communication fault. This is deliberate, so that a node is never left talking a protocol
nobody chose.
The inverter models confirmed by users are listed in [supported inverters](Supported_devices.md#supported-inverters).
### Brand to protocol mapping
In `Automatic`, YamBMS applies the protocol below for your brand. This mapping is a sensible
default, not a rule: a manufacturer may use a different protocol depending on the model. Don't
hesitate to share what works well for you.
| Inverter | Battery mode | Bus | Protocol |
| --- | --- | --- | --- |
| Deye | Lithium 00 | CAN | PYLON V1 |
| Deye | Lithium 12 | RS485 | PYLON |
| EG4 | Lithium 6 | CAN | LuxPower |
| Epever | BPRO 21 | RS485 | PYLON |
| GoodWe | LX U5.4-L | CAN | PYLON V2 |
| Growatt | CAN L52 | CAN | PYLON V1 |
| LuxPower | Lithium 6 | CAN | LuxPower |
| MidNite Solar | PYLON | CAN | PYLON V1 |
| MPP Solar | PYL | RS485 | PYLON |
| MPP Solar | LIB | RS485 | LIB |
| Schneider | Voltage Control Li-Ion | CAN | PYLON V2 |
| SMA | - | CAN | SMA |
| Sofar | Automatic | CAN | PYLON V1 |
| Sol-Ark | Lithium 00 | CAN | PYLON V1 |
| Sol-Ark | Lithium 12 | RS485 | PYLON |
| Solis | AoBo | CAN | SMA |
| SRNE | UZE | CAN | PYLON V2 |
| Studer | Pylontech | CAN | PYLON V2 |
| Sunsynk | Lithium 00 | CAN | PYLON V1 |
| Sunsynk | Lithium 12 | RS485 | PYLON |
| Victron | CAN-bus BMS LV (500 kbit/s) | CAN | Victron |
| Voltronic | PYL | RS485 | PYLON |
| Voltronic | LIB | RS485 | LIB |
Any other brand of the list, or a listed brand on the other bus, uses `PYLON V2` on CAN by default,
and the protocol compiled on the node on RS485. Such a combination has not been validated, and the
`Note` entity says so.
### RS485
On RS485 the protocol is chosen in your YAML with `rs485_protocol` (`pylon` or `voltronic`), and the
brand does not change it. `LIB` only works with `Voltronic` and `MPP Solar`: in `Automatic`, a node
compiled for `LIB` stays silent for any other brand. Rebranded Voltronic inverters must select
`Voltronic`. The protocols offered by parameter `05` depend on the inverter firmware, see its user
manual.
### Forcing a protocol
Only change `Protocol` if your inverter does not communicate with the automatic choice, or if you
selected `Other`. A forced protocol always takes priority over the brand, so an inverter that does
not follow the usual mapping can still be driven. `Disabled` turns the link off without raising a
fault.
The `Inverter link protocol` diagnostic entity always reports what the link is actually doing.
A few couples outside the default mapping are known to work, and YamBMS reports the right battery
mode for them too: `EG4` on `PYLON V1` (Lithium 2, 6000XP only) and `Solis` on `PYLON V2`
(Pylon LV, requires a 3.3V CAN transceiver).
## Charging settings
@@ -50,28 +106,73 @@ The `Bulk voltage` slider allows you to set the voltage used during the `Bulk`,
The `Float voltage` slider allows you to set the voltage used after charging is complete if the `Float charge enabled` switch is enabled.
The `Inverter Offset V.` slider allows you to correct the inverter charge voltage, either because it does not respect the requested value or because your inverter is far from your batteries and there is a voltage drop. This allows you to reach the target `Bulk` or `Float` charge voltage by adding an offset.
The `Charger Offset V.` slider allows you to correct the inverter charge voltage, either because it does not respect the requested value or because your inverter is far from your batteries and there is a voltage drop. This allows you to reach the target `Bulk` or `Float` charge voltage by adding an offset.
The `Cut-Off Cell Voltage` select defines which cell voltage is used by the `Cut-Off` detection, see the [Charging logic](Charging_logic.md).
- `Max Cell Voltage` (default): the end of charge depends on the **highest cell**. This is the conservative option, recommended for most installations.
- `Average Cell Voltage`: the end of charge reflects the state of the **whole pack** (`battery voltage / cell count`), giving a more consistent charge termination voltage from one day to the next. This option can help with batteries built from unmatched cells (different internal resistances), batteries with a runner cell, or a BMS that does not report its equalizing status.
> [!WARNING]
> With `Average Cell Voltage`, the highest cell **no longer stops the charge** and can be pushed above its maximum voltage. Only use this option with the `Auto CVL` and/or `Auto CCL` enabled, the BMS OVP protection remaining the last resort. If your inverter does not respect the requested charge voltage, only the current derating is effective.
### Max Requested Current
![Image](../../images/YamBMS_Max_Requested_Current.png "Max Requested Current")
The required `charge/discharge current` is calculated as follows :
The requested `charge/discharge current` is calculated from **three maximum values** :
1. You define a **maximum current** that can never be exceeded
2. YamBMS calculates the **maximum current** accepted by your BMS (total of OCP values ​​* 0.9)
3. The temperature-based current limiting function calculates the **maximum current** `based` on the **temperature**, the **battery capacity** and the **charging_rate_table** / **discharging_rate_table**. For further details see [Auto Temp-Based Current](Auto_temp-based_current.md).
2. YamBMS calculates the **maximum current** accepted by your BMS (total of OCP values * 0.9)
3. YamBMS calculates the **nominal current** of your battery bank based on the **battery capacity** and the **C-Rate** you have configured (default : `0.5C` for charge and discharge, as recommended by most LFP cell datasheets, e.g. EVE MB31)
The **current requested** by YamBMS will be **the lowest** of these three values.
This result can then be **further reduced** by the active functions acting on the CCL and DCL :
**Functions acting on the CCL (charge) :**
- [Auto Temp-Based Current](YamBMS_functions.md#auto-temp-based-current) : reduces the charge current according to the **temperature** and the **charging_rate_table**
- [Auto CCL](YamBMS_functions.md#auto-ccl) : reduces the charge current when a cell approaches the BMS **OVP** threshold
- [Auto CCL Current Taper](YamBMS_functions.md#auto-ccl-current-taper) : reduces the charge current along a knee→bulk curve based on **pack voltage**
- [Auto SoC Limit](YamBMS_functions.md#auto-soc-limit) : clamps the charge current when the target **SoC** is reached
- [Auto EOC](YamBMS_functions.md#auto-eoc) : slows down the charge so the battery reaches full charge at the chosen **time**
**Functions acting on the DCL (discharge) :**
- [Auto Temp-Based Current](YamBMS_functions.md#auto-temp-based-current) : reduces the discharge current according to the **temperature** and the **discharging_rate_table**
- [Auto DCL](YamBMS_functions.md#auto-dcl) : reduces the discharge current when a cell approaches the BMS **UVP** threshold
The final CCL/DCL sent to the inverter is always the **lowest** value among all these functions. The **CCL/DCL derating reason** sensor shows which function is currently limiting the current.
### Multi-inverter / multi-charger
`YamBMS` supports several inverters/chargers connected to the same battery bank. Each inverter/charger declared in your YAML has its own `CAN` or `RS485` package, and each one receives **the same** `Requested Charge/Discharge Current`.
To prevent the battery bank from being charged/discharged at `N` times the calculated limit, `YamBMS` **divides the CCL and DCL by the number of declared inverter/charger links** :
> Example : a CCL of `150 A` with `2` inverters declared → each inverter receives `75 A`
Each declared `yambms_canbus.yaml` / `yambms_rs485.yaml` package increments a link counter at boot, and the final CCL/DCL is divided by this counter, then rounded. The division is applied **after** all the limiting functions above, so it always applies to the final value.
> [!WARNING]
> Only declare the links that are **actually wired** to an inverter/charger. The counter is based on the **declared** links, not on the active ones: a link whose `Protocol` is `Disabled`, or left on `Automatic` with no `Inverter brand`, still divides the CCL/DCL. With a `CAN` link in use and an unused `RS485` link left in your YAML, your inverter receives **half** the calculated current. Comment out the package of any link you don't use.
>
> This is deliberate. `Disabled` is meant to cut a link temporarily, while the inverter behind it is usually still connected to the battery bank and running on its own settings. Keeping it in the divider leaves room for the current it draws.
> [!NOTE]
> The counter is only incremented by the inverter/charger packages. A node with no inverter link declared keeps a divider of `1`, so the CCL/DCL are left unchanged.
> [!IMPORTANT]
> The division assumes your inverters/chargers **share the load evenly**. This is the case for identical units working in parallel on the same bank. If your units have different power ratings, or if one of them is offline or its link is `Disabled`, the total current drawn from the battery will be lower than the calculated limit — never higher.
## Requested Values
![Image](../../images/YamBMS_Requested_Values.png "YamBMS_Requested_Values")
These 4 sensors allow you to see what is being requested of your inverter.
In the example below, we are in the `Float` phase at a voltage of `53.6V` and an `Inverter Offset V.` of `0.1V`. The `Requested Charge Voltage` is therefore `53.7V`.
In the example below, we are in the `Float` phase at a voltage of `53.6V` and an `Charger Offset V.` of `0.1V`. The `Requested Charge Voltage` is therefore `53.7V`.
The `Requested Discharge Voltage` is the `UVP + 0.2` value of your BMS multiplied by the number of cells, in this example (3V * 16).
@@ -92,6 +193,10 @@ This function allows you to force a charge from `GRID` :
- when `SoC <= Start SoC` the forced charge start
- when `SoC >= Stop SoC` the forced charge stop
The request is only evaluated while at least one BMS is combined. During a reboot or a BMS dropout
the SoC is not a real value, so the request keeps its last state. Turning the switch off clears it
at once.
Works only with `PYLON`, `LuxPower` and `Victron` protocols.
## Auto functions
@@ -100,42 +205,188 @@ Thanks to [@MrPabloUK](https://github.com/MrPabloUK) for developing `Auto CVL`,
A [reference spreadsheet](https://docs.google.com/spreadsheets/d/1UwZ94Qca-DBP5gppzKmAjbMJYZGjR4lMwZtwwQR9wWY/edit?usp=sharing) has been created that shows how the `Auto CCL & DCL` works.
Thanks to [@GHswitt](https://github.com/GHswitt) for developing `Auto Float` function.
Thanks to [@GHswitt](https://github.com/GHswitt) for developing `Auto Float`, `Auto EOC` and `Auto SoC Limit` functions.
## Auto Temp-Based Current
![Image](../../images/YamBMS_Auto_Temp-Based_Current.png "Auto Temp-Based Current")
Lithium cells cannot safely accept the same current at all temperatures. Charging an LFP cell
below 0°C causes **lithium plating**, a permanent and dangerous degradation, and both charging
and discharging must be reduced or stopped at high temperature. Most BMS only offer an ON/OFF
protection (charge allowed or blocked at a fixed threshold), which either cuts the charge
completely or lets full current flow into a cold battery.
**Auto Temp-Based Current** fills this gap : it continuously adjusts the maximum charge and
discharge current according to the battery temperature, following two configurable
**temperature/C-Rate tables**.
This function can be disabled via the **"Temperature-based current limitation"** switch.
### How it works
YamBMS monitors the **temperature sensors of all connected BMS** and uses the coldest/hottest
values to look up the allowed **C-Rate** in the tables below. The resulting factor is applied
to the **battery capacity (Ah)**, not to the maximum charge/discharge current :
> Example : 280 Ah battery at 20°C with a rate of 0.5 → 280 x 0.5 = **140 A**
The resulting limit is one of the values used to calculate the final CCL/DCL : the current
requested by YamBMS is always the **lowest** of all active limits (see
[Max Requested Current](Max_Requested_Current.md)). When this function is the one limiting
the current, it is displayed by the **CCL/DCL derating reason** sensor.
### Configuration
The two tables are defined in the substitutions of your YAML. Each line is a pair
`{ temperature °C, C-Rate }` with a rate from `0.0` (current blocked) to `1.0` (1C).
# +-------------------------------------------------------------------------
# | Temperature-based current limitation
# | Can be disabled via the switch "Temperature-based current limitation"
# | This factor is applied to the battery capacity (Ah), not the current
# | maximum charge/discharge current. For example : 280Ah x 0.5 = 140A
# +-------------------------------------------------------------------------
# Temperature °C -> Charge Rate (0.0C to 1.0C)
yambms_charging_rate_table: |
{
{ -0.1, 0.00 },
{ 0.0, 0.05 },
{ 5.0, 0.12 },
{ 10.0, 0.30 },
{ 20.0, 0.50 },
{ 25.0, 0.50 },
{ 45.0, 0.50 },
{ 50.0, 0.50 },
{ 55.0, 0.50 },
{ 60.0, 0.00 }
}
# Temperature °C -> Discharge Rate (0.0C to 1.0C)
yambms_discharging_rate_table: |
{
{-30.0, 0.00 },
{-20.0, 0.50 },
{-10.0, 0.50 },
{ -5.0, 0.50 },
{ 0.0, 0.50 },
{ 5.0, 0.50 },
{ 45.0, 0.50 },
{ 50.0, 0.50 },
{ 55.0, 0.50 },
{ 60.0, 0.00 }
}
### Default values explained
The default tables are designed for **LFP cells** and follow the typical manufacturer
recommendations :
**Charge** : no charge below freezing (`-0.1°C -> 0.00`), then a progressive ramp as the
battery warms up — a trickle at 0°C (0.05C), increasing through 5°C and 10°C, reaching the
nominal 0.5C at 20°C. The rate stays at 0.5C up to 55°C and charging stops at 60°C.
The low-temperature ramp is deliberately conservative : charging a cold battery at reduced
current also warms it up, which progressively unlocks higher rates.
**Discharge** : LFP cells tolerate discharge at much lower temperatures than charge, so the
default allows 0.5C from -20°C up to 55°C, with a cut-off below -30°C and above 60°C.
### Customizing the tables
- Adjust the plateau value if your cells are rated differently (e.g. 0.3C for a
high-capacity storage cell, 1.0C for power cells)
- If your battery has a **self-heating** function or is installed in a heated enclosure,
the low-temperature charge ramp can be relaxed
- Keep the `0.00` end points : they act as hard cut-offs at the temperature extremes and
are your last software protection before the BMS protections trip
## Auto CVL
![Image](../../images/YamBMS_Auto_CVL.png "YamBMS Auto CVL")
> [!IMPORTANT]
> The `Auto CVL` function uses the `Balance Trig. Volt.` value of your BMS. `e.g. for LFP` : BTG=0.010V
> In Bulk, the `Auto CVL` function uses the `Balance Trig. Volt.` value of your BMS. `e.g. for LFP` : BTG=0.010V
When enabled, the `Automatic Charge Voltage Limit` feature will automatically reduce the `Requested Charge Voltage (CVL)` sent to the inverter when a cell starts to exceed the bulk target.
That way, the runner cell should be maintained at or near bulk (for example, 3.45v) and the balancer can start to bring up the lagging cells.
Controlling the CVL is the preferred option according to Victron and others, but it depends on how well your inverter behaves.
My Solis inverter is not great at CVL control, so it doesn't work well for me.
> [!NOTE]
> `Auto CVL` was reworked in `YamBMS 1.8.0` by [@Sleeper85](https://github.com/Sleeper85), see [release note](changelog/Changelog_YamBMS_1.8.0_Auto_CVL.md).
You can compare `Auto CVL` to cruise control in a car.
When enabled, the `Automatic Charge Voltage Limit` function automatically reduces the
`Requested Charge Voltage (CVL)` sent to the inverter when a cell starts to exceed the `Bulk
Voltage` target. The runner cell is maintained at or near that target, the balancer can start
to bring up the lagging cells, and the runner cell never climbs to the `OVP` threshold.
`Boost Charge V.` allows you to increase the charging voltage to charge your battery faster, the `Auto CVL` function will itself reduce the charging voltage at the end of charging so that it does not exceed the target voltage `Bulk Voltage`.
`Auto CVL` tracks the highest cell (`max_cell_v`) against the `Bulk Voltage` target, with the
BMS `Balance Trig. Volt.` as deadband, and floors at the chemistry's `Min Charge V.` (the
cv_min "fully charged at rest" value).
Think of charging as filling a tank with water : the voltage is the **pressure** pushing the
water in, the current is the **flow**. Where `Auto CCL` is a valve on the pipe, `Auto CVL`
acts directly on the **pump pressure**. When the pressure inside one compartment of the tank
(the runner cell) rises too fast, YamBMS turns the pump down so the source pressure matches
what that compartment can accept. With the source pressure lowered, over-pressurizing the
compartment becomes **physically impossible** — no matter how the downstream equipment
behaves, there is simply no excess pressure left to push. This is why voltage control is
inherently the safest way to terminate a charge, and the preferred option according to
Victron and others.
Its effectiveness, however, depends on how well your inverter follows `CVL` commands. Some
inverters regulate their output voltage poorly or slowly (e.g. some Solis models), in which
case the pump doesn't respond to the command to turn down — this is where `Auto CCL`, acting
on the valve instead, takes over as a complementary protection.
`Boost Charge V.` allows you to increase the charging voltage to charge your battery faster :
the pump is deliberately set to a higher pressure to fill the tank faster. `Auto CVL` will
then reduce the charging voltage by itself at the end of the charge, so that the runner cell
does not exceed the `Bulk Voltage` target — the pump pressure is automatically brought back
down as the tank approaches full.
## Auto CCL & DCL
![Image](../../images/YamBMS_Auto_CCL_DCL.png "YamBMS Auto CCL & DCL")
![Image](../../images/YamBMS_Auto_CCL_DCL.png "YamBMS Auto CCL")
### Auto CCL
> [!IMPORTANT]
> The `Auto CCL` function uses the `OVP` value of your BMS.
The `Auto Charge Current Limit` function has been introduced to prevent `OVP` alarms.
When enabled, `Auto CCL` automatically reduces the `Requested Charge Current (CCL)` sent to
the inverter when a cell starts to exceed the bulk target. This should prevent the runner
cell from reaching the max voltage cutoff — it doesn't hold the cell at bulk voltage, but
keeps it just below the `OVP` threshold.
Think of charging as filling a tank with water : the voltage is the **pressure** pushing the
water in, the current is the **flow**. `Auto CCL` is a **valve on the pipe** : when the
pressure inside one compartment of the tank (the runner cell) rises too fast, the valve
progressively closes to reduce the flow — even if the pump keeps pushing at full pressure.
Less water entering means less pressure build-up, and the compartment never reaches the
point where the safety relief (`OVP`) would trip.
Because it acts on the **current** rather than the voltage, this protection works with any
inverter that uses `CAN/RS485` control — including those that follow `CVL` commands poorly. It is
the perfect complement to `Auto CVL`, which acts on the pump pressure itself.
### Auto DCL
> [!IMPORTANT]
> The `Auto DCL` function uses the `UVP` value of your BMS.
Regarding the new `Auto Charge/Discharge Current Limit`, this features has been introduced to hopefully prevent `OVP` and `UVP` alarms.
The `Auto Discharge Current Limit` function has been introduced to prevent `UVP` alarms.
When enabled, the `Automatic Charge Current Limit` feature will automatically reduce the `Requested Charge Current (CCL)` sent to the inverter when a cell starts to exceed the bulk target.
This should prevent the runner cell from exceeding the max voltage cutoff, but doesn't maintain it at bulk voltage - instead it should keep it just below max cell voltage.
When enabled, `Auto DCL` automatically reduces the `Requested Discharge Current (DCL)` sent
to the inverter when a cell approaches `UVP + 0.2 V`. This should prevent the weakest cell
from reaching the low voltage cutoff and tripping the BMS protection.
You can compare `Auto CCL` to a max speed limiter in a car.
In the water analogy, discharging is **draining the tank** : the cell voltage is the water
level, the discharge current is the outgoing flow. `Auto DCL` is a **valve on the drain** :
when the level in one compartment (the weakest cell) gets close to the bottom, the valve
progressively closes to slow down the outflow. A strong draw on a nearly empty compartment
makes its level dip sharply (voltage sag under load) ; reducing the flow lets the level
stabilize just above the point where the safety cutoff (`UVP`) would trip, instead of
slamming the system to a hard stop.
`Auto DCL` works the same way when a cell approaching `UVP + 0.2`.
Current control should work with any inverter that uses `CAN` control.
Because it acts on the **current** rather than the voltage, this protection works with any
inverter that uses `CAN/RS485` control.
## Auto Float Voltage
@@ -153,37 +404,57 @@ This feature might not work with all inverters as good or is not required if the
The voltage steps can be configured (default `0.1V`) with `Auto Float Voltage Step`. The update interval can be configured (default `3 minutes`) with `Auto Float Update Interval`.
The adjustment only applies while the `Charging Instruction` is `Float`. When `Float` starts, the `Requested Charge Voltage (CVL)` stays at the bulk voltage and the step-down starts from there, with no drop to the float voltage in between. When a rebulk or `Force Bulk` starts a new `Bulk`, the `Requested Charge Voltage (CVL)` goes straight back to the bulk voltage.
## Auto EOC
![Image](../../images/YamBMS_Auto_EOC.png "YamBMS Auto EOC")
When to use: Your battery would be full early in the day and then be idle for the rest of the day. You want to charge it slowly and have it full at a specified time, for example in the evening.
When to use: Your battery would be full early in the day and then be idle for the rest of the day. You want to charge it slowly and have it full at a specified time, for example in the evening. Or you charge from the grid at night and want the battery full at the end of the cheap tariff, for example at 06:00.
This function allows to set a target time when `Bulk` charging. It limits the `Requested Charge Current (CCL)` so the battery should reach full charge at the specified time. As the algorithm is quite simple there are some requirements for it to work correctly:
This function allows to set a charging window when `Bulk` charging. It limits the `Requested Charge Current (CCL)` so the battery should reach full charge at the target time. As the algorithm is quite simple there are some requirements for it to work correctly:
- The time of the ESPHome device must be correct and available.
- The `Battery Capacity` must be correct.
- The charger/inverter can deliver the `Requested Charge Current (CCL)` over the time frame -> the sun must be shining.
- The charger/inverter can deliver the `Requested Charge Current (CCL)` during the charging window (sun or grid).
There are some configuration options to adjust the behaviour:
- `Automatic EOC Current`: This switch enables or disables the function. When disabled, it will not limit the `Requested Charge Current (CCL)`.
- `Auto EOC Target Hour`: This selects the hour of the desired target time.
- `Auto EOC Start Hour`: This selects the hour at which the charging window starts (default `0`).
- `Auto EOC Start Minute`: This selects the minute at which the charging window starts (default `0`).
- `Auto EOC Target Hour`: This selects the hour of the desired target time (`0` to `23`).
- `Auto EOC Target Minute`: This selects the minute of the desired target time.
- `Auto EOC Correction`: This increases or decreases the `Requested Charge Current (CCL)` and allows for correcting charger/inverter differences, for example if the inverter delivers less current than requested.
- `Auto EOC Capacity Modifier`: This allows to lower the target capacity for the calculation. If your battery `Capacity Remaining` does not reach `Battery Capacity` when 100% full, you can adjust the value here.
- `Auto EOC Increase Stop Hours`: When nearing the target time but the charge current can not be reached, the `Requested Charge Current (CCL)` will increase until it reaches the max. charge current. To avoid this, a time frame bevor the target time can be chosen in which the current will not be increased. E.g. if this option is set to 1 hour, the `Requested Charge Current (CCL)` is 40A and the time is between `Target Hour - 1 hour` and `Target Hour`, it will stay at 40A.
- `Auto EOC Increase Stop SoC`: Similar to `Auto EOC Increase Stop Hours`, this stops increasing the `Requested Charge Current (CCL)` when the `SoC` is equal or above the specified `SoC`.
- `Auto EOC Increase Stop SoC`: Similar to `Auto EOC Increase Stop Hours`, this stops increasing the `Requested Charge Current (CCL)` when the `SoC` is equal or above the specified `SoC`. The maximum value is `98%` because the `Battery SoC` is clamped to `98%` until end-of-charge (this keeps some inverters from stopping charging when the SoC reaches 100%), so a higher threshold could never be reached before end-of-charge and the stop condition would never trigger.
Charging window: the function is active from the start time to the next target time. The window may cross midnight:
| Start | Target | Window |
|---|---|---|
| `0:00` (default) | `18:00` | `0:00` to `18:00`, daylight charging |
| `22:00` | `6:00` | `22:00` to `6:00` the next morning, night charging from the grid |
| `6:00` | `6:00` | Start = target: 24 hours, always active |
Outside the window the `Requested Charge Current (CCL)` is not limited by this function. The times follow the local time of the ESPHome device, including daylight saving time: a `22:00` to `6:00` window lasts 9 hours in the night the clocks go back.
The text sensor `Auto EOC Status` will show the current status of the function:
- `Stop: Disabled`: Function is disabled or capacity not available.
- `Stop: Float`: YamBMS currently in `Float` mode, not `Bulk`.
- `Stop: Time not valid`: The ESPHome device time is not valid.
- `Stop: Target time passed`: The current time is after the selected target time.
- `Wait: Starts at hh:mm`: The current time is outside the charging window (and the grace period does not apply, see below).
- `Stop: Current above limit`: The required charge current is above the current charge limit.
- `Run: Current increase stopped`: Running, but no current increase because of `Auto EOC Increase Stop Hours` or `Auto EOC Increase Stop SoC`.
- `Run`: Working normally.
- `Run: Auto SoC Limit xx%`: Enabled, but reduced the target capacity by the value selected for `Auto SoC Limit`.
- `... (Grace period)`: Appended to a `Run` status when the target time has passed but the grace period is active (see below), e.g. `Run (Grace period)`.
Holding the current: The function never releases the `Requested Charge Current (CCL)` limit to the maximum while it still has a current to hold, as this would let the current spike back up. The last limited current is held instead in two situations:
- Grace period: normally the limit would be released as soon as the target time has passed. Instead, as long as there is a current being held, a one hour grace period applies: the function keeps holding the current at its last value for up to one hour past the target time so a battery that has not quite finished charges gently instead of spiking to the maximum. During this period the status is suffixed with ` (Grace period)`. The grace period ends one hour after the target time, after which the status changes to `Wait: Starts at hh:mm`, or to `Run` if the next charging window has already started. The grace period has priority over a window starting within this hour.
- Target capacity reached: when the battery has reached the target capacity (`Battery Capacity` adjusted by `Auto EOC Capacity Modifier`, and by `Auto SoC Limit` if active) before the target time, the calculated current would drop to `0A` and normally release the limit. Instead the last limited current is held until the charger switches to `Float`. Note that if the `Auto EOC Capacity Modifier` targets a capacity below `100%`, the function considers the battery "done" at that lower capacity.
The sensor `Auto EOC Current` will show the calculated charging current. Note that it is filtered by an EWMA filter with a default 3 minute delay.
That means that changes to the options or parameters are not immediately visible. This avoids that the `Requested Charge Current (CCL)` will fluctuate too much. It will show 0A when the function is disabled/stopped or there is no solution.
@@ -225,7 +496,7 @@ The text sensor `Auto SoC Limit Status` will show the current status of the func
Modes:
- `Float`: Will set the charging mode from `Bulk` to `Float`. If already at `Float`, nothing will happen.
- `CCL`: Limits the `Requested Charge Current (CCL)` to the value set by `Auto SoC Limit CCL`. The limit will be removed once the `SoC` is below `Auto SoC Limit` - `Auto SoC Hysteresis`.
- `CCL`: Limits the `Requested Charge Current (CCL)` to the value set by `Auto SoC Limit CCL`. The limit follows the `Max Charge Current` while it is held, so it stays at `Auto SoC Limit CCL` when a pack rejoins the bank. The limit will be removed once the `SoC` is below `Auto SoC Limit` - `Auto SoC Hysteresis`.
- `Float + CCL`: Will use both previously described methods. However while the `Requested Charge Current (CCL)` will be removed, the charging mode will not be reset to `Bulk`. For this, `Rebulk SoC` is available.
Note: Some inverters may not like `0A` for `Requested Charge Current (CCL)`. `Auto SoC Limit CCL` allows to set a small value to effectively limit the charging process.
@@ -240,6 +511,54 @@ Afterwards the battery is then discharged, however `Requested Charge Current (CC
`Auto SoC Limit` - `Auto SoC Hysteresis` = `80%` - `5%` = `75%`. Without this, the `SoC` would oscillate between
`79%` and `80%`, stressing components unnecessary.
## Auto CCL Current Taper
Optional Auto CCL package (`yambms_auto_ccl_current_taper.yaml`).
**1. Reach Bulk cleanly**
Your inverter may stop short of or overshoot the configured `Bulk voltage`. Current Taper reduces `Requested Charge Current (CCL)` along a knee→bulk curve so the pack reaches bulk more cleanly.
**2. Hold at Bulk for balancing**
At first bulk touch, CCL drops to **Balance Current** (e.g. `2A`–`3A`) and stays there while the session is active, so absorption is not allowed to race to zero and cut the balance window short. Absorption is moved **ahead of** Bulk (the knee→bulk curve) so enough amp-hours remain when Bulk is hit for a low-current balance hold.
The sweet spot is to charge hard enough that the pack is **not yet full** when Bulk is reached, but not so hard that it **never** gets fully charged at Balance Current. That takes some experimentation; a stable curve makes the result more repeatable day to day.
This package participates in the Auto CCL STEP pipeline and writes `var_auto_ccl_current_taper` (its own dedicated CCL slot). From the knee voltage to `Bulk voltage`, CCL is reduced along a curve from a starting C-rate to an ending C-rate (both × `Battery Capacity`). Knee Voltage min/max are set at boot from `cell count × chemistry` (same pattern as `Bulk voltage`); the 16S LFP placeholder default is `54.4V`.
By default the taper is linear with pack voltage. Optional YAML substitution `auto_ccl_ct_curve_exp` (default `1.0`) shapes the knee→bulk curve: `>1` drops faster early then longer tail; `<1` delays the taper then sharpens near bulk. Override at package include — compile-time only, no HA entity.
> [!IMPORTANT]
> Unlike `Auto CCL` (max cell vs BMS `OVP`), Current Taper uses **pack voltage** vs a user knee and YamBMS `Bulk voltage`.
Behaviour:
1. Below **Knee Voltage**: inactive — CCL unchanged (`auto_ccl_current_taper = 0`).
2. At knee (active): CCL follows the curve from **Knee C-Rate** × `Battery Capacity` down to **Bulk C-Rate** × `Battery Capacity`.
3. At first bulk touch, or if EOC occurs earlier: CCL drops to **Balance Current** (default `2A`) and stays there while the session is active.
4. Session ends when pack voltage falls `0.2V` below the knee (hysteresis), then the curve can start again on the next charge.
Configuration options (entities card names):
- **Current Taper**: Enables or disables the function.
- **Knee Voltage**: Pack voltage where tapering starts.
- **Knee C-Rate**: C-rate at the knee; × `Battery Capacity` for the starting CCL.
- **Knee Amps**: Capacity × Knee C-Rate (read-only).
- **Bulk C-Rate**: C-rate at bulk.
- **Bulk Amps**: Capacity × Bulk C-Rate (read-only).
- **Balance Current**: CCL while latched at bulk or after EOC (default `2A`). Keep this above `0.005C × Battery Capacity` (the Cut-Off current deadband) so the classic compensated Cut-Off path stays available; at or below that band, charge completion relies on the *fully charged at rest* signature only.
Other diagnostic sensors:
- `Auto CCL CT Voltage`: Smoothed pack voltage used by the curve. This minimizes how much CCL jumps around with changes in voltage.
- `Auto CCL CT Delta`: Pipeline CCL reduction applied (≤ `0A`).
Notes:
- Requires a correct `Battery Capacity`.
- Writes its own `var_auto_ccl_current_taper` slot.
- Can run alongside other Auto CCL functions; the pipeline takes the most restrictive reduction.
- If you taper toward near zero, you may also need a higher cut-off voltage or a longer cut-off timer to avoid an early `Cut-Off`.
- Pair with `Charger Offset V.` when the inverter undershoots bulk.
## Inverter Heartbeat Monitoring
@@ -249,7 +568,7 @@ This feature allows you to monitor the heartbeat of your inverter (time between
This heartbeat must be regular and depends on the selected `CAN protocol` and the behavior of the inverter. If the heartbeat is not regular this can show a problem on the inverter side or an overloaded ESP32.
The `Deye` inverter sends an ACK `0x305` in response to the reception of a CAN frame `0x356`. Knowing that CAN frames are sent every `100ms` and that the CAN protocol `PYLON 1.2` has 6 CAN frames, the heartbeat of the `Deye` inverter is `600ms`.
The `Deye` inverter sends an ACK `0x305` in response to the reception of a CAN frame `0x356`. Knowing that CAN frames are sent every `100ms` and that the CAN protocol `PYLON V1` has 6 CAN frames, the heartbeat of the `Deye` inverter is `600ms`.
> [!IMPORTANT]
> Every `2h` Deye takes more than `3s` to respond and more than `5s` at midnight.
@@ -261,10 +580,5 @@ The `Deye` inverter sends an ACK `0x305` in response to the reception of a CAN f
Useful information for troubleshooting.
![Image](../../images/YamBMS_Diagnostic.png "YamBMS_Diagnostic")
## YamBMS version
This function lets you know if a new version of YamBMS is available, the check is done every 6 hours.
![Image](../../images/YamBMS_New_version.png "YamBMS_New_version")
![Image](../../images/YamBMS_Diagnostic_1.png "YamBMS_Diagnostic 1")
![Image](../../images/YamBMS_Diagnostic_2.png "YamBMS_Diagnostic 2")
@@ -1,11 +0,0 @@
# YamBMS - JK-PB BMS RS485 Solution
[![Badge License: GPLv3](https://img.shields.io/badge/License-GPLv3-brightgreen.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![Badge Version](https://img.shields.io/github/v/release/Sleeper85/esphome-yambms?include_prereleases&color=yellow&logo=DocuSign&logoColor=white)](https://github.com/Sleeper85/esphome-yambms/releases/latest)
![GitHub stars](https://img.shields.io/github/stars/Sleeper85/esphome-yambms)
![GitHub forks](https://img.shields.io/github/forks/Sleeper85/esphome-yambms)
![GitHub watchers](https://img.shields.io/github/watchers/Sleeper85/esphome-yambms)
## Titre
Each shunt/bms turns into a modbus server with its own address. The max number of BMS per ESP32 (UART/BLE) is 2 but you can use one ESP32 per battery if you want.
+313
View File
@@ -0,0 +1,313 @@
# YamBMS changelog
[![Badge License: GPLv3](https://img.shields.io/badge/License-GPLv3-brightgreen.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![Badge Version](https://img.shields.io/github/v/release/Sleeper85/esphome-yambms?include_prereleases&color=yellow&logo=DocuSign&logoColor=white)](https://github.com/Sleeper85/esphome-yambms/releases/latest)
![GitHub stars](https://img.shields.io/github/stars/Sleeper85/esphome-yambms)
![GitHub forks](https://img.shields.io/github/forks/Sleeper85/esphome-yambms)
![GitHub watchers](https://img.shields.io/github/watchers/Sleeper85/esphome-yambms)
* YamBMS 1.8.2 :
* Set esphome `min_version` to `2026.11.0`
* Updated EG4 LL-V2 component to [v1.1.1](https://github.com/RAR/esphome-eg4-bms/releases/tag/v1.1.1) : it builds on ESPHome 2026.11, which removed `format_hex_pretty()` ; v1.1.0 fails to compile with `'format_hex_pretty' was not declared in this scope`
* Updated EG4 LL-V2 component to [v1.1.4](https://github.com/RAR/esphome-eg4-bms/releases/tag/v1.1.4) : a pack goes offline when either of its two register blocks stops giving valid replies, and that block's sensors go unknown ; before, one good block kept the pack online with the other block's values going stale. The bus now waits `turnaround_time` (50 ms) after a reply before the next request, as a request sent right after another pack's reply was often not answered, and only the reply to the request in flight ends that wait ([RAR/esphome-eg4-bms#9](https://github.com/RAR/esphome-eg4-bms/issues/9))
* EG4 LL-V2 errors bitmask : protection bit 12 "Low Capacity" no longer raises a General alarm ; EG4 packs hold it while full and charging has stopped, so every full charge reported an alarm to the inverter (#342). Discharge over temperature and discharge under temperature protection, which were not mapped, now raise the high and low temperature alarms
* ESPHome 2026.11 requires a `relation` on every sub-device : the BMS, Shunt, Balancer, sniffer, Deye, board, YamBMS and inverter link devices are all declared as `via`, which is how Home Assistant already showed them, so your devices and entities stay as they are
* Waveshare ESP32-S3 Touch-LCD 4.3, 4.3B and 7 : removed the `enable_pin` workaround added in 1.8.1 for `Pin 2 is used in multiple places`, ESPHome 2026.11 now resolves this conflict itself ; the display and the backlight behave as before
* JK RS485 (JK-PB, and recent JK-B using the `JK BMS RS485 Modbus V1.0` protocol) : the sniffer packages temporarily load the [JK RS485 components](https://github.com/Sleeper85/esphome-components/tree/dev) 1.2 from the `dev` branch, until 1.2 is released on `main`. Full list in the [JK RS485 changelog](https://github.com/Sleeper85/esphome-components/blob/dev/documents/README/changelog/Changelog.md). Main fixes :
* JK-B package : toggling the `heating`, `display always on`, `disable temperature sensors` or `smart sleep on` switch **crashed and rebooted the ESP**, which also cut the CAN link to the inverter ; these switches now work, and only the toggled one is written to the BMS
* Numbers are rounded instead of truncated before being written : `3.350 V` was written `3.349 V`
* A BMS that goes offline no longer turns its status and alarm binary sensors `on` (charging, discharging, balancing, heating...) : they become unknown until the BMS answers again
* The `broadcast` mode no longer applies to the `charging` and `discharging` switches; it now applies **only to the BMS settings**. The `Broadcasting BMS settings to all BMS` switch is now `ON` by default.
* Mode 2 : a BMS that stops answering is removed from `network nodes available` and found again when it comes back
* The components build with ESPHome 2026.11 at log level `DEBUG`
* JK RS485 : removed the `precharging` switch and the `operation status` and `battery type` text sensors, which never received a value ; Home Assistant may keep them as unavailable entities, which you can delete
* JK RS485 : the `sniffer_protocol` var is no longer used (JK RS485 1.2 removed `protocol_version`) ; you can remove it from your YAML, keeping it does no harm
* Fixed [issue 344](https://github.com/Sleeper85/esphome-yambms/issues/344) : the `Protection Alarms` were never sent to the inverter while a BMS was offline, only `Warning` ; they are now sent when all **combined** BMS are in alarm, an offline BMS no longer counts. The `Alarm` text sensor follows
* Fixed [issue 345](https://github.com/Sleeper85/esphome-yambms/issues/345) : on CAN frame `0x359` (PYLON V1, PYLON V2, LuxPower), `Charge Over Current` was sent on bit 7 of bytes 1 and 3 instead of bit 0, so the inverter never received it. `UnBalanced Cell` is no longer sent on bit 4 of these bytes : PYLON V2 defines byte 1 bit 4 as an external communication timeout that stops charge and discharge. Cell imbalance is still sent on frame `0x35A`, where Victron reads it ; PYLON V2 marks that field as reserved
* CAN frame `0x35A` (PYLON V2, SMA, Victron) : an alarm or warning that is not active is now sent as `OK` instead of `not supported`. Each field is 2 bits, and `00` was sent when the alarm was off, which the inverter reads as "not supported" ; a frame with no alarm is now `AA AA AA 02 AA AA AA 02`. This only changes how the alarms are displayed by the inverter, not how it charges
* YamBMS 1.8.1 :
* Set esphome `min_version` to `2026.10.0`
* New documentation :
* [Upgrade to YamBMS 1.8.1](documents/README/changelog/Changelog_upgrade_to_YamBMS_1.8.1.md)
* [Telemetry.md](documents/README/Telemetry.md)
* New documentation for contributors :
* [Project_structure.md](documents/README/dev/Project_structure.md)
* [Coding_conventions.md](documents/README/dev/Coding_conventions.md)
* [Design_decisions.md](documents/README/dev/Design_decisions.md)
* Updated HA dashboards `1.8.1` with a markdown card for the new inverter link diagnostics (`Inverter link protocol`, `Inverter battery mode`, `Note`) and a system fault card
* **Breaking change** - New `Inverter brand` select and reworked `Protocol` select : selecting your inverter brand is enough, the protocol follows ; a protocol chosen explicitly still takes priority over the brand. Both selects are renamed, so their stored value is reset : **the inverter link stays inactive until you select your inverter brand**, see [release note](documents/README/changelog/Changelog_Inverter_brand_and_protocol.md)
* Removed the `YamBMS name` select : the manufacturer name sent on CAN frame `0x35E` is now derived from the protocol in use, which is what the `Automatic` mode already did ; the `GOODWE`, `SHEnergy` and `BYD` names are no longer selectable
* **Breaking change** - A package that uses a UART now declares it itself from its `*_uart_id` var : remove the `board_options_itf_uart_*.yaml` includes and the `UART flow control` block from your YAML, otherwise ESPHome reports `Expected integer, but cannot parse ${uart_baud_rate}`. Each UART can only be used by one package : two packages on the same UART report `ID uart_esp_1 redefined`
* Baud rates are set in the `vars:` of the package and keep their names ; packages that had none get `bms_uart_baud_rate`, `sniffer_uart_baud_rate` and `shunt_uart_baud_rate`, with the speed of the device as default
* New `uart_flow_control_pin` var on any package using a native ESP32 UART, which replaces the `board_options_itf_uart_flow_control.yaml` include ; the `_talk_pin` packages stay available for the rare setups that need them but are no longer shown in the examples
* WK2168 channels are now declared the same way : `board_options_itf_wk2168_spi.yaml` or `board_options_itf_wk2168_i2c.yaml` replaces the PVbrain2 files in your YAML, the `uartN_baudrate` substitutions and `uart_hub_bus` are removed (write `uart_spi_3`), and `board_options_itf_modbus_expander.yaml` and `shunt_combine_Victron_SmartShunt_UART_expander.yaml` are removed
* **Breaking change** - A package that uses a CAN bus now declares its node itself : remove the `board_options_itf_canbus_*.yaml` includes from your YAML, otherwise ESPHome fails on the unresolved `${canbus_bit_rate}`, and add `canbus_platform` (`esp32_can` or `mcp2515`) to the `yambms_canbus.yaml` package and to the Deye `top` package. A node declared by the board, or a second link on the same node, uses `canbus_platform: 'external'`
* The CAN bit rate is set with the new `canbus_bitrate` var (default `500kbps`), which replaces `esp32_canbus_bitrate` and `mcp2515_canbus_bitrate`
* RS485 packages reorganised for the additional protocols to come : the file you include changes from `yambms_rs485_pylon.yaml` to `yambms_rs485.yaml`, which now takes a `rs485_protocol` var (`pylon` or `voltronic`) and includes the matching protocol implementation for you ; a node with several RS485 links on different UARTs can run a different protocol on each, one var per link ; `yambms_rs485_pylon_web_server.yaml` becomes `yambms_rs485_web_server.yaml` and includes the entry point itself : use it instead of `yambms_rs485.yaml`, with the same `vars:`, see [release note](documents/README/changelog/Changelog_Inverter_brand_and_protocol.md)
* New diagnostic entities per inverter link : `Inverter link protocol` (what the link is actually doing, e.g. `Solis - CAN SMA`), `Inverter battery mode` (how to configure the battery type on the inverter, keyed on brand *and* protocol so that forcing a protocol never displays a wrong instruction) and `Note` (what is specific to that brand and protocol)
* Renamed CAN protocol `PYLON 1.2` to `PYLON V1` and RS485 protocol `Pylontech` to `PYLON`
* Schneider XW Pro : the extended 29-bit ACK is now handled automatically and the `canbus_extended_ack` substitution is removed - both the 11-bit and the 29-bit ACK are listened to at the same time, which the CAN component supports natively
* A link whose protocol is set to `Disabled` no longer lights the fault LED : it is unregistered from the fault registry (state that the master mask and the health report both ignore) instead of being reported as failing, since it is a deliberate choice and not a communication loss ; a link left unconfigured still faults, on purpose
* Changing the inverter brand or protocol now restarts the CAN frames immediately instead of waiting for the next 30s retry tick, so the link comes up as soon as the selection is made
* Fixed the RS485 link staying up with `Disabled` : the proxy sensors kept their last value, so the Pylontech component went on answering the inverter with stale data and kept reporting its status as ON ; the sensors it checks are now invalidated when the protocol is off, which makes it stop answering and report the link as down
* Fixed the CAN bus not stopping when the protocol was set to `Disabled` at runtime : the frame index kept its previous value and the last frame was re-emitted every 100 ms
* Fixed the reported communication bus and protocol being overwritten when a node declares several inverter links : each link now owns its slot, and the telemetry reports every link instead of the last one
* Auto EOC : new `Auto EOC Start Hour` / `Auto EOC Start Minute` define the charging window, which may cross midnight, and the target hour can be set from `0` to `23` (night charging from the grid) ; outside the window the status is `Wait: Starts at hh:mm` instead of `Stop: Target time passed`, the default start `0:00` keeps the daylight behaviour
* `Daily Charging Energy` / `Daily Discharging Energy` (YamBMS and BMS) rounded to 10 Wh (`0.01 kWh`) instead of 1 Wh, to reduce the number of state changes recorded by Home Assistant
* Fixed YamBMS `Daily Charging Energy` / `Daily Discharging Energy` jumping after a long period in the opposite direction : the unused power sensor was published as unknown, which ESPHome skips without advancing its time base, so the next reading was multiplied by the whole gap ; `Battery Charging Power` / `Battery Discharging Power` now publish `0 W` on the unused side, as the shunt already did, and also when no BMS is combined
* The `Update service` switch is removed : the version check and the telemetry are now enabled separately with the `yambms_update_service` and `yambms_telemetry_service` substitutions (both `'true'` by default), see [Telemetry](documents/README/Telemetry.md)
* Telemetry no longer sends the MAC address but a salted SHA-256 hash of it, shown in the new `Node ID hash` diagnostic entity so that you can quote it for support ; the uptime is now sent in seconds
* The update and telemetry requests now go to `script.yambms.org`
* Fixed `Uptime` sometimes showing `24855d 3h 14m 7s` after boot, on the dashboard, the LVGL display and in the telemetry : the text sensor could format the uptime before it had a value, it is now published by its source
* Fixed `charging cycles` and `total charging cycle capacity` published as `0` after a reboot until the first BMS frame, which also landed in the Home Assistant long-term statistics : both are now unavailable during that time
* Auto CCL : the max cell voltage used by the curve is now smoothed with a time-based moving average (`auto_ccl_max_cell_v_tau`, default `30`s, `0` disables), which stops the requested CCL swinging between about 8 A and 45 A near the top of charge ; a reading more than `auto_ccl_max_cell_v_guard` (default `5` mV) above the average still cuts the current at once
* Auto CCL : new `auto_ccl_min_current` (default `1` A), Auto CCL never requests less, including above the end of its curve ; other limits can still request 0 A
* A BMS reporting a charge (CCL) or discharge (DCL) limit of `0 A` now stays combined : a full battery at 0 A CCL, or an empty one at 0 A DCL, no longer drops out of the capacity, SoC and totals ; this applies to all BMS models, a limit not received yet still keeps the BMS uncombined
* Deye CAN : the battery power sensors now follow `bms_update_interval` instead of updating every 60s
* Fixed sensors `device_class` / `state_class` that Home Assistant reported or handled wrongly : power sensors in W declared as `current` (BASEN RS485, DEYE CAN module), Ah sensors carrying a class that does not accept Ah (BASEN RS485, DEYE CAN, JK RS485 Display, Modbus client), DEYE battery capacity moved from `total_increasing` to `measurement`
* Fixed PACE BMS compilation with ESPHome 2026.9 / 2026.10
* Fixed the Waveshare ESP32-S3 Touch-LCD 4.3, 4.3B and 7 boards failing validation on ESPHome 2026.10 with `Pin 2 is used in multiple places` ; the backlight stays under control of the LVGL designs
* New board `board_ESP32-P4_Elecrow-CrowPanel-Advanced-7-10.yaml` (CrowPanel Advanced ESP32-P4) and new Blue Navy 1024x600 HA display design
* Fixed [issue 332](https://github.com/Sleeper85/esphome-yambms/issues/332) YamBMS_RP_BMS_PACE_RS485_Modbus.yaml no longer compiles under esphome 2026-9-1
* Fixed [issue 335](https://github.com/Sleeper85/esphome-yambms/issues/335) PACE / DEYE packages: compile errors on ESPHome 2026.9–2026.10 + Deye power updated only every 60 s + full Deye excluded from combine
* Merged [PR 322](https://github.com/Sleeper85/esphome-yambms/pull/322) Add CrowPanel Advanced (ESP32-P4) board and Blue Navy 1024x600 HA display
* Merged [PR 329](https://github.com/Sleeper85/esphome-yambms/pull/329) Auto CCL smooths max cell voltage
* Merged [PR 331](https://github.com/Sleeper85/esphome-yambms/pull/331) Fix sensor device_class and state_class
* Merged [PR 336](https://github.com/Sleeper85/esphome-yambms/pull/336) Fix hub daily energy by publishing 0 W on the unused charge/discharge sign
* Merged [PR 337](https://github.com/Sleeper85/esphome-yambms/pull/337) Improve Deye support
* Merged [PR 338](https://github.com/Sleeper85/esphome-yambms/pull/338) Auto EOC 24h charging window
* Merged [PR 339](https://github.com/Sleeper85/esphome-yambms/pull/339) Round daily energy sensors to 10 Wh
* YamBMS 1.8.0 :
* Set esphome `min_version` to `2026.8.0`
* New documentation :
* [Charging_a_battery_with_CVL_and_CCL.md](documents/README/Charging_a_battery_with_CVL_and_CCL.md)
* [Understanding_ESPHome_Modbus.md](documents/README/Understanding_ESPHome_Modbus.md)
* [How_to_perform_a_PR_to_the_dev_branch.md](documents/README/How_to_perform_a_PR_to_the_dev_branch.md)
* [HA_entities_cleanup.md](documents/README/HA_entities_cleanup.md)
* Updated HA dashboards `1.8.0` for the new Cut-Off Cell Voltage, Charger Offset V., C-Rate and Auto CCL Current Taper entities
* Rewritten Cut-Off / EOC charging logic : adds a current deadband (rejects sensor noise / low-solar current limiting) and a minimum SoC gate before Cut-Off can be declared, extends the cut-off confirmation delay from 60s to 180s to reject transient voltage readings, see [release note](documents/README/changelog/Changelog_YamBMS_1.8.0_Cut-Off_charging_logic.md)
* New select `Cut-Off Cell Voltage` : choose between `Max Cell Voltage` (default, conservative) and `Average Cell Voltage` (consistent charge termination voltage for packs with a runner cell, requires Auto CVL and/or Auto CCL for cell protection)
* New sliders `Max charge C-Rate` / `Max discharge C-Rate` : the max charge/discharge current is now the lowest of the user slider, the BMS OCP safety margin, and battery capacity × C-Rate
* Renamed `Inverter Offset V.` to `Charger Offset V.` and allowed negative values (-1V to +1V)
* `Requested Charge Voltage (CVL)` calculation reworked : it is now built as a per-phase base target (`Bulk` → bulk voltage, `Float` → float voltage, `Stop` → nominal voltage) plus a common set of offsets (`Charger Offset V.`, `Auto CVL`, `Auto Float` and the new `Auto Custom CVL`, each `0` when its function is idle or disabled), instead of one hardcoded formula per phase ; `Stop` charging voltage target changed from `Rebulk V.` to nominal voltage, so the pack no longer sits on the very threshold that decides when to rebulk.
* Auto CVL : rewritten from a per-second template sensor to an interval lambda, now exposed as two sensors (`Auto CVL` value + `Auto CVL Delta`) instead of one internal-only sensor ; it remains a `Bulk`-only correction, the `Float`/`Stop` slot of the new formula being left free for a future implementation
* Auto Float : rewritten from a per-minute template sensor to an interval lambda, now exposed as two sensors (`Auto Float Voltage` value + `Auto Float Voltage Delta`) ; no behavior change
* Auto EOC : new 1-hour grace period holding the last computed current after target time passes (instead of releasing to maximum current), smoothed remaining-capacity estimate between BMS 1% SoC steps to remove current sawtoothing, `Stop SoC` slider capped at 98% (100% could never trigger because SoC is clamped to 98% until end-of-charge)
* New `Auto CCL Current Taper` function : tapers CCL from a configurable knee voltage/C-Rate down to a bulk C-Rate, then holds a configurable balance current while at bulk or after EOC ; release hysteresis and Balance Current max are now scaled to cell count/battery capacity instead of flat constants, and a NaN guard prevents a spurious taper during the boot transient, see [changelog](documents/README/changelog/Changelog_Auto_CCL_Current_Taper_1.1.2.md)
* Fixed HA dashboards : `Auto CCL Current Taper` card's switch pointed to a non-existent entity id and never toggled
* New substitutions `custom_ccl_derating_reason` / `custom_dcl_derating_reason` allowing a custom current-limiting source (e.g. added via `yambms_custom.yaml`) to report itself in the CCL/DCL derating reason sensor, and a similar `Auto Custom CVL` slot for voltage
* Reworked Modbus timing options : `send_wait_time` is now a response timeout (default lowered from 2000ms to 200ms) and a new `turnaround_time` option was added; shared multi-node settings (`yambms_config.yaml`) updated accordingly
* Improved PACE BMS Modbus : power is now computed from current × voltage instead of a raw register (fixes incorrect readings), improved offline detection
* Sensors (Total Voltage, Current, Power, SoC, Requested CVL/DVL/CCL/DCL, etc.) now publish as unavailable (`NaN`) instead of `0` when no BMS is combined
* Fixed `Installed Battery Capacity` frozen until reboot : the value was summed once per BMS at boot, so a BMS whose capacity was reconfigured at runtime kept contributing its old value ; each BMS now applies only the difference to the total, which still never shrinks when a BMS goes offline
* Multi-inverter / multi-charger support : the requested CCL/DCL is now divided by the number of declared CAN/RS485 inverter interfaces, so several identical inverters/chargers sharing the same battery bank each receive their share of the limit instead of every unit requesting the full value, see [documentation](documents/README/YamBMS_functions.md#multi-inverter--multi-charger)
* New `Combiner Stall` diagnostic sensor : reports which BMS or Shunt id the combiner pipeline is stuck on when `bms_id`/`shunt_id` numbering has a gap, instead of stalling silently with no combined values; added the new `Combiner Stall` diagnostic row in dashboard
* New `Fake Equalizing` : BMS that balance their cells but never report a balancing flag had it hardcoded to `false`, so the Cut-Off timer ended the charge while the pack was still equalizing ; YamBMS now infers it, with no constant of its own - the voltage reference is the per-cell bulk setpoint (`bulk voltage / cell count`, so it follows the chemistry) and the spread reference is `bms_balance_trigger_voltage`, the threshold at which the pack's own balancer engages, which is 10 mV on a JK or a Seplos and 30 mV on an EG4, a pack reporting none at all simply never starting ; an external balancer keeps priority whenever one is online ; enabled by default for Seplos V3, Seplos V1/V2, EG4 LL v2 and JK RS485 DISPLAY, available for any other BMS, idea by [@haysdb](https://github.com/haysdb), see [changelog](documents/README/changelog/Changelog_Fake_Equalizing.md)
* `bms_balance_trigger_voltage` is now a var on EG4 LL v2 and JK RS485 DISPLAY, which hardcoded it : declare your unit's actual balancing threshold at import, as Seplos already required. EG4 keeps `0.030` as its default, JK RS485 DISPLAY moves from `0.005` to `0.010` to match the JK factory default - note that this value also feeds 'Auto CVL'
* Updated EG4 LL-V2 component to [v1.1.0](https://github.com/RAR/esphome-eg4-bms/releases/tag/v1.1.0) : fixes [issue 7](https://github.com/RAR/esphome-eg4-bms/issues/7), some EG4 LL-V2 units intermittently answer with a CRC-valid response whose register data is entirely zero, which was published as a real reading and collapsed SoC / voltage / capacity for one poll cycle ; those blocks are now rejected and no longer refresh the online tracker
* PVbrain2 board split into two DevKitC-1 variants to follow the RGB LED / CAN TX pin swap between board revisions : `board_ESP32-S3_DevKitC-1_PVbrain2_LED-48.yaml` (DevKitC-1 V1.0, LED on GPIO 48 and CAN TX on 38) and `board_ESP32-S3_DevKitC-1_PVbrain2_LED-38.yaml` (V1.1, LED on GPIO 38 and CAN TX on 48), both including the common `board_ESP32-S3_DevKitC-1_PVbrain2.yaml` : include the one matching your board revision
* New `loop_task_stack_size` option (8192/16384/32768) available on every board, to prevent stack overflow with a large number of BMS/entities, see [documentation](documents/README/LOOP_TASK_STACK.md)
* Updated default PSRAM options for ESP-IDF 5.5+, see [documentation](documents/README/PSRAM_options.md)
* Fixed incorrect Max/Min Cell Voltage scaling (×100 instead of ×1000) sent on the CAN bus for the Deye PCS protocol
* `secrets.yaml` template renamed to `secrets_example.yaml` (copy it to your own gitignored `secrets.yaml`, as documented in Installation_procedure.md)
* Fixed a reboot every 6h on networks that filter the ESP32 outbound traffic (port 80 or DNS blocked) : the update and telemetry requests blocked the device long enough to trigger the watchdog ; requests now time out after 3s, the first one waits 5min after boot, and the services stop until the next reboot after 3 failed attempts
* Added `KS BMS` BLE support, fixed [issue 151](https://github.com/Sleeper85/esphome-yambms/issues/151) [ADD] Requesting KS BMS support
* JK BLE : BMS alarms are now taken into account through the new `errors_bitmask_hex` of the JK BLE component, instead of always reporting no alarm
* Web server authentication switched to `digest`
* Fixed the `brightness not supported` warning logged on every status LED change on boards with a single-colour LED ; `rgb_order` replaced by `channel_colors` in the board files (deprecated by ESPHome, removed in 2027.3.0), to report in your own board file if you have one
* CAN frame logs moved from `INFO` to `DEBUG` level
* Merged [PR 308](https://github.com/Sleeper85/esphome-yambms/pull/308) Check if Auto SoC Limit has reached its target
* Merged [PR 303](https://github.com/Sleeper85/esphome-yambms/pull/303) Auto CCL Current Taper
* Merged [PR 290](https://github.com/Sleeper85/esphome-yambms/pull/290) Add grace period to Auto EOC
* YamBMS 1.7.0 :
* Partial rewrite of `yambms_core` and merging of C++ code into a single lambda in several stages with increased datas control.
* Added LVGL display dashboard for Waveshare Touch-LCD 4.3" and 7" (Blue Navy 800x480 design)
* Fixed [issue 10](https://github.com/Sleeper85/esphome-yambms/issues/10) Sending CAN bus data before the end of the combination process
* Fixed [issue 154](https://github.com/Sleeper85/esphome-yambms/issues/154) Add `Enerkey Balancers` balance stop diff voltage setting (register 0x1A)
* Fixed [issue 160](https://github.com/Sleeper85/esphome-yambms/issues/160) The SOH sensor is interpreted as a battery percentage
* Fixed [issue 182](https://github.com/Sleeper85/esphome-yambms/issues/182) Compliance of Auto functions for YamBMS 1.7.0
* Fixed [issue 268](https://github.com/Sleeper85/esphome-yambms/issues/268) [Add an option] The inverter is not sending ACK CAN ID 0x305
* Fixed [issue 282](https://github.com/Sleeper85/esphome-yambms/issues/282) JK errors_bitmask has been removed
* Merged [PR 281](https://github.com/Sleeper85/esphome-yambms/pull/281) Add WS Touch-LCD-4.3B board
* Merged [PR 261](https://github.com/Sleeper85/esphome-yambms/pull/261) Add LilyGo T-Connect Pro Lite board (without screen)
* Merged [PR 259](https://github.com/Sleeper85/esphome-yambms/pull/259) Add support for Rebulk Days
* Merged [PR 258](https://github.com/Sleeper85/esphome-yambms/pull/258) Auto EOC: Factor in Auto SoC Limit for battery capacity calculation
* Merged [PR 255](https://github.com/Sleeper85/esphome-yambms/pull/255) Add support for Auto SoC Limit
* Merged [PR 236](https://github.com/Sleeper85/esphome-yambms/pull/236) Switch to VictronMPPT-ESPHOME fork
* Merged [PR 235](https://github.com/Sleeper85/esphome-yambms/pull/235) Basen: Add "Enable communication" switch
* Merged [PR 200](https://github.com/Sleeper85/esphome-yambms/pull/200) Add M5Stack Tab5 with LVGL display
* Merged [PR 199](https://github.com/Sleeper85/esphome-yambms/pull/199) Add Ecoworthy BMS integration for YamBMS
* Merged [PR 194](https://github.com/Sleeper85/esphome-yambms/pull/194) Component Fault Registry & Advanced LED Control
* Merged [PR 178](https://github.com/Sleeper85/esphome-yambms/pull/178) Basen BMS: Add heating control
* Merged [PR 170](https://github.com/Sleeper85/esphome-yambms/pull/170) Add Freenove S3 board
* Merged [PR 162](https://github.com/Sleeper85/esphome-yambms/pull/162) PACE Sensor Fixes
* Merged [PR 158](https://github.com/Sleeper85/esphome-yambms/pull/158) Automatically disable shunt when connected BMSs are going offline
* YamBMS 1.6.0 :
* New dashboards `1.6.0`
* Added `iBMS V3.3` board
* Updated `JK-PB` readme with **V19** warning and SoC 100% reset solution 1 and 2
* Added board option `UART flow control` allows you to activate a `talk_pin` for the UART of your choice (e.g. WS-RS485-CAN)
* Added AtomS3 GPIOs for `Atomic RS485 base` (uart_esp_3)
* Disabled the `reboot_timeout` after 15 minutes in case of WiFi unavailability
* New `Hardware highlighted` documentation (LilyGo / Waveshare / M5Stack)
* New readme for **LilyGo T-Connect, WS RS485-CAN and M5Stack AtomS3** boards
* Improved documentation.
* Fixed [issue 83](https://github.com/Sleeper85/esphome-yambms/issues/83) Add esphome-pace-bms
* Fixed [issue 94](https://github.com/Sleeper85/esphome-yambms/issues/94) Multi-BMS Seplos V3 don't work
* Fixed [issue 96](https://github.com/Sleeper85/esphome-yambms/issues/96) Improve the SoC returned at the end of discharge
* Fixed [issue 100](https://github.com/Sleeper85/esphome-yambms/issues/100) Improve the BMS Seplos V1 V2 examples
* Fixed [issue 102](https://github.com/Sleeper85/esphome-yambms/issues/102) Improve Remaining Capacity when using a shunt
* Added [issue 106](https://github.com/Sleeper85/esphome-yambms/issues/106) [FEATURE REQUEST] Temperature-based current limiting
* Fixed [issue 108](https://github.com/Sleeper85/esphome-yambms/issues/108) [WARNING] esphome::select::Select::state` is deprecated
* Fixed [issue 122](https://github.com/Sleeper85/esphome-yambms/issues/122) Adjust `bms_name` in all example YAML to something unique
* Fixed [issue 128](https://github.com/Sleeper85/esphome-yambms/issues/128) Align the names of the shunt entities
* Fixed [issue 142](https://github.com/Sleeper85/esphome-yambms/issues/142) Maximum capacity needs to be increased for `JK_RS485` BMS
* Merged [PR 76](https://github.com/Sleeper85/esphome-yambms/pull/76) Add `Auto EOC` function
* Merged [PR 82](https://github.com/Sleeper85/esphome-yambms/pull/82) Add support for external balancer
* Merged [PR 85](https://github.com/Sleeper85/esphome-yambms/pull/85) Adding `EG4 LLV2` BMS
* Merged [PR 97](https://github.com/Sleeper85/esphome-yambms/pull/97) Add `Basen controller` version with talk/flow control pin
* Merged [PR 99](https://github.com/Sleeper85/esphome-yambms/pull/99) Basen: Use new binary sensors for charging/discharging
* Merged [PR 112](https://github.com/Sleeper85/esphome-yambms/pull/112) Adding `FLIP_C3` board
* Merged [PR 117](https://github.com/Sleeper85/esphome-yambms/pull/117) Round requested charge/discharge current to nearest integer
* Change [PR 119](https://github.com/Sleeper85/esphome-yambms/pull/119) Updated `Power` gauge (-10kW to 10kW)
* Merged [PR 133](https://github.com/Sleeper85/esphome-yambms/pull/133) Add `Studer XTM-4000` to supported inverters
* Merged [PR 142](https://github.com/Sleeper85/esphome-yambms/pull/142) Sub device support
* Merged [PR 143](https://github.com/Sleeper85/esphome-yambms/pull/143) Improved `Cut-Off charging` logic equation and documentation
* Merged [PR 147](https://github.com/Sleeper85/esphome-yambms/pull/147) Improved `CCL`, `DCL` and `Temp-based` current control
* Merged [PR 155](https://github.com/Sleeper85/esphome-yambms/pull/155) Update temperature sensor filters to reduce noise
* YamBMS 1.5.8 :
* New Dashboards `1.5.8` compatible with `CANBUS` and `RS485` inverter communication protocol
* Added BMS `SEPLOS V3` (beta)
* Added YamBMS `Web Server v3`
* Added `WiFi AP`
* `WiFi AP` and `Web Server` credentials centralized in `secrets.yaml`
* Added `WT32-ETH01` board
* Fixed [issue 8](https://github.com/Sleeper85/esphome-yambms/issues/8) ETH01-EVO board - Davicom DM9051 SPI Ethernet Controller is now integrated in esphome `2025.7`
* Fixed [issue 24](https://github.com/Sleeper85/esphome-yambms/issues/24) [JK-PB] SoC never reaches 100%
* Fixed [issue 63](https://github.com/Sleeper85/esphome-yambms/issues/63) [JK RS485 component] Fix *.*_SCHEMA deprecations
* Merged [PR 67](https://github.com/Sleeper85/esphome-yambms/pull/67) Add options to restrict max. charge and discharge current
* Merged [PR 72](https://github.com/Sleeper85/esphome-yambms/pull/72) Add Pylontech RS485 inverter protocol
* Merged [PR 74](https://github.com/Sleeper85/esphome-yambms/pull/74) `PYLON RS485` link status, Heartbeat and Requested Force Charge
* Merged [PR 75](https://github.com/Sleeper85/esphome-yambms/pull/75) Round `Auto CCL` / `Auto DCL` values
* Merged [PR 77](https://github.com/Sleeper85/esphome-yambms/pull/77) `PYLON RS485` prevent stale data on BMS disconnect
* Merged [PR 80](https://github.com/Sleeper85/esphome-yambms/pull/80) BMS Modbus client: Return 0 when not online
* Merged [PR 81](https://github.com/Sleeper85/esphome-yambms/pull/81) Fix balance trigger voltage for Basen and Deye
* YamBMS 1.5.7 :
* Adapted the default `min/max` values ​​for the `Float` slider
* Merged [PR 53](https://github.com/Sleeper85/esphome-yambms/pull/53) Add feature `Auto Float Voltage`
* New dashboard for `Auto Float Voltage` function
* Defining `state_class` for all YamBMS sensors
* Set esphome `min_version` to `2025.6.0`
* Fixed: change `Charge Status` to `Bulk` when `Force Charge` is requested
* Merged [PR 70](https://github.com/Sleeper85/esphome-yambms/pull/70) Dashboards compatible with `HA 2025.7`
* Merged [PR 70](https://github.com/Sleeper85/esphome-yambms/pull/71) Dashboard `max/min` cell voltage in color using macro
* Removed all special characters in entities name + dashboards correction
* YamBMS 1.5.6 :
* Fixed [issue 58](https://github.com/Sleeper85/esphome-yambms/issues/58) Compilation problem with `esphome 2025.5.0`
* Fixed [issue 55](https://github.com/Sleeper85/esphome-yambms/issues/55) New CPU frequency option
* Fixed [issue 65](https://github.com/Sleeper85/esphome-yambms/issues/65) JBD Circular dependency error
* Fixed [issue 35](https://github.com/Sleeper85/esphome-yambms/issues/35) BMS Charging Cycles Offset
* Merged [PR 51](https://github.com/Sleeper85/esphome-yambms/pull/51) Support for RP2040 RPi Pico
* Merged [PR 56](https://github.com/Sleeper85/esphome-yambms/pull/56) Add support for Basengreen BMS
* Merged [PR 60](https://github.com/Sleeper85/esphome-yambms/pull/60) Fixes for new ESPHome and add of BMS Cycle Count offset
* Merged [PR 61](https://github.com/Sleeper85/esphome-yambms/pull/61) Set Modbus BMS values to 0 when BMS goes offline
* New `board_ESP32-S3_Touch-LCD-4.3.yaml` board
* New `board_ESP32-S3_Touch-LCD-7.yaml` board
* New `board_ESP32-S3_YBoard_DJK.yaml` board
* New `board_RP2040_RPi_Pico.yaml` board
* YamBMS 1.5.5 :
* New `main.yaml` with LP (local packages) and RP (remote packages) versions
* New `board.yaml` with modular UART/CAN interfaces
* The name of the JK `bms.yaml` is no longer linked to a specific model
* SoC calculation is now based on remaining capacity for more accuracy (BMS only) [issues #39](https://github.com/Sleeper85/esphome-yambms/issues/39)
* SoH calculation is moved to BMS level (for those who do not provide this information)
* Improvement of the Victron SmartShunt doc [issues #38](https://github.com/Sleeper85/esphome-yambms/issues/38)
* YamBMS 1.5.4 :
* New low SoC corrected at each BMS level (the corrected SoC is the one transmitted to YamBMS)
* New BMS dashboard
* New end of charge logic at each BMS level, the charge switch turns off when the cells are equalized (disabled by default)
* Fixed `errors_bitamsk` for JK-PB RS485, test OK with YamBMS (forked component)
* YamBMS 1.5.3 :
* Broadcasting JK-PB settings to all BMS set to OFF by default
* Reorganizing the `board` folder and YAMLs (device_base.yaml moved to board.yaml)
* `device_base.yaml` should no longer be part of `YamBMS_main.yaml`
* New `RGB LED status` light effects (red, green, blue, cyan) as an `options` packages for `board.yaml`
* Increased CPU frequency to `240Mhz` as an `options` packages for `board.yaml`
* Added `ESP32 Generic`, `LilyGo T-CAN485`, `LilyGo T-Connect` and `XIAO` boards
* Fixed SoC logic (low SoC will be detected at BMS level and no longer at YamBMS level)
* Simplified combination logic (removal of the combine switch) + dashboard update
* Check `Battery Capacity` is `> 0` before combining info (see [issue #14](https://github.com/Sleeper85/esphome-yambms/issues/14))
* Improved alarm logic with a common `YamBMS errors bitmask` for all BMS models (see OTP vs UTP bug reported by @ChrisG)
* Added [PR #7547](https://github.com/esphome/esphome/pull/7547) regarding publishing entities via the API
* Removed `captive_portal` because it increases the `loop time` too much
* `PSRAM` will no longer be enabled by default as this has a bad impact on `BLE BMS`
* YamBMS 1.5.2 :
* Added shunt `Online Status` binary_sensor
* Shunt combine condition based on the new binary_sensor `Online Status`
* Logger `baud_rate: 0` by default (frees the 3rd UART and avoids some bugs like "WK2168 with canbus" or "BLE client with RS485 modbus")
* Changed names of `bms` and `shunt` YAMLs for modbus `multi-node` solution
* Added shared configuration file to simplify main YAML (centralization of parameters)
* Simplification (fewer options) when importing `BMS / Shunt` YAMLs
* New `multi-node` solution using `RS485 modbus` to communicate information to YamBMS
* New board `espBerry` with `2-CH-CAN HAT`
* YamBMS 1.5.1 :
* The conditions for `combining` BMS and the `charging` and `discharging` instructions no longer have any relation with the `errors_bitmask` sensor, the new system relies on the three **binary_sensor** `online status`, `charging allowed` and `discharging allowed` being linked to the status of alarms and switches.
* The BMS combination procedure has been completely rewritten.
* Improved structure and ID names of `bms.yaml`.
* The `yambms.yaml` and `yambms_combine.yaml` global variable names have been changed for better code reading.
* Improved code regarding the CAN bus `esp_light` status for boards without integrated LED.
* New `Atom S3R` board and `Smartshunt BLE` shunt.
* New `JBD`, `Seplos V1 V2`, `JK-B RS485` (display port) and `FAKE` BMS.
* New `YamBMS DEMO` YAML and firmware offered to test and discover how `YamBMS` works.
* New management of temperature sensors (no longer limited to two sensors).
* **@Der_Hannes** fixed the AtomS3 `black screen` issue (with **esphome > 2024.7.3**) and developed new code for display management based on the [ili9xxx](https://esphome.io/components/display/ili9xxx.html) platform.
* `Auto CCL/DCL` functions have been fixed to work with `JK-PB` and `new JK-B` BMS, [see this issue](https://github.com/Sleeper85/esphome-yambms/issues/11).
* The `UVPR` and `OVPR` sensors are no longer used and replaced by `UVP` and `OVP` to ensure operation with all BMS.
* **@txubelaxu** fixed a bug in the `JK-PB RS485` component that could cause a false battery voltage value to be sent, [see this issue](https://github.com/Sleeper85/esphome-yambms/issues/10).
* Improved documentation, added a `HowTo` to create its main YAML, warning about galvanic isolation.
* CANBUS 2.3.7 : If there is no response from the inverter, the time before a new communication test has been reduced from `120s` to `60s`, added Victron `0x372` nbr. of modules `blocking charge/discharge`.
* YamBMS 1.4.5 : Changed the way to configure WiFi/Ethernet network, added `ESP32-C3 ETH01-EVO` ethernet board, reduction of the number of YAML bms files, UART `rx_buffer_size` is set to `512` by default for JK-B and JK-PB, new JK-BMS BLE sensors (last commits of @syssi) and new BLE `standard` version
* CANBUS 2.3.6 : Sending CAN frames stops immediately if there are no combined BMS
* YamBMS 1.4.4 : Multi-shunt support, Simplified and new YamBMS option `battery chemistry`, slider `min/max` values ​​are automatically configured based on the battery chemistry and cell count, added `YamBMS Fallback Hotspot`, added YamBMS `Update service`, added PVbrain2 and Atom Matrix board, added PSRAM settings YAML (not enabled by default), new MIN/MAX temperature sensor, added DC current icon, fixed dual sensor `Cell UVPR (MAX)` bug, Improved `combine` code, Breaking change : Atom S3 `GPIOs 1 and 2` reversed
* CANBUS 2.3.5 : New MIN/MAX temperature / sensor ID, Improved Victron protocol (online/offline battery modules, installed/available battery capacity)
* CANBUS 2.3.4 : Fixed bug of canbus link validation without inverter connected
* YamBMS 1.4.3 : Added Victron and Junctek KH-F `Shunt` support and `Requested Force Charge` function based on `SoC start/stop`, new `Total Daily Energy` sensors
* CANBUS 2.3.3 : Added `Automatic` BMS name selection and `Requested Force Charge` Bit 3/4/5 (PYLON 0x35C)
* CANBUS 2.3.2 : Added `LuxPower` protocol with updated `can_id` 0x355, 0x356, 0x359 and 0x35C
* CANBUS 2.3.1 : Improved the procedure for sending canbus frames with reduced loop time, rewritten of the canbus link validation code and added `Inverter Heartbeat Monitoring` function
* YamBMS 1.4.2 : Added new `Auto CVL Boost V.` and `Rebulk SoC` functions, new debug.yaml for ESP32 and ESP32-S3, improved code and comments
* YamBMS 1.4.1 : Rewriting of the alarm system, bug fixes and improvement of the charging logic (new status `Cut-Off`), icon allocation for each sensor, UART and CANBUS `!extend ${vars}`, New sensor `YamBMS Delta Cell V.`, Improved `Battery SOC` logic
* YamBMS 1.3.2 : New var `yambms_cell_count`, the BMS charge or discharge switches can be activated separately without causing the decombination of the BMS, new `minimal` version of the BMS YAML in order to reduce the loop time
* YamBMS 1.3.1 : First multi-BMS version named `YamBMS`
@@ -0,0 +1,121 @@
# YamBMS - Changelog about new Auto CCL Current Taper (1.1.1 → 1.1.2)
[![Badge License: GPLv3](https://img.shields.io/badge/License-GPLv3-brightgreen.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![Badge Version](https://img.shields.io/github/v/release/Sleeper85/esphome-yambms?include_prereleases&color=yellow&logo=DocuSign&logoColor=white)](https://github.com/Sleeper85/esphome-yambms/releases/latest)
![GitHub stars](https://img.shields.io/github/stars/Sleeper85/esphome-yambms)
![GitHub forks](https://img.shields.io/github/forks/Sleeper85/esphome-yambms)
![GitHub watchers](https://img.shields.io/github/watchers/Sleeper85/esphome-yambms)
`packages/yambms/yambms_auto_ccl_current_taper.yaml`
Changes applied after the code audit. None of them alter the taper curve itself or the
Cut-Off logic in `yambms_core.yaml`; they address pipeline contract, portability,
numerical robustness and configuration traps.
---
## 1. Pipeline contract — reset moved to the core
**Change:** the package no longer clears the pipeline variable in its early-exit branches.
`Gate #1` ("not our pipeline turn") is now a bare `return;` instead of a conditional
cleanup block.
**Why:** `yambms_core.yaml` now resets `var_auto_ccl_current_taper` at the start of every
Auto CCL cycle (before restarting the pipeline at step 1). Ownership of the variable
belongs to the core, which counts the functions, consumes the values and drives the step
counter. A contributor function has no reliable way to know whether it is the only writer
or whether the pipeline stalled — it can only clean up its own case.
**Resulting contract**, now documented in the file header: *a contributor function writes
its value on its own turn; staying silent (disabled, gated out, not its turn) is
equivalent to writing 0.* New contributed functions inherit the correct behavior without
defensive code.
> Note: the audit recommended the opposite — adding the variable write to Gates #2/#3.
> That was rejected in favour of the core-side reset.
**Core-side counterpart (`yambms_core.yaml`, block "Requested Charge Current (CCL)").** The
reset is placed after the sensor is published and before `var_charge_current_step = 1`, so
each cycle starts from a clean slate. All six variables of the `std::min` are reset
(`var_auto_temperature_ccl`, `var_auto_ccl`, `var_auto_ccl_current_taper`,
`var_auto_soc_limit`, `var_auto_eoc`, `var_auto_custom_ccl`): none of them is written by an
always-executed internal core block — the only write sites in the core are the reset lines
themselves, so they all originate from optional external packages. The globals are `float`,
`restore_value: no`, `initial_value: 0.0`, which is consistent with the reset at startup.
## 2. NaN guard on the inputs
**Change:** added before `Gate #3`:
```cpp
if (isnan(V_knee) || isnan(V_bulk) || isnan(V_pack)) { … }
```
**Why:** any comparison against NaN evaluates to false, so `Gate #3`
(`V_knee >= V_bulk - V_hyst`) does **not** block when `bulk_voltage` is still NaN — the
transient window before the `number` is restored at boot. Execution continued into the
`p = (V_pack - V_knee) / (V_bulk - V_knee)` division, and the only safety net was the
IEEE-754 behaviour of `fminf(0.0f, NaN)` returning `0.0f`. That is a fortunate C semantic,
not an explicit protection.
**Implementation note:** the guard does *not* simply `return` — it resets the session
latches, publishes a zero delta and **advances the pipeline step**. A bare `return` here
would have stalled the Auto CCL baton for the whole system on a transient NaN. This is a
deliberate improvement over the audit's proposed one-liner.
## 3. One-shot warning on a flat taper curve
**Change:** added a `flat_curve_warned` static flag, reset on each new session, guarding an
`ESP_LOGW` when `I_end >= I_anchor`.
**Why:** when `Bulk C-Rate >= Knee C-Rate` (or `>=` the effective CCL used as the left
anchor), the protective clamp `I_end = fminf(I_bulk, I_anchor)` makes the whole curve flat:
the function becomes a silent no-op — no error, no log, no visible effect. The clamp is
correct as a safety measure, but the configuration is a trap. The flag prevents the warning
from being emitted on every interval.
## 4. Release hysteresis scaled per cell
**Change:**
```diff
-constexpr float V_hyst = 0.2f;
+const float V_hyst = 0.0125f * ${yambms_cell_count}; // 0.2 V @ 16S
```
**Why:** `V_hyst` is a *pack* hysteresis. At 0.2 V it represents ~5 % of pack voltage on a
4S LTO pack (very wide release band) and ~0.26 % on a 24S LFP pack (very narrow, noise
sensitive despite the SMA). The per-cell form is portable and preserves the current
behaviour exactly on 16S — it is a reformulation of the existing constant, not a new
empirical value.
> `yambms_cell_hysteresis_v` from the core was deliberately **not** reused: it serves the
> discharge hysteresis of the Cut-Off logic and has a different purpose.
## 5. Balance Current bounds scaled with capacity
**Change:** the `Auto CCL CT Balance Current` maximum is now derived from the battery
capacity (0.1C ceiling, same order as `Bulk C-Rate`'s max) instead of a flat 0–50 A, with a
clamp of the stored value if it falls outside the window.
**Why:** unlike `knee_c_rate` / `bulk_c_rate`, this number was an absolute value. On a small
pack (e.g. 20 Ah) the UI allowed a 50 A "balance" current — 2.5C — physically meaningless
and not signalled to the user.
## 6. Balance Current vs the Cut-Off current deadband
**Change:** documentation comment added to the number.
**Why:** the Cut-Off logic in `yambms_core.yaml` ignores currents below
`yambms_current_deadband_crate × capacity` (0.005C, ≈1.4 A on a 280 Ah pack). Below that
threshold the compensated voltage criterion is no longer evaluated and charge termination
relies solely on the *fully charged at rest* signature. The default Balance Current of 2 A
is close to that limit on large packs.
This is the one real interaction between the taper and the Cut-Off logic, and it is a
configuration concern rather than a code defect.
## 7. Header contract updated
The `Contract with yambms_core.yaml` section now describes the actual behaviour: the
variable is written on the function's own turn only, and the core clears it every cycle.
@@ -0,0 +1,261 @@
# YamBMS - Changelog about the new Fake Equalizing
[![Badge License: GPLv3](https://img.shields.io/badge/License-GPLv3-brightgreen.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![Badge Version](https://img.shields.io/github/v/release/Sleeper85/esphome-yambms?include_prereleases&color=yellow&logo=DocuSign&logoColor=white)](https://github.com/Sleeper85/esphome-yambms/releases/latest)
![GitHub stars](https://img.shields.io/github/stars/Sleeper85/esphome-yambms)
![GitHub forks](https://img.shields.io/github/forks/Sleeper85/esphome-yambms)
![GitHub watchers](https://img.shields.io/github/watchers/Sleeper85/esphome-yambms)
`packages/bms/bms_options_fake_equalizing.yaml`
Original idea by [@haysdb](https://github.com/haysdb), who reported the problem and
proposed a first implementation. The package shipped here is a much smaller rewrite of
that idea — see [Why not the original pull request](#why-not-the-original-pull-request)
at the end.
---
## 1. The problem
Several BMS balance their cells but never expose a balancing flag over their protocol.
The YamBMS packages for those BMS had no choice but to declare the flag as a constant:
```yaml
# equalizing
- platform: template
id: bms${bms_id}_bms_equalizing
lambda: return false;
```
That constant is not a neutral placeholder, it is a wrong value. Those packs *do*
balance, and `equalizing` is not a cosmetic entity: in `yambms_core.yaml`, while it is
true the **Cut-Off timer is stopped** and the charge is allowed to continue up to the EOC
timer. Reporting `false` during a real balancing phase means the charge is terminated
while the pack is still equalizing, cycle after cycle, and the user has no indication
that anything is wrong.
## 2. What the package does
It infers the flag from the pack itself, and — this is the part that matters — **it
hardcodes neither of the two references it needs**. Both are already in your
configuration.
**The voltage reference** is the per-cell bulk setpoint:
```cpp
cell_bulk_v = bulk_voltage / cell_count
```
the exact derivation `yambms_core.yaml` already uses for its own end-of-charge
comparison. It follows `yambms_battery_chemistry`, the cell count and the bulk voltage you
configured, with no per-chemistry constant to maintain. LFP, Li-ion and LTO work out of
the box.
**The spread reference** is `bms_balance_trigger_voltage` — the very spread at which your
pack's own balancer engages. That number is not a matter of taste, and it is not the same
from one BMS to the next: **10 mV on a JK or a Seplos, 30 mV on an EG4 LL v2**. A fixed
constant would have fitted none of them — it would have reported balancing on a pack whose
balancer is idle, or stayed silent on one that is working. `bms_base_balancer.yaml`
already resolves this value to the external balancer's setting whenever one is online, and
to the BMS's own otherwise.
A pack that reports no trigger voltage at all never starts. There is no basis to claim it
is balancing, and no threshold worth inventing for it: the inference simply stays out of
the way and the behaviour is the one you have today.
```
START when BOTH are true
max cell >= cell_bulk_v the pack is at the setpoint
AND (max - min) >= trigger voltage its own balancing threshold
STOP when EITHER is true
max cell < cell_bulk_v - hysteresis the pack dropped off the setpoint
OR (max - min) < trigger - delta hyst. the spread closed back below it
```
The **spread condition is what keeps this honest**. A pack that reaches the setpoint
already balanced has nothing to equalize: it reports `false` and the Cut-Off timer does
its job normally. A plain voltage comparison, with no spread condition, would report
balancing forever and push every single charge to the EOC timer ceiling.
The **two hysteresis margins** exist because both references are sat *on* at top of
charge: the max cell rests on the setpoint for a long time, and the spread hovers around
the trigger voltage. Without them the state would toggle on every tick.
The spread and its threshold are compared as whole millivolts, the resolution the cells
are reported at. This is not cosmetic: `3.450f - 3.445f` evaluates to `0.005000114`, so a
raw float comparison against `0.005` would hold the spread above the threshold forever and
never release the Cut-Off timer.
### Where it plugs in
The package extends `bms${bms_id}_bms_equalizing`, the **raw** BMS flag, and not the
combined `bms${bms_id}_equalizing` sensor. Consequence: `bms_base_balancer.yaml` is
neither modified nor duplicated, and it keeps giving an **external balancer priority**
whenever one is online. If you run a NEEY or a Modbus balancer on that `bms_id`, its
reading wins; the inference only applies when no balancer reports for this pack.
## 3. Which BMS are concerned
The four BMS below shipped a hardcoded `return false;`. The package is **included by
default** for them, but **disabled by default**: enable it per BMS with
`bms_fake_equalizing_enabled: 'true'` (see [To enable the inference](#to-enable-the-inference)).
| BMS | Packages |
|---|---|
| EG4 LL V2 | `bms_combine_EG4_LLV2_RS485_bms_full.yaml`<br>`bms_modbus_EG4_LLV2_RS485_bms_full.yaml` |
| Seplos V1 V2 | `bms_combine_SEPLOS_V1_V2_RS485_bms_full.yaml`<br>`bms_modbus_SEPLOS_V1_V2_RS485_bms_full.yaml` |
| Seplos V3 | `bms_combine_SEPLOS_V3_RS485_bms_full.yaml`<br>`bms_modbus_SEPLOS_V3_RS485_bms_full.yaml` |
| JK RS485 DISPLAY | `bms_combine_JK_RS485_DISPLAY_full.yaml` |
The `bms_modbus_*` variants are the multi-node server packages, so a secondary node
relays the inferred flag to the client exactly like a real one.
The **Fake BMS** (`bms_combine_FAKE.yaml`, `_FAKE_extended.yaml`, `_DEMO.yaml`) also uses
it now. It previously carried an inline voltage comparison with no spread condition,
which the package replaces.
### BMS that are *not* concerned
- **JK** (BLE, RS485 Modbus, UART 4G-GPS), **JBD**, **Ecoworthy**, **PACE**, **Deye CAN**
and the YamBMS Modbus client node all report a real balancing flag. Nothing changes.
- **BASEN** already infers the flag inline, from its own `balance_starting_voltage` and
`balance_trigger_voltage` reported by the BMS. Those are a better source than a
derived anchor, so it is left as is.
- **KS BLE** derives the flag from the balanced-cell bitmask, which is real information.
The package can be added manually to another BMS, once for each `bms_id`:
```yaml
- path: packages/bms/bms_options_fake_equalizing.yaml
vars:
bms_id: '1' # must be a number
```
but only where `bms<id>_bms_equalizing` is declared as a plain `platform: template`
binary_sensor, which is what it replaces the lambda of. A BMS that exposes the flag
through its own component — `jk_bms_ble`, `jbd_bms`, `modbus_controller` and the like —
cannot be extended this way: those platforms take no `lambda:`, and the configuration
will not validate. That is not a real limitation, since those are precisely the BMS that
already report a genuine flag.
## 4. Tuning
### The one setting that matters: `bms_balance_trigger_voltage`
This is your BMS's own balancing threshold, and it is the spread the inference compares
against. Some BMS report it over their protocol; those that cannot expose it as a var to
declare at import — **Seplos V1/V2, Seplos V3, EG4 LL v2 and JK RS485 DISPLAY all work
that way**. It also feeds `Auto CVL`, so it was already worth getting right.
EG4 LL v2 and JK RS485 DISPLAY used a hard-coded value.
They now expose it like the others with the following default values:
| BMS | Default |
|---|---|
| EG4 LL V2 | 0.03 |
| SEPLOS V1 V2 | 0.01 |
| SEPLOS V3 | 0.01 |
| JK RS485 DISPLAY | 0.01 |
```yaml
# BMS 1
- path: 'packages/bms/bms_combine_your_BMS.yaml'
vars:
bms_id: '1'
# ... other vars of your BMS ...
bms_balance_trigger_voltage: '0.010' # V. Your BMS's balancing threshold
bms_fake_equalizing_enabled: 'true' # Optional : true/false, false by default
bms_fake_equalizing_hysteresis: '0.030' # Optional : 0.030 by default
bms_fake_equalizing_delta_hysteresis: '0.002' # Optional : 0.002 by default
```
Set it to what your BMS is actually configured for. On a JK you can read and change it in
the BMS itself; on an EG4 it may not be adjustable, in which case leave the default.
### The rest
An on/off switch and two margins around the references. No threshold among them, and the
defaults are fine for any pack.
| Substitution | Default | Meaning |
|---|---|---|
| `bms_fake_equalizing_enabled` | `'false'` | set to `'true'` to turn the inference on for this BMS |
| `bms_fake_equalizing_hysteresis` | `0.030` | how far below the bulk setpoint the max cell may fall before balancing stops |
| `bms_fake_equalizing_delta_hysteresis` | `0.002` | how far below the trigger voltage the spread may fall before balancing stops |
All of them can be passed per BMS as above, or set once for every BMS in the root
`substitutions:` block. The spread values are resolved to whole millivolts, the resolution
the cells are reported at, so a value finer than `0.001` has no effect.
### To enable the inference
It is off by default: the flag reports the constant `false` its package used to hardcode.
Turn it on per BMS, without editing any package:
```yaml
bms_fake_equalizing_enabled: 'true'
```
> [!WARNING]
> Enable it only if the pack actually balances at the configured
> `bms_balance_trigger_voltage`. A BMS without a balancer, with balancing disabled, or
> with a balancer too weak for the pack never closes its cell spread: the Cut-Off timer
> stays stopped and the charge can stay in Cut-Off for a long time, until the EOC timer
> ends it (`30min` by default), or indefinitely if the `EOC Timer enabled` switch is off.
To turn it off again, set it back to `'false'`. Do *not* try to disable it by raising
`bms_balance_trigger_voltage` instead — that value also feeds `Auto CVL`, where it means
something else entirely: how far the highest cell may overshoot the per-cell setpoint
before the PI clamps.
## 5. What changes for you on upgrade
The inference is disabled by default, so nothing changes until you enable it. Once
enabled on one of the four BMS above, the `balancing` entity turns on at the top
of charge as soon as your cells are spread by as much as your BMS's own
`bms_balance_trigger_voltage` — 10 mV on a Seplos or a JK, 30 mV on an EG4 unless you
declared otherwise. The charge then runs until the spread closes back below that, or
until the EOC timer expires, instead of being cut short by the Cut-Off timer. That is the
intended fix, but it *is* a change in charge termination, so watch a couple of cycles
after enabling it.
The risk is bounded on the safe side. A false positive can only extend the charge up to
the EOC timer, which exists for exactly that purpose, as long as the `EOC Timer enabled`
switch is on. A false negative simply restores
the previous behaviour.
## Why not the original pull request
[@haysdb](https://github.com/haysdb) opened
[PR #304](https://github.com/Sleeper85/esphome-yambms/pull/304) with a *Fake Balancer*
package. The diagnosis was right and the idea is his. The implementation was shaped
around his own setup — a NEEY balancer that does not run every day — and carried more
than YamBMS needs:
- **Absolute thresholds as entities.** Four `number` entities held the start / sleep /
trigger / stop-diff voltages, hardcoded to LFP values (3.45 / 3.42 V). They lived
alongside the bulk voltage the user had already configured, so the same physical
setpoint existed twice and could drift apart. Taking the voltage reference from
`bulk_voltage / cell_count` and the spread reference from
`bms_balance_trigger_voltage` removes the duplication entirely, and makes the
package track each BMS instead of a constant that fits none of them.
- **A companion stub package.** The lambda referenced `balancer${bms_id}_online_status`
and `balancer${bms_id}_equalizing`, which only exist when a balancer package is
included, so a second package had to declare two always-false sensors just to make it
compile without one. Reading the raw BMS flag instead makes the stub unnecessary.
- **A duplicated core lambda.** It extended the *combined* `bms${bms_id}_equalizing` and
recopied the branch from `bms_base_balancer.yaml` to add its OR. Extending the raw flag
keeps a single copy of that logic.
- **A side effect on another entity.** The interval wrote
`bms${bms_id}_var_ext_balancer_online = real_online || fake_eq`, which made
`bms_base_balancer.yaml` report the external balancer's trigger voltage — `0.000 V`
when no balancer had ever been online.
- **Eight entities and a sub-device per BMS**, for a function that needs none.
The `Force` switch and the `Max Run Time` number were dropped as well: they answer the
need to launch a weekly top-balance by hand when the hardware balancer is idle, which is
a balancer feature rather than a BMS one.
Thanks to @haysdb for finding the problem and for the threshold model — start and stop on
a spread with hysteresis is his, and it is the part that makes the inference trustworthy.
@@ -0,0 +1,104 @@
# Inverter brand and protocol — breaking change
## What changes
The inverter link is now described by **two selects** instead of one:
| Select | Options | Default |
| --- | --- | --- |
| `Inverter brand` | `Not defined`, `Other`, then the inverter brands | `Not defined` |
| `Protocol` | `Automatic`, `Disabled`, then the protocols of that bus | `Automatic` |
Selecting your inverter brand is enough: with `Protocol` on `Automatic`, YamBMS applies the
protocol that matches your brand. Choosing a protocol explicitly always takes priority over the
brand, so an inverter that does not follow the usual mapping can still be driven.
The brand list also covers manufacturers that are not validated yet. Those use `PYLON V2` on CAN
and the protocol compiled on the node on RS485, and the `Note` entity tells you the brand has not
been validated on that bus.
On RS485 the brand never changes the protocol, which is the `rs485_protocol` of your YAML. `LIB`
only works with `Voltronic` and `MPP Solar`: in `Automatic`, a node compiled for `LIB` stays silent
for any other brand. Rebranded Voltronic inverters must select `Voltronic`.
The old `YamBMS name` select is **removed**. The manufacturer name announced on CAN frame `0x35E`
is now derived from the protocol in use — exactly the names the `Automatic` mode already sent, and
which are known to work. The `GOODWE`, `SHEnergy` and `BYD` names are no longer selectable.
## What you must do after updating
> [!IMPORTANT]
> **The inverter link stays inactive until you select your inverter brand.** Both selects are
> renamed, so their stored value is reset and every node starts at `Not defined` + `Automatic`.
> Until you make a choice, nothing is sent on the CAN or RS485 bus and your inverter will report a
> BMS communication fault, stopping charge and discharge.
Open your YamBMS device in **Home Assistant** or **Web server** and set `Inverter brand`. That is all that is needed —
the protocol follows. If your inverter is not in the list, select `Other` and set `Protocol`
yourself.
Users running off-grid should plan the update accordingly: the inverter will stop using the
battery until the brand is selected.
Your Home Assistant automations and dashboards referring to the old entity ids must be updated:
| Before | After |
| --- | --- |
| `select.yambms_1_canbus_1_yambms_name` | removed |
| `select.yambms_1_canbus_1_yambms_protocol` | `select.yambms_1_canbus_1_protocol` |
| `select.yambms_1_rs485_1_yambms_protocol` | `select.yambms_1_rs485_1_protocol` |
| — | `select.yambms_1_canbus_1_inverter_brand` |
| — | `select.yambms_1_rs485_1_inverter_brand` |
The updated dashboards are provided in `HomeAssistant_Dashboards/`.
## New diagnostic entities
Three text sensors per inverter link report what is actually happening:
- **`Inverter link protocol`** — `Deye - CAN PYLON V1`, or `Inverter CAN bus not defined` when
nothing is selected yet.
- **`Inverter battery mode`** — how to configure the battery type on the inverter itself, for
instance `Lithium 00` for a Deye on CAN, `Lithium 12` for a Deye on RS485. It is keyed on the
brand *and* the protocol, and reports `See inverter manual` for a couple that has never been
confirmed rather than guessing.
- **`Note`** — what is specific to that brand and protocol, when there is anything to say.
## Protocol names
| Before | After |
| --- | --- |
| `PYLON 1.2` | `PYLON V1` |
| `Pylontech` (RS485) | `PYLON` |
`PYLON V1` leaves room for the 1.7 revision of the protocol.
## Schneider XW Pro
The `canbus_extended_ack` substitution is **removed**. Both the 11-bit and the 29-bit ACK are now
listened to at the same time, so the extended ACK works with no configuration at all. Remove the
line from your YAML if you had set it.
## RS485 package files
**The file you include changes**, from `yambms_rs485_pylon.yaml` to `yambms_rs485.yaml`. This
makes room for the additional RS485 protocols to come: `yambms_rs485.yaml` carries the `Inverter
brand`/`Protocol` selects, diagnostics and telemetry, and takes a new `rs485_protocol` var
(`pylon` or `voltronic`) that tells it which protocol implementation to include for you
(`yambms_rs485_pylon.yaml`, keeping the PYLON implementation only, or the new
`yambms_rs485_voltronic.yaml`). A node with several RS485 links on different UARTs can run a
different protocol on each, since each link's `vars:` names its own `rs485_protocol`.
> [!IMPORTANT]
> Point your `!include` to `yambms_rs485.yaml` and add `rs485_protocol: 'pylon'` to its `vars:`.
> This relies on substitutions in an `!include` filename, added in ESPHome 2026.4.0
> ([esphome#12213](https://github.com/esphome/esphome/pull/12213)) — already covered by this
> project's `min_version: 2026.10.0`, so no extra requirement for you.
`yambms_rs485_pylon_web_server.yaml` becomes `yambms_rs485_web_server.yaml`. It includes the link
itself, so use it **instead of** `yambms_rs485.yaml`, not alongside it, with the same `vars:`.
`rs485_uart_baud_rate` keeps the same meaning and defaults to `9600`. The link now declares its
UART itself from `rs485_uart_id`, so remove the `board_options_itf_uart_*.yaml` include of that UART
from your YAML. Boards using a UART expander — the `wk2168` of the PVbrain2 — no longer need a
separate include: every board now uses the same entry point.
@@ -0,0 +1,146 @@
# YamBMS - Changelog about new YamBMS 1.8.0 Auto CVL function
[![Badge License: GPLv3](https://img.shields.io/badge/License-GPLv3-brightgreen.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![Badge Version](https://img.shields.io/github/v/release/Sleeper85/esphome-yambms?include_prereleases&color=yellow&logo=DocuSign&logoColor=white)](https://github.com/Sleeper85/esphome-yambms/releases/latest)
![GitHub stars](https://img.shields.io/github/stars/Sleeper85/esphome-yambms)
![GitHub forks](https://img.shields.io/github/forks/Sleeper85/esphome-yambms)
![GitHub watchers](https://img.shields.io/github/watchers/Sleeper85/esphome-yambms)
## Problem
`Auto CVL` is a PI controller that reduces the `Requested Charge Voltage (CVL)` sent to the
inverter when cell voltage rises above target, to avoid tripping the BMS `OVP` alarm.
In 1.7.0 it was strictly a Bulk-phase function. `yambms_core.yaml` built the requested voltage
one branch per phase, and only the Bulk branch added the correction:
```
Bulk : bulk_voltage + charger_offset + var_auto_cvl
Float : float_voltage + charger_offset + var_auto_float
Stop : rebulk_voltage + charger_offset
```
Two problems with that shape:
- **The formula was hardcoded per phase.** Each new correction had to be wired into the right
branch by hand, and a phase that had never needed one had no slot to receive it.
- **`Stop` requested `Rebulk V.` itself**, which left the pack sitting on the very threshold that
decides when to rebulk.
The controller itself matched that Bulk-only scope: its reference (`CVL`, `CVL_orig`) and deadband
reference (`cell_bulk_v`) were anchored to `bulk_voltage`, its ceiling to `bulk_voltage + boost`,
its floor to `float_voltage`.
## Design decisions
Each was validated against one hard invariant: **Bulk's observable behavior must not change**
unless explicitly stated otherwise.
1. **The core formula becomes a base plus offsets.** `yambms_core.yaml` now picks a per-phase base
target and adds a common set of offsets to it, instead of carrying a separate formula per
branch. Every phase now has a slot for every correction; an offset is simply `0` when its
function is idle or disabled.
2. **`Stop` is anchored to nominal voltage** (`cell_count × var_cell_nominal_v`) instead of
`Rebulk V.`, giving it a target that is independent of the rebulk decision instead of one that
sits exactly on it.
3. **`Auto CVL` is rewritten from a per-second template sensor into an interval lambda.** The
1.7.0 version was a `lambda:` returning a value inside a single `internal: true` sensor, so the
correction and the published value were necessarily the same thing. Separating them is what
allows the two user-visible diagnostic sensors below, and gives the file room for the per-phase
branching.
4. **Phase source of truth**: read the existing `yambms${id}_charging_instruction` text sensor
(already published by `yambms_core.yaml`, values `"Bulk"` / `"Float"` / `"Stop"`) instead of
duplicating the `charge_status` → phase classification logic in this file.
5. **Bulk** (kept close to identical): still tracks `max_cell_v` against `bulk_voltage`, still
uses the BMS `Balance Trig. Volt.` as deadband. One deliberate change: the floor moved from
`float_voltage` (a user-configurable entity, not guaranteed to sit below `bulk_voltage`) to
`cell_count × var_cell_min_charge_v` (the chemistry's fixed cv_min — "fully charged at rest"
voltage). In practice this floor is rarely reached (the loop normally self-limits once
`max_cell_v` drops back under `cell_bulk_v`, well before hitting either floor), so the
observable difference is confined to edge cases where the correction saturates.
6. **PI state is reset when crossing the Bulk ↔ Float/Stop boundary.** Bulk uses `integral_bulk`;
a second state, `integral_avg`, is reserved for the Float/Stop correction and is currently only
ever zeroed. Carrying state across the Bulk boundary is not meaningful: the measured quantity
itself changes nature at that transition, so an accumulated integral from one phase does not
represent a valid correction for the other. Without the reset, a stale integral from before a
Float cycle would be re-injected on the next rebulk. Turning the `Automatic Charge Voltage`
switch off also clears both PI states entirely.
7. **NaN / availability guards are branch-specific**: only `cell_count`, `bulk_voltage` and the
`charging_instruction` state are required upfront (common to all phases). `balance_delta` and
`max_cell_v` are only required to enter the Bulk branch. This keeps a sensor hiccup on one
branch's inputs from silently disabling another phase's correction — which would have broken
the Bulk invariant in that edge case.
## Auto CVL outside Bulk : implemented, then suspended
Some inverters hold their output voltage a bit above (~0.1–0.3 V) the requested `CVL`, and they do
so in every phase, not just Bulk. That was the case for extending `Auto CVL` to `Float` and
`Stop`, and a full PI branch for them was written and tested. **It is suspended in the shipped
version**, and the reason is worth recording, because the failure is not obvious from the idea.
Outside Bulk, a real inverter overshoot, a pack relaxing after charge, and a pack discharging into
house load all present the **same signature**: pack average above target at near-zero current. No
function of pack current tells them apart — a fixed overshoot settles at ~0 A just like a resting
pack does. Left active, the PI integrates against an error it has no authority over and pins `CVL`
to its floor, burning the safety margin above `Rebulk V.` for no benefit.
`Stop` is a separate case: it means "let the pack discharge down to rebulk", which the low base
target now set by `yambms_core.yaml` (decision 2 above) achieves on its own. A PI loop has nothing
to add there, and `Stop` is not expected to come back even if `Float` does.
`Bulk` — the `OVP` protection path, and the reason `Auto CVL` exists — is untouched by this. The
`Float`/`Stop` slot of the new core formula stays free for a future implementation, and the
`integral_avg` PI state and the `auto_cvl_rebulk_margin_v` substitution are kept in place for it.
> [!NOTE]
> `auto_cvl_rebulk_margin_v` (default `0.5`) is declared but **has no effect** in the current
> version. It was the Float branch's safety margin above `Rebulk V.`: any fixed floor can sit at
> or below the rebulk threshold depending on the user's settings, which would let `Auto CVL`
> trigger a rebulk it caused itself and loop `Float → Bulk → Float`. Deriving the floor from the
> live `Rebulk V.` entity is what keeps that margin correct whatever the configuration.
## Result
| Phase | Base target (`yambms_core.yaml`) | Auto CVL correction |
|---|---|---|
| Bulk | `bulk_voltage` | `max_cell_v` vs `bulk_voltage`, deadband `balance_trigger_voltage`, floor `cell_count × var_cell_min_charge_v`, ceiling `bulk_voltage + boost` |
| Float | `float_voltage` | none (`var_auto_cvl` = `0`) |
| Stop | `cell_count × var_cell_nominal_v` | none (`var_auto_cvl` = `0`) |
`yambms_core.yaml` builds the requested voltage from that per-phase base plus a common set of
offsets, instead of a separate formula per branch:
```
base : Bulk -> bulk_voltage | Float -> float_voltage | Stop -> cell_count × nominal_v
result : base + charger_offset + var_auto_cvl + var_auto_float + var_auto_custom_cvl
```
Each offset is `0` when its function is idle or disabled.
### New entities
Two diagnostic sensors expose the two halves of the charge voltage setpoint, so a misbehaving
correction can be read directly from the dashboard instead of being inferred:
- **`Auto CVL Delta`** — the correction `Auto CVL` is currently applying. Negative when it is
reducing the charge voltage, `0` when idle — which includes the whole of `Float` and `Stop`.
- **`Auto Float Voltage Delta`** — the remaining offset of the `Auto Float` glide above the
target float voltage. Reaches `0` once the ramp is complete.
Alongside them, `Auto CVL` and `Auto Float Voltage` publish the absolute value each function is
requesting. Outside `Bulk`, `Auto CVL` sits at `Bulk Voltage` with a delta of `0`.
Together the two deltas reconstruct the setpoint published by `yambms_core.yaml`:
```
Requested Charge Voltage = base target + Charger Offset V. + Auto Float Delta + Auto CVL Delta
```
Documentation updated in the same change: `documents/README/YamBMS_functions.md`, `Auto CVL`
section.
@@ -0,0 +1,98 @@
# YamBMS - Changelog about new YamBMS 1.8.0 Cut-Off charging logic
[![Badge License: GPLv3](https://img.shields.io/badge/License-GPLv3-brightgreen.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![Badge Version](https://img.shields.io/github/v/release/Sleeper85/esphome-yambms?include_prereleases&color=yellow&logo=DocuSign&logoColor=white)](https://github.com/Sleeper85/esphome-yambms/releases/latest)
![GitHub stars](https://img.shields.io/github/stars/Sleeper85/esphome-yambms)
![GitHub forks](https://img.shields.io/github/forks/Sleeper85/esphome-yambms)
![GitHub watchers](https://img.shields.io/github/watchers/Sleeper85/esphome-yambms)
## Fix: false End-Of-Charge (EOC) detection on low PV production days
### The problem
The Cut-Off detection uses a current-compensated voltage criterion (`cell_v ≥ cv_min + R·I`). This criterion is physically sound in steady state: at low charge current a cell voltage above `cv_min` (3.37 V/cell on LFP, the resting voltage of a full cell) genuinely indicates a full battery, and a cell cannot get full while avoiding this threshold. Its weakness lies in **transient readings**:
- **Post-burst cell relaxation.** On grey days, a short sun burst pushes cell voltages up, then a cloud passage drops the current to 1–2 A while polarization keeps the cell voltage elevated for 30–120 s. The 10 s validation plus the 60 s cut-off timer (~70 s total) fit inside that relaxation window — the transient voltage was treated as a resting voltage.
- **Runner cell.** On an imbalanced pack, a single high cell can satisfy the criterion while the pack SoC is only 85–92 %.
The result was a false EOC: the battery was parked in Float/EOC (charging effectively stopped), the `rebulk_days` counter was wrongly reset, and recovery only occurred once SoC dropped back below the rebulk threshold — often losing the rest of the charging day.
### What changed
The compensated voltage criterion itself is **unchanged** — it needed guarding against transients, not replacing.
**1. Minimum SoC gate** Cut-Off/EOC now additionally requires `SoC ≥ 95 %` (configurable). This blocks any false EOC at mid SoC, whether caused by a runner cell or by a transient voltage reading.
**2. Longer cut-off timer** The default `yambms_cutoff_timer` is raised from 60 s to 180 s. The decision window now exceeds the post-burst relaxation time: a transient voltage falls back below the compensated threshold before the timer expires, and the timer is stopped when the Bulk conditions return. The value remains a substitution and can be tuned.
**3. Current deadband around 0 A** Previously, `current >= 0` treated exactly 0 A and sensor noise as "charging". Currents with `I` below 0.005C (configurable, ≈1.4 A on a 280 Ah pack) are no longer fed into the compensated formula. Within the deadband, three outcomes:
- `cell_v ≥ cv_min` and the SoC gate is satisfied → **Cut-Off conditions valid**. This is the "fully charged at rest" signature: a battery that becomes full at very low charge current (poor solar conditions) and stops accepting current still completes its charge cycle, without ever needing to reach the bulk voltage.
- `cell_v < cv_min` → **Bulk conditions valid**: the battery cannot be full, any running timers are stopped (same behavior as the original logic at ~0 A).
- Otherwise → **grey zone**: no conclusion is drawn, the charge status is left unchanged.
**4. Discharge cell hysteresis voltage** The discharge branch now uses an explicit `cell_hysteresis_v` independent of the capacity (20 mV/cell by default, corresponding to the previous behavior of a 280 Ah pack).
**5. Selectable Cut-Off Cell Voltage source** A new **"Cut-Off Cell Voltage"** select allows choosing which cell voltage feeds the whole Cut-Off logic (compensated criterion, "fully charged at rest" signature and discharge hysteresis):
![RS485_bus](../../images/YamBMS_Charging_Settings_Cut-Off_Cell_Voltage.png)
- **Max Cell Voltage** (default) — conservative, unchanged behavior: the EOC depends on the highest cell. It protects imbalanced packs, but the charge termination voltage varies with the imbalance of the day.
- **Average Cell Voltage** — the EOC reflects the state of the whole pack (`total_voltage / cell_count`), giving a **consistent charge termination voltage** from one day to the next. This is the recommended option for packs built from unmatched cells (different internal resistances), packs with a runner cell, and BMS that do not report their equalizing status — in that last case YamBMS cannot hold the Cut-Off open during balancing, and with `Max Cell Voltage` the runner would end the charge prematurely, depriving the balancer of its working window. In `Average Cell Voltage` mode the highest cell stays longer in the upper voltage region where the balancer is active. Note: the inconsistency only shows when the charge ends by current taper below the CVL (PV-limited days, or an inverter that does not respect the CVL); when the charger holds the pack at the CVL, the pack voltage at EOC equals the CVL regardless of the selected source.
⚠️ In **Average Cell Voltage** mode, the runner cell no longer stops the charge: cell-level protection **must** be ensured by **Auto CVL and/or Auto CCL** (in order to avoid triggering an OVP alarm), with the BMS OVP as last resort. Note that if your inverter does not respect the CVL — the very situation where `Average Cell Voltage` mode is most useful — Auto CVL has no effect and **Auto CCL is the effective protection**. This setting only affects the Cut-Off logic — all other YamBMS mechanisms (Auto CVL, Auto CCL, rebulk) keep using the max cell voltage.
### New substitutions
| Substitution | Default | Purpose |
|---|---|---|
| `yambms_eoc_min_soc` | `95` | Minimum SoC (Max 98%) required to allow Cut-Off/EOC |
| `yambms_current_deadband_crate` | `0.005` | C-Rate below which the current is treated as noise / PV starvation |
| `yambms_cell_hysteresis_v` | `0.020` | Discharge hysteresis margin (V/cell) |
Changed default: `yambms_cutoff_timer` 60 s → 180 s.
### New entities
| Entity | Type | Default | Purpose |
|---|---|---|---|
| `Cut-Off cell voltage` | select | `Max Cell Voltage` | Cell voltage source used by the Cut-Off logic (`Max Cell Voltage` / `Average Cell Voltage`) |
### Expected behavior after the fix
- Grey day, transient voltages after sun bursts → the SoC gate and the 180 s window reject them. No false EOC.
- Normal sunny end of charge → unchanged behavior: pack reaches CVL, current tapers, Cut-Off → EOC as before.
- Full charge at very low current (battery full without ever reaching the bulk voltage) → handled by the compensated criterion above the deadband, and by the "fully charged at rest" signature below it. The charge cycle always completes.
- Inconsistent charge termination voltage on imbalanced packs (e.g. 54.7 V one day, 55.2 V the next) → select **Average Cell Voltage** for a reproducible pack voltage at EOC, e.g. for a reliable SoC resync point.
- Extended balancing of an imbalanced pack → unchanged: the EOC timer switch can still be disabled to hold the battery in charge while the BMS is equalizing.
### Note for advanced users
#### Variables that can be modified
```YAML
- path: 'packages/yambms/yambms.yaml'
vars:
yambms_cutoff_crate: '0.05' # (C-Rate) matches the standard charge termination of most LFP, Li-ion and LTO datasheets and is the right value for the vast majority of installations. Check your cell datasheet before changing it.
yambms_eoc_min_soc: '95' # (%) minimum SoC (Max 98%) required to allow Cut-Off/EOC
yambms_current_deadband_crate: '0.005' # (C-Rate) `current` below this = grey zone (sensor noise / PV starvation)
yambms_cell_hysteresis_v: '0.020' # (V/cell) discharge hysteresis margin
```
#### The `cv_min` setting
The `cv_min` anchor (3.37 V/cell on LFP) is a conservative lower bound of the fully-charged resting voltage documented in the literature (3.37–3.43 V band, OCV hysteresis included). It is intentionally **not** exposed as a setting: raising it would distort the physical meaning of the compensated criterion. Experienced users can still override the `yambms${yambms_id}_var_cell_min_charge_v` global from their own YAML using an `on_boot` block with a priority **below 600** (the YamBMS chemistry block runs at 600) — see the documentation example.
```YAML
# Example : override the chemistry "fully charged at rest" voltage
# For experienced users only — this shifts the anchor of the whole
# Cut-Off compensated criterion. Values outside the documented
# 3.37-3.43V band (LFP) will distort the charge termination logic.
esphome:
on_boot:
- priority: 550 # MUST be < 600 : runs after the YamBMS chemistry block
then:
- lambda: |-
// Override cv_min (example : 3.40V instead of 3.37V)
id(yambms${yambms_id}_var_cell_min_charge_v) = 3.40;
```
@@ -0,0 +1,128 @@
# Upgrade to YamBMS 1.8.1
[![Badge License: GPLv3](https://img.shields.io/badge/License-GPLv3-brightgreen.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![Badge Version](https://img.shields.io/github/v/release/Sleeper85/esphome-yambms?include_prereleases&color=yellow&logo=DocuSign&logoColor=white)](https://github.com/Sleeper85/esphome-yambms/releases/latest)
![GitHub stars](https://img.shields.io/github/stars/Sleeper85/esphome-yambms)
![GitHub forks](https://img.shields.io/github/forks/Sleeper85/esphome-yambms)
![GitHub watchers](https://img.shields.io/github/watchers/Sleeper85/esphome-yambms)
YamBMS 1.8.1 changes the way the inverter, UART and CAN are configured, so a 1.7.0 or 1.8.0 YAML
no longer validates as it is. If you use Remote Packages, your next compile will fail until you
have made the changes below.
## Biggest changes
- **Inverter brand:** a new `Inverter brand` select sets the protocol for you, and you can still
force one with `Protocol`. Your old protocol selection is not kept: **the CAN or RS485 link does
not work until you select your inverter brand, or `Other` for a manual setup**. Your choice is
then remembered.
- **UART:** each package now declares its own UART from its `*_uart_id` var. Two packages can no
longer share a UART.
- **CAN:** each package now declares its own CAN node, which needs the new `canbus_platform` var.
- **RS485:** you now include `yambms_rs485.yaml` and choose the protocol with `rs485_protocol`.
- **Current limits:** the `Max charge C-Rate` and `Max discharge C-Rate`
sliders added in 1.8.0 default to 0.5C. A 280 Ah bank is limited to 140 A in both directions
until you raise them (1C maximum).
- **Several inverter links:** CCL and DCL are divided by the number of CAN and RS485 links declared
in your YAML, including a link set to `Disabled`. Only declare the links that are actually wired.
CAN and RS485 links can run at the same time: keep both blocks, each link with its own
`canbus_id` or `rs485_id`. The dashboard shows up to 3 CAN links and 3 RS485 links. If you only
use RS485, comment out the CAN block.
- **Balancing inferred:** EG4 LL V2, Seplos V1/V2, Seplos V3 and JK RS485 DISPLAY do not report
balancing, and YamBMS now infers it from the cell spread. While a pack is seen as balancing, the
charge only ends when the spread closes or the EOC timer expires, and the SoC stays at 98% until
then. Set `bms_balance_trigger_voltage` to your BMS's actual setting and keep `EOC timer enabled`
ON. See [Fake Equalizing](Changelog_Fake_Equalizing.md).
## How to update from 1.7.0 or 1.8.0
> [!IMPORTANT]
> Off-grid users: plan this for a moment when you can reach Home Assistant or the web server.
> Your inverter will report a BMS fault and stop using the battery until step 9 is done.
1. Save a copy of your current YAML and update ESPHome to **2026.10.0 or later**.
2. Start from the new [Remote Packages example](../../../YamBMS_Remote_Packages_example.yaml)
([Local Packages example](../../../YamBMS_Local_Packages_example.yaml) if you use local
packages).
3. Report your own values one by one, without pasting your old `substitutions:` block:
`hostname`, `friendly_name`, `yambms_name`, then **all your battery settings** (chemistry, cell
count, voltages, currents) and your static IP if you have one. These are not checked by
validation. Keep the new `yambms_cutoff_timer: '180'`.
4. Select your board and its options (PSRAM, display, web server). Do not copy your old UART and
CAN includes, packages now declare them.
5. Paste your BMS, Shunt and Balancer blocks as they are ([you will find the updated examples in the examples folder](../../../examples/)).
* Deye BMS on CAN: add `canbus_platform` to the `top` package.
* If your board requires flow control, add `uart_flow_control_pin: ${talk_pin}` to the `vars:` of the package that uses that UART.
6. CAN inverter: keep the CAN block of the example and set `canbus_platform` (`esp32_can` or
`mcp2515`, `external` with the espBerry board). With the web server, include `yambms_canbus_web_server.yaml` instead.
```yaml
- path: 'packages/yambms/yambms_canbus.yaml'
vars:
canbus_id: '1' # Must be a number
canbus_name: 'CANBUS 1'
canbus_status_led_id: 'esp_light'
canbus_link_timer_enabled: 'true'
canbus_link_timer: '10s' # min 6s with Deye
# CAN setup
canbus_platform: 'esp32_can' # esp32_can / mcp2515
canbus_node_id: 'canbus_inverter_1' # CAN bus node to which your inverter is connected
canbus_bitrate: '500kbps' # Default : 500kbps
```
7. RS485 inverter: uncomment the RS485 block of the example, then set `rs485_protocol` and
`rs485_uart_id`. With the web server, include `yambms_rs485_web_server.yaml` instead.
```yaml
- path: 'packages/yambms/yambms_rs485.yaml'
vars:
rs485_id: '1' # Must be a number
rs485_name: 'RS485 1'
rs485_protocol: 'pylon' # pylon / voltronic
rs485_update_timeout: '10s'
rs485_status_led_id: 'esp_light'
# UART setup
rs485_uart_id: 'uart_esp_3' # UART interface to which your inverter is connected
# ESP32 : uart_esp_1 to uart_esp_3
# WK2168 : uart_spi_0 to uart_spi_7 / uart_i2c_0 to uart_i2c_7
rs485_uart_baud_rate: '9600' # Default : 9600 / Epever : 115200
```
8. Run `esphome config your_file.yaml`, then flash.
9. Select your `Inverter brand` in Home Assistant or the web server, for each link. If it is not
listed, select `Other` and set `Protocol` yourself. The link starts once this is done, and you
only have to do it once. Read [Inverter Brand and Protocol](../YamBMS_functions.md#inverter-brand-and-protocol)
before you start: it explains each setting and the battery mode to set on your inverter.
10. Replace your Home Assistant dashboard with its 1.8.1 version, from the
[HomeAssistant_Dashboards](../../../HomeAssistant_Dashboards/) folder: open your dashboard,
then *Edit dashboard* → *Raw configuration editor*, and paste the file that matches your
setup. If you had customised it, carry your changes over to the new version.
11. Update any automations that use the old protocol entities. Coming from 1.7.0, also check the
two C-Rate sliders and `Charger Offset V.` (formerly `Inverter Offset V.`).
## If validation fails
| Error | Cause |
| --- | --- |
| `Expected integer, but cannot parse ${uart_baud_rate}` | A UART include is still in your YAML. |
| `Bit rate ${CANBUS_BIT_RATE} is not supported` | A CAN include is still in your YAML. |
| `Cannot load include with unresolved substitutions` | `canbus_platform` or `rs485_protocol` is missing. |
| `Source for extension of ID 'rs4851_protocol' was not found` | You are still including `yambms_rs485_pylon.yaml`. |
| `ID uart_esp_1 redefined` | Two packages use the same UART. |
## PVbrain2
PVbrain2 users have a few more changes (board and expander files, `uart_spi_N` ids). Start from
the updated [PVbrain2 YAML](../../../YamBMS_RP_PVbrain2.yaml).
Coming from 1.7.0, the PVbrain2 board file is now split in two, depending on the revision of your
DevKitC-1:
- `board_ESP32-S3_DevKitC-1_PVbrain2_LED-48.yaml` for V1.0 (LED on GPIO 48, CAN TX on 38)
- `board_ESP32-S3_DevKitC-1_PVbrain2_LED-38.yaml` for V1.1 (LED on GPIO 38, CAN TX on 48)
## More information
Everything else is in the [changelog](Changelog.md) and the [inverter brand release note](Changelog_Inverter_brand_and_protocol.md).
If you encounter any difficulties, open an issue on [GitHub](https://github.com/Sleeper85/esphome-yambms).
+136
View File
@@ -0,0 +1,136 @@
# Coding conventions
Conventions actually in use across the repository. Follow them when adding a package or editing
an existing one — the safest approach is always to copy a comparable existing file and adapt it.
## Language
Code comments and documentation are written in **English**.
## File naming
Files under `packages/<domain>/` follow this grammar:
```
<domain>_<layer>_<Brand>_<Interface>_<variant>.yaml
```
For example: `bms_combine_JK_RS485_Modbus_bms_full.yaml`.
The `_full` / `_standard` / `_minimal` / `_secondary` variants control **how many entities are
exposed**, not the logic itself.
## File header
Every package YAML starts with the same header block:
```yaml
# Updated : yyyy.mm.dd
# Version : x.y.z
# GitHub : https://github.com/Sleeper85/esphome-yambms
```
followed by the GPLv3 notice. Reproduce it in any new package.
## Instance substitutions
`${xxx_id}` substitutions are numeric identifiers. For BMS units (`bms_id`) they **must start at
`1` and be contiguous**. This is a functional constraint, not a style rule, and the consequence of
getting it wrong is severe: the combiner pipeline advances a shared counter from one instance to
the next, so a gap in the numbering stalls that counter and the whole aggregation deadlocks
silently — no combined values, no setpoints sent to the inverter. The identifier is also used as
a bitmask index, for instance `1 << (${bms_id} - 1)` in `bms_combine.yaml`.
See [Design_decisions.md](Design_decisions.md) for how the pipeline works.
## Include order
Include the BMS and Shunt packages in ascending `${xxx_id}` order in your main YAML. The combiner
processes instances in the order their lambdas run, so ascending order completes one aggregation
round per interval; an out-of-order include still converges but spreads the round over several
intervals.
## UART declaration
A package that needs a UART imports it itself, from its `*_uart_id` var, and exposes the baud rate
under its own key. `uart_baud_rate` is the internal parameter of the UART file: never a key of a
package.
```yaml
packages:
shunt_uart: !include
file: ../board/board_options_itf_${shunt_uart_id}.yaml
vars:
uart_baud_rate: ${shunt_uart_baud_rate | default(115200)}
```
Use `| default(...)` when the device has a usual speed, and leave it out when the speed depends on
the installation. Never put a fixed value there, nor the default in `substitutions:`. See
[Design_decisions.md](Design_decisions.md) for the reasons.
## CAN declaration
A package that needs a CAN node imports it itself, from its `canbus_platform` var, and exposes the
bit rate as `canbus_bitrate`. `canbus_bit_rate` is the internal parameter of the CAN file: never a
key of a package.
```yaml
packages:
canbus_node: !include
file: ../board/board_options_itf_canbus_${canbus_platform}.yaml
vars:
canbus_bit_rate: ${canbus_bitrate | default('500kbps')}
```
`canbus_platform` has no default, and the id of the node stays free in `canbus_node_id`. See
[Design_decisions.md](Design_decisions.md) for the reasons.
## Entity IDs
Entity IDs follow `<domain>${xxx_id}_<name>`:
```
bms${bms_id}_total_voltage
yambms${yambms_id}_var_bms_online_bitmask
```
Globals used by the YamBMS engine's internal logic are prefixed `yambms${yambms_id}_var_*`.
## Sub-devices
Every entity carries a `device_id:` that attaches it to the matching ESPHome `sub_device`, so that
each BMS, Shunt, Balancer and YamBMS instance appears as its own device in Home Assistant. Always
fill it in — copy an existing package to get it right.
Since ESPHome 2026.11, every entry under `esphome: devices:` requires a `relation:`. Use `via`
for all of them, including the board, the YamBMS instance and the inverter links: it is the value
the API assumed before the key existed, so Home Assistant shows the devices exactly as it did.
## Section comments
Large files (`yambms_core.yaml`, `bms_combine.yaml`, the `YamBMS_LP_*` root YAML) are structured
with ASCII box comments:
```yaml
# +----------------------------------------+
# | Section title |
# +----------------------------------------+
```
## Boot sequencing
Startup ordering relies on `on_boot` priorities. For example, `priority: 600` initialises the BMS
combiner in `bms_combine.yaml`, and `priority: 550` is documented as running right after it in
`yambms_custom.yaml`. If you add an `on_boot` block, respect the existing ordering rather than
picking an arbitrary priority.
## Validating a change
There is no test suite. Validate a YAML with:
```bash
esphome config <file>.yaml # validation only
esphome compile <file>.yaml # full compilation
```
See [Installation_procedure.md](../Installation_procedure.md).
+626
View File
@@ -0,0 +1,626 @@
# Design decisions
Some parts of the codebase look more verbose or more redundant than they need to be. They are
deliberate. This page records why, so that a well-intentioned cleanup doesn't reintroduce a bug
that took a long time to find.
**Do not refactor anything listed here without discussing it first**, and read the rationale
before touching the code.
## Cut-Off / EOC logic
**File:** `packages/yambms/yambms_core.yaml`
The End Of Charge condition is deliberately compound. It has to distinguish a genuine EOC from a
charge current that is merely capped by low solar production. Collapsing it into a single
threshold or voltage comparison reintroduces false EOC on overcast days.
<!-- TODO maintainer: list the exact elements that must not be merged (timer, latched state,
compound conditions) — see v1.7.1. -->
## The combiner pipeline
**Files:** `packages/bms/bms_combine.yaml`, `packages/shunt/shunt_combine.yaml`,
`packages/yambms/yambms_core.yaml`
Every BMS and Shunt package instance runs the *same* interval lambda, and they coordinate through
a shared counter rather than through any central loop. Each instance only acts on the tick where
`var_to_combine_bms_number` equals its own `${bms_id}`, then increments the counter so the next
instance can run. `yambms_core.yaml` (STEP 2) waits until every device has been processed, then
resets the counters to `1` for the next round.
This is why `bms_id` **must start at 1 and be contiguous**. It is not a style rule and not only
about the bitmask index: with a gap in the numbering, the counter stops at the missing id, never
advances, and STEP 2 never fires. The whole pipeline deadlocks silently.
Include the BMS and Shunt packages in ascending id order. Out-of-order includes still converge,
but spread one round over several intervals instead of completing in one.
### `can_be_combined` is deliberately exhaustive
The condition in `bms_combine.yaml` checks every sensor the combiner will read. It is long on
purpose: a single missing or `NaN` value entering the totals corrupts the aggregate that drives
the inverter. Do not shorten it to a few representative checks.
Every entity in the condition is mandatory: a BMS with one value missing or `NaN` is not
combined.
The condition is evaluated in STEP 1, on the BMS's turn, and published to the `Can be combined`
binary sensor. Do not move it back into a template lambda: a template binary sensor with a lambda
runs it on every loop, about 60 times per second per BMS, for a value read once per round.
`shunt_combine.yaml` follows the same rules: its condition checks the `Combine enabled` switch,
`online_status` and the four values the combiner reads (`voltage > 0`, then `current`, `power`
and `soc` with `isnan()`), and it is evaluated in STEP 1 on the shunt's turn. A combined shunt
replaces the BMS values, so a `NaN` there would reach the inverter directly.
Note that the checks are not uniform, and the difference is deliberate:
- **Sensors use `!std::isnan()`, not `has_state()`.** ESPHome sets `has_state()` on every
publication, a `NaN` included, so a sensor that has published `NaN` once passes it. A sensor's
state starts at `NaN`, so `isnan()` also covers a sensor that never published.
- **Binary sensors use `has_state()`**, a `bool` cannot be `NaN`.
`total_voltage`, `battery_capacity`, `cell_ovp` and `cell_uvp` use `> 0` — a BMS reporting zero
for those is treated as not ready rather than as a valid reading. For `cell_ovp` and `cell_uvp` it
is also the only test that works: several packages (JK, KS, PACE) declare them as a `number`,
whose state starts at `0`, not `NaN`, so `isnan()` would combine the BMS before its protection
settings are read. `max_charge_current` and `max_discharge_current` use `>= 0`: `0 A` is a valid
limit that a BMS can announce, and it must not take that BMS out of the combination. A `NaN` still
fails the comparison, so a limit that was never received keeps the BMS uncombined.
### STEP 3 only runs on real values
**File:** `packages/yambms/yambms_core.yaml`
STEP 3 is entered only while at least one BMS is combined and every value it reads is real. Its
guard follows the `can_be_combined` rules — `isnan()` or a comparison for sensors, `has_state()`
for binary sensors — because STEP 2 publishes `NaN` when nothing is combined and `has_state()`
stays true after that.
The guard reads the live `var_to_combine_bms_counter`, not `bms_combined`: STEP 3 runs on every
tick, while STEP 2 publishes `bms_combined` only once per round. Reading the counter is what makes
the guard the single "at least one BMS combined" test of STEP 3, with no inner check repeating it.
When the guard fails, the `else` branch suspends the charging logic instead of running it on
`NaN`:
- **`var_charge_status` is not touched.** Running the logic with no BMS forced it to `Wait`, and
the `Init/Wait → Bulk` rebulk rule then restarted a Bulk on a full battery after every dropout.
- **The instructions and requested values are cleared** (`Stop`, off, `NaN`), so that Home
Assistant does not show the last ones during a dropout. No inverter link reads them then: CAN,
PYLON and LIB all stop on `var_initialized`.
- **`var_initialized` is set to false.** STEP 2 already does it when the counter is `0`; the
`else` also covers a round where the counter is back but STEP 2 has not published real values
yet.
### Combined by contribution, combined continuously, uncombined
Three distinct scopes in the same lambda, and they are not interchangeable:
- **By contribution** — `total_installed_battery_capacity` is a maintained total, not a per-round
accumulator. Each BMS remembers the last capacity it contributed in
`bms${bms_id}_installed_capacity` and applies only the *difference* to the total. So the
installed capacity follows a capacity change made at runtime, without a reboot, while an
offline BMS simply stops updating its contribution — which stays in the total. It represents
the *installed* capacity and deliberately does not shrink when a BMS drops offline.
- **Not continuously** — the combined counter is incremented on the transition into the combined
state, not on every tick.
- **Continuously** — the totals, bitmasks and min/max values are recomputed every round.
`total_installed_battery_capacity` must never be 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.
### `bms_seen_online_bitmask` is never cleared
It records that a BMS has been online at least once since boot. `shunt_combine.yaml` uses it to
tell "this BMS is offline" apart from "this BMS was never there" — a shunt must not be
uncombined because of a BMS the user never installed.
### Cell numbers are offset per pack
The combiner reports `cell number + (${bms_id} × 100)`, so cell 8 of BMS 1 is reported as `108`
and cell 3 of BMS 2 as `203`. This makes the pack immediately identifiable in the dashboard. It
caps a pack at 99 cells, which is well beyond any realistic configuration.
### A shunt uncombine turns the user switch off, and does not turn it back on
When a BMS mapped to a shunt goes offline, `shunt_combine.yaml` switches `Combine enabled` off
and records which BMS caused it, so the diagnostic `State` entity can say so. Re-enabling is
deliberately manual: coming back online does not automatically restore the combination, because
the SoC reference has to be trusted before it is used again.
### The `{0}` sentinel in `bms_ids`
`shunt${shunt_id}_bms_map` defaults to `'{0}'` because the vector needs a non-empty initialiser,
and the loop skips id `0` (`if (!bms_id) continue;`). Do not "clean up" the zero — it is what
makes an unmapped shunt valid.
## CAN frame catalogue
**File:** `packages/yambms/yambms_canbus.yaml`
Several `can_id` values are reused with different payloads depending on the protocol:
| CAN ID | Frame | Protocol |
|---|---|---|
| `0x359` | 5 | PYLON |
| `0x359` | 24 | Deye PCS |
| `0x371` | 11 | SEPLOS |
| `0x371` | 28 | Deye PCS |
**A frame's identity is its internal frame number, never its CAN ID.** Do not merge two blocks
because they share a CAN ID — that would break both protocols at once.
Byte order is not uniform either: `0x373` sends min cell voltage before max, `0x361` sends max
before min. Both match their respective specifications. Do not "harmonise" them.
### `0x35A` sends OK as `2`, never as `0`
`0x35A` is sent by PYLON V2, SMA and Victron. Each alarm and warning is a 2-bit field read as a
value: `1` (bit N) is active, `2` (bit N+1) is inactive, `0` and `3` mean not supported or
reserved. So a frame with no alarm is `AA AA AA 02 AA AA AA 02`, which is also what a BYD battery
sends at rest. The reserved fields of bytes 3 and 7 stay at `0`.
Do not go back to an all-zero frame on the grounds that "no bit set means no alarm". The inverter
then reads every field as not supported instead of OK, and the alarm list it displays is empty or
wrong. Do not write `0` for a field either: it is not "off", it is "this battery does not report
it".
### `0x359` does not carry cell imbalance
PYLON V2 uses byte 1 bit 4 of `0x359` for a communication timeout that stops charge and
discharge, and byte 3 bit 4 is reserved. Cell imbalance used to be sent on both, so an imbalance
alarm could stop the inverter. It is only sent on `0x35A` now. Do not put it back in `0x359`.
## Frame sequencing
**File:** `packages/yambms/yambms_canbus.yaml`
Each protocol is defined as a sequence of frame numbers emitted on a fixed interval, so a full
cycle lasts `interval × sequence length` — from a few hundred milliseconds to over a second
depending on the protocol. Some inverters are sensitive to that cadence. Do not change the
interval to make protocols "consistent" with each other.
When adding a frame to a sequence, remember that the sequence length is tracked alongside the
array. Keep the two in sync, or the new frame will silently never be emitted.
## The update and telemetry services must never block the loop task
**File:** `packages/yambms/yambms_service.yaml`
`http_request` runs synchronously on the ESP32 loop task. ESPHome arms the IDF task watchdog at
5s with `CONFIG_ESP_TASK_WDT_PANIC=y`, and feeds it at most every 1 s, so any single blocking
call has a **4s budget** before the device panics and reboots.
Two paths exceed that budget on a network that filters outbound traffic. Both were reproduced on
an OPNsense firewall and measured on hardware:
| Path | Blocking time | Bounded by |
|---|---|---|
| Port 80 dropped silently | 4.5s | `timeout`, whose ESPHome default is 4.5s |
| Port 53 filtered (drop **or** reject) | 7.0 s, fixed | nothing — `timeout` does not cover DNS |
The 7s figure is the lwIP resolver retry ladder (`1 + 1 + 2 + 3`s over `DNS_MAX_RETRIES`), and
it is deterministic to a few milliseconds. A reject is not faster than a drop: lwIP's UDP API has
no error callback, so the ICMP unreachable is counted and discarded, and the query still runs its
full budget. Only an actual DNS *answer* — including `NXDOMAIN` from a local resolver — fails fast.
This is why three separate settings are needed, and none of them is redundant:
- **`watchdog_timeout: 60s`** is the only thing that covers the DNS wait. It is never reached in
normal operation, where a full request takes under 400 ms.
- **`timeout: 3s`** brings the socket phase back under the 4s budget. It does **not** help the
DNS case.
- **The failure counter** (`yambms${yambms_id}_var_service_failures`) is what stops the loop from
freezing for 7s every 6h, forever, on a device that will never reach the internet.
`my_network.is_connected()` is not a reachability test — it only proves the device holds an IP.
It is kept as a cheap first filter, but the counter is the real guard. Do not remove it on the
grounds that the connectivity check above it "already handles this".
The counter is incremented from `on_error`, which fires only when no connection could be made.
An HTTP error status still fires `on_response` and resets the counter, which is correct: the
network worked, so there is no freeze to protect against.
The POST is guarded by an `if` on the counter rather than nested inside the GET's `on_response`.
Nesting would stack one blocking request inside another on a loop task whose stack is 8192 B by
default — see [LOOP_TASK_STACK.md](../LOOP_TASK_STACK.md). It also avoids a second 7s freeze on
a filtered network, halving the worst case.
Reaching 3 failures disables both requests until reboot.
### Two services, one counter
The two requests are gated independently, by substitution and therefore at compile time:
| Substitution | Request | What it does |
|---|---|---|
| `yambms_update_service` | GET | checks the latest published version |
| `yambms_telemetry_service` | POST | sends the node's configuration |
They share **one** counter, and that is deliberate: the counter measures whether the network is
reachable, not whether a given endpoint answered. Both requests block the loop task the same way,
so either one is a valid source of that signal.
This is why the POST carries its own `on_error` / `on_response`, which looks redundant next to
the GET's. It is not. With `yambms_update_service: 'false'` there is no GET, and without those
triggers nothing would ever increment the counter — the POST would freeze the loop for 7s every
6h forever, which is exactly the bug the counter exists to prevent.
The one thing the two services share besides the counter is
`yambms${yambms_id}_var_service_round_failed`: cleared at the start of every round, raised by any
request that could not connect. The POST is skipped when it is set, so a round that has already
frozen the loop once does not freeze it a second time for nothing.
Keep that flag separate from the counter. The counter is cumulative and spans rounds; the
question the POST needs answered is "did a request fail *in this round*", which is not the same
question. Expressing it as `failures == 0` happens to work while the GET runs immediately before
the POST and always writes the counter, but it silently breaks with `yambms_update_service:
'false'`: nothing resets the counter before the guard, so the POST would stop for good after its
first failed round, and the counter would sit at 1 without ever reaching the threshold that
disables the service.
### The interval carries a `startup_delay`
An `interval:` does **not** wait a full period before its first run. The scheduler sets the first
execution at `now + random(0, min(period / 2, 5s))`, capped by `MAX_INTERVAL_DELAY = 5000` — see
the `first execution happens immediately after a random smallish offset` comment in
`core/scheduler.cpp`. A 6h interval therefore fires within 5 seconds of `setup()`.
Without `startup_delay`, that first request lands in the middle of boot: combiner init at
priority 600, the first CAN frames to the inverter, RS485 polling starting up. Whether it runs at
all comes down to a race with the WiFi association, since `is_connected()` is usually still false
that early. That race is also why the reported symptom was a reboot every 6h rather than a boot
loop — but it is a race, not a design, and a fast reconnect after OTA can win it.
`startup_delay: 5min` puts the request outside the boot window and makes the sequence
deterministic on a network that filters outbound traffic:
| t | What happens | `failures` |
|---|---|---|
| 5min | GET fails after 7s, POST skipped | 1 |
| 6h05 | same | 2 |
| 12h05 | same | 3 |
| 18h05 and later | condition is false, no request is made | 3 |
So a device that will never reach the internet freezes for 7s three times over 12 hours, then
never again. The counter is `restore_value: no`, so a reboot replays that sequence — acceptable
for a node meant to run for months, and the reason the threshold is not lower: a single transient
outage must not disable version checking for good.
A version check has no urgency, so the 5min delay costs nothing.
## A derived sensor is published by its source, not polled
**File:** `packages/base/device_base.yaml`
`esp32_uptime` formats the value of `esp32_uptime_sec` for humans. It used to do so from its own
`update_interval: 10s` lambda, reading `id(esp32_uptime_sec).state`.
Two independent pollers reading one another is a race. Each starts with its own random offset in
`[0, 5s)` — see the `startup_delay` note above — so on roughly half of boots the text sensor ran
first and formatted a state that had never been published. That state is `NaN`, and the
`float`→`int` conversion saturates to `INT32_MAX` on Xtensa, which the formatter prints as
`24855d 3h 14m 7s`. It reached the dashboard, the LVGL label, and the telemetry POST, where it
was stored server-side as a real record.
The source's `on_value` now publishes the text sensor, and the lambda formats `x` — the value
that was just published. The failure mode is not guarded against, it cannot occur.
Do not convert it back to a polled lambda with a `has_state()` guard. The guard would work, but
it leaves two pollers where one is enough, and it puts the ordering question back in front of
whoever edits the file next.
`esp32_date_time_now` keeps its own poller, because it has no source sensor to hang a trigger on.
There the guard is `now().is_valid()`, and it is the right tool: the problem is an NTP sync that
may not have happened yet, not a scheduling order.
## The inverter protocol is resolved once, never in the loop
**Files:** `packages/yambms/yambms_brand_registry.yaml`, `packages/yambms/yambms_canbus.yaml`,
`packages/yambms/yambms_rs485.yaml`
The protocol actually applied on a link is not readable from a single select. It is the result of
a resolution with two inputs: the `Protocol` select, and — when that one is on `Automatic` — the
`Inverter brand` select passed through the registry's mapping.
That resolution runs in a script, triggered at boot and on `on_value` of either select, and its
result is stored in `canbus${canbus_id}_active_protocol` / `rs485${rs485_id}_active_protocol`.
Everything else only reads that integer.
Do not inline the resolution back into the consumers. The 100 ms sequencing interval, the five
protocol branches and the four LuxPower payload tweaks would each redo a table lookup and a
series of `std::string` comparisons ten times a second, for a value that only changes when a user
touches a select.
Do not dispatch on `active_index()` either. That is what the code did before: `active_index() == 5`
meant LuxPower purely by convention of the option order, so reordering the select silently broke
four payload branches in different frames. The `YB_PROTO_*` constants are named, and the
conversion from option string to constant exists in exactly one place — the resolution script.
`on_value` is used and **not** `set_action`: `TemplateSelectWithSetAction::control()` fires the
set trigger *before* `publish_state()`, so a script called from `set_action` would read the
previous option.
### The resolution must not run during setup
`on_value` also fires when the select restores its value, at `setup_priority::HARDWARE` (800).
The telemetry slot, on the other hand, is reserved in `on_boot` at `priority: -100`. Between the
two, the vectors in `yambms_core.yaml` are still empty, so the script would index element `0` of
an empty `std::vector` and the device would crash on every boot. The registry's `std::function`
globals are at `HARDWARE` too, so calling them that early is a race of its own.
`canbus${canbus_id}_link_ready` / `rs485${rs485_id}_link_ready` is what closes both holes: the
script returns immediately until the slot has been reserved, and the reservation raises the flag
then runs the script explicitly. Do not drop that guard on the grounds that the `has_state()`
check above it already protects the script — it does not, it only proves the selects have a value.
### The `YB_PROTO_*` values are internal
They are never persisted, never published to Home Assistant and never sent to the telemetry
service — the label from `global_inverter_protocol_label()` is what leaves the device. So the
ranges can be renumbered or extended at any time with no impact on existing nodes.
The two invariants that do bind are elsewhere: the **order of the select options**, because
`restore_value` stores an index (append new brands and protocols at the end, never insert), and
the **labels**, because they carry the continuity of the collected telemetry.
### Turning the RS485 link off means invalidating its proxies
**File:** `packages/yambms/yambms_rs485_pylon.yaml`
`pylontech_rs485` is passive: it answers the inverter from the proxy sensors YamBMS feeds. Stopping
the 100 ms interval therefore does **not** stop the link — the proxies keep their last value,
`update_state_from_sensors_()` still returns true, and the component keeps answering with stale
data while refreshing `rs485_status`, which is why the status stayed ON.
The component's own fail-safe is a `NaN` on any of the eight sensors it checks. The `else` branch
of the interval publishes those `NaN` once per transition, guarded by
`rs485${rs485_id}_proxies_valid` so it does not run ten times a second.
Only those eight sensors matter — the ones read by `update_state_from_sensors_()`. Invalidating the
others would be harmless but pointless, and would hide which ones the contract actually depends on.
### On RS485 the protocol is compiled, the brand only gates it
**Files:** `packages/yambms/yambms_rs485.yaml`, `packages/yambms/yambms_rs485_pylon.yaml`,
`packages/yambms/yambms_rs485_voltronic.yaml`
`rs485_protocol` picks the implementation at compile time, and each implementation declares what
it is in `rs485${rs485_id}_compiled_protocol`. In `Automatic` the resolution script applies that
value and never derives a protocol from the brand: a node can only speak what was compiled into
it, and resolving anything else made the diagnostics describe a protocol that was not running.
Voltronic and MPP Solar are the reason this cannot be a brand mapping. On recent firmwares,
parameter `05` offers both `PYL` and `LIB` on RS485, so either implementation is a valid choice
for the same inverter and the brand says nothing about which one was compiled.
`LIB` is the one exception. It is a Voltronic protocol and no other brand can use it, so in
`Automatic` a node compiled for `LIB` stays silent for any other brand, and `Note` says why.
Forcing `LIB` is still possible, because an explicit protocol always takes priority over the
brand. Rebranded inverters are expected to select `Voltronic`. MPP Solar is not a rebrand, which
is why it has its own entry.
### Turning the LIB link off means moving its Modbus address
**File:** `packages/yambms/yambms_rs485_voltronic.yaml`
`modbus_server` has no off switch, and returning nothing from a `read_lambda` only turns the reply
into an exception frame, so the inverter still gets an answer on a link that should be silent.
`ModbusServerHub::find_device_()` matches the address on every request, so moving the server to
address `248` makes the hub drop the request instead. The 100 ms interval moves it back to `1`
only while `rs485${rs485_id}_active_protocol` is `LIB` **and** YamBMS is initialized
(`var_initialized` and at least one BMS combined).
The second condition is the gate the CAN and PYLON links already apply: no frame on CAN, `NaN`
proxies on PYLON. Without it, the LIB link answered during a boot or a BMS dropout, and its
`read_lambda`s converted the `NaN` values to integers, which is undefined. The status mirroring
still follows `active` only: an active link left silent serves no request, its `Status` goes
false and raises the fault, exactly like the other links during a dropout.
Do not replace this with reported charge and discharge limits of zero: the inverter would still
see a battery, on a link the user believes is off.
### `Disabled` unregisters the link instead of faulting it
**File:** `packages/base/device_base_fault_registry.yaml`
Turning a link off stops the frames, so the inverter stops acknowledging, the link timer expires
and the status binary sensor goes false. Fed straight into `global_update_fault()` that lights the
fault LED for something the user asked for.
The registry already had the right answer: state `2`, which both the master mask and the health
report ignore. `global_update_fault()` only takes a `bool`, so it can write `0` or `1` and nothing
else — hence `global_unregister_fault()`, added alongside it.
Do not use `Healthy` for a disabled link. It would clear the LED just as well, but the health
report would print `[ OK ]` for a link that sends nothing, which is worse than the bug it fixes.
The guard exists in **two** places and both are needed: the resolution script applies it when the
protocol changes, and the status sensor's `on_state` applies it on every subsequent state change.
Without the second one the link timer would re-raise the fault a few seconds later.
A link left at `Automatic` with no brand selected is deliberately **not** unregistered — it faults.
That is the signal telling the user the node was never configured, which is the whole point of the
1.8.0 breaking change.
### Both ACK triggers are registered
`canbus.cpp` matches a trigger on `can_id` **and** `use_extended_id`, so declaring `0x305` twice —
once standard, once extended — is not a conflict: only the one matching the received frame fires.
This is why the Schneider XW Pro extended ACK needs no configuration, and why the
`canbus_extended_ack` substitution was removed. Both triggers call the same script so the handler
is not duplicated.
## The CCL/DCL divider counts declared links, not active ones
**Files:** `packages/yambms/yambms_core.yaml`, `packages/yambms/yambms_canbus.yaml`,
`packages/yambms/yambms_rs485.yaml`
Each inverter link increments `yambms${yambms_id}_var_comm_interfaces_count` once, in its
`on_boot` at priority `-100`, and the requested CCL and DCL are divided by that counter. The
counter never goes down. A link whose `Protocol` is `Disabled`, a link left on `Automatic` with no
brand, and a link whose inverter stopped answering all keep dividing.
Do not make it count only the active links. In every case where a declared link is not active, the
inverter behind it may still be drawing from the bank:
- `Disabled` is meant to cut a link temporarily. The inverter is usually still connected to the
bank and running on its own settings, and the share the others are not given is the margin it
uses.
- `Automatic` with no brand is an unfinished configuration, and every link starts there after the
1.8.0 breaking change. Excluding it would hand the full current to the first link configured.
- A lost link must never raise the current, or a transient communication loss would double the
limit sent to the remaining inverters.
A link that is not wired to anything has no business in the YAML, so the divider is changed by
changing what is declared. This is why `YamBMS_Local_Packages_example.yaml` ships its RS485 link
commented out, like the Remote Packages template.
If this is ever revisited, count the excluded links and subtract them, never count the active ones.
A mask of active links is empty until the resolution script has run, which gives a divider of `1`
and the full current; a mask of excluded links defaults to the declared count.
## A UART is declared by the package that consumes it
**Files:** `packages/board/board_options_itf_uart_*.yaml`, every package taking a `*_uart_id`
The main YAML names a UART once, in the `vars:` of the package that uses it, and that package
imports the matching `board_options_itf_${xxx_uart_id}.yaml`. It replaces a two-step declaration,
an `uart_esp_N` include followed by a `!extend` of the baud rate, which could not reach a WK2168
channel: those live under `wk2168_spi[].uart[]`, so every consumer needed an `_expander` twin
without the `uart:` block.
### One importer per UART
Two imports of the same UART fail with `ID uart_esp_1 redefined`, on an expander channel too. Keep
it that way. Sharing a UART at two speeds has no valid meaning, and with the old `!extend` it did
not fail: the extended value simply won, so an inverter link declared at 115200 silently ran at
the 9600 of a BMS package on the same UART.
This is why bus-level packages import the UART, not the per-BMS ones: a bus package is included
once, the BMS packages on that bus several times.
### Each package keeps its key, `uart_baud_rate` stays internal
Every package exposes its own key (`rs485_uart_baud_rate`, `pace_modbus_baud_rate`,
`shunt_uart_baud_rate`...) and maps it to `uart_baud_rate` in the `vars:` of the import. Do not
expose `uart_baud_rate` itself: with `${uart_baud_rate | default(...)}` in every package, one value
in a root `substitutions:` block would override all the consumers of the node, defaults included.
The defaults live in that `| default()` and nowhere else:
- **Not in `substitutions:`.** Package substitutions are merged into one global block, so
`bms_uart_baud_rate` would get the same value for JBD (9600), JK UART (115200) and JK Display
(2400), with no error.
- **Not in the UART file.** It does not know who imports it, and a wrong speed is valid
configuration that fails silently on the wire. This is what the old fixed `115200` hid: the JK
UART, JK sniffer and Junctek packages only worked because that value happened to suit them.
- **Not as a fixed value.** A value written in the `vars:` of the import takes priority over the
one passed by the user, who is ignored without a message.
Leave `| default()` out when the speed depends on the installation (PACE, EG4, Seplos, BASEN): a
missing key then fails validation instead of picking a speed.
`modbus_baud_rate` is the exception that keeps its place in `substitutions:`: `yambms_config.yaml`
shares it between the nodes of a multi-node setup from the root.
### `flow_control` is enabled by a var, so `min_version` is at least 2026.10.0
`uart_flow_control_pin` is passed like any other var of the import and reaches the UART file,
which includes `board_options_itf_uart_flow_control.yaml` only when it is defined. So no consumer
has to know about it.
`flow_control_pin: ${uart_flow_control_pin}` with an empty default is not an option, the UART
schema refuses a null pin. The `condition:` key of `!include` is what makes the pin optional, and
ESPHome 2026.8.0 ignores it: the file is included anyway and the configuration fails. Do not lower
`min_version` without replacing it.
This `!extend` is the last one on a UART. It is not exposed to the user, and it works whatever the
order of the packages.
### Expander channels
`uart_spi_N` and `uart_i2c_N` are numbered like the PVbrain2 connectors: `0` to `3` on bridge 0,
`4` to `7` on bridge 1. Do not shift them to start at 1, every existing wiring would move by one
channel.
Each channel adds itself with `!extend uart_bridgeN`, and the bridges are declared with an empty
`uart:` by `board_options_itf_wk2168_spi.yaml` or `board_options_itf_wk2168_i2c.yaml`.
A WK2168 channel has no `flow_control_pin`, so `uart_flow_control_pin` is ignored there, without a
message. Its RS485 transceivers must handle the direction automatically. The `_talk_pin` packages
are kept for that one case: they drive a plain GPIO from the component, which works on any UART.
Everywhere else `uart_flow_control_pin` replaces them, and the examples no longer show them.
The UART id must be readable when the `!include` filename is resolved. A value built from a
substitution declared in a package, such as `uart_${uart_hub_bus}_3`, is not, so write `uart_spi_3`.
## A CAN node is declared by the package that consumes it
**Files:** `packages/board/board_options_itf_canbus_*.yaml`, `packages/yambms/yambms_canbus.yaml`,
`packages/bms/bms_sensors_DEYE_CAN_top_*.yaml`
Same principle as the UART: the main YAML describes a link once, in the `vars:` of the package that
uses it. The mechanism is not the same, and the differences are deliberate.
### The file is picked by platform, not by id
`uart_esp_1` is bound to pins and says nothing about what is connected. A CAN node is the reverse:
its id is a role (`canbus_inverter_1`, `canbus_bms_1`) that users read and reuse, and the hardware
behind it is either of two controllers. Naming the file after the id would have replaced those
roles with `canbus_esp_1`-style names for no gain.
So the id stays free in `canbus_node_id` and `canbus_platform` picks the file, the way
`rs485_protocol` picks the RS485 implementation.
### `canbus_platform` has no default
A wrong default is valid configuration on the wrong pins, and it fails silently on the wire. A
missing key fails validation instead, with `Cannot load include with unresolved substitutions`.
### `external` declares nothing
The import is unconditional, so a node that already exists needs a file that adds nothing:
- the espBerry board declares its two nodes in its own board file ;
- a second link on the same node would otherwise fail with `ID canbus_inverter_1 redefined`.
`board_options_itf_canbus_external.yaml` is that file. `canbus_bitrate` has no effect there, the
bit rate is the one of the package or board that declares the node.
### One importer per node
As with a UART, two imports of the same node fail, and that should stay so. This is why only the
Deye `top` packages import the node: the `module` packages are included several times on one bus
and only add `on_frame` triggers with `!extend`.
In the Deye packages `canbus_id` holds a node id, while in `yambms_canbus.yaml` it is a number. The
`top` packages map it with `canbus_node_id: ${canbus_id}` so that the examples keep their key.
`board_options_itf_canbus_mcp2515.yaml` declares its own `spi:` bus, so importing it twice fails
with `ID mcp2515_spi_bus redefined`. A board with two MCP2515 declares them itself and uses
`external`, as the espBerry does.
### `canbus_bit_rate` stays internal
The reasoning is the UART one: the default lives in the `| default()` of the consumer, not in the
CAN file nor in `substitutions:`. `esp32_canbus_bitrate` and `mcp2515_canbus_bitrate` were removed,
the bit rate is not a property of the controller but of the bus.
### The bit rate is set at compile time, the protocol is not
`canbus_bitrate` is compiled in, and nothing in YamBMS changes it at runtime, while the `Protocol`
select does change at runtime. So a protocol that does not run at 500 kbps cannot work from the
select alone: the user must also set `canbus_bitrate`. Any such protocol needs a `Note` in
`yambms_brand_registry.yaml` that says so.
## Empirical constants
Some constants were found by trial on real hardware and must not be rounded or harmonised.
<!-- TODO maintainer: list them here, in the form "do not lower <value> below <threshold>, or
<symptom>" — at minimum loop_task_stack_size, update intervals, RS485 timings. -->
@@ -0,0 +1,59 @@
# YamBMS - How to perform a PR to the dev branch
[![Badge License: GPLv3](https://img.shields.io/badge/License-GPLv3-brightgreen.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![Badge Version](https://img.shields.io/github/v/release/Sleeper85/esphome-yambms?include_prereleases&color=yellow&logo=DocuSign&logoColor=white)](https://github.com/Sleeper85/esphome-yambms/releases/latest)
![GitHub stars](https://img.shields.io/github/stars/Sleeper85/esphome-yambms)
![GitHub forks](https://img.shields.io/github/forks/Sleeper85/esphome-yambms)
![GitHub watchers](https://img.shields.io/github/watchers/Sleeper85/esphome-yambms)
## 1. Fork the repository
This step still happens on the GitHub website: go to https://github.com/Sleeper85/esphome-yambms and click **Fork** (top right).
## 2. Clone your fork with GitHub Desktop
- Open GitHub Desktop → **File → Clone Repository**
- In the **GitHub.com** tab, select `YOUR_USERNAME/esphome-yambms`
- Choose a local folder and click **Clone**
- GitHub Desktop will ask: *"How are you planning to use this fork?"* → select **To contribute to the parent project** (this makes syncing with the original repo easier later)
## 3. Switch to the `dev` branch
- Click the **Current Branch** button (top toolbar)
- Select `dev` from the list
- Click **Fetch origin** to make sure it's up to date
## 4. Create a new branch based on `dev`
- Click **Current Branch → New Branch**
- Name it something meaningful, e.g. `PR_fix_EOC_detection`
- ⚠️ In the dialog, GitHub Desktop asks which branch to base it on — select `dev`, not `main`
- Click **Create Branch**
## 5. Make your changes and commit
- Edit the files with your usual editor (VS Code, etc.)
- Back in GitHub Desktop, your modified files appear in the left panel
- Check the files you want to include
- Write a commit summary (e.g. *"Fix false EOC detection under low PV production"*) and click **Commit to PR_fix_EOC_detection**
## 6. Publish the branch**
- Click **Publish branch** (top toolbar). This pushes your branch to your fork on GitHub.
## 7. Open the Pull Request
- Click **Branch → Create Pull Request** (or the **Preview Pull Request** button). This opens GitHub in your browser.
- Verify the settings:
- **base repository:** `Sleeper85/esphome-yambms` → **base:** `dev`
- **head repository:** your fork → **compare:** `PR_fix_EOC_detection`
- ⚠️ Again, GitHub may default to `main` as the base — switch it to `dev`
- Add a clear title and description, then click **Create pull request**
## Keeping your branch up to date later (if needed)
- In GitHub Desktop: **Branch → Update from upstream/dev** (available if you selected "contribute to parent project" when cloning)
- Or: **Current Branch → choose your branch → Branch → Rebase current branch...** onto `upstream/dev`
- Then **Push origin** (Desktop will prompt for a force push if you rebased)
The main advantage for contributors: no command line needed at all, except the initial fork which is always done on the website.
+83
View File
@@ -0,0 +1,83 @@
# Project structure
YamBMS is a set of **ESPHome YAML packages** — there is no compiled application code beyond a few
embedded C++ lambdas. It merges data from several BMS / Shunt / Balancer units and drives an
inverter over CAN or RS485 (PYLON / SMA / Victron / LuxPower). All the logic lives in YAML
(`substitutions`, `packages: !include`, `lambda:`) and is assembled by the ESPHome compiler.
## Entry points
- **`YamBMS_LP_*.yaml`** — *Local Packages*. Requires the `packages/` folder to be present
locally.
- **`YamBMS_RP_*.yaml`** — *Remote Packages*. Pulls the packages from GitHub (`!include` on a
`github://` URL). This is what most users run.
Differences and structure are detailed in [YamBMS_LP_YAML.md](../YamBMS_LP_YAML.md) and
[YamBMS_RP_YAML.md](../YamBMS_RP_YAML.md).
- **`YamBMS_Local_Packages_example.yaml`** / **`YamBMS_Remote_Packages_example.yaml`** — starting
templates.
- **`yambms_config.yaml`** — Modbus substitutions shared between several nodes in a multi-node
setup.
- **`yambms_custom.yaml`** — snippets meant to be copy-pasted into the main YAML (extra switches
and services). Not included by default.
- **`examples/single-node/`** and **`examples/multi-node/`** — ready-to-copy `!include` blocks for
a given BMS, Shunt or Balancer.
## The `packages/` tree
### `base/`
Generic device building block: ESPHome core, WiFi, Ethernet, `sub_device` declarations, the fault
registry (`device_base_fault_registry.yaml`), memory and PSRAM debug helpers.
### `board/`
One file per board (`board_ESP32-S3_*.yaml`) defining pins and GPIO. The `board_options_*.yaml`
files are optional building blocks — CAN, PSRAM, LVGL display, WiFi AP — included separately
depending on the hardware.
The `board_options_itf_uart_*.yaml` files are the exception: they are not included from the main
YAML. Each one declares a single UART (`uart_esp_N`, `uart_N` on the RPi Pico, `uart_spi_N` and
`uart_i2c_N` on a WK2168) and is imported by the package that consumes that UART, from its
`*_uart_id` var. A WK2168 only needs `board_options_itf_wk2168_spi.yaml` or
`board_options_itf_wk2168_i2c.yaml` in the main YAML, which declares the bridges.
The `board_options_itf_canbus_*.yaml` files follow the same rule: `yambms_canbus.yaml` and the
Deye top packages import the one named by their `canbus_platform` var (`esp32_can`, `mcp2515`, or
`external` for a node declared elsewhere).
### `bms/`, `shunt/`, `balancer/`
All three follow the same layered scheme, per brand and protocol:
| File pattern | Role |
|---|---|
| `*_combine_<Brand>_<Interface>_<variant>.yaml` | The file you include from your main YAML. Assembles the layers below. |
| `*_modbus_<Brand>_*.yaml` | Modbus register mapping (RS485/Modbus BMS only). |
| `*_sensors_<Brand>_*.yaml` | Declaration of the exposed ESPHome entities. |
| `*_errors_bitmask_<Brand>.yaml` | Alarm bit mapping. |
| `*_base*.yaml` | Brand-agnostic shared logic: combining engine, SoC/SoH, cycles, LED. |
### `yambms/`
The central engine. `yambms.yaml` aggregates `yambms_brand_registry.yaml`,
`yambms_core.yaml`, the `yambms_auto_*.yaml` functions (CVL / CCL / DCL / Float / EOC /
temperature / SoC limit) and `yambms_service.yaml`, then `yambms_canbus*.yaml` or
`yambms_rs485*.yaml` for the link to the inverter.
`yambms_brand_registry.yaml` holds the protocol dictionary (`YB_PROTO_*`), the brand to
protocol mapping and the per-couple battery mode and note. Both inverter buses read it.
On the RS485 side, `yambms_rs485.yaml` is the entry point — selects, diagnostics, telemetry
slot — and it includes the protocol implementation, currently `yambms_rs485_pylon.yaml`.
## Where the behaviour is documented
The structure above tells you where code lives, not what it does. For the charging logic and the
auto functions, read:
- [Charging_logic.md](../Charging_logic.md)
- [YamBMS_functions.md](../YamBMS_functions.md)
- [YamBMS_behavior.md](../YamBMS_behavior.md)
- [Supported_devices.md](../Supported_devices.md) — supported BMS, shunts and inverters.
+74
View File
@@ -0,0 +1,74 @@
# Why YamBMS, if my BMS already talks to my inverter?
Most YamBMS installations run on BMS models that can be wired straight to an inverter — JK
accounts for about 72% of them, and RS485 for about 65% of the links. These users could skip
YamBMS entirely. They don't.
The reason is that a working link is not the same as a good one. Your BMS firmware is closed and
its logic is fixed. Your inverter's firmware is closed and has its own quirks. YamBMS sits
between the two and is the only layer in that chain you can actually configure, observe and fix.
## Does any of this sound familiar?
**"My SoC drifts further off every week, ever since I stopped charging to 100%."**
A BMS estimates SoC by counting coulombs through its own internal shunt, and recalibrates when
the pack reaches full charge. If you deliberately stop short of full — which is exactly what you
should do to limit calendar ageing — that recalibration never happens and the error accumulates.
This is not a firmware bug that a future update will fix; it is the limit of the method.
It matters more than a wrong gauge reading, because many inverters make their decisions from
SoC. A drifting SoC produces an inverter that cuts discharge too early, force-charges for no
reason, or switches to grid at the wrong moment. You end up troubleshooting the inverter when
the real problem is upstream.
YamBMS lets you combine an external shunt and use **its** SoC as the reference sent to the
inverter — measured on the real system current, independent of what each BMS believes about its
own pack. This is the problem the project was originally built to solve.
**"My inverter charges at a higher voltage than the BMS asked for."**
Some inverters hold their output slightly above the requested CVL — around 0.1 to 0.3 V. A BMS
wired directly has no way to react: it sends its setpoint and lives with the result. `Auto CVL`
is a PI controller that measures the actual result and trims the request until the pack sits
where it should.
**"My inverter discharges the battery when it switches from Bulk to Float."**
A sudden drop in requested voltage can make an inverter pull the pack back down to the new
target instead of simply stopping. `Auto Float` ramps the voltage down gradually instead of
stepping it, so the transition stays smooth.
**"My battery sits at 100% all day and I worry about its lifespan."**
`Auto SoC Limit` lets you charge to a target SoC instead of to full, switching to `Float`,
limiting the charge current, or both once the limit is reached.
**"One cell hits OVP at the end of charge while the others are still well below."**
Cells with different internal resistance diverge under current — the weakest one runs ahead and
trips the alarm. `Auto CCL Current Taper` reduces the charge current along a knee-to-bulk curve
so the pack reaches bulk cleanly, then holds a low balance current so there is a real balancing
window instead of a race to zero.
**"I added a third BLE pack and the connections keep dropping."**
An ESP32 saturates after a small number of simultaneous BLE links. YamBMS's server/client
architecture turns each BLE, UART or RS485 BMS into a Modbus RS485 node, so the number of packs
is no longer limited by the BLE stack. Every server node still publishes its full telemetry to
Home Assistant on its own; only the values needed for aggregation travel on the bus.
## Where it also helps
- **Inverters that follow a protocol loosely.** SRNE units and their rebranded variants are a
recurring case with PYLON RS485. YamBMS speaks several inverter protocols and is fixed on the
YamBMS side when an inverter misbehaves — you don't have to wait for a firmware release.
- **Mixed batteries.** Different BMS brands or models that cannot talk to each other are
combined into a single view and a single link to the inverter.
- **Non-communicating BMS.** YamBMS supplies the communication layer that isn't there.
- **Active balancers.** Supervised in the same device rather than left as a silent box in the
corner.
- **Visibility.** Everything lands in Home Assistant — per-pack entities, a ready-made dashboard,
and an optional LVGL display.
## When you don't need it
If your BMS drives your inverter correctly, your SoC is accurate, and the default behaviour
suits you, you don't need YamBMS. It earns its place when the fixed logic on either side stops
matching what you want from your system.
*Around 256 installations are running today.*
@@ -57,6 +57,11 @@ packages:
bms_cell_ovp: '3.650' # V Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V Used by 'Auto CVL' functions
# Fake Equalizing: this BMS does not report its balancing state. When enabled, YamBMS infers it
# from the cell spread and holds the Cut-Off timer while the pack balances, instead of ending the charge.
# Warning: a BMS without a balancer (or with balancing disabled) never closes its cell spread, so it can
# stay in Cut-Off a long time, until the EOC timer (30min default) ends the charge, or forever if disabled.
bms_fake_equalizing_enabled: 'true' # true/false, false by default
bms_charging_cycles: '178' # charging cycles number Used to calculate the SoH
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
@@ -79,6 +84,11 @@ packages:
bms_cell_ovp: '3.650' # V Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V Used by 'Auto CVL' functions
# Fake Equalizing: this BMS does not report its balancing state. When enabled, YamBMS infers it
# from the cell spread and holds the Cut-Off timer while the pack balances, instead of ending the charge.
# Warning: a BMS without a balancer (or with balancing disabled) never closes its cell spread, so it can
# stay in Cut-Off a long time, until the EOC timer (30min default) ends the charge, or forever if disabled.
bms_fake_equalizing_enabled: 'true' # true/false, false by default
bms_charging_cycles: '226' # charging cycles number Used to calculate the SoH
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
@@ -101,5 +111,10 @@ packages:
bms_cell_ovp: '3.650' # V Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V Used by 'Auto CVL' functions
# Fake Equalizing: this BMS does not report its balancing state. When enabled, YamBMS infers it
# from the cell spread and holds the Cut-Off timer while the pack balances, instead of ending the charge.
# Warning: a BMS without a balancer (or with balancing disabled) never closes its cell spread, so it can
# stay in Cut-Off a long time, until the EOC timer (30min default) ends the charge, or forever if disabled.
bms_fake_equalizing_enabled: 'true' # true/false, false by default
bms_charging_cycles: '194' # charging cycles number Used to calculate the SoH
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
@@ -32,6 +32,8 @@ packages:
vars:
# CAN BUS ID
canbus_id: 'canbus_bms_1'
canbus_platform: 'mcp2515' # esp32_can / mcp2515
canbus_bitrate: '500kbps' # Default : 500kbps
deye_name: 'DEYE-Top 1'
deye_id: '1'
@@ -1,5 +1,5 @@
# Updated : 2026.02.16
# Version : 1.1.4
# Updated : 2026.08.29
# Version : 1.1.5
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -39,6 +39,12 @@ packages:
bms_name: 'EG4-BMS 1'
## BMS address must start at 2 with EG4 LLV2, ID 1 is a special case and has different output.
bms_address: 2 # BMS 1 modbus address
bms_balance_trigger_voltage: '0.030' # V. Cell spread at which the BMS balances, set yours
# Fake Equalizing: this BMS does not report its balancing state. When enabled, YamBMS infers it
# from the cell spread and holds the Cut-Off timer while the pack balances, instead of ending the charge.
# Warning: a BMS without a balancer (or with balancing disabled) never closes its cell spread, so it can
# stay in Cut-Off a long time, until the EOC timer (30min default) ends the charge, or forever if disabled.
bms_fake_equalizing_enabled: 'false' # true/false, false by default
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
bms2: !include
@@ -47,6 +53,12 @@ packages:
bms_id: '2' # must be a number
bms_name: 'EG4-BMS 2'
bms_address: 3 # BMS 2 modbus address
bms_balance_trigger_voltage: '0.030' # V. Cell spread at which the BMS balances, set yours
# Fake Equalizing: this BMS does not report its balancing state. When enabled, YamBMS infers it
# from the cell spread and holds the Cut-Off timer while the pack balances, instead of ending the charge.
# Warning: a BMS without a balancer (or with balancing disabled) never closes its cell spread, so it can
# stay in Cut-Off a long time, until the EOC timer (30min default) ends the charge, or forever if disabled.
bms_fake_equalizing_enabled: 'false' # true/false, false by default
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
bms3: !include
@@ -55,4 +67,10 @@ packages:
bms_id: '3' # must be a number
bms_name: 'EG4-BMS 3'
bms_address: 4 # BMS 3 modbus address
bms_balance_trigger_voltage: '0.030' # V. Cell spread at which the BMS balances, set yours
# Fake Equalizing: this BMS does not report its balancing state. When enabled, YamBMS infers it
# from the cell spread and holds the Cut-Off timer while the pack balances, instead of ending the charge.
# Warning: a BMS without a balancer (or with balancing disabled) never closes its cell spread, so it can
# stay in Cut-Off a long time, until the EOC timer (30min default) ends the charge, or forever if disabled.
bms_fake_equalizing_enabled: 'false' # true/false, false by default
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
@@ -1,5 +1,5 @@
# Updated : 2026.02.16
# Version : 1.1.5
# Updated : 2026.11.11
# Version : 1.1.6
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -29,19 +29,11 @@ packages:
# The sniffer represents the ESP node connected to the JK-BMS PB RS485 bus
# If address 0x00 is not detected on the RS485 bus, the sniffer will act directly as a master BMS (mode 2, max 15 BMS)
# RS485 Sniffer with talk_pin (WS-RS485-CAN and other RS485 boards with a flow_control_pin)
# sniffer1: !include
# file: packages/bms/bms_combine_JK_RS485_Modbus_sniffer_talk_pin.yaml
# vars:
# sniffer_protocol: 'JK02_32S'
# sniffer_uart_id: 'uart_esp_1'
# sniffer_talk_pin: ${talk_pin} # can be replaced by the GPIO number
sniffer1: !include
file: packages/bms/bms_combine_JK_RS485_Modbus_sniffer.yaml
vars:
sniffer_protocol: 'JK02_32S'
sniffer_uart_id: 'uart_esp_1'
# uart_flow_control_pin: ${talk_pin} # WS-RS485-CAN and other RS485 boards with a flow_control_pin
# Mode2 : configure the DIP switches of your BMS from 0x01 to 0x0F (don't use the 0x00 address, maximum 15 BMS)
bms1: !include
@@ -1,5 +1,5 @@
# Updated : 2026.02.16
# Version : 1.1.5
# Updated : 2026.11.11
# Version : 1.1.6
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -29,19 +29,11 @@ packages:
# The sniffer represents the ESP node connected to the JK-BMS PB RS485 bus
# If address 0x00 is not detected on the RS485 bus, the sniffer will act directly as a master BMS (mode 1, max 16 BMS)
# RS485 Sniffer with talk_pin (WS-RS485-CAN and other RS485 boards with a flow_control_pin)
# sniffer1: !include
# file: packages/bms/bms_combine_JK_RS485_Modbus_sniffer_talk_pin.yaml
# vars:
# sniffer_protocol: 'JK02_32S'
# sniffer_uart_id: 'uart_esp_1'
# sniffer_talk_pin: ${talk_pin} # can be replaced by the GPIO number
sniffer1: !include
file: packages/bms/bms_combine_JK_RS485_Modbus_sniffer.yaml
vars:
sniffer_protocol: 'JK02_32S'
sniffer_uart_id: 'uart_esp_1'
# uart_flow_control_pin: ${talk_pin} # WS-RS485-CAN and other RS485 boards with a flow_control_pin
# Mode1 : configure the DIP switches of your BMS from 0x00 to 0x0F (max 16 BMS)
bms1: !include
@@ -1,5 +1,5 @@
# Updated : 2026.02.16
# Version : 1.1.5
# Updated : 2026.11.11
# Version : 1.1.6
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -29,19 +29,11 @@ packages:
# The sniffer represents the ESP node connected to the JK-BMS PB RS485 bus
# If address 0x00 is not detected on the RS485 bus, the sniffer will act directly as a master BMS (mode 2, max 15 BMS)
# RS485 Sniffer with talk_pin (WS-RS485-CAN and other RS485 boards with a flow_control_pin)
# sniffer1: !include
# file: packages/bms/bms_combine_JK_RS485_Modbus_sniffer_talk_pin.yaml
# vars:
# sniffer_protocol: 'JK02_32S'
# sniffer_uart_id: 'uart_esp_1'
# sniffer_talk_pin: ${talk_pin} # can be replaced by the GPIO number
sniffer1: !include
file: packages/bms/bms_combine_JK_RS485_Modbus_sniffer.yaml
vars:
sniffer_protocol: 'JK02_32S'
sniffer_uart_id: 'uart_esp_1'
# uart_flow_control_pin: ${talk_pin} # WS-RS485-CAN and other RS485 boards with a flow_control_pin
# Mode2 : configure the DIP switches of your BMS from 0x01 to 0x0F (don't use the 0x00 address, maximum 15 BMS)
bms1: !include
@@ -0,0 +1,45 @@
# Updated : 2026.08.26
# Version : 1.1.0
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
# This YAML is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
############################ Local Packages Example ############################
# This is not a working YAML but just code ready to copy into
# your main YAML below the `packages:` section.
################################################################################
packages:
bms1: !include
file: packages/bms/bms_combine_KS_BLE_standard.yaml
vars:
bms_id: '1' # must be a number
bms_name: 'KS-BMS 1'
bms_ble_mac_address: 'C8:47:8C:10:7E:AA' # Your MAC address
bms_ks_device_type: '1' # 1 = KS48100 / KS48300-Ho23, 2 = KS48200-Ho21_V2
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
bms2: !include
file: packages/bms/bms_combine_KS_BLE_standard.yaml
vars:
bms_id: '2' # must be a number
bms_name: 'KS-BMS 2'
bms_ble_mac_address: 'C8:47:8C:EE:16:EA' # Your MAC address
bms_ks_device_type: '1' # 1 = KS48100 / KS48300-Ho23, 2 = KS48200-Ho21_V2
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
@@ -47,6 +47,11 @@ packages:
bms_cell_ovp: '3.650' # V. Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V. Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V. Used by 'Auto CVL' functions
# Fake Equalizing: this BMS does not report its balancing state. When enabled, YamBMS infers it
# from the cell spread and holds the Cut-Off timer while the pack balances, instead of ending the charge.
# Warning: a BMS without a balancer (or with balancing disabled) never closes its cell spread, so it can
# stay in Cut-Off a long time, until the EOC timer (30min default) ends the charge, or forever if disabled.
bms_fake_equalizing_enabled: 'false' # true/false, false by default
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
bms2: !include
@@ -64,6 +69,11 @@ packages:
bms_cell_ovp: '3.650' # V. Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V. Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V. Used by 'Auto CVL' functions
# Fake Equalizing: this BMS does not report its balancing state. When enabled, YamBMS infers it
# from the cell spread and holds the Cut-Off timer while the pack balances, instead of ending the charge.
# Warning: a BMS without a balancer (or with balancing disabled) never closes its cell spread, so it can
# stay in Cut-Off a long time, until the EOC timer (30min default) ends the charge, or forever if disabled.
bms_fake_equalizing_enabled: 'false' # true/false, false by default
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
bms3: !include
@@ -81,4 +91,9 @@ packages:
bms_cell_ovp: '3.650' # V. Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V. Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V. Used by 'Auto CVL' functions
# Fake Equalizing: this BMS does not report its balancing state. When enabled, YamBMS infers it
# from the cell spread and holds the Cut-Off timer while the pack balances, instead of ending the charge.
# Warning: a BMS without a balancer (or with balancing disabled) never closes its cell spread, so it can
# stay in Cut-Off a long time, until the EOC timer (30min default) ends the charge, or forever if disabled.
bms_fake_equalizing_enabled: 'false' # true/false, false by default
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
@@ -48,6 +48,11 @@ packages:
bms_cell_ovp: '3.650' # V. Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V. Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V. Used by 'Auto CVL' functions
# Fake Equalizing: this BMS does not report its balancing state. When enabled, YamBMS infers it
# from the cell spread and holds the Cut-Off timer while the pack balances, instead of ending the charge.
# Warning: a BMS without a balancer (or with balancing disabled) never closes its cell spread, so it can
# stay in Cut-Off a long time, until the EOC timer (30min default) ends the charge, or forever if disabled.
bms_fake_equalizing_enabled: 'false' # true/false, false by default
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
bms2: !include
@@ -64,6 +69,11 @@ packages:
bms_cell_ovp: '3.650' # V. Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V. Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V. Used by 'Auto CVL' functions
# Fake Equalizing: this BMS does not report its balancing state. When enabled, YamBMS infers it
# from the cell spread and holds the Cut-Off timer while the pack balances, instead of ending the charge.
# Warning: a BMS without a balancer (or with balancing disabled) never closes its cell spread, so it can
# stay in Cut-Off a long time, until the EOC timer (30min default) ends the charge, or forever if disabled.
bms_fake_equalizing_enabled: 'false' # true/false, false by default
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
bms3: !include
@@ -80,4 +90,9 @@ packages:
bms_cell_ovp: '3.650' # V. Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V. Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V. Used by 'Auto CVL' functions
# Fake Equalizing: this BMS does not report its balancing state. When enabled, YamBMS infers it
# from the cell spread and holds the Cut-Off timer while the pack balances, instead of ending the charge.
# Warning: a BMS without a balancer (or with balancing disabled) never closes its cell spread, so it can
# stay in Cut-Off a long time, until the EOC timer (30min default) ends the charge, or forever if disabled.
bms_fake_equalizing_enabled: 'false' # true/false, false by default
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
@@ -61,6 +61,11 @@
bms_cell_ovp: '3.650' # V Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V Used by 'Auto CVL' functions
# Fake Equalizing: this BMS does not report its balancing state. When enabled, YamBMS infers it
# from the cell spread and holds the Cut-Off timer while the pack balances, instead of ending the charge.
# Warning: a BMS without a balancer (or with balancing disabled) never closes its cell spread, so it can
# stay in Cut-Off a long time, until the EOC timer (30min default) ends the charge, or forever if disabled.
bms_fake_equalizing_enabled: 'true' # true/false, false by default
bms_charging_cycles: '178' # charging cycles number Used to calculate the SoH
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
@@ -83,6 +88,11 @@
bms_cell_ovp: '3.650' # V Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V Used by 'Auto CVL' functions
# Fake Equalizing: this BMS does not report its balancing state. When enabled, YamBMS infers it
# from the cell spread and holds the Cut-Off timer while the pack balances, instead of ending the charge.
# Warning: a BMS without a balancer (or with balancing disabled) never closes its cell spread, so it can
# stay in Cut-Off a long time, until the EOC timer (30min default) ends the charge, or forever if disabled.
bms_fake_equalizing_enabled: 'true' # true/false, false by default
bms_charging_cycles: '226' # charging cycles number Used to calculate the SoH
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
@@ -105,5 +115,10 @@
bms_cell_ovp: '3.650' # V Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V Used by 'Auto CVL' functions
# Fake Equalizing: this BMS does not report its balancing state. When enabled, YamBMS infers it
# from the cell spread and holds the Cut-Off timer while the pack balances, instead of ending the charge.
# Warning: a BMS without a balancer (or with balancing disabled) never closes its cell spread, so it can
# stay in Cut-Off a long time, until the EOC timer (30min default) ends the charge, or forever if disabled.
bms_fake_equalizing_enabled: 'true' # true/false, false by default
bms_charging_cycles: '194' # charging cycles number Used to calculate the SoH
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
@@ -36,6 +36,8 @@
vars:
# CAN BUS ID
canbus_id: 'canbus_bms_1'
canbus_platform: 'mcp2515' # esp32_can / mcp2515
canbus_bitrate: '500kbps' # Default : 500kbps
deye_name: 'DEYE-Top 1'
deye_id: '1'
# Deye module 1
@@ -1,5 +1,5 @@
# Updated : 2026.02.16
# Version : 1.1.4
# Updated : 2026.08.29
# Version : 1.1.5
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -43,6 +43,12 @@
bms_name: 'EG4-BMS 1'
## BMS address must start at 2 with EG4 LLV2, ID 1 is a special case and has different output.
bms_address: 2 # BMS 1 modbus address
bms_balance_trigger_voltage: '0.030' # V. Cell spread at which the BMS balances, set yours
# Fake Equalizing: this BMS does not report its balancing state. When enabled, YamBMS infers it
# from the cell spread and holds the Cut-Off timer while the pack balances, instead of ending the charge.
# Warning: a BMS without a balancer (or with balancing disabled) never closes its cell spread, so it can
# stay in Cut-Off a long time, until the EOC timer (30min default) ends the charge, or forever if disabled.
bms_fake_equalizing_enabled: 'false' # true/false, false by default
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# BMS 2
- path: 'packages/bms/bms_combine_EG4_LLV2_RS485_bms_full.yaml'
@@ -50,11 +56,23 @@
bms_id: '2' # must be a number
bms_name: 'EG4-BMS 2'
bms_address: 3 # BMS 2 modbus address
bms_balance_trigger_voltage: '0.030' # V. Cell spread at which the BMS balances, set yours
# Fake Equalizing: this BMS does not report its balancing state. When enabled, YamBMS infers it
# from the cell spread and holds the Cut-Off timer while the pack balances, instead of ending the charge.
# Warning: a BMS without a balancer (or with balancing disabled) never closes its cell spread, so it can
# stay in Cut-Off a long time, until the EOC timer (30min default) ends the charge, or forever if disabled.
bms_fake_equalizing_enabled: 'false' # true/false, false by default
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# BMS 3
- path: 'packages/bms/bms_combine_EG4_LLV2_RS485_bms_full.yaml'
vars:
bms_id: '2' # must be a number
bms_id: '3' # must be a number
bms_name: 'EG4-BMS 3'
bms_address: 4 # BMS 3 modbus address
bms_balance_trigger_voltage: '0.030' # V. Cell spread at which the BMS balances, set yours
# Fake Equalizing: this BMS does not report its balancing state. When enabled, YamBMS infers it
# from the cell spread and holds the Cut-Off timer while the pack balances, instead of ending the charge.
# Warning: a BMS without a balancer (or with balancing disabled) never closes its cell spread, so it can
# stay in Cut-Off a long time, until the EOC timer (30min default) ends the charge, or forever if disabled.
bms_fake_equalizing_enabled: 'false' # true/false, false by default
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
@@ -1,5 +1,5 @@
# Updated : 2026.02.16
# Version : 1.1.5
# Updated : 2026.11.11
# Version : 1.1.6
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -31,17 +31,11 @@
################################################################################
# RS485 Sniffer with talk_pin (WS-RS485-CAN and other RS485 boards with a flow_control_pin)
# - path: 'packages/bms/bms_combine_JK_RS485_Modbus_sniffer_talk_pin.yaml'
# vars:
# sniffer_protocol: 'JK02_32S'
# sniffer_uart_id: 'uart_esp_1'
# sniffer_talk_pin: ${talk_pin} # can be replaced by the GPIO number
# RS485 Sniffer
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_sniffer.yaml'
vars:
sniffer_protocol: 'JK02_32S'
sniffer_uart_id: 'uart_esp_1'
# uart_flow_control_pin: ${talk_pin} # WS-RS485-CAN and other RS485 boards with a flow_control_pin
# BMS 1
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_JK-B_standard.yaml'
vars:
@@ -1,5 +1,5 @@
# Updated : 2026.02.16
# Version : 1.1.5
# Updated : 2026.11.11
# Version : 1.1.6
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -31,17 +31,11 @@
################################################################################
# RS485 Sniffer with talk_pin (WS-RS485-CAN and other RS485 boards with a flow_control_pin)
# - path: 'packages/bms/bms_combine_JK_RS485_Modbus_sniffer_talk_pin.yaml'
# vars:
# sniffer_protocol: 'JK02_32S'
# sniffer_uart_id: 'uart_esp_1'
# sniffer_talk_pin: ${talk_pin} # can be replaced by the GPIO number
# RS485 Sniffer
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_sniffer.yaml'
vars:
sniffer_protocol: 'JK02_32S'
sniffer_uart_id: 'uart_esp_1'
# uart_flow_control_pin: ${talk_pin} # WS-RS485-CAN and other RS485 boards with a flow_control_pin
# BMS 1
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.yaml'
vars:
@@ -0,0 +1,49 @@
# Updated : 2026.08.26
# Version : 1.1.0
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
# This YAML is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
############################ Remote Packages Example ###########################
# This is not a working YAML but just code ready to copy into
# your main YAML below the `packages:` section.
# packages:
# remote_packages:
# url: https://github.com/Sleeper85/esphome-yambms
# ref: main
# refresh: 60s
# files:
################################################################################
# BMS 1
- path: 'packages/bms/bms_combine_KS_BLE_standard.yaml'
vars:
bms_id: '1' # must be a number
bms_name: 'KS-BMS 1'
bms_ble_mac_address: 'C8:47:8C:10:7E:AA' # Your MAC address
bms_ks_device_type: '1' # 1 = KS48100 / KS48300-Ho23, 2 = KS48200-Ho21_V2
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# BMS 2
- path: 'packages/bms/bms_combine_KS_BLE_standard.yaml'
vars:
bms_id: '2' # must be a number
bms_name: 'KS-BMS 2'
bms_ble_mac_address: 'C8:47:8C:EE:16:EA' # Your MAC address
bms_ks_device_type: '1' # 1 = KS48100 / KS48300-Ho23, 2 = KS48200-Ho21_V2
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
@@ -51,6 +51,11 @@
bms_cell_ovp: '3.650' # V. Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V. Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V. Used by 'Auto CVL' functions
# Fake Equalizing: this BMS does not report its balancing state. When enabled, YamBMS infers it
# from the cell spread and holds the Cut-Off timer while the pack balances, instead of ending the charge.
# Warning: a BMS without a balancer (or with balancing disabled) never closes its cell spread, so it can
# stay in Cut-Off a long time, until the EOC timer (30min default) ends the charge, or forever if disabled.
bms_fake_equalizing_enabled: 'false' # true/false, false by default
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# BMS 2
- path: 'packages/bms/bms_combine_SEPLOS_V1_V2_RS485_bms_full.yaml'
@@ -67,6 +72,11 @@
bms_cell_ovp: '3.650' # V. Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V. Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V. Used by 'Auto CVL' functions
# Fake Equalizing: this BMS does not report its balancing state. When enabled, YamBMS infers it
# from the cell spread and holds the Cut-Off timer while the pack balances, instead of ending the charge.
# Warning: a BMS without a balancer (or with balancing disabled) never closes its cell spread, so it can
# stay in Cut-Off a long time, until the EOC timer (30min default) ends the charge, or forever if disabled.
bms_fake_equalizing_enabled: 'false' # true/false, false by default
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# BMS 3
- path: 'packages/bms/bms_combine_SEPLOS_V1_V2_RS485_bms_full.yaml'
@@ -83,4 +93,9 @@
bms_cell_ovp: '3.650' # V. Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V. Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V. Used by 'Auto CVL' functions
# Fake Equalizing: this BMS does not report its balancing state. When enabled, YamBMS infers it
# from the cell spread and holds the Cut-Off timer while the pack balances, instead of ending the charge.
# Warning: a BMS without a balancer (or with balancing disabled) never closes its cell spread, so it can
# stay in Cut-Off a long time, until the EOC timer (30min default) ends the charge, or forever if disabled.
bms_fake_equalizing_enabled: 'false' # true/false, false by default
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
@@ -52,6 +52,11 @@
bms_cell_ovp: '3.650' # V. Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V. Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V. Used by 'Auto CVL' functions
# Fake Equalizing: this BMS does not report its balancing state. When enabled, YamBMS infers it
# from the cell spread and holds the Cut-Off timer while the pack balances, instead of ending the charge.
# Warning: a BMS without a balancer (or with balancing disabled) never closes its cell spread, so it can
# stay in Cut-Off a long time, until the EOC timer (30min default) ends the charge, or forever if disabled.
bms_fake_equalizing_enabled: 'false' # true/false, false by default
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# BMS 2
- path: 'packages/bms/bms_combine_SEPLOS_V3_RS485_bms_full.yaml'
@@ -67,6 +72,11 @@
bms_cell_ovp: '3.650' # V. Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V. Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V. Used by 'Auto CVL' functions
# Fake Equalizing: this BMS does not report its balancing state. When enabled, YamBMS infers it
# from the cell spread and holds the Cut-Off timer while the pack balances, instead of ending the charge.
# Warning: a BMS without a balancer (or with balancing disabled) never closes its cell spread, so it can
# stay in Cut-Off a long time, until the EOC timer (30min default) ends the charge, or forever if disabled.
bms_fake_equalizing_enabled: 'false' # true/false, false by default
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# BMS 3
- path: 'packages/bms/bms_combine_SEPLOS_V3_RS485_bms_full.yaml'
@@ -82,4 +92,9 @@
bms_cell_ovp: '3.650' # V. Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V. Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V. Used by 'Auto CVL' functions
# Fake Equalizing: this BMS does not report its balancing state. When enabled, YamBMS infers it
# from the cell spread and holds the Cut-Off timer while the pack balances, instead of ending the charge.
# Warning: a BMS without a balancer (or with balancing disabled) never closes its cell spread, so it can
# stay in Cut-Off a long time, until the EOC timer (30min default) ends the charge, or forever if disabled.
bms_fake_equalizing_enabled: 'false' # true/false, false by default
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 207 KiB

After

Width:  |  Height:  |  Size: 532 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Loaded 100 of 298 files, more files were not shown because too many files have changed in this diff. Show more