Add support for external balancer

This adds support for external balancers, for example NEEY using JK BLE.
This commit is contained in:
Sebastian committed 2025-08-14 15:01:51 +02:00
1 parent 39d0ad54d0
commit fffd7c6087
37 files changed
+890 -117

No files matched your search

+12 -7
View File
@@ -10,8 +10,8 @@
> [!TIP]
> Not sure which YAML to choose ? ... [YamBMS_Remote_Packages_example.yaml](YamBMS_Remote_Packages_example.yaml)
> is a good basis for creating your custom YAML.
> Examples of `BMS` and `Shunt` packages can be found in the [examples](examples/single-node/) folder.
> You don't have to import a shunt but you must import at least `one BMS`.
> Examples of `BMS`, `Shunt` and `Balancer` packages can be found in the [examples](examples/single-node/) folder.
> You don't have to import a shunt or balancer but you must import at least `one BMS`.
> You can mix different `BMS` models, the only condition is that the `bms_id` are numbered in order starting from `1` !
> [!IMPORTANT]
@@ -70,26 +70,31 @@ You install `YamBMS` on a single ESP32 connected to your BMS and your inverter.
### Multi-node
Each BMS/Shunt turns into a `modbus server` with its own address.
Each BMS/Shunt/Balancer turns into a `modbus server` with its own address.
> [!IMPORTANT]
> The max number of `UART` BMS/Shunt per ESP32 is `2` (unless you use a UART expander) because you need to keep the last `UART` for the `RS485` network.
> The max number of `BLE` BMS/Shunt per ESP32 is `2`, ESP32-S3 / AtomS3 can supervise `3` BLE devices.
> The max number of `BLE` BMS/Shunt/Balancer per ESP32 is `2`, ESP32-S3 / AtomS3 can supervise `3` BLE devices.
YamBMS installs on `node1` as a `modbus client` to collect information from all your BMS.
The `node1` is also connected to your inverter via the `CAN bus`.
The BMS/Shunt are connected to other ESP32 nodes connected on a dedicated RS485 bus for YamBMS. Each BMS/Shunt becomes a `modbus server`.
The BMS/Shunt are connected to other ESP32 nodes connected on a dedicated RS485 bus for YamBMS. Each BMS/Shunt/Balancer becomes a `modbus server`.
The theoretical limit is `256` modbus server (BMS/Shunt) per `RS485 bus` but in reality this will depend on the capabilities of `node1` (YamBMS) which will have to combine all the BMS/Shunt together.
The theoretical limit is `256` modbus server (BMS/Shunt) per `RS485 bus` but in reality this will depend on the capabilities of `node1` (YamBMS) which will have to combine all the BMS/Shunt/Balancer together.
[You can find more information about creating your YAML in this How To.](documents/README/YamBMS_main_YAML_HowTo.md)
> [!TIP]
> If you have a lot of `BMS/Shunt` to combine, using an `ESP32-S3` or `AtomS3` for `node1` is recommended.
> If you have a lot of `BMS/Shunt/Balancer` to combine, using an `ESP32-S3` or `AtomS3` for `node1` is recommended.
![Image](images/YamBMS_multi-node_RS485_modbus.png "YamBMS multi-node RS485 modbus")
> [!NOTE]
> Some boards with integrated `RS485 transceiver` have already a 120 Ohm resistor installed, for example the `LilyGo T-CAN485`, `LilyGo T-Connect` and `LilyGo T-Connect Pro`.
> If these devices are used in the middle, this resistor must be removed!
> Otherwise transmission errors can occur.
## Home Assistant
![Image](images/YamBMS_HA_Dashboard.png "YamBMS HA Dashboard")
+29 -4
View File
@@ -1,5 +1,5 @@
# Updated : 2025.08.13
# Version : 1.5.9
# Updated : 2025.08.14
# Version : 1.5.10
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -153,7 +153,7 @@ packages:
# 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_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
@@ -201,12 +201,37 @@ packages:
# MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
bms_cell_max_cycles: '6000.0'
sniffer1: !include
file: packages/bms/bms_combine_JK_RS485_Modbus_sniffer.yaml
vars:
sniffer_id: 'sniffer1'
sniffer_protocol: 'JK02_32S'
sniffer_uart_id: 'uart_esp_2'
# Mode2 : configure the DIP switches of your BMS from 0x01 to 0x0F (don't use the 0x00 address, maximum 15 BMS)
bms2: !include
file: packages/bms/bms_sensors_JK_RS485_Modbus_bms_full.yaml
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '2' # must be a number
bms_name: 'JK-BMS 2'
bms_address: '0x02' # BMS 1 DIP switch
balancer1: !include
file: packages/balancer/balancer_sensors_JK_BLE.yaml
file: packages/balancer/balancer_sensors_JK_NEEY_BLE.yaml
vars:
bms_id: '1' # must match the BMS ID
balancer_name: 'Balancer 1'
balancer_ble_mac_address: 11:22:33:44:55:66
balancer2: !include
file: packages/balancer/balancer_sensors_JK_NEEY_BLE.yaml
vars:
bms_id: '2' # must match the BMS ID
balancer_name: 'Balancer 2'
balancer_ble_mac_address: 11:22:33:44:55:67
+9
View File
@@ -24,6 +24,15 @@
**Note: other Shunt brands already integrated with ESPhome can be added easily.**
## Supported balancers
* `GW-24S4EB: NEEY/Heltec 4A Smart Active Balancer)` (BLE)
* `GW-24S4EB: NEEY 4A Smart Active Balancer 4th generation)` (BLE)
* `EK-24S15EB: (NEEY 15A Smart Active Balancer)` (BLE)
* `EK-24S10EB: (NEEY 10A Smart Active Balancer)` (BLE)
**Note: other Balancer brands already integrated with ESPhome can be added easily.**
## Supported ESP32
**Recommended: AtomS3 or ESP32-S3**
+40 -1
View File
@@ -105,7 +105,13 @@ So just one of the packages below :
### ESP32-S3 DevKitC-1
```YAML
device_board: !include packages/board/board_ESP32-S3_DevKitC-1.yaml
# RGB LED to GPIO 38
device_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
```
### Atom S3 Lite
@@ -151,12 +157,24 @@ This board has an `Ethernet` port and can be powered from `POE` (optional).
```YAML
device_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)
### ESP32-S3 LilyGo T-Connect
```YAML
device_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.
### ESP32-S3 LilyGo T-Connect Pro
```YAML
device_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.
## YamBMS single-node example
@@ -184,6 +202,13 @@ This board has an `Ethernet` port and can be powered from `POE` (optional).
bms_name: 'BMS 2'
# other settings
# ...
balancer1: !include
file: packages/balancer/balancer_sensors_JK_NEEY_BLE.yaml
vars:
bms_id: '1' # must match the BMS ID
balancer_name: 'Balancer 1'
balancer_ble_mac_address: 11:22:33:44:55:66
```
## YamBMS multi-node RS485 modbus example
@@ -249,6 +274,13 @@ This board has an `Ethernet` port and can be powered from `POE` (optional).
bms_name: 'BMS 1'
# other settings
# ...
balancer1: !include
file: packages/balancer/balancer_sensors_JK_NEEY_BLE.yaml
vars:
bms_id: '1' # must match the BMS ID
balancer_name: 'Balancer 1'
balancer_ble_mac_address: 11:22:33:44:55:66
```
### ESP32 modbus server `node3`
@@ -305,6 +337,13 @@ As soon as you import a `Shunt` and it can be combined ([see condition](YamBMS_b
You can find `Shunt` import `LP` examples in the [examples/single-node](../../examples/single-node/) folder.
## Balancer
> [!IMPORTANT]
> You must number your `Balancer` with the same number as the `BMS` it is connected to.
As soon as the balancer is available/online the values ​​`equalizing` and `balance trigger voltage` of the balancers(s) will take precedence over the BMS values.
## YamBMS
> [!TIP]
+57 -6
View File
@@ -129,12 +129,6 @@ So just one of the packages below :
- path: 'packages/board/board_ESP32-S3_DevKitC-1_LED-48.yaml'
```
### ESP32-S3 LilyGo T-Connect
```YAML
- path: 'packages/board/board_ESP32-S3_LilyGo-T-Connect.yaml'
```
### Atom S3 Lite
```YAML
@@ -159,6 +153,44 @@ In this case you need to specify the `yambms` and `canbus` IDs to display the in
display_rotation: '0' # 0/90/180/270 rotation angle in degrees
```
### ESP32-C3 DevKitM-1
```YAML
- path: 'packages/board_ESP32-C3_DevKitM-1.yaml'
```
### ESP32-C3 ETH01-EVO
This board has an `Ethernet` port and can be powered from `POE` (optional).
```YAML
- path: 'packages/board/board_ESP32-C3_ETH01-EVO.yaml'
```
### ESP32 LilyGo T-CAN485
```YAML
- path: '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)
### ESP32-S3 LilyGo T-Connect
```YAML
- path: '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.
### ESP32-S3 LilyGo T-Connect Pro
```YAML
- path: '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.
## YamBMS [single-node](../../examples/single-node/) example
```YAML
@@ -184,6 +216,13 @@ In this case you need to specify the `yambms` and `canbus` IDs to display the in
bms_name: 'BMS 2'
# other settings
# ...
# Balancer 1
- path: 'packages/balancer/balancer_sensors_JK_NEEY_BLE.yaml'
vars:
bms_id: '1' # must match the BMS ID
balancer_name: 'Balancer 1'
balancer_ble_mac_address: 11:22:33:44:55:66
```
## YamBMS [multi-node](../../examples/multi-node/) RS485 modbus example
@@ -243,6 +282,12 @@ In this case you need to specify the `yambms` and `canbus` IDs to display the in
bms_name: 'JK-BMS 1'
# other settings
# ..
# Balancer 1
- path: 'packages/balancer/balancer_sensors_JK_NEEY_BLE.yaml'
vars:
bms_id: '1' # must match the BMS ID
balancer_name: 'Balancer 1'
balancer_ble_mac_address: 11:22:33:44:55:66
```
### ESP32 modbus server `node3`
@@ -297,6 +342,12 @@ As soon as you import a `Shunt` and it can be combined ([see condition](YamBMS_b
You can find `Shunt` import `RP` examples in the [examples/single-node](../../examples/single-node/) folder.
## Balancer
> [!IMPORTANT]
> You must number your `Balancer` with the same number as the `BMS` it is connected to.
As soon as the balancer is available/online the values ​​`equalizing` and `balance trigger voltage` of the balancers(s) will take precedence over the BMS values.
## YamBMS
+9
View File
@@ -58,6 +58,15 @@ The behavior of the `Charging Instruction` and `Discharging Instruction` sensors
If a BMS blocks charging or discharging, the permitted current is automatically reduced.
## External balancer
If an external balancer is used instead of the BMS internal one, it can be combined with the BMS.
Behaviour for `equalizing` and `balance trigger voltage`:
1) When no external balancer is present for a BMS or it is offline, the BMS values are used for `equalizing` and `balance trigger voltage`.
2) When an external balancer is present for a BMS and it is online, the BMS sensor data for `equalizing` and `balance trigger voltage` is overwritten by the external balancer sensor data.
## State of Charge
The `SoC` is slightly manipulated before reaching `0%` or `100%`.
@@ -1,5 +1,5 @@
# Updated : 2025.08.02
# Version : 1.1.2
# Updated : 2025.08.14
# Version : 1.1.3
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -96,3 +96,16 @@ packages:
# 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'
@@ -0,0 +1,52 @@
# Updated : 2025.08.14
# Version : 1.1.3
# 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.
################################################################################
substitutions:
friendly_name : 'YamBMS Modbus Server 3' # Prefix added in front of the `entity display name`, also used to classify them.
hostname: 'yambms-modbus-server-3' # Name of your ESPHome node registered on the IP network (DNS name, must be unique) and prefix added in front of the `entity id`.
packages:
modbus: !include
file: packages/board/board_options_itf_modbus.yaml
vars:
modbus_role: 'server' # client / server
modbus_uart_id: 'uart_esp_1' # RS485 board
# Balancer for BMS 2
balancer2: !include
file: packages/balancer/balancer_modbus_JK_NEEY_BLE.yaml
vars:
bms_id: '2' # must match BMS ID
balancer_name: 'NEEY 1'
balancer_ble_mac_address: 11:22:33:44:55:66
# Balancer for BMS 3
balancer3: !include
file: packages/balancer/balancer_modbus_JK_NEEY_BLE.yaml
vars:
bms_id: '3' # must be a number
balancer_name: 'NEEY 2'
balancer_ble_mac_address: 11:22:33:44:55:67
@@ -1,5 +1,5 @@
# Updated : 2025.08.02
# Version : 1.1.2
# Updated : 2025.08.14
# Version : 1.1.3
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -90,3 +90,12 @@ packages:
# vars:
# bms_id: '10' # must be a number
# bms_name: 'BMS 10'
# Balancer
- path: 'packages/balancer/balancer_modbus_client.yaml'
vars:
bms_id: '2' # must match the BMS ID
balancer_name: 'Balancer 2'
- path: 'packages/balancer/balancer_modbus_client.yaml'
vars:
bms_id: '3' # must match the BMS ID
balancer_name: 'Balancer 3'
@@ -0,0 +1,53 @@
# Updated : 2025.08.14
# Version : 1.1.3
# 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.
################################################################################
substitutions:
friendly_name : 'YamBMS Modbus Server 3' # Prefix added in front of the `entity display name`, also used to classify them.
hostname: 'yambms-modbus-server-3' # Name of your ESPHome node registered on the IP network (DNS name, must be unique) and prefix added in front of the `entity id`.
packages:
yambms_modbus_server:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
# Modbus server
- path: 'packages/board/board_options_itf_modbus.yaml'
vars:
modbus_role: 'server' # client / server
modbus_uart_id: 'uart_esp_1' # RS485 board
# Balancer for BMS 2
- path: 'packages/balancer/balancer_modbus_JK_NEEY_BLE.yaml'
vars:
bms_id: '2' # must match BMS ID
balancer_name: 'NEEY 1'
balancer_ble_mac_address: 11:22:33:44:55:66
# Balancer for BMS 3
- path: 'packages/balancer/balancer_modbus_JK_NEEY_BLE.yaml'
vars:
bms_id: '3' # must be a number
balancer_name: 'NEEY 2'
balancer_ble_mac_address: 11:22:33:44:55:67
Binary file not shown.

After

Width:  |  Height:  |  Size: 398 KiB

@@ -0,0 +1,26 @@
# Updated : 2025.08.14
# Version : 1.1.1
# GitHub : https://github.com/syssi/esphome-jk-bms
# 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>.
substitutions:
balancer_model: "JK NEEY"
balancer_protocol: "BLE-Modbus"
packages:
balancer_sensors: !include balancer_sensors_JK_NEEY_BLE.yaml
balancer_combine: !include balancer_modbus_server.yaml
@@ -0,0 +1,113 @@
# Updated : 2025.08.14
# 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 <http://www.gnu.org/licenses/gpl.html>.
substitutions:
balancer_model: "YamBMS"
balancer_protocol: "Modbus"
# +--------------------------------------+
# | Component settings |
# +--------------------------------------+
modbus_controller:
- id: modbus_controller_balancer${bms_id}
modbus_id: ${modbus_id}
setup_priority: -10
address: 10${bms_id}
update_interval: 20s
command_throttle: ${modbus_command_throttle}
max_cmd_retries: 3
# offline_skip_updates: 5
on_online:
then:
- logger.log: "Balancer ${bms_id} modbus server back online !"
on_offline:
then:
- logger.log: "Balancer ${bms_id} modbus server goes offline !"
- lambda: |-
id(balancer${bms_id}_online_status).publish_state(false);
id(balancer${bms_id}_equalizing).publish_state(false);
# +--------------------------------------+
# | Component entities |
# +--------------------------------------+
binary_sensor:
# online_status
- platform: modbus_controller
modbus_controller_id: modbus_controller_balancer${bms_id}
id: balancer${bms_id}_online_status
name: "${name} ${balancer_name} Online Status"
register_type: read
address: 1
trigger_on_initial_state: true
on_state:
then:
- lambda: |-
id(bms${bms_id}_var_ext_balancer_online) = x;
# equalizing
- platform: modbus_controller
modbus_controller_id: modbus_controller_balancer${bms_id}
id: balancer${bms_id}_equalizing
name: "${name} ${balancer_name} balancing"
register_type: read
address: 2
trigger_on_initial_state: true
on_state:
then:
- lambda: |-
id(bms${bms_id}_var_ext_balancer_equalizing) = x;
sensor:
# balance_trigger_voltage
- platform: modbus_controller
modbus_controller_id: modbus_controller_balancer${bms_id}
id: balancer${bms_id}_balance_trigger_voltage
name: "${name} ${balancer_name} Balance Trigger Voltage"
register_type: read
address: 3
value_type: U_WORD
accuracy_decimals: 3
unit_of_measurement: V
device_class: voltage
filters:
- multiply: 0.001
- or:
- throttle: 10s
- delta: 0.001
on_value:
then:
- lambda: |-
id(bms${bms_id}_var_ext_balancer_trigger_voltage) = x;
# balance_starting_voltage
- platform: modbus_controller
modbus_controller_id: modbus_controller_balancer${bms_id}
id: balancer${bms_id}_balance_starting_voltage
name: "${name} ${balancer_name} Balance Starting Voltage"
register_type: read
address: 4
value_type: U_WORD
accuracy_decimals: 3
unit_of_measurement: V
device_class: voltage
filters:
- multiply: 0.001
- or:
- throttle: 10s
- delta: 0.001
@@ -0,0 +1,60 @@
# Updated : 2025.08.14
# 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 <http://www.gnu.org/licenses/gpl.html>.
globals:
# External balancer online
- id: bms${bms_id}_var_ext_balancer_online
type: bool
restore_value: no
initial_value: "false"
# External balancer equalizing
- id: bms${bms_id}_var_ext_balancer_equalizing
type: bool
restore_value: no
initial_value: "false"
# External balancer trigger voltage (V)
- id: bms${bms_id}_var_ext_balancer_trigger_voltage
type: float
restore_value: no
initial_value: '0.0'
modbus_controller:
- modbus_id: ${modbus_id}
address: 10${bms_id} # max 255 (8bit)
server_registers:
# online_status (1/0)
- address: 1
value_type: U_WORD
read_lambda: |-
return uint16_t(id(balancer${bms_id}_online_status).state);
# equalizing (1/0)
- address: 2
value_type: U_WORD
read_lambda: |-
return uint16_t(id(balancer${bms_id}_equalizing).state);
# balance_trigger_voltage (mV)
- address: 3
value_type: U_WORD
read_lambda: |-
return uint16_t(id(balancer${bms_id}_balance_trigger_voltage).state * 1000);
# balance_starting_voltage (mV)
- address: 4
value_type: U_WORD
read_lambda: |-
return uint16_t(id(balancer${bms_id}_balance_starting_voltage).state * 1000);
@@ -0,0 +1,264 @@
# Updated : 2025.08.14
# Version : 1.1.1
# GitHub : https://github.com/syssi/esphome-jk-bms
# 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>.
substitutions:
balancer_model: "JK NEEY"
balancer_protocol: "BLE"
ota:
on_begin:
then:
- switch.turn_off: balancer${bms_id}_enable_bluetooth_connection
- logger.log: "BLE shutdown for flashing"
# +--------------------------------------+
# | Component settings |
# +--------------------------------------+
external_components:
- source: github://syssi/esphome-jk-bms@main
refresh: 0s
esp32_ble_tracker:
scan_parameters:
active: false
ble_client:
- id: ble_balancer_client${bms_id}
mac_address: ${balancer_ble_mac_address}
on_connect:
then:
- delay: 10s
- button.press: balancer${bms_id}_retrieve_settings_button
heltec_balancer_ble:
- ble_client_id: ble_balancer_client${bms_id}
throttle: ${bms_update_interval}
id: balancer_ble${bms_id}
# +--------------------------------------+
# | Component entities |
# +--------------------------------------+
binary_sensor:
- platform: heltec_balancer_ble
heltec_balancer_ble_id: balancer_ble${bms_id}
online_status:
id: balancer${bms_id}_online_status
name: "${name} ${balancer_name} online status"
on_state:
then:
- lambda: id(bms${bms_id}_var_ext_balancer_online) = x;
balancing:
id: balancer${bms_id}_equalizing
name: "${name} ${balancer_name} balancing"
on_state:
then:
- lambda: id(bms${bms_id}_var_ext_balancer_equalizing) = x;
switch:
- platform: heltec_balancer_ble
heltec_balancer_ble_id: balancer_ble${bms_id}
balancer:
id: balancer${bms_id}_balance_switch
name: "${name} ${balancer_name} Balance switch"
- platform: ble_client
ble_client_id: ble_balancer_client${bms_id}
id: balancer${bms_id}_enable_bluetooth_connection
name: "${name} ${balancer_name} enable Bluetooth"
sensor:
- platform: heltec_balancer_ble
heltec_balancer_ble_id: balancer_ble${bms_id}
min_cell_voltage:
id: balancer${bms_id}_min_cell_voltage
name: "${name} ${balancer_name} min cell voltage"
max_cell_voltage:
id: balancer${bms_id}_max_cell_voltage
name: "${name} ${balancer_name} max cell voltage"
min_voltage_cell:
id: balancer${bms_id}_min_voltage_cell
name: "${name} ${balancer_name} min voltage cell"
max_voltage_cell:
id: balancer${bms_id}_max_voltage_cell
name: "${name} ${balancer_name} max voltage cell"
delta_cell_voltage:
id: balancer${bms_id}_delta_cell_voltage
name: "${name} ${balancer_name} delta cell voltage"
average_cell_voltage:
id: balancer${bms_id}_average_cell_voltage
name: "${name} ${balancer_name} average cell voltage"
cell_voltage_1:
id: balancer${bms_id}_cell_v_01
name: "${name} ${balancer_name} cell voltage 01"
cell_voltage_2:
id: balancer${bms_id}_cell_v_02
name: "${name} ${balancer_name} cell voltage 02"
cell_voltage_3:
id: balancer${bms_id}_cell_v_03
name: "${name} ${balancer_name} cell voltage 03"
cell_voltage_4:
id: balancer${bms_id}_cell_v_04
name: "${name} ${balancer_name} cell voltage 04"
cell_voltage_5:
id: balancer${bms_id}_cell_v_05
name: "${name} ${balancer_name} cell voltage 05"
cell_voltage_6:
id: balancer${bms_id}_cell_v_06
name: "${name} ${balancer_name} cell voltage 06"
cell_voltage_7:
id: balancer${bms_id}_cell_v_07
name: "${name} ${balancer_name} cell voltage 07"
cell_voltage_8:
id: balancer${bms_id}_cell_v_08
name: "${name} ${balancer_name} cell voltage 08"
cell_voltage_9:
id: balancer${bms_id}_cell_v_09
name: "${name} ${balancer_name} cell voltage 09"
cell_voltage_10:
id: balancer${bms_id}_cell_v_10
name: "${name} ${balancer_name} cell voltage 10"
cell_voltage_11:
id: balancer${bms_id}_cell_v_11
name: "${name} ${balancer_name} cell voltage 11"
cell_voltage_12:
id: balancer${bms_id}_cell_v_12
name: "${name} ${balancer_name} cell voltage 12"
cell_voltage_13:
id: balancer${bms_id}_cell_v_13
name: "${name} ${balancer_name} cell voltage 13"
cell_voltage_14:
id: balancer${bms_id}_cell_v_14
name: "${name} ${balancer_name} cell voltage 14"
cell_voltage_15:
id: balancer${bms_id}_cell_v_15
name: "${name} ${balancer_name} cell voltage 15"
cell_voltage_16:
id: balancer${bms_id}_cell_v_16
name: "${name} ${balancer_name} cell voltage 16"
cell_resistance_1:
name: "${name} ${balancer_name} wire resistance 01"
cell_resistance_2:
name: "${name} ${balancer_name} wire resistance 02"
cell_resistance_3:
name: "${name} ${balancer_name} wire resistance 03"
cell_resistance_4:
name: "${name} ${balancer_name} wire resistance 04"
cell_resistance_5:
name: "${name} ${balancer_name} wire resistance 05"
cell_resistance_6:
name: "${name} ${balancer_name} wire resistance 06"
cell_resistance_7:
name: "${name} ${balancer_name} wire resistance 07"
cell_resistance_8:
name: "${name} ${balancer_name} wire resistance 08"
cell_resistance_9:
name: "${name} ${balancer_name} wire resistance 09"
cell_resistance_10:
name: "${name} ${balancer_name} wire resistance 10"
cell_resistance_11:
name: "${name} ${balancer_name} wire resistance 11"
cell_resistance_12:
name: "${name} ${balancer_name} wire resistance 12"
cell_resistance_13:
name: "${name} ${balancer_name} wire resistance 13"
cell_resistance_14:
name: "${name} ${balancer_name} wire resistance 14"
cell_resistance_15:
name: "${name} ${balancer_name} wire resistance 15"
cell_resistance_16:
name: "${name} ${balancer_name} wire resistance 16"
total_voltage:
id: balancer${bms_id}_total_voltage
name: "${name} ${balancer_name} total voltage"
temperature_sensor_1:
id: balancer${bms_id}_temperature_sensor_1
name: "${name} ${balancer_name} temperature sensor 1"
temperature_sensor_2:
id: balancer${bms_id}_temperature_sensor_2
name: "${name} ${balancer_name} temperature sensor 2"
total_runtime:
name: "${name} ${balancer_name} total runtime"
balancing_current:
name: "${name} ${balancer_name} balancing current"
cell_detection_failed_bitmask:
name: "${name} ${balancer_name} cell detection failed bitmask"
cell_overvoltage_bitmask:
name: "${name} ${balancer_name} cell overvoltage bitmask"
cell_undervoltage_bitmask:
name: "${name} ${balancer_name} cell undervoltage bitmask"
cell_polarity_error_bitmask:
name: "${name} ${balancer_name} cell polarity error bitmask"
cell_excessive_line_resistance_bitmask:
name: "${name} ${balancer_name} cell excessive line resistance bitmask"
text_sensor:
- platform: heltec_balancer_ble
heltec_balancer_ble_id: balancer_ble${bms_id}
operation_status:
name: "${name} ${balancer_name} operation status"
total_runtime_formatted:
name: "${name} ${balancer_name} total runtime formatted"
entity_category: diagnostic
buzzer_mode:
name: "${name} ${balancer_name} buzzer mode"
battery_type:
name: "${name} ${balancer_name} battery type"
number:
- platform: heltec_balancer_ble
heltec_balancer_ble_id: balancer_ble${bms_id}
cell_count:
id: balancer${bms_id}_cell_count
name: "${name} ${balancer_name} cell count"
balance_trigger_voltage:
id: balancer${bms_id}_balance_trigger_voltage
name: "${name} ${balancer_name} balance trigger voltage"
on_value:
then:
- lambda: id(bms${bms_id}_var_ext_balancer_trigger_voltage) = x;
max_balance_current:
name: "${name} ${balancer_name} max balance current"
balance_sleep_voltage:
name: "${name} ${balancer_name} balance sleep voltage"
balance_start_voltage:
id: balancer${bms_id}_balance_starting_voltage
name: "${name} ${balancer_name} balance starting voltage"
nominal_battery_capacity:
name: "${name} ${balancer_name} total battery capacity"
button:
- platform: heltec_balancer_ble
heltec_balancer_ble_id: balancer_ble${bms_id}
retrieve_settings:
id: balancer${bms_id}_retrieve_settings_button
name: "${name} ${balancer_name} retrieve settings"
entity_category: config
retrieve_device_info:
name: "${name} ${balancer_name} retrieve device info"
entity_category: config
# retrieve_factory_defaults:
# name: "${name} ${balancer_name} retrieve factory defaults"
# entity_category: config
interval:
- interval: 30min
then:
- button.press: balancer${bms_id}_retrieve_settings_button
+2 -1
View File
@@ -1,4 +1,4 @@
# Updated : 2025.08.13
# Updated : 2025.08.14
# Version : 1.1.1
# GitHub : https://github.com/Sleeper85/esphome-yambms
@@ -54,6 +54,7 @@ sensor:
accuracy_decimals: 3
unit_of_measurement: V
device_class: voltage
state_class: 'measurement'
filters:
- or:
- throttle: 10s
+5 -2
View File
@@ -1,5 +1,5 @@
# Updated : 2025.06.15
# Version : 1.2.4
# Updated : 2025.08.14
# Version : 1.2.5
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -17,6 +17,9 @@
# 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>.
packages:
bms_balancer: !include bms_balancer.yaml
number:
# +--------------------------------------+
# | Charging Cycles Offset |
@@ -1,5 +1,5 @@
# Updated : 2025.07.07
# Version : 1.2.9
# Updated : 2025.08.14
# Version : 1.2.10
# GitHub : https://github.com/syssi/esphome-jk-bms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -76,8 +76,9 @@ binary_sensor:
- platform: jk_bms_ble
jk_bms_ble_id: jk_bms_ble${bms_id}
balancing:
id: bms${bms_id}_equalizing
id: bms${bms_id}_bms_equalizing
name: "${name} ${bms_name} balancing"
internal: true
charging:
id: bms${bms_id}_charging_allowed
name: "${name} ${bms_name} charging"
@@ -375,8 +376,9 @@ number:
id: bms${bms_id}_balance_starting_voltage
name: "${name} ${bms_name} balance starting voltage"
balance_trigger_voltage:
id: bms${bms_id}_balance_trigger_voltage
id: bms${bms_id}_bms_balance_trigger_voltage
name: "${name} ${bms_name} balance trigger voltage"
internal: true
# Commits 2024.07.07 : Improve the support of the JK-PBs series (from V11)
smart_sleep_voltage:
name: "${name} ${bms_name} smart sleep voltage"
+6 -4
View File
@@ -1,5 +1,5 @@
# Updated : 2025.07.07
# Version : 1.2.9
# Updated : 2025.08.14
# Version : 1.2.10
# GitHub : https://github.com/syssi/esphome-jk-bms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -76,8 +76,9 @@ binary_sensor:
- platform: jk_bms_ble
jk_bms_ble_id: jk_bms_ble${bms_id}
balancing:
id: bms${bms_id}_equalizing
id: bms${bms_id}_bms_equalizing
name: "${name} ${bms_name} balancing"
internal: true
charging:
id: bms${bms_id}_charging_allowed
name: "${name} ${bms_name} charging"
@@ -344,8 +345,9 @@ number:
id: bms${bms_id}_balance_starting_voltage
name: "${name} ${bms_name} balance starting voltage"
balance_trigger_voltage:
id: bms${bms_id}_balance_trigger_voltage
id: bms${bms_id}_bms_balance_trigger_voltage
name: "${name} ${bms_name} balance trigger voltage"
internal: true
button:
- platform: jk_bms_ble
+6 -4
View File
@@ -1,5 +1,5 @@
# Updated : 2025.07.07
# Version : 1.2.9
# Updated : 2025.08.14
# Version : 1.2.10
# GitHub : https://github.com/syssi/esphome-jk-bms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -76,8 +76,9 @@ binary_sensor:
- platform: jk_bms_ble
jk_bms_ble_id: jk_bms_ble${bms_id}
balancing:
id: bms${bms_id}_equalizing
id: bms${bms_id}_bms_equalizing
name: "${name} ${bms_name} balancing"
internal: true
charging:
id: bms${bms_id}_charging_allowed
name: "${name} ${bms_name} charging"
@@ -215,8 +216,9 @@ number:
id: bms${bms_id}_balance_starting_voltage
name: "${name} ${bms_name} balance starting voltage"
balance_trigger_voltage:
id: bms${bms_id}_balance_trigger_voltage
id: bms${bms_id}_bms_balance_trigger_voltage
name: "${name} ${bms_name} balance trigger voltage"
internal: true
button:
- platform: jk_bms_ble
@@ -1,5 +1,5 @@
# Updated : 2025.06.11
# Version : 1.1.4
# Updated : 2025.08.14
# Version : 1.1.5
# GitHub : https://github.com/syssi/esphome-jk-bms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -129,8 +129,9 @@ binary_sensor:
return false;
# equalizing
- platform: template
id: bms${bms_id}_equalizing
id: bms${bms_id}_bms_equalizing
name: "${name} ${bms_name} balancing"
internal: true
lambda: return false;
sensor:
@@ -313,8 +314,9 @@ sensor:
# balance_trigger_voltage
- platform: template
id: bms${bms_id}_balance_trigger_voltage
id: bms${bms_id}_bms_balance_trigger_voltage
name: "${name} ${bms_name} balance trigger voltage"
internal: true
update_interval: ${bms_update_interval}
accuracy_decimals: 3
unit_of_measurement: V
@@ -1,5 +1,5 @@
# Updated : 2025.07.07
# Version : 1.2.7
# Updated : 2025.08.14
# Version : 1.2.8
# GitHub : https://github.com/txubelaxu/esphome-jk-bms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -78,8 +78,9 @@ binary_sensor:
- platform: jk_rs485_bms
jk_rs485_bms_id: jk_rs485_bms${bms_id}
status_balancing:
id: bms${bms_id}_equalizing
id: bms${bms_id}_bms_equalizing
name: "${name} ${bms_name} status balancing"
internal: true
status_precharging:
name: "${name} ${bms_name} status precharging"
status_charging:
@@ -243,8 +244,9 @@ number:
id: bms${bms_id}_cell_ovpr
name: "${name} ${bms_name} cell overvoltage protection recovery"
cell_balancing_trigger_voltage:
id: bms${bms_id}_balance_trigger_voltage
id: bms${bms_id}_bms_balance_trigger_voltage
name: "${name} ${bms_name} balancing trigger voltage"
internal: true
cell_balancing_starting_voltage:
name: "${name} ${bms_name} cell balancing starting voltage"
max_balancing_current:
@@ -1,5 +1,5 @@
# Updated : 2025.06.11
# Version : 1.2.9
# Updated : 2025.08.14
# Version : 1.2.10
# GitHub : https://github.com/syssi/esphome-jk-bms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -53,8 +53,9 @@ binary_sensor:
- platform: jk_bms
jk_bms_id: jk_bms${bms_id}
balancing:
id: bms${bms_id}_equalizing
id: bms${bms_id}_bms_equalizing
name: "${name} ${bms_name} balancing"
internal: true
balancing_switch:
name: "${name} ${bms_name} balancing switch"
charging:
@@ -187,8 +188,9 @@ sensor:
id: bms${bms_id}_balance_starting_voltage
name: "${name} ${bms_name} balance starting voltage"
balance_opening_pressure_difference:
id: bms${bms_id}_balance_trigger_voltage
id: bms${bms_id}_bms_balance_trigger_voltage
name: "${name} ${bms_name} balance opening pressure difference"
internal: true
power_tube_temperature_protection:
name: "${name} ${bms_name} power tube temperature protection"
power_tube_temperature_recovery:
+12 -8
View File
@@ -1,5 +1,5 @@
# Updated : 2025.08.07
# Version : 1.1.8
# Updated : 2025.08.14
# Version : 1.1.9
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -23,6 +23,7 @@ substitutions:
packages:
bms_combine: !include bms_combine.yaml
bms_balancer: !include bms_balancer.yaml
# +--------------------------------------+
# | Component settings |
@@ -47,7 +48,7 @@ modbus_controller:
id(bms${bms_id}_online_status).publish_state(false);
id(bms${bms_id}_charging_allowed).publish_state(false);
id(bms${bms_id}_discharging_allowed).publish_state(false);
id(bms${bms_id}_equalizing).publish_state(false);
id(bms${bms_id}_bms_equalizing).publish_state(false);
id(bms${bms_id}_total_voltage).publish_state(0);
id(bms${bms_id}_current).publish_state(0);
id(bms${bms_id}_power).publish_state(0);
@@ -67,7 +68,7 @@ modbus_controller:
id(bms${bms_id}_max_temperature_sensor).publish_state(0);
id(bms${bms_id}_cell_ovp).publish_state(0);
id(bms${bms_id}_cell_uvp).publish_state(0);
id(bms${bms_id}_balance_trigger_voltage).publish_state(0);
id(bms${bms_id}_bms_balance_trigger_voltage).publish_state(0);
id(bms${bms_id}_yambms_errors_bitmask).publish_state(0);
id(bms${bms_id}_charging_power).publish_state(0);
id(bms${bms_id}_discharging_power).publish_state(0);
@@ -100,11 +101,13 @@ binary_sensor:
name: "${name} ${bms_name} Discharging allowed"
register_type: read
address: 3
lambda: if (!id(bms${bms_id}_online_status).state) return false; else return x;
# equalizing
- platform: modbus_controller
modbus_controller_id: modbus_controller${bms_id}
id: bms${bms_id}_equalizing
name: "${name} ${bms_name} Equalizing state"
id: bms${bms_id}_bms_equalizing
name: "${name} ${bms_name} balancing"
internal: true
register_type: read
address: 4
lambda: if (!id(bms${bms_id}_online_status).state) return false; else return x;
@@ -431,8 +434,9 @@ sensor:
# balance_trigger_voltage
- platform: modbus_controller
modbus_controller_id: modbus_controller${bms_id}
id: bms${bms_id}_balance_trigger_voltage
name: "${name} ${bms_name} Balance Trigger Voltage"
id: bms${bms_id}_bms_balance_trigger_voltage
name: "${name} ${bms_name} balance trigger voltage"
internal: true
register_type: read
address: 27
value_type: U_WORD
@@ -1,5 +1,5 @@
# Updated : 2025.08.08
# Version : 1.1.3
# Updated : 2025.08.14
# Version : 1.1.4
# GitHub : https://github.com/txubelaxu/esphome-jk-bms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -50,12 +50,13 @@ binary_sensor:
# Balancing
- platform: template
id: bms${bms_id}_equalizing
name: "${name} ${bms_name} status balancing"
id: bms${bms_id}_bms_equalizing
name: "${name} ${bms_name} balancing"
internal: true
lambda: |-
float max_cell_voltage = id(bms${bms_id}_max_cell_voltage).state;
float delta_cell_voltage = id(bms${bms_id}_delta_voltage_cell).state;
float balance_trigger_voltage = id(bms${bms_id}_balance_trigger_voltage).state;
float balance_trigger_voltage = id(bms${bms_id}_bms_balance_trigger_voltage).state;
float balance_starting_voltage = id(bms${bms_id}_balance_starting_voltage).state;
if (max_cell_voltage < balance_starting_voltage)
return false;
@@ -265,8 +266,9 @@ sensor:
id: bms${bms_id}_balance_starting_voltage
name: "${name} ${bms_name} balancing starting voltage"
Balance_Start_Diff:
id: bms${bms_id}_balance_trigger_voltage
id: bms${bms_id}_bms_balance_trigger_voltage
name: "${name} ${bms_name} balance trigger voltage"
internal: true
Sleep_Cell_Volt:
name: "${name} ${bms_name} Sleep_Cell_Volt"
Shorts_Delay:
@@ -1,5 +1,5 @@
# Updated : 2025.08.08
# Version : 1.1.4
# Updated : 2025.08.14
# Version : 1.1.5
# GitHub : https://github.com/GHswitt/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -116,7 +116,7 @@ canbus:
id(bms${bms_id}_cell_14_balancing).publish_state(x[5] & 0x20);
id(bms${bms_id}_cell_15_balancing).publish_state(x[5] & 0x40);
id(bms${bms_id}_cell_16_balancing).publish_state(x[5] & 0x80);
id(bms${bms_id}_equalizing).publish_state(x[4] | x[5]);
id(bms${bms_id}_bms_equalizing).publish_state(x[4] | x[5]);
- can_id: 0x55${deye_module_id}
then:
@@ -158,8 +158,9 @@ binary_sensor:
# Equalizing
- platform: template
id: bms${bms_id}_equalizing
name: "${name} ${bms_name} status balancing"
id: bms${bms_id}_bms_equalizing
name: "${name} ${bms_name} balancing"
internal: true
filters:
- delayed_off: 300s
@@ -511,8 +512,9 @@ sensor:
device_class: 'voltage'
state_class: 'measurement'
accuracy_decimals: 2
id: bms${bms_id}_balance_trigger_voltage
id: bms${bms_id}_bms_balance_trigger_voltage
name: "${name} ${bms_name} balance trigger voltage"
internal: true
lambda: |-
return 0.03;
@@ -1,5 +1,5 @@
# Updated : 2025.08.08
# Version : 1.1.3
# Updated : 2025.08.14
# Version : 1.1.4
# GitHub : https://github.com/GHswitt/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -82,7 +82,7 @@ canbus:
id(bms${bms_id}_fault).publish_state(x[1] & 3);
float cycles = ((x[3] << 8) | x[2]);
id(bms${bms_id}_charging_cycles_raw).publish_state(cycles);
id(bms${bms_id}_equalizing).publish_state(x[4] | x[5]);
id(bms${bms_id}_bms_equalizing).publish_state(x[4] | x[5]);
- can_id: 0x55${deye_module_id}
then:
@@ -105,8 +105,9 @@ binary_sensor:
# Equalizing
- platform: template
id: bms${bms_id}_equalizing
name: "${name} ${bms_name} status balancing"
id: bms${bms_id}_bms_equalizing
name: "${name} ${bms_name} balancing"
internal: true
filters:
- delayed_off: 300s
@@ -385,8 +386,9 @@ sensor:
unit_of_measurement: 'V'
state_class: 'measurement'
accuracy_decimals: 2
id: bms${bms_id}_balance_trigger_voltage
id: bms${bms_id}_bms_balance_trigger_voltage
name: "${name} ${bms_name} balance trigger voltage"
internal: true
lambda: |-
return 0.03;
+6 -5
View File
@@ -1,5 +1,5 @@
# Updated : 2025.06.28
# Version : 1.1.6
# Updated : 2025.08.14
# Version : 1.1.7
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -287,8 +287,9 @@ sensor:
# balance_trigger_voltage
- platform: template
id: bms${bms_id}_balance_trigger_voltage
name: "${name} ${bms_name} Balance Trigger Voltage"
id: bms${bms_id}_bms_balance_trigger_voltage
name: "${name} ${bms_name} balance trigger voltage"
internal: true
update_interval: ${bms_update_interval}
accuracy_decimals: 3
unit_of_measurement: V
@@ -371,7 +372,7 @@ switch:
optimistic: true
# bms_switch_balancing
- platform: template
id: bms${bms_id}_equalizing
id: bms${bms_id}_bms_equalizing
name: "${name} ${bms_name} balance switch"
restore_mode: RESTORE_DEFAULT_OFF
optimistic: true
+6 -4
View File
@@ -1,5 +1,5 @@
# Updated : 2025.06.16
# Version : 1.1.6
# Updated : 2025.08.14
# Version : 1.1.7
# GitHub : https://github.com/syssi/esphome-jdb-bms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -64,8 +64,9 @@ binary_sensor:
- platform: jbd_bms_ble
jbd_bms_ble_id: jbd_bms_ble${bms_id}
balancing:
id: bms${bms_id}_equalizing
id: bms${bms_id}_bms_equalizing
name: "${name} ${bms_name} balancing"
internal: true
charging:
id: bms${bms_id}_charging_allowed
name: "${name} ${bms_name} charging"
@@ -292,8 +293,9 @@ sensor:
lambda: return ${bms_cell_uvp};
# balance_trigger_voltage
- platform: template
id: bms${bms_id}_balance_trigger_voltage
id: bms${bms_id}_bms_balance_trigger_voltage
name: "${name} ${bms_name} balance trigger voltage"
internal: true
update_interval: ${bms_update_interval}
accuracy_decimals: 3
unit_of_measurement: V
+6 -4
View File
@@ -1,5 +1,5 @@
# Updated : 2025.06.16
# Version : 1.1.6
# Updated : 2025.08.14
# Version : 1.1.7
# GitHub : https://github.com/syssi/esphome-jdb-bms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -55,8 +55,9 @@ binary_sensor:
- platform: jbd_bms
jbd_bms_id: jbd_bms${bms_id}
balancing:
id: bms${bms_id}_equalizing
id: bms${bms_id}_bms_equalizing
name: "${name} ${bms_name} balancing"
internal: true
charging:
id: bms${bms_id}_charging_allowed
name: "${name} ${bms_name} charging"
@@ -276,8 +277,9 @@ sensor:
lambda: return ${bms_cell_uvp};
# balance_trigger_voltage
- platform: template
id: bms${bms_id}_balance_trigger_voltage
id: bms${bms_id}_bms_balance_trigger_voltage
name: "${name} ${bms_name} balance trigger voltage"
internal: true
update_interval: ${bms_update_interval}
accuracy_decimals: 3
unit_of_measurement: V
@@ -1,5 +1,5 @@
# Updated : 2025.07.07
# Version : 1.2.9
# Updated : 2025.08.14
# Version : 1.2.10
# GitHub : https://github.com/syssi/esphome-jk-bms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -71,8 +71,9 @@ binary_sensor:
- platform: jk_bms_ble
jk_bms_ble_id: jk_bms_ble${bms_id}
balancing:
id: bms${bms_id}_equalizing
id: bms${bms_id}_bms_equalizing
name: "${name} ${bms_name} balancing"
internal: true
charging:
id: bms${bms_id}_charging_allowed
name: "${name} ${bms_name} charging"
@@ -290,8 +291,9 @@ number:
id: bms${bms_id}_balance_starting_voltage
name: "${name} ${bms_name} balance starting voltage"
balance_trigger_voltage:
id: bms${bms_id}_balance_trigger_voltage
id: bms${bms_id}_bms_balance_trigger_voltage
name: "${name} ${bms_name} balance trigger voltage"
internal: true
# Added 2024.11.11
charge_overtemperature_protection:
name: "${name} ${bms_name} charge overtemperature protection"
@@ -1,5 +1,5 @@
# Updated : 2025.07.07
# Version : 1.1.3
# Updated : 2025.08.14
# Version : 1.1.4
# GitHub : https://github.com/txubelaxu/esphome-jk-bms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -63,8 +63,9 @@ binary_sensor:
- platform: jk_rs485_bms
jk_rs485_bms_id: jk_rs485_bms${bms_id}
status_balancing:
id: bms${bms_id}_equalizing
id: bms${bms_id}_bms_equalizing
name: "${name} ${bms_name} status balancing"
internal: true
status_charging:
id: bms${bms_id}_charging_allowed
name: "${name} ${bms_name} status charging"
@@ -310,8 +311,9 @@ number:
id: bms${bms_id}_cell_ovpr
name: "${name} ${bms_name} cell overvoltage protection recovery"
cell_balancing_trigger_voltage:
id: bms${bms_id}_balance_trigger_voltage
id: bms${bms_id}_bms_balance_trigger_voltage
name: "${name} ${bms_name} balancing trigger voltage"
internal: true
cell_balancing_starting_voltage:
name: "${name} ${bms_name} cell balancing starting voltage"
max_balancing_current:
@@ -1,5 +1,5 @@
# Updated : 2025.07.07
# Version : 1.2.8
# Updated : 2025.08.14
# Version : 1.2.9
# GitHub : https://github.com/txubelaxu/esphome-jk-bms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -77,8 +77,9 @@ binary_sensor:
- platform: jk_rs485_bms
jk_rs485_bms_id: jk_rs485_bms${bms_id}
status_balancing:
id: bms${bms_id}_equalizing
id: bms${bms_id}_bms_equalizing
name: "${name} ${bms_name} status balancing"
internal: true
status_precharging:
name: "${name} ${bms_name} status precharging"
status_charging:
@@ -417,8 +418,9 @@ number:
cell_request_float_voltage_time:
name: "${name} ${bms_name} cell request float voltage time"
cell_balancing_trigger_voltage:
id: bms${bms_id}_balance_trigger_voltage
id: bms${bms_id}_bms_balance_trigger_voltage
name: "${name} ${bms_name} balancing trigger voltage"
internal: true
cell_balancing_starting_voltage:
name: "${name} ${bms_name} cell balancing starting voltage"
max_balancing_current:
@@ -1,5 +1,5 @@
# Updated : 2025.07.07
# Version : 1.2.8
# Updated : 2025.08.14
# Version : 1.2.9
# GitHub : https://github.com/txubelaxu/esphome-jk-bms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -77,8 +77,9 @@ binary_sensor:
- platform: jk_rs485_bms
jk_rs485_bms_id: jk_rs485_bms${bms_id}
status_balancing:
id: bms${bms_id}_equalizing
id: bms${bms_id}_bms_equalizing
name: "${name} ${bms_name} status balancing"
internal: true
status_precharging:
name: "${name} ${bms_name} status precharging"
status_charging:
@@ -338,8 +339,9 @@ number:
id: bms${bms_id}_cell_ovpr
name: "${name} ${bms_name} cell overvoltage protection recovery"
cell_balancing_trigger_voltage:
id: bms${bms_id}_balance_trigger_voltage
id: bms${bms_id}_bms_balance_trigger_voltage
name: "${name} ${bms_name} balancing trigger voltage"
internal: true
cell_balancing_starting_voltage:
name: "${name} ${bms_name} cell balancing starting voltage"
max_balancing_current:
@@ -1,5 +1,5 @@
# Updated : 2025.08.13
# Version : 1.2.9
# Updated : 2025.08.14
# Version : 1.2.10
# GitHub : https://github.com/syssi/esphome-jk-bms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -51,6 +51,7 @@ binary_sensor:
balancing:
id: bms${bms_id}_bms_equalizing
name: "${name} ${bms_name} balancing"
internal: true
balancing_switch:
name: "${name} ${bms_name} balancing switch"
charging:
@@ -271,6 +272,7 @@ sensor:
balance_opening_pressure_difference:
id: bms${bms_id}_bms_balance_trigger_voltage
name: "${name} ${bms_name} balance opening pressure difference"
internal: true
power_tube_temperature_protection:
name: "${name} ${bms_name} power tube temperature protection"
power_tube_temperature_recovery:
@@ -1,5 +1,5 @@
# Updated : 2025.07.25
# Version : 1.1.7
# Updated : 2025.08.14
# Version : 1.1.8
# GitHub : https://github.com/syssi/esphome-seplos-bms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -50,8 +50,9 @@ binary_sensor:
# Required sensors cannot be retrieved from BMS
# equalizing
- platform: template
id: bms${bms_id}_equalizing
id: bms${bms_id}_bms_equalizing
name: "${name} ${bms_name} balancing"
internal: true
lambda: return false;
# bms_switch_charging
- platform: template
@@ -222,8 +223,9 @@ sensor:
lambda: return ${bms_cell_uvp};
# balance_trigger_voltage
- platform: template
id: bms${bms_id}_balance_trigger_voltage
id: bms${bms_id}_bms_balance_trigger_voltage
name: "${name} ${bms_name} balance trigger voltage"
internal: true
update_interval: ${bms_update_interval}
accuracy_decimals: 3
unit_of_measurement: V
@@ -1,5 +1,5 @@
# Updated : 2025.07.24
# Version : 1.1.1
# Updated : 2025.08.14
# Version : 1.1.2
# GitHub : https://github.com/syssi/esphome-seplos-bms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -43,7 +43,7 @@ modbus_controller:
id(bms${bms_id}_online_status).publish_state(false);
id(bms${bms_id}_charging_allowed).publish_state(false);
id(bms${bms_id}_discharging_allowed).publish_state(false);
id(bms${bms_id}_equalizing).publish_state(false);
id(bms${bms_id}_bms_equalizing).publish_state(false);
id(bms${bms_id}_total_voltage).publish_state(0);
id(bms${bms_id}_current).publish_state(0);
id(bms${bms_id}_power).publish_state(0);
@@ -64,7 +64,7 @@ modbus_controller:
id(bms${bms_id}_max_temperature_sensor).publish_state(0);
id(bms${bms_id}_cell_ovp).publish_state(0);
id(bms${bms_id}_cell_uvp).publish_state(0);
id(bms${bms_id}_balance_trigger_voltage).publish_state(0);
id(bms${bms_id}_bms_balance_trigger_voltage).publish_state(0);
id(bms${bms_id}_yambms_errors_bitmask).publish_state(0);
id(bms${bms_id}_charging_power).publish_state(0);
id(bms${bms_id}_discharging_power).publish_state(0);
@@ -100,8 +100,9 @@ binary_sensor:
# 1280 TB12 Bit 0 - Equilibrium module to open
- platform: modbus_controller
modbus_controller_id: modbus_controller_bms${bms_id}
id: bms${bms_id}_equalizing
name: "${name} ${bms_name} Equalizing"
id: bms${bms_id}_bms_equalizing
name: "${name} ${bms_name} Equilibrium module to open"
internal: true
register_type: read
address: 0x1280
bitmask: 1 # bit 0
@@ -685,8 +686,9 @@ sensor:
# 1351 Equalization open voltage difference R UINT16 2 0.001V
- platform: modbus_controller
modbus_controller_id: modbus_controller_bms${bms_id}
id: bms${bms_id}_balance_trigger_voltage
id: bms${bms_id}_bms_balance_trigger_voltage
name: "${name} ${bms_name} Equalization open voltage difference"
internal: true
address: 0x1351
register_type: read
value_type: U_WORD