The `bms_ids` variable allows to provide an array of BMS IDs that are connected to this shunt.
If one or more BMS from this array are offline, the shunt is not used anymore (Combine = Disabled). This avoids returning a wrong SOC when not all batteries are online/available anymore.
If the BMS goes online again, the shunt is then used again.
This variable is optional. If not provided, the shunt work independently from the BMS online status.
Examples:
```
bms_ids: '{1}'
bms_ids: '{1, 2}'
bms_ids: '{4, 5, 6}'
```
115 lines
3.4 KiB
YAML
115 lines
3.4 KiB
YAML
# Updated : 2026.01.24
|
|
# Version : 1.1.4
|
|
# 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.
|
|
|
|
################################################################################
|
|
|
|
packages:
|
|
|
|
modbus: !include
|
|
file: packages/board/board_options_itf_modbus.yaml
|
|
vars:
|
|
modbus_role: 'client' # client / server
|
|
modbus_uart_id: 'uart_esp_1' # RS485 board
|
|
|
|
shunt1: !include
|
|
file: packages/shunt/shunt_combine_modbus_client.yaml
|
|
vars:
|
|
shunt_id: '1' # must be a number
|
|
shunt_name: 'Shunt 1'
|
|
# Optional: BMS IDs connected to this shunt
|
|
# If provided, the shunt will only be used when all listed BMS are online
|
|
# If not provided, the shunt will be used independently of the BMS online status
|
|
bms_ids: '{1, 2, 3}'
|
|
|
|
bms1: !include
|
|
file: packages/bms/bms_combine_modbus_client.yaml
|
|
vars:
|
|
bms_id: '1' # must be a number
|
|
bms_name: 'BMS 1'
|
|
|
|
bms2: !include
|
|
file: packages/bms/bms_combine_modbus_client.yaml
|
|
vars:
|
|
bms_id: '2' # must be a number
|
|
bms_name: 'BMS 2'
|
|
|
|
bms3: !include
|
|
file: packages/bms/bms_combine_modbus_client.yaml
|
|
vars:
|
|
bms_id: '3' # must be a number
|
|
bms_name: 'BMS 3'
|
|
|
|
# bms4: !include
|
|
# file: packages/bms/bms_combine_modbus_client.yaml
|
|
# vars:
|
|
# bms_id: '4' # must be a number
|
|
# bms_name: 'BMS 4'
|
|
|
|
# bms5: !include
|
|
# file: packages/bms/bms_combine_modbus_client.yaml
|
|
# vars:
|
|
# bms_id: '5' # must be a number
|
|
# bms_name: 'BMS 5'
|
|
|
|
# bms6: !include
|
|
# file: packages/bms/bms_combine_modbus_client.yaml
|
|
# vars:
|
|
# bms_id: '6' # must be a number
|
|
# bms_name: 'BMS 6'
|
|
|
|
# bms7: !include
|
|
# file: packages/bms/bms_combine_modbus_client.yaml
|
|
# vars:
|
|
# bms_id: '7' # must be a number
|
|
# bms_name: 'BMS 7'
|
|
|
|
# bms8: !include
|
|
# file: packages/bms/bms_combine_modbus_client.yaml
|
|
# vars:
|
|
# bms_id: '8' # must be a number
|
|
# bms_name: 'BMS 8'
|
|
|
|
# bms9: !include
|
|
# file: packages/bms/bms_combine_modbus_client.yaml
|
|
# vars:
|
|
# bms_id: '9' # must be a number
|
|
# bms_name: 'BMS 9'
|
|
|
|
# bms10: !include
|
|
# file: packages/bms/bms_combine_modbus_client.yaml
|
|
# vars:
|
|
# bms_id: '10' # must be a number
|
|
# bms_name: 'BMS 10'
|
|
|
|
# Balancer
|
|
balancer2: !include
|
|
file: packages/balancer/balancer_modbus_client.yaml
|
|
vars:
|
|
bms_id: '2' # must match the BMS ID
|
|
balancer_name: 'Balancer 2'
|
|
|
|
balancer3: !include
|
|
file: packages/balancer/balancer_modbus_client.yaml
|
|
vars:
|
|
bms_id: '3' # must match the BMS ID
|
|
balancer_name: 'Balancer 3' |