59 Commits
Author SHA1 Message Date
Sleeper85 c51e694197 Update board_ESP32-S3_Touch-LCD-4.3.yaml 2025-05-30 14:49:36 +02:00
Sleeper85 802511f4d6 Adds Waveshare LCD Touch boards 2025-05-30 14:22:49 +02:00
Sleeper85 c83eddecd0 Merge branch 'main' of https://github.com/Sleeper85/esphome-yambms 2025-05-30 09:15:53 +02:00
Sleeper85 cf95333a36 Update README.md 2025-05-30 09:15:40 +02:00
Sleeper85 5bb5eb99ad Merge pull request #50 from GHswitt/PR/Deye_Throttle
DEYE: Add throttle to some values
2025-05-21 00:32:26 +02:00
Sebastian f5592a005e Deye: Throttle operating mode 2025-05-20 22:59:57 +02:00
Sebastian b1e6af7a57 Deye: Throttle charge/discharge current as it fluctuates 2025-05-20 22:59:13 +02:00
Sleeper85 5e8ac7f3b1 Fixed Shunt SoC sensor name 2025-05-19 15:15:08 +02:00
Sleeper85 34722c13ce Merge branch 'main' of https://github.com/Sleeper85/esphome-yambms 2025-05-16 10:17:51 +02:00
Sleeper85 b3445c5e3c Important notes regarding BMS configuration. 2025-05-16 10:16:46 +02:00
Sleeper85 9859d4b0be Merge pull request #45 from GHswitt/PR_Modbus
Add Modbus server files for JK BMS (RS485) and DEYE (CAN)
2025-05-15 12:02:01 +02:00
Sebastian 6926f9ef9b Add Modbus server file for DEYE connected via CAN 2025-05-15 11:57:34 +02:00
Sebastian fca0b6848d Add Modbus server file for JK BMS connected via RS485 2025-05-15 11:57:30 +02:00
Sleeper85 9b22639405 Update README.md 2025-05-15 09:16:34 +02:00
Sleeper85 692eb525ca Merge pull request #49 from GHswitt/SmartShunt_Minimal
Add minimal versions for Victron SmartShunt via Modbus
2025-05-14 17:34:33 +02:00
Sleeper85 d56c2f1457 Merge pull request #48 from GHswitt/PR_README_Data_Collection
Inform in README.md about statistics collection
2025-05-14 17:20:54 +02:00
Sleeper85 884d4219a6 Create board_ESP32-S3_AtomS3_WOD.yaml 2025-05-14 09:25:43 +02:00
Sleeper85 9c4897d87e YamBMS 1.5.5 - Fix double name issue after HA PR #143049
https://github.com/home-assistant/core/pull/143049
2025-05-13 12:11:36 +02:00
Sleeper85 6b7c178093 Fix double name issue after HA PR #143049
https://github.com/home-assistant/core/pull/143049
2025-05-11 16:07:40 +02:00
Sebastian 557721f7f7 Add minimal versions for Victron SmartShunt via Modbus 2025-04-30 22:33:00 +02:00
Sebastian be71ac9340 Inform in README.md about statistics collection 2025-04-27 23:31:02 +02:00
Sleeper85 74587aa5f7 Update BMS_JK-B.md 2025-04-25 13:33:57 +02:00
Sleeper85 ec10e09c18 Update JK-B readme 2025-04-23 17:20:50 +02:00
Sleeper85 0b5773c9c9 JK RS485 Modbus JK-B standard version 2025-04-21 14:35:12 +02:00
Sleeper85 82493b0a6a Update README 2025-04-20 22:37:27 +02:00
Sleeper85 e0ccd7d07d Merge pull request #37 from GHswitt/Deye_CAN_PCS
Add support for Deye CAN PCS batteries
2025-04-16 15:20:55 +02:00
Sebastian 525436db44 Add support for Deye CAN PCS batteries
This adds support for Deye batteries using the CAN PCS port of
the battery.
Via the PCS port the battery sends out the overall status and status
frames for each installed module. This commit was tested with
a battery with two Deye AI-W5.1 modules.

bms_combine_DEYE_CAN_module_full.yaml:
  Combination of the BMS parts. For each module.
bms_combine_DEYE_CAN_module_minimal.yaml:
  Minimum number of sensors.
bms_sensors_DEYE_CAN_top_full.yaml:
  Deye top unit data, required.
bms_sensors_DEYE_CAN_top_minimal.yaml:
  Deye top unit data with reduced number of sensors.
bms_can_DEYE_module_full.yaml:
  Deye battery module data.
bms_can_DEYE_module_minimal.yaml:
  Deye battery module data with reduced number of sensors.
bms_errors_bitmask_DEYE_CAN.yaml:
  Error mapping Deye -> yambms.
YamBMS_LP_DEYE-PCS_CAN.yaml:
  Example using LilyGo T-CAN485
  with MCP2515 as secondary CAN bus.

Signed-off-by: Sebastian Witt <seb.witt@googlemail.com>
2025-04-16 15:09:01 +02:00
Sebastian 5aed8e6267 Allow substitions for can_id and bit_rate for MCP2515
Signed-off-by: Sebastian Witt <seb.witt@googlemail.com>
2025-04-14 20:54:27 +02:00
Sleeper85 5fe8583799 Rounding the SoC 2025-04-14 20:01:50 +02:00
Sleeper85 01462622d5 Don't limit the flash size to 2MB for ETH01-EVO 2025-04-13 14:27:33 +02:00
Sleeper85 d0601905e6 Update README 2025-04-07 20:29:00 +02:00
Sleeper85 3775c108ee YamBMS Remote Packages 1.5.5 2025-04-07 19:25:49 +02:00
Sleeper85 b3bcfdef7e YamBMS Local Packages 1.5.5 2025-04-07 19:25:29 +02:00
Sleeper85 3c716fd085 ESP32-S3 DevKitC-1 with RGB LED on GPIOs 38 and 48 2025-04-07 19:23:12 +02:00
Sleeper85 7815119183 YamBMS 1.5.5 (fix Force Float charge status) 2025-04-07 16:40:24 +02:00
Sleeper85 3b490821fe Turn on BMS charge switch if EOC or Float 2025-04-07 16:37:50 +02:00
Sleeper85 1b6c28e954 YamBMS 1.5.5 (bms charging logic fix) 2025-04-07 10:22:34 +02:00
Sleeper85 2046f44507 Update README.md 2025-04-07 08:35:07 +02:00
Sleeper85 098546b65d Local Packages examples 1.5.5 (AtomS3 display_rotation) 2025-04-07 08:24:59 +02:00
Sleeper85 eeee80faa7 Remote Packages examples 1.5.5 (AtomS3 display_rotation) 2025-04-07 08:24:45 +02:00
Sleeper85 c0240d44ed AtomS3 display_rotation option 2025-04-07 08:23:25 +02:00
Sleeper85 822b3394f6 Update bms_base.yaml 2025-04-04 23:22:25 +02:00
Sleeper85 a538ba3e6e Remote Packages examples 1.5.5 2025-04-04 23:16:19 +02:00
Sleeper85 95b69225ea Local Packages examples 1.5.5 2025-04-04 23:15:38 +02:00
Sleeper85 eb9663b840 Remove LP RP examples 2025-04-04 23:14:36 +02:00
Sleeper85 d5df679b9a YamBMS Remote Packages 1.5.5 2025-04-04 23:07:14 +02:00
Sleeper85 669dee91d4 YamBMS Local Packages 1.5.5 2025-04-04 23:06:55 +02:00
Sleeper85 0424392349 Create yambms_custom.yaml 2025-04-04 22:58:52 +02:00
Sleeper85 c78bb0c465 Create yambms_config.yaml 2025-04-04 22:58:49 +02:00
Sleeper85 1f3231df5f Delete config folder 2025-04-04 22:57:27 +02:00
Sleeper85 264b83ea8b YamBMS Remote Packages 1.5.5 2025-04-04 01:46:05 +02:00
Sleeper85 529334683b Update README.md 2025-04-04 01:41:48 +02:00
Sleeper85 1c4634c820 YamBMS Remote Packages 1.5.5 2025-04-04 01:36:07 +02:00
Sleeper85 06ed27e8f0 YamBMS Local Packages 1.5.5 2025-04-04 01:15:18 +02:00
Sleeper85 de8927ce36 YamBMS 1.5.5 2025-04-04 01:13:49 +02:00
Sleeper85 3c846ea24a Board 1.5.5 2025-04-04 01:12:38 +02:00
Sleeper85 a5e6423d03 BMS 1.5.5 2025-04-04 01:08:10 +02:00
Sleeper85 44cb8504d3 Delete old YAML 2025-04-04 00:51:33 +02:00
Sleeper85 63bce3f027 Update README 2025-04-04 00:48:56 +02:00
140 changed files with 7501 additions and 3691 deletions

No files matched your search

@@ -1,5 +1,5 @@
# Updated : 2025.01.24
# Version : 1.5.4
# Updated : 2025.05.13
# Version : 1.5.5
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -26,7 +26,7 @@ views:
cards:
- graph: line
type: sensor
entity: sensor.yambms_demo_yambms_1_total_voltage_o
entity: sensor.yambms_demo_yambms_1_total_voltage
detail: 2
layout_options:
grid_columns: 2
@@ -40,7 +40,7 @@ views:
name: SoC
hours_to_show: 8
- type: gauge
entity: sensor.yambms_demo_yambms_1_current_s
entity: sensor.yambms_demo_yambms_1_current
needle: true
severity:
green: 0
@@ -53,7 +53,7 @@ views:
grid_columns: 2
grid_rows: 3
- type: gauge
entity: sensor.yambms_demo_yambms_1_power_s
entity: sensor.yambms_demo_yambms_1_power
needle: true
severity:
green: 0
@@ -66,16 +66,16 @@ views:
grid_columns: 2
grid_rows: 3
- type: tile
entity: sensor.yambms_demo_yambms_1_installed_battery_capacity_s
entity: sensor.yambms_demo_yambms_1_installed_battery_capacity
name: Installed Battery Capacity
- type: tile
entity: sensor.yambms_demo_yambms_1_battery_soh
name: Battery SoH
- type: tile
entity: sensor.yambms_demo_yambms_1_battery_capacity_s
entity: sensor.yambms_demo_yambms_1_battery_capacity
name: Battery Capacity
- type: tile
entity: sensor.yambms_demo_yambms_1_capacity_remaining_s
entity: sensor.yambms_demo_yambms_1_capacity_remaining
name: Capacity Remaining
- type: tile
entity: sensor.yambms_demo_yambms_1_delta_cell_voltage
@@ -1,5 +1,5 @@
# Updated : 2025.02.06
# Version : 1.5.4
# Updated : 2025.05.19
# Version : 1.5.5
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -26,7 +26,7 @@ views:
cards:
- graph: line
type: sensor
entity: sensor.yambms_yambms_1_total_voltage_o
entity: sensor.yambms_yambms_1_total_voltage
detail: 2
layout_options:
grid_columns: 2
@@ -40,7 +40,7 @@ views:
name: SoC
hours_to_show: 8
- type: gauge
entity: sensor.yambms_yambms_1_current_s
entity: sensor.yambms_yambms_1_current
needle: true
severity:
green: 0
@@ -53,7 +53,7 @@ views:
grid_columns: 2
grid_rows: 3
- type: gauge
entity: sensor.yambms_yambms_1_power_s
entity: sensor.yambms_yambms_1_power
needle: true
severity:
green: 0
@@ -66,16 +66,16 @@ views:
grid_columns: 2
grid_rows: 3
- type: tile
entity: sensor.yambms_yambms_1_installed_battery_capacity_s
entity: sensor.yambms_yambms_1_installed_battery_capacity
name: Installed Battery Capacity
- type: tile
entity: sensor.yambms_yambms_1_battery_soh
name: Battery SoH
- type: tile
entity: sensor.yambms_yambms_1_battery_capacity_s
entity: sensor.yambms_yambms_1_battery_capacity
name: Battery Capacity
- type: tile
entity: sensor.yambms_yambms_1_capacity_remaining_s
entity: sensor.yambms_yambms_1_capacity_remaining
name: Capacity Remaining
- type: tile
entity: sensor.yambms_yambms_1_delta_cell_voltage
@@ -1379,7 +1379,7 @@ views:
hours_to_show: 8
- graph: line
type: sensor
entity: sensor.yambms_shunt_1_soc
entity: sensor.yambms_shunt_1_state_of_charge
detail: 2
name: SoC
hours_to_show: 8
@@ -1417,7 +1417,7 @@ views:
name: Shunt 1 Current
- entity: sensor.yambms_shunt_1_power
name: Shunt 1 Power
- entity: sensor.yambms_shunt_1_soc
- entity: sensor.yambms_shunt_1_state_of_charge
name: Shunt 1 SoC
- entity: sensor.yambms_shunt_1_temperature
name: Shunt 1 Temperature
@@ -1,5 +1,5 @@
# Updated : 2025.02.06
# Version : 1.5.4
# Updated : 2025.05.19
# Version : 1.5.5
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -26,7 +26,7 @@ views:
cards:
- graph: line
type: sensor
entity: sensor.yambms_yambms_1_total_voltage_o
entity: sensor.yambms_yambms_1_total_voltage
detail: 2
layout_options:
grid_columns: 2
@@ -40,7 +40,7 @@ views:
name: SoC
hours_to_show: 8
- type: gauge
entity: sensor.yambms_yambms_1_current_s
entity: sensor.yambms_yambms_1_current
needle: true
severity:
green: 0
@@ -53,7 +53,7 @@ views:
grid_columns: 2
grid_rows: 3
- type: gauge
entity: sensor.yambms_yambms_1_power_s
entity: sensor.yambms_yambms_1_power
needle: true
severity:
green: 0
@@ -66,16 +66,16 @@ views:
grid_columns: 2
grid_rows: 3
- type: tile
entity: sensor.yambms_yambms_1_installed_battery_capacity_s
entity: sensor.yambms_yambms_1_installed_battery_capacity
name: Installed Battery Capacity
- type: tile
entity: sensor.yambms_yambms_1_battery_soh
name: Battery SoH
- type: tile
entity: sensor.yambms_yambms_1_battery_capacity_s
entity: sensor.yambms_yambms_1_battery_capacity
name: Battery Capacity
- type: tile
entity: sensor.yambms_yambms_1_capacity_remaining_s
entity: sensor.yambms_yambms_1_capacity_remaining
name: Capacity Remaining
- type: tile
entity: sensor.yambms_yambms_1_delta_cell_voltage
@@ -2763,7 +2763,7 @@ views:
hours_to_show: 8
- graph: line
type: sensor
entity: sensor.yambms_shunt_1_soc
entity: sensor.yambms_shunt_1_state_of_charge
detail: 2
name: SoC
hours_to_show: 8
@@ -2801,7 +2801,7 @@ views:
name: Shunt 1 Current
- entity: sensor.yambms_shunt_1_power
name: Shunt 1 Power
- entity: sensor.yambms_shunt_1_soc
- entity: sensor.yambms_shunt_1_state_of_charge
name: Shunt 1 SoC
- entity: sensor.yambms_shunt_1_temperature
name: Shunt 1 Temperature
@@ -1,5 +1,5 @@
# Updated : 2025.01.24
# Version : 1.5.4
# Updated : 2025.05.19
# Version : 1.5.5
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -26,7 +26,7 @@ views:
cards:
- graph: line
type: sensor
entity: sensor.yambms_yambms_1_total_voltage_o
entity: sensor.yambms_yambms_1_total_voltage
detail: 2
layout_options:
grid_columns: 2
@@ -40,7 +40,7 @@ views:
name: SoC
hours_to_show: 8
- type: gauge
entity: sensor.yambms_yambms_1_current_s
entity: sensor.yambms_yambms_1_current
needle: true
severity:
green: 0
@@ -53,7 +53,7 @@ views:
grid_columns: 2
grid_rows: 3
- type: gauge
entity: sensor.yambms_yambms_1_power_s
entity: sensor.yambms_yambms_1_power
needle: true
severity:
green: 0
@@ -66,16 +66,16 @@ views:
grid_columns: 2
grid_rows: 3
- type: tile
entity: sensor.yambms_yambms_1_installed_battery_capacity_s
entity: sensor.yambms_yambms_1_installed_battery_capacity
name: Installed Battery Capacity
- type: tile
entity: sensor.yambms_yambms_1_battery_soh
name: Battery SoH
- type: tile
entity: sensor.yambms_yambms_1_battery_capacity_s
entity: sensor.yambms_yambms_1_battery_capacity
name: Battery Capacity
- type: tile
entity: sensor.yambms_yambms_1_capacity_remaining_s
entity: sensor.yambms_yambms_1_capacity_remaining
name: Capacity Remaining
- type: tile
entity: sensor.yambms_yambms_1_delta_cell_voltage
@@ -1379,7 +1379,7 @@ views:
hours_to_show: 8
- graph: line
type: sensor
entity: sensor.yambms_shunt_1_soc
entity: sensor.yambms_shunt_1_state_of_charge
detail: 2
name: SoC
hours_to_show: 8
@@ -1417,7 +1417,7 @@ views:
name: Shunt 1 Current
- entity: sensor.yambms_shunt_1_power
name: Shunt 1 Power
- entity: sensor.yambms_shunt_1_soc
- entity: sensor.yambms_shunt_1_state_of_charge
name: Shunt 1 SoC
- entity: sensor.yambms_shunt_1_temperature
name: Shunt 1 Temperature
@@ -1,5 +1,5 @@
# Updated : 2024.11.11
# Version : 1.5.1
# Updated : 2025.05.13
# Version : 1.5.5
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -26,7 +26,7 @@ views:
cards:
- graph: line
type: sensor
entity: sensor.yambms_yambms_1_total_voltage_o
entity: sensor.yambms_yambms_1_total_voltage
detail: 2
layout_options:
grid_columns: 2
@@ -40,7 +40,7 @@ views:
name: SoC
hours_to_show: 8
- type: gauge
entity: sensor.yambms_yambms_1_current_s
entity: sensor.yambms_yambms_1_current
needle: true
severity:
green: 0
@@ -53,7 +53,7 @@ views:
grid_columns: 2
grid_rows: 3
- type: gauge
entity: sensor.yambms_yambms_1_power_s
entity: sensor.yambms_yambms_1_power
needle: true
severity:
green: 0
@@ -66,16 +66,16 @@ views:
grid_columns: 2
grid_rows: 3
- type: tile
entity: sensor.yambms_yambms_1_installed_battery_capacity_s
entity: sensor.yambms_yambms_1_installed_battery_capacity
name: Installed Battery Capacity
- type: tile
entity: sensor.yambms_yambms_1_battery_soh
name: Battery SoH
- type: tile
entity: sensor.yambms_yambms_1_battery_capacity_s
entity: sensor.yambms_yambms_1_battery_capacity
name: Battery Capacity
- type: tile
entity: sensor.yambms_yambms_1_capacity_remaining_s
entity: sensor.yambms_yambms_1_capacity_remaining
name: Capacity Remaining
- type: tile
entity: sensor.yambms_yambms_1_delta_cell_voltage
+53 -14
View File
@@ -8,7 +8,19 @@
[!["Buy Me A Coffee"](https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg)](https://www.buymeacoffee.com/sleeper85)
> [!TIP]
> If compiling the source code is too difficult for you, I can provide you a `custom firmware` that is easy to install from a web page. You can [contact me privately](https://diysolarforum.com/direct-messages/add?to=Sleeper85) on the DIY solar forum.
> Not sure which YAML to choose ? ... `YamBMS_Remote_Packages_example.yaml` is a good basis for creating your custom YAML.
> Examples of BMS and Shunt imports can be found in the [configuration_examples](configuration_examples/) folder.
> You can mix different BMS models, the only condition is that they are numbered in order starting from `1`.
> [!IMPORTANT]
> The current code for `YamBMS` and other components needs to be fixed to work with `esphome 2025.5.0`.
> This will be done as soon as I have more time to devote to it. In the meantime, you should compile with `esphome 2025.4.2` or lower.
> [!IMPORTANT]
> The most important thing for proper functioning of YamBMS is that **the voltage of your BMS is well calibrated**.
> YamBMS logic is based on the `min_cell_voltage` and `max_cell_voltage` voltages of your BMS.
> If you use YamBMS, the internal charging logic of the `JK-PB BMS` will not be used.
> Please read the [documentation](README.md#contents) and the [setup instructions](documents/README/Schematic_and_setup_instructions.md).
| ESPHome application to monitor BMS and communicate with inverters<br>supporting CAN bus protocol compatible with Pylontech, GoodWe, SMA,<br>Victron or Luxpower (EG4). | <a href="https://www.buymeacoffee.com/Sleeper85" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height: 60px !important;width: 217px !important;" ></a> |
| :--- | --- |
@@ -35,6 +47,18 @@
[Dedicated topic on DIY Solar Forum](https://diysolarforum.com/threads/yambms-jk-bms-can-with-new-cut-off-charging-logic-open-source.79325/)
## Contents
1) [Supported devices](documents/README/Supported_devices.md)
2) [YamBMS behavior](documents/README/YamBMS_behavior.md)
3) [YamBMS functions](documents/README/YamBMS_functions.md)
4) [Charging logic](documents/README/Charging_logic.md)
5) [CAN bus protocol](documents/README/CANBUS_protocol.md)
6) [Schematic and setup instructions](documents/README/Schematic_and_setup_instructions.md)
7) [How to create your YamBMS YAML](documents/README/YamBMS_main_YAML_HowTo.md)
8) [Installation procedure](documents/README/Installation_procedure.md)
9) [Troubleshooting](documents/README/Troubleshooting.md)
## YamBMS
![Image](images/YamBMS_packaged_version.png "YamBMS packaged version")
@@ -73,18 +97,6 @@ The theoretical limit is `256` modbus server (BMS/Shunt) per `RS485 bus` but in
![Image](images/YamBMS_HA_Dashboard.png "YamBMS HA Dashboard")
## Contents
1) [Supported devices](documents/README/Supported_devices.md)
2) [YamBMS behavior](documents/README/YamBMS_behavior.md)
3) [YamBMS functions](documents/README/YamBMS_functions.md)
4) [Charging logic](documents/README/Charging_logic.md)
5) [CAN bus protocol](documents/README/CANBUS_protocol.md)
6) [Schematic and setup instructions](documents/README/Schematic_and_setup_instructions.md)
7) [How to create your YamBMS YAML](documents/README/YamBMS_main_YAML_HowTo.md)
8) [Installation procedure](documents/README/Installation_procedure.md)
9) [Troubleshooting](documents/README/Troubleshooting.md)
## Try YamBMS with the DEMO firmware
You can simply test the application with a `generic ESP32` without compiling and connecting anything on your ESP32.
@@ -92,7 +104,7 @@ The DEMO firmware is composed of `3x BMS` and `1x Shunt` (fake) for a `48V LFP`
> [!IMPORTANT]
> `YamBMS_DEMO_ESP32.factory.bin` is intended for a generic ESP32, does not work with ESP32-S3.
> If you want to test `YamBMS DEMO` with another board you need to compile the firmware with the `multi-bms_DEMO.yaml`.
> If you want to test `YamBMS DEMO` with another board you need to compile the firmware with the `YamBMS_RP_DEMO.yaml`.
1) Download [YamBMS_DEMO_ESP32.factory.bin](firmware/YamBMS_DEMO_ESP32.factory.bin)
2) Follow the [procedure explained in this document](https://docs.google.com/document/d/12pOpaG4Iyw3DjC_kB1q0jjBeSKJHK2FvXI1swebL2RI/edit?usp=sharing).
@@ -113,8 +125,35 @@ rx_pin: 22 # to CAN board CRX (with 4.7K resistor except for SN65HVD230)
* Optional: 48V to 5V DC-DC converter to power the ESP32 from the JK-BMS VBAT pin (URB4805YMD-10WR3 or VRB4805S-6WR3)
* Optional: JK RS485 adaptor and RS485 to TTL 3V3 adaptor (see schematic section)
## Data collection
> [!NOTE]
> For your information, in May 2025 there were `94` YamBMS users.
If the ESP32 has an internet connection, the following data is sent to [this script](http://script.opentel.be/yambms.post.php)
for statistics collection. Only [@Sleeper85](https://github.com/Sleeper85) have access to this information for the production of statistics, the support and the update service.
- ESP32 MAC address
- YamBMS version
- Board chip
- Board name
- BMS model
- BMS count
- CAN bus name
- CAN bus protocol
- Uptime
- Current date and time
## Changelog
* YamBMS 1.5.5 :
* New `main.yaml` with LP (local packages) and RP (remote packages) versions
* New `board.yaml` with modular UART/CAN interfaces
* The name of the JK `bms.yaml` is no longer linked to a specific model
* SoC calculation is now based on remaining capacity for more accuracy (BMS only) [issues #39](https://github.com/Sleeper85/esphome-yambms/issues/39)
* SoH calculation is moved to BMS level (for those who do not provide this information)
* Improvement of the Victron SmartShunt doc [issues #38](https://github.com/Sleeper85/esphome-yambms/issues/38)
* YamBMS 1.5.4 :
* New low SoC corrected at each BMS level (the corrected SoC is the one transmitted to YamBMS)
* New BMS dashboard
+106 -47
View File
@@ -1,5 +1,5 @@
# Updated : 2025.01.16
# Version : 1.5.3
# Updated : 2025.05.13
# Version : 1.5.5
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -17,10 +17,14 @@
# 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:
name: yambms-demo
######################## YamBMS Local Packages Version #########################
# Don't forget to configure your WiFi credentials in the secrets.yaml file
# You need to copy the `packages` folder into the same folder as this YAML in order to compile it.
# Don't forget to configure your WiFi credentials in the secrets.yaml
################################################################################
# Don't forget to configure your WiFi credentials in the secrets.yaml
#
# If needed, configure a static IP here
# wifi:
@@ -32,7 +36,7 @@ substitutions:
# dns2: 8.8.4.4
logger:
level: DEBUG # DEBUG / INFO / WARN
level: INFO # VERBOSE / DEBUG / INFO / WARN
ota:
platform: esphome
@@ -47,17 +51,64 @@ api:
# If you don't want to use ESPHome's native API you can use MQTT instead.
# In this case don't forget to remove the 'api:' section.
# mqtt:
# broker: !secret mqtt_host
# username: !secret mqtt_username
# password: !secret mqtt_password
# id: mqtt_client
# broker: !secret mqtt_host
# username: !secret mqtt_username
# password: !secret mqtt_password
# id: mqtt_client
# Please note that enabling this component will take up a lot of memory and may decrease
# stability and be the cause of reboot depending on the capabilities of the board used.
#web_server:
# port: 80
# log: false
# ota: false
# web_server:
# port: 80
# log: false
# ota: false
# +--------------------------------------+
# | Global Settings |
# +--------------------------------------+
substitutions:
# Name
name: '' # Name that can be added as a second prefix after the friendly name, you can leave it blank.
hostname: 'yambms' # This is the name of the node. It should always be unique in your ESPHome network.
friendly_name : 'YamBMS Demo' # Prefix added in front of all entity names and also to classify them.
# +--------------------------------------+
# | YamBMS Settings |
# +--------------------------------------+
# Please read the cut-off charging logic README to understand how the YamBMS works
yambms_id: 'yambms1'
yambms_name: 'YamBMS 1'
yambms_update_interval: '1s'
# Input numbers can be displayed as a slider or an input box, options are 'slider' or 'box'.
yambms_input_number_mode: 'slider'
# Please check and fill in the options below correctly according to your battery chemistry and number of cells in series.
# These parameters are important and used for charging logic.
# Battery Chemistry
yambms_battery_chemistry: '1' # 1-LFP | 2-Li-ion | 3-LTO
# Number of cells in series
yambms_cell_count: '16'
# Bulk / Absorption Voltage : corresponds to the Bulk voltage that will be used to charge the battery. (LFP : 55.2V = 3.45V/Cell for 16S battery)
yambms_bulk_v: '55.2'
# Float Voltage : corresponds to the voltage at which the battery would be maintained at the end of charge. (LFP : 53.6V = 3.35V/Cell for 16S battery)
yambms_float_v: '53.6'
# Rebulk voltage, voltage from which a new Bulk charge can start. (LFP : 52.8V = 3.3V/Cell for 16S battery)
yambms_rebulk_v: '52.8'
# Maximum time in minutes that the cut-off step can last before charging is complete
# If your cells are properly balanced this step ends at the fastest after the `cut-off timer`
# This timer can be deactivated with a switch
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '60'
# +--------------------------------------+
# | Shunt Settings |
# +--------------------------------------+
shunt_update_interval: '3s' # frequency at which Shunt data is refreshed
shunt_combine_interval: '1s' # frequency at which Shunt data is combined in YamBMS
# +--------------------------------------+
# | BMS Settings |
# +--------------------------------------+
bms_update_interval: '3s' # frequency at which BMS data is refreshed, going below '3s' can cause problems
bms_combine_interval: '1s' # frequency at which BMS data is combined in YamBMS
bms_cutoff_timer: '50s' # time during which the end of charge conditions must be respected (cut-off + cells not equalizing)
# +--------------------------------------+
# | Packages |
@@ -66,15 +117,29 @@ api:
# PLEASE READ : https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_main_YAML_HowTo.md
packages:
################ >>> CONFIG & CUSTOM LP <<< ################
# Local Packages intended for creating custom codes
# or sharing settings between several main.yaml
# yambms_config: !include yambms_config.yaml
# yambms_custom: !include yambms_custom.yaml
############### >>> UNCOMMENT YOUR BOARD <<< ###############
############### >>> ONLY ONE BOARD ! <<< ###############
# This list is incomplete, other board.yaml are available in the board folder
device_board: !include packages/board/board_ESP32_Generic.yaml
# device_board: !include packages/board/board_ESP32_DevKit-V1.yaml
# device_board: !include packages/board/board_ESP32_LilyGo-T-CAN485.yaml
# device_board: !include packages/board/board_ESP32_EVB.yaml
# device_board: !include packages/board/board_ESP32_Atom-Lite.yaml
# device_board: !include packages/board/board_ESP32-C3_DevKitM-1.yaml
# device_board: !include packages/board/board_ESP32-C3_ETH01-EVO.yaml
# device_board: !include packages/board/board_ESP32-S3_DevKitC-1.yaml
# device_board: !include packages/board/board_ESP32-S3_DevKitC-1_LED-38.yaml
# device_board: !include packages/board/board_ESP32-S3_DevKitC-1_LED-48.yaml
# device_board: !include packages/board/board_ESP32-S3_LilyGo-T-Connect.yaml
# device_board: !include packages/board/board_ESP32-S3_AtomS3-Lite.yaml
@@ -82,13 +147,30 @@ packages:
# file: packages/board/board_ESP32-S3_AtomS3.yaml # board_ESP32-S3_AtomS3R.yaml
# vars:
# display_auto_next_page_interval: '5s'
# display_rotation: '0' # 0/90/180/270 rotation angle in degrees
########### >>> UNCOMMENT YOUR BOARD OPTIONS <<< ###########
captive_portal: !include packages/board/board_options_captive_portal.yaml
# uart_esp_1: !include packages/board/board_options_itf_uart_esp_1.yaml
# uart_esp_2: !include packages/board/board_options_itf_uart_esp_2.yaml
# uart_esp_3: !include packages/board/board_options_itf_uart_esp_3.yaml
# ESP32_CAN (TJA105x, SN65HVD230, M5Stack CAN base/unit)
canbus_node_1: !include
file: packages/board/board_options_itf_canbus_esp32_can.yaml
vars:
canbus_node_id: 'canbus_inverter_1'
# MCP2515
# canbus_node_2: !include
# file: packages/board/board_options_itf_canbus_mcp2515.yaml
# vars:
# canbus_node_id: 'canbus_inverter_1'
############################################################
# Config : this YAML contains the settings shared between all ESP32s
config_yambms: !include packages/config/config_yambms.yaml
config_captive_portal: !include packages/config/config_captive_portal.yaml
shunt1: !include
file: packages/shunt/shunt_combine_FAKE.yaml
vars:
@@ -112,6 +194,7 @@ packages:
bms_current: '9.2' # A
bms_power: '492' # W
bms_soc: '87' # %
bms_soh: '99' # %
bms_min_cell_voltage: '3.339' # V
bms_min_voltage_cell: '2' # cell number 1~16
bms_max_cell_voltage: '3.341' # V
@@ -139,6 +222,7 @@ packages:
bms_current: '11.3' # A
bms_power: '604' # W
bms_soc: '85' # %
bms_soh: '89' # %
bms_min_cell_voltage: '3.337' # V
bms_min_voltage_cell: '14' # cell number 1~16
bms_max_cell_voltage: '3.339' # V
@@ -166,6 +250,7 @@ packages:
bms_current: '15.7' # A
bms_power: '838' # W
bms_soc: '83' # %
bms_soh: '79' # %
bms_min_cell_voltage: '3.334' # V
bms_min_voltage_cell: '7' # cell number 1~16
bms_max_cell_voltage: '3.336' # V
@@ -181,40 +266,14 @@ packages:
bms_balance_trigger_voltage: '0.010' # V Used by 'Auto CVL' functions
bms_charging_cycles: '194' # charging cycles number Used to calculate the SoH
yambms1: !include
file: packages/yambms/yambms.yaml
vars:
# Please read the cut-off charging logic README to understand how the YamBMS works
yambms_update_interval: '1s'
# Input numbers can be displayed as a slider or an input box, options are 'slider' or 'box'.
yambms_input_number_mode: 'slider'
# Please check and fill in the options below correctly according to your battery chemistry and number of cells in series.
# These parameters are important and used for charging logic.
# Battery Chemistry
yambms_battery_chemistry: '1' # 1-LFP | 2-Li-ion | 3-LTO
# Number of cells in series
yambms_cell_count: '16'
# Bulk / Absorption Voltage : corresponds to the Bulk voltage that will be used to charge the battery. (LFP : 55.2V = 3.45V/Cell for 16S battery)
yambms_bulk_v: '55.2'
# Float Voltage : corresponds to the voltage at which the battery would be maintained at the end of charge. (LFP : 53.6V = 3.35V/Cell for 16S battery)
yambms_float_v: '53.6'
# Rebulk voltage, voltage from which a new Bulk charge can start. (LFP : 52.8V = 3.3V/Cell for 16S battery)
yambms_rebulk_v: '52.8'
# Maximum time in minutes that the cut-off step can last before charging is complete
# If your cells are properly balanced this step ends at the fastest after the `cut-off timer`
# This timer can be deactivated with a switch
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '60'
# Maximum charging cycles is used to calculate the battey SOH, LF280K v3 =8000.0, LF280K v2 =6000.0, LF280=3000.0 (decimal is required)
yambms_max_cycles: '6000.0'
yambms: !include packages/yambms/yambms.yaml
canbus1: !include
file: packages/yambms/yambms_canbus.yaml
vars:
canbus_id: 'canbus1'
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_node1'
canbus_node_id: 'canbus_inverter_1'
canbus_light_id: 'esp_light'
# The CANBUS link will be considered down if no response from the inverter (ID 0x305) for 5s
# The Deye inverter sends the ACK (can_id 0x305) only when it receives the can_id 0x356
+224
View File
@@ -0,0 +1,224 @@
# Updated : 2025.05.13
# Version : 1.5.5
# 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>.
######################## YamBMS Local Packages Version #########################
# You need to copy the `packages` folder into the same folder as this YAML in order to compile it.
# Don't forget to configure your WiFi credentials in the secrets.yaml
################################################################################
# Don't forget to configure your WiFi credentials in the secrets.yaml
#
# If needed, configure a static IP here
# wifi:
# manual_ip:
# static_ip: 192.168.0.85
# gateway: 192.168.0.1
# subnet: 255.255.255.0
# dns1: 8.8.8.8
# dns2: 8.8.4.4
logger:
level: INFO # VERBOSE / DEBUG / INFO / WARN
ota:
platform: esphome
# Please use the native `api` component instead of the `mqtt` section.
# If you use Home Assistant, the native API is more lightweight.
# If there is no HA server connected to this API, the ESP32 reboots every 15 minutes to try to resolve the problem.
# The "reboot_timeout: 0s" option will keep your ESP32 up and running even if you lose connection to your HA server.
api:
reboot_timeout: 0s
# If you don't want to use ESPHome's native API you can use MQTT instead.
# In this case don't forget to remove the 'api:' section.
# mqtt:
# broker: !secret mqtt_host
# username: !secret mqtt_username
# password: !secret mqtt_password
# id: mqtt_client
# Please note that enabling this component will take up a lot of memory and may decrease
# stability and be the cause of reboot depending on the capabilities of the board used.
# web_server:
# port: 80
# log: false
# ota: false
# +--------------------------------------+
# | Global Settings |
# +--------------------------------------+
substitutions:
# Name
name: '' # Name that can be added as a second prefix after the friendly name, you can leave it blank.
hostname: 'yambms' # This is the name of the node. It should always be unique in your ESPHome network.
friendly_name : 'YamBMS' # Prefix added in front of all entity names and also to classify them.
# +--------------------------------------+
# | YamBMS Settings |
# +--------------------------------------+
# Please read the cut-off charging logic README to understand how the YamBMS works
yambms_id: 'yambms1'
yambms_name: 'YamBMS 1'
yambms_update_interval: '1s'
# Input numbers can be displayed as a slider or an input box, options are 'slider' or 'box'.
yambms_input_number_mode: 'slider'
# Please check and fill in the options below correctly according to your battery chemistry and number of cells in series.
# These parameters are important and used for charging logic.
# Battery Chemistry
yambms_battery_chemistry: '1' # 1-LFP | 2-Li-ion | 3-LTO
# Number of cells in series
yambms_cell_count: '16'
# Bulk / Absorption Voltage : corresponds to the Bulk voltage that will be used to charge the battery. (LFP : 55.2V = 3.45V/Cell for 16S battery)
yambms_bulk_v: '55.2'
# Float Voltage : corresponds to the voltage at which the battery would be maintained at the end of charge. (LFP : 53.6V = 3.35V/Cell for 16S battery)
yambms_float_v: '53.6'
# Rebulk voltage, voltage from which a new Bulk charge can start. (LFP : 52.8V = 3.3V/Cell for 16S battery)
yambms_rebulk_v: '52.8'
# Maximum time in minutes that the cut-off step can last before charging is complete
# If your cells are properly balanced this step ends at the fastest after the `cut-off timer`
# This timer can be deactivated with a switch
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '60'
# +--------------------------------------+
# | Shunt Settings |
# +--------------------------------------+
shunt_update_interval: '3s' # frequency at which Shunt data is refreshed
shunt_combine_interval: '1s' # frequency at which Shunt data is combined in YamBMS
# +--------------------------------------+
# | BMS Settings |
# +--------------------------------------+
bms_update_interval: '3s' # frequency at which BMS data is refreshed, going below '3s' can cause problems
bms_combine_interval: '1s' # frequency at which BMS data is combined in YamBMS
bms_cutoff_timer: '50s' # time during which the end of charge conditions must be respected (cut-off + cells not equalizing)
# +--------------------------------------+
# | Packages |
# +--------------------------------------+
# PLEASE READ : https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_main_YAML_HowTo.md
packages:
############### >>> UNCOMMENT YOUR BOARD <<< ###############
############### >>> ONLY ONE BOARD ! <<< ###############
# This list is incomplete, other board.yaml are available in the board folder
# device_board: !include packages/board/board_ESP32_Generic.yaml
# device_board: !include packages/board/board_ESP32_DevKit-V1.yaml
device_board: !include packages/board/board_ESP32_LilyGo-T-CAN485.yaml
# device_board: !include packages/board/board_ESP32_EVB.yaml
# device_board: !include packages/board/board_ESP32_Atom-Lite.yaml
# device_board: !include packages/board/board_ESP32-C3_ETH01-EVO.yaml
# device_board: !include packages/board/board_ESP32-S3_DevKitC-1.yaml
# device_board: !include packages/board/board_ESP32-S3_LilyGo-T-Connect.yaml
# device_board: !include packages/board/board_ESP32-S3_AtomS3-Lite.yaml
# device_board: !include
# file: packages/board/board_ESP32-S3_AtomS3.yaml # board_ESP32-S3_AtomS3R.yaml
# vars:
# display_auto_next_page_interval: '5s'
# display_rotation: '0' # 0/90/180/270 rotation angle in degrees
########### >>> UNCOMMENT YOUR BOARD OPTIONS <<< ###########
# RS485
uart_esp_1: !include packages/board/board_options_itf_uart_esp_1.yaml
# ESP32_CAN (TJA105x, SN65HVD230, M5Stack CAN base/unit)
canbus_node_1: !include
file: packages/board/board_options_itf_canbus_esp32_can.yaml
vars:
canbus_node_id: 'canbus_inverter_1'
# MCP2515
canbus_node_2: !include
file: packages/board/board_options_itf_canbus_mcp2515.yaml
vars:
canbus_node_id: 'canbus_bms_1'
# If you do not want to use the default settings, uncomment the options below :
# canbus_can_id: '4'
# canbus_bitrate: '500kbps'
# spi_mosi_pin: '12'
# spi_miso_pin: '5'
# spi_clk_pin: '18'
# mcp2515_cs_pin: '32'
############################################################
# Deye BMS top unit (required)
bms_top: !include
file: packages/bms/bms_sensors_DEYE_CAN_top_full.yaml
vars:
# CAN BUS ID
canbus_id: 'canbus_bms_1'
deye_name: 'DEYE-Top 1'
deye_id: '1'
# Deye module 1
bms1: !include
file: packages/bms/bms_combine_DEYE_CAN_module_full.yaml
vars:
# CAN BUS ID
canbus_id: 'canbus_bms_1'
# BMS vars
bms_id: '1' # must be a number
bms_name: 'DEYE-BMS 1'
deye_id: '1'
deye_module_id: '0' # Modules are numbered with 0-9
# Deye module 2
bms2: !include
file: packages/bms/bms_combine_DEYE_CAN_module_full.yaml
vars:
# CAN BUS ID
canbus_id: 'canbus_bms_1'
# BMS vars
deye_id: '1'
bms_id: '2' # must be a number
bms_name: 'DEYE-BMS 2'
deye_module_id: '1' # Second module
yambms: !include packages/yambms/yambms.yaml
# yambms_custom: !include yambms_custom.yaml
canbus1: !include
file: packages/yambms/yambms_canbus.yaml
vars:
canbus_id: 'canbus1'
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_inverter_1'
canbus_light_id: 'esp_light'
# The CANBUS link will be considered down if no response from the inverter (ID 0x305) for 5s
# The Deye inverter sends the ACK (can_id 0x305) only when it receives the can_id 0x356
canbus_link_timer: '5s'
# +--------------------------------------+
# | DEBUG ( logger level must be DEBUG ) |
# +--------------------------------------+
device_debug: !include
file: packages/base/device_debug_ESP32.yaml
vars:
debug_name: 'Debug'
debug_update_interval: '5s'
+301
View File
@@ -0,0 +1,301 @@
# Updated : 2025.05.13
# Version : 1.5.5
# 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>.
######################## YamBMS Local Packages Version #########################
# You need to copy the `packages` folder into the same folder as this YAML in order to compile it.
# Don't forget to configure your WiFi credentials in the secrets.yaml
################################################################################
# Don't forget to configure your WiFi credentials in the secrets.yaml
#
# If needed, configure a static IP here
# wifi:
# manual_ip:
# static_ip: 192.168.0.85
# gateway: 192.168.0.1
# subnet: 255.255.255.0
# dns1: 8.8.8.8
# dns2: 8.8.4.4
logger:
level: INFO # VERBOSE / DEBUG / INFO / WARN
ota:
platform: esphome
# Please use the native `api` component instead of the `mqtt` section.
# If you use Home Assistant, the native API is more lightweight.
# If there is no HA server connected to this API, the ESP32 reboots every 15 minutes to try to resolve the problem.
# The "reboot_timeout: 0s" option will keep your ESP32 up and running even if you lose connection to your HA server.
api:
reboot_timeout: 0s
# If you don't want to use ESPHome's native API you can use MQTT instead.
# In this case don't forget to remove the 'api:' section.
# mqtt:
# broker: !secret mqtt_host
# username: !secret mqtt_username
# password: !secret mqtt_password
# id: mqtt_client
# Please note that enabling this component will take up a lot of memory and may decrease
# stability and be the cause of reboot depending on the capabilities of the board used.
# web_server:
# port: 80
# log: false
# ota: false
# +--------------------------------------+
# | Global Settings |
# +--------------------------------------+
substitutions:
# Name
name: '' # Name that can be added as a second prefix after the friendly name, you can leave it blank.
hostname: 'yambms' # This is the name of the node. It should always be unique in your ESPHome network.
friendly_name : 'YamBMS' # Prefix added in front of all entity names and also to classify them.
# +--------------------------------------+
# | YamBMS Settings |
# +--------------------------------------+
# Please read the cut-off charging logic README to understand how the YamBMS works
yambms_id: 'yambms1'
yambms_name: 'YamBMS 1'
yambms_update_interval: '1s'
# Input numbers can be displayed as a slider or an input box, options are 'slider' or 'box'.
yambms_input_number_mode: 'slider'
# Please check and fill in the options below correctly according to your battery chemistry and number of cells in series.
# These parameters are important and used for charging logic.
# Battery Chemistry
yambms_battery_chemistry: '1' # 1-LFP | 2-Li-ion | 3-LTO
# Number of cells in series
yambms_cell_count: '16'
# Bulk / Absorption Voltage : corresponds to the Bulk voltage that will be used to charge the battery. (LFP : 55.2V = 3.45V/Cell for 16S battery)
yambms_bulk_v: '55.2'
# Float Voltage : corresponds to the voltage at which the battery would be maintained at the end of charge. (LFP : 53.6V = 3.35V/Cell for 16S battery)
yambms_float_v: '53.6'
# Rebulk voltage, voltage from which a new Bulk charge can start. (LFP : 52.8V = 3.3V/Cell for 16S battery)
yambms_rebulk_v: '52.8'
# Maximum time in minutes that the cut-off step can last before charging is complete
# If your cells are properly balanced this step ends at the fastest after the `cut-off timer`
# This timer can be deactivated with a switch
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '60'
# +--------------------------------------+
# | Shunt Settings |
# +--------------------------------------+
shunt_update_interval: '3s' # frequency at which Shunt data is refreshed
shunt_combine_interval: '1s' # frequency at which Shunt data is combined in YamBMS
# +--------------------------------------+
# | BMS Settings |
# +--------------------------------------+
bms_update_interval: '3s' # frequency at which BMS data is refreshed, going below '3s' can cause problems
bms_combine_interval: '1s' # frequency at which BMS data is combined in YamBMS
bms_cutoff_timer: '50s' # time during which the end of charge conditions must be respected (cut-off + cells not equalizing)
# +--------------------------------------+
# | Packages |
# +--------------------------------------+
# PLEASE READ : https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_main_YAML_HowTo.md
packages:
################ >>> CONFIG & CUSTOM LP <<< ################
# Local Packages intended for creating custom codes
# or sharing settings between several main.yaml
# yambms_config: !include yambms_config.yaml
# yambms_custom: !include yambms_custom.yaml
############### >>> UNCOMMENT YOUR BOARD <<< ###############
############### >>> ONLY ONE BOARD ! <<< ###############
# This list is incomplete, other board.yaml are available in the board folder
# device_board: !include packages/board/board_ESP32_Generic.yaml
# device_board: !include packages/board/board_ESP32_DevKit-V1.yaml
# device_board: !include packages/board/board_ESP32_LilyGo-T-CAN485.yaml
# device_board: !include packages/board/board_ESP32_EVB.yaml
# device_board: !include packages/board/board_ESP32_Atom-Lite.yaml
# device_board: !include packages/board/board_ESP32-C3_DevKitM-1.yaml
# device_board: !include packages/board/board_ESP32-C3_ETH01-EVO.yaml
# device_board: !include packages/board/board_ESP32-S3_DevKitC-1_LED-38.yaml
# device_board: !include packages/board/board_ESP32-S3_DevKitC-1_LED-48.yaml
device_board: !include packages/board/board_ESP32-S3_LilyGo-T-Connect.yaml
# device_board: !include packages/board/board_ESP32-S3_AtomS3-Lite.yaml
# device_board: !include
# file: packages/board/board_ESP32-S3_AtomS3.yaml # board_ESP32-S3_AtomS3R.yaml
# vars:
# display_auto_next_page_interval: '5s'
# display_rotation: '0' # 0/90/180/270 rotation angle in degrees
########### >>> UNCOMMENT YOUR BOARD OPTIONS <<< ###########
uart_esp_1: !include packages/board/board_options_itf_uart_esp_1.yaml
# uart_esp_2: !include packages/board/board_options_itf_uart_esp_2.yaml
# uart_esp_3: !include packages/board/board_options_itf_uart_esp_3.yaml
# ESP32_CAN (TJA105x, SN65HVD230, M5Stack CAN base/unit)
canbus_node_1: !include
file: packages/board/board_options_itf_canbus_esp32_can.yaml
vars:
canbus_node_id: 'canbus_inverter_1'
# MCP2515
# canbus_node_2: !include
# file: packages/board/board_options_itf_canbus_mcp2515.yaml
# vars:
# canbus_node_id: 'canbus_inverter_1'
############################################################
# You don't have to import a shunt but you must import at least one BMS.
# shunt1: !include
# file: packages/shunt/shunt_combine_Victron_SmartShunt_UART.yaml # shunt_combine_Junctek_KHF_UART.yaml
# vars:
# shunt_id: '1' # must be a number
# shunt_name: 'Shunt 1'
# shunt_uart_id: 'uart_esp_3'
# The sniffer represents the ESP node connected to the JK-BMS PB RS485 bus
# If address 0x00 is not detected on the RS485 bus, the sniffer will act directly as a master BMS (mode 2, max 15 BMS)
# sniffer1: !include
# file: packages/bms/bms_combine_JK_RS485_Modbus_sniffer_talk_pin.yaml
# vars:
# sniffer_id: 'sniffer1'
# sniffer_protocol: 'JK02_32S'
# sniffer_uart_id: 'uart_esp_1'
# sniffer_talk_pin: 8 # ESP32: 4, ESP32-S3: 8, ESP32-C3: 10
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_1'
# Mode2 : configure the DIP switches of your BMS from 0x01 to 0x0F (don't use the 0x00 address, maximum 15 BMS)
bms1: !include
file: packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.yaml
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '1' # must be a number
bms_name: 'JK-BMS 1'
bms_address: '0x01' # BMS 1 DIP switch
bms2: !include
file: packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.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 2 DIP switch
bms3: !include
file: packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.yaml
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '3' # must be a number
bms_name: 'JK-BMS 3'
bms_address: '0x03' # BMS 3 DIP switch
bms4: !include
file: packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.yaml
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '4' # must be a number
bms_name: 'JK-BMS 4'
bms_address: '0x04' # BMS 4 DIP switch
bms5: !include
file: packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.yaml
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '5' # must be a number
bms_name: 'JK-BMS 5'
bms_address: '0x05' # BMS 5 DIP switch
bms6: !include
file: packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.yaml
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '6' # must be a number
bms_name: 'JK-BMS 6'
bms_address: '0x06' # BMS 6 DIP switch
bms7: !include
file: packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.yaml
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '7' # must be a number
bms_name: 'JK-BMS 7'
bms_address: '0x07' # BMS 7 DIP switch
bms8: !include
file: packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.yaml
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '8' # must be a number
bms_name: 'JK-BMS 8'
bms_address: '0x08' # BMS 8 DIP switch
yambms: !include packages/yambms/yambms.yaml
canbus1: !include
file: packages/yambms/yambms_canbus.yaml
vars:
canbus_id: 'canbus1'
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_inverter_1'
canbus_light_id: 'esp_light'
# The CANBUS link will be considered down if no response from the inverter (ID 0x305) for 5s
# The Deye inverter sends the ACK (can_id 0x305) only when it receives the can_id 0x356
canbus_link_timer: '5s'
# +--------------------------------------+
# | DEBUG ( logger level must be DEBUG ) |
# +--------------------------------------+
device_debug: !include
file: packages/base/device_debug_ESP32.yaml
vars:
debug_name: 'Debug'
debug_update_interval: '5s'
+208
View File
@@ -0,0 +1,208 @@
# Updated : 2025.05.13
# Version : 1.5.5
# 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>.
######################## YamBMS Local Packages Version #########################
# You need to copy the `packages` folder into the same folder as this YAML in order to compile it.
# Don't forget to configure your WiFi credentials in the secrets.yaml
################################################################################
# Don't forget to configure your WiFi credentials in the secrets.yaml
#
# If needed, configure a static IP here
# wifi:
# manual_ip:
# static_ip: 192.168.0.85
# gateway: 192.168.0.1
# subnet: 255.255.255.0
# dns1: 8.8.8.8
# dns2: 8.8.4.4
logger:
level: INFO # VERBOSE / DEBUG / INFO / WARN
ota:
platform: esphome
# Please use the native `api` component instead of the `mqtt` section.
# If you use Home Assistant, the native API is more lightweight.
# If there is no HA server connected to this API, the ESP32 reboots every 15 minutes to try to resolve the problem.
# The "reboot_timeout: 0s" option will keep your ESP32 up and running even if you lose connection to your HA server.
api:
reboot_timeout: 0s
# If you don't want to use ESPHome's native API you can use MQTT instead.
# In this case don't forget to remove the 'api:' section.
# mqtt:
# broker: !secret mqtt_host
# username: !secret mqtt_username
# password: !secret mqtt_password
# id: mqtt_client
# Please note that enabling this component will take up a lot of memory and may decrease
# stability and be the cause of reboot depending on the capabilities of the board used.
# web_server:
# port: 80
# log: false
# ota: false
# +--------------------------------------+
# | Global Settings |
# +--------------------------------------+
substitutions:
# Name
name: '' # Name that can be added as a second prefix after the friendly name, you can leave it blank.
hostname: 'pvbrain2' # This is the name of the node. It should always be unique in your ESPHome network.
friendly_name : 'YamBMS' # Prefix added in front of all entity names and also to classify them.
# +--------------------------------------+
# | YamBMS Settings |
# +--------------------------------------+
# Please read the cut-off charging logic README to understand how the YamBMS works
yambms_id: 'yambms1'
yambms_name: 'YamBMS 1'
yambms_update_interval: '1s'
# Input numbers can be displayed as a slider or an input box, options are 'slider' or 'box'.
yambms_input_number_mode: 'slider'
# Please check and fill in the options below correctly according to your battery chemistry and number of cells in series.
# These parameters are important and used for charging logic.
# Battery Chemistry
yambms_battery_chemistry: '1' # 1-LFP | 2-Li-ion | 3-LTO
# Number of cells in series
yambms_cell_count: '16'
# Bulk / Absorption Voltage : corresponds to the Bulk voltage that will be used to charge the battery. (LFP : 55.2V = 3.45V/Cell for 16S battery)
yambms_bulk_v: '55.2'
# Float Voltage : corresponds to the voltage at which the battery would be maintained at the end of charge. (LFP : 53.6V = 3.35V/Cell for 16S battery)
yambms_float_v: '53.6'
# Rebulk voltage, voltage from which a new Bulk charge can start. (LFP : 52.8V = 3.3V/Cell for 16S battery)
yambms_rebulk_v: '52.8'
# Maximum time in minutes that the cut-off step can last before charging is complete
# If your cells are properly balanced this step ends at the fastest after the `cut-off timer`
# This timer can be deactivated with a switch
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '60'
# +--------------------------------------+
# | Shunt Settings |
# +--------------------------------------+
shunt_update_interval: '3s' # frequency at which Shunt data is refreshed
shunt_combine_interval: '1s' # frequency at which Shunt data is combined in YamBMS
# +--------------------------------------+
# | BMS Settings |
# +--------------------------------------+
bms_update_interval: '3s' # frequency at which BMS data is refreshed, going below '3s' can cause problems
bms_combine_interval: '1s' # frequency at which BMS data is combined in YamBMS
bms_cutoff_timer: '50s' # time during which the end of charge conditions must be respected (cut-off + cells not equalizing)
# +--------------------------------------+
# | WK2168 UART expander |
# +--------------------------------------+
uart0_baudrate: '2400' #WKS {RJ45-UART0}
uart1_baudrate: '38400' #JSY193
uart2_baudrate: '19200' #SmartShunt
uart3_baudrate: '9600' #SRNE {RJ45-UART3}
uart4_baudrate: '115200' #JK-BMS 1
uart5_baudrate: '115200' #JK-BMS 2
uart6_baudrate: '115200' #Pylontech
uart7_baudrate: '9600' #EPEVER {RJ45-UART7}
# +--------------------------------------+
# | PVbrain2 packages |
# +--------------------------------------+
packages:
device_board: !include packages/board/board_ESP32-S3_DevKitC-1_PVbrain2.yaml
# BUS
# bus_i2c0: !include pvbrain2/base/device_bus_i2c0.yaml # SX1509 and BME280/BMP280
bus_spi1: !include pvbrain2/base/device_bus_spi1.yaml # MCP2515
# bus_one_wire: !include pvbrain2/base/device_bus_one_wire.yaml # Dallas
# Devices
# device_uart_esp: !include pvbrain2/base/device_uart_esp.yaml
device_wk2168_spi: !include pvbrain2/base/device_wk2168_spi.yaml
# device_wk2168_i2c: !include pvbrain2/base/device_wk2168_i2c.yaml
# device_sx1509: !include pvbrain2/base/device_sx1509.yaml
device_canbus_node1: !include pvbrain2/base/device_canbus_esp32can.yaml # canbus_node1
device_canbus_node2: !include pvbrain2/base/device_canbus_mcp2515.yaml # canbus_node2
# +--------------------------------------+
# | YamBMS packages |
# +--------------------------------------+
# PLEASE READ : https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_main_YAML_HowTo.md
################ >>> CONFIG & CUSTOM LP <<< ################
# Local Packages intended for creating custom codes
# or sharing settings between several main.yaml
# yambms_config: !include yambms_config.yaml
# yambms_custom: !include yambms_custom.yaml
# You don't have to import a shunt but you must import at least one BMS.
shunt1: !include
file: packages/shunt/shunt_combine_Victron_SmartShunt_UART_expander.yaml # shunt_combine_Junctek_KHF_UART.yaml
vars:
shunt_id: '1' # must be a number
shunt_name: 'Shunt 1'
shunt_uart_id: 'uart_${uart_hub_bus}_2'
bms1: !include
file: packages/bms/bms_combine_JK_UART_4G-GPS_full.yaml
vars:
bms_id: '1' # must be a number
bms_name: 'JK-BMS 1'
bms_uart_id: 'uart_${uart_hub_bus}_4'
# Maximum cell charging cycles is used to calculate the battey SoH.
# MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
bms_cell_max_cycles: '6000.0'
bms2: !include
file: packages/bms/bms_combine_JK_UART_4G-GPS_full.yaml
vars:
bms_id: '2' # must be a number
bms_name: 'JK-BMS 2'
bms_uart_id: 'uart_${uart_hub_bus}_5'
# Maximum cell charging cycles is used to calculate the battey SoH.
# MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
bms_cell_max_cycles: '6000.0'
yambms: !include packages/yambms/yambms.yaml
canbus1: !include
file: packages/yambms/yambms_canbus.yaml
vars:
canbus_id: 'canbus1'
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_node1'
canbus_light_id: 'esp_light'
# The CANBUS link will be considered down if no response from the inverter (ID 0x305) for 5s
# The Deye inverter sends the ACK (can_id 0x305) only when it receives the can_id 0x356
canbus_link_timer: '5s'
# +--------------------------------------+
# | DEBUG ( logger level must be DEBUG ) |
# +--------------------------------------+
device_debug: !include
file: packages/base/device_debug_ESP32.yaml
vars:
debug_name: 'Debug'
debug_update_interval: '5s'
+222
View File
@@ -0,0 +1,222 @@
# Updated : 2025.05.13
# Version : 1.5.5
# 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>.
######################## YamBMS Local Packages Version #########################
# You need to copy the `packages` folder into the same folder as this YAML in order to compile it.
# Don't forget to configure your WiFi credentials in the secrets.yaml
################################################################################
# Don't forget to configure your WiFi credentials in the secrets.yaml
#
# If needed, configure a static IP here
# wifi:
# manual_ip:
# static_ip: 192.168.0.85
# gateway: 192.168.0.1
# subnet: 255.255.255.0
# dns1: 8.8.8.8
# dns2: 8.8.4.4
logger:
level: INFO # VERBOSE / DEBUG / INFO / WARN
ota:
platform: esphome
# Please use the native `api` component instead of the `mqtt` section.
# If you use Home Assistant, the native API is more lightweight.
# If there is no HA server connected to this API, the ESP32 reboots every 15 minutes to try to resolve the problem.
# The "reboot_timeout: 0s" option will keep your ESP32 up and running even if you lose connection to your HA server.
api:
reboot_timeout: 0s
# If you don't want to use ESPHome's native API you can use MQTT instead.
# In this case don't forget to remove the 'api:' section.
# mqtt:
# broker: !secret mqtt_host
# username: !secret mqtt_username
# password: !secret mqtt_password
# id: mqtt_client
# Please note that enabling this component will take up a lot of memory and may decrease
# stability and be the cause of reboot depending on the capabilities of the board used.
# web_server:
# port: 80
# log: false
# ota: false
# +--------------------------------------+
# | Global Settings |
# +--------------------------------------+
substitutions:
# Name
name: '' # Name that can be added as a second prefix after the friendly name, you can leave it blank.
hostname: 'yambms' # This is the name of the node. It should always be unique in your ESPHome network.
friendly_name : 'YamBMS' # Prefix added in front of all entity names and also to classify them.
# +--------------------------------------+
# | YamBMS Settings |
# +--------------------------------------+
# Please read the cut-off charging logic README to understand how the YamBMS works
yambms_id: 'yambms1'
yambms_name: 'YamBMS 1'
yambms_update_interval: '1s'
# Input numbers can be displayed as a slider or an input box, options are 'slider' or 'box'.
yambms_input_number_mode: 'slider'
# Please check and fill in the options below correctly according to your battery chemistry and number of cells in series.
# These parameters are important and used for charging logic.
# Battery Chemistry
yambms_battery_chemistry: '1' # 1-LFP | 2-Li-ion | 3-LTO
# Number of cells in series
yambms_cell_count: '16'
# Bulk / Absorption Voltage : corresponds to the Bulk voltage that will be used to charge the battery. (LFP : 55.2V = 3.45V/Cell for 16S battery)
yambms_bulk_v: '55.2'
# Float Voltage : corresponds to the voltage at which the battery would be maintained at the end of charge. (LFP : 53.6V = 3.35V/Cell for 16S battery)
yambms_float_v: '53.6'
# Rebulk voltage, voltage from which a new Bulk charge can start. (LFP : 52.8V = 3.3V/Cell for 16S battery)
yambms_rebulk_v: '52.8'
# Maximum time in minutes that the cut-off step can last before charging is complete
# If your cells are properly balanced this step ends at the fastest after the `cut-off timer`
# This timer can be deactivated with a switch
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '60'
# +--------------------------------------+
# | Shunt Settings |
# +--------------------------------------+
shunt_update_interval: '3s' # frequency at which Shunt data is refreshed
shunt_combine_interval: '1s' # frequency at which Shunt data is combined in YamBMS
# +--------------------------------------+
# | BMS Settings |
# +--------------------------------------+
bms_update_interval: '3s' # frequency at which BMS data is refreshed, going below '3s' can cause problems
bms_combine_interval: '1s' # frequency at which BMS data is combined in YamBMS
bms_cutoff_timer: '50s' # time during which the end of charge conditions must be respected (cut-off + cells not equalizing)
# +--------------------------------------+
# | Packages |
# +--------------------------------------+
# PLEASE READ : https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_main_YAML_HowTo.md
packages:
################ >>> CONFIG & CUSTOM LP <<< ################
# Local Packages intended for creating custom codes
# or sharing settings between several main.yaml
# yambms_config: !include yambms_config.yaml
# yambms_custom: !include yambms_custom.yaml
############### >>> UNCOMMENT YOUR BOARD <<< ###############
############### >>> ONLY ONE BOARD ! <<< ###############
# This list is incomplete, other board.yaml are available in the board folder
device_board: !include packages/board/board_ESP32_Generic.yaml
# device_board: !include packages/board/board_ESP32_DevKit-V1.yaml
# device_board: !include packages/board/board_ESP32_LilyGo-T-CAN485.yaml
# device_board: !include packages/board/board_ESP32_EVB.yaml
# device_board: !include packages/board/board_ESP32_Atom-Lite.yaml
# device_board: !include packages/board/board_ESP32-C3_DevKitM-1.yaml
# device_board: !include packages/board/board_ESP32-C3_ETH01-EVO.yaml
# device_board: !include packages/board/board_ESP32-S3_DevKitC-1_LED-38.yaml
# device_board: !include packages/board/board_ESP32-S3_DevKitC-1_LED-48.yaml
# device_board: !include packages/board/board_ESP32-S3_LilyGo-T-Connect.yaml
# device_board: !include packages/board/board_ESP32-S3_AtomS3-Lite.yaml
# device_board: !include
# file: packages/board/board_ESP32-S3_AtomS3.yaml # board_ESP32-S3_AtomS3R.yaml
# vars:
# display_auto_next_page_interval: '5s'
# display_rotation: '0' # 0/90/180/270 rotation angle in degrees
########### >>> UNCOMMENT YOUR BOARD OPTIONS <<< ###########
uart_esp_1: !include packages/board/board_options_itf_uart_esp_1.yaml
uart_esp_2: !include packages/board/board_options_itf_uart_esp_2.yaml
uart_esp_3: !include packages/board/board_options_itf_uart_esp_3.yaml
# ESP32_CAN (TJA105x, SN65HVD230, M5Stack CAN base/unit)
canbus_node_1: !include
file: packages/board/board_options_itf_canbus_esp32_can.yaml
vars:
canbus_node_id: 'canbus_inverter_1'
# MCP2515
# canbus_node_2: !include
# file: packages/board/board_options_itf_canbus_mcp2515.yaml
# vars:
# canbus_node_id: 'canbus_inverter_1'
############################################################
# You don't have to import a shunt but you must import at least one BMS.
shunt1: !include
file: packages/shunt/shunt_combine_Victron_SmartShunt_UART.yaml # shunt_combine_Junctek_KHF_UART.yaml
vars:
shunt_id: '1' # must be a number
shunt_name: 'Shunt 1'
shunt_uart_id: 'uart_esp_3'
bms1: !include
file: packages/bms/bms_combine_JK_UART_4G-GPS_full.yaml
vars:
bms_id: '1' # must be a number
bms_name: 'JK-BMS 1'
bms_uart_id: 'uart_esp_1'
# Maximum cell charging cycles is used to calculate the battey SoH.
# MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
bms_cell_max_cycles: '6000.0'
bms2: !include
file: packages/bms/bms_combine_JK_UART_4G-GPS_full.yaml
vars:
bms_id: '2' # must be a number
bms_name: 'JK-BMS 2'
bms_uart_id: 'uart_esp_2'
# Maximum cell charging cycles is used to calculate the battey SoH.
# MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
bms_cell_max_cycles: '6000.0'
yambms: !include packages/yambms/yambms.yaml
canbus1: !include
file: packages/yambms/yambms_canbus.yaml
vars:
canbus_id: 'canbus1'
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_inverter_1'
canbus_light_id: 'esp_light'
# The CANBUS link will be considered down if no response from the inverter (ID 0x305) for 5s
# The Deye inverter sends the ACK (can_id 0x305) only when it receives the can_id 0x356
canbus_link_timer: '5s'
# +--------------------------------------+
# | DEBUG ( logger level must be DEBUG ) |
# +--------------------------------------+
device_debug: !include
file: packages/base/device_debug_ESP32.yaml
vars:
debug_name: 'Debug'
debug_update_interval: '5s'
+323
View File
@@ -0,0 +1,323 @@
# Updated : 2025.05.13
# Version : 1.5.5
# 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>.
######################## YamBMS Remote Packages Version ########################
# You can compile this YAML directly without the `packages` folder.
# The packages will be automatically downloaded from GitHub.
# Don't forget to configure your WiFi credentials in the secrets.yaml
################################################################################
# If needed, configure a static IP here
# wifi:
# manual_ip:
# static_ip: 192.168.0.85
# gateway: 192.168.0.1
# subnet: 255.255.255.0
# dns1: 8.8.8.8
# dns2: 8.8.4.4
logger:
level: INFO # VERBOSE / DEBUG / INFO / WARN
ota:
platform: esphome
# Please use the native `api` component instead of the `mqtt` section.
# If you use Home Assistant, the native API is more lightweight.
# If there is no HA server connected to this API, the ESP32 reboots every 15 minutes to try to resolve the problem.
# The "reboot_timeout: 0s" option will keep your ESP32 up and running even if you lose connection to your HA server.
api:
reboot_timeout: 0s
# If you don't want to use ESPHome's native API you can use MQTT instead.
# In this case don't forget to remove the 'api:' section.
# mqtt:
# broker: !secret mqtt_host
# username: !secret mqtt_username
# password: !secret mqtt_password
# id: mqtt_client
# Please note that enabling this component will take up a lot of memory and may decrease
# stability and be the cause of reboot depending on the capabilities of the board used.
# web_server:
# port: 80
# log: false
# ota: false
# +--------------------------------------+
# | Global Settings |
# +--------------------------------------+
substitutions:
# Name
name: '' # Name that can be added as a second prefix after the friendly name, you can leave it blank.
hostname: 'yambms' # This is the name of the node. It should always be unique in your ESPHome network.
friendly_name : 'YamBMS Demo' # Prefix added in front of all entity names and also to classify them.
# +--------------------------------------+
# | YamBMS Settings |
# +--------------------------------------+
# Please read the cut-off charging logic README to understand how the YamBMS works
yambms_id: 'yambms1'
yambms_name: 'YamBMS 1'
yambms_update_interval: '1s'
# Input numbers can be displayed as a slider or an input box, options are 'slider' or 'box'.
yambms_input_number_mode: 'slider'
# Please check and fill in the options below correctly according to your battery chemistry and number of cells in series.
# These parameters are important and used for charging logic.
# Battery Chemistry
yambms_battery_chemistry: '1' # 1-LFP | 2-Li-ion | 3-LTO
# Number of cells in series
yambms_cell_count: '16'
# Bulk / Absorption Voltage : corresponds to the Bulk voltage that will be used to charge the battery. (LFP : 55.2V = 3.45V/Cell for 16S battery)
yambms_bulk_v: '55.2'
# Float Voltage : corresponds to the voltage at which the battery would be maintained at the end of charge. (LFP : 53.6V = 3.35V/Cell for 16S battery)
yambms_float_v: '53.6'
# Rebulk voltage, voltage from which a new Bulk charge can start. (LFP : 52.8V = 3.3V/Cell for 16S battery)
yambms_rebulk_v: '52.8'
# Maximum time in minutes that the cut-off step can last before charging is complete
# If your cells are properly balanced this step ends at the fastest after the `cut-off timer`
# This timer can be deactivated with a switch
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '60'
# +--------------------------------------+
# | Shunt Settings |
# +--------------------------------------+
shunt_update_interval: '3s' # frequency at which Shunt data is refreshed
shunt_combine_interval: '1s' # frequency at which Shunt data is combined in YamBMS
# +--------------------------------------+
# | BMS Settings |
# +--------------------------------------+
bms_update_interval: '3s' # frequency at which BMS data is refreshed, going below '3s' can cause problems
bms_combine_interval: '1s' # frequency at which BMS data is combined in YamBMS
bms_cutoff_timer: '50s' # time during which the end of charge conditions must be respected (cut-off + cells not equalizing)
# +--------------------------------------+
# | Packages |
# +--------------------------------------+
# PLEASE READ : https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_main_YAML_HowTo.md
packages:
################ >>> CONFIG & CUSTOM LP <<< ################
# Local Packages intended for creating custom codes
# or sharing settings between several main.yaml
# yambms_config: !include yambms_config.yaml
# yambms_custom: !include yambms_custom.yaml
############### >>> UNCOMMENT YOUR BOARD <<< ###############
############### >>> ONLY ONE BOARD ! <<< ###############
board:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
- path: 'packages/board/board_ESP32_Generic.yaml'
# - path: 'packages/board/board_ESP32_DevKit-V1.yaml'
# - path: 'packages/board/board_ESP32_LilyGo-T-CAN485.yaml'
# - path: 'packages/board/board_ESP32_EVB.yaml'
# - path: 'packages/board/board_ESP32_Atom-Lite.yaml'
# - path: 'packages/board/board_ESP32-C3_DevKitM-1.yaml'
# - path: 'packages/board/board_ESP32-C3_ETH01-EVO.yaml'
# - path: 'packages/board/board_ESP32-S3_DevKitC-1_LED-38.yaml'
# - path: 'packages/board/board_ESP32-S3_DevKitC-1_LED-48.yaml'
# - path: 'packages/board/board_ESP32-S3_LilyGo-T-Connect.yaml'
# - path: 'packages/board/board_ESP32-S3_AtomS3-Lite.yaml'
# - path: 'packages/board/board_ESP32-S3_AtomS3.yaml'
# vars:
# display_auto_next_page_interval: '5s'
# display_rotation: '0' # 0/90/180/270 rotation angle in degrees
# - path: 'packages/board/board_ESP32-S3_AtomS3R.yaml'
# vars:
# display_auto_next_page_interval: '5s'
# display_rotation: '0' # 0/90/180/270 rotation angle in degrees
########### >>> UNCOMMENT YOUR BOARD OPTIONS <<< ###########
board_options:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
# Captive Portal
- path: 'packages/board/board_options_captive_portal.yaml'
# UART 1
# - path: 'packages/board/board_options_itf_uart_esp_1.yaml'
# UART 2
# - path: 'packages/board/board_options_itf_uart_esp_2.yaml'
# UART 3
# - path: 'packages/board/board_options_itf_uart_esp_3.yaml'
# ESP32_CAN (TJA105x, SN65HVD230, M5Stack CAN base/unit)
- path: 'packages/board/board_options_itf_canbus_esp32_can.yaml'
vars:
canbus_node_id: 'canbus_inverter_1'
# MCP2515
# - path: 'packages/board/board_options_itf_canbus_mcp2515.yaml'
# vars:
# canbus_node_id: 'canbus_inverter_1'
############################################################
shunt:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
# Shunt 1
- path: 'packages/shunt/shunt_combine_FAKE.yaml'
vars:
shunt_id: '1' # must be a number
shunt_name: 'Shunt 1'
# Shunt sensors values
shunt_voltage: '53.41' # V
shunt_current: '37.5' # A
shunt_power: '2003' # W
shunt_soc: '86' # %
bms:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
# BMS 1
- path: 'packages/bms/bms_combine_FAKE.yaml'
vars:
bms_id: '1' # must be a number
bms_name: 'BMS 1'
# BMS sensors values
bms_battery_capacity: '280' # Ah
bms_battery_capacity_remaining: '243' # Ah
bms_voltage: '53.45' # V
bms_current: '9.2' # A
bms_power: '492' # W
bms_soc: '87' # %
bms_soh: '98' # %
bms_min_cell_voltage: '3.339' # V
bms_min_voltage_cell: '2' # cell number 1~16
bms_max_cell_voltage: '3.341' # V
bms_max_voltage_cell: '11' # cell number 1~16
bms_temperature_sensor_1: '21.1' # °C
bms_temperature_sensor_2: '21.3' # °C
bms_temperature_sensor_3: '21.5' # °C
bms_temperature_sensor_4: '21.7' # °C
bms_max_charge_current: '100' # A
bms_max_discharge_current: '100' # A
bms_cell_ovp: '3.650' # V Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V Used by 'Auto CVL' functions
bms_charging_cycles: '178' # charging cycles number Used to calculate the SoH
# BMS 2
- path: 'packages/bms/bms_combine_FAKE.yaml'
vars:
bms_id: '2' # must be a number
bms_name: 'BMS 2'
# BMS sensors values
bms_battery_capacity: '280' # Ah
bms_battery_capacity_remaining: '238' # Ah
bms_voltage: '53.41' # V
bms_current: '11.3' # A
bms_power: '604' # W
bms_soc: '85' # %
bms_soh: '89' # %
bms_min_cell_voltage: '3.337' # V
bms_min_voltage_cell: '14' # cell number 1~16
bms_max_cell_voltage: '3.339' # V
bms_max_voltage_cell: '3' # cell number 1~16
bms_temperature_sensor_1: '21.8' # °C
bms_temperature_sensor_2: '21.6' # °C
bms_temperature_sensor_3: '21.4' # °C
bms_temperature_sensor_4: '21.2' # °C
bms_max_charge_current: '100' # A
bms_max_discharge_current: '100' # A
bms_cell_ovp: '3.650' # V Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V Used by 'Auto CVL' functions
bms_charging_cycles: '226' # charging cycles number Used to calculate the SoH
# BMS 3
- path: 'packages/bms/bms_combine_FAKE.yaml'
vars:
bms_id: '3' # must be a number
bms_name: 'BMS 3'
# BMS sensors values
bms_battery_capacity: '280' # Ah
bms_battery_capacity_remaining: '232' # Ah
bms_voltage: '53.37' # V
bms_current: '15.7' # A
bms_power: '838' # W
bms_soc: '83' # %
bms_soh: '79' # %
bms_min_cell_voltage: '3.334' # V
bms_min_voltage_cell: '7' # cell number 1~16
bms_max_cell_voltage: '3.336' # V
bms_max_voltage_cell: '9' # cell number 1~16
bms_temperature_sensor_1: '21.9' # °C
bms_temperature_sensor_2: '22.0' # °C
bms_temperature_sensor_3: '22.1' # °C
bms_temperature_sensor_4: '22.2' # °C
bms_max_charge_current: '100' # A
bms_max_discharge_current: '100' # A
bms_cell_ovp: '3.650' # V Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V Used by 'Auto CVL' functions
bms_charging_cycles: '194' # charging cycles number Used to calculate the SoH
yambms:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
- path: 'packages/yambms/yambms.yaml'
canbus:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
- path: 'packages/yambms/yambms_canbus.yaml'
vars:
canbus_id: 'canbus1'
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_inverter_1'
canbus_light_id: 'esp_light'
# The CANBUS link will be considered down if no response from the inverter (0x305 frame) for 5s
# The Deye inverter sends the ACK 0x305 only when it receives the 0x356 frame.
canbus_link_timer: '5s'
# +--------------------------------------+
# | DEBUG ( logger level must be DEBUG ) |
# +--------------------------------------+
debug:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
- path: packages/base/device_debug_ESP32.yaml
vars:
debug_name: 'Debug'
debug_update_interval: '5s'
+316
View File
@@ -0,0 +1,316 @@
# Updated : 2025.05.13
# Version : 1.5.5
# 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>.
######################## YamBMS Remote Packages Version ########################
# You can compile this YAML directly without the `packages` folder.
# The packages will be automatically downloaded from GitHub.
# Don't forget to configure your WiFi credentials in the secrets.yaml
################################################################################
# If needed, configure a static IP here
# wifi:
# manual_ip:
# static_ip: 192.168.0.85
# gateway: 192.168.0.1
# subnet: 255.255.255.0
# dns1: 8.8.8.8
# dns2: 8.8.4.4
logger:
level: INFO # VERBOSE / DEBUG / INFO / WARN
ota:
platform: esphome
# Please use the native `api` component instead of the `mqtt` section.
# If you use Home Assistant, the native API is more lightweight.
# If there is no HA server connected to this API, the ESP32 reboots every 15 minutes to try to resolve the problem.
# The "reboot_timeout: 0s" option will keep your ESP32 up and running even if you lose connection to your HA server.
api:
reboot_timeout: 0s
# If you don't want to use ESPHome's native API you can use MQTT instead.
# In this case don't forget to remove the 'api:' section.
# mqtt:
# broker: !secret mqtt_host
# username: !secret mqtt_username
# password: !secret mqtt_password
# id: mqtt_client
# Please note that enabling this component will take up a lot of memory and may decrease
# stability and be the cause of reboot depending on the capabilities of the board used.
# web_server:
# port: 80
# log: false
# ota: false
# +--------------------------------------+
# | Global Settings |
# +--------------------------------------+
substitutions:
# Name
name: '' # Name that can be added as a second prefix after the friendly name, you can leave it blank.
hostname: 'yambms' # This is the name of the node. It should always be unique in your ESPHome network.
friendly_name : 'YamBMS' # Prefix added in front of all entity names and also to classify them.
# +--------------------------------------+
# | YamBMS Settings |
# +--------------------------------------+
# Please read the cut-off charging logic README to understand how the YamBMS works
yambms_id: 'yambms1'
yambms_name: 'YamBMS 1'
yambms_update_interval: '1s'
# Input numbers can be displayed as a slider or an input box, options are 'slider' or 'box'.
yambms_input_number_mode: 'slider'
# Please check and fill in the options below correctly according to your battery chemistry and number of cells in series.
# These parameters are important and used for charging logic.
# Battery Chemistry
yambms_battery_chemistry: '1' # 1-LFP | 2-Li-ion | 3-LTO
# Number of cells in series
yambms_cell_count: '16'
# Bulk / Absorption Voltage : corresponds to the Bulk voltage that will be used to charge the battery. (LFP : 55.2V = 3.45V/Cell for 16S battery)
yambms_bulk_v: '55.2'
# Float Voltage : corresponds to the voltage at which the battery would be maintained at the end of charge. (LFP : 53.6V = 3.35V/Cell for 16S battery)
yambms_float_v: '53.6'
# Rebulk voltage, voltage from which a new Bulk charge can start. (LFP : 52.8V = 3.3V/Cell for 16S battery)
yambms_rebulk_v: '52.8'
# Maximum time in minutes that the cut-off step can last before charging is complete
# If your cells are properly balanced this step ends at the fastest after the `cut-off timer`
# This timer can be deactivated with a switch
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '60'
# +--------------------------------------+
# | Shunt Settings |
# +--------------------------------------+
shunt_update_interval: '3s' # frequency at which Shunt data is refreshed
shunt_combine_interval: '1s' # frequency at which Shunt data is combined in YamBMS
# +--------------------------------------+
# | BMS Settings |
# +--------------------------------------+
bms_update_interval: '3s' # frequency at which BMS data is refreshed, going below '3s' can cause problems
bms_combine_interval: '1s' # frequency at which BMS data is combined in YamBMS
bms_cutoff_timer: '50s' # time during which the end of charge conditions must be respected (cut-off + cells not equalizing)
# +--------------------------------------+
# | Packages |
# +--------------------------------------+
# PLEASE READ : https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_main_YAML_HowTo.md
packages:
################ >>> CONFIG & CUSTOM LP <<< ################
# Local Packages intended for creating custom codes
# or sharing settings between several main.yaml
# yambms_config: !include yambms_config.yaml
# yambms_custom: !include yambms_custom.yaml
############### >>> UNCOMMENT YOUR BOARD <<< ###############
############### >>> ONLY ONE BOARD ! <<< ###############
board:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
# - path: 'packages/board/board_ESP32_Generic.yaml'
# - path: 'packages/board/board_ESP32_DevKit-V1.yaml'
# - path: 'packages/board/board_ESP32_LilyGo-T-CAN485.yaml'
# - path: 'packages/board/board_ESP32_EVB.yaml'
# - path: 'packages/board/board_ESP32_Atom-Lite.yaml'
# - path: 'packages/board/board_ESP32-C3_DevKitM-1.yaml'
# - path: 'packages/board/board_ESP32-C3_ETH01-EVO.yaml'
# - path: 'packages/board/board_ESP32-S3_DevKitC-1_LED-38.yaml'
# - path: 'packages/board/board_ESP32-S3_DevKitC-1_LED-48.yaml'
- path: 'packages/board/board_ESP32-S3_LilyGo-T-Connect.yaml'
# - path: 'packages/board/board_ESP32-S3_AtomS3-Lite.yaml'
# - path: 'packages/board/board_ESP32-S3_AtomS3.yaml'
# vars:
# display_auto_next_page_interval: '5s'
# display_rotation: '0' # 0/90/180/270 rotation angle in degrees
# - path: 'packages/board/board_ESP32-S3_AtomS3R.yaml'
# vars:
# display_auto_next_page_interval: '5s'
# display_rotation: '0' # 0/90/180/270 rotation angle in degrees
########### >>> UNCOMMENT YOUR BOARD OPTIONS <<< ###########
board_options:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
# UART 1
- path: 'packages/board/board_options_itf_uart_esp_1.yaml'
# UART 2
# - path: 'packages/board/board_options_itf_uart_esp_2.yaml'
# UART 3
# - path: 'packages/board/board_options_itf_uart_esp_3.yaml'
# ESP32_CAN (TJA105x, SN65HVD230, M5Stack CAN base/unit)
- path: 'packages/board/board_options_itf_canbus_esp32_can.yaml'
vars:
canbus_node_id: 'canbus_inverter_1'
# MCP2515
# - path: 'packages/board/board_options_itf_canbus_mcp2515.yaml'
# vars:
# canbus_node_id: 'canbus_inverter_1'
############################################################
# You don't have to import a shunt but you must import at least one BMS.
# shunt:
# url: https://github.com/Sleeper85/esphome-yambms
# ref: main
# refresh: 0s
# files:
# # Shunt 1
# - path: 'packages/shunt/shunt_combine_Victron_SmartShunt_UART.yaml' # shunt_combine_Junctek_KHF_UART.yaml
# vars:
# shunt_id: '1' # must be a number
# shunt_name: 'Shunt 1'
# shunt_uart_id: 'uart_esp_3'
bms:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
# RS485 Sniffer
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_sniffer.yaml'
vars:
sniffer_id: 'sniffer1'
sniffer_protocol: 'JK02_32S'
sniffer_uart_id: 'uart_esp_1'
# BMS 1
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_JK-B_standard.yaml'
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '1' # must be a number
bms_name: 'JK-BMS 1'
bms_address: '0x01' # BMS 1 ( JK app `Device Addr.` setting )
# BMS 2
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_JK-B_standard.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 2 ( JK app `Device Addr.` setting )
# BMS 3
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_JK-B_standard.yaml'
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '3' # must be a number
bms_name: 'JK-BMS 3'
bms_address: '0x03' # BMS 3 ( JK app `Device Addr.` setting )
# BMS 4
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_JK-B_standard.yaml'
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '4' # must be a number
bms_name: 'JK-BMS 4'
bms_address: '0x04' # BMS 4 ( JK app `Device Addr.` setting )
# BMS 5
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_JK-B_standard.yaml'
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '5' # must be a number
bms_name: 'JK-BMS 5'
bms_address: '0x05' # BMS 5 ( JK app `Device Addr.` setting )
# BMS 6
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_JK-B_standard.yaml'
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '6' # must be a number
bms_name: 'JK-BMS 6'
bms_address: '0x06' # BMS 6 ( JK app `Device Addr.` setting )
# BMS 7
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_JK-B_standard.yaml'
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '7' # must be a number
bms_name: 'JK-BMS 7'
bms_address: '0x07' # BMS 7 ( JK app `Device Addr.` setting )
# BMS 8
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_JK-B_standard.yaml'
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '8' # must be a number
bms_name: 'JK-BMS 8'
bms_address: '0x08' # BMS 8 ( JK app `Device Addr.` setting )
yambms:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
- path: 'packages/yambms/yambms.yaml'
canbus:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
- path: 'packages/yambms/yambms_canbus.yaml'
vars:
canbus_id: 'canbus1'
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_inverter_1'
canbus_light_id: 'esp_light'
# The CANBUS link will be considered down if no response from the inverter (0x305 frame) for 5s
# The Deye inverter sends the ACK 0x305 only when it receives the 0x356 frame.
canbus_link_timer: '5s'
# +--------------------------------------+
# | DEBUG ( logger level must be DEBUG ) |
# +--------------------------------------+
debug:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
- path: packages/base/device_debug_ESP32.yaml
vars:
debug_name: 'Debug'
debug_update_interval: '5s'
@@ -1,5 +1,5 @@
# Updated : 2025.04.01
# Version : 1.5.4
# Updated : 2025.05.13
# Version : 1.5.5
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -17,17 +17,14 @@
# 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>.
logger:
level: INFO # VERBOSE / DEBUG / INFO / WARN
######################## YamBMS Remote Packages Version ########################
ota:
platform: esphome
# You can compile this YAML directly without the `packages` folder.
# The packages will be automatically downloaded from GitHub.
# Don't forget to configure your WiFi credentials in the secrets.yaml
api:
reboot_timeout: 0s
################################################################################
# Don't forget to configure your WiFi credentials in the secrets.yaml file
#
# If needed, configure a static IP here
# wifi:
# manual_ip:
@@ -37,11 +34,42 @@ api:
# dns1: 8.8.8.8
# dns2: 8.8.4.4
logger:
level: INFO # VERBOSE / DEBUG / INFO / WARN
ota:
platform: esphome
# Please use the native `api` component instead of the `mqtt` section.
# If you use Home Assistant, the native API is more lightweight.
# If there is no HA server connected to this API, the ESP32 reboots every 15 minutes to try to resolve the problem.
# The "reboot_timeout: 0s" option will keep your ESP32 up and running even if you lose connection to your HA server.
api:
reboot_timeout: 0s
# If you don't want to use ESPHome's native API you can use MQTT instead.
# In this case don't forget to remove the 'api:' section.
# mqtt:
# broker: !secret mqtt_host
# username: !secret mqtt_username
# password: !secret mqtt_password
# id: mqtt_client
# Please note that enabling this component will take up a lot of memory and may decrease
# stability and be the cause of reboot depending on the capabilities of the board used.
# web_server:
# port: 80
# log: false
# ota: false
# +--------------------------------------+
# | Global Settings |
# +--------------------------------------+
substitutions:
name: yambms # ESP32 name / hostname
# Name
name: '' # Name that can be added as a second prefix after the friendly name, you can leave it blank.
hostname: 'yambms' # This is the name of the node. It should always be unique in your ESPHome network.
friendly_name : 'YamBMS' # Prefix added in front of all entity names and also to classify them.
# +--------------------------------------+
# | YamBMS Settings |
# +--------------------------------------+
@@ -69,8 +97,6 @@ substitutions:
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'
# Maximum charging cycles is used to calculate the battey SOH, LF280K v3 =8000.0, LF280K v2 =6000.0, LF280=3000.0 (decimal is required)
yambms_max_cycles: '6000.0'
# +--------------------------------------+
# | Shunt Settings |
# +--------------------------------------+
@@ -86,8 +112,19 @@ substitutions:
# +--------------------------------------+
# | Packages |
# +--------------------------------------+
# PLEASE READ : https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_main_YAML_HowTo.md
packages:
################ >>> CONFIG & CUSTOM LP <<< ################
# Local Packages intended for creating custom codes
# or sharing settings between several main.yaml
# yambms_config: !include yambms_config.yaml
# yambms_custom: !include yambms_custom.yaml
############### >>> UNCOMMENT YOUR BOARD <<< ###############
############### >>> ONLY ONE BOARD ! <<< ###############
@@ -96,20 +133,67 @@ packages:
ref: main
refresh: 0s
files:
# - path: 'packages/board/board_ESP32_Generic.yaml'
# - path: 'packages/board/board_ESP32_DevKit-V1.yaml'
# - path: 'packages/board/board_ESP32_LilyGo-T-CAN485.yaml'
# - path: 'packages/board/board_ESP32_EVB.yaml'
# - path: 'packages/board/board_ESP32_Atom-Lite.yaml'
# - path: 'packages/board/board_ESP32-C3_DevKitM-1.yaml'
# - path: 'packages/board/board_ESP32-C3_ETH01-EVO.yaml'
# - path: 'packages/board/board_ESP32-S3_DevKitC-1.yaml'
# - path: 'packages/board/board_ESP32-S3_LilyGo-T-Connect.yaml'
# - path: 'packages/board/board_ESP32-S3_DevKitC-1_LED-38.yaml'
# - path: 'packages/board/board_ESP32-S3_DevKitC-1_LED-48.yaml'
- path: 'packages/board/board_ESP32-S3_LilyGo-T-Connect.yaml'
# - path: 'packages/board/board_ESP32-S3_AtomS3-Lite.yaml'
- path: 'packages/board/board_ESP32-S3_AtomS3.yaml'
vars:
display_auto_next_page_interval: '5s'
# - path: 'packages/board/board_ESP32-S3_AtomS3.yaml'
# vars:
# display_auto_next_page_interval: '5s'
# display_rotation: '0' # 0/90/180/270 rotation angle in degrees
# - path: 'packages/board/board_ESP32-S3_AtomS3R.yaml'
# vars:
# display_auto_next_page_interval: '5s'
# display_rotation: '0' # 0/90/180/270 rotation angle in degrees
############################################################
########### >>> UNCOMMENT YOUR BOARD OPTIONS <<< ###########
board_options:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
# UART 1
- path: 'packages/board/board_options_itf_uart_esp_1.yaml'
# UART 2
# - path: 'packages/board/board_options_itf_uart_esp_2.yaml'
# UART 3
# - path: 'packages/board/board_options_itf_uart_esp_3.yaml'
# ESP32_CAN (TJA105x, SN65HVD230, M5Stack CAN base/unit)
- path: 'packages/board/board_options_itf_canbus_esp32_can.yaml'
vars:
canbus_node_id: 'canbus_inverter_1'
# MCP2515
# - path: 'packages/board/board_options_itf_canbus_mcp2515.yaml'
# vars:
# canbus_node_id: 'canbus_inverter_1'
############################################################
# You don't have to import a shunt but you must import at least one BMS.
# shunt:
# url: https://github.com/Sleeper85/esphome-yambms
# ref: main
# refresh: 0s
# files:
# # Shunt 1
# - path: 'packages/shunt/shunt_combine_Victron_SmartShunt_UART.yaml' # shunt_combine_Junctek_KHF_UART.yaml
# vars:
# shunt_id: '1' # must be a number
# shunt_name: 'Shunt 1'
# shunt_uart_id: 'uart_esp_3'
bms:
url: https://github.com/Sleeper85/esphome-yambms
@@ -117,13 +201,13 @@ packages:
refresh: 0s
files:
# RS485 Sniffer
- path: 'packages/bms/bms_combine_JK-PB_RS485_sniffer.yaml'
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_sniffer.yaml'
vars:
sniffer_id: 'sniffer1'
sniffer_protocol: 'JK02_32S'
sniffer_uart_id: 'uart_esp_1'
# BMS 1
- path: 'packages/bms/bms_combine_JK-PB_RS485_bms_standard.yaml'
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.yaml'
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
@@ -132,7 +216,7 @@ packages:
bms_name: 'JK-BMS 1'
bms_address: '0x01' # BMS 1 DIP switch
# BMS 2
- path: 'packages/bms/bms_combine_JK-PB_RS485_bms_standard.yaml'
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.yaml'
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
@@ -141,7 +225,7 @@ packages:
bms_name: 'JK-BMS 2'
bms_address: '0x02' # BMS 2 DIP switch
# BMS 3
- path: 'packages/bms/bms_combine_JK-PB_RS485_bms_standard.yaml'
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.yaml'
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
@@ -150,7 +234,7 @@ packages:
bms_name: 'JK-BMS 3'
bms_address: '0x03' # BMS 3 DIP switch
# BMS 4
- path: 'packages/bms/bms_combine_JK-PB_RS485_bms_standard.yaml'
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.yaml'
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
@@ -159,7 +243,7 @@ packages:
bms_name: 'JK-BMS 4'
bms_address: '0x04' # BMS 4 DIP switch
# BMS 5
- path: 'packages/bms/bms_combine_JK-PB_RS485_bms_standard.yaml'
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.yaml'
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
@@ -168,7 +252,7 @@ packages:
bms_name: 'JK-BMS 5'
bms_address: '0x05' # BMS 5 DIP switch
# BMS 6
- path: 'packages/bms/bms_combine_JK-PB_RS485_bms_standard.yaml'
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.yaml'
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
@@ -177,7 +261,7 @@ packages:
bms_name: 'JK-BMS 6'
bms_address: '0x06' # BMS 6 DIP switch
# BMS 7
- path: 'packages/bms/bms_combine_JK-PB_RS485_bms_standard.yaml'
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.yaml'
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
@@ -185,6 +269,15 @@ packages:
bms_id: '7' # must be a number
bms_name: 'JK-BMS 7'
bms_address: '0x07' # BMS 7 DIP switch
# BMS 8
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.yaml'
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '8' # must be a number
bms_name: 'JK-BMS 8'
bms_address: '0x08' # BMS 8 DIP switch
yambms:
url: https://github.com/Sleeper85/esphome-yambms
@@ -192,12 +285,8 @@ packages:
refresh: 0s
files:
- path: 'packages/yambms/yambms.yaml'
# - path: 'packages/yambms/yambms_custom.yaml'
# Custom Local YAML
# yambms_custom: !include yambms_custom.yaml
canbus1:
canbus:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
@@ -206,10 +295,10 @@ packages:
vars:
canbus_id: 'canbus1'
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_node1'
canbus_node_id: 'canbus_inverter_1'
canbus_light_id: 'esp_light'
# The CANBUS link will be considered down if no response from the inverter (ID 0x305) for 5s
# The Deye inverter sends the ACK (can_id 0x305) only when it receives the can_id 0x356
# The CANBUS link will be considered down if no response from the inverter (0x305 frame) for 5s
# The Deye inverter sends the ACK 0x305 only when it receives the 0x356 frame.
canbus_link_timer: '5s'
# +--------------------------------------+
+234
View File
@@ -0,0 +1,234 @@
# Updated : 2025.05.13
# Version : 1.5.5
# 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>.
######################## YamBMS Remote Packages Version ########################
# You can compile this YAML directly without the `packages` folder.
# The packages will be automatically downloaded from GitHub.
# Don't forget to configure your WiFi credentials in the secrets.yaml
################################################################################
# If needed, configure a static IP here
# wifi:
# manual_ip:
# static_ip: 192.168.0.85
# gateway: 192.168.0.1
# subnet: 255.255.255.0
# dns1: 8.8.8.8
# dns2: 8.8.4.4
logger:
level: INFO # VERBOSE / DEBUG / INFO / WARN
ota:
platform: esphome
# Please use the native `api` component instead of the `mqtt` section.
# If you use Home Assistant, the native API is more lightweight.
# If there is no HA server connected to this API, the ESP32 reboots every 15 minutes to try to resolve the problem.
# The "reboot_timeout: 0s" option will keep your ESP32 up and running even if you lose connection to your HA server.
api:
reboot_timeout: 0s
# If you don't want to use ESPHome's native API you can use MQTT instead.
# In this case don't forget to remove the 'api:' section.
# mqtt:
# broker: !secret mqtt_host
# username: !secret mqtt_username
# password: !secret mqtt_password
# id: mqtt_client
# Please note that enabling this component will take up a lot of memory and may decrease
# stability and be the cause of reboot depending on the capabilities of the board used.
# web_server:
# port: 80
# log: false
# ota: false
# +--------------------------------------+
# | Global Settings |
# +--------------------------------------+
substitutions:
# Name
name: '' # Name that can be added as a second prefix after the friendly name, you can leave it blank.
hostname: 'pvbrain2' # This is the name of the node. It should always be unique in your ESPHome network.
friendly_name : 'YamBMS' # Prefix added in front of all entity names and also to classify them.
# +--------------------------------------+
# | YamBMS Settings |
# +--------------------------------------+
# Please read the cut-off charging logic README to understand how the YamBMS works
yambms_id: 'yambms1'
yambms_name: 'YamBMS 1'
yambms_update_interval: '1s'
# Input numbers can be displayed as a slider or an input box, options are 'slider' or 'box'.
yambms_input_number_mode: 'slider'
# Please check and fill in the options below correctly according to your battery chemistry and number of cells in series.
# These parameters are important and used for charging logic.
# Battery Chemistry
yambms_battery_chemistry: '1' # 1-LFP | 2-Li-ion | 3-LTO
# Number of cells in series
yambms_cell_count: '16'
# Bulk / Absorption Voltage : corresponds to the Bulk voltage that will be used to charge the battery. (LFP : 55.2V = 3.45V/Cell for 16S battery)
yambms_bulk_v: '55.2'
# Float Voltage : corresponds to the voltage at which the battery would be maintained at the end of charge. (LFP : 53.6V = 3.35V/Cell for 16S battery)
yambms_float_v: '53.6'
# Rebulk voltage, voltage from which a new Bulk charge can start. (LFP : 52.8V = 3.3V/Cell for 16S battery)
yambms_rebulk_v: '52.8'
# Maximum time in minutes that the cut-off step can last before charging is complete
# If your cells are properly balanced this step ends at the fastest after the `cut-off timer`
# This timer can be deactivated with a switch
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '60'
# +--------------------------------------+
# | Shunt Settings |
# +--------------------------------------+
shunt_update_interval: '3s' # frequency at which Shunt data is refreshed
shunt_combine_interval: '1s' # frequency at which Shunt data is combined in YamBMS
# +--------------------------------------+
# | BMS Settings |
# +--------------------------------------+
bms_update_interval: '3s' # frequency at which BMS data is refreshed, going below '3s' can cause problems
bms_combine_interval: '1s' # frequency at which BMS data is combined in YamBMS
bms_cutoff_timer: '50s' # time during which the end of charge conditions must be respected (cut-off + cells not equalizing)
# +--------------------------------------+
# | WK2168 UART expander |
# +--------------------------------------+
uart0_baudrate: '2400' #WKS {RJ45-UART0}
uart1_baudrate: '38400' #JSY193
uart2_baudrate: '19200' #SmartShunt
uart3_baudrate: '9600' #SRNE {RJ45-UART3}
uart4_baudrate: '115200' #JK-BMS 1
uart5_baudrate: '115200' #JK-BMS 2
uart6_baudrate: '115200' #Pylontech
uart7_baudrate: '9600' #EPEVER {RJ45-UART7}
# +--------------------------------------+
# | PVbrain2 packages |
# +--------------------------------------+
packages:
pvbrain2:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
- path: 'packages/board/board_ESP32-S3_DevKitC-1_PVbrain2.yaml'
# BUS
# - path: 'pvbrain2/base/device_bus_i2c0.yaml' # SX1509 and BME280/BMP280
- path: 'pvbrain2/base/device_bus_spi1.yaml' # MCP2515
- path: 'pvbrain2/base/device_bus_one_wire.yaml' # Dallas
# Devices
# - path: 'pvbrain2/base/device_uart_esp.yaml'
- path: 'pvbrain2/base/device_wk2168_spi.yaml'
# - path: 'pvbrain2/base/device_wk2168_i2c.yaml'
# - path: 'pvbrain2/base/device_sx1509.yaml'
- path: 'pvbrain2/base/device_canbus_esp32can.yaml' # canbus_node1
- path: 'pvbrain2/base/device_canbus_mcp2515.yaml' # canbus_node2
# +--------------------------------------+
# | YamBMS packages |
# +--------------------------------------+
# PLEASE READ : https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_main_YAML_HowTo.md
################ >>> CONFIG & CUSTOM LP <<< ################
# Local Packages intended for creating custom codes
# or sharing settings between several main.yaml
# yambms_config: !include yambms_config.yaml
# yambms_custom: !include yambms_custom.yaml
############################################################
# You don't have to import a shunt but you must import at least one BMS.
shunt:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
# Shunt 1
- path: 'packages/shunt/shunt_combine_Victron_SmartShunt_UART_expander.yaml' # shunt_combine_Junctek_KHF_UART.yaml
vars:
shunt_id: '1' # must be a number
shunt_name: 'Shunt 1'
shunt_uart_id: 'uart_${uart_hub_bus}_2'
bms:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
# BMS 1
- path: 'packages/bms/bms_combine_JK_UART_4G-GPS_full.yaml'
vars:
bms_id: '1' # must be a number
bms_name: 'JK-BMS 1'
bms_uart_id: 'uart_${uart_hub_bus}_4'
# Maximum cell charging cycles is used to calculate the battey SoH.
# MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
bms_cell_max_cycles: '6000.0'
# BMS 2
- path: 'packages/bms/bms_combine_JK_UART_4G-GPS_full.yaml'
vars:
bms_id: '2' # must be a number
bms_name: 'JK-BMS 2'
bms_uart_id: 'uart_${uart_hub_bus}_5'
# Maximum cell charging cycles is used to calculate the battey SoH.
# MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
bms_cell_max_cycles: '6000.0'
yambms:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
- path: 'packages/yambms/yambms.yaml'
canbus:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
- path: 'packages/yambms/yambms_canbus.yaml'
vars:
canbus_id: 'canbus1'
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_node1'
canbus_light_id: 'esp_light'
# The CANBUS link will be considered down if no response from the inverter (0x305 frame) for 5s
# The Deye inverter sends the ACK 0x305 only when it receives the 0x356 frame.
canbus_link_timer: '5s'
# +--------------------------------------+
# | DEBUG ( logger level must be DEBUG ) |
# +--------------------------------------+
debug:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
- path: packages/base/device_debug_ESP32.yaml
vars:
debug_name: 'Debug'
debug_update_interval: '5s'
@@ -1,5 +1,5 @@
# Updated : 2025.04.01
# Version : 1.5.4
# Updated : 2025.05.13
# Version : 1.5.5
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -17,23 +17,14 @@
# 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>.
# esp32:
# framework:
# type: esp-idf
# version: 4.4.8
# platform_version: 5.4.0
######################## YamBMS Remote Packages Version ########################
logger:
level: INFO # VERBOSE / DEBUG / INFO / WARN
# You can compile this YAML directly without the `packages` folder.
# The packages will be automatically downloaded from GitHub.
# Don't forget to configure your WiFi credentials in the secrets.yaml
ota:
platform: esphome
################################################################################
api:
reboot_timeout: 0s
# Don't forget to configure your WiFi credentials in the secrets.yaml file
#
# If needed, configure a static IP here
# wifi:
# manual_ip:
@@ -43,11 +34,42 @@ api:
# dns1: 8.8.8.8
# dns2: 8.8.4.4
logger:
level: INFO # VERBOSE / DEBUG / INFO / WARN
ota:
platform: esphome
# Please use the native `api` component instead of the `mqtt` section.
# If you use Home Assistant, the native API is more lightweight.
# If there is no HA server connected to this API, the ESP32 reboots every 15 minutes to try to resolve the problem.
# The "reboot_timeout: 0s" option will keep your ESP32 up and running even if you lose connection to your HA server.
api:
reboot_timeout: 0s
# If you don't want to use ESPHome's native API you can use MQTT instead.
# In this case don't forget to remove the 'api:' section.
# mqtt:
# broker: !secret mqtt_host
# username: !secret mqtt_username
# password: !secret mqtt_password
# id: mqtt_client
# Please note that enabling this component will take up a lot of memory and may decrease
# stability and be the cause of reboot depending on the capabilities of the board used.
# web_server:
# port: 80
# log: false
# ota: false
# +--------------------------------------+
# | Global Settings |
# +--------------------------------------+
substitutions:
name: yambms # ESP32 name / hostname
# Name
name: '' # Name that can be added as a second prefix after the friendly name, you can leave it blank.
hostname: 'yambms' # This is the name of the node. It should always be unique in your ESPHome network.
friendly_name : 'YamBMS' # Prefix added in front of all entity names and also to classify them.
# +--------------------------------------+
# | YamBMS Settings |
# +--------------------------------------+
@@ -75,8 +97,6 @@ substitutions:
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'
# Maximum charging cycles is used to calculate the battey SOH, LF280K v3 =8000.0, LF280K v2 =6000.0, LF280=3000.0 (decimal is required)
yambms_max_cycles: '6000.0'
# +--------------------------------------+
# | Shunt Settings |
# +--------------------------------------+
@@ -92,8 +112,19 @@ substitutions:
# +--------------------------------------+
# | Packages |
# +--------------------------------------+
# PLEASE READ : https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_main_YAML_HowTo.md
packages:
################ >>> CONFIG & CUSTOM LP <<< ################
# Local Packages intended for creating custom codes
# or sharing settings between several main.yaml
# yambms_config: !include yambms_config.yaml
# yambms_custom: !include yambms_custom.yaml
############### >>> UNCOMMENT YOUR BOARD <<< ###############
############### >>> ONLY ONE BOARD ! <<< ###############
@@ -102,36 +133,105 @@ packages:
ref: main
refresh: 0s
files:
- path: 'packages/board/board_ESP32_DevKit-V1.yaml'
- path: 'packages/board/board_ESP32_Generic.yaml'
# - path: 'packages/board/board_ESP32_DevKit-V1.yaml'
# - path: 'packages/board/board_ESP32_LilyGo-T-CAN485.yaml'
# - path: 'packages/board/board_ESP32_EVB.yaml'
# - path: 'packages/board/board_ESP32_Atom-Lite.yaml'
# - path: 'packages/board/board_ESP32-C3_DevKitM-1.yaml'
# - path: 'packages/board/board_ESP32-C3_ETH01-EVO.yaml'
# - path: 'packages/board/board_ESP32-S3_DevKitC-1.yaml'
# - path: 'packages/board/board_ESP32-S3_DevKitC-1_LED-38.yaml'
# - path: 'packages/board/board_ESP32-S3_DevKitC-1_LED-48.yaml'
# - path: 'packages/board/board_ESP32-S3_LilyGo-T-Connect.yaml'
# - path: 'packages/board/board_ESP32-S3_AtomS3-Lite.yaml'
# - path: 'packages/board/board_ESP32-S3_AtomS3.yaml'
# vars:
# display_auto_next_page_interval: '5s'
# display_rotation: '0' # 0/90/180/270 rotation angle in degrees
# - path: 'packages/board/board_ESP32-S3_AtomS3R.yaml'
# vars:
# display_auto_next_page_interval: '5s'
# display_rotation: '0' # 0/90/180/270 rotation angle in degrees
############################################################
########### >>> UNCOMMENT YOUR BOARD OPTIONS <<< ###########
board_options:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
# UART 1
- path: 'packages/board/board_options_itf_uart_esp_1.yaml'
# UART 2
- path: 'packages/board/board_options_itf_uart_esp_2.yaml'
# UART 3
- path: 'packages/board/board_options_itf_uart_esp_3.yaml'
# ESP32_CAN (TJA105x, SN65HVD230, M5Stack CAN base/unit)
- path: 'packages/board/board_options_itf_canbus_esp32_can.yaml'
vars:
canbus_node_id: 'canbus_inverter_1'
# MCP2515
# - path: 'packages/board/board_options_itf_canbus_mcp2515.yaml'
# vars:
# canbus_node_id: 'canbus_inverter_1'
############################################################
# You don't have to import a shunt but you must import at least one BMS.
shunt:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
# Shunt 1
- path: 'packages/shunt/shunt_combine_Victron_SmartShunt_UART.yaml' # shunt_combine_Junctek_KHF_UART.yaml
vars:
shunt_id: '1' # must be a number
shunt_name: 'Shunt 1'
shunt_uart_id: 'uart_esp_3'
bms:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
- path: 'packages/bms/bms_combine_JK-B_UART_full.yaml'
# BMS 1
- path: 'packages/bms/bms_combine_JK_UART_4G-GPS_full.yaml'
vars:
bms_id: '1' # must be a number
bms_name: 'JK-BMS 1'
bms_uart_id: 'uart_esp_1'
- path: 'packages/bms/bms_combine_JK-B_UART_full.yaml'
# Maximum cell charging cycles is used to calculate the battey SoH.
# MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
bms_cell_max_cycles: '6000.0'
# BMS 2
- path: 'packages/bms/bms_combine_JK_UART_4G-GPS_full.yaml'
vars:
bms_id: '2' # must be a number
bms_name: 'JK-BMS 2'
bms_uart_id: 'uart_esp_2'
# Maximum cell charging cycles is used to calculate the battey SoH.
# MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
bms_cell_max_cycles: '6000.0'
# bms_options:
# url: https://github.com/Sleeper85/esphome-yambms
# ref: main
# refresh: 0s
# files:
# # BMS 1
# - path: 'packages/bms/bms_options_charging_logic.yaml'
# vars:
# bms_id: '1' # must be a number
# # BMS 2
# - path: 'packages/bms/bms_options_charging_logic.yaml'
# vars:
# bms_id: '2' # must be a number
yambms:
url: https://github.com/Sleeper85/esphome-yambms
@@ -139,12 +239,8 @@ packages:
refresh: 0s
files:
- path: 'packages/yambms/yambms.yaml'
# - path: 'packages/yambms/yambms_custom.yaml'
# Custom Local YAML
# yambms_custom: !include yambms_custom.yaml
canbus1:
canbus:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
@@ -153,7 +249,7 @@ packages:
vars:
canbus_id: 'canbus1'
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_node1'
canbus_node_id: 'canbus_inverter_1'
canbus_light_id: 'esp_light'
# The CANBUS link will be considered down if no response from the inverter (0x305 frame) for 5s
# The Deye inverter sends the ACK 0x305 only when it receives the 0x356 frame.
@@ -0,0 +1,63 @@
# Updated : 2025.04.01
# Version : 1.5.5
# 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:
bms1: !include
file: packages/bms/bms_combine_JBD_UART_full.yaml
vars:
bms_id: '1' # must be a number
bms_name: 'BMS 1'
bms_uart_id: 'uart_esp_1'
bms_rx_timeout: '150ms'
# Required settings cannot be retrieved from BMS
# These values ​​must match your BMS settings
# LFP values example
bms_max_charge_current: '100' # A. Used to calculate maximum charge current
bms_max_discharge_current: '100' # A. Used to calculate maximum discharge current
bms_cell_ovp: '3.650' # V. Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V. Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V. Used by 'Auto CVL' functions
# Maximum cell charging cycles is used to calculate the battey SoH.
# MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
bms_cell_max_cycles: '6000.0'
bms2: !include
file: packages/bms/bms_combine_JBD_BLE_full.yaml
vars:
bms_id: '2' # must be a number
bms_name: 'BMS 2'
bms_ble_mac_address: 'C8:47:8C:10:7E:AA' # Your MAC address
# Required settings cannot be retrieved from BMS
# These values ​​must match your BMS settings
# LFP values example
bms_max_charge_current: '100' # A. Used to calculate maximum charge current
bms_max_discharge_current: '100' # A. Used to calculate maximum discharge current
bms_cell_ovp: '3.650' # V. Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V. Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V. Used by 'Auto CVL' functions
# Maximum cell charging cycles is used to calculate the battey SoH.
# MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
bms_cell_max_cycles: '6000.0'
@@ -0,0 +1,48 @@
# Updated : 2025.04.01
# Version : 1.5.5
# 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:
bms1: !include
file: packages/bms/bms_combine_JK_BLE_standard.yaml
vars:
bms_id: '1' # must be a number
bms_name: 'JK-BMS 1'
bms_ble_protocol_version: 'JK02_32S' # JK02_24S < hardware version 11.0 >= JK02_32S
bms_ble_mac_address: 'C8:47:8C:10:7E:AA'
# Maximum cell charging cycles is used to calculate the battey SoH.
# MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
bms_cell_max_cycles: '6000.0'
bms2: !include
file: packages/bms/bms_combine_JK_BLE_standard.yaml
vars:
bms_id: '2' # must be a number
bms_name: 'JK-BMS 2'
bms_ble_protocol_version: 'JK02_32S' # JK02_24S < hardware version 11.0 >= JK02_32S
bms_ble_mac_address: 'C8:47:8C:EE:16:EA'
# Maximum cell charging cycles is used to calculate the battey SoH.
# MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
bms_cell_max_cycles: '6000.0'
@@ -0,0 +1,125 @@
# Updated : 2025.04.01
# Version : 1.5.5
# 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:
# The sniffer represents the ESP node connected to the JK-BMS PB RS485 bus
# If address 0x00 is not detected on the RS485 bus, the sniffer will act directly as a master BMS (mode 2, max 15 BMS)
# sniffer1: !include
# file: packages/bms/bms_combine_JK_RS485_Modbus_sniffer_talk_pin.yaml
# vars:
# sniffer_id: 'sniffer1'
# sniffer_protocol: 'JK02_32S'
# sniffer_uart_id: 'uart_esp_1'
# sniffer_talk_pin: 8 # ESP32: 4, ESP32-S3: 8, ESP32-C3: 10
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_1'
# Mode2 : configure the DIP switches of your BMS from 0x01 to 0x0F (don't use the 0x00 address, maximum 15 BMS)
bms1: !include
file: packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.yaml
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '1' # must be a number
bms_name: 'JK-BMS 1'
bms_address: '0x01' # BMS 1 DIP switch
bms2: !include
file: packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.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 2 DIP switch
bms3: !include
file: packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.yaml
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '3' # must be a number
bms_name: 'JK-BMS 3'
bms_address: '0x03' # BMS 3 DIP switch
bms4: !include
file: packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.yaml
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '4' # must be a number
bms_name: 'JK-BMS 4'
bms_address: '0x04' # BMS 4 DIP switch
bms5: !include
file: packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.yaml
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '5' # must be a number
bms_name: 'JK-BMS 5'
bms_address: '0x05' # BMS 5 DIP switch
bms6: !include
file: packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.yaml
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '6' # must be a number
bms_name: 'JK-BMS 6'
bms_address: '0x06' # BMS 6 DIP switch
bms7: !include
file: packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.yaml
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '7' # must be a number
bms_name: 'JK-BMS 7'
bms_address: '0x07' # BMS 7 DIP switch
bms8: !include
file: packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.yaml
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '8' # must be a number
bms_name: 'JK-BMS 8'
bms_address: '0x08' # BMS 8 DIP switch
@@ -0,0 +1,46 @@
# Updated : 2025.04.01
# Version : 1.5.5
# 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:
bms1: !include
file: packages/bms/bms_combine_JK_UART_4G-GPS_full.yaml
vars:
bms_id: '1' # must be a number
bms_name: 'JK-BMS 1'
bms_uart_id: 'uart_esp_1'
# Maximum cell charging cycles is used to calculate the battey SoH.
# MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
bms_cell_max_cycles: '6000.0'
bms2: !include
file: packages/bms/bms_combine_JK_UART_4G-GPS_full.yaml
vars:
bms_id: '2' # must be a number
bms_name: 'JK-BMS 2'
bms_uart_id: 'uart_esp_2'
# Maximum cell charging cycles is used to calculate the battey SoH.
# MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
bms_cell_max_cycles: '6000.0'
@@ -0,0 +1,73 @@
# Updated : 2025.04.01
# Version : 1.5.5
# 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:
seplos_modbus1: !include
file: packages/bms/bms_combine_SEPLOS_V1_V2_RS485_modbus.yaml
vars:
seplos_modbus_id: 'seplos_modbus1'
seplos_modbus_uart_id: 'uart_esp_1'
seplos_modbus_baud_rate: '9600' # 9600 / 19200 ; please set the baudrate of your Seplos BMS model here
seplos_modbus_rx_timeout: '150ms'
bms1: !include
file: packages/bms/bms_combine_SEPLOS_V1_V2_RS485_bms_full.yaml
vars:
# Seplos modbus ID
seplos_modbus_id: 'seplos_modbus1'
# BMS vars
bms_id: '1' # must be a number
bms_name: 'BMS 1'
bms_address: '0x01' # BMS 1 DIP switch
bms_protocol_version: '0x20' # Known protocol versions: 0x20 (Seplos), 0x26 (Boqiang)
# Required settings cannot be retrieved from BMS
# These values ​​must match your BMS settings
# LFP values example
bms_max_charge_current: '100' # A. Used to calculate maximum charge current
bms_max_discharge_current: '100' # A. Used to calculate maximum discharge current
bms_cell_ovp: '3.650' # V. Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V. Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V. Used by 'Auto CVL' functions
bms2: !include
file: packages/bms/bms_combine_SEPLOS_V1_V2_RS485_bms_full.yaml
vars:
# Seplos modbus ID
seplos_modbus_id: 'seplos_modbus1'
# BMS vars
bms_id: '2' # must be a number
bms_name: 'BMS 2'
bms_address: '0x02' # BMS 2 DIP switch
bms_protocol_version: '0x20' # Known protocol versions: 0x20 (Seplos), 0x26 (Boqiang)
bms_uart_id: uart_esp_2
# Required settings cannot be retrieved from BMS
# These values ​​must match your BMS settings
# LFP values example
bms_max_charge_current: '100' # A. Used to calculate maximum charge current
bms_max_discharge_current: '100' # A. Used to calculate maximum discharge current
bms_cell_ovp: '3.650' # V. Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V. Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V. Used by 'Auto CVL' functions
@@ -0,0 +1,104 @@
# Updated : 2025.04.01
# Version : 1.5.5
# 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:
modbus_update_interval: '5s' # frequency with which BMS/Shunt modbus servers are queried
modbus_baud_rate: '19200' # 9600 / 19200 / 11520
modbus_command_throttle: '0ms' # minimum time in between 2 requests to the device
modbus_send_wait_time: '250ms' # time in milliseconds before the next ModBUS command is sent if an answer from a previous command is pending
packages:
modbus: !include
file: packages/base/device_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'
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'
@@ -0,0 +1,55 @@
# Updated : 2025.04.01
# Version : 1.5.5
# 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:
modbus_update_interval: '5s' # frequency with which BMS/Shunt modbus servers are queried
modbus_baud_rate: '19200' # 9600 / 19200 / 11520
modbus_command_throttle: '0ms' # minimum time in between 2 requests to the device
modbus_send_wait_time: '250ms' # time in milliseconds before the next ModBUS command is sent if an answer from a previous command is pending
packages:
modbus: !include
file: packages/base/device_modbus.yaml
vars:
modbus_role: 'server' # client / server
modbus_uart_id: 'uart_esp_1' # RS485 board
shunt1: !include
file: packages/shunt/shunt_modbus_Victron_SmartShunt_UART.yaml
vars:
shunt_id: '1' # must be a number
shunt_name: 'Shunt 1'
shunt_uart_id: 'uart_esp_2'
bms1: !include
file: packages/bms/bms_modbus_JK_UART_4G-GPS_full.yaml
vars:
bms_id: '1' # must be a number
bms_name: 'JK-BMS 1'
bms_uart_id: 'uart_esp_3'
# Maximum cell charging cycles is used to calculate the battey SoH.
# MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
bms_cell_max_cycles: '6000.0'
@@ -0,0 +1,60 @@
# Updated : 2025.04.01
# Version : 1.5.5
# 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:
modbus_update_interval: '5s' # frequency with which BMS/Shunt modbus servers are queried
modbus_baud_rate: '19200' # 9600 / 19200 / 11520
modbus_command_throttle: '0ms' # minimum time in between 2 requests to the device
modbus_send_wait_time: '250ms' # time in milliseconds before the next ModBUS command is sent if an answer from a previous command is pending
packages:
modbus: !include
file: packages/base/device_modbus.yaml
vars:
modbus_role: 'server' # client / server
modbus_uart_id: 'uart_esp_1' # RS485 board
bms2: !include
file: packages/bms/bms_modbus_JK_BLE_standard.yaml
vars:
bms_id: '2' # must be a number, also represents the modbus server number !
bms_name: 'JK-BMS 2'
bms_ble_protocol_version: JK02_32S # JK02_24S < hardware version 11.0 >= JK02_32S
bms_ble_mac_address: C8:47:8C:10:7E:AA
# Maximum cell charging cycles is used to calculate the battey SoH.
# MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
bms_cell_max_cycles: '6000.0'
bms3: !include
file: packages/bms/bms_modbus_JK_BLE_standard.yaml
vars:
bms_id: '3' # must be a number, also represents the modbus server number !
bms_name: 'JK-BMS 3'
bms_ble_protocol_version: JK02_32S # JK02_24S < hardware version 11.0 >= JK02_32S
bms_ble_mac_address: C8:47:8C:EE:16:EA
# Maximum cell charging cycles is used to calculate the battey SoH.
# MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
bms_cell_max_cycles: '6000.0'
@@ -0,0 +1,67 @@
# Updated : 2025.04.01
# Version : 1.5.5
# 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.
################################################################################
packages:
bms:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
# BMS 1
- path: 'packages/bms/bms_combine_JBD_UART_full.yaml'
vars:
bms_id: '1' # must be a number
bms_name: 'BMS 1'
bms_uart_id: 'uart_esp_1'
bms_rx_timeout: '150ms'
# Required settings cannot be retrieved from BMS
# These values ​​must match your BMS settings
# LFP values example
bms_max_charge_current: '100' # A. Used to calculate maximum charge current
bms_max_discharge_current: '100' # A. Used to calculate maximum discharge current
bms_cell_ovp: '3.650' # V. Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V. Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V. Used by 'Auto CVL' functions
# Maximum cell charging cycles is used to calculate the battey SoH.
# MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
bms_cell_max_cycles: '6000.0'
# BMS 2
- path: 'packages/bms/bms_combine_JBD_BLE_full.yaml'
vars:
bms_id: '2' # must be a number
bms_name: 'BMS 2'
bms_ble_mac_address: 'C8:47:8C:10:7E:AA' # Your MAC address
# Required settings cannot be retrieved from BMS
# These values ​​must match your BMS settings
# LFP values example
bms_max_charge_current: '100' # A. Used to calculate maximum charge current
bms_max_discharge_current: '100' # A. Used to calculate maximum discharge current
bms_cell_ovp: '3.650' # V. Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V. Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V. Used by 'Auto CVL' functions
# Maximum cell charging cycles is used to calculate the battey SoH.
# MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
bms_cell_max_cycles: '6000.0'
@@ -0,0 +1,52 @@
# Updated : 2025.04.01
# Version : 1.5.5
# 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.
################################################################################
packages:
bms:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
# BMS 1
- path: 'packages/bms/bms_combine_JK_BLE_standard.yaml'
vars:
bms_id: '1' # must be a number
bms_name: 'JK-BMS 1'
bms_ble_protocol_version: 'JK02_32S' # JK02_24S < hardware version 11.0 >= JK02_32S
bms_ble_mac_address: 'C8:47:8C:10:7E:AA'
# Maximum cell charging cycles is used to calculate the battey SoH.
# MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
bms_cell_max_cycles: '6000.0'
# BMS 2
- path: 'packages/bms/bms_combine_JK_BLE_standard.yaml'
vars:
bms_id: '2' # must be a number
bms_name: 'JK-BMS 2'
bms_ble_protocol_version: 'JK02_32S' # JK02_24S < hardware version 11.0 >= JK02_32S
bms_ble_mac_address: 'C8:47:8C:EE:16:EA'
# Maximum cell charging cycles is used to calculate the battey SoH.
# MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
bms_cell_max_cycles: '6000.0'
@@ -0,0 +1,113 @@
# Updated : 2025.04.01
# Version : 1.5.5
# 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.
################################################################################
packages:
# The sniffer represents the ESP node connected to the JK-BMS PB RS485 bus
# If address 0x00 is not detected on the RS485 bus, the sniffer will act directly as a master BMS (mode 2, max 15 BMS)
bms:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
# RS485 Sniffer
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_sniffer.yaml'
vars:
sniffer_id: 'sniffer1'
sniffer_protocol: 'JK02_32S'
sniffer_uart_id: 'uart_esp_1'
# BMS 1
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.yaml'
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '1' # must be a number
bms_name: 'JK-BMS 1'
bms_address: '0x01' # BMS 1 DIP switch
# BMS 2
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.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 2 DIP switch
# BMS 3
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.yaml'
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '3' # must be a number
bms_name: 'JK-BMS 3'
bms_address: '0x03' # BMS 3 DIP switch
# BMS 4
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.yaml'
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '4' # must be a number
bms_name: 'JK-BMS 4'
bms_address: '0x04' # BMS 4 DIP switch
# BMS 5
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.yaml'
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '5' # must be a number
bms_name: 'JK-BMS 5'
bms_address: '0x05' # BMS 5 DIP switch
# BMS 6
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.yaml'
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '6' # must be a number
bms_name: 'JK-BMS 6'
bms_address: '0x06' # BMS 6 DIP switch
# BMS 7
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.yaml'
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '7' # must be a number
bms_name: 'JK-BMS 7'
bms_address: '0x07' # BMS 7 DIP switch
# BMS 8
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.yaml'
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '8' # must be a number
bms_name: 'JK-BMS 8'
bms_address: '0x08' # BMS 8 DIP switch
@@ -0,0 +1,50 @@
# Updated : 2025.04.01
# Version : 1.5.5
# 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.
################################################################################
packages:
bms:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
# BMS 1
- path: 'packages/bms/bms_combine_JK_UART_4G-GPS_full.yaml'
vars:
bms_id: '1' # must be a number
bms_name: 'JK-BMS 1'
bms_uart_id: 'uart_esp_1'
# Maximum cell charging cycles is used to calculate the battey SoH.
# MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
bms_cell_max_cycles: '6000.0'
# BMS 2
- path: 'packages/bms/bms_combine_JK_UART_4G-GPS_full.yaml'
vars:
bms_id: '2' # must be a number
bms_name: 'JK-BMS 2'
bms_uart_id: 'uart_esp_2'
# Maximum cell charging cycles is used to calculate the battey SoH.
# MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
bms_cell_max_cycles: '6000.0'
@@ -0,0 +1,76 @@
# Updated : 2025.04.01
# Version : 1.5.5
# 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.
################################################################################
packages:
bms:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
# Seplos Modbus 1
- path: 'packages/bms/bms_combine_SEPLOS_V1_V2_RS485_modbus.yaml'
vars:
seplos_modbus_id: 'seplos_modbus1'
seplos_modbus_uart_id: 'uart_esp_1'
seplos_modbus_baud_rate: '9600' # 9600 / 19200 ; please set the baudrate of your Seplos BMS model here
seplos_modbus_rx_timeout: '150ms'
# BMS 1
- path: 'packages/bms/bms_combine_SEPLOS_V1_V2_RS485_bms_full.yaml'
vars:
# Seplos modbus ID
seplos_modbus_id: 'seplos_modbus1'
# BMS vars
bms_id: '1' # must be a number
bms_name: 'BMS 1'
bms_address: '0x01' # BMS 1 DIP switch
bms_protocol_version: '0x20' # Known protocol versions: 0x20 (Seplos), 0x26 (Boqiang)
# Required settings cannot be retrieved from BMS
# These values ​​must match your BMS settings
# LFP values example
bms_max_charge_current: '100' # A. Used to calculate maximum charge current
bms_max_discharge_current: '100' # A. Used to calculate maximum discharge current
bms_cell_ovp: '3.650' # V. Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V. Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V. Used by 'Auto CVL' functions
# BMS 2
- path: 'packages/bms/bms_combine_SEPLOS_V1_V2_RS485_bms_full.yaml'
vars:
# Seplos modbus ID
seplos_modbus_id: 'seplos_modbus1'
# BMS vars
bms_id: '2' # must be a number
bms_name: 'BMS 2'
bms_address: '0x02' # BMS 2 DIP switch
bms_protocol_version: '0x20' # Known protocol versions: 0x20 (Seplos), 0x26 (Boqiang)
bms_uart_id: uart_esp_2
# Required settings cannot be retrieved from BMS
# These values ​​must match your BMS settings
# LFP values example
bms_max_charge_current: '100' # A. Used to calculate maximum charge current
bms_max_discharge_current: '100' # A. Used to calculate maximum discharge current
bms_cell_ovp: '3.650' # V. Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V. Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V. Used by 'Auto CVL' functions
@@ -0,0 +1,98 @@
# Updated : 2025.04.01
# Version : 1.5.5
# 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:
modbus_update_interval: '5s' # frequency with which BMS/Shunt modbus servers are queried
modbus_baud_rate: '19200' # 9600 / 19200 / 11520
modbus_command_throttle: '0ms' # minimum time in between 2 requests to the device
modbus_send_wait_time: '250ms' # time in milliseconds before the next ModBUS command is sent if an answer from a previous command is pending
packages:
yambms_modbus_client:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
# Modbus client
- path: 'packages/base/device_modbus.yaml'
vars:
modbus_role: 'client' # client / server
modbus_uart_id: 'uart_esp_1' # RS485 board
# Shunt 1
- path: 'packages/shunt/shunt_combine_modbus_client.yaml'
vars:
shunt_id: '1' # must be a number
shunt_name: 'Shunt 1'
# BMS 1
- path: 'packages/bms/bms_combine_modbus_client.yaml'
vars:
bms_id: '1' # must be a number
bms_name: 'BMS 1'
# BMS 2
- path: 'packages/bms/bms_combine_modbus_client.yaml'
vars:
bms_id: '2' # must be a number
bms_name: 'BMS 2'
# BMS 3
- path: 'packages/bms/bms_combine_modbus_client.yaml'
vars:
bms_id: '3' # must be a number
bms_name: 'BMS 3'
# # BMS 4
# - path: 'packages/bms/bms_combine_modbus_client.yaml'
# vars:
# bms_id: '4' # must be a number
# bms_name: 'BMS 4'
# # BMS 5
# - path: 'packages/bms/bms_combine_modbus_client.yaml'
# vars:
# bms_id: '5' # must be a number
# bms_name: 'BMS 5'
# # BMS 6
# - path: 'packages/bms/bms_combine_modbus_client.yaml'
# vars:
# bms_id: '6' # must be a number
# bms_name: 'BMS 6'
# # BMS 7
# - path: 'packages/bms/bms_combine_modbus_client.yaml'
# vars:
# bms_id: '7' # must be a number
# bms_name: 'BMS 7'
# # BMS 8
# - path: 'packages/bms/bms_combine_modbus_client.yaml'
# vars:
# bms_id: '8' # must be a number
# bms_name: 'BMS 8'
# # BMS 9
# - path: 'packages/bms/bms_combine_modbus_client.yaml'
# vars:
# bms_id: '9' # must be a number
# bms_name: 'BMS 9'
# # BMS 10
# - path: 'packages/bms/bms_combine_modbus_client.yaml'
# vars:
# bms_id: '10' # must be a number
# bms_name: 'BMS 10'
@@ -0,0 +1,58 @@
# Updated : 2025.04.01
# Version : 1.5.5
# 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:
modbus_update_interval: '5s' # frequency with which BMS/Shunt modbus servers are queried
modbus_baud_rate: '19200' # 9600 / 19200 / 11520
modbus_command_throttle: '0ms' # minimum time in between 2 requests to the device
modbus_send_wait_time: '250ms' # time in milliseconds before the next ModBUS command is sent if an answer from a previous command is pending
packages:
yambms_modbus_server:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
# Modbus server
- path: 'packages/base/device_modbus.yaml'
vars:
modbus_role: 'server' # client / server
modbus_uart_id: 'uart_esp_1' # RS485 board
# Shunt 1
- path: 'packages/shunt/shunt_modbus_Victron_SmartShunt_UART.yaml'
vars:
shunt_id: '1' # must be a number
shunt_name: 'Shunt 1'
shunt_uart_id: 'uart_esp_2'
# BMS 1
- path: 'packages/bms/bms_modbus_JK_UART_4G-GPS_full.yaml'
vars:
bms_id: '1' # must be a number
bms_name: 'JK-BMS 1'
bms_uart_id: 'uart_esp_3'
# Maximum cell charging cycles is used to calculate the battey SoH.
# MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
bms_cell_max_cycles: '6000.0'
@@ -0,0 +1,63 @@
# Updated : 2025.04.01
# Version : 1.5.5
# 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:
modbus_update_interval: '5s' # frequency with which BMS/Shunt modbus servers are queried
modbus_baud_rate: '19200' # 9600 / 19200 / 11520
modbus_command_throttle: '0ms' # minimum time in between 2 requests to the device
modbus_send_wait_time: '250ms' # time in milliseconds before the next ModBUS command is sent if an answer from a previous command is pending
packages:
yambms_modbus_server:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
# Modbus server
- path: 'packages/base/device_modbus.yaml'
vars:
modbus_role: 'server' # client / server
modbus_uart_id: 'uart_esp_1' # RS485 board
# BMS 2
- path: 'packages/bms/bms_modbus_JK_BLE_standard.yaml'
vars:
bms_id: '2' # must be a number, also represents the modbus server number !
bms_name: 'JK-BMS 2'
bms_ble_protocol_version: JK02_32S # JK02_24S < hardware version 11.0 >= JK02_32S
bms_ble_mac_address: C8:47:8C:10:7E:AA
# Maximum cell charging cycles is used to calculate the battey SoH.
# MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
bms_cell_max_cycles: '6000.0'
# BMS 3
- path: 'packages/bms/bms_modbus_JK_BLE_standard.yaml'
vars:
bms_id: '3' # must be a number, also represents the modbus server number !
bms_name: 'JK-BMS 3'
bms_ble_protocol_version: JK02_32S # JK02_24S < hardware version 11.0 >= JK02_32S
bms_ble_mac_address: C8:47:8C:EE:16:EA
# Maximum cell charging cycles is used to calculate the battey SoH.
# MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
bms_cell_max_cycles: '6000.0'
@@ -1,4 +1,4 @@
# YamBMS - JK-B BMS UART Solution
# YamBMS - JK-B BMS
[![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)
@@ -6,9 +6,46 @@
![GitHub forks](https://img.shields.io/github/forks/Sleeper85/esphome-yambms)
![GitHub watchers](https://img.shields.io/github/watchers/Sleeper85/esphome-yambms)
## External component
> [!IMPORTANT]
> The most important thing for proper functioning of YamBMS is that **the voltage of your BMS is well calibrated**.
> YamBMS logic is based on the `min_cell_voltage` and `max_cell_voltage` voltages of your BMS.
[esphome-jk-bms](https://github.com/syssi/esphome-jk-bms) by [@syssi](https://github.com/syssi)
## JK-B BMS overview
### UART1 (GPS) port
The `GPS` port sometimes called `RS485` is not an `RS485` port but `3V3 UART-TTL` port.
```
# UART-TTL GPS port on JK-BMS (4 pin, JST 1.25mm pitch)
┌─── ─────── ────┐
│ │
│ O O O O │
│GND RX TX VBAT│
└────────────────┘
│ │ │ └ VBAT is full battery volatge eg. 56V (possible to use it via an isolated DC-DC converter)
│ │ └──── TX to TTL-isolator AI (input)
│ └──────── RX to TTL-isolator AO (output)
└──────────── GND to TTL-isolator GND
```
The `UART1` (labeled as `GPS`) socket of the BMS can be attached to any UART pins of the ESP32.<br>
A hardware UART should be preferred because of the high baudrate (115200 baud).<br>
The connector is called 4 pin JST with 1.25mm pitch.
![Image](../../images/JK-BMS_24S_GPS_port.png "JK-B BMS GPS port")
## JK-B BMS protocol
Historically it was not possible to change the protocol of the `UART1 (GPS)` port and the protocol used was `4G-GPS Remote module Common protocol V4.2` with the component [esphome-jk-bms](https://github.com/syssi/esphome-jk-bms) of [@syssi](https://github.com/syssi).
If you cannot change the protocol of the `UART1 (GPS)` port you can only monitor one BMS per UART port of the ESP32, so a maximum of `3x BMS` without adding a UART expander.
If you have a recent BMS, it is now possible to change the protocol of the `UART1 (GPS)` port and with the `JK BMS RS485 Modbus V1.0` protocol you can assign an address (via JK app) to your BMS and monitor several of them from a single `UART-RS485` connection in the same way as the [JK-PB](BMS_JK-PB.md). To use this protocol and monitor all your BMS on a single `RS485 bus` you will need to add the `UART to RS485 adapter` sold by JK or another RS485 board of your choice.
<img src="../../images/BMS_JK_RS485_Modbus_protocol.png" width="600">
![Image](../../images/BMS_JK_RS485_adapter.png "JK RS485 adapter")
## Schematic and setup instructions
@@ -32,8 +69,8 @@ You need to import this YAML into the main YAML.
```
UART-TTL RS232-TTL CAN BUS
┌──────────┐ ┌──────────┐ ┌────────────┐ ┌──────────┐
│ │<TX------RX>│2 5│<TX-------TX>| | | |
│ JK-BMS │<RX------TX>│1 6│<RX-------RX>| CA-IS3050G |<---CAN H --->| Inverter |
│ │<TX------RX>│1 5│<TX-------TX>| | | |
│ JK-BMS │<RX------TX>│2 6│<RX-------RX>| CA-IS3050G |<---CAN H --->| Inverter |
│ │<----GND--->│ ESP32 │ | CAN |<---CAN L --->| |
│ │ 5V---->│5V 3V3| | | | |
└──────────┘ └──────────┘ └────────────┘ └──────────┘
@@ -51,8 +88,8 @@ You need to import this YAML into the main YAML.
```
UART-TTL RS232-TTL CAN BUS
┌──────────┐ ┌──────────┐ ┌────────────┐ ┌──────────┐
│ │<TX------RX>│26 22│<TX-------TX>| | | |
│ JK-BMS │<RX------TX>│32 19│<RX-------RX>| CA-IS3050G |<---CAN H --->| Inverter |
│ │<TX------RX>│32 22│<TX-------TX>| | | |
│ JK-BMS │<RX------TX>│26 19│<RX-------RX>| CA-IS3050G |<---CAN H --->| Inverter |
│ │<----GND--->│ ESP32 │ | CAN |<---CAN L --->| |
│ │ 5V---->│5V 3V3| | | | |
└──────────┘ └──────────┘ └────────────┘ └──────────┘
@@ -105,25 +142,3 @@ You need to import this YAML into the main YAML.
```
### JK-B BMS UART-TTL GPS port
The `GPS` port sometimes called `RS485` is not an `RS485` port but `3V3 UART-TTL`.
```
# UART-TTL GPS port on JK-BMS (4 pin, JST 1.25mm pitch)
┌─── ─────── ────┐
│ │
│ O O O O │
│GND RX TX VBAT│
└────────────────┘
│ │ │ └ VBAT is full battery volatge eg 51.2V (possible to use it via an isolated DC-DC converter)
│ │ └──── TX to TTL-isolator AI (input)
│ └──────── RX to TTL-isolator AO (output)
└──────────── GND to TTL-isolator GND
```
The UART-TTL (labeled as `GPS`) socket of the BMS can be attached to any UART pins of the ESP.<br>
A hardware UART should be preferred because of the high baudrate (115200 baud).<br>
The connector is called 4 pin JST with 1.25mm pitch.
![Image](../../images/JK-BMS_24S_GPS_port.png "JK-B BMS GPS port")
@@ -1,4 +1,4 @@
# YamBMS - JK-PB BMS RS485 Solution
# YamBMS - JK-PB Inverter BMS
[![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)
@@ -6,11 +6,81 @@
![GitHub forks](https://img.shields.io/github/forks/Sleeper85/esphome-yambms)
![GitHub watchers](https://img.shields.io/github/watchers/Sleeper85/esphome-yambms)
## External component
> [!IMPORTANT]
> The most important thing for proper functioning of YamBMS is that **the voltage of your BMS is well calibrated**.
> YamBMS logic is based on the `min_cell_voltage` and `max_cell_voltage` voltages of your BMS.
> If you use YamBMS, the internal charging logic of the `JK-PB BMS` will not be used.
[JK_RS485](https://github.com/txubelaxu/esphome-jk-bms/blob/main/components/jk_rs485_bms/README.md) by [@txubelaxu](https://github.com/txubelaxu)
## JK-PB BMS overview
## Hardware
|![Image](../../images/BMS_JK-PB_Inverter_BMS.png)|
|-|
|![Image](../../images/BMS_JK-PB_communication_connectors.jpg)|
|![Image](../../images/BMS_JK-PB_communication_board.png)|
## JK-PB BMS protocol
The datas from this BMS can be retrieved from the `RS485-2 (UART2)` network using the component [JK_RS485](https://github.com/txubelaxu/esphome-jk-bms/blob/main/components/jk_rs485_bms/README.md) of [@txubelaxu](https://github.com/txubelaxu).
The BMS DIP switches must be set from `1` to `15` (server mode) and connected to each other using the `RS485-2` network available on the **two ports at the right ends**. `YamBMS` also connects to one of these two ports.
### **UART2 configuration**
> [!NOTE]
> The protocol of the `UART2` port is not selectable from the JK application.
> It is automatically set based on the address (DIP switch) of the BMS.
In the last software version only two protocols are available on the **RS485-2 (UART2)** ports:
- **001** - JK BMS RS485 Modbus V1.0 **(DIP switch 1 to 15)**
- **015** - UART Protocol 015 **(DIP switch 0)**
### **UART1 configuration**
The following protocols are supported on the **RS485-1 (UART1)** port:
(*italic options ane not settable*)
- **000** - 4G-GPS Remote module Common protocol V4.2
- **001** - **JK BMS RS485 Modbus V1.0**
- **002** - NIU U SERIES
- **003** - China tower shared battery cabinet V1.1
- **004** - PACE_RS485_Modbus_V1.3
- **005** - PYLON_low_voltage_Protocol_RS485_V3.5
- **006** - Growatt_BMS_RS485_Protocol_1xSxxP_ESS_Rev2.01
- **007** - Voltronic_Inverter_and_BMS_485_communication_protocol_20200...
- **008** - China tower shared battery cabinet V2.0
- **009** - WOW_RS485_Modbus_V1.3
- **010** - JK BMS LCD Protocol V2.0
- **011** - *UART1 User customization*
- **012** - *UART2 User customization*
- **013** - (9600)JK BMS RS485 Modbus V1.0
- **014** - (9600)PYLON_low_voltage_Protocol_RS485_V3.5
- **015** - *UART Protocol 015*
### **CAN port configuration**
The following CAN protocols are supported on the CAN port:
(*italic options ane not settable*)
- **000** - JK BMS CAN Protocol (250K) V2.0
- **001** - Deye Low-voltage hybrid inverter CAN communication protocol V1.0
- **002** - PYLON-Low-voltage-V1.2
- **003** - Growatt BMS CAN-Bus-protocol-low-voltage_Rev_05
- **004** - Victron_CANbus_BMS_protocol_20170717
- **005** - MEGAREVO_Hybird_BMSCAN_Protocol_V1.0
- **006** - JK BMS CAN Protocol (500K) V2.0
- **007** - INVT BMS CAN Bus protocol V1.02
- **008** - GoodWe LV BMS Protocol (EX/EM/S-BP/BP)
- **009** - FSS-ConnectingBat-Tl-en-10 | Version 1.0
- **010** - MUST PV1800F-CAN communication Protocol1.04.04
- **011** - LuxpowerTek Battery CAN protocol V01
- **012** - *CAN BUS User customization*
- **013** - *CAN BUS Protocol 013*
- **014** - *CAN BUS Protocol 014*
## YamBMS hardware
> [!TIP]
> This solution only requires an ESP32 with a CAN transceiver and a RS485 transceiver.
@@ -1,4 +1,4 @@
# YamBMS - JK-B BMS RS485 DISPLAY Solution
# YamBMS - JK RS485 DISPLAY
[![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)
@@ -6,6 +6,10 @@
![GitHub forks](https://img.shields.io/github/forks/Sleeper85/esphome-yambms)
![GitHub watchers](https://img.shields.io/github/watchers/Sleeper85/esphome-yambms)
> [!IMPORTANT]
> The most important thing for proper functioning of YamBMS is that **the voltage of your BMS is well calibrated**.
> YamBMS logic is based on the `min_cell_voltage` and `max_cell_voltage` voltages of your BMS.
## External component
[esphome-jk-bms](https://github.com/syssi/esphome-jk-bms) by [@syssi](https://github.com/syssi)
+18 -30
View File
@@ -10,7 +10,7 @@
### 1. Install ESPHome on your computer
Before you can flash your ESP32 you need to install the [ESPHome 2024.6.0 or higher](https://github.com/esphome/esphome/releases) command line application.<br>
Before you can flash your ESP32 you need to install the [ESPHome 2025.3.0 or higher](https://github.com/esphome/esphome/releases) command line application.<br>
[Follow these instructions for installation on Windows, Mac or Linux.](https://esphome.io/guides/installing_esphome)
> [!TIP]
@@ -24,6 +24,9 @@ pip3 install esphome
### 2. Download all YAML files to your computer
> [!TIP]
> This step is not necessary if you are compiling the `Remote Packages` version of the YAML.
You can do this from the command line or in your preferred method.
You need to gather the following three points in the same folder. If you are compiling from your HA server use the `Samba Share` add-on so that you can copy the `packages` folder to the `esphome` folder on the HA server.
@@ -48,23 +51,17 @@ domain : .local
### 4. Install the YamBMS application into your ESP32
Choose the main YAML that best suits your needs like for example `multi-bms_JK-ALL_BLE.yaml`.<br>
Validate the configuration, create a binary, upload it, and start logs.<br>
**The only YAML that needs to be checked and configured is the main one like for example `multi-bms_JK-ALL_BLE.yaml` but you can modify other YAMLs if you want.<br>
The goal is that the main YAML which contains all your specific parameters can be preserved and reused each time the other YAMLs classified in the `packaged` folder are updated.**
Create a copy of `YamBMS_Remote_Packages_example.yaml` and modify it to match your configuration.
Examples of BMS imports can be found in the [configuration_examples](configuration_examples/) folder.
You can mix different BMS models, the only condition is that they are numbered in order starting from `1`.
```bash
# To install the multi-bms JK-ALL Bluetooth version
esphome run multi-bms_JK-ALL_BLE.yaml
# To install the multi-bms JK-B UART version
esphome run multi-bms_JK-B_UART.yaml
# To install the multi-bms JK-PB RS485 version
esphome run multi-bms_JK-PB_RS485_mode2.yaml
# install your YamBMS.yaml
# validate the configuration, create a binary, upload it, and start logs.
esphome run YamBMS.yaml
# upgrade via OTA by specifying the IP address of the ESP32
esphome run multi-bms_JK-ALL_BLE.yaml --device 192.168.x.x
esphome run YamBMS.yaml --device 192.168.x.x
```
### 5. Optional but recommended, add the ESP32 in your Home Assistant server
@@ -75,35 +72,26 @@ In Home Assistant under **" Settings > Devices and services > Add Intergration "
```bash
# clean files before compiling again
esphome clean multi-bms_JK-ALL_BLE.yaml
esphome clean YamBMS.yaml
# test the config
esphome config multi-bms_JK-ALL_BLE.yaml
esphome config YamBMS.yaml
# install the config in ESP32
esphome run multi-bms_JK-ALL_BLE.yaml
esphome run YamBMS.yaml
# compile the firmware.bin
esphome compile multi-bms_JK-ALL_BLE.yaml
esphome compile YamBMS.yaml
# check the logs (the --device option is not required)
esphome logs multi-bms_JK-ALL_BLE.yaml --device 192.168.x.x
esphome logs YamBMS.yaml --device 192.168.x.x
```
## Debugging
If this component doesn't work out of the box for your device please update your configuration to enable the debug output of the UART component and increase the log level to the see outgoing and incoming serial traffic:
If this component doesn't work out of the box for your device please update your configuration to increase the log level to `DEBUG`.
```
```YAML
logger:
level: DEBUG
uart:
id: uart_0
baud_rate: 115200
rx_buffer_size: 384
tx_pin: ${tx_pin}
rx_pin: ${rx_pin}
debug:
direction: BOTH
```
@@ -9,7 +9,7 @@
## Contents
1) [Galvanic isolation](Galvanic_isolation.md)
2) [JK-B BMS UART (GPS port) solution](BMS_JK-B_UART_solution.md)
3) [JK-B BMS RS485 (Display port) solution](BMS_JK-B_RS485_DISPLAY_solution.md)
4) [JK-PB BMS RS485 solution](BMS_JK-PB_RS485_solution.md)
5) [Victron SmartShunt How To](Shunt_Victron_SmartShunt_HowTo.md)
2) [JK-B BMS](BMS_JK-B.md)
3) [JK-PB BMS](BMS_JK-PB.md)
4) [JK RS485 DISPLAY](BMS_JK_RS485_DISPLAY.md)
5) [Victron SmartShunt](Shunt_Victron_SmartShunt.md)
@@ -1,4 +1,4 @@
# Victron SmartShunt How To
# Victron SmartShunt
[![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)
@@ -44,6 +44,9 @@ To connect to your Victron device with BLE component you must have two informati
Use [VictronConnect App v5.93](https://www.victronenergy.com/live/victronconnect:beta) (or later) released on 2023-08-25.
Connect to the SmartShunt via Bluetooth under the `Local` tab.
![VictronConnect App Local page](../../images/Victron_SmartShunt_App_00_Local.jpg)
![VictronConnect App Settings page](../../images/Victron_SmartShunt_App_01_Settings.png)
![VictronConnect App Product info page](../../images/Victron_SmartShunt_App_02_ProductInfo.png)
![VictronConnect App Instant readout encryption data](../../images/Victron_SmartShunt_App_03_EncryptionData.png)
+1 -1
View File
@@ -41,7 +41,7 @@ Combine condition :
1) BMS `Online Status` is `ON / Connected` (to detect a loss of connection with the BMS e.g. cable, BMS OFF or dead)
2) The BMS `Battery Capacity` is `> 0` (to ensure that the data received is correct)
If one of these three conditions is not met, the BMS is automatically uncombined.
If one of these two conditions is not met, the BMS is automatically uncombined.
> [!IMPORTANT]
> In RS485 modbus `multi-node`, if a server does not respond (cable or hardware failure) the `Online Status` of the BMS will be set to `OFF` and it will be uncombined.
+41 -35
View File
@@ -1,4 +1,4 @@
# YamBMS - How to create your YamBMS YAML
# YamBMS - How to create your YamBMS YAML (Local Packages examples)
[![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)
@@ -6,6 +6,11 @@
![GitHub forks](https://img.shields.io/github/forks/Sleeper85/esphome-yambms)
![GitHub watchers](https://img.shields.io/github/watchers/Sleeper85/esphome-yambms)
> [!TIP]
> Not sure which YAML to choose ? ... `YamBMS_Remote_Packages_example.yaml` is a good basis for creating your custom YAML.
> Examples of BMS imports can be found in the [configuration_examples](configuration_examples/) folder.
> You can mix different BMS models, the only condition is that they are numbered in order starting from `1`.
> [!IMPORTANT]
> BMS monitoring with `Bluetooth` as well as the `Web server` are RAM-intensive components.
> Please note that enabling these components will take up a lot of memory and may decrease the stability of your ESP32.
@@ -154,9 +159,6 @@ This board has an `Ethernet` port and can be powered from `POE` (optional).
## YamBMS single-node example
```YAML
# Config : this YAML contains the settings shared between all ESP32s
config_yambms: !include packages/config/config_yambms.yaml
shunt1: !include
file: packages/shunt/shunt_combine_Victron_SmartShunt_UART.yaml
vars:
@@ -166,7 +168,7 @@ This board has an `Ethernet` port and can be powered from `POE` (optional).
# ...
bms1: !include
file: packages/bms/bms_combine_JK-B_UART_full.yaml
file: packages/bms/bms_combine_JK_UART_4G-GPS_full.yaml
vars:
bms_id: '1' # must be a number
bms_name: 'BMS 1'
@@ -190,10 +192,6 @@ This board has an `Ethernet` port and can be powered from `POE` (optional).
### YamBMS modbus client `node1`
```YAML
# Config : this YAMLs contains the settings shared between all ESP32s
config_yambms: !include packages/config/config_yambms.yaml
config_multinode_modbus: !include packages/config/config_multi-node_modbus.yaml
modbus: !include
file: packages/base/device_modbus.yaml
vars:
@@ -228,10 +226,6 @@ This board has an `Ethernet` port and can be powered from `POE` (optional).
### ESP32 modbus server `node2`
```YAML
# Config : this YAMLs contains the settings shared between all ESP32s
config_yambms: !include packages/config/config_yambms.yaml
config_multinode_modbus: !include packages/config/config_multi-node_modbus.yaml
modbus: !include
file: packages/base/device_modbus.yaml
vars:
@@ -247,7 +241,7 @@ This board has an `Ethernet` port and can be powered from `POE` (optional).
# ...
bms1: !include
file: packages/bms/bms_modbus_JK-B_UART_full.yaml
file: packages/bms/bms_modbus_JK_UART_4G-GPS_full.yaml
vars:
bms_id: '1' # must be a number, also represents the modbus server number !
bms_name: 'BMS 1'
@@ -258,10 +252,6 @@ This board has an `Ethernet` port and can be powered from `POE` (optional).
### ESP32 modbus server `node3`
```YAML
# Config : this YAMLs contains the settings shared between all ESP32s
config_yambms: !include packages/config/config_yambms.yaml
config_multinode_modbus: !include packages/config/config_multi-node_modbus.yaml
modbus: !include
file: packages/base/device_modbus.yaml
vars:
@@ -269,7 +259,7 @@ This board has an `Ethernet` port and can be powered from `POE` (optional).
modbus_uart_id: 'uart_esp_1' # RS485 board
bms2: !include
file: packages/bms/bms_modbus_JK-ALL_BLE_standard.yaml
file: packages/bms/bms_modbus_JK_BLE_standard.yaml
vars:
bms_id: '2' # must be a number, also represents the modbus server number !
bms_name: 'BMS 2'
@@ -277,7 +267,7 @@ This board has an `Ethernet` port and can be powered from `POE` (optional).
# ...
bms3: !include
file: packages/bms/bms_modbus_JK-ALL_BLE_standard.yaml
file: packages/bms/bms_modbus_JK_BLE_standard.yaml
vars:
bms_id: '3' # must be a number, also represents the modbus server number !
bms_name: 'BMS 3'
@@ -299,7 +289,7 @@ There are other `bms.yaml` not mentioned here, see in the [bms](../../packages/b
The `full` / `standard` versions contain all available sensors while the `minimal` version contains the basic sensors without the voltages of each cell and other superfluous sensors.
### [JK-ALL (BLE)](https://github.com/syssi/esphome-jk-bms)
### [JK-BMS (BLE)](https://github.com/syssi/esphome-jk-bms)
> [!IMPORTANT]
> The BLE software stack on the ESP32 consumes a significant amount of RAM on the device.
@@ -308,28 +298,34 @@ The `full` / `standard` versions contain all available sensors while the `minima
```YAML
bms1: !include
file: packages/bms/bms_combine_JK-ALL_BLE_standard.yaml # bms_modbus_JK-ALL_BLE_standard.yaml
file: packages/bms/bms_combine_JK_BLE_standard.yaml # bms_modbus_JK_BLE_standard.yaml
vars:
bms_id: '1' # must be a number
bms_name: 'BMS 1'
bms_ble_protocol_version: 'JK02_32S' # JK02_24S < hardware version 11.0 >= JK02_32S
bms_ble_mac_address: 'C8:47:8C:10:7E:AA' # Your MAC address
# Maximum cell charging cycles is used to calculate the battey SoH.
# MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
bms_cell_max_cycles: '6000.0'
```
### [JK-B (UART)](https://github.com/syssi/esphome-jk-bms)
### [JK-BMS (UART 4G-GPS)](https://github.com/syssi/esphome-jk-bms)
[How to make the UART connection with the ESP32.](BMS_JK-B_UART_solution.md)
```YAML
bms1: !include
file: packages/bms/bms_combine_JK-B_UART_full.yaml # bms_modbus_JK-B_UART_full.yaml
file: packages/bms/bms_combine_JK_UART_4G-GPS_full.yaml # bms_modbus_JK_UART_4G-GPS_full.yaml
vars:
bms_id: '1' # must be a number
bms_name: 'BMS 1'
bms_uart_id: 'uart_esp_1'
# Maximum cell charging cycles is used to calculate the battey SoH.
# MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
bms_cell_max_cycles: '6000.0'
```
### [JK-B (RS485 DISPLAY)](https://github.com/syssi/esphome-jk-bms)
### [JK-BMS (RS485 DISPLAY)](https://github.com/syssi/esphome-jk-bms)
> [!CAUTION]
> The `jk_bms_display` component does not provide all the information needed for an optimal operation of `YamBMS`.
@@ -340,7 +336,7 @@ The `full` / `standard` versions contain all available sensors while the `minima
```YAML
bms1: !include
file: packages/bms/bms_combine_JK-B_RS485_DISPLAY_full.yaml
file: packages/bms/bms_combine_JK_RS485_DISPLAY_full.yaml
vars:
bms_id: '1' # must be a number
bms_name: 'BMS 1'
@@ -353,15 +349,21 @@ The `full` / `standard` versions contain all available sensors while the `minima
bms_max_discharge_current: '100' # A. Used to calculate maximum discharge current
bms_cell_ovp: '3.650' # V. Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V. Used by 'Auto DCL' functions and to calculate maximum discharge voltage
# Maximum cell charging cycles is used to calculate the battey SoH.
# MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
bms_cell_max_cycles: '6000.0'
```
### [JK-PB (RS485)](https://github.com/txubelaxu/esphome-jk-bms/)
### [JK-BMS (RS485 Modbus)](https://github.com/txubelaxu/esphome-jk-bms/)
> [!TIP]
> Compatible with JK-PB, JK-B HW. >= 11A
A single `RS485 bus` allows you to monitor up to `16` BMS.
[How to make the RS485 connection with the ESP32.](BMS_JK-PB_RS485_solution.md)
#### JK-PB sniffer
#### JK sniffer
> [!IMPORTANT]
> You need to import only one `sniffer` package of your choice.
@@ -374,7 +376,7 @@ Sniffer without `talk_pin` :
```YAML
sniffer1: !include
file: packages/bms/bms_combine_JK-PB_RS485_sniffer.yaml
file: packages/bms/bms_combine_JK_RS485_Modbus_sniffer.yaml
vars:
sniffer_id: 'sniffer1'
sniffer_protocol: 'JK02_32S'
@@ -385,7 +387,7 @@ If your `RS485` board requires a `talk_pin` you must specify which `GPIO` will b
```YAML
sniffer1: !include
file: packages/bms/bms_combine_JK-PB_RS485_sniffer_talk_pin.yaml
file: packages/bms/bms_combine_JK_RS485_Modbus_sniffer_talk_pin.yaml
vars:
sniffer_id: 'sniffer1'
sniffer_protocol: 'JK02_32S'
@@ -393,12 +395,12 @@ If your `RS485` board requires a `talk_pin` you must specify which `GPIO` will b
sniffer_talk_pin: 8 # ESP32: 4, ESP32-S3: 8, ESP32-C3: 10
```
#### JK-PB BMS
#### JK-BMS (JK-PB, JK-B HW. >= 11A)
```YAML
# Mode2 : configure the DIP switches of your BMS from 0x01 to 0x0F (don't use the 0x00 address, maximum 15 BMS)
bms1: !include
file: packages/bms/bms_combine_JK-PB_RS485_bms_full.yaml
file: packages/bms/bms_combine_JK_RS485_Modbus_bms_full.yaml
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
@@ -426,6 +428,9 @@ If your `RS485` board requires a `talk_pin` you must specify which `GPIO` will b
bms_cell_ovp: '3.650' # V. Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V. Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V. Used by 'Auto CVL' functions
# Maximum cell charging cycles is used to calculate the battey SoH.
# MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
bms_cell_max_cycles: '6000.0'
```
### [JBD (BLE)](https://github.com/syssi/esphome-jbd-bms)
@@ -445,6 +450,9 @@ If your `RS485` board requires a `talk_pin` you must specify which `GPIO` will b
bms_cell_ovp: '3.650' # V. Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V. Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V. Used by 'Auto CVL' functions
# Maximum cell charging cycles is used to calculate the battey SoH.
# MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
bms_cell_max_cycles: '6000.0'
```
### [Seplos V1/V2 (RS485)](https://github.com/syssi/esphome-seplos-bms)
@@ -585,8 +593,6 @@ Take the time to configure `YamBMS` correctly according to your battery chemistr
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'
# Maximum charging cycles is used to calculate the battey SOH, LF280K v3 =8000.0, LF280K v2 =6000.0, LF280=3000.0 (decimal is required)
yambms_max_cycles: '6000.0'
```
## CAN bus
@@ -606,7 +612,7 @@ You can keep the default configuration.
# CANBUS vars
canbus_id: 'canbus1'
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_node1'
canbus_node_id: 'canbus_inverter_1'
canbus_light_id: 'esp_light'
# The CANBUS link will be considered down if no response from the inverter (ID 0x305) for 5s
# The Deye inverter sends the ACK (can_id 0x305) only when it receives the can_id 0x356
Binary file not shown.

After

Width:  |  Height:  |  Size: 587 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 176 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 527 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

-176
View File
@@ -1,176 +0,0 @@
# Updated : 2025.01.28
# Version : 1.5.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>.
substitutions:
name: yambms
# Don't forget to configure your WiFi credentials in the secrets.yaml file
#
# If needed, configure a static IP here
# wifi:
# manual_ip:
# static_ip: 192.168.0.85
# gateway: 192.168.0.1
# subnet: 255.255.255.0
# dns1: 8.8.8.8
# dns2: 8.8.4.4
logger:
level: INFO # DEBUG / INFO / WARN
ota:
platform: esphome
# Please use the native `api` component instead of the `mqtt` section.
# If you use Home Assistant, the native API is more lightweight.
# If there is no HA server connected to this API, the ESP32 reboots every 15 minutes to try to resolve the problem.
# The "reboot_timeout: 0s" option will keep your ESP32 up and running even if you lose connection to your HA server.
api:
reboot_timeout: 0s
# If you don't want to use ESPHome's native API you can use MQTT instead.
# In this case don't forget to remove the 'api:' section.
# mqtt:
# broker: !secret mqtt_host
# username: !secret mqtt_username
# password: !secret mqtt_password
# id: mqtt_client
# Please note that enabling this component will take up a lot of memory and may decrease
# stability and be the cause of reboot depending on the capabilities of the board used.
#web_server:
# port: 80
# log: false
# ota: false
# +--------------------------------------+
# | Packages |
# +--------------------------------------+
# PLEASE READ : https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_main_YAML_HowTo.md
packages:
############### >>> UNCOMMENT YOUR BOARD <<< ###############
# This list is incomplete, other board.yaml are available in the board folder
device_board: !include packages/board/board_ESP32_Generic.yaml
# device_board: !include packages/board/board_ESP32_DevKit-V1.yaml
# device_board: !include packages/board/board_ESP32_LilyGo-T-CAN485.yaml
# device_board: !include packages/board/board_ESP32-C3_ETH01-EVO.yaml
# device_board: !include packages/board/board_ESP32-S3_DevKitC-1.yaml
# device_board: !include packages/board/board_ESP32-S3_LilyGo-T-Connect.yaml
# device_board: !include packages/board/board_ESP32-S3_AtomS3-Lite.yaml
# device_board: !include
# file: packages/board/board_ESP32-S3_AtomS3.yaml # board_ESP32-S3_AtomS3R.yaml
# vars:
# display_auto_next_page_interval: '5s'
############################################################
# Config : this YAML contains the settings shared between all ESP32s
config_yambms: !include packages/config/config_yambms.yaml
# shunt1: !include
# file: packages/shunt/shunt_combine_Victron_SmartShunt_UART.yaml # shunt_combine_Junctek_KHF_UART.yaml
# vars:
# shunt_id: '1' # must be a number
# shunt_name: 'Shunt 1'
# shunt_uart_id: uart_esp_0
bms1: !include
file: packages/bms/bms_combine_JBD_UART_full.yaml
vars:
bms_id: '1' # must be a number
bms_name: 'BMS 1'
bms_uart_id: 'uart_esp_1'
bms_rx_timeout: '150ms'
# Required settings cannot be retrieved from BMS
# These values ​​must match your BMS settings
# LFP values example
bms_max_charge_current: '100' # A. Used to calculate maximum charge current
bms_max_discharge_current: '100' # A. Used to calculate maximum discharge current
bms_cell_ovp: '3.650' # V. Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V. Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V. Used by 'Auto CVL' functions
bms2: !include
file: packages/bms/bms_combine_JBD_BLE_full.yaml
vars:
bms_id: '2' # must be a number
bms_name: 'BMS 2'
bms_ble_mac_address: 'C8:47:8C:10:7E:AA' # Your MAC address
# Required settings cannot be retrieved from BMS
# These values ​​must match your BMS settings
# LFP values example
bms_max_charge_current: '100' # A. Used to calculate maximum charge current
bms_max_discharge_current: '100' # A. Used to calculate maximum discharge current
bms_cell_ovp: '3.650' # V. Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V. Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V. Used by 'Auto CVL' functions
yambms1: !include
file: packages/yambms/yambms.yaml
vars:
# Please read the cut-off charging logic README to understand how the YamBMS works
yambms_update_interval: '1s'
# Input numbers can be displayed as a slider or an input box, options are 'slider' or 'box'.
yambms_input_number_mode: 'slider'
# Please check and fill in the options below correctly according to your battery chemistry and number of cells in series.
# These parameters are important and used for charging logic.
# Battery Chemistry
yambms_battery_chemistry: '1' # 1-LFP | 2-Li-ion | 3-LTO
# Number of cells in series
yambms_cell_count: '16'
# Bulk / Absorption Voltage : corresponds to the Bulk voltage that will be used to charge the battery. (LFP : 55.2V = 3.45V/Cell for 16S battery)
yambms_bulk_v: '55.2'
# Float Voltage : corresponds to the voltage at which the battery would be maintained at the end of charge. (LFP : 53.6V = 3.35V/Cell for 16S battery)
yambms_float_v: '53.6'
# Rebulk voltage, voltage from which a new Bulk charge can start. (LFP : 52.8V = 3.3V/Cell for 16S battery)
yambms_rebulk_v: '52.8'
# Maximum time in minutes that the cut-off step can last before charging is complete
# If your cells are properly balanced this step ends at the fastest after the `cut-off timer`
# This timer can be deactivated with a switch
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '60'
# Maximum charging cycles is used to calculate the battey SOH, LF280K v3 =8000.0, LF280K v2 =6000.0, LF280=3000.0 (decimal is required)
yambms_max_cycles: '6000.0'
canbus1: !include
file: packages/yambms/yambms_canbus.yaml
vars:
canbus_id: 'canbus1'
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_node1'
canbus_light_id: 'esp_light'
# The CANBUS link will be considered down if no response from the inverter (ID 0x305) for 5s
# The Deye inverter sends the ACK (can_id 0x305) only when it receives the can_id 0x356
canbus_link_timer: '5s'
# +--------------------------------------+
# | DEBUG ( logger level must be DEBUG ) |
# +--------------------------------------+
device_debug: !include
file: packages/base/device_debug_ESP32.yaml
vars:
debug_name: 'Debug'
debug_update_interval: '5s'
-169
View File
@@ -1,169 +0,0 @@
# Updated : 2025.01.16
# Version : 1.5.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>.
substitutions:
name: yambms
# Don't forget to configure your WiFi credentials in the secrets.yaml file
#
# If needed, configure a static IP here
# wifi:
# manual_ip:
# static_ip: 192.168.0.85
# gateway: 192.168.0.1
# subnet: 255.255.255.0
# dns1: 8.8.8.8
# dns2: 8.8.4.4
logger:
level: DEBUG # DEBUG / INFO / WARN
logs:
esp32_ble_tracker: INFO
esp32_ble_client: INFO
ota:
platform: esphome
# Please use the native `api` component instead of the `mqtt` section.
# If you use Home Assistant, the native API is more lightweight.
# If there is no HA server connected to this API, the ESP32 reboots every 15 minutes to try to resolve the problem.
# The "reboot_timeout: 0s" option will keep your ESP32 up and running even if you lose connection to your HA server.
api:
reboot_timeout: 0s
# If you don't want to use ESPHome's native API you can use MQTT instead.
# In this case don't forget to remove the 'api:' section.
# mqtt:
# broker: !secret mqtt_host
# username: !secret mqtt_username
# password: !secret mqtt_password
# id: mqtt_client
# Please note that enabling this component will take up a lot of memory and may decrease
# stability and be the cause of reboot depending on the capabilities of the board used.
#web_server:
# port: 80
# log: false
# ota: false
# +--------------------------------------+
# | Packages |
# +--------------------------------------+
# PLEASE READ : https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_main_YAML_HowTo.md
# Max 3 BLE connections.
# The BLE software stack (Bluedroid) on the ESP32 consumes a significant amount of RAM on the device.
# Crashes are likely to occur if you include too many additional components in your device’s configuration.
# https://esphome.io/components/ble_client.html
packages:
############### >>> UNCOMMENT YOUR BOARD <<< ###############
# This list is incomplete, other board.yaml are available in the board folder
device_board: !include packages/board/board_ESP32_Generic.yaml
# device_board: !include packages/board/board_ESP32_DevKit-V1.yaml
# device_board: !include packages/board/board_ESP32_LilyGo-T-CAN485.yaml
# device_board: !include packages/board/board_ESP32-C3_ETH01-EVO.yaml
# device_board: !include packages/board/board_ESP32-S3_DevKitC-1.yaml
# device_board: !include packages/board/board_ESP32-S3_LilyGo-T-Connect.yaml
# device_board: !include packages/board/board_ESP32-S3_AtomS3-Lite.yaml
# device_board: !include
# file: packages/board/board_ESP32-S3_AtomS3.yaml # board_ESP32-S3_AtomS3R.yaml
# vars:
# display_auto_next_page_interval: '5s'
############################################################
# Config : this YAML contains the settings shared between all ESP32s
config_yambms: !include packages/config/config_yambms.yaml
# shunt1: !include
# file: packages/shunt/shunt_combine_Victron_SmartShunt_UART.yaml # shunt_combine_Junctek_KHF_UART.yaml
# vars:
# shunt_id: '1' # must be a number
# shunt_name: 'Shunt 1'
# shunt_uart_id: uart_esp_0
bms1: !include
file: packages/bms/bms_combine_JK-ALL_BLE_standard.yaml
vars:
bms_id: '1' # must be a number
bms_name: 'JK-BMS 1'
bms_ble_protocol_version: 'JK02_32S' # JK02_24S < hardware version 11.0 >= JK02_32S
bms_ble_mac_address: 'C8:47:8C:10:7E:AA'
bms2: !include
file: packages/bms/bms_combine_JK-ALL_BLE_standard.yaml
vars:
bms_id: '2' # must be a number
bms_name: 'JK-BMS 2'
bms_ble_protocol_version: 'JK02_32S' # JK02_24S < hardware version 11.0 >= JK02_32S
bms_ble_mac_address: 'C8:47:8C:EE:16:EA'
yambms1: !include
file: packages/yambms/yambms.yaml
vars:
# Please read the cut-off charging logic README to understand how the YamBMS works
yambms_update_interval: '1s'
# Input numbers can be displayed as a slider or an input box, options are 'slider' or 'box'.
yambms_input_number_mode: 'slider'
# Please check and fill in the options below correctly according to your battery chemistry and number of cells in series.
# These parameters are important and used for charging logic.
# Battery Chemistry
yambms_battery_chemistry: '1' # 1-LFP | 2-Li-ion | 3-LTO
# Number of cells in series
yambms_cell_count: '16'
# Bulk / Absorption Voltage : corresponds to the Bulk voltage that will be used to charge the battery. (LFP : 55.2V = 3.45V/Cell for 16S battery)
yambms_bulk_v: '55.2'
# Float Voltage : corresponds to the voltage at which the battery would be maintained at the end of charge. (LFP : 53.6V = 3.35V/Cell for 16S battery)
yambms_float_v: '53.6'
# Rebulk voltage, voltage from which a new Bulk charge can start. (LFP : 52.8V = 3.3V/Cell for 16S battery)
yambms_rebulk_v: '52.8'
# Maximum time in minutes that the cut-off step can last before charging is complete
# If your cells are properly balanced this step ends at the fastest after the `cut-off timer`
# This timer can be deactivated with a switch
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '60'
# Maximum charging cycles is used to calculate the battey SOH, LF280K v3 =8000.0, LF280K v2 =6000.0, LF280=3000.0 (decimal is required)
yambms_max_cycles: '6000.0'
canbus1: !include
file: packages/yambms/yambms_canbus.yaml
vars:
canbus_id: 'canbus1'
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_node1'
canbus_light_id: 'esp_light'
# The CANBUS link will be considered down if no response from the inverter (ID 0x305) for 5s
# The Deye inverter sends the ACK (can_id 0x305) only when it receives the can_id 0x356
canbus_link_timer: '5s'
# +--------------------------------------+
# | DEBUG ( logger level must be DEBUG ) |
# +--------------------------------------+
device_debug: !include
file: packages/base/device_debug_ESP32.yaml
vars:
debug_name: 'Debug'
debug_update_interval: '5s'
-159
View File
@@ -1,159 +0,0 @@
# Updated : 2025.01.16
# Version : 1.5.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>.
substitutions:
name: yambms
# Don't forget to configure your WiFi credentials in the secrets.yaml file
#
# If needed, configure a static IP here
# wifi:
# manual_ip:
# static_ip: 192.168.0.85
# gateway: 192.168.0.1
# subnet: 255.255.255.0
# dns1: 8.8.8.8
# dns2: 8.8.4.4
logger:
level: INFO # DEBUG / INFO / WARN
ota:
platform: esphome
# Please use the native `api` component instead of the `mqtt` section.
# If you use Home Assistant, the native API is more lightweight.
# If there is no HA server connected to this API, the ESP32 reboots every 15 minutes to try to resolve the problem.
# The "reboot_timeout: 0s" option will keep your ESP32 up and running even if you lose connection to your HA server.
api:
reboot_timeout: 0s
# If you don't want to use ESPHome's native API you can use MQTT instead.
# In this case don't forget to remove the 'api:' section.
# mqtt:
# broker: !secret mqtt_host
# username: !secret mqtt_username
# password: !secret mqtt_password
# id: mqtt_client
# Please note that enabling this component will take up a lot of memory and may decrease
# stability and be the cause of reboot depending on the capabilities of the board used.
#web_server:
# port: 80
# log: false
# ota: false
# +--------------------------------------+
# | Packages |
# +--------------------------------------+
# PLEASE READ : https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_main_YAML_HowTo.md
packages:
############### >>> UNCOMMENT YOUR BOARD <<< ###############
# This list is incomplete, other board.yaml are available in the board folder
device_board: !include packages/board/board_ESP32_Generic.yaml
# device_board: !include packages/board/board_ESP32_DevKit-V1.yaml
# device_board: !include packages/board/board_ESP32_LilyGo-T-CAN485.yaml
# device_board: !include packages/board/board_ESP32-C3_ETH01-EVO.yaml
# device_board: !include packages/board/board_ESP32-S3_DevKitC-1.yaml
# device_board: !include packages/board/board_ESP32-S3_LilyGo-T-Connect.yaml
# device_board: !include packages/board/board_ESP32-S3_AtomS3-Lite.yaml
# device_board: !include
# file: packages/board/board_ESP32-S3_AtomS3.yaml # board_ESP32-S3_AtomS3R.yaml
# vars:
# display_auto_next_page_interval: '5s'
############################################################
# Config : this YAML contains the settings shared between all ESP32s
config_yambms: !include packages/config/config_yambms.yaml
# shunt1: !include
# file: packages/shunt/shunt_combine_Victron_SmartShunt_UART.yaml # shunt_combine_Junctek_KHF_UART.yaml
# vars:
# shunt_id: '1' # must be a number
# shunt_name: 'Shunt 1'
# shunt_uart_id: uart_esp_0
bms1: !include
file: packages/bms/bms_combine_JK-B_UART_full.yaml
vars:
bms_id: '1' # must be a number
bms_name: 'JK-BMS 1'
bms_uart_id: 'uart_esp_1'
bms2: !include
file: packages/bms/bms_combine_JK-B_UART_full.yaml
vars:
bms_id: '2' # must be a number
bms_name: 'JK-BMS 2'
bms_uart_id: 'uart_esp_2'
yambms1: !include
file: packages/yambms/yambms.yaml
vars:
# Please read the cut-off charging logic README to understand how the YamBMS works
yambms_update_interval: '1s'
# Input numbers can be displayed as a slider or an input box, options are 'slider' or 'box'.
yambms_input_number_mode: 'slider'
# Please check and fill in the options below correctly according to your battery chemistry and number of cells in series.
# These parameters are important and used for charging logic.
# Battery Chemistry
yambms_battery_chemistry: '1' # 1-LFP | 2-Li-ion | 3-LTO
# Number of cells in series
yambms_cell_count: '16'
# Bulk / Absorption Voltage : corresponds to the Bulk voltage that will be used to charge the battery. (LFP : 55.2V = 3.45V/Cell for 16S battery)
yambms_bulk_v: '55.2'
# Float Voltage : corresponds to the voltage at which the battery would be maintained at the end of charge. (LFP : 53.6V = 3.35V/Cell for 16S battery)
yambms_float_v: '53.6'
# Rebulk voltage, voltage from which a new Bulk charge can start. (LFP : 52.8V = 3.3V/Cell for 16S battery)
yambms_rebulk_v: '52.8'
# Maximum time in minutes that the cut-off step can last before charging is complete
# If your cells are properly balanced this step ends at the fastest after the `cut-off timer`
# This timer can be deactivated with a switch
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '60'
# Maximum charging cycles is used to calculate the battey SOH, LF280K v3 =8000.0, LF280K v2 =6000.0, LF280=3000.0 (decimal is required)
yambms_max_cycles: '6000.0'
canbus1: !include
file: packages/yambms/yambms_canbus.yaml
vars:
canbus_id: 'canbus1'
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_node1'
canbus_light_id: 'esp_light'
# The CANBUS link will be considered down if no response from the inverter (ID 0x305) for 5s
# The Deye inverter sends the ACK (can_id 0x305) only when it receives the can_id 0x356
canbus_link_timer: '5s'
# +--------------------------------------+
# | DEBUG ( logger level must be DEBUG ) |
# +--------------------------------------+
device_debug: !include
file: packages/base/device_debug_ESP32.yaml
vars:
debug_name: 'Debug'
debug_update_interval: '5s'
-177
View File
@@ -1,177 +0,0 @@
# Updated : 2025.01.16
# Version : 1.5.3
# GitHub : https://github.com/SeByDocKy/pvbrain2
# 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:
name: 'pvbrain2'
###### For extended UART ports with the 2 WK2168 ######
uart0_baudrate: '2400' #WKS {RJ45-UART0}
uart1_baudrate: '38400' #JSY193
uart2_baudrate: '19200' #SmartShunt
uart3_baudrate: '9600' #SRNE {RJ45-UART3}
uart4_baudrate: '115200' #JK-BMS 1
uart5_baudrate: '115200' #JK-BMS 2
uart6_baudrate: '115200' #Pylontech
uart7_baudrate: '9600' #EPEVER {RJ45-UART7}
#######################################################
# Don't forget to configure your WiFi credentials in the secrets.yaml file
#
# If needed, configure a static IP here
# wifi:
# manual_ip:
# static_ip: 192.168.0.85
# gateway: 192.168.0.1
# subnet: 255.255.255.0
# dns1: 8.8.8.8
# dns2: 8.8.4.4
logger:
level: INFO # DEBUG / INFO / WARN
ota:
platform: esphome
# Please use the native `api` component instead of the `mqtt` section.
# If you use Home Assistant, the native API is more lightweight.
# If there is no HA server connected to this API, the ESP32 reboots every 15 minutes to try to resolve the problem.
# The "reboot_timeout: 0s" option will keep your ESP32 up and running even if you lose connection to your HA server.
api:
reboot_timeout: 0s
# If you don't want to use ESPHome's native API you can use MQTT instead.
# In this case don't forget to remove the 'api:' section.
# mqtt:
# broker: !secret mqtt_host
# username: !secret mqtt_username
# password: !secret mqtt_password
# id: mqtt_client
# Please note that enabling this component will take up a lot of memory and may decrease
# stability and be the cause of reboot depending on the capabilities of the board used.
#web_server:
# port: 80
# log: false
# ota: false
# +--------------------------------------+
# | PVbrain2 packages |
# +--------------------------------------+
packages:
device_board: !include packages/board/board_ESP32-S3_DevKitC-1_PVbrain2.yaml
# Config : this YAML contains the settings shared between all ESP32s
config_yambms: !include packages/config/config_yambms.yaml
# BUS
# bus_i2c0: !include pvbrain2/base/device_bus_i2c0.yaml # SX1509 and BME280/BMP280
bus_spi1: !include pvbrain2/base/device_bus_spi1.yaml # MCP2515
# bus_one_wire: !include pvbrain2/base/device_bus_one_wire.yaml # Dallas
# Devices
device_uart_esp: !include pvbrain2/base/device_uart_esp.yaml
device_wk2168_spi: !include pvbrain2/base/device_wk2168_spi.yaml
# device_wk2168_i2c: !include pvbrain2/base/device_wk2168_i2c.yaml
# device_sx1509: !include pvbrain2/base/device_sx1509.yaml
device_canbus_node1: !include pvbrain2/base/device_canbus_esp32can.yaml
device_canbus_node2: !include pvbrain2/base/device_canbus_mcp2515.yaml
# +--------------------------------------+
# | YamBMS packages |
# +--------------------------------------+
# PLEASE READ : https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_main_YAML_HowTo.md
# You don't have to import a shunt but you must import at least one BMS.
shunt1: !include
file: packages/shunt/shunt_combine_Victron_SmartShunt_UART_expander.yaml # shunt_combine_Junctek_KHF_UART.yaml
vars:
shunt_id: '1' # must be a number
shunt_name: 'Shunt 1'
shunt_uart_id: 'uart_${uart_hub_bus}_2'
bms1: !include
file: packages/bms/bms_combine_JK-B_UART_full.yaml
vars:
bms_id: '1' # must be a number
bms_name: 'JK-BMS 1'
bms_uart_id: 'uart_${uart_hub_bus}_4'
bms2: !include
file: packages/bms/bms_combine_JK-B_UART_full.yaml
vars:
bms_id: '2' # must be a number
bms_name: 'JK-BMS 2'
bms_uart_id: 'uart_${uart_hub_bus}_5'
yambms1: !include
file: packages/yambms/yambms.yaml
vars:
# Please read the cut-off charging logic README to understand how the YamBMS works
yambms_update_interval: '1s'
# Input numbers can be displayed as a slider or an input box, options are 'slider' or 'box'.
yambms_input_number_mode: 'slider'
# Please check and fill in the options below correctly according to your battery chemistry and number of cells in series.
# These parameters are important and used for charging logic.
# Battery Chemistry
yambms_battery_chemistry: '1' # 1-LFP | 2-Li-ion | 3-LTO
# Number of cells in series
yambms_cell_count: '16'
# Bulk / Absorption Voltage : corresponds to the Bulk voltage that will be used to charge the battery. (LFP : 55.2V = 3.45V/Cell for 16S battery)
yambms_bulk_v: '55.2'
# Float Voltage : corresponds to the voltage at which the battery would be maintained at the end of charge. (LFP : 53.6V = 3.35V/Cell for 16S battery)
yambms_float_v: '53.6'
# Rebulk voltage, voltage from which a new Bulk charge can start. (LFP : 52.8V = 3.3V/Cell for 16S battery)
yambms_rebulk_v: '52.8'
# Maximum time in minutes that the cut-off step can last before charging is complete
# If your cells are properly balanced this step ends at the fastest after the `cut-off timer`
# This timer can be deactivated with a switch
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '60'
# Maximum charging cycles is used to calculate the battey SOH, LF280K v3 =8000.0, LF280K v2 =6000.0, LF280=3000.0 (decimal is required)
yambms_max_cycles: '6000.0'
canbus1: !include
file: packages/yambms/yambms_canbus.yaml
vars:
canbus_id: 'canbus1'
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_node1'
canbus_light_id: 'led_light_1' # on_board_light_io48
# The CANBUS link will be considered down if no response from the inverter (ID 0x305) for 5s
# The Deye inverter sends the ACK (can_id 0x305) only when it receives the can_id 0x356
canbus_link_timer: '5s'
# +--------------------------------------+
# | DEBUG ( logger level must be DEBUG ) |
# +--------------------------------------+
device_debug: !include
file: packages/base/device_debug_ESP32.yaml
vars:
debug_name: 'Debug'
debug_update_interval: '5s'
# Size of your PSRAM in bits
# 8Mb='8388608' | 6Mb='6291456' | 4Mb='4194304' | 2Mb='2097152' | NoPSRAM='0'
debug_psram_size: '8388608'
-234
View File
@@ -1,234 +0,0 @@
# Updated : 2025.01.16
# Version : 1.5.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>.
substitutions:
name: yambms
# Don't forget to configure your WiFi credentials in the secrets.yaml file
#
# If needed, configure a static IP here
# wifi:
# manual_ip:
# static_ip: 192.168.0.85
# gateway: 192.168.0.1
# subnet: 255.255.255.0
# dns1: 8.8.8.8
# dns2: 8.8.4.4
logger:
level: INFO # DEBUG / INFO / WARN
ota:
platform: esphome
# Please use the native `api` component instead of the `mqtt` section.
# If you use Home Assistant, the native API is more lightweight.
# If there is no HA server connected to this API, the ESP32 reboots every 15 minutes to try to resolve the problem.
# The "reboot_timeout: 0s" option will keep your ESP32 up and running even if you lose connection to your HA server.
api:
reboot_timeout: 0s
# If you don't want to use ESPHome's native API you can use MQTT instead.
# In this case don't forget to remove the 'api:' section.
# mqtt:
# broker: !secret mqtt_host
# username: !secret mqtt_username
# password: !secret mqtt_password
# id: mqtt_client
# Please note that enabling this component will take up a lot of memory and may decrease
# stability and be the cause of reboot depending on the capabilities of the board used.
#web_server:
# port: 80
# log: false
# ota: false
# +--------------------------------------+
# | Packages |
# +--------------------------------------+
# PLEASE READ : https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_main_YAML_HowTo.md
packages:
############### >>> UNCOMMENT YOUR BOARD <<< ###############
# This list is incomplete, other board.yaml are available in the board folder
# device_board: !include packages/board/board_ESP32_Generic.yaml
# device_board: !include packages/board/board_ESP32_DevKit-V1.yaml
# device_board: !include packages/board/board_ESP32_LilyGo-T-CAN485.yaml
# device_board: !include packages/board/board_ESP32-C3_ETH01-EVO.yaml
# device_board: !include packages/board/board_ESP32-S3_DevKitC-1.yaml
# device_board: !include packages/board/board_ESP32-S3_LilyGo-T-Connect.yaml
device_board: !include packages/board/board_ESP32-S3_AtomS3-Lite.yaml
# device_board: !include
# file: packages/board/board_ESP32-S3_AtomS3.yaml # board_ESP32-S3_AtomS3R.yaml
# vars:
# display_auto_next_page_interval: '5s'
############################################################
# Config : this YAML contains the settings shared between all ESP32s
config_yambms: !include packages/config/config_yambms.yaml
# shunt1: !include
# file: packages/shunt/shunt_combine_Victron_SmartShunt_UART.yaml # shunt_combine_Junctek_KHF_UART.yaml
# vars:
# shunt_id: '1' # must be a number
# shunt_name: 'Shunt 1'
# shunt_uart_id: uart_esp_0
# The sniffer represents the ESP node connected to the JK-BMS PB RS485 bus
# If address 0x00 is not detected on the RS485 bus, the sniffer will act directly as a master BMS (mode 2, max 15 BMS)
# sniffer1: !include
# file: packages/bms/bms_combine_JK-PB_RS485_sniffer_talk_pin.yaml
# vars:
# sniffer_id: 'sniffer1'
# sniffer_protocol: 'JK02_32S'
# sniffer_uart_id: 'uart_esp_1'
# sniffer_talk_pin: 8 # ESP32: 4, ESP32-S3: 8, ESP32-C3: 10
sniffer1: !include
file: packages/bms/bms_combine_JK-PB_RS485_sniffer.yaml
vars:
sniffer_id: 'sniffer1'
sniffer_protocol: 'JK02_32S'
sniffer_uart_id: 'uart_esp_1'
# Mode2 : configure the DIP switches of your BMS from 0x01 to 0x0F (don't use the 0x00 address, maximum 15 BMS)
bms1: !include
file: packages/bms/bms_combine_JK-PB_RS485_bms_full.yaml
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '1' # must be a number
bms_name: 'JK-BMS 1'
bms_address: '0x01' # BMS 1 DIP switch
bms2: !include
file: packages/bms/bms_combine_JK-PB_RS485_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 2 DIP switch
bms3: !include
file: packages/bms/bms_combine_JK-PB_RS485_bms_full.yaml
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '3' # must be a number
bms_name: 'JK-BMS 3'
bms_address: '0x03' # BMS 3 DIP switch
bms4: !include
file: packages/bms/bms_combine_JK-PB_RS485_bms_full.yaml
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '4' # must be a number
bms_name: 'JK-BMS 4'
bms_address: '0x04' # BMS 4 DIP switch
bms5: !include
file: packages/bms/bms_combine_JK-PB_RS485_bms_full.yaml
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '5' # must be a number
bms_name: 'JK-BMS 5'
bms_address: '0x05' # BMS 5 DIP switch
bms6: !include
file: packages/bms/bms_combine_JK-PB_RS485_bms_full.yaml
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '6' # must be a number
bms_name: 'JK-BMS 6'
bms_address: '0x06' # BMS 6 DIP switch
bms7: !include
file: packages/bms/bms_combine_JK-PB_RS485_bms_full.yaml
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '7' # must be a number
bms_name: 'JK-BMS 7'
bms_address: '0x07' # BMS 7 DIP switch
yambms1: !include
file: packages/yambms/yambms.yaml
vars:
# Please read the cut-off charging logic README to understand how the YamBMS works
yambms_update_interval: '1s'
# Input numbers can be displayed as a slider or an input box, options are 'slider' or 'box'.
yambms_input_number_mode: 'slider'
# Please check and fill in the options below correctly according to your battery chemistry and number of cells in series.
# These parameters are important and used for charging logic.
# Battery Chemistry
yambms_battery_chemistry: '1' # 1-LFP | 2-Li-ion | 3-LTO
# Number of cells in series
yambms_cell_count: '16'
# Bulk / Absorption Voltage : corresponds to the Bulk voltage that will be used to charge the battery. (LFP : 55.2V = 3.45V/Cell for 16S battery)
yambms_bulk_v: '55.2'
# Float Voltage : corresponds to the voltage at which the battery would be maintained at the end of charge. (LFP : 53.6V = 3.35V/Cell for 16S battery)
yambms_float_v: '53.6'
# Rebulk voltage, voltage from which a new Bulk charge can start. (LFP : 52.8V = 3.3V/Cell for 16S battery)
yambms_rebulk_v: '52.8'
# Maximum time in minutes that the cut-off step can last before charging is complete
# If your cells are properly balanced this step ends at the fastest after the `cut-off timer`
# This timer can be deactivated with a switch
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '60'
# Maximum charging cycles is used to calculate the battey SOH, LF280K v3 =8000.0, LF280K v2 =6000.0, LF280=3000.0 (decimal is required)
yambms_max_cycles: '6000.0'
canbus1: !include
file: packages/yambms/yambms_canbus.yaml
vars:
canbus_id: 'canbus1'
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_node1'
canbus_light_id: 'esp_light'
# The CANBUS link will be considered down if no response from the inverter (ID 0x305) for 5s
# The Deye inverter sends the ACK (can_id 0x305) only when it receives the can_id 0x356
canbus_link_timer: '5s'
# +--------------------------------------+
# | DEBUG ( logger level must be DEBUG ) |
# +--------------------------------------+
device_debug: !include
file: packages/base/device_debug_ESP32.yaml
vars:
debug_name: 'Debug'
debug_update_interval: '5s'
-224
View File
@@ -1,224 +0,0 @@
# Updated : 2025.01.16
# Version : 1.5.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>.
substitutions:
name: yambms
# Don't forget to configure your WiFi credentials in the secrets.yaml file
#
# If needed, configure a static IP here
# wifi:
# manual_ip:
# static_ip: 192.168.0.85
# gateway: 192.168.0.1
# subnet: 255.255.255.0
# dns1: 8.8.8.8
# dns2: 8.8.4.4
logger:
level: INFO # DEBUG / INFO / WARN
ota:
platform: esphome
# Please use the native `api` component instead of the `mqtt` section.
# If you use Home Assistant, the native API is more lightweight.
# If there is no HA server connected to this API, the ESP32 reboots every 15 minutes to try to resolve the problem.
# The "reboot_timeout: 0s" option will keep your ESP32 up and running even if you lose connection to your HA server.
api:
reboot_timeout: 0s
# If you don't want to use ESPHome's native API you can use MQTT instead.
# In this case don't forget to remove the 'api:' section.
# mqtt:
# broker: !secret mqtt_host
# username: !secret mqtt_username
# password: !secret mqtt_password
# id: mqtt_client
# Please note that enabling this component will take up a lot of memory and may decrease
# stability and be the cause of reboot depending on the capabilities of the board used.
#web_server:
# port: 80
# log: false
# ota: false
# +--------------------------------------+
# | Packages |
# +--------------------------------------+
# PLEASE READ : https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_main_YAML_HowTo.md
packages:
############### >>> UNCOMMENT YOUR BOARD <<< ###############
device_board: !include
file: packages/board/board_ESP32-S3_AtomS3.yaml # board_ESP32-S3_AtomS3R.yaml
vars:
display_auto_next_page_interval: '5s'
############################################################
# Config : this YAML contains the settings shared between all ESP32s
config_yambms: !include packages/config/config_yambms.yaml
# shunt1: !include
# file: packages/shunt/shunt_combine_Victron_SmartShunt_UART.yaml # shunt_combine_Junctek_KHF_UART.yaml
# vars:
# shunt_id: '1' # must be a number
# shunt_name: 'Shunt 1'
# shunt_uart_id: uart_esp_0
# The sniffer represents the ESP node connected to the JK-BMS PB RS485 bus
# If address 0x00 is not detected on the RS485 bus, the sniffer will act directly as a master BMS (mode 2, max 15 BMS)
# sniffer1: !include
# file: packages/bms/bms_combine_JK-PB_RS485_sniffer_talk_pin.yaml
# vars:
# sniffer_id: 'sniffer1'
# sniffer_protocol: 'JK02_32S'
# sniffer_uart_id: 'uart_esp_1'
# sniffer_talk_pin: 8 # ESP32: 4, ESP32-S3: 8, ESP32-C3: 10
sniffer1: !include
file: packages/bms/bms_combine_JK-PB_RS485_sniffer.yaml
vars:
sniffer_id: 'sniffer1'
sniffer_protocol: 'JK02_32S'
sniffer_uart_id: 'uart_esp_1'
# Mode2 : configure the DIP switches of your BMS from 0x01 to 0x0F (don't use the 0x00 address, maximum 15 BMS)
bms1: !include
file: packages/bms/bms_combine_JK-PB_RS485_bms_full.yaml
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '1' # must be a number
bms_name: 'JK-BMS 1'
bms_address: '0x01' # BMS 1 DIP switch
bms2: !include
file: packages/bms/bms_combine_JK-PB_RS485_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 2 DIP switch
# bms3: !include
# file: packages/bms/bms_combine_JK-PB_RS485_bms_full.yaml
# vars:
# # Sniffer ID
# sniffer_id: 'sniffer1'
# # BMS vars
# bms_id: '3' # must be a number
# bms_name: 'JK-BMS 3'
# bms_address: '0x03' # BMS 3 DIP switch
# bms4: !include
# file: packages/bms/bms_combine_JK-PB_RS485_bms_full.yaml
# vars:
# # Sniffer ID
# sniffer_id: 'sniffer1'
# # BMS vars
# bms_id: '4' # must be a number
# bms_name: 'JK-BMS 4'
# bms_address: '0x04' # BMS 4 DIP switch
# bms5: !include
# file: packages/bms/bms_combine_JK-PB_RS485_bms_full.yaml
# vars:
# # Sniffer ID
# sniffer_id: 'sniffer1'
# # BMS vars
# bms_id: '5' # must be a number
# bms_name: 'JK-BMS 5'
# bms_address: '0x05' # BMS 5 DIP switch
# bms6: !include
# file: packages/bms/bms_combine_JK-PB_RS485_bms_full.yaml
# vars:
# # Sniffer ID
# sniffer_id: 'sniffer1'
# # BMS vars
# bms_id: '6' # must be a number
# bms_name: 'JK-BMS 6'
# bms_address: '0x06' # BMS 6 DIP switch
# bms7: !include
# file: packages/bms/bms_combine_JK-PB_RS485_bms_full.yaml
# vars:
# # Sniffer ID
# sniffer_id: 'sniffer1'
# # BMS vars
# bms_id: '7' # must be a number
# bms_name: 'JK-BMS 7'
# bms_address: '0x07' # BMS 7 DIP switch
yambms1: !include
file: packages/yambms/yambms.yaml
vars:
# Please read the cut-off charging logic README to understand how the YamBMS works
yambms_update_interval: '1s'
# Input numbers can be displayed as a slider or an input box, options are 'slider' or 'box'.
yambms_input_number_mode: 'slider'
# Please check and fill in the options below correctly according to your battery chemistry and number of cells in series.
# These parameters are important and used for charging logic.
# Battery Chemistry
yambms_battery_chemistry: '1' # 1-LFP | 2-Li-ion | 3-LTO
# Number of cells in series
yambms_cell_count: '16'
# Bulk / Absorption Voltage : corresponds to the Bulk voltage that will be used to charge the battery. (LFP : 55.2V = 3.45V/Cell for 16S battery)
yambms_bulk_v: '55.2'
# Float Voltage : corresponds to the voltage at which the battery would be maintained at the end of charge. (LFP : 53.6V = 3.35V/Cell for 16S battery)
yambms_float_v: '53.6'
# Rebulk voltage, voltage from which a new Bulk charge can start. (LFP : 52.8V = 3.3V/Cell for 16S battery)
yambms_rebulk_v: '52.8'
# Maximum time in minutes that the cut-off step can last before charging is complete
# If your cells are properly balanced this step ends at the fastest after the `cut-off timer`
# This timer can be deactivated with a switch
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '60'
# Maximum charging cycles is used to calculate the battey SOH, LF280K v3 =8000.0, LF280K v2 =6000.0, LF280=3000.0 (decimal is required)
yambms_max_cycles: '6000.0'
canbus1: !include
file: packages/yambms/yambms_canbus.yaml
vars:
canbus_id: 'canbus1'
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_node1'
canbus_light_id: 'esp_light'
# The CANBUS link will be considered down if no response from the inverter (ID 0x305) for 5s
# The Deye inverter sends the ACK (can_id 0x305) only when it receives the can_id 0x356
canbus_link_timer: '5s'
# +--------------------------------------+
# | DEBUG ( logger level must be DEBUG ) |
# +--------------------------------------+
device_debug: !include
file: packages/base/device_debug_ESP32.yaml
vars:
debug_name: 'Debug'
debug_update_interval: '5s'
@@ -1,211 +0,0 @@
# Updated : 2025.01.16
# Version : 1.5.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>.
substitutions:
name: yambms
# Don't forget to configure your WiFi credentials in the secrets.yaml file
#
# If needed, configure a static IP here
# wifi:
# manual_ip:
# static_ip: 192.168.0.85
# gateway: 192.168.0.1
# subnet: 255.255.255.0
# dns1: 8.8.8.8
# dns2: 8.8.4.4
logger:
level: DEBUG # DEBUG / INFO / WARN
ota:
platform: esphome
# Please use the native `api` component instead of the `mqtt` section.
# If you use Home Assistant, the native API is more lightweight.
# If there is no HA server connected to this API, the ESP32 reboots every 15 minutes to try to resolve the problem.
# The "reboot_timeout: 0s" option will keep your ESP32 up and running even if you lose connection to your HA server.
api:
reboot_timeout: 0s
# If you don't want to use ESPHome's native API you can use MQTT instead.
# In this case don't forget to remove the 'api:' section.
# mqtt:
# broker: !secret mqtt_host
# username: !secret mqtt_username
# password: !secret mqtt_password
# id: mqtt_client
# Please note that enabling this component will take up a lot of memory and may decrease
# stability and be the cause of reboot depending on the capabilities of the board used.
#web_server:
# port: 80
# log: false
# ota: false
# +--------------------------------------+
# | Packages |
# +--------------------------------------+
# PLEASE READ : https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_main_YAML_HowTo.md
packages:
############### >>> UNCOMMENT YOUR BOARD <<< ###############
device_board: !include packages/board/board_ESP32_LilyGo-T-CAN485.yaml
############################################################
# Config : this YAML contains the settings shared between all ESP32s
config_yambms: !include packages/config/config_yambms.yaml
# shunt1: !include
# file: packages/shunt/shunt_combine_Victron_SmartShunt_UART.yaml # shunt_combine_Junctek_KHF_UART.yaml
# vars:
# shunt_id: '1' # must be a number
# shunt_name: 'Shunt 1'
# shunt_uart_id: uart_esp_0
# The sniffer represents the ESP node connected to the JK-BMS PB RS485 bus
# If address 0x00 is not detected on the RS485 bus, the sniffer will act directly as a master BMS (mode 2, max 15 BMS)
# sniffer1: !include
# file: packages/bms/bms_combine_JK-PB_RS485_sniffer_talk_pin.yaml
# vars:
# sniffer_id: 'sniffer1'
# sniffer_protocol: 'JK02_32S'
# sniffer_uart_id: 'uart_esp_1'
# sniffer_talk_pin: 17
sniffer1: !include
file: packages/bms/bms_combine_JK-PB_RS485_sniffer.yaml
vars:
sniffer_id: 'sniffer1'
sniffer_protocol: 'JK02_32S'
sniffer_uart_id: 'uart_esp_1'
# Mode2 : configure the DIP switches of your BMS from 0x01 to 0x0F (don't use the 0x00 address, maximum 15 BMS)
bms1: !include
file: packages/bms/bms_combine_JK-PB_RS485_bms_minimal.yaml
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '1' # must be a number
bms_name: 'JK-BMS 1'
bms_address: '0x01' # BMS 1 DIP switch
bms2: !include
file: packages/bms/bms_combine_JK-PB_RS485_bms_minimal.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 2 DIP switch
bms3: !include
file: packages/bms/bms_combine_JK-PB_RS485_bms_minimal.yaml
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '3' # must be a number
bms_name: 'JK-BMS 3'
bms_address: '0x03' # BMS 3 DIP switch
bms4: !include
file: packages/bms/bms_combine_JK-PB_RS485_bms_minimal.yaml
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '4' # must be a number
bms_name: 'JK-BMS 4'
bms_address: '0x04' # BMS 4 DIP switch
bms5: !include
file: packages/bms/bms_combine_JK-PB_RS485_bms_minimal.yaml
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '5' # must be a number
bms_name: 'JK-BMS 5'
bms_address: '0x05' # BMS 5 DIP switch
bms6: !include
file: packages/bms/bms_combine_JK-PB_RS485_bms_minimal.yaml
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '6' # must be a number
bms_name: 'JK-BMS 6'
bms_address: '0x06' # BMS 6 DIP switch
yambms1: !include
file: packages/yambms/yambms.yaml
vars:
# Please read the cut-off charging logic README to understand how the YamBMS works
yambms_update_interval: '1s'
# Input numbers can be displayed as a slider or an input box, options are 'slider' or 'box'.
yambms_input_number_mode: 'slider'
# Please check and fill in the options below correctly according to your battery chemistry and number of cells in series.
# These parameters are important and used for charging logic.
# Battery Chemistry
yambms_battery_chemistry: '1' # 1-LFP | 2-Li-ion | 3-LTO
# Number of cells in series
yambms_cell_count: '16'
# Bulk / Absorption Voltage : corresponds to the Bulk voltage that will be used to charge the battery. (LFP : 55.2V = 3.45V/Cell for 16S battery)
yambms_bulk_v: '55.2'
# Float Voltage : corresponds to the voltage at which the battery would be maintained at the end of charge. (LFP : 53.6V = 3.35V/Cell for 16S battery)
yambms_float_v: '53.6'
# Rebulk voltage, voltage from which a new Bulk charge can start. (LFP : 52.8V = 3.3V/Cell for 16S battery)
yambms_rebulk_v: '52.8'
# Maximum time in minutes that the cut-off step can last before charging is complete
# If your cells are properly balanced this step ends at the fastest after the `cut-off timer`
# This timer can be deactivated with a switch
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '60'
# Maximum charging cycles is used to calculate the battey SOH, LF280K v3 =8000.0, LF280K v2 =6000.0, LF280=3000.0 (decimal is required)
yambms_max_cycles: '6000.0'
canbus1: !include
file: packages/yambms/yambms_canbus.yaml
vars:
canbus_id: 'canbus1'
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_node1'
canbus_light_id: 'esp_light'
# The CANBUS link will be considered down if no response from the inverter (ID 0x305) for 5s
# The Deye inverter sends the ACK (can_id 0x305) only when it receives the can_id 0x356
canbus_link_timer: '5s'
# +--------------------------------------+
# | DEBUG ( logger level must be DEBUG ) |
# +--------------------------------------+
device_debug: !include
file: packages/base/device_debug_ESP32.yaml
vars:
debug_name: 'Debug'
debug_update_interval: '5s'
-244
View File
@@ -1,244 +0,0 @@
# Updated : 2025.01.16
# Version : 1.5.3
# GitHub : https://github.com/SeByDocKy/pvbrain2
# 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:
name: 'pvbrain2'
###### For extended UART ports with the 2 WK2168 ######
uart0_baudrate: '2400' #WKS {RJ45-UART0}
uart1_baudrate: '38400' #JSY193
uart2_baudrate: '19200' #smartshunt
uart3_baudrate: '9600' #SRNE {RJ45-UART3}
uart4_baudrate: '115200' #JK-BMS 1
uart5_baudrate: '115200' #JK-BMS 2
uart6_baudrate: '115200' #Pylontech
uart7_baudrate: '9600' #EPEVER {RJ45-UART7}
#######################################################
# Don't forget to configure your WiFi credentials in the secrets.yaml file
#
# If needed, configure a static IP here
# wifi:
# manual_ip:
# static_ip: 192.168.0.85
# gateway: 192.168.0.1
# subnet: 255.255.255.0
# dns1: 8.8.8.8
# dns2: 8.8.4.4
logger:
level: INFO # DEBUG / INFO / WARN
ota:
platform: esphome
# Please use the native `api` component instead of the `mqtt` section.
# If you use Home Assistant, the native API is more lightweight.
# If there is no HA server connected to this API, the ESP32 reboots every 15 minutes to try to resolve the problem.
# The "reboot_timeout: 0s" option will keep your ESP32 up and running even if you lose connection to your HA server.
api:
reboot_timeout: 0s
# If you don't want to use ESPHome's native API you can use MQTT instead.
# In this case don't forget to remove the 'api:' section.
# mqtt:
# broker: !secret mqtt_host
# username: !secret mqtt_username
# password: !secret mqtt_password
# id: mqtt_client
# Please note that enabling this component will take up a lot of memory and may decrease
# stability and be the cause of reboot depending on the capabilities of the board used.
#web_server:
# port: 80
# log: false
# ota: false
# +--------------------------------------+
# | PVbrain2 packages |
# +--------------------------------------+
packages:
device_board: !include packages/board/board_ESP32-S3_DevKitC-1_PVbrain2.yaml
# Config : this YAML contains the settings shared between all ESP32s
config_yambms: !include packages/config/config_yambms.yaml
# BUS
# bus_i2c0: !include pvbrain2/base/device_bus_i2c0.yaml # SX1509 and BME280/BMP280
bus_spi1: !include pvbrain2/base/device_bus_spi1.yaml # MCP2515
# bus_one_wire: !include pvbrain2/base/device_bus_one_wire.yaml # Dallas
# Devices
device_uart_esp: !include pvbrain2/base/device_uart_esp.yaml
device_wk2168_spi: !include pvbrain2/base/device_wk2168_spi.yaml
# device_wk2168_i2c: !include pvbrain2/base/device_wk2168_i2c.yaml
# device_sx1509: !include pvbrain2/base/device_sx1509.yaml
device_canbus_node1: !include pvbrain2/base/device_canbus_esp32can.yaml
device_canbus_node2: !include pvbrain2/base/device_canbus_mcp2515.yaml
# +--------------------------------------+
# | YamBMS packages |
# +--------------------------------------+
# PLEASE READ : https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_main_YAML_HowTo.md
# You don't have to import a shunt but you must import at least one BMS.
shunt1: !include
file: packages/shunt/shunt_combine_Victron_SmartShunt_UART_expander.yaml # shunt_combine_Junctek_KHF_UART.yaml
vars:
shunt_id: '1' # must be a number
shunt_name: 'Shunt 1'
shunt_uart_id: uart_${uart_hub_bus}_2
# The sniffer represents the ESP node connected to the JK-BMS PB RS485 bus
# If address 0x00 is not detected on the RS485 bus, the sniffer will act directly as a master BMS (mode 2, max 15 BMS)
sniffer1: !include
file: packages/bms/bms_combine_JK-PB_RS485_sniffer.yaml
vars:
sniffer_id: 'sniffer1'
sniffer_protocol: 'JK02_32S'
sniffer_uart_id: uart_${uart_hub_bus}_4
# Mode2 : configure the DIP switches of your BMS from 0x01 to 0x0F (don't use the 0x00 address, maximum 15 BMS)
bms1: !include
file: packages/bms/bms_combine_JK-PB_RS485_bms_full.yaml
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '1' # must be a number
bms_name: 'JK-BMS 1'
bms_address: '0x01' # BMS 1 DIP switch
bms2: !include
file: packages/bms/bms_combine_JK-PB_RS485_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 2 DIP switch
# bms3: !include
# file: packages/bms/bms_combine_JK-PB_RS485_bms_full.yaml
# vars:
# # Sniffer ID
# sniffer_id: 'sniffer1'
# # BMS vars
# bms_id: '3' # must be a number
# bms_name: 'JK-BMS 3'
# bms_address: '0x03' # BMS 3 DIP switch
# bms4: !include
# file: packages/bms/bms_combine_JK-PB_RS485_bms_full.yaml
# vars:
# # Sniffer ID
# sniffer_id: 'sniffer1'
# # BMS vars
# bms_id: '4' # must be a number
# bms_name: 'JK-BMS 4'
# bms_address: '0x04' # BMS 4 DIP switch
# bms5: !include
# file: packages/bms/bms_combine_JK-PB_RS485_bms_full.yaml
# vars:
# # Sniffer ID
# sniffer_id: 'sniffer1'
# # BMS vars
# bms_id: '5' # must be a number
# bms_name: 'JK-BMS 5'
# bms_address: '0x05' # BMS 5 DIP switch
# bms6: !include
# file: packages/bms/bms_combine_JK-PB_RS485_bms_full.yaml
# vars:
# # Sniffer ID
# sniffer_id: 'sniffer1'
# # BMS vars
# bms_id: '6' # must be a number
# bms_name: 'JK-BMS 6'
# bms_address: '0x06' # BMS 6 DIP switch
# bms7: !include
# file: packages/bms/bms_combine_JK-PB_RS485_bms_full.yaml
# vars:
# # Sniffer ID
# sniffer_id: 'sniffer1'
# # BMS vars
# bms_id: '7' # must be a number
# bms_name: 'JK-BMS 7'
# bms_address: '0x07' # BMS 7 DIP switch
yambms1: !include
file: packages/yambms/yambms.yaml
vars:
# Please read the cut-off charging logic README to understand how the YamBMS works
yambms_update_interval: '1s'
# Input numbers can be displayed as a slider or an input box, options are 'slider' or 'box'.
yambms_input_number_mode: 'slider'
# Please check and fill in the options below correctly according to your battery chemistry and number of cells in series.
# These parameters are important and used for charging logic.
# Battery Chemistry
yambms_battery_chemistry: '1' # 1-LFP | 2-Li-ion | 3-LTO
# Number of cells in series
yambms_cell_count: '16'
# Bulk / Absorption Voltage : corresponds to the Bulk voltage that will be used to charge the battery. (LFP : 55.2V = 3.45V/Cell for 16S battery)
yambms_bulk_v: '55.2'
# Float Voltage : corresponds to the voltage at which the battery would be maintained at the end of charge. (LFP : 53.6V = 3.35V/Cell for 16S battery)
yambms_float_v: '53.6'
# Rebulk voltage, voltage from which a new Bulk charge can start. (LFP : 52.8V = 3.3V/Cell for 16S battery)
yambms_rebulk_v: '52.8'
# Maximum time in minutes that the cut-off step can last before charging is complete
# If your cells are properly balanced this step ends at the fastest after the `cut-off timer`
# This timer can be deactivated with a switch
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '60'
# Maximum charging cycles is used to calculate the battey SOH, LF280K v3 =8000.0, LF280K v2 =6000.0, LF280=3000.0 (decimal is required)
yambms_max_cycles: '6000.0'
canbus1: !include
file: packages/yambms/yambms_canbus.yaml
vars:
canbus_id: 'canbus1'
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_node1'
canbus_light_id: 'led_light_1' # on_board_light_io48
# The CANBUS link will be considered down if no response from the inverter (ID 0x305) for 5s
# The Deye inverter sends the ACK (can_id 0x305) only when it receives the can_id 0x356
canbus_link_timer: '5s'
# +--------------------------------------+
# | DEBUG ( logger level must be DEBUG ) |
# +--------------------------------------+
device_debug: !include
file: packages/base/device_debug_ESP32.yaml
vars:
debug_name: 'Debug'
debug_update_interval: '5s'
# Size of your PSRAM in bits
# 8Mb='8388608' | 6Mb='6291456' | 4Mb='4194304' | 2Mb='2097152' | NoPSRAM='0'
debug_psram_size: '8388608'
-192
View File
@@ -1,192 +0,0 @@
# Updated : 2025.01.16
# Version : 1.5.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>.
substitutions:
name: yambms
# Don't forget to configure your WiFi credentials in the secrets.yaml file
#
# If needed, configure a static IP here
# wifi:
# manual_ip:
# static_ip: 192.168.0.85
# gateway: 192.168.0.1
# subnet: 255.255.255.0
# dns1: 8.8.8.8
# dns2: 8.8.4.4
logger:
level: INFO # DEBUG / INFO / WARN
ota:
platform: esphome
# Please use the native `api` component instead of the `mqtt` section.
# If you use Home Assistant, the native API is more lightweight.
# If there is no HA server connected to this API, the ESP32 reboots every 15 minutes to try to resolve the problem.
# The "reboot_timeout: 0s" option will keep your ESP32 up and running even if you lose connection to your HA server.
api:
reboot_timeout: 0s
# If you don't want to use ESPHome's native API you can use MQTT instead.
# In this case don't forget to remove the 'api:' section.
# mqtt:
# broker: !secret mqtt_host
# username: !secret mqtt_username
# password: !secret mqtt_password
# id: mqtt_client
# Please note that enabling this component will take up a lot of memory and may decrease
# stability and be the cause of reboot depending on the capabilities of the board used.
#web_server:
# port: 80
# log: false
# ota: false
# +--------------------------------------+
# | Packages |
# +--------------------------------------+
# PLEASE READ : https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_main_YAML_HowTo.md
packages:
############### >>> UNCOMMENT YOUR BOARD <<< ###############
# This list is incomplete, other board.yaml are available in the board folder
device_board: !include packages/board/board_ESP32_Generic.yaml
# device_board: !include packages/board/board_ESP32_DevKit-V1.yaml
# device_board: !include packages/board/board_ESP32_LilyGo-T-CAN485.yaml
# device_board: !include packages/board/board_ESP32-C3_ETH01-EVO.yaml
# device_board: !include packages/board/board_ESP32-S3_DevKitC-1.yaml
# device_board: !include packages/board/board_ESP32-S3_LilyGo-T-Connect.yaml
# device_board: !include packages/board/board_ESP32-S3_AtomS3-Lite.yaml
# device_board: !include
# file: packages/board/board_ESP32-S3_AtomS3.yaml # board_ESP32-S3_AtomS3R.yaml
# vars:
# display_auto_next_page_interval: '5s'
############################################################
# Config : this YAML contains the settings shared between all ESP32s
config_yambms: !include packages/config/config_yambms.yaml
# shunt1: !include
# file: packages/shunt/shunt_combine_Victron_SmartShunt_UART.yaml # shunt_combine_Junctek_KHF_UART.yaml
# vars:
# shunt_id: '1' # must be a number
# shunt_name: 'Shunt 1'
# shunt_uart_id: uart_esp_0
seplos_modbus1: !include
file: packages/bms/bms_combine_SEPLOS_V1_V2_RS485_modbus.yaml
vars:
seplos_modbus_id: 'seplos_modbus1'
seplos_modbus_uart_id: 'uart_esp_1'
seplos_modbus_baud_rate: '9600' # 9600 / 19200 ; please set the baudrate of your Seplos BMS model here
seplos_modbus_rx_timeout: '150ms'
bms1: !include
file: packages/bms/bms_combine_SEPLOS_V1_V2_RS485_bms_full.yaml
vars:
# Seplos modbus ID
seplos_modbus_id: 'seplos_modbus1'
# BMS vars
bms_id: '1' # must be a number
bms_name: 'BMS 1'
bms_address: '0x01' # BMS 1 DIP switch
bms_protocol_version: '0x20' # Known protocol versions: 0x20 (Seplos), 0x26 (Boqiang)
# Required settings cannot be retrieved from BMS
# These values ​​must match your BMS settings
# LFP values example
bms_max_charge_current: '100' # A. Used to calculate maximum charge current
bms_max_discharge_current: '100' # A. Used to calculate maximum discharge current
bms_cell_ovp: '3.650' # V. Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V. Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V. Used by 'Auto CVL' functions
bms2: !include
file: packages/bms/bms_combine_SEPLOS_V1_V2_RS485_bms_full.yaml
vars:
# Seplos modbus ID
seplos_modbus_id: 'seplos_modbus1'
# BMS vars
bms_id: '2' # must be a number
bms_name: 'BMS 2'
bms_address: '0x02' # BMS 2 DIP switch
bms_protocol_version: '0x20' # Known protocol versions: 0x20 (Seplos), 0x26 (Boqiang)
bms_uart_id: uart_esp_2
# Required settings cannot be retrieved from BMS
# These values ​​must match your BMS settings
# LFP values example
bms_max_charge_current: '100' # A. Used to calculate maximum charge current
bms_max_discharge_current: '100' # A. Used to calculate maximum discharge current
bms_cell_ovp: '3.650' # V. Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V. Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V. Used by 'Auto CVL' functions
yambms1: !include
file: packages/yambms/yambms.yaml
vars:
# Please read the cut-off charging logic README to understand how the YamBMS works
yambms_update_interval: '1s'
# Input numbers can be displayed as a slider or an input box, options are 'slider' or 'box'.
yambms_input_number_mode: 'slider'
# Please check and fill in the options below correctly according to your battery chemistry and number of cells in series.
# These parameters are important and used for charging logic.
# Battery Chemistry
yambms_battery_chemistry: '1' # 1-LFP | 2-Li-ion | 3-LTO
# Number of cells in series
yambms_cell_count: '16'
# Bulk / Absorption Voltage : corresponds to the Bulk voltage that will be used to charge the battery. (LFP : 55.2V = 3.45V/Cell for 16S battery)
yambms_bulk_v: '55.2'
# Float Voltage : corresponds to the voltage at which the battery would be maintained at the end of charge. (LFP : 53.6V = 3.35V/Cell for 16S battery)
yambms_float_v: '53.6'
# Rebulk voltage, voltage from which a new Bulk charge can start. (LFP : 52.8V = 3.3V/Cell for 16S battery)
yambms_rebulk_v: '52.8'
# Maximum time in minutes that the cut-off step can last before charging is complete
# If your cells are properly balanced this step ends at the fastest after the `cut-off timer`
# This timer can be deactivated with a switch
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '60'
# Maximum charging cycles is used to calculate the battey SOH, LF280K v3 =8000.0, LF280K v2 =6000.0, LF280=3000.0 (decimal is required)
yambms_max_cycles: '6000.0'
canbus1: !include
file: packages/yambms/yambms_canbus.yaml
vars:
canbus_id: 'canbus1'
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_node1'
canbus_light_id: 'esp_light'
# The CANBUS link will be considered down if no response from the inverter (ID 0x305) for 5s
# The Deye inverter sends the ACK (can_id 0x305) only when it receives the can_id 0x356
canbus_link_timer: '5s'
# +--------------------------------------+
# | DEBUG ( logger level must be DEBUG ) |
# +--------------------------------------+
device_debug: !include
file: packages/base/device_debug_ESP32.yaml
vars:
debug_name: 'Debug'
debug_update_interval: '5s'
-211
View File
@@ -1,211 +0,0 @@
# Updated : 2025.01.16
# Version : 1.5.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>.
substitutions:
name: yambms-node1
# Don't forget to configure your WiFi credentials in the secrets.yaml file
#
# If needed, configure a static IP here
# wifi:
# manual_ip:
# static_ip: 192.168.0.85
# gateway: 192.168.0.1
# subnet: 255.255.255.0
# dns1: 8.8.8.8
# dns2: 8.8.4.4
logger:
level: INFO # DEBUG / INFO / WARN
ota:
platform: esphome
# Please use the native `api` component instead of the `mqtt` section.
# If you use Home Assistant, the native API is more lightweight.
# If there is no HA server connected to this API, the ESP32 reboots every 15 minutes to try to resolve the problem.
# The "reboot_timeout: 0s" option will keep your ESP32 up and running even if you lose connection to your HA server.
api:
reboot_timeout: 0s
# If you don't want to use ESPHome's native API you can use MQTT instead.
# In this case don't forget to remove the 'api:' section.
# mqtt:
# broker: !secret mqtt_host
# username: !secret mqtt_username
# password: !secret mqtt_password
# id: mqtt_client
# Please note that enabling this component will take up a lot of memory and may decrease
# stability and be the cause of reboot depending on the capabilities of the board used.
#web_server:
# port: 80
# log: false
# ota: false
# +--------------------------------------+
# | Packages |
# +--------------------------------------+
# PLEASE READ : https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_main_YAML_HowTo.md
packages:
############### >>> UNCOMMENT YOUR BOARD <<< ###############
# This list is incomplete, other board.yaml are available in the board folder
# device_board: !include packages/board/board_ESP32_Generic.yaml
# device_board: !include packages/board/board_ESP32_DevKit-V1.yaml
# device_board: !include packages/board/board_ESP32_LilyGo-T-CAN485.yaml
# device_board: !include packages/board/board_ESP32-C3_ETH01-EVO.yaml
# device_board: !include packages/board/board_ESP32-S3_DevKitC-1.yaml
# device_board: !include packages/board/board_ESP32-S3_LilyGo-T-Connect.yaml
device_board: !include packages/board/board_ESP32-S3_AtomS3-Lite.yaml
# device_board: !include
# file: packages/board/board_ESP32-S3_AtomS3.yaml # board_ESP32-S3_AtomS3R.yaml
# vars:
# display_auto_next_page_interval: '5s'
############################################################
# Config : this YAMLs contains the settings shared between all ESP32s
config_yambms: !include packages/config/config_yambms.yaml
config_multinode_modbus: !include packages/config/config_multi-node_modbus.yaml
modbus: !include
file: packages/base/device_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'
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'
yambms1: !include
file: packages/yambms/yambms.yaml
vars:
# Please read the cut-off charging logic README to understand how the YamBMS works
yambms_update_interval: '1s'
# Input numbers can be displayed as a slider or an input box, options are 'slider' or 'box'.
yambms_input_number_mode: 'slider'
# Please check and fill in the options below correctly according to your battery chemistry and number of cells in series.
# These parameters are important and used for charging logic.
# Battery Chemistry
yambms_battery_chemistry: '1' # 1-LFP | 2-Li-ion | 3-LTO
# Number of cells in series
yambms_cell_count: '16'
# Bulk / Absorption Voltage : corresponds to the Bulk voltage that will be used to charge the battery. (LFP : 55.2V = 3.45V/Cell for 16S battery)
yambms_bulk_v: '55.2'
# Float Voltage : corresponds to the voltage at which the battery would be maintained at the end of charge. (LFP : 53.6V = 3.35V/Cell for 16S battery)
yambms_float_v: '53.6'
# Rebulk voltage, voltage from which a new Bulk charge can start. (LFP : 52.8V = 3.3V/Cell for 16S battery)
yambms_rebulk_v: '52.8'
# Maximum time in minutes that the cut-off step can last before charging is complete
# If your cells are properly balanced this step ends at the fastest after the `cut-off timer`
# This timer can be deactivated with a switch
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '60'
# Maximum charging cycles is used to calculate the battey SOH, LF280K v3 =8000.0, LF280K v2 =6000.0, LF280=3000.0 (decimal is required)
yambms_max_cycles: '6000.0'
canbus1: !include
file: packages/yambms/yambms_canbus.yaml
vars:
canbus_id: 'canbus1'
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_node1'
canbus_light_id: 'esp_light'
# The CANBUS link will be considered down if no response from the inverter (ID 0x305) for 5s
# The Deye inverter sends the ACK (can_id 0x305) only when it receives the can_id 0x356
canbus_link_timer: '5s'
# +--------------------------------------+
# | DEBUG ( logger level must be DEBUG ) |
# +--------------------------------------+
device_debug: !include
file: packages/base/device_debug_ESP32.yaml
vars:
debug_name: 'Debug'
debug_update_interval: '5s'
-124
View File
@@ -1,124 +0,0 @@
# Updated : 2025.01.16
# Version : 1.5.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>.
substitutions:
name: yambms-node2
# Don't forget to configure your WiFi credentials in the secrets.yaml file
#
# If needed, configure a static IP here
# wifi:
# manual_ip:
# static_ip: 192.168.0.85
# gateway: 192.168.0.1
# subnet: 255.255.255.0
# dns1: 8.8.8.8
# dns2: 8.8.4.4
logger:
level: INFO # DEBUG / INFO / WARN
ota:
platform: esphome
# Please use the native `api` component instead of the `mqtt` section.
# If you use Home Assistant, the native API is more lightweight.
# If there is no HA server connected to this API, the ESP32 reboots every 15 minutes to try to resolve the problem.
# The "reboot_timeout: 0s" option will keep your ESP32 up and running even if you lose connection to your HA server.
api:
reboot_timeout: 0s
# If you don't want to use ESPHome's native API you can use MQTT instead.
# In this case don't forget to remove the 'api:' section.
# mqtt:
# broker: !secret mqtt_host
# username: !secret mqtt_username
# password: !secret mqtt_password
# id: mqtt_client
# Please note that enabling this component will take up a lot of memory and may decrease
# stability and be the cause of reboot depending on the capabilities of the board used.
#web_server:
# port: 80
# log: false
# ota: false
# Remove canbus_node1 (not necessary)
canbus:
- id: !remove canbus_node1
# +--------------------------------------+
# | Packages |
# +--------------------------------------+
# PLEASE READ : https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_main_YAML_HowTo.md
packages:
############### >>> UNCOMMENT YOUR BOARD <<< ###############
# This list is incomplete, other board.yaml are available in the board folder
# device_board: !include packages/board/board_ESP32_Generic.yaml
# device_board: !include packages/board/board_ESP32_DevKit-V1.yaml
# device_board: !include packages/board/board_ESP32_LilyGo-T-CAN485.yaml
# device_board: !include packages/board/board_ESP32-C3_ETH01-EVO.yaml
# device_board: !include packages/board/board_ESP32-S3_DevKitC-1.yaml
device_board: !include packages/board/board_ESP32-S3_LilyGo-T-Connect.yaml
# device_board: !include packages/board/board_ESP32-S3_AtomS3-Lite.yaml
# device_board: !include
# file: packages/board/board_ESP32-S3_AtomS3.yaml # board_ESP32-S3_AtomS3R.yaml
# vars:
# display_auto_next_page_interval: '5s'
############################################################
# Config : this YAMLs contains the settings shared between all ESP32s
config_yambms: !include packages/config/config_yambms.yaml
config_multinode_modbus: !include packages/config/config_multi-node_modbus.yaml
modbus: !include
file: packages/base/device_modbus.yaml
vars:
modbus_role: 'server' # client / server
modbus_uart_id: 'uart_esp_1' # RS485 board
shunt1: !include
file: packages/shunt/shunt_modbus_Victron_SmartShunt_UART.yaml
vars:
shunt_id: '1' # must be a number
shunt_name: 'Shunt 1'
shunt_uart_id: 'uart_esp_2'
bms1: !include
file: packages/bms/bms_modbus_JK-B_UART_full.yaml
vars:
bms_id: '1' # must be a number
bms_name: 'JK-BMS 1'
bms_uart_id: 'uart_esp_3'
# +--------------------------------------+
# | DEBUG ( logger level must be DEBUG ) |
# +--------------------------------------+
device_debug: !include
file: packages/base/device_debug_ESP32.yaml
vars:
debug_name: 'Debug'
debug_update_interval: '5s'
-127
View File
@@ -1,127 +0,0 @@
# Updated : 2025.01.16
# Version : 1.5.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>.
substitutions:
name: yambms-node2
# Don't forget to configure your WiFi credentials in the secrets.yaml file
#
# If needed, configure a static IP here
# wifi:
# manual_ip:
# static_ip: 192.168.0.85
# gateway: 192.168.0.1
# subnet: 255.255.255.0
# dns1: 8.8.8.8
# dns2: 8.8.4.4
logger:
level: INFO # DEBUG / INFO / WARN
ota:
platform: esphome
# Please use the native `api` component instead of the `mqtt` section.
# If you use Home Assistant, the native API is more lightweight.
# If there is no HA server connected to this API, the ESP32 reboots every 15 minutes to try to resolve the problem.
# The "reboot_timeout: 0s" option will keep your ESP32 up and running even if you lose connection to your HA server.
api:
reboot_timeout: 0s
# If you don't want to use ESPHome's native API you can use MQTT instead.
# In this case don't forget to remove the 'api:' section.
# mqtt:
# broker: !secret mqtt_host
# username: !secret mqtt_username
# password: !secret mqtt_password
# id: mqtt_client
# Please note that enabling this component will take up a lot of memory and may decrease
# stability and be the cause of reboot depending on the capabilities of the board used.
#web_server:
# port: 80
# log: false
# ota: false
# Remove canbus_node1 (not necessary)
canbus:
- id: !remove canbus_node1
# +--------------------------------------+
# | Packages |
# +--------------------------------------+
# PLEASE READ : https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_main_YAML_HowTo.md
packages:
############### >>> UNCOMMENT YOUR BOARD <<< ###############
# This list is incomplete, other board.yaml are available in the board folder
# device_board: !include packages/board/board_ESP32_Generic.yaml
# device_board: !include packages/board/board_ESP32_DevKit-V1.yaml
# device_board: !include packages/board/board_ESP32_LilyGo-T-CAN485.yaml
# device_board: !include packages/board/board_ESP32-C3_ETH01-EVO.yaml
# device_board: !include packages/board/board_ESP32-S3_DevKitC-1.yaml
# device_board: !include packages/board/board_ESP32-S3_LilyGo-T-Connect.yaml
device_board: !include packages/board/board_ESP32-S3_AtomS3-Lite.yaml
# device_board: !include
# file: packages/board/board_ESP32-S3_AtomS3.yaml # board_ESP32-S3_AtomS3R.yaml
# vars:
# display_auto_next_page_interval: '5s'
############################################################
# Config : this YAMLs contains the settings shared between all ESP32s
config_yambms: !include packages/config/config_yambms.yaml
config_multinode_modbus: !include packages/config/config_multi-node_modbus.yaml
modbus: !include
file: packages/base/device_modbus.yaml
vars:
modbus_role: 'server' # client / server
modbus_uart_id: 'uart_esp_1' # RS485 board
modbus_baud_rate: '19200' # 9600 / 19200 / 115200
bms2: !include
file: packages/bms/bms_modbus_JK-ALL_BLE_standard.yaml
vars:
bms_id: '2' # must be a number, also represents the modbus server number !
bms_name: 'JK-BMS 2'
bms_ble_protocol_version: JK02_32S # JK02_24S < hardware version 11.0 >= JK02_32S
bms_ble_mac_address: C8:47:8C:10:7E:AA
bms3: !include
file: packages/bms/bms_modbus_JK-ALL_BLE_standard.yaml
vars:
bms_id: '3' # must be a number, also represents the modbus server number !
bms_name: 'JK-BMS 3'
bms_ble_protocol_version: JK02_32S # JK02_24S < hardware version 11.0 >= JK02_32S
bms_ble_mac_address: C8:47:8C:EE:16:EA
# +--------------------------------------+
# | DEBUG ( logger level must be DEBUG ) |
# +--------------------------------------+
device_debug: !include
file: packages/base/device_debug_ESP32.yaml
vars:
debug_name: 'Debug'
debug_update_interval: '5s'
-161
View File
@@ -1,161 +0,0 @@
# Updated : 2025.01.16
# Version : 1.5.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>.
substitutions:
name: yambms
# Don't forget to configure your WiFi credentials in the secrets.yaml file
#
# If needed, configure a static IP here
# wifi:
# manual_ip:
# static_ip: 192.168.0.85
# gateway: 192.168.0.1
# subnet: 255.255.255.0
# dns1: 8.8.8.8
# dns2: 8.8.4.4
logger:
level: DEBUG # DEBUG / INFO / WARN
logs:
esp32_ble_tracker: INFO
esp32_ble_client: INFO
ota:
platform: esphome
# Please use the native `api` component instead of the `mqtt` section.
# If you use Home Assistant, the native API is more lightweight.
# If there is no HA server connected to this API, the ESP32 reboots every 15 minutes to try to resolve the problem.
# The "reboot_timeout: 0s" option will keep your ESP32 up and running even if you lose connection to your HA server.
api:
reboot_timeout: 0s
# If you don't want to use ESPHome's native API you can use MQTT instead.
# In this case don't forget to remove the 'api:' section.
# mqtt:
# broker: !secret mqtt_host
# username: !secret mqtt_username
# password: !secret mqtt_password
# id: mqtt_client
# Please note that enabling this component will take up a lot of memory and may decrease
# stability and be the cause of reboot depending on the capabilities of the board used.
#web_server:
# port: 80
# log: false
# ota: false
# +--------------------------------------+
# | Packages |
# +--------------------------------------+
# PLEASE READ : https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_main_YAML_HowTo.md
# Max 3 BLE connections.
# The BLE software stack (Bluedroid) on the ESP32 consumes a significant amount of RAM on the device.
# Crashes are likely to occur if you include too many additional components in your device’s configuration.
# https://esphome.io/components/ble_client.html
packages:
############### >>> UNCOMMENT YOUR BOARD <<< ###############
# This list is incomplete, other board.yaml are available in the board folder
device_board: !include packages/board/board_ESP32_Generic.yaml
# device_board: !include packages/board/board_ESP32_DevKit-V1.yaml
# device_board: !include packages/board/board_ESP32_LilyGo-T-CAN485.yaml
# device_board: !include packages/board/board_ESP32-C3_ETH01-EVO.yaml
# device_board: !include packages/board/board_ESP32-S3_DevKitC-1.yaml
# device_board: !include packages/board/board_ESP32-S3_LilyGo-T-Connect.yaml
# device_board: !include packages/board/board_ESP32-S3_AtomS3-Lite.yaml
# device_board: !include
# file: packages/board/board_ESP32-S3_AtomS3.yaml # board_ESP32-S3_AtomS3R.yaml
# vars:
# display_auto_next_page_interval: '5s'
############################################################
# Config : this YAML contains the settings shared between all ESP32s
config_yambms: !include packages/config/config_yambms.yaml
# shunt1: !include
# file: packages/shunt/shunt_combine_Victron_SmartShunt_UART.yaml # shunt_combine_Junctek_KHF_UART.yaml
# vars:
# shunt_id: '1' # must be a number
# shunt_name: 'Shunt 1'
# shunt_uart_id: uart_esp_0
bms1: !include
file: packages/bms/bms_combine_JK-ALL_BLE_standard.yaml
vars:
bms_id: '1' # must be a number
bms_name: 'JK-BMS 1'
bms_ble_protocol_version: 'JK02_32S' # JK02_24S < hardware version 11.0 >= JK02_32S
bms_ble_mac_address: 'C8:47:8C:10:7E:AA'
yambms1: !include
file: packages/yambms/yambms.yaml
vars:
# Please read the cut-off charging logic README to understand how the YamBMS works
yambms_update_interval: '1s'
# Input numbers can be displayed as a slider or an input box, options are 'slider' or 'box'.
yambms_input_number_mode: 'slider'
# Please check and fill in the options below correctly according to your battery chemistry and number of cells in series.
# These parameters are important and used for charging logic.
# Battery Chemistry
yambms_battery_chemistry: '1' # 1-LFP | 2-Li-ion | 3-LTO
# Number of cells in series
yambms_cell_count: '16'
# Bulk / Absorption Voltage : corresponds to the Bulk voltage that will be used to charge the battery. (LFP : 55.2V = 3.45V/Cell for 16S battery)
yambms_bulk_v: '55.2'
# Float Voltage : corresponds to the voltage at which the battery would be maintained at the end of charge. (LFP : 53.6V = 3.35V/Cell for 16S battery)
yambms_float_v: '53.6'
# Rebulk voltage, voltage from which a new Bulk charge can start. (LFP : 52.8V = 3.3V/Cell for 16S battery)
yambms_rebulk_v: '52.8'
# Maximum time in minutes that the cut-off step can last before charging is complete
# If your cells are properly balanced this step ends at the fastest after the `cut-off timer`
# This timer can be deactivated with a switch
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '60'
# Maximum charging cycles is used to calculate the battey SOH, LF280K v3 =8000.0, LF280K v2 =6000.0, LF280=3000.0 (decimal is required)
yambms_max_cycles: '6000.0'
canbus1: !include
file: packages/yambms/yambms_canbus.yaml
vars:
canbus_id: 'canbus1'
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_node1'
canbus_light_id: 'esp_light'
# The CANBUS link will be considered down if no response from the inverter (ID 0x305) for 5s
# The Deye inverter sends the ACK (can_id 0x305) only when it receives the can_id 0x356
canbus_link_timer: '5s'
# +--------------------------------------+
# | DEBUG ( logger level must be DEBUG ) |
# +--------------------------------------+
device_debug: !include
file: packages/base/device_debug_ESP32.yaml
vars:
debug_name: 'Debug'
debug_update_interval: '5s'
-152
View File
@@ -1,152 +0,0 @@
# Updated : 2025.01.16
# Version : 1.5.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>.
substitutions:
name: yambms
# Don't forget to configure your WiFi credentials in the secrets.yaml file
#
# If needed, configure a static IP here
# wifi:
# manual_ip:
# static_ip: 192.168.0.85
# gateway: 192.168.0.1
# subnet: 255.255.255.0
# dns1: 8.8.8.8
# dns2: 8.8.4.4
logger:
level: INFO # DEBUG / INFO / WARN
ota:
platform: esphome
# Please use the native `api` component instead of the `mqtt` section.
# If you use Home Assistant, the native API is more lightweight.
# If there is no HA server connected to this API, the ESP32 reboots every 15 minutes to try to resolve the problem.
# The "reboot_timeout: 0s" option will keep your ESP32 up and running even if you lose connection to your HA server.
api:
reboot_timeout: 0s
# If you don't want to use ESPHome's native API you can use MQTT instead.
# In this case don't forget to remove the 'api:' section.
# mqtt:
# broker: !secret mqtt_host
# username: !secret mqtt_username
# password: !secret mqtt_password
# id: mqtt_client
# Please note that enabling this component will take up a lot of memory and may decrease
# stability and be the cause of reboot depending on the capabilities of the board used.
#web_server:
# port: 80
# log: false
# ota: false
# +--------------------------------------+
# | Packages |
# +--------------------------------------+
# PLEASE READ : https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_main_YAML_HowTo.md
packages:
############### >>> UNCOMMENT YOUR BOARD <<< ###############
# This list is incomplete, other board.yaml are available in the board folder
device_board: !include packages/board/board_ESP32_Generic.yaml
# device_board: !include packages/board/board_ESP32_DevKit-V1.yaml
# device_board: !include packages/board/board_ESP32_LilyGo-T-CAN485.yaml
# device_board: !include packages/board/board_ESP32-C3_ETH01-EVO.yaml
# device_board: !include packages/board/board_ESP32-S3_DevKitC-1.yaml
# device_board: !include packages/board/board_ESP32-S3_LilyGo-T-Connect.yaml
# device_board: !include packages/board/board_ESP32-S3_AtomS3-Lite.yaml
# device_board: !include
# file: packages/board/board_ESP32-S3_AtomS3.yaml # board_ESP32-S3_AtomS3R.yaml
# vars:
# display_auto_next_page_interval: '5s'
############################################################
# Config : this YAML contains the settings shared between all ESP32s
config_yambms: !include packages/config/config_yambms.yaml
# shunt1: !include
# file: packages/shunt/shunt_combine_Victron_SmartShunt_UART.yaml # shunt_combine_Junctek_KHF_UART.yaml
# vars:
# shunt_id: '1' # must be a number
# shunt_name: 'Shunt 1'
# shunt_uart_id: uart_esp_0
bms1: !include
file: packages/bms/bms_combine_JK-B_UART_full.yaml
vars:
bms_id: '1' # must be a number
bms_name: 'JK-BMS 1'
bms_uart_id: 'uart_esp_1'
yambms1: !include
file: packages/yambms/yambms.yaml
vars:
# Please read the cut-off charging logic README to understand how the YamBMS works
yambms_update_interval: '1s'
# Input numbers can be displayed as a slider or an input box, options are 'slider' or 'box'.
yambms_input_number_mode: 'slider'
# Please check and fill in the options below correctly according to your battery chemistry and number of cells in series.
# These parameters are important and used for charging logic.
# Battery Chemistry
yambms_battery_chemistry: '1' # 1-LFP | 2-Li-ion | 3-LTO
# Number of cells in series
yambms_cell_count: '16'
# Bulk / Absorption Voltage : corresponds to the Bulk voltage that will be used to charge the battery. (LFP : 55.2V = 3.45V/Cell for 16S battery)
yambms_bulk_v: '55.2'
# Float Voltage : corresponds to the voltage at which the battery would be maintained at the end of charge. (LFP : 53.6V = 3.35V/Cell for 16S battery)
yambms_float_v: '53.6'
# Rebulk voltage, voltage from which a new Bulk charge can start. (LFP : 52.8V = 3.3V/Cell for 16S battery)
yambms_rebulk_v: '52.8'
# Maximum time in minutes that the cut-off step can last before charging is complete
# If your cells are properly balanced this step ends at the fastest after the `cut-off timer`
# This timer can be deactivated with a switch
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '60'
# Maximum charging cycles is used to calculate the battey SOH, LF280K v3 =8000.0, LF280K v2 =6000.0, LF280=3000.0 (decimal is required)
yambms_max_cycles: '6000.0'
canbus1: !include
file: packages/yambms/yambms_canbus.yaml
vars:
canbus_id: 'canbus1'
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_node1'
canbus_light_id: 'esp_light'
# The CANBUS link will be considered down if no response from the inverter (ID 0x305) for 5s
# The Deye inverter sends the ACK (can_id 0x305) only when it receives the can_id 0x356
canbus_link_timer: '5s'
# +--------------------------------------+
# | DEBUG ( logger level must be DEBUG ) |
# +--------------------------------------+
device_debug: !include
file: packages/base/device_debug_ESP32.yaml
vars:
debug_name: 'Debug'
debug_update_interval: '5s'
-174
View File
@@ -1,174 +0,0 @@
# Updated : 2025.01.16
# Version : 1.5.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>.
substitutions:
name: yambms
# Don't forget to configure your WiFi credentials in the secrets.yaml file
#
# If needed, configure a static IP here
# wifi:
# manual_ip:
# static_ip: 192.168.0.85
# gateway: 192.168.0.1
# subnet: 255.255.255.0
# dns1: 8.8.8.8
# dns2: 8.8.4.4
logger:
level: INFO # DEBUG / INFO / WARN
ota:
platform: esphome
# Please use the native `api` component instead of the `mqtt` section.
# If you use Home Assistant, the native API is more lightweight.
# If there is no HA server connected to this API, the ESP32 reboots every 15 minutes to try to resolve the problem.
# The "reboot_timeout: 0s" option will keep your ESP32 up and running even if you lose connection to your HA server.
api:
reboot_timeout: 0s
# If you don't want to use ESPHome's native API you can use MQTT instead.
# In this case don't forget to remove the 'api:' section.
# mqtt:
# broker: !secret mqtt_host
# username: !secret mqtt_username
# password: !secret mqtt_password
# id: mqtt_client
# Please note that enabling this component will take up a lot of memory and may decrease
# stability and be the cause of reboot depending on the capabilities of the board used.
#web_server:
# port: 80
# log: false
# ota: false
# +--------------------------------------+
# | Packages |
# +--------------------------------------+
# PLEASE READ : https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_main_YAML_HowTo.md
packages:
############### >>> UNCOMMENT YOUR BOARD <<< ###############
# This list is incomplete, other board.yaml are available in the board folder
# device_board: !include packages/board/board_ESP32_Generic.yaml
# device_board: !include packages/board/board_ESP32_DevKit-V1.yaml
device_board: !include packages/board/board_ESP32_LilyGo-T-CAN485.yaml
# device_board: !include packages/board/board_ESP32-C3_ETH01-EVO.yaml
# device_board: !include packages/board/board_ESP32-S3_DevKitC-1.yaml
# device_board: !include packages/board/board_ESP32-S3_LilyGo-T-Connect.yaml
# device_board: !include packages/board/board_ESP32-S3_AtomS3-Lite.yaml
# device_board: !include
# file: packages/board/board_ESP32-S3_AtomS3.yaml # board_ESP32-S3_AtomS3R.yaml
# vars:
# display_auto_next_page_interval: '5s'
############################################################
# Config : this YAML contains the settings shared between all ESP32s
config_yambms: !include packages/config/config_yambms.yaml
# shunt1: !include
# file: packages/shunt/shunt_combine_Victron_SmartShunt_UART.yaml # shunt_combine_Junctek_KHF_UART.yaml
# vars:
# shunt_id: '1' # must be a number
# shunt_name: 'Shunt 1'
# shunt_uart_id: uart_esp_0
# The sniffer represents the ESP node connected to the JK-BMS PB RS485 bus
# If address 0x00 is not detected on the RS485 bus, the sniffer will act directly as a master BMS (mode 2, max 15 BMS)
# sniffer1: !include
# file: packages/bms/bms_combine_JK-PB_RS485_sniffer_talk_pin.yaml
# vars:
# sniffer_id: 'sniffer1'
# sniffer_protocol: 'JK02_32S'
# sniffer_uart_id: 'uart_esp_1'
# sniffer_talk_pin: 8 # ESP32: 4, ESP32-S3: 8, ESP32-C3: 10
sniffer1: !include
file: packages/bms/bms_combine_JK-PB_RS485_sniffer.yaml
vars:
sniffer_id: 'sniffer1'
sniffer_protocol: 'JK02_32S'
sniffer_uart_id: 'uart_esp_1'
# Mode2 : configure the DIP switches of your BMS from 0x01 to 0x0F (don't use the 0x00 address, maximum 15 BMS)
bms1: !include
file: packages/bms/bms_combine_JK-PB_RS485_bms_full.yaml
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '1' # must be a number
bms_name: 'JK-BMS 1'
bms_address: '0x01' # BMS 1 DIP switch
yambms1: !include
file: packages/yambms/yambms.yaml
vars:
# Please read the cut-off charging logic README to understand how the YamBMS works
yambms_update_interval: '1s'
# Input numbers can be displayed as a slider or an input box, options are 'slider' or 'box'.
yambms_input_number_mode: 'slider'
# Please check and fill in the options below correctly according to your battery chemistry and number of cells in series.
# These parameters are important and used for charging logic.
# Battery Chemistry
yambms_battery_chemistry: '1' # 1-LFP | 2-Li-ion | 3-LTO
# Number of cells in series
yambms_cell_count: '16'
# Bulk / Absorption Voltage : corresponds to the Bulk voltage that will be used to charge the battery. (LFP : 55.2V = 3.45V/Cell for 16S battery)
yambms_bulk_v: '55.2'
# Float Voltage : corresponds to the voltage at which the battery would be maintained at the end of charge. (LFP : 53.6V = 3.35V/Cell for 16S battery)
yambms_float_v: '53.6'
# Rebulk voltage, voltage from which a new Bulk charge can start. (LFP : 52.8V = 3.3V/Cell for 16S battery)
yambms_rebulk_v: '52.8'
# Maximum time in minutes that the cut-off step can last before charging is complete
# If your cells are properly balanced this step ends at the fastest after the `cut-off timer`
# This timer can be deactivated with a switch
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '60'
# Maximum charging cycles is used to calculate the battey SOH, LF280K v3 =8000.0, LF280K v2 =6000.0, LF280=3000.0 (decimal is required)
yambms_max_cycles: '6000.0'
canbus1: !include
file: packages/yambms/yambms_canbus.yaml
vars:
canbus_id: 'canbus1'
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_node1'
canbus_light_id: 'esp_light'
# The CANBUS link will be considered down if no response from the inverter (ID 0x305) for 5s
# The Deye inverter sends the ACK (can_id 0x305) only when it receives the can_id 0x356
canbus_link_timer: '5s'
# +--------------------------------------+
# | DEBUG ( logger level must be DEBUG ) |
# +--------------------------------------+
device_debug: !include
file: packages/base/device_debug_ESP32.yaml
vars:
debug_name: 'Debug'
debug_update_interval: '5s'
+5 -5
View File
@@ -1,5 +1,5 @@
# Updated : 2025.03.21
# Version : 1.5.4
# Updated : 2025.05.11
# Version : 1.5.5
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -18,11 +18,11 @@
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
substitutions:
yambms_version: "1.5.4"
yambms_version: "1.5.5"
esphome:
name: ${name}
# friendly_name: ${name}
name: ${hostname}
friendly_name: ${friendly_name}
# comment: 'Solar system braining and more !'
# area: 'Technical local'
project:
+4 -4
View File
@@ -1,4 +1,4 @@
# Updated : 2025.01.25
# Updated : 2025.04.04
# Version : 1.2.2
# GitHub : https://github.com/Sleeper85/esphome-yambms
@@ -17,9 +17,6 @@
# 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_charging_logic: !include bms_options_charging_logic.yaml
sensor:
# +--------------------------------------+
# | Total Daily Energy |
@@ -45,6 +42,9 @@ sensor:
# Multiplication factor from W to kW is 0.001
- multiply: 0.001
# +--------------------------------------+
# | Battery State of Charge (SOC) |
# +--------------------------------------+
- platform: template
name: ${name} ${bms_name} Battery SoC
id: bms${bms_id}_battery_soc
@@ -1,5 +1,5 @@
# Updated : 2025.01.25
# Version : 1.1.2
# Updated : 2025.04.01
# Version : 1.1.1
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -15,17 +15,21 @@
# 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>.
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
substitutions:
# YamBMS settings
yambms_id: 'yambms1'
yambms_name: 'YamBMS 1'
# Shunt settings
shunt_update_interval: '3s' # frequency at which Shunt data is refreshed
shunt_combine_interval: '1s' # frequency at which data is combined in YamBMS
# BMS settings
bms_battery_chemistry: '1' # 1-LFP | 2-Li-ion | 3-LTO
bms_update_interval: '3s' # frequency at which BMS data is refreshed, going below '3s' can cause problems
bms_combine_interval: '1s' # frequency at which data is combined in YamBMS
bms_cutoff_timer: '60s'
sensor:
# +--------------------------------------+
# | Battery State of Health (SOH) |
# +--------------------------------------+
- platform: template
name: ${name} ${bms_name} Battery SoH
id: bms${bms_id}_battery_soh
unit_of_measurement: "%"
device_class: battery
update_interval: ${bms_update_interval}
accuracy_decimals: 0
filters:
- or:
- throttle: 10s
- delta: 1
lambda: return round(((id(bms${bms_id}_charging_cycles).state/${bms_cell_max_cycles})-1)*-100);
+6 -3
View File
@@ -1,5 +1,5 @@
# Updated : 2025.01.24
# Version : 1.5.4
# Updated : 2025.04.01
# Version : 1.5.5
# GitHub : https://github.com/Sleeper85/esphome-yambms
# This YAML is free software: you can redistribute it and/or
@@ -121,7 +121,10 @@ interval:
id(${yambms_id}_var_total_capacity_remaining_ah) += id(bms${bms_id}_capacity_remaining_ah).state;
// TOTAL SoC
id(${yambms_id}_var_bms_total_soc) += id(bms${bms_id}_battery_soc).state;
// id(${yambms_id}_var_bms_total_soc) += id(bms${bms_id}_battery_soc).state;
// TOTAL SoH
id(${yambms_id}_var_bms_total_soh) += id(bms${bms_id}_battery_soh).state;
// TOTAL charging_cycles
id(${yambms_id}_var_total_charging_cycles) += id(bms${bms_id}_charging_cycles).state;
@@ -0,0 +1,28 @@
# Updated : 2025.04.14
# Version : 1.1.1
# GitHub : https://github.com/GHswitt/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:
bms_model: "DEYE"
bms_protocol: "CAN"
packages:
bms_base: !include bms_base.yaml
bms_combine: !include bms_combine.yaml
bms_errors_bitmask: !include bms_errors_bitmask_DEYE_CAN.yaml
bms_module: !include bms_sensors_DEYE_CAN_module_full.yaml
@@ -0,0 +1,28 @@
# Updated : 2025.04.14
# Version : 1.1.1
# GitHub : https://github.com/GHswitt/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:
bms_model: "DEYE"
bms_protocol: "CAN"
packages:
bms_base: !include bms_base.yaml
bms_combine: !include bms_combine.yaml
bms_errors_bitmask: !include bms_errors_bitmask_DEYE_CAN.yaml
bms_module: !include bms_sensors_DEYE_CAN_module_minimal.yaml
@@ -1,5 +1,5 @@
# Updated : 2025.01.28
# Version : 1.2.6
# Updated : 2025.04.01
# Version : 1.2.7
# GitHub : https://github.com/syssi/esphome-jk-bms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -25,7 +25,8 @@ packages:
bms_base: !include bms_base.yaml
bms_combine: !include bms_combine.yaml
bms_temperature_sensor: !include bms_temperature_sensor_2.yaml
bms_errors_bitmask: !include bms_errors_bitmask_JK-ALL_BLE.yaml
bms_errors_bitmask: !include bms_errors_bitmask_JK_BLE.yaml
bms_battery_soh: !include bms_battery_soh.yaml
ota:
on_begin:
@@ -1,5 +1,5 @@
# Updated : 2025.01.28
# Version : 1.2.6
# Updated : 2025.04.01
# Version : 1.2.7
# GitHub : https://github.com/syssi/esphome-jk-bms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -25,7 +25,8 @@ packages:
bms_base: !include bms_base.yaml
bms_combine: !include bms_combine.yaml
bms_temperature_sensor: !include bms_temperature_sensor_2.yaml
bms_errors_bitmask: !include bms_errors_bitmask_JK-ALL_BLE.yaml
bms_errors_bitmask: !include bms_errors_bitmask_JK_BLE.yaml
bms_battery_soh: !include bms_battery_soh.yaml
ota:
on_begin:
@@ -1,5 +1,5 @@
# Updated : 2025.01.28
# Version : 1.2.6
# Updated : 2025.04.01
# Version : 1.2.7
# GitHub : https://github.com/syssi/esphome-jk-bms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -25,7 +25,8 @@ packages:
bms_base: !include bms_base.yaml
bms_combine: !include bms_combine.yaml
bms_temperature_sensor: !include bms_temperature_sensor_2.yaml
bms_errors_bitmask: !include bms_errors_bitmask_JK-ALL_BLE.yaml
bms_errors_bitmask: !include bms_errors_bitmask_JK_BLE.yaml
bms_battery_soh: !include bms_battery_soh.yaml
ota:
on_begin:
@@ -1,5 +1,5 @@
# Updated : 2024.12.23
# Version : 1.1.1
# Updated : 2024.04.01
# Version : 1.1.2
# GitHub : https://github.com/syssi/esphome-jk-bms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -22,5 +22,5 @@ substitutions:
bms_protocol: "BLE"
packages:
bms_sensors: !include bms_sensors_JK-ALL_BLE_standard.yaml
bms_sensors: !include bms_sensors_JK_BLE_standard.yaml
bms_combine: !include bms_combine.yaml
@@ -1,5 +1,5 @@
# Updated : 2025.01.16
# Version : 1.1.2
# Updated : 2025.04.01
# Version : 1.1.3
# GitHub : https://github.com/syssi/esphome-jk-bms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -18,13 +18,14 @@
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
substitutions:
bms_model: "JK-B"
bms_model: "JK"
bms_protocol: "DISPLAY"
packages:
bms_base: !include bms_base.yaml
bms_combine: !include bms_combine.yaml
bms_temperature_sensor: !include bms_temperature_sensor_2.yaml
bms_battery_soh: !include bms_battery_soh.yaml
# +--------------------------------------+
# | DISPLAY port schematic |
@@ -1,4 +1,4 @@
# Updated : 2025.03.30
# Updated : 2025.04.21
# Version : 1.1.1
# GitHub : https://github.com/syssi/esphome-jk-bms
@@ -18,5 +18,5 @@
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
packages:
bms_sensors: !include bms_sensors_JK-PB_RS485_bms_full.yaml
bms_sensors: !include bms_sensors_JK_RS485_Modbus_JK-B_standard.yaml
bms_combine: !include bms_combine.yaml
@@ -1,5 +1,5 @@
# Updated : 2025.03.30
# Version : 1.1.1
# Updated : 2025.04.01
# Version : 1.1.2
# GitHub : https://github.com/syssi/esphome-jk-bms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -18,5 +18,5 @@
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
packages:
bms_sensors: !include bms_sensors_JK-PB_RS485_bms_standard.yaml
bms_sensors: !include bms_sensors_JK_RS485_Modbus_bms_full.yaml
bms_combine: !include bms_combine.yaml
@@ -1,5 +1,5 @@
# Updated : 2025.01.25
# Version : 1.2.4
# Updated : 2025.04.01
# Version : 1.2.5
# GitHub : https://github.com/txubelaxu/esphome-jk-bms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -21,7 +21,7 @@ packages:
bms_base: !include bms_base.yaml
bms_combine: !include bms_combine.yaml
bms_temperature_sensor: !include bms_temperature_sensor_5.yaml
bms_errors_bitmask: !include bms_errors_bitmask_JK-PB_RS485.yaml
bms_errors_bitmask: !include bms_errors_bitmask_JK_RS485_Modbus.yaml
# +--------------------------------------+
# | Component settings |
@@ -183,7 +183,8 @@ sensor:
name: "${name} ${bms_name} uart1 protocol number"
uart2_protocol_number:
name: "${name} ${bms_name} uart2 protocol number"
battery_soh_valuation:
battery_soh_valuation:
id: bms${bms_id}_battery_soh
name: "${name} ${bms_name} battery soh valuation"
text_sensor:
@@ -0,0 +1,22 @@
# Updated : 2025.04.01
# Version : 1.1.2
# 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>.
packages:
bms_sensors: !include bms_sensors_JK_RS485_Modbus_bms_standard.yaml
bms_combine: !include bms_combine.yaml
@@ -1,5 +1,5 @@
# Updated : 2025.01.25
# Version : 1.2.7
# Updated : 2025.04.01
# Version : 1.2.8
# GitHub : https://github.com/txubelaxu/esphome-jk-bms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -18,7 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
substitutions:
bms_model: "JK-PB"
bms_model: "JK"
bms_protocol: "RS485"
logger:
@@ -1,5 +1,5 @@
# Updated : 2025.01.25
# Version : 1.2.7
# Updated : 2025.04.01
# Version : 1.2.8
# GitHub : https://github.com/txubelaxu/esphome-jk-bms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -18,7 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
substitutions:
bms_model: "JK-PB"
bms_model: "JK"
bms_protocol: "RS485"
logger:
@@ -1,5 +1,5 @@
# Updated : 2024.12.23
# Version : 1.1.1
# Updated : 2025.04.01
# Version : 1.1.2
# GitHub : https://github.com/syssi/esphome-jk-bms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -18,9 +18,9 @@
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
substitutions:
bms_model: "JK-B"
bms_protocol: "UART"
bms_model: "JK"
bms_protocol: "UART 4G-GPS"
packages:
bms_sensors: !include bms_sensors_JK-B_UART_full.yaml
bms_sensors: !include bms_sensors_JK_UART_4G-GPS_full.yaml
bms_combine: !include bms_combine.yaml
@@ -1,5 +1,5 @@
# Updated : 2025.01.25
# Version : 1.2.6
# Updated : 2025.04.01
# Version : 1.2.8
# GitHub : https://github.com/syssi/esphome-jk-bms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -18,14 +18,15 @@
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
substitutions:
bms_model: "JK-B"
bms_protocol: "UART"
bms_model: "JK"
bms_protocol: "UART 4G-GPS"
packages:
bms_base: !include bms_base.yaml
bms_combine: !include bms_combine.yaml
bms_temperature_sensor: !include bms_temperature_sensor_2.yaml
bms_errors_bitmask: !include bms_errors_bitmask_JK-B_UART.yaml
bms_errors_bitmask: !include bms_errors_bitmask_JK_UART_4G-GPS.yaml
bms_battery_soh: !include bms_battery_soh.yaml
# +--------------------------------------+
# | Component settings |
@@ -1,5 +1,5 @@
# Updated : 2025.01.16
# Version : 1.1.2
# Updated : 2025.04.01
# Version : 1.1.3
# GitHub : https://github.com/syssi/esphome-seplos-bms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -143,6 +143,7 @@ sensor:
id: bms${bms_id}_charging_cycles
name: "${name} ${bms_name} charging cycles"
state_of_health:
id: bms${bms_id}_battery_soh
name: "${name} ${bms_name} state of health"
port_voltage:
name: "${name} ${bms_name} port voltage"
+19 -3
View File
@@ -1,5 +1,5 @@
# Updated : 2025.01.25
# Version : 1.1.3
# Updated : 2025.04.01
# Version : 1.1.4
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -132,7 +132,7 @@ sensor:
- platform: modbus_controller
modbus_controller_id: modbus_controller${bms_id}
id: bms${bms_id}_battery_soc
name: "${name} ${bms_name} SoC"
name: "${name} ${bms_name} Battery SoC"
register_type: read
address: 11
value_type: U_WORD
@@ -442,3 +442,19 @@ sensor:
- or:
- throttle: 10s
- delta: 0.01
# battery_soh
- platform: modbus_controller
modbus_controller_id: modbus_controller${bms_id}
id: bms${bms_id}_battery_soh
name: "${name} ${bms_name} Battery SoH"
register_type: read
address: 33
value_type: U_WORD
accuracy_decimals: 0
unit_of_measurement: '%'
device_class: battery
filters:
- multiply: 1
- or:
- throttle: 10s
- delta: 1
@@ -0,0 +1,159 @@
# Updated : 2025.04.14
# Version : 1.1.1
# 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>.
# +--------------------------------------+
# | DEYE CAN PCS Errors Bitmask (64bit) |
# +--------------------------------------+
# Bit 0 Cell overvoltage 0000 0000 0000 0001 0x0001
# Bit 1 Cell undervoltage 0000 0000 0000 0010 0x0002
# Bit 2 Module overvoltage 0000 0000 0000 0100 0x0004
# Bit 3 Module undervoltage 0000 0000 0000 1000 0x0008
# Bit 4 Charge overcurrent 0000 0000 0001 0000 0x0010
# Bit 5 Discharge overcurrent 0000 0000 0010 0000 0x0020
# Bit 6 Cell overtemperature charge 0000 0000 0100 0000 0x0040
# Bit 7 Cell undertemperature charge 0000 0000 1000 0000 0x0080
# Bit 8 Cell overtemperature discharge 0000 0001 0000 0000 0x0100
# Bit 9 Cell undertemperature discharge 0000 0010 0000 0000 0x0200
# Bit 10 Cell voltage overdifference 0000 0100 0000 0000 0x0400
# Bit 11 Cell temperature overdifference 0000 1000 0000 0000 0x0800
# Bit 12 MOSFET overtemperature 0001 0000 0000 0000 0x1000
# Bit 13 Heating film overtemperature 0010 0000 0000 0000 0x2000
# Bit 14 0100 0000 0000 0000 0x4000
# Bit 15 1000 0000 0000 0000 0x8000
# Bit 16 AFE communication fail 0001 0000 0000 0000 0000 0x10000
# Bit 17 Cell voltage sampling fail 0010 0000 0000 0000 0000 0x20000
# Bit 18 Temperature sampling fail 0100 0000 0000 0000 0000 0x40000
# Bit 19 MOSFET short circuit 1000 0000 0000 0000 0000 0x80000
# Bit 20 EEPROM error 0001 0000 0000 0000 0000 0000 0x100000
# Bit 21 Internal communication fail 0010 0000 0000 0000 0000 0000 0x200000
# Bit 22 PCS communication fail 0100 0000 0000 0000 0000 0000 0x400000
# Bit 23 Master address repeat 1000 0000 0000 0000 0000 0000 0x800000
# Bit 24 Cell high voltage 0x1000000
# Bit 25 Cell low voltage 0x2000000
# Bit 26 Module high voltage 0x4000000
# Bit 27 Module low voltage 0x8000000
# Bit 28 Charge high current 0x10000000
# Bit 29 Discharge high current 0x20000000
# Bit 30 Cell high temperature charge 0x40000000
# Bit 31 Cell low temperature charge 0x80000000
# Bit 32 Cell high temperature discharge 0x100000000
# Bit 33 Cell low temperature discharge 0x200000000
# Bit 34 Cell voltage high difference 0x400000000
# Bit 35 Cell temperature high difference 0x800000000
# Bit 36 MOSFET high temperature 0x1000000000
# Bit 37 Heating film high temperature 0x2000000000
# Bit 38 Heat MOS adheasion 0x4000000000
# Bit 49 Heat error 0x8000000000
# +--------------------------------------+
# | YamBMS Errors Bitmask (16bit) |
# +--------------------------------------+
# Bit 0 General alarm 0000 0000 0000 0001 0x0001
# Bit 1 Battery high voltage alarm 0000 0000 0000 0010 0x0002
# Bit 2 Battery low voltage alarm 0000 0000 0000 0100 0x0004
# Bit 3 Battery high temperature alarm 0000 0000 0000 1000 0x0008
# Bit 4 Battery low temperature alarm 0000 0000 0001 0000 0x0010
# Bit 5 Battery high temperature charge alarm 0000 0000 0010 0000 0x0020
# Bit 6 Battery low temperature charge alarm 0000 0000 0100 0000 0x0040
# Bit 7 Battery high discharge current alarm 0000 0000 1000 0000 0x0080
# Bit 8 Battery high charge current alarm 0000 0001 0000 0000 0x0100
# Bit 9 Contactor alarm 0000 0010 0000 0000 0x0200
# Bit 10 Short circuit alarm 0000 0100 0000 0000 0x0400
# Bit 11 BMS internal alarm 0000 1000 0000 0000 0x0800
# Bit 12 Cell imbalance alarm 0001 0000 0000 0000 0x1000
# Bit 13 Reserved 0010 0000 0000 0000 0x2000
# Bit 14 Reserved 0100 0000 0000 0000 0x4000
# Bit 15 Reserved 1000 0000 0000 0000 0x8000
sensor:
- platform: template
id: bms${bms_id}_yambms_errors_bitmask
name: "${name} ${bms_name} YamBMS Errors Bitmask"
update_interval: ${bms_update_interval}
accuracy_decimals: 0
icon: mdi:alert-circle-outline
filters:
- or:
- throttle: 10s
- delta: 1
lambda: |-
uint64_t bms_errors_bitmask = id(deye${deye_id}_bms_errors_bitmask).state;
uint16_t yambms_errors_bitmask = 0;
if (bms_errors_bitmask > 0)
{
// General alarm:
// Unused
// High voltage
if (bms_errors_bitmask & 0x0005) yambms_errors_bitmask |= 0x0002; // Cell or module
// Low voltage
if (bms_errors_bitmask & 0x000A) yambms_errors_bitmask |= 0x0004; // Cell or module
// High temperature:
// - Cell overtemperature discharge
// - MOSFET overtemperature
// - Heating film overtemperature
// - Cell high temperature discharge
// - MOSFET high temperature
// - Heating film high temperature
if (bms_errors_bitmask & 0x3100003100) yambms_errors_bitmask |= 0x0008;
// Low temperature:
// - Cell undertemperature discharge
// - Cell low temperature discharge
if (bms_errors_bitmask & 0x200000200) yambms_errors_bitmask |= 0x0010;
// High temperature charge:
// - Cell overtemperature charge
// - Cell high temperature charge
if (bms_errors_bitmask & 0x40000040) yambms_errors_bitmask |= 0x0020;
// Low temperature charge:
// - Cell undertemperature charge
// - Cell low temperature charge
if (bms_errors_bitmask & 0x80000080) yambms_errors_bitmask |= 0x0040;
// High discharge current:
// - Discharge overcurrent
// - Discharge high current
if (bms_errors_bitmask & 0x20000020) yambms_errors_bitmask |= 0x0080;
// High charge current:
// - Charge overcurrent
// - Charge high current
if (bms_errors_bitmask & 0x10000010) yambms_errors_bitmask |= 0x0100;
// Contactor:
// Unused
// Short circuit alarm:
// - MOSFET short circuit
if (bms_errors_bitmask & 0x80000) yambms_errors_bitmask |= 0x0400;
// BMS internal alarm:
// - AFE communication fail
// - Cell voltage sampling fail
// - Temperature sampling fail
// - EEPROM error
// - Internal communication fail
// - PCS communication fail
if (bms_errors_bitmask & 0x770000) yambms_errors_bitmask |= 0x0800;
// Cell imbalance alarm:
// - Cell overvoltage
// - Cell undervoltage
// - Cell voltage overdifference
// - Cell voltage high difference
// - Cell temperature overdifference
// - Cell temperature high difference
if (bms_errors_bitmask & 0xC00000C03) yambms_errors_bitmask |= 0x1000;
}
return yambms_errors_bitmask;
@@ -18,7 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
# +--------------------------------------+
# | JK-ALL BLE Errors Bitmask (16bit) |
# | JK BLE Errors Bitmask (16bit) |
# +--------------------------------------+
# Bit 0 Charge overtemperature 0000 0000 0000 0001 0x0001
@@ -17,9 +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>.
# +--------------------------------------+
# | JK-PB RS485 Errors Bitmask (24bit) |
# +--------------------------------------+
# +----------------------------------------+
# | JK RS485 Modbus Errors Bitmask (24bit) |
# +----------------------------------------+
# Bit 0 Wire resistance 0000 0000 0000 0001 0x0001
# Bit 1 MOS OTP 0000 0000 0000 0010 0x0002
@@ -17,9 +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>.
# +--------------------------------------+
# | JK-B UART Errors Bitmask (16bit) |
# +--------------------------------------+
# +---------------------------------------+
# | JK UART 4G-GPS Errors Bitmask (16bit) |
# +---------------------------------------+
# Bit 0 Low capacity 0000 0000 0000 0001 0x0001
# Bit 1 Power tube overtemperature 0000 0000 0000 0010 0x0002
@@ -0,0 +1,28 @@
# Updated : 2025.04.22
# 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:
bms_model: "DEYE"
bms_protocol: "CAN-Modbus"
packages:
bms_base: !include bms_base.yaml
bms_sensors: !include bms_sensors_DEYE_CAN_module_full.yaml
bms_errors_bitmask: !include bms_errors_bitmask_DEYE_CAN.yaml
bms_combine: !include bms_modbus_server.yaml
@@ -1,5 +1,5 @@
# Updated : 2024.12.23
# Version : 1.1.1
# Updated : 2025.04.01
# Version : 1.1.2
# GitHub : https://github.com/syssi/esphome-jk-bms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -22,5 +22,5 @@ substitutions:
bms_protocol: "BLE-Modbus"
packages:
bms_sensors: !include bms_sensors_JK-ALL_BLE_standard.yaml
bms_sensors: !include bms_sensors_JK_BLE_standard.yaml
bms_combine: !include bms_modbus_server.yaml
@@ -0,0 +1,26 @@
# Updated : 2025.04.22
# 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:
bms_model: "JK"
bms_protocol: "RS485-Modbus"
packages:
bms_sensors: !include bms_sensors_JK_RS485_Modbus_bms_standard.yaml
bms_combine: !include bms_modbus_server.yaml
@@ -1,5 +1,5 @@
# Updated : 2024.12.23
# Version : 1.1.1
# Updated : 2025.04.01
# Version : 1.1.2
# GitHub : https://github.com/syssi/esphome-jk-bms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -18,9 +18,9 @@
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
substitutions:
bms_model: "JK-B"
bms_model: "JK"
bms_protocol: "UART-Modbus"
packages:
bms_sensors: !include bms_sensors_JK-B_UART_full.yaml
bms_sensors: !include bms_sensors_JK_UART_4G-GPS_full.yaml
bms_combine: !include bms_modbus_server.yaml
+8 -3
View File
@@ -1,5 +1,5 @@
# Updated : 2025.01.18
# Version : 1.1.2
# Updated : 2025.04.01
# Version : 1.1.3
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -56,7 +56,7 @@ modbus_controller:
value_type: S_DWORD
read_lambda: |-
return int32_t(id(bms${bms_id}_power).state * 1000);
# soc (%)
# battery_soc (%)
- address: 11
value_type: U_WORD
read_lambda: |-
@@ -156,3 +156,8 @@ modbus_controller:
value_type: U_DWORD
read_lambda: |-
return uint32_t(id(bms${bms_id}_discharging_power).state * 1000);
# battery_soh (%)
- address: 33
value_type: U_WORD
read_lambda: |-
return uint16_t(id(bms${bms_id}_battery_soh).state);
+4 -5
View File
@@ -1,5 +1,5 @@
# Updated : 2025.01.27
# Version : 1.1.2
# Updated : 2025.04.07
# Version : 1.1.4
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -28,11 +28,10 @@ interval:
- interval: ${bms_combine_interval}
then:
- lambda: |-
float battery_v = id(bms${bms_id}_total_voltage).state;
float rebulk_v = id(${yambms_id}_rebulk_voltage).state;
id(${yambms_id}_bms_charging_logic) = true;
// Charge switch `Turn ON` conditions (Charge switch OFF and ReBulk V.)
if (!id(bms${bms_id}_charge_switch).state && (battery_v <= rebulk_v))
if (!id(bms${bms_id}_charge_switch).state && (id(${yambms_id}_charge_status) == "EOC" || id(${yambms_id}_charge_status) == "Float"))
{
id(bms${bms_id}_charge_switch).turn_on();
ESP_LOGD("main", "BMS ${bms_id} charge_switch Turn ON");
@@ -0,0 +1,618 @@
# Updated : 2025.05.05
# Version : 1.1.2
# GitHub : https://github.com/GHswitt/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>.
# +-----------------------------------------------+
# | DEYE CAN PCS module frames |
# | Thanks to: |
# | https://github.com/Psynosaur/esphome-deye-bms |
# +-----------------------------------------------+
canbus:
- id: !extend ${canbus_id}
on_frame:
- can_id: 0x11${deye_module_id}
then:
- lambda: |-
id(bms${bms_id}_heat_mos_state).publish_state(x[7] & 0x80);
id(bms${bms_id}_precharge_mos_state).publish_state(x[7] & 0x40);
id(bms${bms_id}_discharge_mos_state).publish_state(x[7] & 0x20);
id(bms${bms_id}_charge_mos_state).publish_state(x[7] & 0x10);
id(bms${bms_id}_parallel_finish).publish_state(x[7] & 0x1);
- can_id: 0x15${deye_module_id}
then:
- lambda: |-
float voltage = ((x[1] << 8) | x[0]) / 10.0;
id(bms${bms_id}_total_voltage).publish_state(voltage);
float current = ((x[3] << 8) | x[2]) / -10.0;
if(x[3] > 0x80) current = uint16_t(~((x[3] << 8) | x[2]) + 1) / 10.0;
id(bms${bms_id}_current).publish_state(current);
float soc = ((x[5] << 8) | x[4]) / 10.0;
id(bms${bms_id}_state_of_charge).publish_state(soc);
float soh = ((x[7] << 8) | x[6]) / 10.0;
id(bms${bms_id}_battery_soh).publish_state(soh);
# ESP_LOGI("canid 0x150:", "U : %.1f V, I %.1f A, SoC: %.1f %, SoH %.1f %", voltage, current, soc, soh );
- can_id: 0x20${deye_module_id}
then:
- lambda: |-
float cell_u_max = ((x[1] << 8) | x[0]) / 1000.0;
id(bms${bms_id}_max_cell_voltage).publish_state(cell_u_max);
float cell_u_min = ((x[3] << 8) | x[2]) / 1000.0;
id(bms${bms_id}_min_cell_voltage).publish_state(cell_u_min);
float temp_max = ((x[5] << 8) | x[4]) / 10.0;
id(bms${bms_id}_max_temperature).publish_state(temp_max);
float temp_min = ((x[7] << 8) | x[6]) / 10.0;
id(bms${bms_id}_min_temperature).publish_state(temp_min);
# ESP_LOGI("canid 0x200:", "U cell max: %.3f V, U cell min %.3f V, Temp max: %.1f, T_min %.1f V", cell_u_max, cell_u_min, temp_max, temp_min );
- can_id: 0x25${deye_module_id}
then:
- lambda: |-
float mosmax = ((x[1] << 8) | x[0]) / 10.0;
if(x[1] > 0x80) mosmax = uint16_t(~((x[1] << 8) | x[0]) + 1) / -10.0;
id(bms${bms_id}_mosmax).publish_state(mosmax);
float heatmem = (x[3] << 8) | x[2];
if(x[3] > 0x80) heatmem = uint16_t(~((x[3] << 8) | x[2]) + 1) / -10.0;
id(bms${bms_id}_heatmem).publish_state(heatmem);
int val3 = ((x[5] << 8) | x[4]);
id(bms${bms_id}_max_charge_current).publish_state(val3);
int val4 = ((x[7] << 8) | x[6]);
id(bms${bms_id}_max_discharge_current).publish_state(val4);
# ESP_LOGI("canid 0x250:", "%.1f, %.1f, %d, %d", mosmax, heatmem, val3, val4 );
- can_id: 0x40${deye_module_id}
then:
- lambda: |-
// Process frame
id(bms${bms_id}_operation_mode_internal).publish_state(x[0]);
if(x[1] == 0) id(bms${bms_id}_fault_level).publish_state("no fault");
if(x[1] == 1) id(bms${bms_id}_fault_level).publish_state("minor fault");
if(x[1] == 2) id(bms${bms_id}_fault_level).publish_state("serious fault");
id(bms${bms_id}_fault).publish_state(x[1] & 3);
float cycles = ((x[3] << 8) | x[2]);
id(bms${bms_id}_charging_cycles).publish_state(cycles);
// Set cell balancing states based on x[4] and x[5]
//for (int i = 1; i <= 8; i++) {
// std::to_string(high_position).c_str()
// id(bms${bms_id}_cell_ + i + _balancing).publish_state(x[4] & (1 << (i - 1)));
//}
//for (int i = 9; i <= 16; i++) {
// id(bms${bms_id}_cell_ + i + _balancing).publish_state(x[5] & (1 << (i - 9)));
//}
id(bms${bms_id}_cell_1_balancing).publish_state(x[4] & 0x1);
id(bms${bms_id}_cell_2_balancing).publish_state(x[4] & 0x2);
id(bms${bms_id}_cell_3_balancing).publish_state(x[4] & 0x4);
id(bms${bms_id}_cell_4_balancing).publish_state(x[4] & 0x8);
id(bms${bms_id}_cell_5_balancing).publish_state(x[4] & 0x10);
id(bms${bms_id}_cell_6_balancing).publish_state(x[4] & 0x20);
id(bms${bms_id}_cell_7_balancing).publish_state(x[4] & 0x40);
id(bms${bms_id}_cell_8_balancing).publish_state(x[4] & 0x80);
id(bms${bms_id}_cell_9_balancing).publish_state(x[5] & 0x1);
id(bms${bms_id}_cell_10_balancing).publish_state(x[5] & 0x2);
id(bms${bms_id}_cell_11_balancing).publish_state(x[5] & 0x4);
id(bms${bms_id}_cell_12_balancing).publish_state(x[5] & 0x8);
id(bms${bms_id}_cell_13_balancing).publish_state(x[5] & 0x10);
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]);
- can_id: 0x55${deye_module_id}
then:
- lambda: |-
float charged = ((x[3] << 24) | (x[2] << 16) | (x[1] << 8) | x[0]) / 1000.0;
id(bms${bms_id}_charged).publish_state(charged);
float discharged = ((x[7] << 24) | (x[6] << 16) | (x[5] << 8) | x[5]) / 1000.0;
id(bms${bms_id}_discharged).publish_state(discharged);
# ESP_LOGI("canid 0x550:", "%.3f kWh, %.3f kWh", charged, discharged );
# ESP_LOGI("canid 0x550:", "%02x %02x %02x %02x %02x %02x %02x %02x", x[0], x[1], x[2], x[3], x[4], x[5], x[6], x[7]);
- can_id: 0x70${deye_module_id}
then:
- lambda: |
id(bms${bms_id}_charge_over_voltage_count).publish_state((x[1] << 8) | x[0]);
id(bms${bms_id}_discharge_under_voltage_count).publish_state((x[3] << 8) | x[2]);
id(bms${bms_id}_short_circuit_count).publish_state((x[5] << 8) | x[4]);
id(bms${bms_id}_mos_over_temp_count).publish_state((x[7] << 8) | x[6]);
- can_id: 0x75${deye_module_id}
then:
- lambda: |-
id(bms${bms_id}_charge_over_current_count).publish_state((x[1] << 8) | x[0]);
id(bms${bms_id}_discharge_over_current_count).publish_state((x[3] << 8) | x[2]);
id(bms${bms_id}_charge_over_temp_count).publish_state((x[5] << 8) | x[4]);
id(bms${bms_id}_discharge_over_temp_count).publish_state((x[7] << 8) | x[6]);
binary_sensor:
# Online status: TODO
- platform: template
id: bms${bms_id}_online_status
name: "${name} ${bms_name} status online"
lambda: |-
if (id(bms${bms_id}_total_voltage).state > 0)
return true;
else
return false;
# Equalizing
- platform: template
id: bms${bms_id}_equalizing
name: "${name} ${bms_name} status balancing"
filters:
- delayed_off: 300s
# Charging allowed
- platform: template
id: bms${bms_id}_charging_allowed
name: "${name} ${bms_name} charging allowed"
lambda: |-
return id(bms${bms_id}_charge_mos_state).state && !id(bms${bms_id}_fault).state;
# Discharging allowed
- platform: template
id: bms${bms_id}_discharging_allowed
name: "${name} ${bms_name} discharging allowed"
lambda: |-
return id(bms${bms_id}_discharge_mos_state).state && !id(bms${bms_id}_fault).state;
# Fault
- platform: template
name: "${name} ${bms_name} fault"
id: "bms${bms_id}_fault"
- platform: template
id: "bms${bms_id}_heat_mos_state"
name: "${name} ${bms_name} status heating"
- platform: template
name: "${name} ${bms_name} precharge mos state"
id: "bms${bms_id}_precharge_mos_state"
- platform: template
name: "${name} ${bms_name} discharge mos state"
id: "bms${bms_id}_discharge_mos_state"
- platform: template
name: "${name} ${bms_name} charge mos state"
id: "bms${bms_id}_charge_mos_state"
- platform: template
name: "${name} ${bms_name} parallel finish"
id: "bms${bms_id}_parallel_finish"
- platform: template
name: "${name} ${bms_name} cell 01 balancing"
id: "bms${bms_id}_cell_1_balancing"
- platform: template
name: "${name} ${bms_name} cell 02 balancing"
id: "bms${bms_id}_cell_2_balancing"
- platform: template
name: "${name} ${bms_name} cell 03 balancing"
id: "bms${bms_id}_cell_3_balancing"
- platform: template
name: "${name} ${bms_name} cell 04 balancing"
id: "bms${bms_id}_cell_4_balancing"
- platform: template
name: "${name} ${bms_name} cell 05 balancing"
id: "bms${bms_id}_cell_5_balancing"
- platform: template
name: "${name} ${bms_name} cell 06 balancing"
id: "bms${bms_id}_cell_6_balancing"
- platform: template
name: "${name} ${bms_name} cell 07 balancing"
id: "bms${bms_id}_cell_7_balancing"
- platform: template
name: "${name} ${bms_name} cell 08 balancing"
id: "bms${bms_id}_cell_8_balancing"
- platform: template
name: "${name} ${bms_name} cell 09 balancing"
id: "bms${bms_id}_cell_9_balancing"
- platform: template
name: "${name} ${bms_name} cell 10 balancing"
id: "bms${bms_id}_cell_10_balancing"
- platform: template
name: "${name} ${bms_name} cell 11 balancing"
id: "bms${bms_id}_cell_11_balancing"
- platform: template
name: "${name} ${bms_name} cell 12 balancing"
id: "bms${bms_id}_cell_12_balancing"
- platform: template
name: "${name} ${bms_name} cell 13 balancing"
id: "bms${bms_id}_cell_13_balancing"
- platform: template
name: "${name} ${bms_name} cell 14 balancing"
id: "bms${bms_id}_cell_14_balancing"
- platform: template
name: "${name} ${bms_name} cell 15 balancing"
id: "bms${bms_id}_cell_15_balancing"
- platform: template
name: "${name} ${bms_name} cell 16 balancing"
id: "bms${bms_id}_cell_16_balancing"
sensor:
# Total voltage
- platform: template
name: "${name} ${bms_name} total voltage"
id: "bms${bms_id}_total_voltage"
unit_of_measurement: 'V'
device_class: 'voltage'
state_class: 'measurement'
accuracy_decimals: 2
filters:
- timeout:
timeout: 60s
value: !lambda return 0;
# Current
- platform: template
name: "${name} ${bms_name} current"
id: "bms${bms_id}_current"
unit_of_measurement: 'A'
device_class: 'current'
state_class: 'measurement'
accuracy_decimals: 1
# Battery power (calculated)
- platform: template
id: bms${bms_id}_power
name: "${name} ${bms_name} battery power"
unit_of_measurement: 'W'
device_class: 'current'
state_class: 'measurement'
accuracy_decimals: 0
lambda: |-
return id(bms${bms_id}_total_voltage).state * id(bms${bms_id}_current).state;
# Charging power: Calculated from voltage and current
- platform: template
name: "${name} ${bms_name} battery power charging"
id: bms${bms_id}_charging_power
unit_of_measurement: 'W'
device_class: 'current'
state_class: 'measurement'
accuracy_decimals: 0
lambda: |-
if (id(bms${bms_id}_current).state > 0) return id(bms${bms_id}_total_voltage).state * id(bms${bms_id}_current).state;
else return 0;
# Discharging power: Calculated from voltage and current
- platform: template
name: "${name} ${bms_name} battery power discharging"
id: bms${bms_id}_discharging_power
unit_of_measurement: 'W'
device_class: 'current'
state_class: 'measurement'
accuracy_decimals: 0
lambda: |-
if (id(bms${bms_id}_current).state < 0) return id(bms${bms_id}_total_voltage).state * -id(bms${bms_id}_current).state;
else return 0;
# SoC
- platform: template
name: "${name} ${bms_name} SoC"
id: "bms${bms_id}_state_of_charge"
unit_of_measurement: '%'
device_class: 'battery'
state_class: 'measurement'
accuracy_decimals: 1
# Battery capacity
- platform: template
name: "${name} ${bms_name} battery capacity"
id: bms${bms_id}_battery_capacity
unit_of_measurement: 'Ah'
device_class: 'energy'
state_class: 'total_increasing'
accuracy_decimals: 0
lambda: |-
uint8_t module_count = id(deye${deye_id}_module_amount).state;
if (module_count < 1) module_count = 1;
return id(deye${deye_id}_battery_capacity).state / module_count;
# Remaining capacity: Calculated from capacity and SoC
- platform: template
unit_of_measurement: 'Ah'
device_class: 'battery'
state_class: 'measurement'
accuracy_decimals: 0
id: bms${bms_id}_capacity_remaining_ah
name: "${name} ${bms_name} battery capacity remaining"
lambda: |-
return (id(bms${bms_id}_state_of_charge).state * id(bms${bms_id}_battery_capacity).state) / 100;
filters:
- or:
- throttle: 10s
- delta: 1
# Charging cycles
- platform: template
name: "${name} ${bms_name} cycles"
id: "bms${bms_id}_charging_cycles"
state_class: 'measurement'
accuracy_decimals: 0
filters:
- or:
- throttle: 600s
- delta: 1
# Max. charge current
- platform: template
name: "${name} ${bms_name} max charge current"
id: "bms${bms_id}_max_charge_current"
unit_of_measurement: 'A'
device_class: 'current'
state_class: 'measurement'
accuracy_decimals: 0
# Max. discharge current
- platform: template
name: "${name} ${bms_name} max discharge current"
id: "bms${bms_id}_max_discharge_current"
unit_of_measurement: 'A'
device_class: 'current'
state_class: 'measurement'
accuracy_decimals: 0
# Max. cell voltage
- platform: template
name: "${name} ${bms_name} max cell voltage"
id: "bms${bms_id}_max_cell_voltage"
unit_of_measurement: 'V'
device_class: 'voltage'
state_class: 'measurement'
accuracy_decimals: 3
# Max. voltage cell: Only with InterCAN enabled
- platform: template
state_class: 'measurement'
accuracy_decimals: 0
id: bms${bms_id}_max_voltage_cell
name: "${name} ${bms_name} cell voltage max cell number"
lambda: return 0;
# Min. cell voltage
- platform: template
name: "${name} ${bms_name} min cell voltage"
id: "bms${bms_id}_min_cell_voltage"
unit_of_measurement: 'V'
device_class: 'voltage'
state_class: 'measurement'
accuracy_decimals: 3
on_value:
then:
- component.update: bms${bms_id}_imbalance
# Min. voltage cell: Only with InterCAN enabled
- platform: template
state_class: 'measurement'
accuracy_decimals: 0
id: bms${bms_id}_min_voltage_cell
name: "${name} ${bms_name} cell voltage min cell number"
lambda: return 0;
# Min. temperature
- platform: template
name: "${name} ${bms_name} temp min"
id: "bms${bms_id}_min_temperature"
unit_of_measurement: '°C'
device_class: 'temperature'
state_class: 'measurement'
accuracy_decimals: 1
# MIN temperature sensor (fixed)
- platform: template
id: bms${bms_id}_min_temperature_sensor
name: "${name} ${bms_name} min temperature sensor"
update_interval: ${bms_update_interval}
accuracy_decimals: 0
icon: mdi:numeric
lambda: |-
return (1 + ${bms_id} * 100 + ${deye_module_id}1);
# Max. temperature
- platform: template
name: "${name} ${bms_name} temp max"
id: "bms${bms_id}_max_temperature"
unit_of_measurement: '°C'
device_class: 'temperature'
state_class: 'measurement'
accuracy_decimals: 1
# MAX temperature sensor (fixed)
- platform: template
id: bms${bms_id}_max_temperature_sensor
name: "${name} ${bms_name} max temperature sensor"
update_interval: ${bms_update_interval}
accuracy_decimals: 0
icon: mdi:numeric
lambda: |-
return (1 + ${bms_id} * 100 + ${deye_module_id}1);
# Cell OVP: Unsupported
- platform: template
unit_of_measurement: 'V'
state_class: 'measurement'
accuracy_decimals: 2
id: bms${bms_id}_cell_ovp
name: "${name} ${bms_name} cell overvoltage protection"
lambda: |-
return 3.7;
# Cell UVP: Unsupported
- platform: template
unit_of_measurement: 'V'
state_class: 'measurement'
accuracy_decimals: 2
id: bms${bms_id}_cell_uvp
name: "${name} ${bms_name} cell undervoltage protection"
lambda: |-
return 2.8;
# Cell balance trigger voltage: Unsupported
- platform: template
unit_of_measurement: 'V'
state_class: 'measurement'
accuracy_decimals: 2
id: bms${bms_id}_balance_trigger_voltage
name: "${name} ${bms_name} balance trigger voltage"
lambda: |-
return 3.45;
# Misc. information
- platform: template
name: "${name} ${bms_name} counts of charge over voltage "
id: "bms${bms_id}_charge_over_voltage_count"
state_class: 'measurement'
accuracy_decimals: 0
- platform: template
name: "${name} ${bms_name} counts of discharge under voltage"
id: "bms${bms_id}_discharge_under_voltage_count"
state_class: 'measurement'
accuracy_decimals: 0
- platform: template
name: "${name} ${bms_name} counts of short circuit"
id: "bms${bms_id}_short_circuit_count"
state_class: 'measurement'
accuracy_decimals: 0
- platform: template
name: "${name} ${bms_name} counts of mos over temp"
id: "bms${bms_id}_mos_over_temp_count"
state_class: 'measurement'
accuracy_decimals: 0
- platform: template
name: "${name} ${bms_name} counts of charge over current"
id: "bms${bms_id}_charge_over_current_count"
state_class: 'measurement'
accuracy_decimals: 0
- platform: template
name: "${name} ${bms_name} counts of discharge under current"
id: "bms${bms_id}_discharge_over_current_count"
state_class: 'measurement'
accuracy_decimals: 0
- platform: template
name: "${name} ${bms_name} counts of charge over temp"
id: "bms${bms_id}_charge_over_temp_count"
state_class: 'measurement'
accuracy_decimals: 0
- platform: template
name: "${name} ${bms_name} counts of discharge over temp"
id: "bms${bms_id}_discharge_over_temp_count"
state_class: 'measurement'
accuracy_decimals: 0
- platform: template
name: "${name} ${bms_name} Battery SoH"
id: "bms${bms_id}_battery_soh"
unit_of_measurement: '%'
device_class: 'battery'
state_class: 'measurement'
accuracy_decimals: 1
- platform: template
name: "${name} ${bms_name} imbalance"
id: "bms${bms_id}_imbalance"
unit_of_measurement: 'mV'
device_class: 'voltage'
state_class: 'measurement'
accuracy_decimals: 0
lambda: |-
return ((id(bms${bms_id}_max_cell_voltage).state - id(bms${bms_id}_min_cell_voltage).state)) * 1000;
- platform: template
name: "${name} ${bms_name} MosMax"
id: "bms${bms_id}_mosmax"
unit_of_measurement: '°C'
device_class: 'temperature'
state_class: 'measurement'
accuracy_decimals: 1
- platform: template
name: "${name} ${bms_name} HeatMem"
id: "bms${bms_id}_heatmem"
unit_of_measurement: '°C'
device_class: 'temperature'
state_class: 'measurement'
accuracy_decimals: 1
- platform: template
name: "${name} ${bms_name} charged"
id: "bms${bms_id}_charged"
unit_of_measurement: 'kWh'
device_class: 'energy'
state_class: 'total_increasing'
accuracy_decimals: 3
filters:
- throttle: 1s
- platform: template
name: "${name} ${bms_name} discharged"
id: "bms${bms_id}_discharged"
unit_of_measurement: 'kWh'
device_class: 'energy'
state_class: 'total_increasing'
accuracy_decimals: 3
filters:
- throttle: 1s
- platform: template
id: "bms${bms_id}_operation_mode_internal"
filters:
- throttle: 30s
text_sensor:
- platform: template
name: "${name} ${bms_name} operation mode"
id: "bms${bms_id}_operation_mode"
lambda: |-
switch ((int)id(bms${bms_id}_operation_mode_internal).state) {
default: return std::string("unknown");
case 0: return std::string("idle");
case 1: return std::string("charging");
case 2: return std::string("discharging");
}
- platform: template
name: "${name} ${bms_name} fault level"
id: "bms${bms_id}_fault_level"
@@ -0,0 +1,415 @@
# Updated : 2025.04.14
# Version : 1.1.1
# GitHub : https://github.com/GHswitt/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>.
# +-----------------------------------------------+
# | DEYE CAN PCS module frames |
# | Thanks to: |
# | https://github.com/Psynosaur/esphome-deye-bms |
# +-----------------------------------------------+
canbus:
- id: !extend ${canbus_id}
on_frame:
- can_id: 0x11${deye_module_id}
then:
- lambda: |-
id(bms${bms_id}_precharge_mos_state).publish_state(x[7] & 0x40);
id(bms${bms_id}_discharge_mos_state).publish_state(x[7] & 0x20);
id(bms${bms_id}_charge_mos_state).publish_state(x[7] & 0x10);
- can_id: 0x15${deye_module_id}
then:
- lambda: |-
float voltage = ((x[1] << 8) | x[0]) / 10.0;
id(bms${bms_id}_total_voltage).publish_state(voltage);
float current = ((x[3] << 8) | x[2]) / -10.0;
if(x[3] > 0x80) current = uint16_t(~((x[3] << 8) | x[2]) + 1) / 10.0;
id(bms${bms_id}_current).publish_state(current);
float soc = ((x[5] << 8) | x[4]) / 10.0;
id(bms${bms_id}_state_of_charge).publish_state(soc);
float soh = ((x[7] << 8) | x[6]) / 10.0;
id(bms${bms_id}_battery_soh).publish_state(soh);
# ESP_LOGI("canid 0x150:", "U : %.1f V, I %.1f A, SoC: %.1f %, SoH %.1f %", voltage, current, soc, soh );
- can_id: 0x20${deye_module_id}
then:
- lambda: |-
float cell_u_max = ((x[1] << 8) | x[0]) / 1000.0;
id(bms${bms_id}_max_cell_voltage).publish_state(cell_u_max);
float cell_u_min = ((x[3] << 8) | x[2]) / 1000.0;
id(bms${bms_id}_min_cell_voltage).publish_state(cell_u_min);
float temp_max = ((x[5] << 8) | x[4]) / 10.0;
id(bms${bms_id}_max_temperature).publish_state(temp_max);
float temp_min = ((x[7] << 8) | x[6]) / 10.0;
id(bms${bms_id}_min_temperature).publish_state(temp_min);
# ESP_LOGI("canid 0x200:", "U cell max: %.3f V, U cell min %.3f V, Temp max: %.1f, T_min %.1f V", cell_u_max, cell_u_min, temp_max, temp_min );
- can_id: 0x25${deye_module_id}
then:
- lambda: |-
int val3 = ((x[5] << 8) | x[4]);
id(bms${bms_id}_max_charge_current).publish_state(val3);
int val4 = ((x[7] << 8) | x[6]);
id(bms${bms_id}_max_discharge_current).publish_state(val4);
- can_id: 0x40${deye_module_id}
then:
- lambda: |-
// Process frame
if(x[1] == 0) id(bms${bms_id}_fault_level).publish_state("no fault");
if(x[1] == 1) id(bms${bms_id}_fault_level).publish_state("minor fault");
if(x[1] == 2) id(bms${bms_id}_fault_level).publish_state("serious fault");
id(bms${bms_id}_fault).publish_state(x[1] & 3);
float cycles = ((x[3] << 8) | x[2]);
id(bms${bms_id}_charging_cycles).publish_state(cycles);
id(bms${bms_id}_equalizing).publish_state(x[4] | x[5]);
- can_id: 0x55${deye_module_id}
then:
- lambda: |-
float charged = ((x[3] << 24) | (x[2] << 16) | (x[1] << 8) | x[0]) / 1000.0;
id(bms${bms_id}_charged).publish_state(charged);
float discharged = ((x[7] << 24) | (x[6] << 16) | (x[5] << 8) | x[5]) / 1000.0;
id(bms${bms_id}_discharged).publish_state(discharged);
binary_sensor:
# Online status: TODO
- platform: template
id: bms${bms_id}_online_status
name: "${name} ${bms_name} status online"
lambda: |-
if (id(bms${bms_id}_total_voltage).state > 0)
return true;
else
return false;
# Equalizing
- platform: template
id: bms${bms_id}_equalizing
name: "${name} ${bms_name} status balancing"
filters:
- delayed_off: 300s
# Charging allowed
- platform: template
id: bms${bms_id}_charging_allowed
name: "${name} ${bms_name} charging allowed"
lambda: |-
return id(bms${bms_id}_charge_mos_state).state && !id(bms${bms_id}_fault).state;
# Discharging allowed
- platform: template
id: bms${bms_id}_discharging_allowed
name: "${name} ${bms_name} discharging allowed"
lambda: |-
return id(bms${bms_id}_discharge_mos_state).state && !id(bms${bms_id}_fault).state;
# Fault
- platform: template
name: "${name} ${bms_name} fault"
id: "bms${bms_id}_fault"
- platform: template
name: "${name} ${bms_name} precharge mos state"
id: "bms${bms_id}_precharge_mos_state"
- platform: template
name: "${name} ${bms_name} discharge mos state"
id: "bms${bms_id}_discharge_mos_state"
- platform: template
name: "${name} ${bms_name} charge mos state"
id: "bms${bms_id}_charge_mos_state"
sensor:
# Total voltage
- platform: template
name: "${name} ${bms_name} total voltage"
id: "bms${bms_id}_total_voltage"
unit_of_measurement: 'V'
device_class: 'voltage'
state_class: 'measurement'
accuracy_decimals: 2
filters:
- timeout:
timeout: 60s
value: !lambda return 0;
# Current
- platform: template
name: "${name} ${bms_name} current"
id: "bms${bms_id}_current"
unit_of_measurement: 'A'
device_class: 'current'
state_class: 'measurement'
accuracy_decimals: 1
# Battery power (calculated)
- platform: template
id: bms${bms_id}_power
name: "${name} ${bms_name} battery power"
unit_of_measurement: 'W'
device_class: 'current'
state_class: 'measurement'
accuracy_decimals: 0
lambda: |-
return id(bms${bms_id}_total_voltage).state * id(bms${bms_id}_current).state;
# Charging power: Calculated from voltage and current
- platform: template
name: "${name} ${bms_name} battery power charging"
id: bms${bms_id}_charging_power
unit_of_measurement: 'W'
device_class: 'current'
state_class: 'measurement'
accuracy_decimals: 0
lambda: |-
if (id(bms${bms_id}_current).state > 0) return id(bms${bms_id}_total_voltage).state * id(bms${bms_id}_current).state;
else return 0;
# Discharging power: Calculated from voltage and current
- platform: template
name: "${name} ${bms_name} battery power discharging"
id: bms${bms_id}_discharging_power
unit_of_measurement: 'W'
device_class: 'current'
state_class: 'measurement'
accuracy_decimals: 0
lambda: |-
if (id(bms${bms_id}_current).state < 0) return id(bms${bms_id}_total_voltage).state * -id(bms${bms_id}_current).state;
else return 0;
# SoC
- platform: template
name: "${name} ${bms_name} SoC"
id: "bms${bms_id}_state_of_charge"
unit_of_measurement: '%'
device_class: 'battery'
state_class: 'measurement'
accuracy_decimals: 1
# Battery capacity
- platform: template
name: "${name} ${bms_name} battery capacity"
id: bms${bms_id}_battery_capacity
unit_of_measurement: 'Ah'
device_class: 'energy'
state_class: 'total_increasing'
accuracy_decimals: 0
lambda: |-
uint8_t module_count = id(deye${deye_id}_module_amount).state;
if (module_count < 1) module_count = 1;
return id(deye${deye_id}_battery_capacity).state / module_count;
# Remaining capacity: Calculated from capacity and SoC
- platform: template
unit_of_measurement: 'Ah'
device_class: 'battery'
state_class: 'measurement'
accuracy_decimals: 0
id: bms${bms_id}_capacity_remaining_ah
name: "${name} ${bms_name} battery capacity remaining"
lambda: |-
return (id(bms${bms_id}_state_of_charge).state * id(bms${bms_id}_battery_capacity).state) / 100;
filters:
- or:
- throttle: 10s
- delta: 1
# Charging cycles
- platform: template
name: "${name} ${bms_name} cycles"
id: "bms${bms_id}_charging_cycles"
state_class: 'measurement'
accuracy_decimals: 0
filters:
- or:
- throttle: 600s
- delta: 1
# Max. charge current
- platform: template
name: "${name} ${bms_name} max charge current"
id: "bms${bms_id}_max_charge_current"
unit_of_measurement: 'A'
device_class: 'current'
state_class: 'measurement'
accuracy_decimals: 0
# Max. discharge current
- platform: template
name: "${name} ${bms_name} max discharge current"
id: "bms${bms_id}_max_discharge_current"
unit_of_measurement: 'A'
device_class: 'current'
state_class: 'measurement'
accuracy_decimals: 0
# Max. cell voltage
- platform: template
name: "${name} ${bms_name} max cell voltage"
id: "bms${bms_id}_max_cell_voltage"
unit_of_measurement: 'V'
device_class: 'voltage'
state_class: 'measurement'
accuracy_decimals: 3
# Max. voltage cell: Only with InterCAN enabled
- platform: template
state_class: 'measurement'
accuracy_decimals: 0
id: bms${bms_id}_max_voltage_cell
name: "${name} ${bms_name} cell voltage max cell number"
filters:
- lambda: return 0;
# Min. cell voltage
- platform: template
name: "${name} ${bms_name} min cell voltage"
id: "bms${bms_id}_min_cell_voltage"
unit_of_measurement: 'V'
device_class: 'voltage'
state_class: 'measurement'
accuracy_decimals: 3
on_value:
then:
- component.update: bms${bms_id}_imbalance
# Min. voltage cell: Only with InterCAN enabled
- platform: template
state_class: 'measurement'
accuracy_decimals: 0
id: bms${bms_id}_min_voltage_cell
name: "${name} ${bms_name} cell voltage min cell number"
filters:
- lambda: return 0;
# Min. temperature
- platform: template
name: "${name} ${bms_name} temp min"
id: "bms${bms_id}_min_temperature"
unit_of_measurement: '°C'
device_class: 'temperature'
state_class: 'measurement'
accuracy_decimals: 1
# MIN temperature sensor (fixed)
- platform: template
id: bms${bms_id}_min_temperature_sensor
name: "${name} ${bms_name} min temperature sensor"
update_interval: ${bms_update_interval}
accuracy_decimals: 0
icon: mdi:numeric
lambda: |-
return (1 + ${bms_id} * 100 + ${deye_module_id}1);
# Max. temperature
- platform: template
name: "${name} ${bms_name} temp max"
id: "bms${bms_id}_max_temperature"
unit_of_measurement: '°C'
device_class: 'temperature'
state_class: 'measurement'
accuracy_decimals: 1
# MAX temperature sensor (fixed)
- platform: template
id: bms${bms_id}_max_temperature_sensor
name: "${name} ${bms_name} max temperature sensor"
update_interval: ${bms_update_interval}
accuracy_decimals: 0
icon: mdi:numeric
lambda: |-
return (1 + ${bms_id} * 100 + ${deye_module_id}1);
# Cell OVP: Unsupported
- platform: template
unit_of_measurement: 'V'
state_class: 'measurement'
accuracy_decimals: 2
id: bms${bms_id}_cell_ovp
name: "${name} ${bms_name} cell overvoltage protection"
lambda: |-
return 3.7;
# Cell UVP: Unsupported
- platform: template
unit_of_measurement: 'V'
state_class: 'measurement'
accuracy_decimals: 2
id: bms${bms_id}_cell_uvp
name: "${name} ${bms_name} cell undervoltage protection"
lambda: |-
return 2.8;
# Cell balance trigger voltage: Unsupported
- platform: template
unit_of_measurement: 'V'
state_class: 'measurement'
accuracy_decimals: 2
id: bms${bms_id}_balance_trigger_voltage
name: "${name} ${bms_name} balance trigger voltage"
lambda: |-
return 3.45;
# Misc. information
- platform: template
name: "${name} ${bms_name} Battery SoH"
id: "bms${bms_id}_battery_soh"
unit_of_measurement: '%'
device_class: 'battery'
state_class: 'measurement'
accuracy_decimals: 1
- platform: template
name: "${name} ${bms_name} imbalance"
id: "bms${bms_id}_imbalance"
unit_of_measurement: 'mV'
device_class: 'voltage'
state_class: 'measurement'
accuracy_decimals: 0
lambda: |-
return ((id(bms${bms_id}_max_cell_voltage).state - id(bms${bms_id}_min_cell_voltage).state)) * 1000;
- platform: template
name: "${name} ${bms_name} charged"
id: "bms${bms_id}_charged"
unit_of_measurement: 'kWh'
device_class: 'energy'
state_class: 'total_increasing'
accuracy_decimals: 3
filters:
- throttle: 1s
- platform: template
name: "${name} ${bms_name} discharged"
id: "bms${bms_id}_discharged"
unit_of_measurement: 'kWh'
device_class: 'energy'
state_class: 'total_increasing'
accuracy_decimals: 3
filters:
- throttle: 1s
text_sensor:
- platform: template
name: "${name} ${bms_name} fault level"
id: "bms${bms_id}_fault_level"
@@ -0,0 +1,538 @@
# Updated : 2025.05.05
# Version : 1.1.2
# GitHub : https://github.com/GHswitt/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:
- id: deye${deye_id}_send_flag
type: bool
restore_value: no
initial_value: 'false'
# +-----------------------------------------------+
# | DEYE CAN PCS frames |
# | Thanks to: |
# | https://github.com/Psynosaur/esphome-deye-bms |
# +-----------------------------------------------+
canbus:
- id: !extend ${canbus_id}
on_frame:
- can_id: 0x351
then:
- lambda: |-
float u_max = ((x[1] << 8) | x[0]) / 10.0;
id(deye${deye_id}_battery_charge_voltage).publish_state(u_max);
int i_charge = ((x[3] << 8) | x[2]) / 10;
id(deye${deye_id}_max_charge_current).publish_state(i_charge);
int i_discharge = ((x[5] << 8) | x[4]) / 10;
id(deye${deye_id}_max_discharge_current).publish_state(i_discharge);
float u_min = ((x[7] << 8) | x[6]) / 10.0;
id(deye${deye_id}_battery_discharge_voltage).publish_state(u_min);
if (!id(deye${deye_id}_send_flag)) {
std::vector<uint8_t> data{0x01};
id(${canbus_id})->send_data(0x18A2FF80, true, data);
id(deye${deye_id}_send_flag) = true;
}
- can_id: 0x355
then:
- lambda: |-
float soc = ((x[1] << 8) | x[0]);
id(deye${deye_id}_state_of_charge).publish_state(soc);
float soh = ((x[3] << 8) | x[2]);
id(deye${deye_id}_battery_state_of_health).publish_state(soh);
# ESP_LOGI("canid 0x355:", "SoC %d %, SoH %d %",soc, soh );
- can_id: 0x359
then:
- lambda: |-
id(deye${deye_id}_cell_under_temperature_charge).publish_state(x[0] & 0x80);
id(deye${deye_id}_cell_over_temperature_charge).publish_state(x[0] & 0x40);
id(deye${deye_id}_discharge_over_current).publish_state(x[0] & 0x20);
id(deye${deye_id}_charge_over_current).publish_state(x[0] & 0x10);
id(deye${deye_id}_module_under_voltage).publish_state(x[0] & 0x8);
id(deye${deye_id}_module_over_voltage).publish_state(x[0] & 0x4);
id(deye${deye_id}_cell_under_voltage).publish_state(x[0] & 0x2);
id(deye${deye_id}_cell_over_voltage).publish_state(x[0] & 0x1);
id(deye${deye_id}_heating_film_over_temperature).publish_state(x[1] & 0x20);
id(deye${deye_id}_mos_over_temperature).publish_state(x[1] & 0x10);
id(deye${deye_id}_cell_temperature_over_difference).publish_state(x[1] & 0x8);
id(deye${deye_id}_cell_voltage_over_difference).publish_state(x[1] & 0x4);
id(deye${deye_id}_cell_under_temperature_discharge).publish_state(x[1] & 0x2);
id(deye${deye_id}_cell_over_temperature_discharge).publish_state(x[1] & 0x1);
id(deye${deye_id}_master_address_repeat).publish_state(x[3] & 0x80);
id(deye${deye_id}_pcs_communication_fail).publish_state(x[3] & 0x40);
id(deye${deye_id}_internal_communication_fail).publish_state(x[3] & 0x20);
id(deye${deye_id}_eeprom_error).publish_state(x[3] & 0x10);
id(deye${deye_id}_mosfet_short_circuit).publish_state(x[3] & 0x8);
id(deye${deye_id}_temperature_sampling_fail).publish_state(x[3] & 0x4);
id(deye${deye_id}_cell_voltage_sampling_fail).publish_state(x[3] & 0x2);
id(deye${deye_id}_afe_communication_fail).publish_state(x[3] & 0x1);
id(deye${deye_id}_cell_low_temperature_charge).publish_state(x[4] & 0x80);
id(deye${deye_id}_cell_high_temperature_charge).publish_state(x[4] & 0x40);
id(deye${deye_id}_discharge_high_current).publish_state(x[4] & 0x20);
id(deye${deye_id}_charge_high_current).publish_state(x[4] & 0x10);
id(deye${deye_id}_module_low_voltage).publish_state(x[4] & 0x8);
id(deye${deye_id}_module_high_voltage).publish_state(x[4] & 0x4);
id(deye${deye_id}_cell_low_voltage).publish_state(x[4] & 0x2);
id(deye${deye_id}_cell_high_voltage).publish_state(x[4] & 0x1);
id(deye${deye_id}_heat_error).publish_state(x[5] & 0x80);
id(deye${deye_id}_heat_mos_adhession).publish_state(x[5] & 0x40);
id(deye${deye_id}_heating_film_high_temperature).publish_state(x[5] & 0x20);
id(deye${deye_id}_mos_high_temperature).publish_state(x[5] & 0x10);
id(deye${deye_id}_cell_temperature_high_difference).publish_state(x[5] & 0x8);
id(deye${deye_id}_cell_voltage_high_difference).publish_state(x[5] & 0x4);
id(deye${deye_id}_cell_low_temperature_discharge).publish_state(x[5] & 0x2);
id(deye${deye_id}_cell_high_temperature_discharge).publish_state(x[5] & 0x1);
uint64_t combined = x[0] | x[1] << 8 | x[3] << 16 | x[4] << 24 | (uint64_t)x[5] << 32;
id(deye${deye_id}_bms_errors_bitmask).publish_state(combined);
- can_id: 0x35e
then:
- lambda: |-
int cap = ((x[7] << 8) | x[6]) / 10;
id(deye${deye_id}_battery_capacity).publish_state(cap);
//id(cell_manufacturer).publish_state("undefined");
if(x[5] == 1) id(deye${deye_id}_cell_manufacturer).publish_state("GOTION 96Ah");
if(x[5] == 2) id(deye${deye_id}_cell_manufacturer).publish_state("CATL 100Ah");
if(x[5] == 3) id(deye${deye_id}_cell_manufacturer).publish_state("EVE 100Ah");
if(x[5] == 4) id(deye${deye_id}_cell_manufacturer).publish_state("PH 100Ah");
if(x[5] == 5) id(deye${deye_id}_cell_manufacturer).publish_state("EVE 120Ah");
if(x[5] == 6) id(deye${deye_id}_cell_manufacturer).publish_state("PH 100Ah(214R)");
if(x[5] == 7) id(deye${deye_id}_cell_manufacturer).publish_state("ZENERGY 104Ah");
//ESP_LOGI("canid 0x35E:", "%02x %02x %02x %02x %02x %02x %02x %02x", x[0], x[1], x[2], x[3], x[4], x[5], x[6], x[7]);
- can_id: 0x35C
then:
- lambda: |-
// These are set to 0
//id(deye${deye_id}_charging_allowed).publish_state(x[0] & 0x80);
//id(deye${deye_id}_discharging_allowed).publish_state(x[0] & 0x40);
id(deye${deye_id}_request_force_charge_1).publish_state(x[0] & 0x20);
id(deye${deye_id}_request_force_charge_2).publish_state(x[0] & 0x10);
id(deye${deye_id}_request_full_charge).publish_state(x[0] & 0x08);
# ESP_LOGI("canid 0x35C:", "%02x %02x %02x %02x %02x %02x %02x %02x", x[0], x[1], x[2], x[3], x[4], x[5], x[6], x[7]);
- can_id: 0x356
then:
- lambda: |-
float voltage = ((x[1] << 8) | x[0]) / 100.0;
id(deye${deye_id}_total_voltage).publish_state(voltage);
float current = ((x[3] << 8) | x[2]) / 10.0;
if(x[3] > 0x80) current = uint16_t(~((x[3] << 8) | x[2]) + 1) / -10.0;
id(deye${deye_id}_current).publish_state(-current);
float temperature = ((x[5] << 8) | x[4]) / 10;
id(deye${deye_id}_temperature_sensor_1).publish_state(temperature);
# ESP_LOGI("canid 0x356:", "U: %.1f V, I: %.1f A, T: %.1f °C", voltage, current, temperature );
# if(x[3] > 0x80) current = uint16_t(~((x[3] << 8) | x[2]) + 1) / -10.0;
- can_id: 0x361
then:
- lambda: |-
float cell_u_max = ((x[1] << 8) | x[0]) / 1000.0;
id(deye${deye_id}_max_cell_voltage).publish_state(cell_u_max);
float cell_u_min = ((x[3] << 8) | x[2]) / 1000.0;
id(deye${deye_id}_min_cell_voltage).publish_state(cell_u_min);
float temp_max = ((x[5] << 8) | x[4]) / 10.0;
id(deye${deye_id}_max_temperature).publish_state(temp_max);
float temp_min = ((x[7] << 8) | x[6]) / 10.0;
id(deye${deye_id}_min_temperature).publish_state(temp_min);
- can_id: 0x364
then:
- lambda: |-
id(deye${deye_id}_module_amount_normal_state).publish_state(x[0]);
id(deye${deye_id}_module_amount_charge_disabled).publish_state(x[1]);
id(deye${deye_id}_module_amount_discharge_disabled).publish_state(x[2]);
id(deye${deye_id}_module_amount_communication_disconnected).publish_state(x[3]);
id(deye${deye_id}_module_amount).publish_state(x[4]);
- can_id: 0x371
then:
- lambda: |-
int i_charge = ((x[1] << 8) | x[0]) / 10;
id(deye${deye_id}_battery_array_charge_current_limit).publish_state(i_charge);
int i_discharge = ((x[3] << 8) | x[2]) / 10;
id(deye${deye_id}_battery_array_discharge_current_limit).publish_state(i_discharge);
binary_sensor:
# Force charge 1
- platform: template
name: "${name} ${deye_name} Request force charge 1"
id: deye${deye_id}_request_force_charge_1
# Force charge 2
- platform: template
name: "${name} ${deye_name} Request force charge 2"
id: deye${deye_id}_request_force_charge_2
# Request full charge
- platform: template
name: "${name} ${deye_name} Request full charge"
id: deye${deye_id}_request_full_charge
# Alarm/warning battery
- platform: template
id: "deye${deye_id}_charge_over_current"
name: "${name} ${deye_name} alarm charge overcurrent"
- platform: template
id: "deye${deye_id}_discharge_over_current"
name: "${name} ${deye_name} alarm discharge overcurrent"
- platform: template
name: "${name} ${deye_name} discharge high current"
id: "deye${deye_id}_discharge_high_current"
- platform: template
name: "${name} ${deye_name} charge high current"
id: "deye${deye_id}_charge_high_current"
# Alarm/warning module
- platform: template
name: "${name} ${deye_name} module low voltage"
id: "deye${deye_id}_module_low_voltage"
- platform: template
name: "${name} ${deye_name} module high voltage"
id: "deye${deye_id}_module_high_voltage"
- platform: template
id: "deye${deye_id}_module_over_voltage"
name: "${name} ${deye_name} alarm module overvoltage"
- platform: template
id: "deye${deye_id}_module_under_voltage"
name: "${name} ${deye_name} alarm module undervoltage"
# Alarm/warning cells
- platform: template
name: "${name} ${deye_name} cell low voltage"
id: "deye${deye_id}_cell_low_voltage"
- platform: template
name: "${name} ${deye_name} cell high voltage"
id: "deye${deye_id}_cell_high_voltage"
- platform: template
id: "deye${deye_id}_cell_over_voltage"
name: "${name} ${deye_name} alarm cell overvoltage"
- platform: template
id: "deye${deye_id}_cell_under_voltage"
name: "${name} ${deye_name} alarm cell undervoltage"
- platform: template
name: "${name} ${deye_name} cell voltage over difference"
id: "deye${deye_id}_cell_voltage_over_difference"
- platform: template
name: "${name} ${deye_name} cell voltage sampling fail"
id: "deye${deye_id}_cell_voltage_sampling_fail"
- platform: template
name: "${name} ${deye_name} cell voltage high difference"
id: "deye${deye_id}_cell_voltage_high_difference"
# Temperature general
- platform: template
id: "deye${deye_id}_temperature_sampling_fail"
name: "${name} ${deye_name} alarm temperature sampling fail"
# Temperature MOSFET
- platform: template
name: "${name} ${deye_name} Mosfet high temperature"
id: "deye${deye_id}_mos_high_temperature"
- platform: template
id: "deye${deye_id}_mos_over_temperature"
name: "${name} ${deye_name} alarm MOSFET over temperature"
# Temperature cells
- platform: template
name: "${name} ${deye_name} cell low temperature charge"
id: "deye${deye_id}_cell_low_temperature_charge"
- platform: template
name: "${name} ${deye_name} cell high temperature charge"
id: "deye${deye_id}_cell_high_temperature_charge"
- platform: template
name: "${name} ${deye_name} cell low temperature discharge"
id: "deye${deye_id}_cell_low_temperature_discharge"
- platform: template
name: "${name} ${deye_name} cell high temperature discharge"
id: "deye${deye_id}_cell_high_temperature_discharge"
- platform: template
id: "deye${deye_id}_cell_over_temperature_charge"
name: "${name} ${deye_name} alarm cell overtemperature charge"
- platform: template
id: "deye${deye_id}_cell_under_temperature_charge"
name: "${name} ${deye_name} alarm cell undertemperature charge"
- platform: template
id: "deye${deye_id}_cell_over_temperature_discharge"
name: "${name} ${deye_name} alarm cell overtemperature discharge"
- platform: template
id: "deye${deye_id}_cell_under_temperature_discharge"
name: "${name} ${deye_name} alarm cell undertemperature discharge"
- platform: template
name: "${name} ${deye_name} cell temperature high difference"
id: "deye${deye_id}_cell_temperature_high_difference"
- platform: template
name: "${name} ${deye_name} alarm cell temperature over difference"
id: "deye${deye_id}_cell_temperature_over_difference"
# Heating film
- platform: template
name: "${name} ${deye_name} alarm heating film overtemperature"
id: "deye${deye_id}_heating_film_over_temperature"
- platform: template
name: "${name} ${deye_name} heat error"
id: "deye${deye_id}_heat_error"
- platform: template
name: "${name} ${deye_name} heat mosfet adhession"
id: "deye${deye_id}_heat_mos_adhession"
- platform: template
name: "${name} ${deye_name} heating film high temperature"
id: "deye${deye_id}_heating_film_high_temperature"
# Misc
- platform: template
name: "${name} ${deye_name} master address_repeat"
id: "deye${deye_id}_master_address_repeat"
- platform: template
name: "${name} ${deye_name} PCS communication fail"
id: "deye${deye_id}_pcs_communication_fail"
- platform: template
name: "${name} ${deye_name} internal communication fail"
id: "deye${deye_id}_internal_communication_fail"
- platform: template
name: "${name} ${deye_name} EEPROM error"
id: "deye${deye_id}_eeprom_error"
- platform: template
name: "${name} ${deye_name} Mosfet short circuit"
id: "deye${deye_id}_mosfet_short_circuit"
- platform: template
name: "${name} ${deye_name} AFE communication fail"
id: "deye${deye_id}_afe_communication_fail"
sensor:
# Charge voltage
- platform: template
name: "${name} ${deye_name} charge voltage"
id: deye${deye_id}_battery_charge_voltage
unit_of_measurement: 'V'
device_class: 'voltage'
state_class: 'measurement'
accuracy_decimals: 2
# Discharge voltage
- platform: template
name: "${name} ${deye_name} discharge voltage"
id: deye${deye_id}_battery_discharge_voltage
unit_of_measurement: 'V'
device_class: 'voltage'
state_class: 'measurement'
accuracy_decimals: 2
# Maximum charging current
- platform: template
id: deye${deye_id}_max_charge_current
name: "${name} ${deye_name} max charging current"
unit_of_measurement: 'A'
device_class: 'current'
state_class: 'measurement'
accuracy_decimals: 0
filters:
- or:
- throttle: 30s
- delta: 10
# Maximum discharging current
- platform: template
id: deye${deye_id}_max_discharge_current
name: "${name} ${deye_name} max discharging current"
unit_of_measurement: 'A'
device_class: 'current'
state_class: 'measurement'
accuracy_decimals: 0
filters:
- or:
- throttle: 30s
- delta: 10
# SOC
- platform: template
unit_of_measurement: '%'
device_class: 'battery'
state_class: 'measurement'
accuracy_decimals: 0
id: deye${deye_id}_state_of_charge
name: "${name} ${deye_name} battery SoC"
# SOH
- platform: template
name: "${name} ${deye_name} battery SoH"
id: deye${deye_id}_battery_state_of_health
unit_of_measurement: '%'
device_class: 'battery'
state_class: 'measurement'
accuracy_decimals: 0
# Errors bitmask
- platform: template
id: deye${deye_id}_bms_errors_bitmask
name: "${name} ${deye_name} BMS Errors Bitmask"
accuracy_decimals: 0
icon: mdi:alert-circle-outline
# Total battery voltage
- platform: template
unit_of_measurement: 'V'
device_class: 'voltage'
state_class: 'measurement'
accuracy_decimals: 2
id: deye${deye_id}_total_voltage
name: "${name} ${deye_name} battery voltage"
# Battery current
- platform: template
unit_of_measurement: 'A'
device_class: 'current'
state_class: 'measurement'
accuracy_decimals: 2
id: deye${deye_id}_current
name: "${name} ${deye_name} battery current"
# Battery temperature
- platform: template
unit_of_measurement: '°C'
device_class: 'temperature'
state_class: 'measurement'
accuracy_decimals: 1
id: deye${deye_id}_temperature_sensor_1
name: "${name} ${deye_name} temperature"
# Array charge current limit
- platform: template
name: "${name} ${deye_name} battery array charge current limit"
id: "deye${deye_id}_battery_array_charge_current_limit"
unit_of_measurement: 'A'
device_class: 'current'
state_class: 'measurement'
accuracy_decimals: 0
filters:
- or:
- throttle: 30s
- delta: 10
# Array discharge current limit
- platform: template
name: "${name} ${deye_name} battery array discharge current limit"
id: "deye${deye_id}_battery_array_discharge_current_limit"
unit_of_measurement: 'A'
device_class: 'current'
state_class: 'measurement'
accuracy_decimals: 0
filters:
- or:
- throttle: 30s
- delta: 10
# Min. cell voltage
- platform: template
unit_of_measurement: 'V'
device_class: 'voltage'
state_class: 'measurement'
accuracy_decimals: 3
id: deye${deye_id}_min_cell_voltage
name: "${name} ${deye_name} cell voltage min"
# Max. cell voltage
- platform: template
unit_of_measurement: 'V'
device_class: 'voltage'
state_class: 'measurement'
accuracy_decimals: 3
id: deye${deye_id}_max_cell_voltage
name: "${name} ${deye_name} cell voltage max"
# Min. temperature
- platform: template
id: deye${deye_id}_min_temperature
name: "${name} ${deye_name} min temperature"
update_interval: ${bms_update_interval}
accuracy_decimals: 1
unit_of_measurement: °C
device_class: temperature
# Max. temperature
- platform: template
id: deye${deye_id}_max_temperature
name: "${name} ${deye_name} max temperature"
update_interval: ${bms_update_interval}
accuracy_decimals: 1
unit_of_measurement: °C
device_class: temperature
# Modules in normal state
- platform: template
name: "${name} ${deye_name} Module amount normal state"
id: deye${deye_id}_module_amount_normal_state
state_class: 'measurement'
accuracy_decimals: 0
# Modules with charge disabled
- platform: template
name: "${name} ${deye_name} Module amount charge disabled"
id: deye${deye_id}_module_amount_charge_disabled
state_class: 'measurement'
accuracy_decimals: 0
# Modules with discharge disabled
- platform: template
name: "${name} ${deye_name} Module amount discharge disabled"
id: deye${deye_id}_module_amount_discharge_disabled
state_class: 'measurement'
accuracy_decimals: 0
# Modules with communication errors
- platform: template
name: "${name} ${deye_name} Module amount communication disconnected"
id: deye${deye_id}_module_amount_communication_disconnected
state_class: 'measurement'
accuracy_decimals: 0
# Number of modules
- platform: template
name: "${name} ${deye_name} Module amount"
id: deye${deye_id}_module_amount
state_class: 'measurement'
accuracy_decimals: 0
# Battery capacity
- platform: template
name: "${name} ${deye_name} battery capacity"
id: deye${deye_id}_battery_capacity
unit_of_measurement: 'Ah'
device_class: 'energy'
state_class: 'total_increasing'
accuracy_decimals: 0
text_sensor:
# Cell manufacturer
- platform: template
name: "${name} ${deye_name} cell manufacturer"
id: deye${deye_id}_cell_manufacturer
@@ -0,0 +1,196 @@
# Updated : 2025.05.05
# Version : 1.1.2
# GitHub : https://github.com/GHswitt/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:
- id: deye${deye_id}_send_flag
type: bool
restore_value: no
initial_value: 'false'
# +-----------------------------------------------+
# | DEYE CAN PCS frames |
# | Thanks to: |
# | https://github.com/Psynosaur/esphome-deye-bms |
# +-----------------------------------------------+
canbus:
- id: !extend ${canbus_id}
on_frame:
- can_id: 0x351
then:
- lambda: |-
float u_max = ((x[1] << 8) | x[0]) / 10.0;
id(deye${deye_id}_battery_charge_voltage).publish_state(u_max);
int i_charge = ((x[3] << 8) | x[2]) / 10;
id(deye${deye_id}_max_charge_current).publish_state(i_charge);
int i_discharge = ((x[5] << 8) | x[4]) / 10;
id(deye${deye_id}_max_discharge_current).publish_state(i_discharge);
float u_min = ((x[7] << 8) | x[6]) / 10.0;
id(deye${deye_id}_battery_discharge_voltage).publish_state(u_min);
if (!id(deye${deye_id}_send_flag)) {
std::vector<uint8_t> data{0x01};
id(${canbus_id})->send_data(0x18A2FF80, true, data);
id(deye${deye_id}_send_flag) = true;
}
- can_id: 0x355
then:
- lambda: |-
float soc = ((x[1] << 8) | x[0]);
id(deye${deye_id}_state_of_charge).publish_state(soc);
float soh = ((x[3] << 8) | x[2]);
id(deye${deye_id}_battery_state_of_health).publish_state(soh);
# ESP_LOGI("canid 0x355:", "SoC %d %, SoH %d %",soc, soh );
- can_id: 0x359
then:
- lambda: |-
uint64_t combined = x[0] | x[1] << 8 | x[3] << 16 | x[4] << 24 | (uint64_t)x[5] << 32;
id(deye${deye_id}_bms_errors_bitmask).publish_state(combined);
- can_id: 0x35e
then:
- lambda: |-
int cap = ((x[7] << 8) | x[6]) / 10;
id(deye${deye_id}_battery_capacity).publish_state(cap);
- can_id: 0x364
then:
- lambda: |-
id(deye${deye_id}_module_amount_normal_state).publish_state(x[0]);
id(deye${deye_id}_module_amount_charge_disabled).publish_state(x[1]);
id(deye${deye_id}_module_amount_discharge_disabled).publish_state(x[2]);
id(deye${deye_id}_module_amount_communication_disconnected).publish_state(x[3]);
id(deye${deye_id}_module_amount).publish_state(x[4]);
sensor:
# Charge voltage
- platform: template
name: "${name} ${deye_name} charge voltage"
id: deye${deye_id}_battery_charge_voltage
unit_of_measurement: 'V'
device_class: 'voltage'
state_class: 'measurement'
accuracy_decimals: 2
# Discharge voltage
- platform: template
name: "${name} ${deye_name} discharge voltage"
id: deye${deye_id}_battery_discharge_voltage
unit_of_measurement: 'V'
device_class: 'voltage'
state_class: 'measurement'
accuracy_decimals: 2
# Maximum charging current
- platform: template
id: deye${deye_id}_max_charge_current
name: "${name} ${deye_name} max charging current"
unit_of_measurement: 'A'
device_class: 'current'
state_class: 'measurement'
accuracy_decimals: 0
filters:
- or:
- throttle: 30s
- delta: 10
# Maximum discharging current
- platform: template
id: deye${deye_id}_max_discharge_current
name: "${name} ${deye_name} max discharging current"
unit_of_measurement: 'A'
device_class: 'current'
state_class: 'measurement'
accuracy_decimals: 0
filters:
- or:
- throttle: 30s
- delta: 10
# SOC
- platform: template
unit_of_measurement: '%'
device_class: 'battery'
state_class: 'measurement'
accuracy_decimals: 0
id: deye${deye_id}_state_of_charge
name: "${name} ${deye_name} battery SoC"
# SOH
- platform: template
name: "${name} ${deye_name} battery SoH"
id: deye${deye_id}_battery_state_of_health
unit_of_measurement: '%'
device_class: 'battery'
state_class: 'measurement'
accuracy_decimals: 0
# Errors bitmask
- platform: template
id: deye${deye_id}_bms_errors_bitmask
name: "${name} ${deye_name} BMS Errors Bitmask"
accuracy_decimals: 0
icon: mdi:alert-circle-outline
# Modules in normal state
- platform: template
name: "${name} ${deye_name} Module amount normal state"
id: deye${deye_id}_module_amount_normal_state
state_class: 'measurement'
accuracy_decimals: 0
# Modules with charge disabled
- platform: template
name: "${name} ${deye_name} Module amount charge disabled"
id: deye${deye_id}_module_amount_charge_disabled
state_class: 'measurement'
accuracy_decimals: 0
# Modules with discharge disabled
- platform: template
name: "${name} ${deye_name} Module amount discharge disabled"
id: deye${deye_id}_module_amount_discharge_disabled
state_class: 'measurement'
accuracy_decimals: 0
# Modules with communication errors
- platform: template
name: "${name} ${deye_name} Module amount communication disconnected"
id: deye${deye_id}_module_amount_communication_disconnected
state_class: 'measurement'
accuracy_decimals: 0
# Number of modules
- platform: template
name: "${name} ${deye_name} Module amount"
id: deye${deye_id}_module_amount
state_class: 'measurement'
accuracy_decimals: 0
# Battery capacity
- platform: template
name: "${name} ${deye_name} battery capacity"
id: deye${deye_id}_battery_capacity
unit_of_measurement: 'Ah'
device_class: 'energy'
state_class: 'total_increasing'
accuracy_decimals: 0
+17 -3
View File
@@ -1,5 +1,5 @@
# Updated : 2025.01.25
# Version : 1.1.3
# Updated : 2025.04.01
# Version : 1.1.4
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -91,7 +91,7 @@ sensor:
- delta: 1
lambda: return ${bms_power};
# state_of_charge
# battery_soc
- platform: template
id: bms${bms_id}_battery_soc
name: "${name} ${bms_name} Battery SoC"
@@ -105,6 +105,20 @@ sensor:
- delta: 1
lambda: return ${bms_soc};
# battery_soh
- platform: template
id: bms${bms_id}_battery_soh
name: "${name} ${bms_name} Battery SoH"
update_interval: ${bms_update_interval}
accuracy_decimals: 0
unit_of_measurement: '%'
device_class: battery
filters:
- or:
- throttle: 10s
- delta: 1
lambda: return ${bms_soh};
# min_voltage_cell
- platform: template
id: bms${bms_id}_min_voltage_cell
+3 -2
View File
@@ -1,5 +1,5 @@
# Updated : 2025.01.28
# Version : 1.1.1
# Updated : 2025.04.01
# Version : 1.1.2
# GitHub : https://github.com/syssi/esphome-jdb-bms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -21,6 +21,7 @@ packages:
bms_base: !include bms_base.yaml
bms_temperature_sensor: !include bms_temperature_sensor_6.yaml
bms_errors_bitmask: !include bms_errors_bitmask_JBD.yaml
bms_battery_soh: !include bms_battery_soh.yaml
ota:
on_begin:
+3 -2
View File
@@ -1,5 +1,5 @@
# Updated : 2025.01.28
# Version : 1.1.3
# Updated : 2025.04.01
# Version : 1.1.4
# GitHub : https://github.com/syssi/esphome-jdb-bms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -21,6 +21,7 @@ packages:
bms_base: !include bms_base.yaml
bms_temperature_sensor: !include bms_temperature_sensor_6.yaml
bms_errors_bitmask: !include bms_errors_bitmask_JBD.yaml
bms_battery_soh: !include bms_battery_soh.yaml
# +--------------------------------------+
# | Component settings |
@@ -1,5 +1,5 @@
# Updated : 2025.01.28
# Version : 1.2.6
# Updated : 2025.04.01
# Version : 1.2.7
# GitHub : https://github.com/syssi/esphome-jk-bms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -20,7 +20,8 @@
packages:
bms_base: !include bms_base.yaml
bms_temperature_sensor: !include bms_temperature_sensor_2.yaml
bms_errors_bitmask: !include bms_errors_bitmask_JK-ALL_BLE.yaml
bms_errors_bitmask: !include bms_errors_bitmask_JK_BLE.yaml
bms_battery_soh: !include bms_battery_soh.yaml
ota:
on_begin:
Loaded 100 of 140 files, more files were not shown because too many files have changed in this diff. Show more