Improved YamBMS 1.7.1 Cut-Off charging logic

This commit is contained in:
Sleeper85 committed 2026-11-08 23:08:32 +01:00
1 parent 54febc11b3
commit 978c634eb9
31 files changed
+378 -97

No files matched your search

@@ -1,4 +1,4 @@
# Updated : 2026.07.08
# Updated : 2026.07.15
# Version : 1.7.1
# GitHub : https://github.com/Sleeper85/esphome-yambms
@@ -273,6 +273,9 @@ views:
- 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
@@ -1,4 +1,4 @@
# Updated : 2026.07.08
# Updated : 2026.07.15
# Version : 1.7.1
# GitHub : https://github.com/Sleeper85/esphome-yambms
@@ -338,6 +338,9 @@ views:
- 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
@@ -1,4 +1,4 @@
# Updated : 2026.07.08
# Updated : 2026.07.15
# Version : 1.7.1
# GitHub : https://github.com/Sleeper85/esphome-yambms
@@ -338,6 +338,9 @@ views:
- 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
@@ -1,4 +1,4 @@
# Updated : 2026.07.08
# Updated : 2026.07.15
# Version : 1.7.1
# GitHub : https://github.com/Sleeper85/esphome-yambms
@@ -338,6 +338,9 @@ views:
- 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
@@ -1,4 +1,4 @@
# Updated : 2026.07.08
# Updated : 2026.07.15
# Version : 1.7.1
# GitHub : https://github.com/Sleeper85/esphome-yambms
@@ -338,6 +338,9 @@ views:
- 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
+3 -3
View File
@@ -1,5 +1,5 @@
# Updated : 2026.06.29
# Version : 1.7.0
# Updated : 2026.07.15
# Version : 1.7.1
# 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
+25 -9
View File
@@ -1,5 +1,5 @@
# Updated : 2026.06.29
# Version : 1.7.0
# Updated : 2026.07.15
# Version : 1.7.1
# 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
@@ -187,10 +187,26 @@ packages:
# 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
# Modbus 1
# modbus_1: !include
# file: 'packages/board/board_options_itf_modbus_expander.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_${uart_hub_bus}_1'
# Modbus 2
# modbus_2: !include
# file: 'packages/board/board_options_itf_modbus_expander.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_${uart_hub_bus}_2'
# 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
@@ -206,7 +222,7 @@ packages:
# to inverter = canbus_inverter_1
canbus_node_id: 'canbus_inverter_1'
# CAN transceiver - MCP2515
# CAN transceiver - SPI bus and MCP2515
# canbus_node_2: !include
# file: packages/board/board_options_itf_canbus_mcp2515.yaml
# vars:
@@ -215,7 +231,7 @@ packages:
# 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
@@ -276,7 +292,7 @@ packages:
# vars:
# 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_id: 'uart_${uart_hub_bus}_3' # UART interface to which your inverter is connected
# rs485_uart_baud_rate: '9600'
# rs485_update_timeout: '10s'
# rs485_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
@@ -287,8 +303,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'
+3 -3
View File
@@ -1,5 +1,5 @@
# Updated : 2026.06.29
# Version : 1.7.0
# Updated : 2026.07.15
# Version : 1.7.1
# 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
+3 -3
View File
@@ -1,5 +1,5 @@
# Updated : 2026.06.29
# Version : 1.7.0
# Updated : 2026.07.15
# Version : 1.7.1
# 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
+3 -3
View File
@@ -1,5 +1,5 @@
# Updated : 2026.06.29
# Version : 1.7.0
# Updated : 2026.07.15
# Version : 1.7.1
# 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
+3 -3
View File
@@ -1,5 +1,5 @@
# Updated : 2026.06.29
# Version : 1.7.0
# Updated : 2026.07.15
# Version : 1.7.1
# 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
+3 -3
View File
@@ -1,5 +1,5 @@
# Updated : 2026.06.29
# Version : 1.7.0
# Updated : 2026.07.15
# Version : 1.7.1
# 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
+3 -3
View File
@@ -1,5 +1,5 @@
# Updated : 2026.06.29
# Version : 1.7.0
# Updated : 2026.07.15
# Version : 1.7.1
# 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
+3 -3
View File
@@ -1,5 +1,5 @@
# Updated : 2026.06.29
# Version : 1.7.0
# Updated : 2026.07.15
# Version : 1.7.1
# 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
+3 -3
View File
@@ -1,5 +1,5 @@
# Updated : 2026.06.29
# Version : 1.7.0
# Updated : 2026.07.15
# Version : 1.7.1
# 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
+3 -3
View File
@@ -1,5 +1,5 @@
# Updated : 2026.06.29
# Version : 1.7.0
# Updated : 2026.07.15
# Version : 1.7.1
# 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
+3 -3
View File
@@ -1,5 +1,5 @@
# Updated : 2026.06.29
# Version : 1.7.0
# Updated : 2026.07.15
# Version : 1.7.1
# 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
+3 -3
View File
@@ -1,5 +1,5 @@
# Updated : 2026.06.29
# Version : 1.7.0
# Updated : 2026.07.15
# Version : 1.7.1
# 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
+3 -3
View File
@@ -1,5 +1,5 @@
# Updated : 2026.06.29
# Version : 1.7.0
# Updated : 2026.07.15
# Version : 1.7.1
# 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
@@ -1,5 +1,5 @@
# Updated : 2026.06.29
# Version : 1.7.0
# Updated : 2026.07.15
# Version : 1.7.1
# 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
+3 -3
View File
@@ -1,5 +1,5 @@
# Updated : 2026.06.29
# Version : 1.7.0
# Updated : 2026.07.15
# Version : 1.7.1
# 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
+3 -3
View File
@@ -1,5 +1,5 @@
# Updated : 2026.06.29
# Version : 1.7.0
# Updated : 2026.07.15
# Version : 1.7.1
# 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
+3 -3
View File
@@ -1,5 +1,5 @@
# Updated : 2026.06.29
# Version : 1.7.0
# Updated : 2026.07.15
# Version : 1.7.1
# 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
+23 -9
View File
@@ -1,5 +1,5 @@
# Updated : 2026.06.29
# Version : 1.7.0
# Updated : 2026.07.15
# Version : 1.7.1
# 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
@@ -192,10 +192,24 @@ packages:
# - 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
# Modbus 1
# - path: 'packages/board/board_options_itf_modbus_expander.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_${uart_hub_bus}_1'
# Modbus 2
# - path: 'packages/board/board_options_itf_modbus_expander.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_${uart_hub_bus}_2'
# WK2168 UART/IO Expander
- path: 'packages/board/board_options_itf_pvbrain2_wk2168_spi.yaml'
# - path: 'packages/board/board_options_itf_pvbrain2_wk2168_i2c.yaml'
@@ -210,7 +224,7 @@ packages:
# to inverter = canbus_inverter_1
canbus_node_id: 'canbus_inverter_1'
# CAN transceiver - MCP2515
# CAN transceiver - SPI bus and MCP2515
# - path: 'packages/board/board_options_itf_canbus_mcp2515.yaml'
# vars:
# # to bms = canbus_bms_1
@@ -218,7 +232,7 @@ packages:
# 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'
@@ -279,7 +293,7 @@ packages:
# vars:
# 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_id: 'uart_${uart_hub_bus}_3' # UART interface to which your inverter is connected
# rs485_uart_baud_rate: '9600'
# rs485_update_timeout: '10s'
# rs485_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
@@ -290,8 +304,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'
+3 -3
View File
@@ -1,5 +1,5 @@
# Updated : 2026.06.29
# Version : 1.7.0
# Updated : 2026.07.15
# Version : 1.7.1
# 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
@@ -1,5 +1,5 @@
# Updated : 2026.06.29
# Version : 1.7.0
# Updated : 2026.07.15
# Version : 1.7.1
# 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
+52 -4
View File
@@ -9,6 +9,9 @@
> [!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.
@@ -25,29 +28,74 @@ 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 BMS reports that cells are **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 stops both timers.
## 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 +105,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")
@@ -0,0 +1,98 @@
# YamBMS - Release note about new YamBMS 1.7.1 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;
```
+8
View File
@@ -52,6 +52,14 @@ The `Float voltage` slider allows you to set the voltage used after charging is
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")
Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

+95 -13
View File
@@ -1,4 +1,4 @@
# Updated : 2026.07.11
# Updated : 2026.07.15
# Version : 1.7.1
# GitHub : https://github.com/Sleeper85/esphome-yambms
@@ -19,8 +19,14 @@
substitutions:
yambms_version: "1.7.1"
custom_ccl_derating_reason: 'Custom CCL Derating'
custom_dcl_derating_reason: 'Custom DCL Derating'
# Cut-Off Charging Logic
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
# Custom CCL/DCL Derating Reason
custom_ccl_derating_reason: 'Custom CCL Derating'
custom_dcl_derating_reason: 'Custom DCL Derating'
globals:
# BMS
@@ -456,7 +462,7 @@ interval:
soc = round(id(yambms${yambms_id}_var_total_battery_capacity_remaining) / id(yambms${yambms_id}_var_total_battery_capacity) * 100);
// SOC manipulation
if (id(yambms${yambms_id}_var_to_combine_bms_counter) == 0) soc = 0; // no BMS combined => sending 0%
if (id(yambms${yambms_id}_var_to_combine_bms_counter) == 0) soc = 0; // no BMS combined => sending 0%
else if ((soc > 98) && (id(yambms${yambms_id}_var_eoc) == false)) soc = 98; // Useful for some inverters stopping charging when SoC reaches 100%
// MEAN Battery SOH
@@ -810,7 +816,8 @@ interval:
float cv_min = id(yambms${yambms_id}_var_cell_min_charge_v);
float cv_max = id(yambms${yambms_id}_var_cell_max_charge_v);
float current = id(yambms${yambms_id}_current).state;
float cutoff_resistance = ((cv_max - cv_min) / id(yambms${yambms_id}_battery_capacity).state / 0.05);
float cutoff_resistance = ((cv_max - cv_min) / id(yambms${yambms_id}_battery_capacity).state / ${yambms_cutoff_crate});
float current_deadband = (id(yambms${yambms_id}_battery_capacity).state * ${yambms_current_deadband_crate});
uint32_t ms_now = millis();
static uint32_t ms_cutoff = ms_now;
@@ -820,18 +827,69 @@ interval:
// | Cut-Off Charging Logic |
// +-----------------------------------------------+
// Charging
if (current >= 0)
{
float cutoff_voltage = (max_cell_v - cutoff_resistance * current);
// Cut-Off Cell Voltage source :
// "Max Cell Voltage" (default) : conservative, the EOC depends on the highest cell.
// 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, giving a
// consistent charge termination voltage. The runner cell no longer stops
// the charge : cell protection MUST be ensured by Auto CVL and/or Auto CCL
// with BMS OVP as last resort.
// Note : if the inverter does not respect the CVL, only Auto CCL is effective.
if (cutoff_voltage >= cv_min) // The Cut-Off conditions are valid
float cutoff_cell_v = max_cell_v;
if (id(yambms${yambms_id}_select_cutoff_cell_voltage).current_option() == "Average Cell Voltage")
cutoff_cell_v = (id(yambms${yambms_id}_total_voltage).state / id(yambms${yambms_id}_cell_count).state);
// Current deadband
// Current within sensor noise / PV starvation
if (fabs(current) < current_deadband)
{
// "Fully charged at rest" signature
// cv_min is by definition the resting voltage of a full cell.
// A near-zero current with cutoff_cell_v above cv_min indicates
// a full battery, the Cut-Off conditions are considered valid.
if ((cutoff_cell_v >= cv_min) &&
(id(yambms${yambms_id}_battery_soc).state >= ${yambms_eoc_min_soc})) // Min. SoC gate
{
ms_bulk = ms_now; // Reset millis to not enter the Bulk phase
else
}
// cutoff_cell_v below cv_min at near-zero current.
// The battery cannot be full, the Bulk conditions are valid.
else if (cutoff_cell_v < cv_min)
{
ms_cutoff = ms_now; // Reset millis to not enter the Cut-Off phase
}
// Grey zone : cutoff_cell_v >= cv_min but SoC below the gate
// No conclusion can be drawn
else
{
ms_bulk = ms_now; // Reset millis to not enter the Bulk phase
ms_cutoff = ms_now; // Reset millis to not enter the Cut-Off phase
}
}
// Charging
else if (current > 0)
{
float cutoff_voltage = (cutoff_cell_v - cutoff_resistance * current);
if ((cutoff_voltage >= cv_min) && // Compensated voltage criterion
(id(yambms${yambms_id}_battery_soc).state >= ${yambms_eoc_min_soc})) // Min. SoC gate
{
// Cut-Off phase
ms_bulk = ms_now; // Reset millis to not enter the Bulk phase
}
else
{
// Bulk phase
ms_cutoff = ms_now; // Reset millis to not enter the Cut-Off phase
}
}
// Discharging
else if (max_cell_v < cell_bulk_v - cutoff_resistance)
else if (cutoff_cell_v < (cell_bulk_v - ${yambms_cell_hysteresis_v}))
{
ms_cutoff = ms_now; // Reset millis to not enter the Cut-Off phase
}
@@ -857,6 +915,7 @@ interval:
// Bulk
else id(yambms${yambms_id}_var_charge_status) = "Bulk";
}
// Cut-Off phase
else if (ms_now - ms_cutoff >= 10000) // 10s
{
@@ -882,7 +941,8 @@ interval:
id(yambms${yambms_id}_script_cutoff_timer).stop();
}
// Not Equalizing => Start cut-off timer
// If the conditions continue to be respected the charging process will stop in 60s (default value)
// If the conditions continue to be respected the charging process will stop in 180s (default value)
// This duration must exceed the post-burst cell relaxation time (30-120s) to reject transient voltage readings
else if (!id(yambms${yambms_id}_script_cutoff_timer).is_running())
id(yambms${yambms_id}_script_cutoff_timer).execute();
}
@@ -1107,6 +1167,28 @@ script:
# +--------------------------------------+
# | select |
# +--------------------------------------+
select:
# Cut-Off cell voltage source
# "Max cell" (default) : conservative, the EOC depends on the highest cell.
# "Average cell" : consistent charge termination voltage. Recommended for packs
# with unmatched cells (different IRs), a runner cell, or a BMS that does not
# report its equalizing status. Requires Auto CVL and/or Auto CCL enabled
# (the runner cell no longer stops the charge).
- platform: template
name: "Cut-Off Cell Voltage"
id: yambms${yambms_id}_select_cutoff_cell_voltage
device_id: yambms_yambms${yambms_id}
options:
- "Max Cell Voltage"
- "Average Cell Voltage"
initial_option: "Max Cell Voltage"
restore_value: true
optimistic: true
icon: mdi:vector-difference
entity_category: config
# +--------------------------------------+
# | switch |