# Updated : 2026.02.16 # Version : 1.1.1 # 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 . ############################ Local Packages Example ############################ # This is not a working YAML but just code ready to copy into # your main YAML below the `packages:` section. ################################################################################ # Example A : Primary + secondary batteries (one BMS polls multiple batteries) # # The primary BMS component reads data for all batteries on the RS485 bus. # Secondary batteries are exposed as separate YamBMS BMS entries using # bms_combine_Ecoworthy_RS485_secondary.yaml. # # Set bms_battery_count on the primary to the total number of batteries. ################################################################################ packages: # Ecoworthy Modbus - Include this ONCE per RS485 bus ecoworthy_modbus: !include file: packages/bms/bms_combine_Ecoworthy_RS485_modbus.yaml vars: ecoworthy_modbus_uart_id: 'uart_esp_1' ecoworthy_modbus_baud_rate: '9600' # Primary battery (BMS 1) - polls all batteries on the RS485 bus bms1: !include file: packages/bms/bms_combine_Ecoworthy_RS485.yaml vars: bms_id: '1' # must be a number bms_name: 'Ecoworthy-BMS 1' bms_address: '0x01' # BMS 1 modbus address (usually 0x01 for primary) bms_battery_count: '3' # total batteries polled (1=primary only, 2+=primary+secondaries) bms_cell_max_cycles: '6000.0' bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable # Secondary battery 2 (BMS 2) - data polled by primary bms2: !include file: packages/bms/bms_combine_Ecoworthy_RS485_secondary.yaml vars: bms_id: '2' # must be a number bms_name: 'Ecoworthy-BMS 2' parent_ecoworthy_bms_id: 'ecoworthy_bms1' # references the primary component secondary_battery_number: '2' bms_cell_max_cycles: '6000.0' bms_status_led_id: 'esp_light' # Secondary battery 3 (BMS 3) - data polled by primary bms3: !include file: packages/bms/bms_combine_Ecoworthy_RS485_secondary.yaml vars: bms_id: '3' # must be a number bms_name: 'Ecoworthy-BMS 3' parent_ecoworthy_bms_id: 'ecoworthy_bms1' # references the primary component secondary_battery_number: '3' bms_cell_max_cycles: '6000.0' bms_status_led_id: 'esp_light' ################################################################################ # Example B : Multiple independent primaries (each BMS has its own address) # # Use this when each Ecoworthy BMS is independently addressed on the bus # and you don't need the primary/secondary polling pattern. # Protection thresholds (cell OVP/UVP) are read from BMS config registers. ################################################################################ # # Ecoworthy Modbus - Include this ONCE per RS485 bus # ecoworthy_modbus: !include # file: packages/bms/bms_combine_Ecoworthy_RS485_modbus.yaml # vars: # ecoworthy_modbus_uart_id: 'uart_esp_1' # ecoworthy_modbus_baud_rate: '9600' # # # Ecoworthy BMS 1 # bms1: !include # file: packages/bms/bms_combine_Ecoworthy_RS485.yaml # vars: # bms_id: '1' # must be a number # bms_name: 'Ecoworthy-BMS 1' # bms_address: '0x01' # BMS 1 modbus address (usually 0x01 for primary) # bms_cell_max_cycles: '6000.0' # bms_status_led_id: 'esp_light' # # # Ecoworthy BMS 2 # bms2: !include # file: packages/bms/bms_combine_Ecoworthy_RS485.yaml # vars: # bms_id: '2' # must be a number # bms_name: 'Ecoworthy-BMS 2' # bms_address: '0x02' # BMS 2 modbus address # bms_cell_max_cycles: '6000.0' # bms_status_led_id: 'esp_light'