15 Commits
Author SHA1 Message Date
Sleeper85 dbb3a98a2d YamBMS 1.5.1 2024-11-16 19:43:10 +01:00
Sleeper85 c6950ee68a Create YamBMS_DEMO_ESP32.factory.bin 2024-11-16 19:35:39 +01:00
Sleeper85 aab1985f67 Update README files 2024-11-16 19:35:18 +01:00
Sleeper85 152a4adb09 Delete FAKE packages 2024-11-16 19:27:56 +01:00
Sleeper85 f9287cb391 Update YamBMS_functions.md 2024-11-04 10:18:15 +01:00
Sleeper85 78e268d46b Update Supported_devices.md 2024-11-04 10:15:47 +01:00
Sleeper85 7d45aa482e Update README (SoC and CAN bus link) 2024-10-30 22:24:04 +01:00
Sleeper85 ad3ba5796d Update BMS_JK-PB_RS485_solution.md 2024-10-24 22:32:05 +02:00
Sleeper85 b2761ace67 Update supported devices README 2024-10-19 14:34:53 +02:00
Sleeper85 3a31d9cd53 YamBMS 1.4.5 (2024.10.17) 2024-10-17 22:23:27 +02:00
Sleeper85 d20c6a3c6b Update Victron Smartshunt YAML 2024-10-09 16:20:03 +02:00
Sleeper85 7d63cbbf19 Added Troubleshooting README 2024-10-08 13:52:38 +02:00
Sleeper85 9b0f6f1834 CAN bus link behavior 2024-10-08 13:52:32 +02:00
Sleeper85 242c23e556 Update shunt config 2024-10-07 19:24:23 +02:00
Sleeper85 7f236b3eab Update README.md 2024-10-07 19:04:46 +02:00
90 changed files with 7422 additions and 2197 deletions

No files matched your search

File diff suppressed because it is too large. Load diff
@@ -1,5 +1,5 @@
# Updated : 2024.10.04
# Version : 1.1.4
# Updated : 2024.11.11
# Version : 1.5.1
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -81,7 +81,7 @@ views:
entity: sensor.yambms_yambms_1_delta_cell_voltage
name: Delta Cell Voltage
- type: tile
entity: binary_sensor.yambms_yambms_1_equalizing_state
entity: binary_sensor.yambms_yambms_1_bms_equalizing_state
name: Equalizing state
- type: entities
entities:
@@ -133,14 +133,14 @@ views:
entity: sensor.yambms_yambms_1_charging_status
name: Charging Status
- type: tile
entity: sensor.yambms_esp32_uptime
name: ESP32 Uptime
entity: sensor.yambms_yambms_1_last_complete_charge
name: Last Complete Charge
- type: tile
entity: sensor.yambms_yambms_1_charging_instruction
name: Charging Instruction
- type: tile
entity: sensor.yambms_yambms_1_last_complete_charge
name: Last Complete Charge
entity: binary_sensor.yambms_yambms_1_discharging_instruction
name: Discharging Instruction
- type: tile
entity: sensor.yambms_yambms_1_alarm
name: Alarm
@@ -153,11 +153,18 @@ views:
name: BMS count
- entity: sensor.yambms_yambms_1_bms_combined
name: BMS combined
- entity: sensor.yambms_yambms_1_bms_blocking_charge
name: BMS blocking charge
- entity: sensor.yambms_yambms_1_bms_blocking_discharge
name: BMS blocking discharge
- entity: sensor.yambms_yambms_1_bms_in_alarm
name: BMS in alarm
layout_options:
grid_columns: 2
grid_rows: 3
grid_rows: 4
- type: tile
entity: sensor.yambms_esp32_uptime
name: ESP32 Uptime
- type: entities
entities:
- entity: sensor.yambms_yambms_1_shunt_count
@@ -202,10 +209,10 @@ views:
name: YamBMS 1 Charge enabled
- entity: switch.yambms_yambms_1_discharge_enabled
name: YamBMS 1 Discharge enabled
- entity: binary_sensor.yambms_yambms_1_bms_charge_switch_state
name: YamBMS 1 BMS Charge switch state
- entity: binary_sensor.yambms_yambms_1_bms_discharge_switch_state
name: YamBMS 1 BMS Discharge switch state
- entity: binary_sensor.yambms_yambms_1_bms_charging_allowed
name: YamBMS 1 BMS Charging allowed
- entity: binary_sensor.yambms_yambms_1_bms_discharging_allowed
name: YamBMS 1 BMS Discharging allowed
title: YamBMS - Charge / Discharge switch
- type: entities
entities:
@@ -360,8 +367,8 @@ views:
- type: markdown
content: >-
<center>Discharge : <b> {% if
states('binary_sensor.yambms_jk_bms_1_discharging') == 'on'
%} <font color=#41CD52>{{
states('binary_sensor.yambms_jk_bms_1_discharging') == 'on' %}
<font color=#41CD52>{{
states('binary_sensor.yambms_jk_bms_1_discharging') | upper
}}</font> {% else %} <font color=#3090C7>{{
states('binary_sensor.yambms_jk_bms_1_discharging') | upper
@@ -409,9 +416,8 @@ views:
color=#41CD52>{{
states('sensor.yambms_jk_bms_1_capacity_remaining') }}
Ah</font><br> Cycle Count :&nbsp;&nbsp;<font color=#41CD52>{{
states('sensor.yambms_jk_bms_1_charging_cycles')
}}</font><br> Delta Cell Vol. :&nbsp;&nbsp;<font
color=#41CD52>{{
states('sensor.yambms_jk_bms_1_charging_cycles') }}</font><br>
Delta Cell Vol. :&nbsp;&nbsp;<font color=#41CD52>{{
states('sensor.yambms_jk_bms_1_delta_cell_voltage') }}
V</font><br> MOS Temp. :&nbsp;&nbsp;<font color=#41CD52>{{
states('sensor.yambms_jk_bms_1_power_tube_temperature') }}
@@ -437,86 +443,78 @@ views:
{% elif states('sensor.yambms_jk_bms_1_min_voltage_cell') ==
'1' %} <font color="#3090C7">{{
states('sensor.yambms_jk_bms_1_cell_voltage_01') }} V</font>
{% else %} {{
states('sensor.yambms_jk_bms_1_cell_voltage_01') }} V {%
endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_1_cell_resistance_01') }} Ω
<br> 02.&nbsp;&nbsp;&nbsp; {% if
{% else %} {{ states('sensor.yambms_jk_bms_1_cell_voltage_01')
}} V {% endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_1_cell_resistance_01') }} Ω <br>
02.&nbsp;&nbsp;&nbsp; {% if
states('sensor.yambms_jk_bms_1_max_voltage_cell') == '2' %}
<font color="red">{{
states('sensor.yambms_jk_bms_1_cell_voltage_02') }} V</font>
{% elif states('sensor.yambms_jk_bms_1_min_voltage_cell') ==
'2' %} <font color="#3090C7">{{
states('sensor.yambms_jk_bms_1_cell_voltage_02') }} V</font>
{% else %} {{
states('sensor.yambms_jk_bms_1_cell_voltage_02') }} V {%
endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_1_cell_resistance_02') }} Ω
<br> 03.&nbsp;&nbsp;&nbsp; {% if
{% else %} {{ states('sensor.yambms_jk_bms_1_cell_voltage_02')
}} V {% endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_1_cell_resistance_02') }} Ω <br>
03.&nbsp;&nbsp;&nbsp; {% if
states('sensor.yambms_jk_bms_1_max_voltage_cell') == '3' %}
<font color="red">{{
states('sensor.yambms_jk_bms_1_cell_voltage_03') }} V</font>
{% elif states('sensor.yambms_jk_bms_1_min_voltage_cell') ==
'3' %} <font color="#3090C7">{{
states('sensor.yambms_jk_bms_1_cell_voltage_03') }} V</font>
{% else %} {{
states('sensor.yambms_jk_bms_1_cell_voltage_03') }} V {%
endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_1_cell_resistance_03') }} Ω
<br> 04.&nbsp;&nbsp;&nbsp; {% if
{% else %} {{ states('sensor.yambms_jk_bms_1_cell_voltage_03')
}} V {% endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_1_cell_resistance_03') }} Ω <br>
04.&nbsp;&nbsp;&nbsp; {% if
states('sensor.yambms_jk_bms_1_max_voltage_cell') == '4' %}
<font color="red">{{
states('sensor.yambms_jk_bms_1_cell_voltage_04') }} V</font>
{% elif states('sensor.yambms_jk_bms_1_min_voltage_cell') ==
'4' %} <font color="#3090C7">{{
states('sensor.yambms_jk_bms_1_cell_voltage_04') }} V</font>
{% else %} {{
states('sensor.yambms_jk_bms_1_cell_voltage_04') }} V {%
endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_1_cell_resistance_04') }} Ω
<br> 05.&nbsp;&nbsp;&nbsp; {% if
{% else %} {{ states('sensor.yambms_jk_bms_1_cell_voltage_04')
}} V {% endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_1_cell_resistance_04') }} Ω <br>
05.&nbsp;&nbsp;&nbsp; {% if
states('sensor.yambms_jk_bms_1_max_voltage_cell') == '5' %}
<font color="red">{{
states('sensor.yambms_jk_bms_1_cell_voltage_05') }} V</font>
{% elif states('sensor.yambms_jk_bms_1_min_voltage_cell') ==
'5' %} <font color="#3090C7">{{
states('sensor.yambms_jk_bms_1_cell_voltage_05') }} V</font>
{% else %} {{
states('sensor.yambms_jk_bms_1_cell_voltage_05') }} V {%
endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_1_cell_resistance_05') }} Ω
<br> 06.&nbsp;&nbsp;&nbsp; {% if
{% else %} {{ states('sensor.yambms_jk_bms_1_cell_voltage_05')
}} V {% endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_1_cell_resistance_05') }} Ω <br>
06.&nbsp;&nbsp;&nbsp; {% if
states('sensor.yambms_jk_bms_1_max_voltage_cell') == '6' %}
<font color="red">{{
states('sensor.yambms_jk_bms_1_cell_voltage_06') }} V</font>
{% elif states('sensor.yambms_jk_bms_1_min_voltage_cell') ==
'6' %} <font color="#3090C7">{{
states('sensor.yambms_jk_bms_1_cell_voltage_06') }} V</font>
{% else %} {{
states('sensor.yambms_jk_bms_1_cell_voltage_06') }} V {%
endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_1_cell_resistance_06') }} Ω
<br> 07.&nbsp;&nbsp;&nbsp; {% if
{% else %} {{ states('sensor.yambms_jk_bms_1_cell_voltage_06')
}} V {% endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_1_cell_resistance_06') }} Ω <br>
07.&nbsp;&nbsp;&nbsp; {% if
states('sensor.yambms_jk_bms_1_max_voltage_cell') == '7' %}
<font color="red">{{
states('sensor.yambms_jk_bms_1_cell_voltage_07') }} V</font>
{% elif states('sensor.yambms_jk_bms_1_min_voltage_cell') ==
'7' %} <font color="#3090C7">{{
states('sensor.yambms_jk_bms_1_cell_voltage_07') }} V</font>
{% else %} {{
states('sensor.yambms_jk_bms_1_cell_voltage_07') }} V {%
endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_1_cell_resistance_07') }} Ω
<br> 08.&nbsp;&nbsp;&nbsp; {% if
{% else %} {{ states('sensor.yambms_jk_bms_1_cell_voltage_07')
}} V {% endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_1_cell_resistance_07') }} Ω <br>
08.&nbsp;&nbsp;&nbsp; {% if
states('sensor.yambms_jk_bms_1_max_voltage_cell') == '8' %}
<font color="red">{{
states('sensor.yambms_jk_bms_1_cell_voltage_08') }} V</font>
{% elif states('sensor.yambms_jk_bms_1_min_voltage_cell') ==
'8' %} <font color="#3090C7">{{
states('sensor.yambms_jk_bms_1_cell_voltage_08') }} V</font>
{% else %} {{
states('sensor.yambms_jk_bms_1_cell_voltage_08') }} V {%
endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
{% else %} {{ states('sensor.yambms_jk_bms_1_cell_voltage_08')
}} V {% endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_1_cell_resistance_08') }} Ω
<br></center>
- type: markdown
@@ -528,89 +526,81 @@ views:
{% elif states('sensor.yambms_jk_bms_1_min_voltage_cell') ==
'9' %} <font color="#3090C7">{{
states('sensor.yambms_jk_bms_1_cell_voltage_09') }} V</font>
{% else %} {{
states('sensor.yambms_jk_bms_1_cell_voltage_09') }} V {%
endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_1_cell_resistance_09') }} Ω
<br> 10.&nbsp;&nbsp;&nbsp; {% if
states('sensor.yambms_jk_bms_1_max_voltage_cell') == '10'
%} <font color="red">{{
{% else %} {{ states('sensor.yambms_jk_bms_1_cell_voltage_09')
}} V {% endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_1_cell_resistance_09') }} Ω <br>
10.&nbsp;&nbsp;&nbsp; {% if
states('sensor.yambms_jk_bms_1_max_voltage_cell') == '10' %}
<font color="red">{{
states('sensor.yambms_jk_bms_1_cell_voltage_10') }} V</font>
{% elif states('sensor.yambms_jk_bms_1_min_voltage_cell') ==
'10' %} <font color="#3090C7">{{
states('sensor.yambms_jk_bms_1_cell_voltage_10') }} V</font>
{% else %} {{
states('sensor.yambms_jk_bms_1_cell_voltage_10') }} V {%
endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_1_cell_resistance_10') }} Ω
<br> 11.&nbsp;&nbsp;&nbsp; {% if
states('sensor.yambms_jk_bms_1_max_voltage_cell') == '11'
%} <font color="red">{{
{% else %} {{ states('sensor.yambms_jk_bms_1_cell_voltage_10')
}} V {% endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_1_cell_resistance_10') }} Ω <br>
11.&nbsp;&nbsp;&nbsp; {% if
states('sensor.yambms_jk_bms_1_max_voltage_cell') == '11' %}
<font color="red">{{
states('sensor.yambms_jk_bms_1_cell_voltage_11') }} V</font>
{% elif states('sensor.yambms_jk_bms_1_min_voltage_cell') ==
'11' %} <font color="#3090C7">{{
states('sensor.yambms_jk_bms_1_cell_voltage_11') }} V</font>
{% else %} {{
states('sensor.yambms_jk_bms_1_cell_voltage_11') }} V {%
endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_1_cell_resistance_11') }} Ω
<br> 12.&nbsp;&nbsp;&nbsp; {% if
states('sensor.yambms_jk_bms_1_max_voltage_cell') == '12'
%} <font color="red">{{
{% else %} {{ states('sensor.yambms_jk_bms_1_cell_voltage_11')
}} V {% endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_1_cell_resistance_11') }} Ω <br>
12.&nbsp;&nbsp;&nbsp; {% if
states('sensor.yambms_jk_bms_1_max_voltage_cell') == '12' %}
<font color="red">{{
states('sensor.yambms_jk_bms_1_cell_voltage_12') }} V</font>
{% elif states('sensor.yambms_jk_bms_1_min_voltage_cell') ==
'12' %} <font color="#3090C7">{{
states('sensor.yambms_jk_bms_1_cell_voltage_12') }} V</font>
{% else %} {{
states('sensor.yambms_jk_bms_1_cell_voltage_12') }} V {%
endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_1_cell_resistance_12') }} Ω
<br> 13.&nbsp;&nbsp;&nbsp; {% if
states('sensor.yambms_jk_bms_1_max_voltage_cell') == '13'
%} <font color="red">{{
{% else %} {{ states('sensor.yambms_jk_bms_1_cell_voltage_12')
}} V {% endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_1_cell_resistance_12') }} Ω <br>
13.&nbsp;&nbsp;&nbsp; {% if
states('sensor.yambms_jk_bms_1_max_voltage_cell') == '13' %}
<font color="red">{{
states('sensor.yambms_jk_bms_1_cell_voltage_13') }} V</font>
{% elif states('sensor.yambms_jk_bms_1_min_voltage_cell') ==
'13' %} <font color="#3090C7">{{
states('sensor.yambms_jk_bms_1_cell_voltage_13') }} V</font>
{% else %} {{
states('sensor.yambms_jk_bms_1_cell_voltage_13') }} V {%
endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_1_cell_resistance_13') }} Ω
<br> 14.&nbsp;&nbsp;&nbsp; {% if
states('sensor.yambms_jk_bms_1_max_voltage_cell') == '14'
%} <font color="red">{{
{% else %} {{ states('sensor.yambms_jk_bms_1_cell_voltage_13')
}} V {% endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_1_cell_resistance_13') }} Ω <br>
14.&nbsp;&nbsp;&nbsp; {% if
states('sensor.yambms_jk_bms_1_max_voltage_cell') == '14' %}
<font color="red">{{
states('sensor.yambms_jk_bms_1_cell_voltage_14') }} V</font>
{% elif states('sensor.yambms_jk_bms_1_min_voltage_cell') ==
'14' %} <font color="#3090C7">{{
states('sensor.yambms_jk_bms_1_cell_voltage_14') }} V</font>
{% else %} {{
states('sensor.yambms_jk_bms_1_cell_voltage_14') }} V {%
endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_1_cell_resistance_14') }} Ω
<br> 15.&nbsp;&nbsp;&nbsp; {% if
states('sensor.yambms_jk_bms_1_max_voltage_cell') == '15'
%} <font color="red">{{
{% else %} {{ states('sensor.yambms_jk_bms_1_cell_voltage_14')
}} V {% endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_1_cell_resistance_14') }} Ω <br>
15.&nbsp;&nbsp;&nbsp; {% if
states('sensor.yambms_jk_bms_1_max_voltage_cell') == '15' %}
<font color="red">{{
states('sensor.yambms_jk_bms_1_cell_voltage_15') }} V</font>
{% elif states('sensor.yambms_jk_bms_1_min_voltage_cell') ==
'15' %} <font color="#3090C7">{{
states('sensor.yambms_jk_bms_1_cell_voltage_15') }} V</font>
{% else %} {{
states('sensor.yambms_jk_bms_1_cell_voltage_15') }} V {%
endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_1_cell_resistance_15') }} Ω
<br> 16.&nbsp;&nbsp;&nbsp; {% if
states('sensor.yambms_jk_bms_1_max_voltage_cell') == '16'
%} <font color="red">{{
{% else %} {{ states('sensor.yambms_jk_bms_1_cell_voltage_15')
}} V {% endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_1_cell_resistance_15') }} Ω <br>
16.&nbsp;&nbsp;&nbsp; {% if
states('sensor.yambms_jk_bms_1_max_voltage_cell') == '16' %}
<font color="red">{{
states('sensor.yambms_jk_bms_1_cell_voltage_16') }} V</font>
{% elif states('sensor.yambms_jk_bms_1_min_voltage_cell') ==
'16' %} <font color="#3090C7">{{
states('sensor.yambms_jk_bms_1_cell_voltage_16') }} V</font>
{% else %} {{
states('sensor.yambms_jk_bms_1_cell_voltage_16') }} V {%
endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
{% else %} {{ states('sensor.yambms_jk_bms_1_cell_voltage_16')
}} V {% endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_1_cell_resistance_16') }} Ω
<br></center>
- type: entities
- type: entity-filter
entities:
- entity: switch.yambms_jk_bms_1_combine_enabled
name: Combine
@@ -618,6 +608,9 @@ views:
name: Cb. Availability
- entity: binary_sensor.yambms_jk_bms_1_can_be_combined
name: Can be combined
conditions:
- condition: state
state_not: unavailable
layout_options:
grid_columns: 2
grid_rows: 3
@@ -678,8 +671,8 @@ views:
- type: markdown
content: >-
<center>Discharge : <b> {% if
states('binary_sensor.yambms_jk_bms_2_discharging') == 'on'
%} <font color=#41CD52>{{
states('binary_sensor.yambms_jk_bms_2_discharging') == 'on' %}
<font color=#41CD52>{{
states('binary_sensor.yambms_jk_bms_2_discharging') | upper
}}</font> {% else %} <font color=#3090C7>{{
states('binary_sensor.yambms_jk_bms_2_discharging') | upper
@@ -727,9 +720,8 @@ views:
color=#41CD52>{{
states('sensor.yambms_jk_bms_2_capacity_remaining') }}
Ah</font><br> Cycle Count :&nbsp;&nbsp;<font color=#41CD52>{{
states('sensor.yambms_jk_bms_2_charging_cycles')
}}</font><br> Delta Cell Vol. :&nbsp;&nbsp;<font
color=#41CD52>{{
states('sensor.yambms_jk_bms_2_charging_cycles') }}</font><br>
Delta Cell Vol. :&nbsp;&nbsp;<font color=#41CD52>{{
states('sensor.yambms_jk_bms_2_delta_cell_voltage') }}
V</font><br> MOS Temp. :&nbsp;&nbsp;<font color=#41CD52>{{
states('sensor.yambms_jk_bms_2_power_tube_temperature') }}
@@ -755,86 +747,78 @@ views:
{% elif states('sensor.yambms_jk_bms_2_min_voltage_cell') ==
'1' %} <font color="#3090C7">{{
states('sensor.yambms_jk_bms_2_cell_voltage_01') }} V</font>
{% else %} {{
states('sensor.yambms_jk_bms_2_cell_voltage_01') }} V {%
endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_2_cell_resistance_01') }} Ω
<br> 02.&nbsp;&nbsp;&nbsp; {% if
{% else %} {{ states('sensor.yambms_jk_bms_2_cell_voltage_01')
}} V {% endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_2_cell_resistance_01') }} Ω <br>
02.&nbsp;&nbsp;&nbsp; {% if
states('sensor.yambms_jk_bms_2_max_voltage_cell') == '2' %}
<font color="red">{{
states('sensor.yambms_jk_bms_2_cell_voltage_02') }} V</font>
{% elif states('sensor.yambms_jk_bms_2_min_voltage_cell') ==
'2' %} <font color="#3090C7">{{
states('sensor.yambms_jk_bms_2_cell_voltage_02') }} V</font>
{% else %} {{
states('sensor.yambms_jk_bms_2_cell_voltage_02') }} V {%
endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_2_cell_resistance_02') }} Ω
<br> 03.&nbsp;&nbsp;&nbsp; {% if
{% else %} {{ states('sensor.yambms_jk_bms_2_cell_voltage_02')
}} V {% endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_2_cell_resistance_02') }} Ω <br>
03.&nbsp;&nbsp;&nbsp; {% if
states('sensor.yambms_jk_bms_2_max_voltage_cell') == '3' %}
<font color="red">{{
states('sensor.yambms_jk_bms_2_cell_voltage_03') }} V</font>
{% elif states('sensor.yambms_jk_bms_2_min_voltage_cell') ==
'3' %} <font color="#3090C7">{{
states('sensor.yambms_jk_bms_2_cell_voltage_03') }} V</font>
{% else %} {{
states('sensor.yambms_jk_bms_2_cell_voltage_03') }} V {%
endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_2_cell_resistance_03') }} Ω
<br> 04.&nbsp;&nbsp;&nbsp; {% if
{% else %} {{ states('sensor.yambms_jk_bms_2_cell_voltage_03')
}} V {% endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_2_cell_resistance_03') }} Ω <br>
04.&nbsp;&nbsp;&nbsp; {% if
states('sensor.yambms_jk_bms_2_max_voltage_cell') == '4' %}
<font color="red">{{
states('sensor.yambms_jk_bms_2_cell_voltage_04') }} V</font>
{% elif states('sensor.yambms_jk_bms_2_min_voltage_cell') ==
'4' %} <font color="#3090C7">{{
states('sensor.yambms_jk_bms_2_cell_voltage_04') }} V</font>
{% else %} {{
states('sensor.yambms_jk_bms_2_cell_voltage_04') }} V {%
endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_2_cell_resistance_04') }} Ω
<br> 05.&nbsp;&nbsp;&nbsp; {% if
{% else %} {{ states('sensor.yambms_jk_bms_2_cell_voltage_04')
}} V {% endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_2_cell_resistance_04') }} Ω <br>
05.&nbsp;&nbsp;&nbsp; {% if
states('sensor.yambms_jk_bms_2_max_voltage_cell') == '5' %}
<font color="red">{{
states('sensor.yambms_jk_bms_2_cell_voltage_05') }} V</font>
{% elif states('sensor.yambms_jk_bms_2_min_voltage_cell') ==
'5' %} <font color="#3090C7">{{
states('sensor.yambms_jk_bms_2_cell_voltage_05') }} V</font>
{% else %} {{
states('sensor.yambms_jk_bms_2_cell_voltage_05') }} V {%
endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_2_cell_resistance_05') }} Ω
<br> 06.&nbsp;&nbsp;&nbsp; {% if
{% else %} {{ states('sensor.yambms_jk_bms_2_cell_voltage_05')
}} V {% endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_2_cell_resistance_05') }} Ω <br>
06.&nbsp;&nbsp;&nbsp; {% if
states('sensor.yambms_jk_bms_2_max_voltage_cell') == '6' %}
<font color="red">{{
states('sensor.yambms_jk_bms_2_cell_voltage_06') }} V</font>
{% elif states('sensor.yambms_jk_bms_2_min_voltage_cell') ==
'6' %} <font color="#3090C7">{{
states('sensor.yambms_jk_bms_2_cell_voltage_06') }} V</font>
{% else %} {{
states('sensor.yambms_jk_bms_2_cell_voltage_06') }} V {%
endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_2_cell_resistance_06') }} Ω
<br> 07.&nbsp;&nbsp;&nbsp; {% if
{% else %} {{ states('sensor.yambms_jk_bms_2_cell_voltage_06')
}} V {% endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_2_cell_resistance_06') }} Ω <br>
07.&nbsp;&nbsp;&nbsp; {% if
states('sensor.yambms_jk_bms_2_max_voltage_cell') == '7' %}
<font color="red">{{
states('sensor.yambms_jk_bms_2_cell_voltage_07') }} V</font>
{% elif states('sensor.yambms_jk_bms_2_min_voltage_cell') ==
'7' %} <font color="#3090C7">{{
states('sensor.yambms_jk_bms_2_cell_voltage_07') }} V</font>
{% else %} {{
states('sensor.yambms_jk_bms_2_cell_voltage_07') }} V {%
endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_2_cell_resistance_07') }} Ω
<br> 08.&nbsp;&nbsp;&nbsp; {% if
{% else %} {{ states('sensor.yambms_jk_bms_2_cell_voltage_07')
}} V {% endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_2_cell_resistance_07') }} Ω <br>
08.&nbsp;&nbsp;&nbsp; {% if
states('sensor.yambms_jk_bms_2_max_voltage_cell') == '8' %}
<font color="red">{{
states('sensor.yambms_jk_bms_2_cell_voltage_08') }} V</font>
{% elif states('sensor.yambms_jk_bms_2_min_voltage_cell') ==
'8' %} <font color="#3090C7">{{
states('sensor.yambms_jk_bms_2_cell_voltage_08') }} V</font>
{% else %} {{
states('sensor.yambms_jk_bms_2_cell_voltage_08') }} V {%
endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
{% else %} {{ states('sensor.yambms_jk_bms_2_cell_voltage_08')
}} V {% endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_2_cell_resistance_08') }} Ω
<br></center>
- type: markdown
@@ -846,89 +830,81 @@ views:
{% elif states('sensor.yambms_jk_bms_2_min_voltage_cell') ==
'9' %} <font color="#3090C7">{{
states('sensor.yambms_jk_bms_2_cell_voltage_09') }} V</font>
{% else %} {{
states('sensor.yambms_jk_bms_2_cell_voltage_09') }} V {%
endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_2_cell_resistance_09') }} Ω
<br> 10.&nbsp;&nbsp;&nbsp; {% if
states('sensor.yambms_jk_bms_2_max_voltage_cell') == '10'
%} <font color="red">{{
{% else %} {{ states('sensor.yambms_jk_bms_2_cell_voltage_09')
}} V {% endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_2_cell_resistance_09') }} Ω <br>
10.&nbsp;&nbsp;&nbsp; {% if
states('sensor.yambms_jk_bms_2_max_voltage_cell') == '10' %}
<font color="red">{{
states('sensor.yambms_jk_bms_2_cell_voltage_10') }} V</font>
{% elif states('sensor.yambms_jk_bms_2_min_voltage_cell') ==
'10' %} <font color="#3090C7">{{
states('sensor.yambms_jk_bms_2_cell_voltage_10') }} V</font>
{% else %} {{
states('sensor.yambms_jk_bms_2_cell_voltage_10') }} V {%
endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_2_cell_resistance_10') }} Ω
<br> 11.&nbsp;&nbsp;&nbsp; {% if
states('sensor.yambms_jk_bms_2_max_voltage_cell') == '11'
%} <font color="red">{{
{% else %} {{ states('sensor.yambms_jk_bms_2_cell_voltage_10')
}} V {% endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_2_cell_resistance_10') }} Ω <br>
11.&nbsp;&nbsp;&nbsp; {% if
states('sensor.yambms_jk_bms_2_max_voltage_cell') == '11' %}
<font color="red">{{
states('sensor.yambms_jk_bms_2_cell_voltage_11') }} V</font>
{% elif states('sensor.yambms_jk_bms_2_min_voltage_cell') ==
'11' %} <font color="#3090C7">{{
states('sensor.yambms_jk_bms_2_cell_voltage_11') }} V</font>
{% else %} {{
states('sensor.yambms_jk_bms_2_cell_voltage_11') }} V {%
endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_2_cell_resistance_11') }} Ω
<br> 12.&nbsp;&nbsp;&nbsp; {% if
states('sensor.yambms_jk_bms_2_max_voltage_cell') == '12'
%} <font color="red">{{
{% else %} {{ states('sensor.yambms_jk_bms_2_cell_voltage_11')
}} V {% endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_2_cell_resistance_11') }} Ω <br>
12.&nbsp;&nbsp;&nbsp; {% if
states('sensor.yambms_jk_bms_2_max_voltage_cell') == '12' %}
<font color="red">{{
states('sensor.yambms_jk_bms_2_cell_voltage_12') }} V</font>
{% elif states('sensor.yambms_jk_bms_2_min_voltage_cell') ==
'12' %} <font color="#3090C7">{{
states('sensor.yambms_jk_bms_2_cell_voltage_12') }} V</font>
{% else %} {{
states('sensor.yambms_jk_bms_2_cell_voltage_12') }} V {%
endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_2_cell_resistance_12') }} Ω
<br> 13.&nbsp;&nbsp;&nbsp; {% if
states('sensor.yambms_jk_bms_2_max_voltage_cell') == '13'
%} <font color="red">{{
{% else %} {{ states('sensor.yambms_jk_bms_2_cell_voltage_12')
}} V {% endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_2_cell_resistance_12') }} Ω <br>
13.&nbsp;&nbsp;&nbsp; {% if
states('sensor.yambms_jk_bms_2_max_voltage_cell') == '13' %}
<font color="red">{{
states('sensor.yambms_jk_bms_2_cell_voltage_13') }} V</font>
{% elif states('sensor.yambms_jk_bms_2_min_voltage_cell') ==
'13' %} <font color="#3090C7">{{
states('sensor.yambms_jk_bms_2_cell_voltage_13') }} V</font>
{% else %} {{
states('sensor.yambms_jk_bms_2_cell_voltage_13') }} V {%
endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_2_cell_resistance_13') }} Ω
<br> 14.&nbsp;&nbsp;&nbsp; {% if
states('sensor.yambms_jk_bms_2_max_voltage_cell') == '14'
%} <font color="red">{{
{% else %} {{ states('sensor.yambms_jk_bms_2_cell_voltage_13')
}} V {% endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_2_cell_resistance_13') }} Ω <br>
14.&nbsp;&nbsp;&nbsp; {% if
states('sensor.yambms_jk_bms_2_max_voltage_cell') == '14' %}
<font color="red">{{
states('sensor.yambms_jk_bms_2_cell_voltage_14') }} V</font>
{% elif states('sensor.yambms_jk_bms_2_min_voltage_cell') ==
'14' %} <font color="#3090C7">{{
states('sensor.yambms_jk_bms_2_cell_voltage_14') }} V</font>
{% else %} {{
states('sensor.yambms_jk_bms_2_cell_voltage_14') }} V {%
endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_2_cell_resistance_14') }} Ω
<br> 15.&nbsp;&nbsp;&nbsp; {% if
states('sensor.yambms_jk_bms_2_max_voltage_cell') == '15'
%} <font color="red">{{
{% else %} {{ states('sensor.yambms_jk_bms_2_cell_voltage_14')
}} V {% endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_2_cell_resistance_14') }} Ω <br>
15.&nbsp;&nbsp;&nbsp; {% if
states('sensor.yambms_jk_bms_2_max_voltage_cell') == '15' %}
<font color="red">{{
states('sensor.yambms_jk_bms_2_cell_voltage_15') }} V</font>
{% elif states('sensor.yambms_jk_bms_2_min_voltage_cell') ==
'15' %} <font color="#3090C7">{{
states('sensor.yambms_jk_bms_2_cell_voltage_15') }} V</font>
{% else %} {{
states('sensor.yambms_jk_bms_2_cell_voltage_15') }} V {%
endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_2_cell_resistance_15') }} Ω
<br> 16.&nbsp;&nbsp;&nbsp; {% if
states('sensor.yambms_jk_bms_2_max_voltage_cell') == '16'
%} <font color="red">{{
{% else %} {{ states('sensor.yambms_jk_bms_2_cell_voltage_15')
}} V {% endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_2_cell_resistance_15') }} Ω <br>
16.&nbsp;&nbsp;&nbsp; {% if
states('sensor.yambms_jk_bms_2_max_voltage_cell') == '16' %}
<font color="red">{{
states('sensor.yambms_jk_bms_2_cell_voltage_16') }} V</font>
{% elif states('sensor.yambms_jk_bms_2_min_voltage_cell') ==
'16' %} <font color="#3090C7">{{
states('sensor.yambms_jk_bms_2_cell_voltage_16') }} V</font>
{% else %} {{
states('sensor.yambms_jk_bms_2_cell_voltage_16') }} V {%
endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
{% else %} {{ states('sensor.yambms_jk_bms_2_cell_voltage_16')
}} V {% endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_2_cell_resistance_16') }} Ω
<br></center>
- type: entities
- type: entity-filter
entities:
- entity: switch.yambms_jk_bms_2_combine_enabled
name: Combine
@@ -936,6 +912,9 @@ views:
name: Cb. Availability
- entity: binary_sensor.yambms_jk_bms_2_can_be_combined
name: Can be combined
conditions:
- condition: state
state_not: unavailable
layout_options:
grid_columns: 2
grid_rows: 3
@@ -996,8 +975,8 @@ views:
- type: markdown
content: >-
<center>Discharge : <b> {% if
states('binary_sensor.yambms_jk_bms_3_discharging') == 'on'
%} <font color=#41CD52>{{
states('binary_sensor.yambms_jk_bms_3_discharging') == 'on' %}
<font color=#41CD52>{{
states('binary_sensor.yambms_jk_bms_3_discharging') | upper
}}</font> {% else %} <font color=#3090C7>{{
states('binary_sensor.yambms_jk_bms_3_discharging') | upper
@@ -1045,9 +1024,8 @@ views:
color=#41CD52>{{
states('sensor.yambms_jk_bms_3_capacity_remaining') }}
Ah</font><br> Cycle Count :&nbsp;&nbsp;<font color=#41CD52>{{
states('sensor.yambms_jk_bms_3_charging_cycles')
}}</font><br> Delta Cell Vol. :&nbsp;&nbsp;<font
color=#41CD52>{{
states('sensor.yambms_jk_bms_3_charging_cycles') }}</font><br>
Delta Cell Vol. :&nbsp;&nbsp;<font color=#41CD52>{{
states('sensor.yambms_jk_bms_3_delta_cell_voltage') }}
V</font><br> MOS Temp. :&nbsp;&nbsp;<font color=#41CD52>{{
states('sensor.yambms_jk_bms_3_power_tube_temperature') }}
@@ -1073,86 +1051,78 @@ views:
{% elif states('sensor.yambms_jk_bms_3_min_voltage_cell') ==
'1' %} <font color="#3090C7">{{
states('sensor.yambms_jk_bms_3_cell_voltage_01') }} V</font>
{% else %} {{
states('sensor.yambms_jk_bms_3_cell_voltage_01') }} V {%
endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_3_cell_resistance_01') }} Ω
<br> 02.&nbsp;&nbsp;&nbsp; {% if
{% else %} {{ states('sensor.yambms_jk_bms_3_cell_voltage_01')
}} V {% endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_3_cell_resistance_01') }} Ω <br>
02.&nbsp;&nbsp;&nbsp; {% if
states('sensor.yambms_jk_bms_3_max_voltage_cell') == '2' %}
<font color="red">{{
states('sensor.yambms_jk_bms_3_cell_voltage_02') }} V</font>
{% elif states('sensor.yambms_jk_bms_3_min_voltage_cell') ==
'2' %} <font color="#3090C7">{{
states('sensor.yambms_jk_bms_3_cell_voltage_02') }} V</font>
{% else %} {{
states('sensor.yambms_jk_bms_3_cell_voltage_02') }} V {%
endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_3_cell_resistance_02') }} Ω
<br> 03.&nbsp;&nbsp;&nbsp; {% if
{% else %} {{ states('sensor.yambms_jk_bms_3_cell_voltage_02')
}} V {% endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_3_cell_resistance_02') }} Ω <br>
03.&nbsp;&nbsp;&nbsp; {% if
states('sensor.yambms_jk_bms_3_max_voltage_cell') == '3' %}
<font color="red">{{
states('sensor.yambms_jk_bms_3_cell_voltage_03') }} V</font>
{% elif states('sensor.yambms_jk_bms_3_min_voltage_cell') ==
'3' %} <font color="#3090C7">{{
states('sensor.yambms_jk_bms_3_cell_voltage_03') }} V</font>
{% else %} {{
states('sensor.yambms_jk_bms_3_cell_voltage_03') }} V {%
endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_3_cell_resistance_03') }} Ω
<br> 04.&nbsp;&nbsp;&nbsp; {% if
{% else %} {{ states('sensor.yambms_jk_bms_3_cell_voltage_03')
}} V {% endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_3_cell_resistance_03') }} Ω <br>
04.&nbsp;&nbsp;&nbsp; {% if
states('sensor.yambms_jk_bms_3_max_voltage_cell') == '4' %}
<font color="red">{{
states('sensor.yambms_jk_bms_3_cell_voltage_04') }} V</font>
{% elif states('sensor.yambms_jk_bms_3_min_voltage_cell') ==
'4' %} <font color="#3090C7">{{
states('sensor.yambms_jk_bms_3_cell_voltage_04') }} V</font>
{% else %} {{
states('sensor.yambms_jk_bms_3_cell_voltage_04') }} V {%
endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_3_cell_resistance_04') }} Ω
<br> 05.&nbsp;&nbsp;&nbsp; {% if
{% else %} {{ states('sensor.yambms_jk_bms_3_cell_voltage_04')
}} V {% endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_3_cell_resistance_04') }} Ω <br>
05.&nbsp;&nbsp;&nbsp; {% if
states('sensor.yambms_jk_bms_3_max_voltage_cell') == '5' %}
<font color="red">{{
states('sensor.yambms_jk_bms_3_cell_voltage_05') }} V</font>
{% elif states('sensor.yambms_jk_bms_3_min_voltage_cell') ==
'5' %} <font color="#3090C7">{{
states('sensor.yambms_jk_bms_3_cell_voltage_05') }} V</font>
{% else %} {{
states('sensor.yambms_jk_bms_3_cell_voltage_05') }} V {%
endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_3_cell_resistance_05') }} Ω
<br> 06.&nbsp;&nbsp;&nbsp; {% if
{% else %} {{ states('sensor.yambms_jk_bms_3_cell_voltage_05')
}} V {% endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_3_cell_resistance_05') }} Ω <br>
06.&nbsp;&nbsp;&nbsp; {% if
states('sensor.yambms_jk_bms_3_max_voltage_cell') == '6' %}
<font color="red">{{
states('sensor.yambms_jk_bms_3_cell_voltage_06') }} V</font>
{% elif states('sensor.yambms_jk_bms_3_min_voltage_cell') ==
'6' %} <font color="#3090C7">{{
states('sensor.yambms_jk_bms_3_cell_voltage_06') }} V</font>
{% else %} {{
states('sensor.yambms_jk_bms_3_cell_voltage_06') }} V {%
endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_3_cell_resistance_06') }} Ω
<br> 07.&nbsp;&nbsp;&nbsp; {% if
{% else %} {{ states('sensor.yambms_jk_bms_3_cell_voltage_06')
}} V {% endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_3_cell_resistance_06') }} Ω <br>
07.&nbsp;&nbsp;&nbsp; {% if
states('sensor.yambms_jk_bms_3_max_voltage_cell') == '7' %}
<font color="red">{{
states('sensor.yambms_jk_bms_3_cell_voltage_07') }} V</font>
{% elif states('sensor.yambms_jk_bms_3_min_voltage_cell') ==
'7' %} <font color="#3090C7">{{
states('sensor.yambms_jk_bms_3_cell_voltage_07') }} V</font>
{% else %} {{
states('sensor.yambms_jk_bms_3_cell_voltage_07') }} V {%
endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_3_cell_resistance_07') }} Ω
<br> 08.&nbsp;&nbsp;&nbsp; {% if
{% else %} {{ states('sensor.yambms_jk_bms_3_cell_voltage_07')
}} V {% endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_3_cell_resistance_07') }} Ω <br>
08.&nbsp;&nbsp;&nbsp; {% if
states('sensor.yambms_jk_bms_3_max_voltage_cell') == '8' %}
<font color="red">{{
states('sensor.yambms_jk_bms_3_cell_voltage_08') }} V</font>
{% elif states('sensor.yambms_jk_bms_3_min_voltage_cell') ==
'8' %} <font color="#3090C7">{{
states('sensor.yambms_jk_bms_3_cell_voltage_08') }} V</font>
{% else %} {{
states('sensor.yambms_jk_bms_3_cell_voltage_08') }} V {%
endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
{% else %} {{ states('sensor.yambms_jk_bms_3_cell_voltage_08')
}} V {% endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_3_cell_resistance_08') }} Ω
<br></center>
- type: markdown
@@ -1164,89 +1134,81 @@ views:
{% elif states('sensor.yambms_jk_bms_3_min_voltage_cell') ==
'9' %} <font color="#3090C7">{{
states('sensor.yambms_jk_bms_3_cell_voltage_09') }} V</font>
{% else %} {{
states('sensor.yambms_jk_bms_3_cell_voltage_09') }} V {%
endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_3_cell_resistance_09') }} Ω
<br> 10.&nbsp;&nbsp;&nbsp; {% if
states('sensor.yambms_jk_bms_3_max_voltage_cell') == '10'
%} <font color="red">{{
{% else %} {{ states('sensor.yambms_jk_bms_3_cell_voltage_09')
}} V {% endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_3_cell_resistance_09') }} Ω <br>
10.&nbsp;&nbsp;&nbsp; {% if
states('sensor.yambms_jk_bms_3_max_voltage_cell') == '10' %}
<font color="red">{{
states('sensor.yambms_jk_bms_3_cell_voltage_10') }} V</font>
{% elif states('sensor.yambms_jk_bms_3_min_voltage_cell') ==
'10' %} <font color="#3090C7">{{
states('sensor.yambms_jk_bms_3_cell_voltage_10') }} V</font>
{% else %} {{
states('sensor.yambms_jk_bms_3_cell_voltage_10') }} V {%
endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_3_cell_resistance_10') }} Ω
<br> 11.&nbsp;&nbsp;&nbsp; {% if
states('sensor.yambms_jk_bms_3_max_voltage_cell') == '11'
%} <font color="red">{{
{% else %} {{ states('sensor.yambms_jk_bms_3_cell_voltage_10')
}} V {% endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_3_cell_resistance_10') }} Ω <br>
11.&nbsp;&nbsp;&nbsp; {% if
states('sensor.yambms_jk_bms_3_max_voltage_cell') == '11' %}
<font color="red">{{
states('sensor.yambms_jk_bms_3_cell_voltage_11') }} V</font>
{% elif states('sensor.yambms_jk_bms_3_min_voltage_cell') ==
'11' %} <font color="#3090C7">{{
states('sensor.yambms_jk_bms_3_cell_voltage_11') }} V</font>
{% else %} {{
states('sensor.yambms_jk_bms_3_cell_voltage_11') }} V {%
endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_3_cell_resistance_11') }} Ω
<br> 12.&nbsp;&nbsp;&nbsp; {% if
states('sensor.yambms_jk_bms_3_max_voltage_cell') == '12'
%} <font color="red">{{
{% else %} {{ states('sensor.yambms_jk_bms_3_cell_voltage_11')
}} V {% endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_3_cell_resistance_11') }} Ω <br>
12.&nbsp;&nbsp;&nbsp; {% if
states('sensor.yambms_jk_bms_3_max_voltage_cell') == '12' %}
<font color="red">{{
states('sensor.yambms_jk_bms_3_cell_voltage_12') }} V</font>
{% elif states('sensor.yambms_jk_bms_3_min_voltage_cell') ==
'12' %} <font color="#3090C7">{{
states('sensor.yambms_jk_bms_3_cell_voltage_12') }} V</font>
{% else %} {{
states('sensor.yambms_jk_bms_3_cell_voltage_12') }} V {%
endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_3_cell_resistance_12') }} Ω
<br> 13.&nbsp;&nbsp;&nbsp; {% if
states('sensor.yambms_jk_bms_3_max_voltage_cell') == '13'
%} <font color="red">{{
{% else %} {{ states('sensor.yambms_jk_bms_3_cell_voltage_12')
}} V {% endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_3_cell_resistance_12') }} Ω <br>
13.&nbsp;&nbsp;&nbsp; {% if
states('sensor.yambms_jk_bms_3_max_voltage_cell') == '13' %}
<font color="red">{{
states('sensor.yambms_jk_bms_3_cell_voltage_13') }} V</font>
{% elif states('sensor.yambms_jk_bms_3_min_voltage_cell') ==
'13' %} <font color="#3090C7">{{
states('sensor.yambms_jk_bms_3_cell_voltage_13') }} V</font>
{% else %} {{
states('sensor.yambms_jk_bms_3_cell_voltage_13') }} V {%
endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_3_cell_resistance_13') }} Ω
<br> 14.&nbsp;&nbsp;&nbsp; {% if
states('sensor.yambms_jk_bms_3_max_voltage_cell') == '14'
%} <font color="red">{{
{% else %} {{ states('sensor.yambms_jk_bms_3_cell_voltage_13')
}} V {% endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_3_cell_resistance_13') }} Ω <br>
14.&nbsp;&nbsp;&nbsp; {% if
states('sensor.yambms_jk_bms_3_max_voltage_cell') == '14' %}
<font color="red">{{
states('sensor.yambms_jk_bms_3_cell_voltage_14') }} V</font>
{% elif states('sensor.yambms_jk_bms_3_min_voltage_cell') ==
'14' %} <font color="#3090C7">{{
states('sensor.yambms_jk_bms_3_cell_voltage_14') }} V</font>
{% else %} {{
states('sensor.yambms_jk_bms_3_cell_voltage_14') }} V {%
endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_3_cell_resistance_14') }} Ω
<br> 15.&nbsp;&nbsp;&nbsp; {% if
states('sensor.yambms_jk_bms_3_max_voltage_cell') == '15'
%} <font color="red">{{
{% else %} {{ states('sensor.yambms_jk_bms_3_cell_voltage_14')
}} V {% endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_3_cell_resistance_14') }} Ω <br>
15.&nbsp;&nbsp;&nbsp; {% if
states('sensor.yambms_jk_bms_3_max_voltage_cell') == '15' %}
<font color="red">{{
states('sensor.yambms_jk_bms_3_cell_voltage_15') }} V</font>
{% elif states('sensor.yambms_jk_bms_3_min_voltage_cell') ==
'15' %} <font color="#3090C7">{{
states('sensor.yambms_jk_bms_3_cell_voltage_15') }} V</font>
{% else %} {{
states('sensor.yambms_jk_bms_3_cell_voltage_15') }} V {%
endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_3_cell_resistance_15') }} Ω
<br> 16.&nbsp;&nbsp;&nbsp; {% if
states('sensor.yambms_jk_bms_3_max_voltage_cell') == '16'
%} <font color="red">{{
{% else %} {{ states('sensor.yambms_jk_bms_3_cell_voltage_15')
}} V {% endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_3_cell_resistance_15') }} Ω <br>
16.&nbsp;&nbsp;&nbsp; {% if
states('sensor.yambms_jk_bms_3_max_voltage_cell') == '16' %}
<font color="red">{{
states('sensor.yambms_jk_bms_3_cell_voltage_16') }} V</font>
{% elif states('sensor.yambms_jk_bms_3_min_voltage_cell') ==
'16' %} <font color="#3090C7">{{
states('sensor.yambms_jk_bms_3_cell_voltage_16') }} V</font>
{% else %} {{
states('sensor.yambms_jk_bms_3_cell_voltage_16') }} V {%
endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
{% else %} {{ states('sensor.yambms_jk_bms_3_cell_voltage_16')
}} V {% endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_3_cell_resistance_16') }} Ω
<br></center>
- type: entities
- type: entity-filter
entities:
- entity: switch.yambms_jk_bms_3_combine_enabled
name: Combine
@@ -1254,6 +1216,9 @@ views:
name: Cb. Availability
- entity: binary_sensor.yambms_jk_bms_3_can_be_combined
name: Can be combined
conditions:
- condition: state
state_not: unavailable
layout_options:
grid_columns: 2
grid_rows: 3
@@ -1349,4 +1314,3 @@ views:
name: Shunt 1 Can be combined
title: Shunt 1
column_span: 1
@@ -1,5 +1,5 @@
# Updated : 2024.10.04
# Version : 1.1.4
# Updated : 2024.11.11
# Version : 1.5.1
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -81,7 +81,7 @@ views:
entity: sensor.yambms_yambms_1_delta_cell_voltage
name: Delta Cell Voltage
- type: tile
entity: binary_sensor.yambms_yambms_1_equalizing_state
entity: binary_sensor.yambms_yambms_1_bms_equalizing_state
name: Equalizing state
- type: entities
entities:
@@ -133,14 +133,14 @@ views:
entity: sensor.yambms_yambms_1_charging_status
name: Charging Status
- type: tile
entity: sensor.yambms_esp32_uptime
name: ESP32 Uptime
entity: sensor.yambms_yambms_1_last_complete_charge
name: Last Complete Charge
- type: tile
entity: sensor.yambms_yambms_1_charging_instruction
name: Charging Instruction
- type: tile
entity: sensor.yambms_yambms_1_last_complete_charge
name: Last Complete Charge
entity: binary_sensor.yambms_yambms_1_discharging_instruction
name: Discharging Instruction
- type: tile
entity: sensor.yambms_yambms_1_alarm
name: Alarm
@@ -153,11 +153,18 @@ views:
name: BMS count
- entity: sensor.yambms_yambms_1_bms_combined
name: BMS combined
- entity: sensor.yambms_yambms_1_bms_blocking_charge
name: BMS blocking charge
- entity: sensor.yambms_yambms_1_bms_blocking_discharge
name: BMS blocking discharge
- entity: sensor.yambms_yambms_1_bms_in_alarm
name: BMS in alarm
layout_options:
grid_columns: 2
grid_rows: 3
grid_rows: 4
- type: tile
entity: sensor.yambms_esp32_uptime
name: ESP32 Uptime
- type: entities
entities:
- entity: sensor.yambms_yambms_1_shunt_count
@@ -202,10 +209,10 @@ views:
name: YamBMS 1 Charge enabled
- entity: switch.yambms_yambms_1_discharge_enabled
name: YamBMS 1 Discharge enabled
- entity: binary_sensor.yambms_yambms_1_bms_charge_switch_state
name: YamBMS 1 BMS Charge switch state
- entity: binary_sensor.yambms_yambms_1_bms_discharge_switch_state
name: YamBMS 1 BMS Discharge switch state
- entity: binary_sensor.yambms_yambms_1_bms_charging_allowed
name: YamBMS 1 BMS Charging allowed
- entity: binary_sensor.yambms_yambms_1_bms_discharging_allowed
name: YamBMS 1 BMS Discharging allowed
title: YamBMS - Charge / Discharge switch
- type: entities
entities:
@@ -610,7 +617,7 @@ views:
endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_1_cell_resistance_16') }} Ω
<br></center>
- type: entities
- type: entity-filter
entities:
- entity: switch.yambms_jk_bms_1_combine_enabled
name: Combine
@@ -618,6 +625,9 @@ views:
name: Cb. Availability
- entity: binary_sensor.yambms_jk_bms_1_can_be_combined
name: Can be combined
conditions:
- condition: state
state_not: unavailable
layout_options:
grid_columns: 2
grid_rows: 3
@@ -928,7 +938,7 @@ views:
endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_2_cell_resistance_16') }} Ω
<br></center>
- type: entities
- type: entity-filter
entities:
- entity: switch.yambms_jk_bms_2_combine_enabled
name: Combine
@@ -936,6 +946,9 @@ views:
name: Cb. Availability
- entity: binary_sensor.yambms_jk_bms_2_can_be_combined
name: Can be combined
conditions:
- condition: state
state_not: unavailable
layout_options:
grid_columns: 2
grid_rows: 3
@@ -1246,7 +1259,7 @@ views:
endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_3_cell_resistance_16') }} Ω
<br></center>
- type: entities
- type: entity-filter
entities:
- entity: switch.yambms_jk_bms_3_combine_enabled
name: Combine
@@ -1254,6 +1267,9 @@ views:
name: Cb. Availability
- entity: binary_sensor.yambms_jk_bms_3_can_be_combined
name: Can be combined
conditions:
- condition: state
state_not: unavailable
layout_options:
grid_columns: 2
grid_rows: 3
@@ -1,5 +1,5 @@
# Updated : 2024.10.04
# Version : 1.1.4
# Updated : 2024.11.11
# Version : 1.5.1
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -81,7 +81,7 @@ views:
entity: sensor.yambms_yambms_1_delta_cell_voltage
name: Delta Cell Voltage
- type: tile
entity: binary_sensor.yambms_yambms_1_equalizing_state
entity: binary_sensor.yambms_yambms_1_bms_equalizing_state
name: Equalizing state
- type: entities
entities:
@@ -133,14 +133,14 @@ views:
entity: sensor.yambms_yambms_1_charging_status
name: Charging Status
- type: tile
entity: sensor.yambms_esp32_uptime
name: ESP32 Uptime
entity: sensor.yambms_yambms_1_last_complete_charge
name: Last Complete Charge
- type: tile
entity: sensor.yambms_yambms_1_charging_instruction
name: Charging Instruction
- type: tile
entity: sensor.yambms_yambms_1_last_complete_charge
name: Last Complete Charge
entity: binary_sensor.yambms_yambms_1_discharging_instruction
name: Discharging Instruction
- type: tile
entity: sensor.yambms_yambms_1_alarm
name: Alarm
@@ -153,11 +153,18 @@ views:
name: BMS count
- entity: sensor.yambms_yambms_1_bms_combined
name: BMS combined
- entity: sensor.yambms_yambms_1_bms_blocking_charge
name: BMS blocking charge
- entity: sensor.yambms_yambms_1_bms_blocking_discharge
name: BMS blocking discharge
- entity: sensor.yambms_yambms_1_bms_in_alarm
name: BMS in alarm
layout_options:
grid_columns: 2
grid_rows: 3
grid_rows: 4
- type: tile
entity: sensor.yambms_esp32_uptime
name: ESP32 Uptime
- type: entities
entities:
- entity: sensor.yambms_yambms_1_shunt_count
@@ -202,10 +209,10 @@ views:
name: YamBMS 1 Charge enabled
- entity: switch.yambms_yambms_1_discharge_enabled
name: YamBMS 1 Discharge enabled
- entity: binary_sensor.yambms_yambms_1_bms_charge_switch_state
name: YamBMS 1 BMS Charge switch state
- entity: binary_sensor.yambms_yambms_1_bms_discharge_switch_state
name: YamBMS 1 BMS Discharge switch state
- entity: binary_sensor.yambms_yambms_1_bms_charging_allowed
name: YamBMS 1 BMS Charging allowed
- entity: binary_sensor.yambms_yambms_1_bms_discharging_allowed
name: YamBMS 1 BMS Discharging allowed
title: YamBMS - Charge / Discharge switch
- type: entities
entities:
@@ -610,7 +617,7 @@ views:
endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_1_cell_resistance_16') }} Ω
<br></center>
- type: entities
- type: entity-filter
entities:
- entity: switch.yambms_jk_bms_1_combine_enabled
name: Combine
@@ -618,6 +625,9 @@ views:
name: Cb. Availability
- entity: binary_sensor.yambms_jk_bms_1_can_be_combined
name: Can be combined
conditions:
- condition: state
state_not: unavailable
layout_options:
grid_columns: 2
grid_rows: 3
@@ -928,7 +938,7 @@ views:
endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_2_cell_resistance_16') }} Ω
<br></center>
- type: entities
- type: entity-filter
entities:
- entity: switch.yambms_jk_bms_2_combine_enabled
name: Combine
@@ -936,6 +946,9 @@ views:
name: Cb. Availability
- entity: binary_sensor.yambms_jk_bms_2_can_be_combined
name: Can be combined
conditions:
- condition: state
state_not: unavailable
layout_options:
grid_columns: 2
grid_rows: 3
@@ -1246,7 +1259,7 @@ views:
endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_3_cell_resistance_16') }} Ω
<br></center>
- type: entities
- type: entity-filter
entities:
- entity: switch.yambms_jk_bms_3_combine_enabled
name: Combine
@@ -1254,6 +1267,9 @@ views:
name: Cb. Availability
- entity: binary_sensor.yambms_jk_bms_3_can_be_combined
name: Can be combined
conditions:
- condition: state
state_not: unavailable
layout_options:
grid_columns: 2
grid_rows: 3
@@ -1564,7 +1580,7 @@ views:
endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_4_cell_resistance_16') }} Ω
<br></center>
- type: entities
- type: entity-filter
entities:
- entity: switch.yambms_jk_bms_4_combine_enabled
name: Combine
@@ -1572,6 +1588,9 @@ views:
name: Cb. Availability
- entity: binary_sensor.yambms_jk_bms_4_can_be_combined
name: Can be combined
conditions:
- condition: state
state_not: unavailable
layout_options:
grid_columns: 2
grid_rows: 3
@@ -1882,7 +1901,7 @@ views:
endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_5_cell_resistance_16') }} Ω
<br></center>
- type: entities
- type: entity-filter
entities:
- entity: switch.yambms_jk_bms_5_combine_enabled
name: Combine
@@ -1890,6 +1909,9 @@ views:
name: Cb. Availability
- entity: binary_sensor.yambms_jk_bms_5_can_be_combined
name: Can be combined
conditions:
- condition: state
state_not: unavailable
layout_options:
grid_columns: 2
grid_rows: 3
@@ -2200,7 +2222,7 @@ views:
endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_6_cell_resistance_16') }} Ω
<br></center>
- type: entities
- type: entity-filter
entities:
- entity: switch.yambms_jk_bms_6_combine_enabled
name: Combine
@@ -2208,6 +2230,9 @@ views:
name: Cb. Availability
- entity: binary_sensor.yambms_jk_bms_6_can_be_combined
name: Can be combined
conditions:
- condition: state
state_not: unavailable
layout_options:
grid_columns: 2
grid_rows: 3
@@ -2518,7 +2543,7 @@ views:
endif %} &nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp; {{
states('sensor.yambms_jk_bms_7_cell_resistance_16') }} Ω
<br></center>
- type: entities
- type: entity-filter
entities:
- entity: switch.yambms_jk_bms_7_combine_enabled
name: Combine
@@ -2526,6 +2551,9 @@ views:
name: Cb. Availability
- entity: binary_sensor.yambms_jk_bms_7_can_be_combined
name: Can be combined
conditions:
- condition: state
state_not: unavailable
layout_options:
grid_columns: 2
grid_rows: 3
@@ -0,0 +1,322 @@
# Updated : 2024.11.11
# Version : 1.5.1
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
# This YAML is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
views:
- title: YamBMS
type: sections
max_columns: 3
sections:
- type: grid
cards:
- graph: line
type: sensor
entity: sensor.yambms_yambms_1_total_voltage_o
detail: 2
layout_options:
grid_columns: 2
grid_rows: 2
name: Voltage
hours_to_show: 8
- graph: line
type: sensor
entity: sensor.yambms_yambms_1_battery_soc
detail: 2
name: SoC
hours_to_show: 8
- type: gauge
entity: sensor.yambms_yambms_1_current_s
needle: true
severity:
green: 0
yellow: -250
red: -500
max: 500
min: -500
name: Current
layout_options:
grid_columns: 2
grid_rows: 3
- type: gauge
entity: sensor.yambms_yambms_1_power_s
needle: true
severity:
green: 0
yellow: -2500
red: -5000
max: 5000
min: -5000
name: Power
layout_options:
grid_columns: 2
grid_rows: 3
- type: tile
entity: sensor.yambms_yambms_1_installed_battery_capacity_s
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
name: Battery Capacity
- type: tile
entity: sensor.yambms_yambms_1_capacity_remaining_s
name: Capacity Remaining
- type: tile
entity: sensor.yambms_yambms_1_delta_cell_voltage
name: Delta Cell Voltage
- type: tile
entity: binary_sensor.yambms_yambms_1_bms_equalizing_state
name: Equalizing state
- type: entities
entities:
- entity: sensor.yambms_yambms_1_max_cell_voltage
name: Max Cell V.
- entity: sensor.yambms_yambms_1_max_voltage_cell
name: Cell number
layout_options:
grid_columns: 2
grid_rows: 2
- type: entities
entities:
- entity: sensor.yambms_yambms_1_min_cell_voltage
name: Min Cell V.
- entity: sensor.yambms_yambms_1_min_voltage_cell
name: Cell number
layout_options:
grid_columns: 2
grid_rows: 2
- type: entities
entities:
- entity: sensor.yambms_yambms_1_max_temperature
name: Max temp.
- entity: sensor.yambms_yambms_1_max_temperature_sensor
name: Sensor number
layout_options:
grid_columns: 2
grid_rows: 2
- type: entities
entities:
- entity: sensor.yambms_yambms_1_min_temperature
name: Min temp.
- entity: sensor.yambms_yambms_1_min_temperature_sensor
name: Sensor number
layout_options:
grid_columns: 2
grid_rows: 2
title: YamBMS - Battery
column_span: 1
- type: grid
cards:
- type: tile
entity: binary_sensor.yambms_canbus_1_status
name: CANBUS Status
- type: tile
entity: binary_sensor.yambms_esp32_online_status
name: ESP32 Status
- type: tile
entity: sensor.yambms_yambms_1_charging_status
name: Charging Status
- type: tile
entity: sensor.yambms_yambms_1_last_complete_charge
name: Last Complete Charge
- type: tile
entity: sensor.yambms_yambms_1_charging_instruction
name: Charging Instruction
- type: tile
entity: binary_sensor.yambms_yambms_1_discharging_instruction
name: Discharging Instruction
- type: tile
entity: sensor.yambms_yambms_1_alarm
name: Alarm
- type: tile
entity: sensor.yambms_yambms_1_warning
name: Warning
- type: entities
entities:
- entity: sensor.yambms_yambms_1_bms_count
name: BMS count
- entity: sensor.yambms_yambms_1_bms_combined
name: BMS combined
- entity: sensor.yambms_yambms_1_bms_blocking_charge
name: BMS blocking charge
- entity: sensor.yambms_yambms_1_bms_blocking_discharge
name: BMS blocking discharge
- entity: sensor.yambms_yambms_1_bms_in_alarm
name: BMS in alarm
layout_options:
grid_columns: 2
grid_rows: 4
- type: tile
entity: sensor.yambms_esp32_uptime
name: ESP32 Uptime
- type: entities
entities:
- entity: sensor.yambms_yambms_1_shunt_count
name: Shunt count
- entity: sensor.yambms_yambms_1_shunt_combined
name: Shunt combined
layout_options:
grid_columns: 2
grid_rows: 3
- type: entities
entities:
- entity: sensor.yambms_yambms_1_requested_charge_voltage
name: Requested Charge Voltage
- entity: sensor.yambms_yambms_1_requested_charge_current
name: Requested Charge Current
- entity: sensor.yambms_yambms_1_requested_discharge_voltage
name: Requested Discharge Voltage
- entity: sensor.yambms_yambms_1_requested_discharge_current
name: Requested Discharge Current
- entity: binary_sensor.yambms_yambms_1_requested_force_charge
name: Requested Force Charge
- type: tile
entity: sensor.yambms_yambms_1_running_version
name: Running version
- type: tile
entity: sensor.yambms_yambms_1_last_version
name: Last version
title: YamBMS - Status
column_span: 1
- title: Control
cards:
- type: entities
entities:
- entity: select.yambms_canbus_1_bms_name
name: CANBUS 1 BMS Name
- entity: select.yambms_canbus_1_protocol
name: CANBUS 1 Protocol
title: YamBMS - CANBUS Protocol
- type: entities
entities:
- entity: switch.yambms_yambms_1_charge_enabled
name: YamBMS 1 Charge enabled
- entity: switch.yambms_yambms_1_discharge_enabled
name: YamBMS 1 Discharge enabled
- entity: binary_sensor.yambms_yambms_1_bms_charging_allowed
name: YamBMS 1 BMS Charging allowed
- entity: binary_sensor.yambms_yambms_1_bms_discharging_allowed
name: YamBMS 1 BMS Discharging allowed
title: YamBMS - Charge / Discharge switch
- type: entities
entities:
- entity: switch.yambms_yambms_1_automatic_charge_voltage
name: Automatic Charge Voltage
- entity: number.yambms_yambms_1_auto_cvl_boost_charge_v
name: Auto CVL Boost Charge V.
title: YamBMS - Auto CVL
- type: entities
entities:
- entity: sensor.yambms_yambms_1_charging_status
name: Charging Status
- entity: sensor.yambms_yambms_1_charging_instruction
name: Charging Instruction
- entity: switch.yambms_yambms_1_float_charge_enabled
name: Float charge enabled
- entity: switch.yambms_yambms_1_eoc_timer_enabled
name: EOC timer enabled
- entity: number.yambms_yambms_1_bulk_voltage
name: Bulk voltage
- entity: number.yambms_yambms_1_float_voltage
name: Float voltage
- entity: number.yambms_yambms_1_inverter_offset_v
name: Inverter Offset V.
title: YamBMS - Charging Settings
- type: entities
entities:
- entity: switch.yambms_yambms_1_automatic_charge_current
name: Automatic Charge Current
- entity: switch.yambms_yambms_1_automatic_discharge_current
name: Automatic Discharge Current
title: YamBMS - Auto CCL / DCL
- type: entities
entities:
- entity: number.yambms_yambms_1_rebulk_soc
name: Rebulk SoC
- entity: number.yambms_yambms_1_rebulk_v
name: Rebulk V.
- entity: switch.yambms_yambms_1_force_bulk_top_bal
name: Force Bulk (top bal)
title: YamBMS - ReBulk
- type: entities
entities:
- entity: number.yambms_yambms_1_max_charge_current
name: Max charge current (%)
- entity: number.yambms_yambms_1_max_discharge_current
name: Max discharge current (%)
title: YamBMS - Max current (%)
- type: entities
entities:
- entity: switch.yambms_yambms_1_request_force_charge
name: Request force charge
- entity: number.yambms_yambms_1_request_force_charge_start_soc
name: Force charge Start SoC
- entity: number.yambms_yambms_1_request_force_charge_stop_soc
name: Force charge Stop SoC
- entity: binary_sensor.yambms_yambms_1_requested_force_charge
name: Requested Force Charge
title: YamBMS - Request force charge
- type: entities
entities:
- entity: sensor.yambms_yambms_1_requested_charge_voltage
name: Requested Charge Voltage
- entity: sensor.yambms_yambms_1_requested_discharge_voltage
name: Requested Discharge Voltage
- entity: sensor.yambms_yambms_1_requested_charge_current
name: Requested Charge Current
- entity: sensor.yambms_yambms_1_requested_discharge_current
name: Requested Discharge Current
title: YamBMS - Requested Values
- type: entities
entities:
- entity: sensor.yambms_yambms_1_last_complete_charge
name: Last Complete Charge
- entity: binary_sensor.yambms_esp32_online_status
name: ESP32 Online Status
- entity: sensor.yambms_esp32_uptime
name: ESP32 Uptime
- entity: sensor.yambms_esp32_esphome_version
name: ESP32 ESPHome version
- entity: button.yambms_esp32_restart
name: ESP32 Restart
title: YamBMS - Diagnostic
- type: entities
entities:
- entity: binary_sensor.yambms_canbus_1_status
name: CANBUS 1 Status
- entity: switch.yambms_canbus_1_inverter_heartbeat_monitoring
name: CANBUS 1 Inverter Heartbeat Monitoring
- entity: sensor.yambms_canbus_1_inverter_heartbeat
name: CANBUS 1 Inverter Heartbeat
title: YamBMS - Inverter Heartbeat
- type: entities
entities:
- entity: sensor.yambms_debug_heap_free
name: Debug Heap free (%)
- entity: sensor.yambms_debug_heap_free_2
name: Debug Heap free
- entity: sensor.yambms_debug_heap_max_block
name: Debug Heap max block (%)
- entity: sensor.yambms_debug_heap_max_block_2
name: Debug Heap max block
- entity: sensor.yambms_debug_loop_time
name: Debug Loop time
- entity: sensor.yambms_debug_reset_reason
name: Debug Reset reason
title: YamBMS - DEBUG
+43 -15
View File
@@ -7,21 +7,20 @@
![GitHub watchers](https://img.shields.io/github/watchers/Sleeper85/esphome-yambms)
[!["Buy Me A Coffee"](https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg)](https://www.buymeacoffee.com/sleeper85)
> [!CAUTION]
> There is a black screen issue with `Atom S3` when you compile YamBMS with ESPHome `2024.8.0` and above. Until this bug is fixed it is necessary to compile with ESPHome `2024.7.3` (this only concerns Atom S3).
> [!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.
| 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> |
| :--- | --- |
| **Note: Pylontech uses 15S/48V and many others uses 16S/51.2V !**<br><br>Other battery profiles that utilise the **`PYLON`** protocol with different cell counts<br>may also work, e.g. Alpha Ess Smile, BYD Battery-Box LV Flex Lite.<br>Select the correct battery profile in the inverter to match your battery pack !<br>The **`ESP32`** communicates with the BMS using the **`BLE / UART / RS485`**<br>protocol and then sends the CAN bus data to the inverter via the<br>[CAN bus transceiver](documents/README/Supported_devices.md#supported-can-bus-transceiver). | <a href="https://www.buymeacoffee.com/Sleeper85" target="_blank"><img src="images/BMC_QR.png" alt="Buy Me A Coffee" style="height: 217px !important;width: 217px !important;" ></a> |
| **Note: Pylontech uses 15S/48V and many others uses 16S/51.2V !**<br><br>Other battery profiles that utilise the **`PYLON`** protocol with different cell counts<br>may also work, e.g. Alpha Ess Smile, BYD Battery-Box LV Flex Lite.<br>Select the correct battery profile in the inverter to match your battery pack !<br>The **`ESP32`** communicates with the BMS using the **`BLE / UART / RS485`**<br>protocol and then sends the CAN bus frames to the inverter via the<br>[CAN bus transceiver](documents/README/Supported_devices.md#supported-can-bus-transceiver). | <a href="https://www.buymeacoffee.com/Sleeper85" target="_blank"><img src="images/BMC_QR.png" alt="Buy Me A Coffee" style="height: 217px !important;width: 217px !important;" ></a> |
**Sends over CAN bus to inverter:**
- Battery Voltage
- Battery Current (+charge, -discharge)
- State of Charge (SOC)
- State of health (SOH)
- [State of Charge (SoC)](documents/README/YamBMS_behavior.md#state-of-charge) **`SoC 100% will be sent to your inverter only when the battery is fully charged`**
- State of Health (SoH)
- Max cell V. and ID
- Min cell V. and ID
- BMS temperature
- Charging voltage
- Charging max amps
@@ -30,8 +29,8 @@
- Battery name
- Alarms: Cell over/under voltage, Charge/discharge over current, High/low Temp, BMS fault
**Note:** this code support `multi-BMS` connection per inverter with a `single ESP32` and should work with inverters that support<br>
the CAN bus protocol `PYLON`, `SMA`, `Victron` or `LuxPower` (EG4). I'm only testing it with my `Deye SUN-6K-SG03-LP1-EU` inverter.<br>
**Note:** this code support `multi-BMS` and `multi-shunt` connection per inverter with a `single ESP32` and should work with inverters that support the CAN bus protocol `PYLON`, `SMA`, `Victron` or `LuxPower` (EG4). I'm only testing it with my `Deye SUN-6K-SG03-LP1-EU` inverter.
**This project is still in development and testing...<br>**
[Dedicated topic on DIY Solar Forum](https://diysolarforum.com/threads/yambms-jk-bms-can-with-new-cut-off-charging-logic-open-source.79325/)
@@ -52,8 +51,27 @@ the CAN bus protocol `PYLON`, `SMA`, `Victron` or `LuxPower` (EG4). I'm only tes
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) [Configuration of the main YAML](documents/README/Main_YAML_config.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.<br>
The DEMO firmware is composed of `3x BMS` and `1x Shunt` (fake) for a `48V LFP` system.
> [!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`.
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).
If you want to add a `CAN transceiver` on this `DEMO board` here are the GPIOs to connect it to :
```YAML
tx_pin: 23 # to CAN board CTX
rx_pin: 22 # to CAN board CRX (with 4.7K resistor except for SN65HVD230)
```
## Requirements
@@ -67,6 +85,22 @@ the CAN bus protocol `PYLON`, `SMA`, `Victron` or `LuxPower` (EG4). I'm only tes
## Changelog
* YamBMS 1.5.1 :
* The conditions for `combining` BMS and the `charging` and `discharging` instructions no longer have any relation with the `errors_bitmask` sensor, the new system relies on the three **binary_sensor** `online status`, `charging allowed` and `discharging allowed` being linked to the status of alarms and switches.
* The BMS combination procedure has been completely rewritten.
* Improved structure and ID names of `bms.yaml`.
* The `yambms.yaml` and `yambms_combine.yaml` global variable names have been changed for better code reading.
* Improved code regarding the CAN bus `esp_light` status for boards without integrated LED.
* New `Atom S3R` board and `Smartshunt BLE` shunt.
* New `JBD`, `Seplos V1 V2`, `JK-B RS485` (display port) and `FAKE` BMS.
* New `YamBMS DEMO` YAML and firmware offered to test and discover how `YamBMS` works.
* New management of temperature sensors (no longer limited to two sensors).
* **@Der_Hannes** fixed the AtomS3 `black screen` issue (with **esphome > 2024.7.3**) and developed new code for display management based on the [ili9xxx](https://esphome.io/components/display/ili9xxx.html) platform.
* `Auto CCL/DCL` functions have been fixed to work with `JK-PB` and `new JK-B` BMS, [see this issue](https://github.com/Sleeper85/esphome-yambms/issues/11).
* The `UVPR` and `OVPR` sensors are no longer used and replaced by `UVP` and `OVP` to ensure operation with all BMS.
* **@txubelaxu** fixed a bug in the `JK-PB RS485` component that could cause a false battery voltage value to be sent, [see this issue](https://github.com/Sleeper85/esphome-yambms/issues/10).
* Improved documentation, added a `HowTo` to create its main YAML, warning about galvanic isolation.
* CANBUS 2.3.7 : If there is no response from the inverter, the time before a new communication test has been reduced from `120s` to `60s`, added Victron `0x372` nbr. of modules `blocking charge/discharge`.
* YamBMS 1.4.5 : Changed the way to configure WiFi/Ethernet network, added `ESP32-C3 ETH01-EVO` ethernet board, reduction of the number of YAML bms files, UART `rx_buffer_size` is set to `512` by default for JK-B and JK-PB, new JK-BMS BLE sensors (last commits of @syssi) and new BLE `standard` version
* CANBUS 2.3.6 : Sending CAN frames stops immediately if there are no combined BMS
* YamBMS 1.4.4 : Multi-shunt support, Simplified and new YamBMS option `battery chemistry`, slider `min/max` values ​​are automatically configured based on the battery chemistry and cell count, added `YamBMS Fallback Hotspot`, added YamBMS `Update service`, added PVbrain2 and Atom Matrix board, added PSRAM settings YAML (not enabled by default), new MIN/MAX temperature sensor, added DC current icon, fixed dual sensor `Cell UVPR (MAX)` bug, Improved `combine` code, Breaking change : Atom S3 `GPIOs 1 and 2` reversed
@@ -81,12 +115,6 @@ the CAN bus protocol `PYLON`, `SMA`, `Victron` or `LuxPower` (EG4). I'm only tes
* YamBMS 1.3.2 : New var `yambms_cell_count`, the BMS charge or discharge switches can be activated separately without causing the decombination of the BMS, new `minimal` version of the BMS YAML in order to reduce the loop time
* YamBMS 1.3.1 : First multi-BMS version named `YamBMS`
## Goodies
A user of the [@syssi](https://github.com/syssi) [esphome-jk-bms](https://github.com/syssi/esphome-jk-bms) project ([@dr3amr](https://github.com/dr3amr)) shared some [Home Assistant Lovelace UI cards for a beautiful dashboard here](https://github.com/syssi/esphome-jk-bms/discussions/230).
![Lovelace entities card](images/lovelace-cards-contribution.png "Home Assistant Lovelace UI cards")
## References
* Thanks to [@syssi](https://github.com/syssi/esphome-jk-bms) for help and making the original JK-B UART and BLE code.
@@ -0,0 +1,60 @@
# YamBMS - JK-B BMS RS485 DISPLAY Solution
[![Badge License: GPLv3](https://img.shields.io/badge/License-GPLv3-brightgreen.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![Badge Version](https://img.shields.io/github/v/release/Sleeper85/esphome-yambms?include_prereleases&color=yellow&logo=DocuSign&logoColor=white)](https://github.com/Sleeper85/esphome-yambms/releases/latest)
![GitHub stars](https://img.shields.io/github/stars/Sleeper85/esphome-yambms)
![GitHub forks](https://img.shields.io/github/forks/Sleeper85/esphome-yambms)
![GitHub watchers](https://img.shields.io/github/watchers/Sleeper85/esphome-yambms)
## External component
[esphome-jk-bms](https://github.com/syssi/esphome-jk-bms) by [@syssi](https://github.com/syssi)
## Schematic and setup instructions
> [!CAUTION]
> The `jk_bms_display` component does not provide all the information needed for an optimal operation of `YamBMS`.
> The missing information has been added in the code by fixed values.
> e.g. it's not possible to know if the BMS is `online` or if the BMS is `equalizing` the cells.
### JK-B2A8S20P
```
│ JK-B2A8S20P │
│ │
│ Temp CAN GPS Display Balancer │
└──[oooo]──[ooo]──[oooo]──[oooooo]──[oooooooooo]──┘
││││││
│││││└─ K-
││││└── K+
│││└─── GND ( not common with B- , isolated ? )
││└──── B
│└───── A
└────── VCC = +/- 11.5V
```
### JK-BD6A2xS10P and JK-BxA24SxxP
```
│ JK-BD6A2xS10P, JK-BxA24SxxP │
│ │
│ CAN GPS Display Heat │
└────[ooo]─[oooo]───[oooooo]───[ooooooo]──────────┘
││││││
│││││└─ VCC ┌───────────────┐ ┌─────────────────┐
││││└── A ────────│A+ GND│────────│GND │
│││└─── B ────────│B- RS485 RXD│────────│RX ESP32/ │
││└──── GND │ to TTL TXD│ │TX ESP8266 GND│──────
│└───── K+ │ module VCC│────────│5V VCC│──────
└────── K- └───────────────┘ └─────────────────┘
```
### Power Button
```
K- o-------[ 100kΩ ]-----o /
/---|
K+ o---------------------o/
```
+51 -9
View File
@@ -12,13 +12,51 @@
## Schematic and setup instructions
### Atom S3 Lite (ESP32-S3)
> [!CAUTION]
> The `GND` of the `JK-B GPS port` is directly connected with the `B-` of your battery. Even if your BMS is in protection or stopped you can measure the `full voltage` between this `GND` and `B+`. This therefore presents a risk of `bypass` of the BMS `P-` and can be dangerous if the GND of your ESP32 is connected to the GND of your inverter or a measurement shunt for example.
> I therefore strongly advise you to achieve galvanic isolation between your ESP32 and the `UART-TTL` of the `JK-B GPS port`.
## Galvanic isolation of the `UART-TTL` connection
> [!CAUTION]
> `V1` and `V2` must be isolated and cannot come from the same source. `V1` (JK GPS port side) can be powered by the `3V3` of the ESP32 via a `DC-DC isolator` (**B0303S = 3V3-to-3V3**), `V2` (ESP32 side) is powered directly by the `3V3` of the ESP32.
```
┌────────────┐ | ┌──────────┐ ┌───────────┐
│ | └─3V3--V1>│ |<V2---3V3---<| |
│ DEVICE │<RX-------AO<│ UART-TTL │<AI-------TX<| ESP32 |
│ JK BMS │>TX-------AI>│ ISOLATOR │>BO-------RX>| |
│ │<----GND---->│ │<----GND---->| |
└────────────┘ └──────────┘ └───────────┘
```
Here are some components available on the market allowing you to set up galvanic isolation. The `UART-TTL isolator 2` seems a little better isolated with more space below the chip.
* [UART-TTL isolator 1](https://a.aliexpress.com/_EuXszn7)
* [UART-TTL isolator 2](https://a.aliexpress.com/_EItDRvX)
* [UART-TTL isolator](https://a.aliexpress.com/_EItDRvX)
![Image](../../images/UART-TTL_isolator_1.png "UART-TTL isolator example")
| [UART-TTL isolator](https://a.aliexpress.com/_EItDRvX) | [DC-DC isolator](https://a.aliexpress.com/_EIsPAoh) |
| --- | --- |
| <img src="../../images/UART-TTL_isolator_2.png" width="400"> | <img src="../../images/DC-DC_3V3-to-3V3_isolator.png" width="400"> |
### Another solution would be the use of M5Stack's isolated RS485 unit.
| [M5Stack RS485 unit (isolated)](https://docs.m5stack.com/en/unit/iso485) |
| --- |
| <img src="../../images/RS485_Transceiver_M5stack_SKU-U094_RS485_Isolated_Unit.png" width="400"> |
### Atom S3 (ESP32-S3)
> [!CAUTION]
> The diagram below does not show the galvanic isolation of the `UART-TTL` connection !
The GPIOs are preconfigured in the `packages/board/board_atom-s3-lite.yaml` file.<br>
You need to import this YAML into the main YAML.
```
UART-TTL RS232-TTL CAN BUS
┌──────────┐ ┌──────────┐ ┌────────────┐ ┌──────────┐
│ │<TX------RX>│2 5│<TX-------TX>| | | |
@@ -31,11 +69,13 @@ You need to import this YAML into the main YAML.
### Atom Lite (ESP32-PICO)
> [!CAUTION]
> The diagram below does not show the galvanic isolation of the `UART-TTL` connection !
The GPIOs are preconfigured in the `packages/board/board_atom-lite.yaml` file.<br>
You need to import this YAML into the main YAML.
```
UART-TTL RS232-TTL CAN BUS
┌──────────┐ ┌──────────┐ ┌────────────┐ ┌──────────┐
│ │<TX------RX>│26 22│<TX-------TX>| | | |
@@ -48,6 +88,9 @@ You need to import this YAML into the main YAML.
### Generic ESP32 DevKit V1 30 pin
> [!CAUTION]
> The diagram below does not show the galvanic isolation of the `UART-TTL` connection !
The GPIOs are preconfigured in the `packages/board/board_esp32-devkit-v1.yaml` file.<br>
You need to import this YAML into the main YAML.
@@ -91,7 +134,7 @@ You need to import this YAML into the main YAML.
### JK-B BMS UART-TTL GPS port
The `JK-B` BMS using the RS485 port (GPS) which is in fact not RS485 but 3V3 UART-TTL, so it can be directly connected to the ESP32.
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)
@@ -100,13 +143,12 @@ The `JK-B` BMS using the RS485 port (GPS) which is in fact not RS485 but 3V3 UAR
│ O O O O │
│GND RX TX VBAT│
└────────────────┘
│ │ │ | VBAT is full battery volatge eg 51.2V (No connect)
│ │ └──── ESP32 (`rx_pin`)
│ └──────── ESP32 (`tx_pin`)
└──────────── GND
│ │ │ | VBAT is full battery volatge eg 51.2V (possible to use it via an isolated DC-DC converter)
│ │ └──── to TTL-isolator AI (input)
│ └──────── to TTL-isolator AO (output)
└──────────── 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.
+13 -5
View File
@@ -71,7 +71,15 @@ The example below uses an Atom S3 (display) with the CAN base and RS485 unit.
## Schematic and setup instructions
Note: the choice of RS485 board is not related to the chosen ESP32.
> [!CAUTION]
> Galvanic isolation of the `RS485` connection is strongly recommended.
> The diagrams below does not show the galvanic isolation of the `RS485` connection !
> [!IMPORTANT]
> The boards `uart` are configured by default with an `rx_buffer_size` of `512` which **normally** is fine for all components. Only one user reported to me an instability problem with his `Atom S3` which he solved by increasing the `rx_buffer_size` to `1024`, this user is also the only one currently using the isolated RS485 unit of M5Stack.
> If you encounter a similar problem, let me know.
**Note:** the choice of RS485 board is not related to the chosen ESP32.
### Atom S3 with unisolated RS485 board
@@ -79,8 +87,8 @@ Note: the choice of RS485 board is not related to the chosen ESP32.
┌──────────┐ ┌───────────┐ ┌──────────┐
│ │ │ UART │<-VCC--------------5V--│ │<---5V
│ BMS │ │ TO │ │ ESP32 │
│ JK-PB │<-RJ45-P1 ----A->│ RS485 │<-DI-----------TX--G1--│ ATOM S3 │
│ │<-RJ45-P2-----B->│ │--RO-----------RX--G2->│ │ ┌────────────┐ ┌────────────┐
│ JK-PB │<-RJ45-P1-----B->│ RS485 │<-DI-----------TX--G1--│ ATOM S3 │
│ │<-RJ45-P2-----A->│ │--RO-----------RX--G2->│ │ ┌────────────┐ ┌────────────┐
│ RS485 │ │ CONVERTER │<-DE--+ │ │--G5--TX-----CTX->| | | |
│ NETWORK │ │ │<-RE--└--TALK PIN--G8--│ │<-G6--RX-----CRX--| Atomic |<---CAN H--->| Inverter |
│ │ │ │ │ │<-------5V------->| CAN Base |<---CAN L--->| |
@@ -94,8 +102,8 @@ Note: the choice of RS485 board is not related to the chosen ESP32.
┌──────────┐ ┌───────────┐ ┌──────────┐
│ │ │ UART │<-V1--------3V3 or 5V--│ │<---5V
│ BMS │ │ TO │ │ │
│ JK-PB │<-RJ45-P2-----B->│ RS485 │<-RX-----------TX--17--│ ESP32-S3 │
│ │<-RJ45-P1 ----A->│ │--TX-----------RX--18->│ │ ┌────────────┐ ┌────────────┐
│ JK-PB │<-RJ45-P1-----B->│ RS485 │<-RX-----------TX--17--│ ESP32-S3 │
│ │<-RJ45-P2 ----A->│ │--TX-----------RX--18->│ │ ┌────────────┐ ┌────────────┐
│ RS485 │ │ CONVERTER │ │ │--38--TX-----CTX->| | | |
│ NETWORK │ │ │ No TALK PIN (8)--│ │<-39--RX-----CRX--| CAN |<---CAN H--->| Inverter |
│ │ │ │ │ │<-------3V3------>| SN65HVD230 |<---CAN L--->| |
-62
View File
@@ -1,62 +0,0 @@
# YamBMS - Configuration of the main YAML
[![Badge License: GPLv3](https://img.shields.io/badge/License-GPLv3-brightgreen.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![Badge Version](https://img.shields.io/github/v/release/Sleeper85/esphome-yambms?include_prereleases&color=yellow&logo=DocuSign&logoColor=white)](https://github.com/Sleeper85/esphome-yambms/releases/latest)
![GitHub stars](https://img.shields.io/github/stars/Sleeper85/esphome-yambms)
![GitHub forks](https://img.shields.io/github/forks/Sleeper85/esphome-yambms)
![GitHub watchers](https://img.shields.io/github/watchers/Sleeper85/esphome-yambms)
## Home Assistant API
If your ESP32 is not connected with Home Assistant it will reboot every 15 minutes.
This is the normal behavior of ESPHome if HA is not connected to the ESP32 API.
This is not a bug to be resolved but a mechanism put in place by the ESPHome team to correct a possible problem with the API connection.
The **"api:"** section is therefore configured by default not to reboot every 15 minutes if Home Assistant is not connected.
```YAML
# +------------------------------------------------------------------+
# | ** The settings below can be modified according to your needs ** |
# +------------------------------------------------------------------+
api:
reboot_timeout: 0s
```
## Web Server
**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.**
If you don't use Home Assistant, you can activate the web server and have access to information coming from JK-BMS and also interact with the application.
![Image](../../images/ESPHome_Web_Server.png "Web Server")
The web server is not enabled by default.<br>
To enable this feature, uncomment the lines below in your YAML file.
```ỲAML
# +------------------------------------------------------------------+
# | ** The settings below can be modified according to your needs ** |
# +------------------------------------------------------------------+
web_server:
port: 80
log: false
ota: false
```
## WiFi
By default, if the ESP32 is disconnected from the WiFi network it will reboot every 15 minutes to try to resolve the problem.<br>
If you don't want to connect the ESP32 to the WiFi network please remove the lines below in your YAML file.
```YAML
# +------------------------------------------------------------------+
# | ** The settings below can be modified according to your needs ** |
# +------------------------------------------------------------------+
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
domain: !secret domain
```
@@ -8,5 +8,6 @@
## Contents
1) [JK-B BMS UART solution](BMS_JK-B_UART_solution.md)
2) [JK-PB BMS RS485 solution](BMS_JK-PB_RS485_solution.md)
1) [JK-B BMS UART (GPS port) solution](BMS_JK-B_UART_solution.md)
2) [JK-B BMS RS485 (Display port) solution](BMS_JK-B_RS485_DISPLAY_solution.md)
3) [JK-PB BMS RS485 solution](BMS_JK-PB_RS485_solution.md)
+23 -6
View File
@@ -20,7 +20,13 @@ All `JK-B` and `JK-PB` models with software@ version `>=6.0` are using the imple
See the [@syssi](https://github.com/syssi) [esphome-jk-bms](https://github.com/syssi/esphome-jk-bms) repository for more information.
Note: other BMS brands already integrated with ESPhome can be added easily.
**Note: other BMS brands already integrated with ESPhome can be added easily.**
## Supported shunt
`Victron Smartshunt` and `Junctek KH-F`.
**Note: other Shunt brands already integrated with ESPhome can be added easily.**
## Supported CAN bus transceiver
@@ -30,9 +36,16 @@ Note: other BMS brands already integrated with ESPhome can be added easily.
| --- | --- | --- |
| <img src="../../images/CAN_Transceiver_TJA1050.png" width="300"> | <img src="../../images/CAN_Transceiver_TJA1051.jpg" width="300"> | <img src="../../images/CAN_Transceiver_SN65HVD230.jpg" width="300"> |
| Atomic CAN Base | MCP2515 |
| --- | --- |
| <img src="../../images/CAN_Transceiver_Atomic_CAN_Base.png" width="450"> | <img src="../../images/CAN_Transceiver_MCP2515.png" width="450"> |
| [M5Stack Atomic CAN Base (isolated)](https://docs.m5stack.com/en/atom/Atomic%20CAN%20Base) | [M5Stack CAN Unit (isolated)](https://docs.m5stack.com/en/unit/can) | MCP2515 |
| --- | --- | --- |
| <img src="../../images/CAN_Transceiver_M5Stack_Atomic_CAN_Base.png" width="300"> | <img src="../../images/CAN_Transceiver_M5Stack_CAN_Unit.png" width="300"> | <img src="../../images/CAN_Transceiver_MCP2515.png" width="300"> |
## Supported RS485 transceiver
| [M5Stack RS485 unit (isolated)](https://docs.m5stack.com/en/unit/iso485) | [RS485 isolated board (high speed dual)](https://a.aliexpress.com/_EueIZT5) | [RS485 Two-way Converter](https://electronics.stackexchange.com/questions/244425/how-is-this-rs485-module-working) |
| --- | --- | --- |
| <img src="../../images/RS485_Transceiver_M5stack_SKU-U094_RS485_Isolated_Unit.png" width="300"> | <img src="../../images/RS485_Transceiver_isolated_high_speed_dual_board.png" width="300"> | <img src="../../images/RS485_Transceiver_Two-way_Converter.jpg" width="300"> |
## Supported inverter
@@ -47,6 +60,7 @@ The following are confirmed and known to work:
| Deye | SUN-5K-SG03LP1-EU | Working | [@arzaman](https://github.com/arzaman) | Lithium 00 | JK-B | BLE | Atom S3 | PYLON | PYLON 1.2 | [Atomic CAN base (SKU:A103)](https://docs.m5stack.com/en/atom/Atomic%20CAN%20Base) | --- | no | --- |
| Deye | SUN-5K-SG03LP1-EU (3) | Working | [@widget4145](https://diysolarforum.com/members/widget4145.110784/) | Lithium 00 | JK-PB (7) | RS485 | Atom S3 Lite | PYLON | PYLON 1.2 | [Atomic CAN base (SKU:A103)](https://docs.m5stack.com/en/atom/Atomic%20CAN%20Base) | RS485 (talk pin) | yes | --- |
| Deye | SUN-6K-SG03LP1-EU | Working | [@Sleeper85](https://github.com/Sleeper85) | Lithium 00 | JK-B | UART | ESP32 DevKit V1 | PYLON | PYLON 1.2 | TJA1051T | --- | no | --- |
| Deye | SUN-6K-SG03LP1-EU | Working | [@Imanol82](https://diysolarforum.com/members/imanol82.122457/) | Lithium 00 | JK-PB (2) | RS485 | ETH01-EVO POE | PYLON | PYLON 1.2 | SN65HVD230 | [Isolated RS485 (high speed dual)](https://a.aliexpress.com/_EueIZT5) | yes | ESP32 wired without WiFi, all ok. |
| Deye | SUN-12K-SG04LP3-EU | Working | [@lucize](https://github.com/lucize) | Lithium 00 | JK-B | UART | ESP32 DevKit V1 | PYLON | PYLON 1.2 | --- | --- | no | --- |
| Deye | SUN-12K-SG04LP3-EU | Working | [@luckylinux](https://github.com/luckylinux) | Lithium 00 | JK-B | BLE | Atom S3 Lite | PYLON | PYLON 1.2 | [CANBus Unit (CA-IS3050G)](https://docs.m5stack.com/en/unit/can) | --- | no | --- |
| Deye | SUN-12K-SG04LP3-EU | Working | [@virus100b](https://github.com/virus100b) | Lithium 00 | JK-PB (2) | RS485 | ESP32 DevKit V1 | PYLON | PYLON 1.2 | TJA1050 | --- | yes | --- |
@@ -68,8 +82,11 @@ The following are confirmed and known to work:
| Solis | RHI-3K-48ES | Working | [@chaosnature](https://diysolarforum.com/members/chaosnature.64395/) | AoBo | JK-B (2) | BLE | Atom S3 Lite | SMA | SMA | [Atomic CAN base (SKU:A103)](https://docs.m5stack.com/en/atom/Atomic%20CAN%20Base) | --- | yes | DIY Li-ion Growatt GBLI5001 converted. |
| LuxPower | LXP SNA 5K | Working | [@shvmm](https://github.com/shvmm) | Lithium 6 | JK-B | UART | ESP32 DevKit V1 | Automatic | LuxPower| SN65HVD230 / TJA1050 | --- | no | --- |
| LuxPower | LXP SNA 5K | Working | [@yur43](https://diysolarforum.com/members/yur43.121157/) | Lithium 6 | JK-PB (1) | RS485 | ESP32 DevKit V1 | Automatic | LuxPower | SN65HVD230 | [Isolated RS485 (high speed dual)](https://a.aliexpress.com/_EueIZT5) | no | --- |
| LuxPower | LXP-LB-US 10K | Working | [@Henny101](https://diysolarforum.com/members/henny101.67026/) | Lithium 6 | JK-PB (2) | RS485 | ESP32-S3 DevKitC-1 | Automatic | LuxPower | SN65HVD230 | [Isolated RS485 (high speed dual)](https://a.aliexpress.com/_EueIZT5) | yes | --- |
| EG4 | 6000XP | Working | [@ChrisG](https://diysolarforum.com/members/chrisg.483/) | Lithium 2 | JK-B (2) | BLE | ESP32 DevKit V1 / ESP32-S3 DevKitC-1 | PYLON | PYLON 1.2 | MCP2515 | --- | yes | --- |
| EG4 | 6000XP (2) | Working | [@SGB](https://diysolarforum.com/members/scrotpusgobblebottom.100804/) | Lithium 6 | JK-B (1) JK-PB (1) | BLE | Atom S3 (display) | Automatic | LuxPower | [Atomic CAN base (SKU:A103)](https://docs.m5stack.com/en/atom/Atomic%20CAN%20Base) | --- | yes | --- |
| Victron | MultiPlus-II 48/10000/140 | Working | [@cali-clim](https://diysolarforum.com/members/cali-clim.54284/) | ESS | JK-PB (2) | RS485 | Atom S3 (display) | Automatic | Victron | [Atomic CAN base (SKU:A103)](https://docs.m5stack.com/en/atom/Atomic%20CAN%20Base) | [Isolated RS485 Unit (SKU:U094)](https://docs.m5stack.com/en/unit/iso485) | yes | --- |
| Victron | Multiplus 24/1200/25-16 | Working | [@dmsims](https://diysolarforum.com/members/dmsims.23417/) | ESS | JK-B (1) | BLE | Atom S3 Lite | Automatic | Victron | [Atomic CAN base (SKU:A103)](https://docs.m5stack.com/en/atom/Atomic%20CAN%20Base) | --- | no | Plugged into Cerbo Can port (must use supplied Victron terminator in the other port) |
| Victron | MultiPlus-II 48/10000/140 | Working | [@cali-clim](https://diysolarforum.com/members/cali-clim.54284/) | CAN-bus BMS LV (500 kbit/s) | JK-PB (2) | RS485 | Atom S3 (display) | Automatic | Victron | [Atomic CAN base (SKU:A103)](https://docs.m5stack.com/en/atom/Atomic%20CAN%20Base) | [Isolated RS485 Unit (SKU:U094)](https://docs.m5stack.com/en/unit/iso485) | yes | --- |
| Victron | Multiplus 24/1200/25-16 | Working | [@dmsims](https://diysolarforum.com/members/dmsims.23417/) | CAN-bus BMS LV (500 kbit/s) | JK-B (1) | BLE | Atom S3 Lite | Automatic | Victron | [Atomic CAN base (SKU:A103)](https://docs.m5stack.com/en/atom/Atomic%20CAN%20Base) | --- | no | Plugged into Cerbo Can port (must use supplied Victron terminator in the other port) |
| MidNite Solar | MN15-12KW-AIO | Working | [@goldserve](https://diysolarforum.com/members/goldserve.52541/) | PYLON | JK-B | BLE | ESP32-S3 | Automatic | PYLON 1.2 | MCP2515 | --- | no | Stable with Victron Smartshunt, MQTT, BLE, Neopixel LED, Display also working. |
| MidNite Solar | MN15-12KW-AIO | Working | [@jahyde](https://diysolarforum.com/members/jahyde.7475/) | PYLON | JK-PB | BLE | ESP32-S3 | Automatic | PYLON 1.2 | MCP2515 | --- | yes | --- |
| SMA | Sunny Island | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
@@ -35,4 +35,4 @@ If soldering or creating your own board seems complicated to you, know that it i
| Atomic S3 Lite | Atomic CAN Base |
| --- | --- |
| <img src="../../images/Atom_S3_Lite.png" width="450"> | <img src="../../images/CAN_Transceiver_Atomic_CAN_Base.png" width="450"> |
| <img src="../../images/Atom_S3_Lite.png" width="450"> | <img src="../../images/CAN_Transceiver_M5Stack_Atomic_CAN_Base.png" width="450"> |
+45
View File
@@ -0,0 +1,45 @@
# Troubleshooting
[![Badge License: GPLv3](https://img.shields.io/badge/License-GPLv3-brightgreen.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![Badge Version](https://img.shields.io/github/v/release/Sleeper85/esphome-yambms?include_prereleases&color=yellow&logo=DocuSign&logoColor=white)](https://github.com/Sleeper85/esphome-yambms/releases/latest)
![GitHub stars](https://img.shields.io/github/stars/Sleeper85/esphome-yambms)
![GitHub forks](https://img.shields.io/github/forks/Sleeper85/esphome-yambms)
![GitHub watchers](https://img.shields.io/github/watchers/Sleeper85/esphome-yambms)
## UART logging
### Default UART GPIOs
The table below shows you the default UART GPIOs as well as the default logger hardware output.
When declaring a UART you can choose other GPIOs but keep in mind that you can declare max `3 UARTs` with an ESP32. If not needed, I will not use the GPIOs used for `UART0` because those are the GPIOs used to flash the ESP32 from USB.
| Board | UART0 | UART1 | UART2 | USB_CDC | USB_SERIAL_JTAG | Default logger HW |
| ----- | ----- | ----- | ----- | ------- | --------------- | ----------------- |
| ESP32 | TX: 1, RX: 3 | TX: 10, RX: 9 | TX: 17, RX: 16 | N/A | N/A | UART0 |
| ESP32-C3 | TX: 21, RX: 20 | Undefined | N/A | N/A | 18/19 | USB_SERIAL_JTAG |
| ESP32-S2 | TX: 43, RX: 44 | TX: 17, RX: 18 | N/A | 19/20 | N/A | USB_CDC |
| ESP32-S3 | TX: 43, RX: 44 | TX: 17, RX: 18 | Undefined | 19/20 | 19/20 | USB_SERIAL_JTAG |
### Change the default logger UART output
You are using an `ESP32-S3`, by default the logs are sent to the USB port labeled `USB` this corresponds to `USB_SERIAL_JTAG`.
If you want to flash the code and receive the logs on the port labeled `UART`, the option below allows you to choose the hardware that `logger` should use.
```YAML
logger:
hardware_uart: UART0 # UART0 / USB_SERIAL_JTAG
```
### Don't use UART logging
> [!CAUTION]
> Using `wk2168` and `canbus` (esp32can platform) components together is problematic and creates a boot loop (tested on ESP32-S3).
> Using `baud_rate: 0` avoids this problem.
By default an ESP32 has `3 UARTs`, one of which is used for the logger output. The option below allows you to free the UART used by `logger` so that you can use it and assign new GPIOs to it.
```YAML
logger:
baud_rate: 0
```
+76 -18
View File
@@ -10,44 +10,102 @@
![Image](../../images/YamBMS_Combine_switch.png "YamBMS_Combine_switch")
### Combine status
The various counters above allow you to see what state your system is in.
### Shunt/BMS combine status
![Image](../../images/YamBMS_Combine_Status.png "YamBMS_Combine_Status")
**Combine Availability** : This status indicates whether the BMS or Shunt meets the conditions to be combined.
* **Combine Availability** : This status indicates whether the `BMS` or `Shunt` meets the conditions to be combined.
* **Can be combined** : This status indicates whether the `BMS` or `Shunt` is currently combined.
**Can be combined** : This status indicates whether the BMS or Shunt is currently combined.
## Shunt
### Shunt
Combine condition :
1) the `Combine` switch is enabled
2) the `Voltage` supplied by the shunt `is > 0V`
2) the `Voltage` supplied by the shunt is `> 0V`
If one of these two conditions is not respected, the shunt is automatically decombined.
As soon as you import a `shunt` and it can be combined (see condition) the values ​​(Voltage, Current, Power and SoC) of the shunt(s) will take precedence over the BMS values.
As soon as you import a `Shunt` and it can be combined (see condition) the values ​​`Voltage`, `Current`, `Power` and `SoC` of the shunt(s) will take precedence over the BMS values.
## BMS
> [!TIP]
> If all BMS are `uncombined` the shunt data will no longer be published.
### BMS
Combine condition :
1) the `Combine` switch is enabled
2) BMS `Charging` or `Discharging` switch is enabled
3) BMS is not in `alarm`
2) BMS `Online Status` is `ON` (to detect a loss of connection with the BMS e.g. cable, BMS OFF or dead)
3) BMS `Charging` or `Discharging` is allowed (based on `binary_sensor`, related to the state of `switches/alarms`)
If one of these three conditions is not met, the BMS is automatically decombined.
## BMS alarms
From YamBMS `1.5.1` :
> [!IMPORTANT]
> This is the current behavior, it may not be perfect, feel free to communicate your ideas to improve it.
The `binary_sensor` does not only represent the state of the `charge/discharge` switches but simply whether the `charge/discharge` is **allowed**. The value of `binary_sensor` is related to the status of the `switches/alarms`.
The `errors_bitmask` should not be a condition to combine a BMS anymore, let the BMS decide if the `charge/discharge` is allowed (its alarm system takes care of that).
The `errors_bitmask` continues to be analyzed to send `warnings/alarms` on the CAN bus.
The behavior of the `Charging Instruction` and `Discharging Instruction` sensors responsible for the instructions sent to the inverter will also be adapted. Alarm analysis will no longer be checked. If at least one BMS allows charging, charging can continue, if at least one BMS allows discharging, discharging can continue. This will also be based on the `binary_sensor` related to the state of `switchs/alarms` of the BMS.
If a BMS blocks charging or discharging, the permitted current is automatically reduced.
## State of Charge
The `SoC` is slightly manipulated before reaching `0%` or `100%`.
SoC `100%` will be sent to your inverter only when the battery is `fully charged` (useful for some inverters stopping charging when the SoC reaches 100%).
SoC behavior:
1) If `min_cell_v <= cell_uvpr` SoC 0% is sent
2) Else if `SOC < 1%` SoC 2% is sent (false 0% sending 2%)
3) Else if `SOC < 99%` real SoC is sent
4) Else if `the battery is fully charged` real SoC is sent
5) Else SoC `98%` is sent
## CAN bus link
For the CAN bus link to be established with your inverter, the two conditions below must be met:
1) At least one BMS is in service (the number of combined BMS must be `> 0`)
2) Your inverter sends an `ACK 0x305` every `1s` (the link will be faulty if no ACK is received for 5s)
If these conditions are not met, the application waits `60s` before trying to connect again.
### Extra infos
Sending CAN frames continues without an inverter connected is problematic and will lead to ESP32 crash.
During boot the CAN bus links are activated directly if at least one BMS is combined and the inverter responds to the sending of CAN frames within a `5s` delay.
This `5s` delay represents the time during which the link is valid, this timer is reset each time an `ACK 0x305` is received from the inverter.
This `5s` delay can be modified in the configuration when importing the canbus package.
```YAML
canbus1: !include
file: packages/yambms/yambms_canbus.yaml
vars:
# YamBMS ID
yambms_id: 'yambms1'
# CANBUS 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
canbus_link_timer: '5s'
```
If the inverter does not respond with an `ACK 0x305` within this `5s` delay the sending of CAN frames is paused for `60s` this delay cannot be modified when importing the canbus package but you can modify it in the code if you need to.
## BMS alarms
![Image](../../images/YamBMS_BMS_alarms.png "YamBMS_BMS_alarms")
The `errors_bitmask` values ​​are merged and then analyzed continuously **even if the BMS is uncombined**.
The BMS `errors_bitmask` values ​​are merged and then analyzed continuously **even if the BMS is uncombined**.
As long as at least one BMS is working normally the system will continue to work.
YamBMS will display BMS alarms as `Warning`.
If all BMS have alarms, the alarms are sent to the **CAN bus** as `Protection Alarms`.
If all BMS are in alarm, they are all uncombined and in this case the sending of instructions on the `CAN bus` is also stopped.
YamBMS will display BMS alarms as `Alarm`.
If at least one BMS has no alarms, the alarms are sent to the CAN bus as `Warning`.
Both **text_sensor** `Alarm` and `Warning` show the alarms/warnings currently transmitted to the inverter.
+15 -2
View File
@@ -8,7 +8,7 @@
## CAN protocol
> [!IMPORTANT]
> [!IMPORTANT]
> You need to check if your inverter model is on the list of [supported inverters](Supported_devices.md#supported-inverter). In any case it must support one of the following `CAN` bus protocols.
![Image](../../images/YamBMS_CANBUS_Protocol.png "YamBMS_CANBUS_Protocol")
@@ -27,7 +27,8 @@ Other configurations are possible, don't hesitate to communicate what works well
| Solis | AoBo | SMA |
| LuxPower | Lithium 6 | LuxPower |
| EG4 | Lithium 6 | LuxPower |
| Victron | ESS | Victron |
| Victron | CAN-bus BMS LV (500 kbit/s) | Victron |
| MidNite Solar | PYLON | PYLON 1.2 |
| SMA | - | SMA |
## Charging settings
@@ -42,6 +43,9 @@ The `Float charge enabled` switch allows the battery to be kept fully charged at
The `EOC timer enabled` switch ensures that the `Cut-Off` phase lasts maximum `30 min` (default value) even if your cells are still being equalized. If your cells are equalized, the `Cut-Off` phase will end at the earliest after `60s` (default value). This prevents the risk of staying in the `Cut-Off` phase for many hours if you have several batteries and they are poorly equalized.
> [!IMPORTANT]
> If you have **totally unbalanced batteries** and want to fix this problem, you can disable the `EOC timer` and let `YamBMS` balance your batteries, **this can take hours**. A well balanced battery does not need this timer enabled as the equalization phase will finish in less than 30 minutes.
The `Bulk voltage` slider allows you to set the voltage used during the `Bulk`, `Balancing` and `Cut-Off` phases.
The `Float voltage` slider allows you to set the voltage used after charging is complete if the `Float charge enabled` switch is enabled.
@@ -82,6 +86,9 @@ A [reference spreadsheet](https://docs.google.com/spreadsheets/d/1UwZ94Qca-DBP5g
## Auto CVL
> [!IMPORTANT]
> The `Auto CVL` function uses the `Balance Trig. Volt.` value of your BMS. `e.g. for LFP` : BTG=0.010V
When enabled, the `Automatic Charge Voltage Limit` feature will automatically reduce the `Requested Charge Voltage (CVL)` sent to the inverter when a cell starts to exceed the bulk target.
That way, the runner cell should be maintained at or near bulk (for example, 3.45v) and the balancer can start to bring up the lagging cells.
Controlling the CVL is the preferred option according to Victron and others, but it depends on how well your inverter behaves.
@@ -89,8 +96,14 @@ My Solis inverter is not great at CVL control, so it doesn't work well for me.
You can compare `Auto CVL` to cruise control in a car.
`Boost Charge V.` allows you to increase the charging voltage to charge your battery faster, the `Auto CVL` function will itself reduce the charging voltage at the end of charging so that it does not exceed the target voltage `Bulk Voltage`.
## Auto CCL & DCL
> [!IMPORTANT]
> The `Auto CCL` function uses the `OVPR` value of your BMS which must be higher than `cell_bulk_voltage` to work properly. `e.g. for LFP` : CVL=3.45V / OVPR=3.55V / OVP=3.65V.
> The `Auto DCL` function uses the `UVPR` value of your BMS. `e.g. for LFP` : UVPR=3.00V
Regarding the new `Auto Charge/Discharge Current Limit`, this features has been introduced to hopefully prevent `OVP` and `UVP` alarms.
When enabled, the `Automatic Charge Current Limit` feature will automatically reduce the `Requested Charge Current (CCL)` sent to the inverter when a cell starts to exceed the bulk target.
+545
View File
@@ -0,0 +1,545 @@
# YamBMS - How to create your YamBMS YAML
[![Badge License: GPLv3](https://img.shields.io/badge/License-GPLv3-brightgreen.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![Badge Version](https://img.shields.io/github/v/release/Sleeper85/esphome-yambms?include_prereleases&color=yellow&logo=DocuSign&logoColor=white)](https://github.com/Sleeper85/esphome-yambms/releases/latest)
![GitHub stars](https://img.shields.io/github/stars/Sleeper85/esphome-yambms)
![GitHub forks](https://img.shields.io/github/forks/Sleeper85/esphome-yambms)
![GitHub watchers](https://img.shields.io/github/watchers/Sleeper85/esphome-yambms)
> [!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.
## WiFi & Ethernet
> [!IMPORTANT]
> By default, if the ESP32 is disconnected from the WiFi network it will reboot `every 15 minutes` to try to resolve the problem.
> The `wifi` or `ethernet` components are found in the [YAML corresponding to the board](../../packages/board/).
Configuring a fixed IP address can be done in the main YAML like this:
### WiFi
> [!IMPORTANT]
> Don't forget to configure your WiFi credentials in the `secrets.yaml` file.
```YAML
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
```
### Ethernet
```YAML
ethernet:
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
```
## Home Assistant API
> [!IMPORTANT]
> If your ESP32 is not connected with Home Assistant it will reboot every 15 minutes.
> This is the normal behavior of ESPHome, this is not a bug to be resolved but a mechanism put in place by the ESPHome team to correct a possible problem with the API connection.
The **"api:"** section is therefore configured by default not to reboot every 15 minutes if `Home Assistant` is not connected.
```YAML
api:
reboot_timeout: 0s
```
## Web Server
> [!IMPORTANT]
> 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.
If you don't use `Home Assistant`, you can activate the `Web Server` and have access to YamBMS information and also interact with the application.
[ESPHome Web Server Componenet](https://esphome.io/components/web_server.html)
## Importing YamBMS packages
Package imports are done below this line:
```YAML
packages:
```
## Base
In any case, you need to import the base package.
### Base for WiFi
```YAML
device_base: !include packages/base/device_base.yaml
```
### Base for Ethernet
```YAML
device_base: !include packages/base/device_base_ethernet.yaml
```
## Board
Next you need to import the package that corresponds to the `board` you are going to use.
There are other `board.yaml` not mentioned here, see in the [board](../../packages/board/) folder.
So just one of the packages below :
### ESP32 DevKit-V1
```YAML
device_board: !include packages/board/board_esp32-devkit-v1.yaml
```
### ESP32-S3 DevKitC-1
```YAML
device_board: !include packages/board/board_esp32-s3-devkitc-1.yaml
```
### Atom S3 Lite
```YAML
device_board: !include packages/board/board_atom-s3-lite.yaml
```
### Atom S3 / S3R (display)
In this case you need to specify the `yambms` and `canbus` IDs to display the information on the screen.
```YAML
device_board: !include
file: packages/board/board_atom-s3.yaml
vars:
yambms_id: 'yambms1'
canbus_id: 'canbus1'
display_auto_next_page_interval: '5s'
```
```YAML
device_board: !include
file: packages/board/board_atom-s3r.yaml
vars:
yambms_id: 'yambms1'
canbus_id: 'canbus1'
display_auto_next_page_interval: '5s'
```
### ESP32-C3 DevKitM-1
```YAML
device_board: !include packages/board_esp32-c3-devkitm-1.yaml
```
### ESP32-C3 ETH01-EVO
This board has an `Ethernet` port and can be powered from `POE` (optional).
```YAML
device_board: !include packages/board/board_esp32-c3-eth01-evo.yaml
```
## BMS
The example YAMLs are just examples, you can mix different BMS models without problems.
There are other `bms.yaml` not mentioned here, see in the [bms](../../packages/bms/) folder.
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.
### Multi-BMS example
```YAML
bms1: !include
file: packages/bms/bms_model.yaml
vars:
# YamBMS ID
yambms_id: 'yambms1' # YamBMS ID to send information to
# BMS vars
bms_id: '1' # must be a number
bms_name: 'BMS 1'
# other settings
# ...
bms2: !include
file: packages/bms/bms_model.yaml
vars:
# YamBMS ID
yambms_id: 'yambms1' # YamBMS ID to send information to
# BMS vars
bms_id: '2' # must be a number
bms_name: 'BMS 2'
# other settings
# ...
bms3: !include
file: packages/bms/bms_model.yaml
vars:
# YamBMS ID
yambms_id: 'yambms1' # YamBMS ID to send information to
# BMS vars
bms_id: '3' # must be a number
bms_name: 'BMS 3'
# other settings
# ...
```
### [JK-ALL (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.
> Crashes are likely to occur if you include too many additional components in your device’s configuration.
> I recommend using `UART` or `RS485` if possible.
```YAML
bms1: !include
file: packages/bms/bms_JK-ALL_BLE_standard.yaml
vars:
# YamBMS ID
yambms_id: 'yambms1' # YamBMS ID to send information to
# BMS vars
bms_id: '1' # must be a number
bms_name: 'BMS 1'
bms_update_interval: '3s'
bms_combine_interval: '1s'
bms_ble_protocol_version: JK02_32S # JK02_24S < hardware version 11.0 >= JK02_32S
bms_ble_mac_address: C8:47:8C:10:7E:AA
```
### [JK-B (UART)](https://github.com/syssi/esphome-jk-bms)
```YAML
bms1: !include
file: packages/bms/bms_JK-B_UART_full.yaml
vars:
# YamBMS ID
yambms_id: 'yambms1' # YamBMS ID to send information to
# BMS vars
bms_id: '1' # must be a number
bms_name: 'BMS 1'
bms_update_interval: '3s'
bms_combine_interval: '1s'
bms_uart_id: uart_esp_1
```
### [JK-B (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`.
> The missing information has been added in the code by fixed values.
> e.g. it's not possible to know if the BMS is `online` or if the BMS is `equalizing` the cells.
```YAML
bms1: !include
file: packages/bms/bms_JK-B_RS485_DISPLAY_full.yaml
vars:
# YamBMS ID
yambms_id: 'yambms1'
# BMS vars
bms_id: '1' # must be a number
bms_name: 'BMS 1'
bms_update_interval: '3s'
bms_combine_interval: '1s'
bms_uart_id: uart_esp_1
# Required settings cannot be retrieved from BMS
# These values ​​must match your BMS settings
# LFP values example
bms_battery_capacity: '280' # Ah
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
```
### [JK-PB (RS485)](https://github.com/txubelaxu/esphome-jk-bms/)
A single `RS485 bus` allows you to monitor up to `16` BMS.
#### JK-PB sniffer
> [!IMPORTANT]
> You need to import only one `sniffer` package of your choice.
> Depending on which `RS485` board you have, you should use the version of the `sniffer` with or without `talk_pin`.
The sniffer represents the ESP node connected to the JK-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).
Sniffer without `talk_pin` :
```YAML
sniffer1: !include
file: packages/bms/bms_JK-PB_RS485_sniffer.yaml
vars:
sniffer_id: 'sniffer1'
sniffer_protocol: 'JK02_32S'
sniffer_uart_id: 'uart_esp_1'
```
If your `RS485` board requires a `talk_pin` you must specify which `GPIO` will be used :
```YAML
sniffer1: !include
file: packages/bms/bms_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
```
#### JK-PB BMS
```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_JK-PB_RS485_bms_full.yaml
vars:
# YamBMS ID
yambms_id: 'yambms1' # YamBMS ID to send information to
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '1' # must be a number
bms_name: 'JK-BMS 1'
bms_rs485_address: '0x01' # BMS 1 DIP switch
bms_update_interval: '3s' # going below '3s' can cause problems
bms_combine_interval: '1s'
```
### [JBD (UART)](https://github.com/syssi/esphome-jbd-bms)
```YAML
bms1: !include
file: packages/bms/bms_JBD_UART_full.yaml
vars:
# YamBMS ID
yambms_id: 'yambms1' # YamBMS ID to send information to
# BMS vars
bms_id: '1' # must be a number
bms_name: 'BMS 1'
bms_update_interval: '3s'
bms_combine_interval: '1s'
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
```
### [Seplos V1/V2 (RS485)](https://github.com/syssi/esphome-seplos-bms)
A single `RS485 bus` allows you to monitor up to `16` BMS.
> [!CAUTION]
> The `seplos_bms` component does not provide all the information needed for an optimal operation of `YamBMS`.
> The missing information has been added in the code by fixed values.
> e.g. it's not possible to know if the BMS **blocks** the `charge` or the `discharge` or if the BMS is `equalizing` the cells.
> The `online` status has not been tested.
> [!IMPORTANT]
> You need to import only one `seplos_modbus`.
#### Seplos modbus
```YAML
seplos_modbus1: !include
file: packages/bms/bms_SEPLOS_V1_V2_RS485_modbus.yaml
vars:
seplos_modbus_id: 'seplos_modbus1'
seplos_modbus_uart_id: 'uart_esp_1'
seplos_modbus_baud_rate: '9600' # Please set the baudrate of your Seplos BMS model here. It's sometimes 19200 baud instead of 9600.
seplos_modbus_rx_timeout: 150ms
```
#### Seplos V1/V2 BMS
```YAML
bms1: !include
file: packages/bms/bms_SEPLOS_V1_V2_RS485_bms_full.yaml
vars:
# YamBMS ID
yambms_id: 'yambms1' # YamBMS ID to send information to
# Seplos modbus ID
seplos_modbus_id: 'seplos_modbus1'
# BMS vars
bms_id: '1' # must be a number
bms_name: 'BMS 1'
bms_rs485_address: '0x01' # BMS 1 DIP switch
bms_protocol_version: '0x20' # Known protocol versions: 0x20 (Seplos), 0x26 (Boqiang)
bms_update_interval: '3s' # 10s @syssi example
bms_combine_interval: '1s'
# 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
```
## Shunt
As soon as you import a `Shunt` and it can be combined ([see condition](YamBMS_behavior.md#shunt)) the values ​​`Voltage`, `Current`, `Power` and `SoC` of the shunt(s) will take precedence over the BMS values.
### [Victron Smartshunt (UART)](https://github.com/KinDR007/VictronMPPT-ESPHOME)
```YAML
shunt1: !include
file: packages/shunt/shunt_victron_smartshunt_UART.yaml # shunt_junctek_khf_UART.yaml
vars:
# YamBMS ID
yambms_id: 'yambms1' # YamBMS ID to send information to
# Shunt vars
shunt_id: '1' # must be a number
shunt_name: 'Shunt 1'
shunt_update_interval: '3s'
shunt_combine_interval: '1s'
shunt_uart_id: uart_esp_1
```
### [Victron Smartshunt (BLE)](https://github.com/Fabian-Schmidt/esphome-victron_ble)
> [!IMPORTANT]
> The BLE software stack 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.
> I recommend using `UART` or `RS485` if possible.
```YAML
shunt1: !include
file: packages/shunt/shunt_victron_smartshunt_BLE.yaml
vars:
# YamBMS ID
yambms_id: 'yambms1' # YamBMS ID to send information to
# Shunt vars
shunt_id: '1' # must be a number
shunt_name: 'Shunt 1'
shunt_update_interval: '3s'
shunt_combine_interval: '1s'
shunt_mac_address: '60:A4:23:91:8F:55'
shunt_encryption_key: '0df4d0395b7d1a876c0c33ecb9e70dcd' # Your encryption key
```
### [Junctek KH-F (UART/RS485)](https://github.com/Sleeper85/esphome-junctek_khf)
```YAML
shunt1: !include
file: packages/shunt/shunt_junctek_khf_UART.yaml
vars:
# YamBMS ID
yambms_id: 'yambms1' # YamBMS ID to send information to
# Shunt vars
shunt_id: '1' # must be a number
shunt_name: 'Shunt 1'
shunt_update_interval: '3s'
shunt_combine_interval: '1s'
shunt_uart_id: uart_esp_1
```
## YamBMS
> [!CAUTION]
> By default, `YamBMS` is configured with the values ​​for a 16S LFP battery !
Take the time to configure `YamBMS` correctly according to your battery chemistry type `LFP/Li-ion/LTO` and `cell count`. Charging voltages can be changed in the app.
```YAML
yambms1: !include
file: packages/yambms/yambms.yaml
vars:
# 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'
# 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
The CAN bus connected to your inverter via the CAN transceiver `canbus_node1`.
You can keep the default configuration.
```YAML
canbus1: !include
file: packages/yambms/yambms_canbus.yaml
vars:
# YamBMS ID
yambms_id: 'yambms1' # YamBMS ID to retrieve information from
# CANBUS 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
The `debug` package will add useful information to refer to if problems occur.
### ESP32 and AtomS3
```YAML
device_debug: !include
file: packages/base/device_debug_ESP32.yaml
vars:
debug_name: 'Debug'
debug_update_interval: '5s'
```
### ESP32 with PSRAM memory like ESP32-S3 / AtomS3R
```YAML
device_debug: !include
file: packages/base/device_debug_ESP32-S3.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'
```
Binary file not shown.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 157 KiB

After

Width:  |  Height:  |  Size: 223 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 441 KiB

After

Width:  |  Height:  |  Size: 441 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 486 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 255 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 235 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 216 KiB

After

Width:  |  Height:  |  Size: 190 KiB

+246
View File
@@ -0,0 +1,246 @@
# Updated : 2024.11.11
# Version : 1.5.1
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
# This YAML is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
substitutions:
name: yambms-demo
# 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:
device_base: !include packages/base/device_base.yaml
# Board : uncomment your board
device_board: !include packages/board/board_esp32-devkit-v1.yaml
# device_board: !include packages/board/board_esp32-s3-devkitc-1.yaml
# device_board: !include packages/board/board_atom-s3-lite.yaml
# device_board: !include
# file: packages/board/board_atom-s3.yaml # board_atom-s3r.yaml
# vars:
# yambms_id: 'yambms1'
# canbus_id: 'canbus1'
# display_auto_next_page_interval: '5s'
shunt1: !include
file: packages/shunt/shunt_fake.yaml
vars:
# YamBMS ID
yambms_id: 'yambms1'
# Shunt vars
shunt_id: '1' # must be a number
shunt_name: 'Shunt 1'
shunt_update_interval: '3s'
shunt_combine_interval: '1s'
# Shunt sensors values
shunt_voltage: '53.41' # V
shunt_current: '37.5' # A
shunt_power: '2003' # W
shunt_soc: '86' # %
bms1: !include
file: packages/bms/bms_FAKE.yaml
vars:
# YamBMS ID
yambms_id: 'yambms1'
# BMS vars
bms_id: '1' # must be a number
bms_name: 'BMS 1'
bms_update_interval: '3s'
bms_combine_interval: '1s'
# 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_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
bms2: !include
file: packages/bms/bms_FAKE.yaml
vars:
# YamBMS ID
yambms_id: 'yambms1'
# BMS vars
bms_id: '2' # must be a number
bms_name: 'BMS 2'
bms_update_interval: '3s'
bms_combine_interval: '1s'
# 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_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
bms3: !include
file: packages/bms/bms_FAKE.yaml
vars:
# YamBMS ID
yambms_id: 'yambms1'
# BMS vars
bms_id: '3' # must be a number
bms_name: 'BMS 3'
bms_update_interval: '3s'
bms_combine_interval: '1s'
# 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_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
yambms1: !include
file: packages/yambms/yambms.yaml
vars:
# 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'
# 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:
# YamBMS ID
yambms_id: 'yambms1' # YamBMS ID to retrieve information from
# CANBUS 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'
+242
View File
@@ -0,0 +1,242 @@
# Updated : 2024.11.11
# Version : 1.5.1
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
# This YAML is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
substitutions:
name: yambms-demo
# 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:
device_base: !include packages/base/device_base.yaml
device_board: !include
file: packages/board/board_atom-s3.yaml # board_atom-s3r.yaml
vars:
yambms_id: 'yambms1'
canbus_id: 'canbus1'
display_auto_next_page_interval: '5s'
shunt1: !include
file: packages/shunt/shunt_fake.yaml
vars:
# YamBMS ID
yambms_id: 'yambms1'
# Shunt vars
shunt_id: '1' # must be a number
shunt_name: 'Shunt 1'
shunt_update_interval: '3s'
shunt_combine_interval: '1s'
# Shunt sensors values
shunt_voltage: '53.41' # V
shunt_current: '37.5' # A
shunt_power: '2003' # W
shunt_soc: '86' # %
bms1: !include
file: packages/bms/bms_FAKE.yaml
vars:
# YamBMS ID
yambms_id: 'yambms1'
# BMS vars
bms_id: '1' # must be a number
bms_name: 'BMS 1'
bms_update_interval: '3s'
bms_combine_interval: '1s'
# 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_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
bms2: !include
file: packages/bms/bms_FAKE.yaml
vars:
# YamBMS ID
yambms_id: 'yambms1'
# BMS vars
bms_id: '2' # must be a number
bms_name: 'BMS 2'
bms_update_interval: '3s'
bms_combine_interval: '1s'
# 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_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
bms3: !include
file: packages/bms/bms_FAKE.yaml
vars:
# YamBMS ID
yambms_id: 'yambms1'
# BMS vars
bms_id: '3' # must be a number
bms_name: 'BMS 3'
bms_update_interval: '3s'
bms_combine_interval: '1s'
# 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_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
yambms1: !include
file: packages/yambms/yambms.yaml
vars:
# 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'
# 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:
# YamBMS ID
yambms_id: 'yambms1' # YamBMS ID to retrieve information from
# CANBUS 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'
+188
View File
@@ -0,0 +1,188 @@
# Updated : 2024.11.11
# Version : 1.5.1
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
# This YAML is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
substitutions:
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:
device_base: !include packages/base/device_base.yaml
# Board : uncomment your board
device_board: !include packages/board/board_esp32-devkit-v1.yaml
# device_board: !include packages/board/board_esp32-s3-devkitc-1.yaml
# device_board: !include packages/board/board_atom-s3-lite.yaml
# device_board: !include
# file: packages/board/board_atom-s3.yaml # board_atom-s3r.yaml
# vars:
# yambms_id: 'yambms1'
# canbus_id: 'canbus1'
# display_auto_next_page_interval: '5s'
# shunt1: !include
# file: packages/shunt/shunt_victron_smartshunt_UART.yaml # shunt_junctek_khf_UART.yaml
# vars:
# # YamBMS ID
# yambms_id: 'yambms1'
# # Shunt vars
# shunt_id: '1' # must be a number
# shunt_name: 'Shunt 1'
# shunt_update_interval: '3s'
# shunt_combine_interval: '1s'
# shunt_uart_id: uart_esp_0
bms1: !include
file: packages/bms/bms_JBD_UART_full.yaml
vars:
# YamBMS ID
yambms_id: 'yambms1'
# BMS vars
bms_id: '1' # must be a number
bms_name: 'BMS 1'
bms_update_interval: '3s'
bms_combine_interval: '1s'
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_JBD_UART_full.yaml
vars:
# YamBMS ID
yambms_id: 'yambms1'
# BMS vars
bms_id: '2' # must be a number
bms_name: 'BMS 2'
bms_update_interval: '3s'
bms_combine_interval: '1s'
bms_uart_id: uart_esp_2
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
yambms1: !include
file: packages/yambms/yambms.yaml
vars:
# 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'
# 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:
# YamBMS ID
yambms_id: 'yambms1' # YamBMS ID to retrieve information from
# CANBUS 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'
+17 -14
View File
@@ -1,5 +1,5 @@
# Updated : 2024.10.03
# Version : 1.4.5
# Updated : 2024.11.11
# Version : 1.5.1
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -43,7 +43,7 @@ ota:
# 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.
# If you don't use Home Assistant please uncomment the "reboot_timeout: 0s" option.
# 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
@@ -65,22 +65,30 @@ api:
# +--------------------------------------+
# | 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:
device_base: !include packages/base/device_base.yaml
# Board : uncomment your board
device_board: !include packages/board/board_esp32-devkit-v1.yaml
# device_board: !include packages/board/board_esp32-s3-devkitc-1.yaml
# device_board: !include packages/board/board_atom-s3-lite.yaml
# device_board: !include
# file: packages/board/board_atom-s3-display.yaml
# file: packages/board/board_atom-s3.yaml # board_atom-s3r.yaml
# vars:
# yambms_id: 'yambms1'
# canbus_id: 'canbus1'
device_base: !include packages/base/device_base.yaml
# display_auto_next_page_interval: '5s'
# shunt1: !include
# file: packages/shunt/shunt_victron_smartshunt.yaml # shunt_junctek_khf.yaml
# file: packages/shunt/shunt_victron_smartshunt_UART.yaml # shunt_junctek_khf_UART.yaml
# vars:
# # YamBMS ID
# yambms_id: 'yambms1'
@@ -91,11 +99,6 @@ packages:
# shunt_combine_interval: '1s'
# shunt_uart_id: uart_esp_0
# Max 3 BLE connections.
# The BLE software stack 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
bms1: !include
file: packages/bms/bms_JK-ALL_BLE_standard.yaml
vars:
@@ -156,7 +159,7 @@ packages:
file: packages/yambms/yambms_canbus.yaml
vars:
# YamBMS ID
yambms_id: 'yambms1'
yambms_id: 'yambms1' # YamBMS ID to retrieve information from
# CANBUS vars
canbus_id: 'canbus1'
canbus_name: 'CANBUS 1'
@@ -164,7 +167,7 @@ packages:
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: '5'
canbus_link_timer: '5s'
# +--------------------------------------+
# | DEBUG ( logger level must be DEBUG ) |
+13 -10
View File
@@ -1,5 +1,5 @@
# Updated : 2024.10.03
# Version : 1.4.5
# Updated : 2024.11.11
# Version : 1.5.1
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -32,7 +32,7 @@ substitutions:
# dns2: 8.8.4.4
logger:
level: WARN # DEBUG / INFO / WARN
level: INFO # DEBUG / INFO / WARN
ota:
platform: esphome
@@ -40,7 +40,7 @@ ota:
# 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.
# If you don't use Home Assistant please uncomment the "reboot_timeout: 0s" option.
# 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
@@ -62,22 +62,25 @@ api:
# +--------------------------------------+
# | Packages |
# +--------------------------------------+
# PLEASE READ : https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_main_YAML_HowTo.md
packages:
device_base: !include packages/base/device_base.yaml
# Board : uncomment your board
device_board: !include packages/board/board_esp32-devkit-v1.yaml
# device_board: !include packages/board/board_esp32-s3-devkitc-1.yaml
# device_board: !include packages/board/board_atom-s3-lite.yaml
# device_board: !include
# file: packages/board/board_atom-s3-display.yaml
# file: packages/board/board_atom-s3.yaml # board_atom-s3r.yaml
# vars:
# yambms_id: 'yambms1'
# canbus_id: 'canbus1'
device_base: !include packages/base/device_base.yaml
# display_auto_next_page_interval: '5s'
# shunt1: !include
# file: packages/shunt/shunt_victron_smartshunt.yaml # shunt_junctek_khf.yaml
# file: packages/shunt/shunt_victron_smartshunt_UART.yaml # shunt_junctek_khf_UART.yaml
# vars:
# # YamBMS ID
# yambms_id: 'yambms1'
@@ -146,7 +149,7 @@ packages:
file: packages/yambms/yambms_canbus.yaml
vars:
# YamBMS ID
yambms_id: 'yambms1'
yambms_id: 'yambms1' # YamBMS ID to retrieve information from
# CANBUS vars
canbus_id: 'canbus1'
canbus_name: 'CANBUS 1'
@@ -154,7 +157,7 @@ packages:
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: '5'
canbus_link_timer: '5s'
# +--------------------------------------+
# | DEBUG ( logger level must be DEBUG ) |
+24 -20
View File
@@ -1,5 +1,5 @@
# Updated : 2024.10.03
# Version : 1.4.5
# Updated : 2024.11.11
# Version : 1.5.1
# GitHub : https://github.com/SeByDocKy/pvbrain2
# GitHub : https://github.com/Sleeper85/esphome-yambms
@@ -46,7 +46,7 @@ substitutions:
# dns2: 8.8.4.4
logger:
level: WARN # DEBUG / INFO / WARN
level: INFO # DEBUG / INFO / WARN
ota:
platform: esphome
@@ -54,7 +54,7 @@ ota:
# 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.
# If you don't use Home Assistant please uncomment the "reboot_timeout: 0s" option.
# 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
@@ -77,8 +77,8 @@ api:
# | PVbrain2 packages |
# +--------------------------------------+
packages:
device_board: !include packages/board/board_pvbrain2.yaml
device_base: !include packages/base/device_base.yaml
device_board: !include packages/board/board_pvbrain2.yaml
# BUS
# bus_i2c0: !include pvbrain2/base/device_bus_i2c0.yaml # SX1509 and BME280/BMP280
@@ -97,17 +97,21 @@ packages:
# | YamBMS packages |
# +--------------------------------------+
# shunt1: !include
# file: packages/shunt/shunt_victron_smartshunt.yaml # shunt_junctek_khf.yaml
# vars:
# # YamBMS ID
# yambms_id: 'yambms1'
# # Shunt vars
# shunt_id: '1' # must be a number
# shunt_name: 'Shunt 1'
# shunt_update_interval: '3s'
# shunt_combine_interval: '1s'
# shunt_uart_id: uart_esp_0
# 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_victron_smartshunt_UART_pvbrain2.yaml # shunt_junctek_khf_UART.yaml
vars:
# YamBMS ID
yambms_id: 'yambms1'
# Shunt vars
shunt_id: '1' # must be a number
shunt_name: 'Shunt 1'
shunt_update_interval: '3s'
shunt_combine_interval: '1s'
shunt_uart_id: uart_${uart_hub_bus}_2
bms1: !include
file: packages/bms/bms_JK-B_UART_full.yaml
@@ -117,7 +121,7 @@ packages:
# BMS vars
bms_id: '1' # must be a number
bms_name: 'JK-BMS 1'
bms_update_interval: '2s'
bms_update_interval: '3s'
bms_combine_interval: '1s'
bms_uart_id: uart_${uart_hub_bus}_4
@@ -129,7 +133,7 @@ packages:
# BMS vars
bms_id: '2' # must be a number
bms_name: 'JK-BMS 2'
bms_update_interval: '2s'
bms_update_interval: '3s'
bms_combine_interval: '1s'
bms_uart_id: uart_${uart_hub_bus}_5
@@ -167,7 +171,7 @@ packages:
file: packages/yambms/yambms_canbus.yaml
vars:
# YamBMS ID
yambms_id: 'yambms1'
yambms_id: 'yambms1' # YamBMS ID to retrieve information from
# CANBUS vars
canbus_id: 'canbus1'
canbus_name: 'CANBUS 1'
@@ -175,7 +179,7 @@ packages:
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: '5'
canbus_link_timer: '5s'
# +--------------------------------------+
# | DEBUG ( logger level must be DEBUG ) |
+13 -10
View File
@@ -1,5 +1,5 @@
# Updated : 2024.10.03
# Version : 1.4.5
# Updated : 2024.11.11
# Version : 1.5.1
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -32,7 +32,7 @@ substitutions:
# dns2: 8.8.4.4
logger:
level: WARN # DEBUG / INFO / WARN
level: INFO # DEBUG / INFO / WARN
ota:
platform: esphome
@@ -40,7 +40,7 @@ ota:
# 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.
# If you don't use Home Assistant please uncomment the "reboot_timeout: 0s" option.
# 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
@@ -62,22 +62,25 @@ api:
# +--------------------------------------+
# | Packages |
# +--------------------------------------+
# PLEASE READ : https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_main_YAML_HowTo.md
packages:
device_base: !include packages/base/device_base.yaml
# Board : uncomment your board
# device_board: !include packages/board/board_esp32-devkit-v1.yaml
# device_board: !include packages/board/board_esp32-s3-devkitc-1.yaml
device_board: !include packages/board/board_atom-s3-lite.yaml
# device_board: !include
# file: packages/board/board_atom-s3-display.yaml
# file: packages/board/board_atom-s3.yaml # board_atom-s3r.yaml
# vars:
# yambms_id: 'yambms1'
# canbus_id: 'canbus1'
device_base: !include packages/base/device_base.yaml
# display_auto_next_page_interval: '5s'
# shunt1: !include
# file: packages/shunt/shunt_victron_smartshunt.yaml # shunt_junctek_khf.yaml
# file: packages/shunt/shunt_victron_smartshunt_UART.yaml # shunt_junctek_khf_UART.yaml
# vars:
# # YamBMS ID
# yambms_id: 'yambms1'
@@ -239,7 +242,7 @@ packages:
file: packages/yambms/yambms_canbus.yaml
vars:
# YamBMS ID
yambms_id: 'yambms1'
yambms_id: 'yambms1' # YamBMS ID to retrieve information from
# CANBUS vars
canbus_id: 'canbus1'
canbus_name: 'CANBUS 1'
@@ -247,7 +250,7 @@ packages:
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: '5'
canbus_link_timer: '5s'
# +--------------------------------------+
# | DEBUG ( logger level must be DEBUG ) |
+189
View File
@@ -0,0 +1,189 @@
# Updated : 2024.11.11
# Version : 1.5.1
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
# This YAML is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
substitutions:
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:
device_base: !include packages/base/device_base.yaml
device_board: !include
file: packages/board/board_atom-s3.yaml
vars:
yambms_id: 'yambms1'
canbus_id: 'canbus1'
display_auto_next_page_interval: '5s'
# shunt1: !include
# file: packages/shunt/shunt_victron_smartshunt_UART.yaml # shunt_junctek_khf_UART.yaml
# vars:
# # YamBMS ID
# yambms_id: 'yambms1'
# # Shunt vars
# shunt_id: '1' # must be a number
# shunt_name: 'Shunt 1'
# shunt_update_interval: '3s'
# shunt_combine_interval: '1s'
# 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_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_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_JK-PB_RS485_bms_full.yaml
vars:
# YamBMS ID
yambms_id: 'yambms1'
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '1' # must be a number
bms_name: 'JK-BMS 1'
bms_rs485_address: '0x01' # BMS 1 DIP switch
bms_update_interval: '3s' # going below '3s' can cause problems
bms_combine_interval: '1s'
bms2: !include
file: packages/bms/bms_JK-PB_RS485_bms_full.yaml
vars:
# YamBMS ID
yambms_id: 'yambms1'
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '2' # must be a number
bms_name: 'JK-BMS 2'
bms_rs485_address: '0x02' # BMS 2 DIP switch
bms_update_interval: '3s' # going below '3s' can cause problems
bms_combine_interval: '1s'
yambms1: !include
file: packages/yambms/yambms.yaml
vars:
# 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'
# 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:
# YamBMS ID
yambms_id: 'yambms1' # YamBMS ID to retrieve information from
# CANBUS 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'
+11 -8
View File
@@ -1,5 +1,5 @@
# Updated : 2024.10.03
# Version : 1.4.5
# Updated : 2024.11.11
# Version : 1.5.1
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -30,7 +30,7 @@ substitutions:
# dns2: 8.8.4.4
logger:
level: WARN # DEBUG / INFO / WARN
level: INFO # DEBUG / INFO / WARN
ota:
platform: esphome
@@ -38,7 +38,7 @@ ota:
# 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.
# If you don't use Home Assistant please uncomment the "reboot_timeout: 0s" option.
# 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
@@ -60,12 +60,15 @@ api:
# +--------------------------------------+
# | Packages |
# +--------------------------------------+
# PLEASE READ : https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_main_YAML_HowTo.md
packages:
device_board: !include packages/board/board_esp32-c3-eth01-evo.yaml
device_base: !include packages/base/device_base_ethernet.yaml
device_board: !include packages/board/board_esp32-c3-eth01-evo.yaml
# shunt1: !include
# file: packages/shunt/shunt_victron_smartshunt.yaml # shunt_junctek_khf.yaml
# file: packages/shunt/shunt_victron_smartshunt_UART.yaml # shunt_junctek_khf_UART.yaml
# vars:
# # YamBMS ID
# yambms_id: 'yambms1'
@@ -149,7 +152,7 @@ packages:
file: packages/yambms/yambms_canbus.yaml
vars:
# YamBMS ID
yambms_id: 'yambms1'
yambms_id: 'yambms1' # YamBMS ID to retrieve information from
# CANBUS vars
canbus_id: 'canbus1'
canbus_name: 'CANBUS 1'
@@ -157,7 +160,7 @@ packages:
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: '5'
canbus_link_timer: '5s'
# +--------------------------------------+
# | DEBUG ( logger level must be DEBUG ) |
+22 -18
View File
@@ -1,5 +1,5 @@
# Updated : 2024.10.03
# Version : 1.4.5
# Updated : 2024.11.11
# Version : 1.5.1
# GitHub : https://github.com/SeByDocKy/pvbrain2
# GitHub : https://github.com/Sleeper85/esphome-yambms
@@ -46,7 +46,7 @@ substitutions:
# dns2: 8.8.4.4
logger:
level: WARN # DEBUG / INFO / WARN
level: INFO # DEBUG / INFO / WARN
ota:
platform: esphome
@@ -54,7 +54,7 @@ ota:
# 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.
# If you don't use Home Assistant please uncomment the "reboot_timeout: 0s" option.
# 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
@@ -77,8 +77,8 @@ api:
# | PVbrain2 packages |
# +--------------------------------------+
packages:
device_board: !include packages/board/board_pvbrain2.yaml
device_base: !include packages/base/device_base.yaml
device_board: !include packages/board/board_pvbrain2.yaml
# BUS
# bus_i2c0: !include pvbrain2/base/device_bus_i2c0.yaml # SX1509 and BME280/BMP280
@@ -97,17 +97,21 @@ packages:
# | YamBMS packages |
# +--------------------------------------+
# shunt1: !include
# file: packages/shunt/shunt_victron_smartshunt.yaml # shunt_junctek_khf.yaml
# vars:
# # YamBMS ID
# yambms_id: 'yambms1'
# # Shunt vars
# shunt_id: '1' # must be a number
# shunt_name: 'Shunt 1'
# shunt_update_interval: '3s'
# shunt_combine_interval: '1s'
# shunt_uart_id: uart_esp_0
# 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_victron_smartshunt_UART_pvbrain2.yaml # shunt_junctek_khf_UART.yaml
vars:
# YamBMS ID
yambms_id: 'yambms1'
# Shunt vars
shunt_id: '1' # must be a number
shunt_name: 'Shunt 1'
shunt_update_interval: '3s'
shunt_combine_interval: '1s'
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)
@@ -252,7 +256,7 @@ packages:
file: packages/yambms/yambms_canbus.yaml
vars:
# YamBMS ID
yambms_id: 'yambms1'
yambms_id: 'yambms1' # YamBMS ID to retrieve information from
# CANBUS vars
canbus_id: 'canbus1'
canbus_name: 'CANBUS 1'
@@ -260,7 +264,7 @@ packages:
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: '5'
canbus_link_timer: '5s'
# +--------------------------------------+
# | DEBUG ( logger level must be DEBUG ) |
+201
View File
@@ -0,0 +1,201 @@
# Updated : 2024.11.11
# Version : 1.5.1
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
# This YAML is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
substitutions:
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:
device_base: !include packages/base/device_base.yaml
# Board : uncomment your board
device_board: !include packages/board/board_esp32-devkit-v1.yaml
# device_board: !include packages/board/board_esp32-s3-devkitc-1.yaml
# device_board: !include packages/board/board_atom-s3-lite.yaml
# device_board: !include
# file: packages/board/board_atom-s3.yaml # board_atom-s3r.yaml
# vars:
# yambms_id: 'yambms1'
# canbus_id: 'canbus1'
# display_auto_next_page_interval: '5s'
# shunt1: !include
# file: packages/shunt/shunt_victron_smartshunt_UART.yaml # shunt_junctek_khf_UART.yaml
# vars:
# # YamBMS ID
# yambms_id: 'yambms1'
# # Shunt vars
# shunt_id: '1' # must be a number
# shunt_name: 'Shunt 1'
# shunt_update_interval: '3s'
# shunt_combine_interval: '1s'
# shunt_uart_id: uart_esp_0
seplos_modbus1: !include
file: packages/bms/bms_SEPLOS_V1_V2_RS485_modbus.yaml
vars:
seplos_modbus_id: 'seplos_modbus1'
seplos_modbus_uart_id: 'uart_esp_1'
seplos_modbus_baud_rate: '9600' # Please set the baudrate of your Seplos BMS model here. It's sometimes 19200 baud instead of 9600.
seplos_modbus_rx_timeout: 150ms
bms1: !include
file: packages/bms/bms_SEPLOS_V1_V2_RS485_bms_full.yaml
vars:
# YamBMS ID
yambms_id: 'yambms1'
# Seplos modbus ID
seplos_modbus_id: 'seplos_modbus1'
# BMS vars
bms_id: '1' # must be a number
bms_name: 'BMS 1'
bms_rs485_address: '0x01' # BMS 1 DIP switch
bms_protocol_version: '0x20' # Known protocol versions: 0x20 (Seplos), 0x26 (Boqiang)
bms_update_interval: '3s' # 10s @syssi example
bms_combine_interval: '1s'
# 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_SEPLOS_V1_V2_RS485_bms_full.yaml
vars:
# YamBMS ID
yambms_id: 'yambms1'
# Seplos modbus ID
seplos_modbus_id: 'seplos_modbus1'
# BMS vars
bms_id: '2' # must be a number
bms_name: 'BMS 2'
bms_rs485_address: '0x02' # BMS 2 DIP switch
bms_protocol_version: '0x20' # Known protocol versions: 0x20 (Seplos), 0x26 (Boqiang)
bms_update_interval: '3s' # 10s @syssi example
bms_combine_interval: '1s'
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_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'
# 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:
# YamBMS ID
yambms_id: 'yambms1' # YamBMS ID to retrieve information from
# CANBUS 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'
+18 -15
View File
@@ -1,5 +1,5 @@
# Updated : 2024.10.03
# Version : 1.4.5
# Updated : 2024.11.11
# Version : 1.5.1
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -43,7 +43,7 @@ ota:
# 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.
# If you don't use Home Assistant please uncomment the "reboot_timeout: 0s" option.
# 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
@@ -65,7 +65,16 @@ api:
# +--------------------------------------+
# | 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:
device_base: !include packages/base/device_base.yaml
# Board : uncomment your board
device_board: !include packages/board/board_esp32-devkit-v1.yaml
# device_board: !include packages/board/board_esp32-s3-devkitc-1.yaml
@@ -73,15 +82,14 @@ packages:
# device_board: !include packages/board/board_atom-s3-lite.yaml
# device_board: !include
# file: packages/board/board_atom-s3-display.yaml
# file: packages/board/board_atom-s3.yaml # board_atom-s3r.yaml
# vars:
# yambms_id: 'yambms1'
# canbus_id: 'canbus1'
device_base: !include packages/base/device_base.yaml
# display_auto_next_page_interval: '5s'
# shunt1: !include
# file: packages/shunt/shunt_victron_smartshunt.yaml # shunt_junctek_khf.yaml
# file: packages/shunt/shunt_victron_smartshunt_UART.yaml # shunt_junctek_khf_UART.yaml
# vars:
# # YamBMS ID
# yambms_id: 'yambms1'
@@ -92,11 +100,6 @@ packages:
# shunt_combine_interval: '1s'
# shunt_uart_id: uart_esp_0
# Max 3 BLE connections.
# The BLE software stack 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
bms1: !include
file: packages/bms/bms_JK-ALL_BLE_standard.yaml
vars:
@@ -108,7 +111,7 @@ packages:
bms_update_interval: '3s'
bms_combine_interval: '1s'
bms_ble_protocol_version: JK02_32S # JK02_24S < hardware version 11.0 >= JK02_32S
bms_ble_mac_address: C8:47:8C:10:7E:AA
bms_ble_mac_address: C8:47:80:09:37:ED
yambms1: !include
file: packages/yambms/yambms.yaml
@@ -144,7 +147,7 @@ packages:
file: packages/yambms/yambms_canbus.yaml
vars:
# YamBMS ID
yambms_id: 'yambms1'
yambms_id: 'yambms1' # YamBMS ID to retrieve information from
# CANBUS vars
canbus_id: 'canbus1'
canbus_name: 'CANBUS 1'
@@ -152,7 +155,7 @@ packages:
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: '5'
canbus_link_timer: '5s'
# +--------------------------------------+
# | DEBUG ( logger level must be DEBUG ) |
+13 -10
View File
@@ -1,5 +1,5 @@
# Updated : 2024.10.03
# Version : 1.4.5
# Updated : 2024.11.11
# Version : 1.5.1
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -32,7 +32,7 @@ substitutions:
# dns2: 8.8.4.4
logger:
level: WARN # DEBUG / INFO / WARN
level: INFO # DEBUG / INFO / WARN
ota:
platform: esphome
@@ -40,7 +40,7 @@ ota:
# 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.
# If you don't use Home Assistant please uncomment the "reboot_timeout: 0s" option.
# 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
@@ -62,7 +62,11 @@ api:
# +--------------------------------------+
# | Packages |
# +--------------------------------------+
# PLEASE READ : https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_main_YAML_HowTo.md
packages:
device_base: !include packages/base/device_base.yaml
# Board : uncomment your board
device_board: !include packages/board/board_esp32-devkit-v1.yaml
# device_board: !include packages/board/board_esp32-s3-devkitc-1.yaml
@@ -70,15 +74,14 @@ packages:
# device_board: !include packages/board/board_atom-s3-lite.yaml
# device_board: !include
# file: packages/board/board_atom-s3-display.yaml
# file: packages/board/board_atom-s3.yaml # board_atom-s3r.yaml
# vars:
# yambms_id: 'yambms1'
# canbus_id: 'canbus1'
device_base: !include packages/base/device_base.yaml
# display_auto_next_page_interval: '5s'
# shunt1: !include
# file: packages/shunt/shunt_victron_smartshunt.yaml # shunt_junctek_khf.yaml
# file: packages/shunt/shunt_victron_smartshunt_UART.yaml # shunt_junctek_khf_UART.yaml
# vars:
# # YamBMS ID
# yambms_id: 'yambms1'
@@ -135,7 +138,7 @@ packages:
file: packages/yambms/yambms_canbus.yaml
vars:
# YamBMS ID
yambms_id: 'yambms1'
yambms_id: 'yambms1' # YamBMS ID to retrieve information from
# CANBUS vars
canbus_id: 'canbus1'
canbus_name: 'CANBUS 1'
@@ -143,7 +146,7 @@ packages:
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: '5'
canbus_link_timer: '5s'
# +--------------------------------------+
# | DEBUG ( logger level must be DEBUG ) |
+13 -10
View File
@@ -1,5 +1,5 @@
# Updated : 2024.10.03
# Version : 1.4.5
# Updated : 2024.11.11
# Version : 1.5.1
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -32,7 +32,7 @@ substitutions:
# dns2: 8.8.4.4
logger:
level: WARN # DEBUG / INFO / WARN
level: INFO # DEBUG / INFO / WARN
ota:
platform: esphome
@@ -40,7 +40,7 @@ ota:
# 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.
# If you don't use Home Assistant please uncomment the "reboot_timeout: 0s" option.
# 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
@@ -62,22 +62,25 @@ api:
# +--------------------------------------+
# | Packages |
# +--------------------------------------+
# PLEASE READ : https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_main_YAML_HowTo.md
packages:
device_base: !include packages/base/device_base.yaml
# Board : uncomment your board
# device_board: !include packages/board/board_esp32-devkit-v1.yaml
# device_board: !include packages/board/board_esp32-s3-devkitc-1.yaml
device_board: !include packages/board/board_atom-s3-lite.yaml
# device_board: !include
# file: packages/board/board_atom-s3-display.yaml
# file: packages/board/board_atom-s3.yaml # board_atom-s3r.yaml
# vars:
# yambms_id: 'yambms1'
# canbus_id: 'canbus1'
device_base: !include packages/base/device_base.yaml
# display_auto_next_page_interval: '5s'
# shunt1: !include
# file: packages/shunt/shunt_victron_smartshunt.yaml # shunt_junctek_khf.yaml
# file: packages/shunt/shunt_victron_smartshunt_UART.yaml # shunt_junctek_khf_UART.yaml
# vars:
# # YamBMS ID
# yambms_id: 'yambms1'
@@ -155,7 +158,7 @@ packages:
file: packages/yambms/yambms_canbus.yaml
vars:
# YamBMS ID
yambms_id: 'yambms1'
yambms_id: 'yambms1' # YamBMS ID to retrieve information from
# CANBUS vars
canbus_id: 'canbus1'
canbus_name: 'CANBUS 1'
@@ -163,7 +166,7 @@ packages:
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: '5'
canbus_link_timer: '5s'
# +--------------------------------------+
# | DEBUG ( logger level must be DEBUG ) |
+3 -3
View File
@@ -1,5 +1,5 @@
# Updated : 2024.10.03
# Version : 1.4.5
# Updated : 2024.11.11
# Version : 1.5.1
# GitHub : https://github.com/Sleeper85/esphome-yambms
# 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:
yambms_version: "1.4.5"
yambms_version: "1.5.1"
esphome:
name: ${name}
+3 -3
View File
@@ -1,5 +1,5 @@
# Updated : 2024.10.03
# Version : 1.4.5
# Updated : 2024.11.11
# Version : 1.5.1
# GitHub : https://github.com/Sleeper85/esphome-yambms
# 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:
yambms_version: "1.4.5"
yambms_version: "1.5.1"
esphome:
name: ${name}
+344
View File
@@ -0,0 +1,344 @@
# Updated : 2024.11.11
# Version : 1.1.1
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
# This YAML is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
substitutions:
bms_model: "Fake BMS"
bms_protocol: "DEMO"
packages:
bms_combine: !include bms_combine.yaml
bms_temperature_sensor: !include bms_temperature_sensor_4.yaml
sensor:
# battery_capacity
- platform: template
id: bms${bms_id}_battery_capacity
name: "${name} ${bms_name} Battery Capacity"
update_interval: ${bms_update_interval}
accuracy_decimals: 0
unit_of_measurement: Ah
device_class: energy_storage
filters:
- or:
- throttle: 10s
- delta: 1
lambda: return ${bms_battery_capacity};
# capacity_remaining_ah
- platform: template
id: bms${bms_id}_capacity_remaining_ah
name: "${name} ${bms_name} Capacity Remaining"
update_interval: ${bms_update_interval}
accuracy_decimals: 0
unit_of_measurement: Ah
device_class: energy_storage
filters:
- or:
- throttle: 10s
- delta: 1
lambda: return ${bms_battery_capacity_remaining};
# total_voltage
- platform: template
id: bms${bms_id}_total_voltage
name: "${name} ${bms_name} Total Voltage"
update_interval: ${bms_update_interval}
accuracy_decimals: 2
unit_of_measurement: V
device_class: voltage
filters:
- or:
- throttle: 10s
- delta: 0.01
lambda: return ${bms_voltage};
# current
- platform: template
id: bms${bms_id}_current
name: "${name} ${bms_name} Current"
update_interval: ${bms_update_interval}
accuracy_decimals: 1
unit_of_measurement: A
device_class: current
filters:
- or:
- throttle: 10s
- delta: 0.1
lambda: return ${bms_current};
# power
- platform: template
id: bms${bms_id}_power
name: "${name} ${bms_name} Power"
update_interval: ${bms_update_interval}
accuracy_decimals: 0
unit_of_measurement: W
device_class: power
filters:
- or:
- throttle: 10s
- delta: 1
lambda: return ${bms_power};
# state_of_charge
- platform: template
id: bms${bms_id}_state_of_charge
name: "${name} ${bms_name} SoC"
update_interval: ${bms_update_interval}
accuracy_decimals: 0
unit_of_measurement: '%'
device_class: battery
filters:
- or:
- throttle: 10s
- delta: 1
lambda: return ${bms_soc};
# min_voltage_cell
- platform: template
id: bms${bms_id}_min_voltage_cell
name: "${name} ${bms_name} Min Voltage Cell"
update_interval: ${bms_update_interval}
accuracy_decimals: 0
icon: mdi:numeric
filters:
- or:
- throttle: 10s
- delta: 1
lambda: return ${bms_min_voltage_cell};
# max_voltage_cell
- platform: template
id: bms${bms_id}_max_voltage_cell
name: "${name} ${bms_name} Max Voltage Cell"
update_interval: ${bms_update_interval}
accuracy_decimals: 0
icon: mdi:numeric
filters:
- or:
- throttle: 10s
- delta: 1
lambda: return ${bms_max_voltage_cell};
# min_cell_voltage
- platform: template
id: bms${bms_id}_min_cell_voltage
name: "${name} ${bms_name} Min Cell Voltage"
update_interval: ${bms_update_interval}
accuracy_decimals: 3
unit_of_measurement: V
device_class: voltage
filters:
- or:
- throttle: 10s
- delta: 0.001
lambda: return ${bms_min_cell_voltage};
# max_cell_voltage
- platform: template
id: bms${bms_id}_max_cell_voltage
name: "${name} ${bms_name} Max Cell Voltage"
update_interval: ${bms_update_interval}
accuracy_decimals: 3
unit_of_measurement: V
device_class: voltage
filters:
- or:
- throttle: 10s
- delta: 0.001
lambda: return ${bms_max_cell_voltage};
# temperature_sensor_1
- platform: template
id: bms${bms_id}_temperature_sensor_1
name: "${name} ${bms_name} Temperature Sensor 1"
update_interval: ${bms_update_interval}
accuracy_decimals: 1
unit_of_measurement: °C
device_class: temperature
filters:
- or:
- throttle: 10s
- delta: 0.1
lambda: return ${bms_temperature_sensor_1};
# temperature_sensor_2
- platform: template
id: bms${bms_id}_temperature_sensor_2
name: "${name} ${bms_name} Temperature Sensor 2"
update_interval: ${bms_update_interval}
accuracy_decimals: 1
unit_of_measurement: °C
device_class: temperature
filters:
- or:
- throttle: 10s
- delta: 0.1
lambda: return ${bms_temperature_sensor_2};
# temperature_sensor_3
- platform: template
id: bms${bms_id}_temperature_sensor_3
name: "${name} ${bms_name} Temperature Sensor 3"
update_interval: ${bms_update_interval}
accuracy_decimals: 1
unit_of_measurement: °C
device_class: temperature
filters:
- or:
- throttle: 10s
- delta: 0.1
lambda: return ${bms_temperature_sensor_3};
# temperature_sensor_4
- platform: template
id: bms${bms_id}_temperature_sensor_4
name: "${name} ${bms_name} Temperature Sensor 4"
update_interval: ${bms_update_interval}
accuracy_decimals: 1
unit_of_measurement: °C
device_class: temperature
filters:
- or:
- throttle: 10s
- delta: 0.1
lambda: return ${bms_temperature_sensor_4};
# max_charge_current
- platform: template
id: bms${bms_id}_max_charge_current
name: "${name} ${bms_name} Max Charge Current"
update_interval: ${bms_update_interval}
accuracy_decimals: 0
unit_of_measurement: A
icon: mdi:current-dc
filters:
- or:
- throttle: 10s
- delta: 1
lambda: return ${bms_max_charge_current};
# max_discharge_current
- platform: template
id: bms${bms_id}_max_discharge_current
name: "${name} ${bms_name} Max Discharge Current"
update_interval: ${bms_update_interval}
accuracy_decimals: 0
unit_of_measurement: A
icon: mdi:current-dc
filters:
- or:
- throttle: 10s
- delta: 1
lambda: return ${bms_max_discharge_current};
# cell_ovp
- platform: template
id: bms${bms_id}_cell_ovp
name: "${name} ${bms_name} Cell OVP"
update_interval: ${bms_update_interval}
accuracy_decimals: 3
unit_of_measurement: V
device_class: voltage
filters:
- or:
- throttle: 10s
- delta: 0.001
lambda: return ${bms_cell_ovp};
# cell_uvp
- platform: template
id: bms${bms_id}_cell_uvp
name: "${name} ${bms_name} Cell UVP"
update_interval: ${bms_update_interval}
accuracy_decimals: 3
unit_of_measurement: V
device_class: voltage
filters:
- or:
- throttle: 10s
- delta: 0.001
lambda: return ${bms_cell_uvp};
# balance_trigger_voltage
- platform: template
id: bms${bms_id}_balance_trigger_voltage
name: "${name} ${bms_name} Balance Trigger Voltage"
update_interval: ${bms_update_interval}
accuracy_decimals: 3
unit_of_measurement: V
device_class: voltage
filters:
- or:
- throttle: 10s
- delta: 0.001
lambda: return ${bms_balance_trigger_voltage};
# charging_cycles
- platform: template
id: bms${bms_id}_charging_cycles
name: "${name} ${bms_name} charging cycles"
update_interval: ${bms_update_interval}
accuracy_decimals: 0
icon: mdi:counter
filters:
- or:
- throttle: 10s
- delta: 1
lambda: return ${bms_charging_cycles};
number:
# errors_bitmask (16bits)
- platform: template
id: bms${bms_id}_errors_bitmask
name: "${name} ${bms_name} errors bitmask"
step: 1
min_value: 0
max_value: 65535
restore_value: true
initial_value: 0 # 0~65535 (16bits) 0=NoAlarm
icon: mdi:alert-circle-outline
optimistic: true
entity_category: config
switch:
# online_status
- platform: template
id: bms${bms_id}_online_status
name: "${name} ${bms_name} online status"
restore_mode: RESTORE_DEFAULT_ON
optimistic: true
# bms_switch_charging
- platform: template
id: bms${bms_id}_charging_allowed
name: "${name} ${bms_name} charge switch"
restore_mode: RESTORE_DEFAULT_ON
optimistic: true
# bms_switch_discharging
- platform: template
id: bms${bms_id}_discharging_allowed
name: "${name} ${bms_name} discharge switch"
restore_mode: RESTORE_DEFAULT_ON
optimistic: true
# bms_switch_balancing
- platform: template
id: bms${bms_id}_equalizing
name: "${name} ${bms_name} balance switch"
restore_mode: RESTORE_DEFAULT_OFF
optimistic: true
+311
View File
@@ -0,0 +1,311 @@
# Updated : 2024.11.11
# Version : 1.1.1
# GitHub : https://github.com/syssi/esphome-jdb-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: "JBD"
bms_protocol: "UART"
packages:
bms_base: !include bms_base.yaml
bms_combine: !include bms_combine.yaml
bms_temperature_sensor: !include bms_temperature_sensor_6.yaml
# +--------------------------------------+
# | Component settings |
# +--------------------------------------+
external_components:
- source: github://syssi/esphome-jbd-bms@main
refresh: 0s
uart:
- id: !extend ${bms_uart_id}
baud_rate: 9600
jbd_bms:
- id: jbd_bms${bms_id}
uart_id: ${bms_uart_id}
update_interval: ${bms_update_interval}
rx_timeout: ${bms_rx_timeout}
# +--------------------------------------+
# | Component entities |
# +--------------------------------------+
button:
- platform: jbd_bms
jbd_bms_id: jbd_bms${bms_id}
retrieve_hardware_version:
name: "${name} ${bms_name} retrieve hardware version"
binary_sensor:
- platform: jbd_bms
jbd_bms_id: jbd_bms${bms_id}
balancing:
id: bms${bms_id}_equalizing
name: "${name} ${bms_name} balancing"
charging:
id: bms${bms_id}_charging_allowed
name: "${name} ${bms_name} charging"
discharging:
id: bms${bms_id}_discharging_allowed
name: "${name} ${bms_name} discharging"
online_status:
id: bms${bms_id}_online_status
name: "${name} ${bms_name} online status"
switch:
- platform: jbd_bms
jbd_bms_id: jbd_bms${bms_id}
charging:
name: "${name} ${bms_name} Charge switch"
discharging:
name: "${name} ${bms_name} Discharge switch"
sensor:
- platform: jbd_bms
jbd_bms_id: jbd_bms${bms_id}
battery_strings:
name: "${name} ${bms_name} battery strings"
current:
id: bms${bms_id}_current
name: "${name} ${bms_name} current"
power:
id: bms${bms_id}_power
name: "${name} ${bms_name} power"
charging_power:
id: bms${bms_id}_charging_power
name: "${name} ${bms_name} charging power"
discharging_power:
id: bms${bms_id}_discharging_power
name: "${name} ${bms_name} discharging power"
state_of_charge:
id: bms${bms_id}_state_of_charge
name: "${name} ${bms_name} state of charge"
nominal_capacity:
id: bms${bms_id}_battery_capacity
name: "${name} ${bms_name} nominal capacity"
charging_cycles:
id: bms${bms_id}_charging_cycles
name: "${name} ${bms_name} charging cycles"
capacity_remaining:
id: bms${bms_id}_capacity_remaining_ah
name: "${name} ${bms_name} capacity remaining"
battery_cycle_capacity:
name: "${name} ${bms_name} battery cycle capacity"
total_voltage:
id: bms${bms_id}_total_voltage
name: "${name} ${bms_name} total voltage"
average_cell_voltage:
name: "${name} ${bms_name} average cell voltage"
delta_cell_voltage:
name: "${name} ${bms_name} delta cell voltage"
min_cell_voltage:
id: bms${bms_id}_min_cell_voltage
name: "${name} ${bms_name} min cell voltage"
max_cell_voltage:
id: bms${bms_id}_max_cell_voltage
name: "${name} ${bms_name} max cell voltage"
min_voltage_cell:
id: bms${bms_id}_min_voltage_cell
name: "${name} ${bms_name} min voltage cell"
max_voltage_cell:
id: bms${bms_id}_max_voltage_cell
name: "${name} ${bms_name} max voltage cell"
temperature_1:
id: bms${bms_id}_temperature_sensor_1
name: "${name} ${bms_name} temperature 1"
temperature_2:
id: bms${bms_id}_temperature_sensor_2
name: "${name} ${bms_name} temperature 2"
temperature_3:
id: bms${bms_id}_temperature_sensor_3
name: "${name} ${bms_name} temperature 3"
temperature_4:
id: bms${bms_id}_temperature_sensor_4
name: "${name} ${bms_name} temperature 4"
temperature_5:
id: bms${bms_id}_temperature_sensor_5
name: "${name} ${bms_name} temperature 5"
temperature_6:
id: bms${bms_id}_temperature_sensor_6
name: "${name} ${bms_name} temperature 6"
cell_voltage_1:
name: "${name} ${bms_name} cell voltage 01"
cell_voltage_2:
name: "${name} ${bms_name} cell voltage 02"
cell_voltage_3:
name: "${name} ${bms_name} cell voltage 03"
cell_voltage_4:
name: "${name} ${bms_name} cell voltage 04"
cell_voltage_5:
name: "${name} ${bms_name} cell voltage 05"
cell_voltage_6:
name: "${name} ${bms_name} cell voltage 06"
cell_voltage_7:
name: "${name} ${bms_name} cell voltage 07"
cell_voltage_8:
name: "${name} ${bms_name} cell voltage 08"
cell_voltage_9:
name: "${name} ${bms_name} cell voltage 09"
cell_voltage_10:
name: "${name} ${bms_name} cell voltage 10"
cell_voltage_11:
name: "${name} ${bms_name} cell voltage 11"
cell_voltage_12:
name: "${name} ${bms_name} cell voltage 12"
cell_voltage_13:
name: "${name} ${bms_name} cell voltage 13"
cell_voltage_14:
name: "${name} ${bms_name} cell voltage 14"
cell_voltage_15:
name: "${name} ${bms_name} cell voltage 15"
cell_voltage_16:
name: "${name} ${bms_name} cell voltage 16"
# cell_voltage_17:
# name: "${name} ${bms_name} cell voltage 17"
# cell_voltage_18:
# name: "${name} ${bms_name} cell voltage 18"
# cell_voltage_19:
# name: "${name} ${bms_name} cell voltage 19"
# cell_voltage_20:
# name: "${name} ${bms_name} cell voltage 20"
# cell_voltage_21:
# name: "${name} ${bms_name} cell voltage 21"
# cell_voltage_22:
# name: "${name} ${bms_name} cell voltage 22"
# cell_voltage_23:
# name: "${name} ${bms_name} cell voltage 23"
# cell_voltage_24:
# name: "${name} ${bms_name} cell voltage 24"
# cell_voltage_25:
# name: "${name} ${bms_name} cell voltage 25"
# cell_voltage_26:
# name: "${name} ${bms_name} cell voltage 26"
# cell_voltage_27:
# name: "${name} ${bms_name} cell voltage 27"
# cell_voltage_28:
# name: "${name} ${bms_name} cell voltage 28"
# cell_voltage_29:
# name: "${name} ${bms_name} cell voltage 29"
# cell_voltage_30:
# name: "${name} ${bms_name} cell voltage 30"
# cell_voltage_31:
# name: "${name} ${bms_name} cell voltage 31"
# cell_voltage_32:
# name: "${name} ${bms_name} cell voltage 32"
operation_status_bitmask:
name: "${name} ${bms_name} operation status bitmask"
errors_bitmask:
name: "${name} ${bms_name} errors bitmask"
balancer_status_bitmask:
name: "${name} ${bms_name} balancer status bitmask"
software_version:
name: "${name} ${bms_name} software version"
# Required sensors cannot be retrieved from BMS
# max_charge_current
- platform: template
id: bms${bms_id}_max_charge_current
name: "${name} ${bms_name} max charge current"
update_interval: ${bms_update_interval}
accuracy_decimals: 0
unit_of_measurement: A
icon: mdi:current-dc
filters:
- or:
- throttle: 10s
- delta: 1
lambda: return ${bms_max_charge_current};
# max_discharge_current
- platform: template
id: bms${bms_id}_max_discharge_current
name: "${name} ${bms_name} max discharge current"
update_interval: ${bms_update_interval}
accuracy_decimals: 0
unit_of_measurement: A
icon: mdi:current-dc
filters:
- or:
- throttle: 10s
- delta: 1
lambda: return ${bms_max_discharge_current};
# cell_ovp
- platform: template
id: bms${bms_id}_cell_ovp
name: "${name} ${bms_name} cell ovp"
update_interval: ${bms_update_interval}
accuracy_decimals: 3
unit_of_measurement: V
device_class: voltage
filters:
- or:
- throttle: 10s
- delta: 0.001
lambda: return ${bms_cell_ovp};
# cell_uvp
- platform: template
id: bms${bms_id}_cell_uvp
name: "${name} ${bms_name} cell uvp"
update_interval: ${bms_update_interval}
accuracy_decimals: 3
unit_of_measurement: V
device_class: voltage
filters:
- or:
- throttle: 10s
- delta: 0.001
lambda: return ${bms_cell_uvp};
# balance_trigger_voltage
- platform: template
id: bms${bms_id}_balance_trigger_voltage
name: "${name} ${bms_name} balance trigger voltage"
update_interval: ${bms_update_interval}
accuracy_decimals: 3
unit_of_measurement: V
device_class: voltage
filters:
- or:
- throttle: 10s
- delta: 0.001
lambda: return ${bms_balance_trigger_voltage};
# FAKE errors_bitmask
# JBD errors_bitmask does not match the format used by JK
# Alarm management is not supported at this time
# Internal : only specifying an id without a name will implicitly set this to true.
- platform: template
id: bms${bms_id}_errors_bitmask
update_interval: ${bms_update_interval}
accuracy_decimals: 0
icon: mdi:alert-circle-outline
filters:
- or:
- throttle: 10s
- delta: 1
lambda: return 0;
text_sensor:
- platform: jbd_bms
jbd_bms_id: jbd_bms${bms_id}
errors:
name: "${name} ${bms_name} errors"
operation_status:
name: "${name} ${bms_name} operation status"
device_model:
name: "${name} ${bms_name} device model"
+24 -22
View File
@@ -1,5 +1,5 @@
# Updated : 2024.10.03
# Version : 1.2.3
# Updated : 2024.11.11
# Version : 1.2.4
# GitHub : https://github.com/syssi/esphome-jk-bms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -24,10 +24,7 @@ substitutions:
packages:
bms_base: !include bms_base.yaml
bms_combine: !include bms_combine.yaml
external_components:
- source: github://syssi/esphome-jk-bms@main
refresh: 0s
bms_temperature_sensor: !include bms_temperature_sensor_2.yaml
ota:
on_begin:
@@ -36,9 +33,13 @@ ota:
- logger.log: "BLE shutdown for flashing"
# +--------------------------------------+
# | JK-BMS BLE connection |
# | Component settings |
# +--------------------------------------+
external_components:
- source: github://syssi/esphome-jk-bms@main
refresh: 0s
esp32_ble_tracker:
scan_parameters:
active: false
@@ -57,43 +58,44 @@ esp32_ble_tracker:
ble_client:
- mac_address: ${bms_ble_mac_address}
id: client_bms${bms_id}
id: ble_client${bms_id}
jk_bms_ble:
- ble_client_id: client_bms${bms_id}
- ble_client_id: ble_client${bms_id}
protocol_version: ${bms_ble_protocol_version}
throttle: ${bms_update_interval}
id: bms${bms_id}
id: jk_bms_ble${bms_id}
# +--------------------------------------+
# | Component entities |
# +--------------------------------------+
binary_sensor:
- platform: jk_bms_ble
jk_bms_ble_id: bms${bms_id}
jk_bms_ble_id: jk_bms_ble${bms_id}
balancing:
id: bms${bms_id}_equalizing
name: "${name} ${bms_name} balancing"
charging:
id: bms${bms_id}_charging_allowed
name: "${name} ${bms_name} charging"
discharging:
id: bms${bms_id}_discharging_allowed
name: "${name} ${bms_name} discharging"
online_status:
name: "${name} ${bms_name} Online Status"
id: bms${bms_id}_online_status
name: "${name} ${bms_name} online status"
# Commits 2024.01.27 : Expose heating status/current (ALL)
heating:
name: "${name} ${bms_name} heating"
switch:
- platform: jk_bms_ble
jk_bms_ble_id: bms${bms_id}
jk_bms_ble_id: jk_bms_ble${bms_id}
charging:
id: bms${bms_id}_switch_charging
name: "${name} ${bms_name} Charge switch"
discharging:
id: bms${bms_id}_switch_discharging
name: "${name} ${bms_name} Discharge switch"
balancer:
id: bms${bms_id}_switch_balancing
name: "${name} ${bms_name} Balance switch"
# Commits 2024.01.20 : Add new switch entities of firmware version 14 (from V11)
heating:
@@ -109,14 +111,14 @@ switch:
# +--------------------------------------+
- platform: ble_client
ble_client_id: client_bms${bms_id}
ble_client_id: ble_client${bms_id}
id: bms${bms_id}_enable_bluetooth_connection
name: "${name} ${bms_name} Enable Bluetooth connection"
# +--------------------------------------+
sensor:
- platform: jk_bms_ble
jk_bms_ble_id: bms${bms_id}
jk_bms_ble_id: jk_bms_ble${bms_id}
min_cell_voltage:
id: bms${bms_id}_min_cell_voltage
name: "${name} ${bms_name} min cell voltage"
@@ -318,7 +320,7 @@ sensor:
text_sensor:
- platform: jk_bms_ble
jk_bms_ble_id: bms${bms_id}
jk_bms_ble_id: jk_bms_ble${bms_id}
errors:
name: "${name} ${bms_name} errors"
entity_category: diagnostic
@@ -328,7 +330,7 @@ text_sensor:
number:
- platform: jk_bms_ble
jk_bms_ble_id: bms${bms_id}
jk_bms_ble_id: jk_bms_ble${bms_id}
cell_count:
id: bms${bms_id}_cell_count
name: "${name} ${bms_name} cell count"
@@ -414,7 +416,7 @@ number:
button:
- platform: jk_bms_ble
jk_bms_ble_id: bms${bms_id}
jk_bms_ble_id: jk_bms_ble${bms_id}
retrieve_settings:
name: "${name} ${bms_name} retrieve settings"
entity_category: config
+24 -21
View File
@@ -1,5 +1,5 @@
# Updated : 2024.10.03
# Version : 1.2.3
# Updated : 2024.11.11
# Version : 1.2.4
# GitHub : https://github.com/syssi/esphome-jk-bms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -24,10 +24,7 @@ substitutions:
packages:
bms_base: !include bms_base.yaml
bms_combine: !include bms_combine.yaml
external_components:
- source: github://syssi/esphome-jk-bms@main
refresh: 0s
bms_temperature_sensor: !include bms_temperature_sensor_2.yaml
ota:
on_begin:
@@ -36,9 +33,13 @@ ota:
- logger.log: "BLE shutdown for flashing"
# +--------------------------------------+
# | JK-BMS BLE connection |
# | Component settings |
# +--------------------------------------+
external_components:
- source: github://syssi/esphome-jk-bms@main
refresh: 0s
esp32_ble_tracker:
scan_parameters:
active: false
@@ -57,51 +58,53 @@ esp32_ble_tracker:
ble_client:
- mac_address: ${bms_ble_mac_address}
id: client_bms${bms_id}
id: ble_client${bms_id}
jk_bms_ble:
- ble_client_id: client_bms${bms_id}
- ble_client_id: ble_client${bms_id}
protocol_version: ${bms_ble_protocol_version}
throttle: ${bms_update_interval}
id: bms${bms_id}
id: jk_bms_ble${bms_id}
# +--------------------------------------+
# | Component entities |
# +--------------------------------------+
binary_sensor:
- platform: jk_bms_ble
jk_bms_ble_id: bms${bms_id}
jk_bms_ble_id: jk_bms_ble${bms_id}
balancing:
id: bms${bms_id}_equalizing
name: "${name} ${bms_name} balancing"
charging:
id: bms${bms_id}_charging_allowed
name: "${name} ${bms_name} charging"
discharging:
id: bms${bms_id}_discharging_allowed
name: "${name} ${bms_name} discharging"
online_status:
name: "${name} ${bms_name} Online Status"
id: bms${bms_id}_online_status
name: "${name} ${bms_name} online status"
switch:
- platform: jk_bms_ble
jk_bms_ble_id: bms${bms_id}
jk_bms_ble_id: jk_bms_ble${bms_id}
charging:
id: bms${bms_id}_switch_charging
name: "${name} ${bms_name} Charge switch"
discharging:
id: bms${bms_id}_switch_discharging
name: "${name} ${bms_name} Discharge switch"
balancer:
id: bms${bms_id}_switch_balancing
name: "${name} ${bms_name} Balance switch"
# +--------------------------------------+
- platform: ble_client
ble_client_id: client_bms${bms_id}
ble_client_id: ble_client${bms_id}
id: bms${bms_id}_enable_bluetooth_connection
name: "${name} ${bms_name} Enable Bluetooth connection"
# +--------------------------------------+
sensor:
- platform: jk_bms_ble
jk_bms_ble_id: bms${bms_id}
jk_bms_ble_id: jk_bms_ble${bms_id}
min_cell_voltage:
id: bms${bms_id}_min_cell_voltage
name: "${name} ${bms_name} min cell voltage"
@@ -287,7 +290,7 @@ sensor:
text_sensor:
- platform: jk_bms_ble
jk_bms_ble_id: bms${bms_id}
jk_bms_ble_id: jk_bms_ble${bms_id}
errors:
name: "${name} ${bms_name} errors"
total_runtime_formatted:
@@ -296,7 +299,7 @@ text_sensor:
number:
- platform: jk_bms_ble
jk_bms_ble_id: bms${bms_id}
jk_bms_ble_id: jk_bms_ble${bms_id}
cell_count:
id: bms${bms_id}_cell_count
name: "${name} ${bms_name} cell count"
@@ -337,7 +340,7 @@ number:
button:
- platform: jk_bms_ble
jk_bms_ble_id: bms${bms_id}
jk_bms_ble_id: jk_bms_ble${bms_id}
retrieve_settings:
name: "${name} ${bms_name} retrieve settings"
entity_category: config
+24 -21
View File
@@ -1,5 +1,5 @@
# Updated : 2024.10.03
# Version : 1.2.3
# Updated : 2024.11.11
# Version : 1.2.4
# GitHub : https://github.com/syssi/esphome-jk-bms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -24,10 +24,7 @@ substitutions:
packages:
bms_base: !include bms_base.yaml
bms_combine: !include bms_combine.yaml
external_components:
- source: github://syssi/esphome-jk-bms@main
refresh: 0s
bms_temperature_sensor: !include bms_temperature_sensor_2.yaml
ota:
on_begin:
@@ -36,9 +33,13 @@ ota:
- logger.log: "BLE shutdown for flashing"
# +--------------------------------------+
# | JK-BMS BLE connection |
# | Component settings |
# +--------------------------------------+
external_components:
- source: github://syssi/esphome-jk-bms@main
refresh: 0s
esp32_ble_tracker:
scan_parameters:
active: false
@@ -57,51 +58,53 @@ esp32_ble_tracker:
ble_client:
- mac_address: ${bms_ble_mac_address}
id: client_bms${bms_id}
id: ble_client${bms_id}
jk_bms_ble:
- ble_client_id: client_bms${bms_id}
- ble_client_id: ble_client${bms_id}
protocol_version: ${bms_ble_protocol_version}
throttle: ${bms_update_interval}
id: bms${bms_id}
id: jk_bms_ble${bms_id}
# +--------------------------------------+
# | Component entities |
# +--------------------------------------+
binary_sensor:
- platform: jk_bms_ble
jk_bms_ble_id: bms${bms_id}
jk_bms_ble_id: jk_bms_ble${bms_id}
balancing:
id: bms${bms_id}_equalizing
name: "${name} ${bms_name} balancing"
charging:
id: bms${bms_id}_charging_allowed
name: "${name} ${bms_name} charging"
discharging:
id: bms${bms_id}_discharging_allowed
name: "${name} ${bms_name} discharging"
online_status:
name: "${name} ${bms_name} Online Status"
id: bms${bms_id}_online_status
name: "${name} ${bms_name} online status"
switch:
- platform: jk_bms_ble
jk_bms_ble_id: bms${bms_id}
jk_bms_ble_id: jk_bms_ble${bms_id}
charging:
id: bms${bms_id}_switch_charging
name: "${name} ${bms_name} Charge switch"
discharging:
id: bms${bms_id}_switch_discharging
name: "${name} ${bms_name} Discharge switch"
balancer:
id: bms${bms_id}_switch_balancing
name: "${name} ${bms_name} Balance switch"
# +--------------------------------------+
- platform: ble_client
ble_client_id: client_bms${bms_id}
ble_client_id: ble_client${bms_id}
id: bms${bms_id}_enable_bluetooth_connection
name: "${name} ${bms_name} Enable Bluetooth connection"
# +--------------------------------------+
sensor:
- platform: jk_bms_ble
jk_bms_ble_id: bms${bms_id}
jk_bms_ble_id: jk_bms_ble${bms_id}
min_cell_voltage:
id: bms${bms_id}_min_cell_voltage
name: "${name} ${bms_name} min cell voltage"
@@ -165,7 +168,7 @@ sensor:
text_sensor:
- platform: jk_bms_ble
jk_bms_ble_id: bms${bms_id}
jk_bms_ble_id: jk_bms_ble${bms_id}
errors:
name: "${name} ${bms_name} errors"
entity_category: diagnostic
@@ -175,7 +178,7 @@ text_sensor:
number:
- platform: jk_bms_ble
jk_bms_ble_id: bms${bms_id}
jk_bms_ble_id: jk_bms_ble${bms_id}
cell_count:
id: bms${bms_id}_cell_count
name: "${name} ${bms_name} cell count"
@@ -208,7 +211,7 @@ number:
button:
- platform: jk_bms_ble
jk_bms_ble_id: bms${bms_id}
jk_bms_ble_id: jk_bms_ble${bms_id}
retrieve_settings:
name: "${name} ${bms_name} retrieve settings"
entity_category: config
+41 -21
View File
@@ -1,5 +1,5 @@
# Updated : 2024.10.03
# Version : 1.2.3
# Updated : 2024.11.11
# Version : 1.2.4
# GitHub : https://github.com/syssi/esphome-jk-bms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -24,10 +24,7 @@ substitutions:
packages:
bms_base: !include bms_base.yaml
bms_combine: !include bms_combine.yaml
external_components:
- source: github://syssi/esphome-jk-bms@main
refresh: 0s
bms_temperature_sensor: !include bms_temperature_sensor_2.yaml
ota:
on_begin:
@@ -36,9 +33,13 @@ ota:
- logger.log: "BLE shutdown for flashing"
# +--------------------------------------+
# | JK-BMS BLE connection |
# | Component settings |
# +--------------------------------------+
external_components:
- source: github://syssi/esphome-jk-bms@main
refresh: 0s
esp32_ble_tracker:
scan_parameters:
active: false
@@ -57,51 +58,53 @@ esp32_ble_tracker:
ble_client:
- mac_address: ${bms_ble_mac_address}
id: client_bms${bms_id}
id: ble_client${bms_id}
jk_bms_ble:
- ble_client_id: client_bms${bms_id}
- ble_client_id: ble_client${bms_id}
protocol_version: ${bms_ble_protocol_version}
throttle: ${bms_update_interval}
id: bms${bms_id}
id: jk_bms_ble${bms_id}
# +--------------------------------------+
# | Component entities |
# +--------------------------------------+
binary_sensor:
- platform: jk_bms_ble
jk_bms_ble_id: bms${bms_id}
jk_bms_ble_id: jk_bms_ble${bms_id}
balancing:
id: bms${bms_id}_equalizing
name: "${name} ${bms_name} balancing"
charging:
id: bms${bms_id}_charging_allowed
name: "${name} ${bms_name} charging"
discharging:
id: bms${bms_id}_discharging_allowed
name: "${name} ${bms_name} discharging"
online_status:
name: "${name} ${bms_name} Online Status"
id: bms${bms_id}_online_status
name: "${name} ${bms_name} online status"
switch:
- platform: jk_bms_ble
jk_bms_ble_id: bms${bms_id}
jk_bms_ble_id: jk_bms_ble${bms_id}
charging:
id: bms${bms_id}_switch_charging
name: "${name} ${bms_name} Charge switch"
discharging:
id: bms${bms_id}_switch_discharging
name: "${name} ${bms_name} Discharge switch"
balancer:
id: bms${bms_id}_switch_balancing
name: "${name} ${bms_name} Balance switch"
# +--------------------------------------+
- platform: ble_client
ble_client_id: client_bms${bms_id}
ble_client_id: ble_client${bms_id}
id: bms${bms_id}_enable_bluetooth_connection
name: "${name} ${bms_name} Enable Bluetooth connection"
# +--------------------------------------+
sensor:
- platform: jk_bms_ble
jk_bms_ble_id: bms${bms_id}
jk_bms_ble_id: jk_bms_ble${bms_id}
min_cell_voltage:
id: bms${bms_id}_min_cell_voltage
name: "${name} ${bms_name} min cell voltage"
@@ -245,7 +248,7 @@ sensor:
text_sensor:
- platform: jk_bms_ble
jk_bms_ble_id: bms${bms_id}
jk_bms_ble_id: jk_bms_ble${bms_id}
errors:
name: "${name} ${bms_name} errors"
entity_category: diagnostic
@@ -255,7 +258,7 @@ text_sensor:
number:
- platform: jk_bms_ble
jk_bms_ble_id: bms${bms_id}
jk_bms_ble_id: jk_bms_ble${bms_id}
cell_count:
id: bms${bms_id}_cell_count
name: "${name} ${bms_name} cell count"
@@ -285,10 +288,27 @@ number:
balance_trigger_voltage:
id: bms${bms_id}_balance_trigger_voltage
name: "${name} ${bms_name} balance trigger voltage"
# Added 2024.11.11
charge_overtemperature_protection:
name: "${name} ${bms_name} charge overtemperature protection"
charge_overtemperature_protection_recovery:
name: "${name} ${bms_name} charge overtemperature protection recovery"
discharge_overtemperature_protection:
name: "${name} ${bms_name} discharge overtemperature protection"
discharge_overtemperature_protection_recovery:
name: "${name} ${bms_name} discharge overtemperature protection recovery"
charge_undertemperature_protection:
name: "${name} ${bms_name} charge undertemperature protection"
charge_undertemperature_protection_recovery:
name: "${name} ${bms_name} charge undertemperature protection recovery"
power_tube_overtemperature_protection:
name: "${name} ${bms_name} power tube overtemperature protection"
power_tube_overtemperature_protection_recovery:
name: "${name} ${bms_name} power tube overtemperature protection recovery"
button:
- platform: jk_bms_ble
jk_bms_ble_id: bms${bms_id}
jk_bms_ble_id: jk_bms_ble${bms_id}
retrieve_settings:
name: "${name} ${bms_name} retrieve settings"
entity_category: config
@@ -0,0 +1,351 @@
# Updated : 2024.11.11
# 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-B"
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
# +--------------------------------------+
# | DISPLAY port schematic |
# +--------------------------------------+
# JK-B2A8S20P
# │ JK-B2A8S20P │
# │ │
# │ Temp CAN GPS Display Balancer │
# └──[oooo]──[ooo]──[oooo]──[oooooo]──[oooooooooo]──┘
# ││││││
# │││││└─ K-
# ││││└── K+
# │││└─── GND ( not common with B- , isolated ? )
# ││└──── B
# │└───── A
# └────── VCC = +/- 11.5V
# JK-BD6A2xS10P, JK-BxA24SxxP
# │ JK-BD6A2xS10P, JK-BxA24SxxP │
# │ │
# │ CAN GPS Display Heat │
# └────[ooo]─[oooo]───[oooooo]───[ooooooo]──────────┘
# ││││││
# │││││└─ VCC ┌───────────────┐ ┌─────────────────┐
# ││││└── A ────────│A+ GND│────────│GND │
# │││└─── B ────────│B- RS485 RXD│────────│RX ESP32/ │
# ││└──── GND │ to TTL TXD│ │TX ESP8266 GND│──────
# │└───── K+ │ module VCC│────────│5V VCC│──────
# └────── K- └───────────────┘ └─────────────────┘
# Power Button
# K- o-------[ 100kΩ ]-----o /
# /---|
# K+ o---------------------o/
# +--------------------------------------+
# | Component settings |
# +--------------------------------------+
external_components:
- source: github://syssi/esphome-jk-bms@main
refresh: 0s
uart:
- id: !extend ${bms_uart_id}
baud_rate: 2400
jk_bms_display:
- id: jk_bms_display${bms_id}
uart_id: ${bms_uart_id}
# +--------------------------------------+
# | Component entities |
# +--------------------------------------+
binary_sensor:
- platform: jk_bms_display
jk_bms_display_id: jk_bms_display${bms_id}
system_warning:
name: "${name} ${bms_name} system warning"
balancing_switch:
name: "${name} ${bms_name} balancing switch"
charging:
id: bms${bms_id}_charging_allowed
name: "${name} ${bms_name} charging"
discharging:
id: bms${bms_id}_discharging_allowed
name: "${name} ${bms_name} discharging"
cell_voltage_undervoltage_protection:
name: "${name} ${bms_name} cell voltage undervoltage protection"
cell_voltage_overvoltage_protection:
name: "${name} ${bms_name} cell voltage overvoltage protection"
overcurrent_protection:
name: "${name} ${bms_name} overcurrent protection"
mosfet_overtemperature_protection:
name: "${name} ${bms_name} mosfet overtemperature protection"
battery_temperature_protection:
name: "${name} ${bms_name} battery temperature protection"
short_circuit_protection:
name: "${name} ${bms_name} short circuit protection"
coprocessor_communication_error:
name: "${name} ${bms_name} coprocessor communication error"
balancer_wire_resistance_too_high:
name: "${name} ${bms_name} balancer wire resistance too high"
cell_count_mismatch:
name: "${name} ${bms_name} cell count mismatch"
# Required sensors cannot be retrieved from BMS
# online_status
- platform: template
id: bms${bms_id}_online_status
name: "${name} ${bms_name} online status"
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} balancing"
lambda: return false;
sensor:
- platform: jk_bms_display
jk_bms_display_id: jk_bms_display${bms_id}
total_voltage:
id: bms${bms_id}_total_voltage
name: "${name} ${bms_name} total voltage"
current:
id: bms${bms_id}_current
name: "${name} ${bms_name} current"
power:
id: bms${bms_id}_power
name: "${name} ${bms_name} power"
charging_power:
id: bms${bms_id}_charging_power
name: "${name} ${bms_name} charging power"
discharging_power:
id: bms${bms_id}_discharging_power
name: "${name} ${bms_name} discharging power"
min_cell_voltage:
id: bms${bms_id}_min_cell_voltage
name: "${name} ${bms_name} min cell voltage"
max_cell_voltage:
id: bms${bms_id}_max_cell_voltage
name: "${name} ${bms_name} max cell voltage"
min_voltage_cell:
id: bms${bms_id}_min_voltage_cell
name: "${name} ${bms_name} min voltage cell"
max_voltage_cell:
id: bms${bms_id}_max_voltage_cell
name: "${name} ${bms_name} max voltage cell"
state_of_charge:
id: bms${bms_id}_state_of_charge
name: "${name} ${bms_name} state of charge"
delta_cell_voltage:
name: "${name} ${bms_name} delta cell voltage"
mosfet_temperature:
id: bms${bms_id}_temperature_sensor_1
name: "${name} ${bms_name} mosfet temperature"
battery_temperature:
id: bms${bms_id}_temperature_sensor_2
name: "${name} ${bms_name} battery temperature"
average_cell_voltage:
name: "${name} ${bms_name} average cell voltage"
cell_voltage_1:
name: "${name} ${bms_name} cell voltage 01"
cell_voltage_2:
name: "${name} ${bms_name} cell voltage 02"
cell_voltage_3:
name: "${name} ${bms_name} cell voltage 03"
cell_voltage_4:
name: "${name} ${bms_name} cell voltage 04"
cell_voltage_5:
name: "${name} ${bms_name} cell voltage 05"
cell_voltage_6:
name: "${name} ${bms_name} cell voltage 06"
cell_voltage_7:
name: "${name} ${bms_name} cell voltage 07"
cell_voltage_8:
name: "${name} ${bms_name} cell voltage 08"
cell_voltage_9:
name: "${name} ${bms_name} cell voltage 09"
cell_voltage_10:
name: "${name} ${bms_name} cell voltage 10"
cell_voltage_11:
name: "${name} ${bms_name} cell voltage 11"
cell_voltage_12:
name: "${name} ${bms_name} cell voltage 12"
cell_voltage_13:
name: "${name} ${bms_name} cell voltage 13"
cell_voltage_14:
name: "${name} ${bms_name} cell voltage 14"
cell_voltage_15:
name: "${name} ${bms_name} cell voltage 15"
cell_voltage_16:
name: "${name} ${bms_name} cell voltage 16"
# cell_voltage_17:
# name: "${name} ${bms_name} cell voltage 17"
# cell_voltage_18:
# name: "${name} ${bms_name} cell voltage 18"
# cell_voltage_19:
# name: "${name} ${bms_name} cell voltage 19"
# cell_voltage_20:
# name: "${name} ${bms_name} cell voltage 20"
# cell_voltage_21:
# name: "${name} ${bms_name} cell voltage 21"
# cell_voltage_22:
# name: "${name} ${bms_name} cell voltage 22"
# cell_voltage_23:
# name: "${name} ${bms_name} cell voltage 23"
# cell_voltage_24:
# name: "${name} ${bms_name} cell voltage 24"
# Required sensors cannot be retrieved from BMS
# battery_capacity
- platform: template
id: bms${bms_id}_battery_capacity
name: "${name} ${bms_name} Battery Capacity"
update_interval: ${bms_update_interval}
accuracy_decimals: 0
unit_of_measurement: Ah
device_class: energy_storage
filters:
- or:
- throttle: 10s
- delta: 1
lambda: return ${bms_battery_capacity};
# capacity_remaining_ah
- platform: template
id: bms${bms_id}_capacity_remaining_ah
name: "${name} ${bms_name} Capacity Remaining"
update_interval: ${bms_update_interval}
accuracy_decimals: 0
unit_of_measurement: Ah
device_class: energy_storage
filters:
- or:
- throttle: 10s
- delta: 1
lambda: return (id(bms${bms_id}_battery_capacity).state * id(bms${bms_id}_state_of_charge).state / 100);
# max_charge_current
- platform: template
id: bms${bms_id}_max_charge_current
name: "${name} ${bms_name} max charge current"
update_interval: ${bms_update_interval}
accuracy_decimals: 0
unit_of_measurement: A
icon: mdi:current-dc
filters:
- or:
- throttle: 10s
- delta: 1
lambda: return ${bms_max_charge_current};
# max_discharge_current
- platform: template
id: bms${bms_id}_max_discharge_current
name: "${name} ${bms_name} max discharge current"
update_interval: ${bms_update_interval}
accuracy_decimals: 0
unit_of_measurement: A
icon: mdi:current-dc
filters:
- or:
- throttle: 10s
- delta: 1
lambda: return ${bms_max_discharge_current};
# cell_ovp
- platform: template
id: bms${bms_id}_cell_ovp
name: "${name} ${bms_name} cell ovp"
update_interval: ${bms_update_interval}
accuracy_decimals: 3
unit_of_measurement: V
device_class: voltage
filters:
- or:
- throttle: 10s
- delta: 0.001
lambda: return ${bms_cell_ovp};
# cell_uvp
- platform: template
id: bms${bms_id}_cell_uvp
name: "${name} ${bms_name} cell uvp"
update_interval: ${bms_update_interval}
accuracy_decimals: 3
unit_of_measurement: V
device_class: voltage
filters:
- or:
- throttle: 10s
- delta: 0.001
lambda: return ${bms_cell_uvp};
# balance_trigger_voltage
- platform: template
id: bms${bms_id}_balance_trigger_voltage
name: "${name} ${bms_name} balance trigger voltage"
update_interval: ${bms_update_interval}
accuracy_decimals: 3
unit_of_measurement: V
device_class: voltage
filters:
- or:
- throttle: 10s
- delta: 0.001
lambda: return 0.005;
# FAKE charging_cycles
- platform: template
id: bms${bms_id}_charging_cycles
name: "${name} ${bms_name} charging cycles"
update_interval: ${bms_update_interval}
accuracy_decimals: 0
icon: mdi:counter
filters:
- or:
- throttle: 10s
- delta: 1
lambda: return 0;
# FAKE errors_bitmask
# Alarm management is not supported at this time
# Internal : only specifying an id without a name will implicitly set this to true.
- platform: template
id: bms${bms_id}_errors_bitmask
update_interval: ${bms_update_interval}
accuracy_decimals: 0
icon: mdi:alert-circle-outline
filters:
- or:
- throttle: 10s
- delta: 1
lambda: return 0;
+29 -16
View File
@@ -1,5 +1,5 @@
# Updated : 2024.10.03
# Version : 1.2.3
# Updated : 2024.11.11
# Version : 1.2.4
# GitHub : https://github.com/syssi/esphome-jk-bms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -24,51 +24,64 @@ substitutions:
packages:
bms_base: !include bms_base.yaml
bms_combine: !include bms_combine.yaml
bms_temperature_sensor: !include bms_temperature_sensor_2.yaml
# +--------------------------------------+
# | Component settings |
# +--------------------------------------+
external_components:
- source: github://syssi/esphome-jk-bms@main
refresh: 0s
# +--------------------------------------+
# | JK-BMS UART connection |
# +--------------------------------------+
jk_modbus:
- id: modbus_bms${bms_id}
- id: jk_modbus${bms_id}
uart_id: ${bms_uart_id}
jk_bms:
- id: bms${bms_id}
jk_modbus_id: modbus_bms${bms_id}
- id: jk_bms${bms_id}
jk_modbus_id: jk_modbus${bms_id}
update_interval: ${bms_update_interval}
# +--------------------------------------+
# | Component entities |
# +--------------------------------------+
binary_sensor:
- platform: jk_bms
jk_bms_id: bms${bms_id}
jk_bms_id: jk_bms${bms_id}
balancing:
id: bms${bms_id}_equalizing
name: "${name} ${bms_name} balancing"
balancing_switch:
id: bms${bms_id}_switch_balancing
name: "${name} ${bms_name} balancing switch"
charging:
id: bms${bms_id}_charging_allowed
name: "${name} ${bms_name} charging"
charging_switch:
id: bms${bms_id}_switch_charging
name: "${name} ${bms_name} charging switch"
discharging:
id: bms${bms_id}_discharging_allowed
name: "${name} ${bms_name} discharging"
discharging_switch:
id: bms${bms_id}_switch_discharging
name: "${name} ${bms_name} discharging switch"
dedicated_charger_switch:
name: "${name} ${bms_name} dedicated charger switch"
# Required sensors cannot be retrieved from BMS
# online_status
- platform: template
id: bms${bms_id}_online_status
name: "${name} ${bms_name} online status"
lambda: |-
if (id(bms${bms_id}_total_voltage).state > 0)
return true;
else
return false;
switch:
- platform: jk_bms
jk_bms_id: bms${bms_id}
jk_bms_id: jk_bms${bms_id}
charging:
name: "${name} ${bms_name} Charge switch"
discharging:
@@ -77,7 +90,7 @@ switch:
sensor:
- platform: jk_bms
jk_bms_id: bms${bms_id}
jk_bms_id: jk_bms${bms_id}
min_cell_voltage:
id: bms${bms_id}_min_cell_voltage
name: "${name} ${bms_name} min cell voltage"
@@ -307,7 +320,7 @@ sensor:
text_sensor:
- platform: jk_bms
jk_bms_id: bms${bms_id}
jk_bms_id: jk_bms${bms_id}
errors:
name: "${name} ${bms_name} errors"
entity_category: diagnostic
+18 -16
View File
@@ -1,5 +1,5 @@
# Updated : 2024.10.03
# Version : 1.2.3
# Updated : 2024.11.11
# Version : 1.2.4
# GitHub : https://github.com/syssi/esphome-jk-bms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -24,51 +24,53 @@ substitutions:
packages:
bms_base: !include bms_base.yaml
bms_combine: !include bms_combine.yaml
bms_temperature_sensor: !include bms_temperature_sensor_2.yaml
# +--------------------------------------+
# | Component settings |
# +--------------------------------------+
external_components:
- source: github://syssi/esphome-jk-bms@main
refresh: 0s
# +--------------------------------------+
# | JK-BMS UART connection |
# +--------------------------------------+
jk_modbus:
- id: modbus_bms${bms_id}
- id: jk_modbus${bms_id}
uart_id: ${bms_uart_id}
jk_bms:
- id: bms${bms_id}
jk_modbus_id: modbus_bms${bms_id}
- id: jk_bms${bms_id}
jk_modbus_id: jk_modbus${bms_id}
update_interval: ${bms_update_interval}
# +--------------------------------------+
# | Component entities |
# +--------------------------------------+
binary_sensor:
- platform: jk_bms
jk_bms_id: bms${bms_id}
jk_bms_id: jk_bms${bms_id}
balancing:
id: bms${bms_id}_equalizing
name: "${name} ${bms_name} balancing"
balancing_switch:
id: bms${bms_id}_switch_balancing
name: "${name} ${bms_name} balancing switch"
charging:
id: bms${bms_id}_charging_allowed
name: "${name} ${bms_name} charging"
charging_switch:
id: bms${bms_id}_switch_charging
name: "${name} ${bms_name} charging switch"
discharging:
id: bms${bms_id}_discharging_allowed
name: "${name} ${bms_name} discharging"
discharging_switch:
id: bms${bms_id}_switch_discharging
name: "${name} ${bms_name} discharging switch"
dedicated_charger_switch:
name: "${name} ${bms_name} dedicated charger switch"
switch:
- platform: jk_bms
jk_bms_id: bms${bms_id}
jk_bms_id: jk_bms${bms_id}
charging:
name: "${name} ${bms_name} Charge switch"
discharging:
@@ -77,7 +79,7 @@ switch:
sensor:
- platform: jk_bms
jk_bms_id: bms${bms_id}
jk_bms_id: jk_bms${bms_id}
min_cell_voltage:
id: bms${bms_id}_min_cell_voltage
name: "${name} ${bms_name} min cell voltage"
@@ -207,7 +209,7 @@ sensor:
text_sensor:
- platform: jk_bms
jk_bms_id: bms${bms_id}
jk_bms_id: jk_bms${bms_id}
errors:
name: "${name} ${bms_name} errors"
entity_category: diagnostic
+22 -14
View File
@@ -1,5 +1,5 @@
# Updated : 2024.08.08
# Version : 1.2.1
# Updated : 2024.11.11
# Version : 1.2.2
# GitHub : https://github.com/txubelaxu/esphome-jk-bms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -20,23 +20,30 @@
packages:
bms_base: !include bms_base.yaml
bms_combine: !include bms_combine.yaml
bms_temperature_sensor: !include bms_temperature_sensor_5.yaml
# +--------------------------------------+
# | Component settings |
# +--------------------------------------+
jk_rs485_bms:
- id: bms${bms_id}
- id: jk_rs485_bms${bms_id}
rs485_address: ${bms_rs485_address}
jk_rs485_sniffer_id: ${sniffer_id}
update_interval: ${bms_update_interval}
# +--------------------------------------+
# | Component entities |
# +--------------------------------------+
switch:
- platform: jk_rs485_bms
jk_rs485_bms_id: bms${bms_id}
jk_rs485_bms_id: jk_rs485_bms${bms_id}
precharging:
name: "${name} ${bms_name} precharging"
charging:
id: bms${bms_id}_switch_charging
name: "${name} ${bms_name} charging"
discharging:
id: bms${bms_id}_switch_discharging
name: "${name} ${bms_name} discharging"
balancing:
id: bms${bms_id}_switch_balancing
@@ -66,17 +73,20 @@ switch:
binary_sensor:
- platform: jk_rs485_bms
jk_rs485_bms_id: bms${bms_id}
jk_rs485_bms_id: jk_rs485_bms${bms_id}
status_balancing:
id: bms${bms_id}_equalizing
name: "${name} ${bms_name} status balancing"
status_precharging:
name: "${name} ${bms_name} status precharging"
status_charging:
id: bms${bms_id}_charging_allowed
name: "${name} ${bms_name} status charging"
status_discharging:
id: bms${bms_id}_discharging_allowed
name: "${name} ${bms_name} status discharging"
status_online:
id: bms${bms_id}_online_status
name: "${name} ${bms_name} status online"
status_heating:
name: "${name} ${bms_name} status heating"
@@ -143,7 +153,7 @@ binary_sensor:
sensor:
- platform: jk_rs485_bms
jk_rs485_bms_id: bms${bms_id}
jk_rs485_bms_id: jk_rs485_bms${bms_id}
balancing_direction:
name: "${name} ${bms_name} balancing direction"
cell_voltage_min:
@@ -354,7 +364,7 @@ sensor:
text_sensor:
- platform: jk_rs485_bms
jk_rs485_bms_id: bms${bms_id}
jk_rs485_bms_id: jk_rs485_bms${bms_id}
errors:
name: "${name} ${bms_name} errors"
operation_status:
@@ -382,10 +392,9 @@ text_sensor:
number:
- platform: jk_rs485_bms
jk_rs485_bms_id: bms${bms_id}
jk_rs485_bms_id: jk_rs485_bms${bms_id}
cell_smart_sleep_voltage:
name: "${name} ${bms_name} cell smart sleep voltage"
cell_overvoltage_protection:
id: bms${bms_id}_cell_ovp
name: "${name} ${bms_name} cell overvoltage protection"
@@ -412,6 +421,7 @@ number:
cell_soc0_voltage:
name: "${name} ${bms_name} cell soc0 voltage"
cell_undervoltage_protection:
id: bms${bms_id}_cell_uvp
name: "${name} ${bms_name} cell undervoltage protection"
cell_undervoltage_protection_recovery:
id: bms${bms_id}_cell_uvpr
@@ -421,11 +431,9 @@ number:
cell_count_settings:
id: bms${bms_id}_cell_count
name: "${name} ${bms_name} cell count settings"
battery_capacity_total_settings:
id: bms${bms_id}_battery_capacity
name: "${name} ${bms_name} battery capacity total setting"
max_charging_current:
id: bms${bms_id}_max_charge_current
name: "${name} ${bms_name} max charging current"
@@ -461,4 +469,4 @@ number:
mos_overtemperature_protection:
name: "${name} ${bms_name} mos overtemperature protection"
mos_overtemperature_protection_recovery:
name: "${name} ${bms_name} mos overtemperature protection recovery"
name: "${name} ${bms_name} mos overtemperature protection recovery"
+21 -10
View File
@@ -1,5 +1,5 @@
# Updated : 2024.08.08
# Version : 1.2.1
# Updated : 2024.11.11
# Version : 1.2.2
# GitHub : https://github.com/txubelaxu/esphome-jk-bms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -20,23 +20,30 @@
packages:
bms_base: !include bms_base.yaml
bms_combine: !include bms_combine.yaml
bms_temperature_sensor: !include bms_temperature_sensor_5.yaml
# +--------------------------------------+
# | Component settings |
# +--------------------------------------+
jk_rs485_bms:
- id: bms${bms_id}
- id: jk_rs485_bms${bms_id}
rs485_address: ${bms_rs485_address}
jk_rs485_sniffer_id: ${sniffer_id}
update_interval: ${bms_update_interval}
# +--------------------------------------+
# | Component entities |
# +--------------------------------------+
switch:
- platform: jk_rs485_bms
jk_rs485_bms_id: bms${bms_id}
jk_rs485_bms_id: jk_rs485_bms${bms_id}
precharging:
name: "${name} ${bms_name} precharging"
charging:
id: bms${bms_id}_switch_charging
name: "${name} ${bms_name} charging"
discharging:
id: bms${bms_id}_switch_discharging
name: "${name} ${bms_name} discharging"
balancing:
id: bms${bms_id}_switch_balancing
@@ -66,24 +73,27 @@ switch:
binary_sensor:
- platform: jk_rs485_bms
jk_rs485_bms_id: bms${bms_id}
jk_rs485_bms_id: jk_rs485_bms${bms_id}
status_balancing:
id: bms${bms_id}_equalizing
name: "${name} ${bms_name} status balancing"
status_precharging:
name: "${name} ${bms_name} status precharging"
status_charging:
id: bms${bms_id}_charging_allowed
name: "${name} ${bms_name} status charging"
status_discharging:
id: bms${bms_id}_discharging_allowed
name: "${name} ${bms_name} status discharging"
status_online:
id: bms${bms_id}_online_status
name: "${name} ${bms_name} status online"
status_heating:
name: "${name} ${bms_name} status heating"
sensor:
- platform: jk_rs485_bms
jk_rs485_bms_id: bms${bms_id}
jk_rs485_bms_id: jk_rs485_bms${bms_id}
balancing_direction:
name: "${name} ${bms_name} balancing direction"
cell_voltage_min:
@@ -175,7 +185,7 @@ sensor:
text_sensor:
- platform: jk_rs485_bms
jk_rs485_bms_id: bms${bms_id}
jk_rs485_bms_id: jk_rs485_bms${bms_id}
errors:
name: "${name} ${bms_name} errors"
operation_status:
@@ -203,7 +213,7 @@ text_sensor:
number:
- platform: jk_rs485_bms
jk_rs485_bms_id: bms${bms_id}
jk_rs485_bms_id: jk_rs485_bms${bms_id}
cell_smart_sleep_voltage:
name: "${name} ${bms_name} cell smart sleep voltage"
battery_capacity_total_settings:
@@ -236,6 +246,7 @@ number:
cell_soc0_voltage:
name: "${name} ${bms_name} cell soc0 voltage"
cell_undervoltage_protection:
id: bms${bms_id}_cell_uvp
name: "${name} ${bms_name} cell undervoltage protection"
cell_undervoltage_protection_recovery:
id: bms${bms_id}_cell_uvpr
+13 -5
View File
@@ -1,5 +1,5 @@
# Updated : 2024.10.03
# Version : 1.2.4
# Updated : 2024.11.11
# Version : 1.2.5
# GitHub : https://github.com/txubelaxu/esphome-jk-bms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -21,20 +21,28 @@ substitutions:
bms_model: "JK-PB"
bms_protocol: "RS485"
logger:
tx_buffer_size: 1024
# +--------------------------------------+
# | Component settings |
# +--------------------------------------+
external_components:
- source: github://txubelaxu/esphome-jk-bms@main
refresh: 0s
components: [ jk_rs485_sniffer , jk_rs485_bms ]
logger:
tx_buffer_size: 1024
jk_rs485_sniffer:
- id: ${sniffer_id}
protocol_version: ${sniffer_protocol}
rx_timeout: 500ms
uart_id: ${sniffer_uart_id}
# +--------------------------------------+
# | Component entities |
# +--------------------------------------+
switch:
- platform: template
name: ${name} JK-PB RS485 sniffer Broadcast changes to all BMS
@@ -1,5 +1,5 @@
# Updated : 2024.10.03
# Version : 1.2.4
# Updated : 2024.11.11
# Version : 1.2.5
# GitHub : https://github.com/txubelaxu/esphome-jk-bms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -21,14 +21,18 @@ substitutions:
bms_model: "JK-PB"
bms_protocol: "RS485"
logger:
tx_buffer_size: 1024
# +--------------------------------------+
# | Component settings |
# +--------------------------------------+
external_components:
- source: github://txubelaxu/esphome-jk-bms@main
refresh: 0s
components: [ jk_rs485_sniffer , jk_rs485_bms ]
logger:
tx_buffer_size: 1024
jk_rs485_sniffer:
- id: ${sniffer_id}
protocol_version: ${sniffer_protocol}
@@ -36,6 +40,10 @@ jk_rs485_sniffer:
uart_id: ${sniffer_uart_id}
talk_pin: ${sniffer_talk_pin}
# +--------------------------------------+
# | Component entities |
# +--------------------------------------+
switch:
- platform: template
name: ${name} JK-PB RS485 sniffer Broadcast changes to all BMS
@@ -0,0 +1,254 @@
# Updated : 2024.11.11
# Version : 1.1.1
# GitHub : https://github.com/syssi/esphome-seplos-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: "Seplos V1 V2"
bms_protocol: "RS485"
packages:
bms_base: !include bms_base.yaml
bms_combine: !include bms_combine.yaml
bms_temperature_sensor: !include bms_temperature_sensor_4.yaml
# +--------------------------------------+
# | Component settings |
# +--------------------------------------+
external_components:
- source: github://syssi/esphome-seplos-bms@main
refresh: 0s
seplos_bms:
- id: seplos_bms${bms_id}
address: ${bms_rs485_address}
protocol_version: ${bms_protocol_version}
seplos_modbus_id: ${seplos_modbus_id}
update_interval: ${bms_update_interval}
# +--------------------------------------+
# | Component entities |
# +--------------------------------------+
sensor:
- platform: seplos_bms
seplos_bms_id: seplos_bms${bms_id}
min_cell_voltage:
id: bms${bms_id}_min_cell_voltage
name: "${name} ${bms_name} min cell voltage"
max_cell_voltage:
id: bms${bms_id}_max_cell_voltage
name: "${name} ${bms_name} max cell voltage"
min_voltage_cell:
id: bms${bms_id}_min_voltage_cell
name: "${name} ${bms_name} min voltage cell"
max_voltage_cell:
id: bms${bms_id}_max_voltage_cell
name: "${name} ${bms_name} max voltage cell"
delta_cell_voltage:
name: "${name} ${bms_name} delta cell voltage"
average_cell_voltage:
name: "${name} ${bms_name} average cell voltage"
cell_voltage_1:
name: "${name} ${bms_name} cell voltage 01"
cell_voltage_2:
name: "${name} ${bms_name} cell voltage 02"
cell_voltage_3:
name: "${name} ${bms_name} cell voltage 03"
cell_voltage_4:
name: "${name} ${bms_name} cell voltage 04"
cell_voltage_5:
name: "${name} ${bms_name} cell voltage 05"
cell_voltage_6:
name: "${name} ${bms_name} cell voltage 06"
cell_voltage_7:
name: "${name} ${bms_name} cell voltage 07"
cell_voltage_8:
name: "${name} ${bms_name} cell voltage 08"
cell_voltage_9:
name: "${name} ${bms_name} cell voltage 09"
cell_voltage_10:
name: "${name} ${bms_name} cell voltage 10"
cell_voltage_11:
name: "${name} ${bms_name} cell voltage 11"
cell_voltage_12:
name: "${name} ${bms_name} cell voltage 12"
cell_voltage_13:
name: "${name} ${bms_name} cell voltage 13"
cell_voltage_14:
name: "${name} ${bms_name} cell voltage 14"
cell_voltage_15:
name: "${name} ${bms_name} cell voltage 15"
cell_voltage_16:
name: "${name} ${bms_name} cell voltage 16"
temperature_1:
id: bms${bms_id}_temperature_sensor_1
name: "${name} ${bms_name} temperature 1"
temperature_2:
id: bms${bms_id}_temperature_sensor_2
name: "${name} ${bms_name} temperature 2"
temperature_3:
id: bms${bms_id}_temperature_sensor_3
name: "${name} ${bms_name} temperature 3"
temperature_4:
id: bms${bms_id}_temperature_sensor_4
name: "${name} ${bms_name} temperature 4"
temperature_5:
name: "${name} ${bms_name} environment temperature"
temperature_6:
name: "${name} ${bms_name} mosfet temperature"
total_voltage:
id: bms${bms_id}_total_voltage
name: "${name} ${bms_name} total voltage"
current:
id: bms${bms_id}_current
name: "${name} ${bms_name} current"
power:
id: bms${bms_id}_power
name: "${name} ${bms_name} power"
charging_power:
id: bms${bms_id}_charging_power
name: "${name} ${bms_name} charging power"
discharging_power:
id: bms${bms_id}_discharging_power
name: "${name} ${bms_name} discharging power"
residual_capacity:
id: bms${bms_id}_capacity_remaining_ah
name: "${name} ${bms_name} residual capacity"
battery_capacity:
id: bms${bms_id}_battery_capacity
name: "${name} ${bms_name} battery capacity"
rated_capacity:
name: "${name} ${bms_name} rated capacity"
state_of_charge:
id: bms${bms_id}_state_of_charge
name: "${name} ${bms_name} state of charge"
charging_cycles:
id: bms${bms_id}_charging_cycles
name: "${name} ${bms_name} charging cycles"
state_of_health:
name: "${name} ${bms_name} state of health"
port_voltage:
name: "${name} ${bms_name} port voltage"
# Required sensors cannot be retrieved from BMS
# max_charge_current
- platform: template
id: bms${bms_id}_max_charge_current
name: "${name} ${bms_name} max charge current"
update_interval: ${bms_update_interval}
accuracy_decimals: 0
unit_of_measurement: A
icon: mdi:current-dc
filters:
- or:
- throttle: 10s
- delta: 1
lambda: return ${bms_max_charge_current};
# max_discharge_current
- platform: template
id: bms${bms_id}_max_discharge_current
name: "${name} ${bms_name} max discharge current"
update_interval: ${bms_update_interval}
accuracy_decimals: 0
unit_of_measurement: A
icon: mdi:current-dc
filters:
- or:
- throttle: 10s
- delta: 1
lambda: return ${bms_max_discharge_current};
# cell_ovp
- platform: template
id: bms${bms_id}_cell_ovp
name: "${name} ${bms_name} cell ovp"
update_interval: ${bms_update_interval}
accuracy_decimals: 3
unit_of_measurement: V
device_class: voltage
filters:
- or:
- throttle: 10s
- delta: 0.001
lambda: return ${bms_cell_ovp};
# cell_uvp
- platform: template
id: bms${bms_id}_cell_uvp
name: "${name} ${bms_name} cell uvp"
update_interval: ${bms_update_interval}
accuracy_decimals: 3
unit_of_measurement: V
device_class: voltage
filters:
- or:
- throttle: 10s
- delta: 0.001
lambda: return ${bms_cell_uvp};
# balance_trigger_voltage
- platform: template
id: bms${bms_id}_balance_trigger_voltage
name: "${name} ${bms_name} balance trigger voltage"
update_interval: ${bms_update_interval}
accuracy_decimals: 3
unit_of_measurement: V
device_class: voltage
filters:
- or:
- throttle: 10s
- delta: 0.001
lambda: return ${bms_balance_trigger_voltage};
# FAKE errors_bitmask
# Alarm management is not supported at this time
# Internal : only specifying an id without a name will implicitly set this to true.
- platform: template
id: bms${bms_id}_errors_bitmask
update_interval: ${bms_update_interval}
accuracy_decimals: 0
icon: mdi:alert-circle-outline
filters:
- or:
- throttle: 10s
- delta: 1
lambda: return 0;
binary_sensor:
# Required sensors cannot be retrieved from BMS
# Required sensors cannot be retrieved from BMS
# online_status
- platform: template
id: bms${bms_id}_online_status
name: "${name} ${bms_name} online status"
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} balancing"
lambda: return false;
# bms_switch_charging
- platform: template
id: bms${bms_id}_charging_allowed
name: "${name} ${bms_name} charging"
lambda: return true;
# bms_switch_discharging
- platform: template
id: bms${bms_id}_discharging_allowed
name: "${name} ${bms_name} discharging"
lambda: return true;
@@ -0,0 +1,39 @@
# Updated : 2024.11.11
# Version : 1.1.1
# GitHub : https://github.com/syssi/esphome-seplos-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: "Seplos V1 V2"
bms_protocol: "RS485"
# +--------------------------------------+
# | Component settings |
# +--------------------------------------+
external_components:
- source: github://syssi/esphome-seplos-bms@main
refresh: 0s
uart:
- id: !extend ${seplos_modbus_uart_id}
baud_rate: ${seplos_modbus_baud_rate}
seplos_modbus:
id: ${seplos_modbus_id}
uart_id: ${seplos_modbus_uart_id}
rx_timeout: ${seplos_modbus_rx_timeout}
+57 -73
View File
@@ -1,5 +1,5 @@
# Updated : 2024.09.09
# Version : 1.4.4
# Updated : 2024.11.11
# Version : 1.5.1
# GitHub : https://github.com/Sleeper85/esphome-yambms
# This YAML is free software: you can redistribute it and/or
@@ -38,20 +38,20 @@ binary_sensor:
- platform: template
name: "${name} ${bms_name} Combine Availability"
id: bms${bms_id}_availability
lambda: return (((id(bms${bms_id}_switch_charging).state) || (id(bms${bms_id}_switch_discharging).state)) && (id(bms${bms_id}_errors_bitmask).state == 0));
lambda: return (id(bms${bms_id}_online_status).state && (id(bms${bms_id}_charging_allowed).state || id(bms${bms_id}_discharging_allowed).state));
# Can be combined (indicated, if the BMS can be combined)
- platform: template
name: "${name} ${bms_name} Can be combined"
id: bms${bms_id}_can_be_combined
lambda: return ((id(bms${bms_id}_availability).state) && (id(bms${bms_id}_switch_combine).state));
lambda: return (id(bms${bms_id}_availability).state && id(bms${bms_id}_switch_combine).state);
# Combine once without conditions
esphome:
on_boot:
then:
# Shunt counter (total)
- lambda: id(${yambms_id}_bms_counter) += 1;
- lambda: id(${yambms_id}_var_bms_counter) += 1;
interval:
- interval: ${bms_combine_interval}
@@ -63,20 +63,20 @@ interval:
// Combine once only
if (id(bms${bms_id}_combined_once) == false)
{
id(${yambms_id}_total_installed_battery_capacity) += id(bms${bms_id}_battery_capacity).state;
id(${yambms_id}_var_total_installed_battery_capacity) += id(bms${bms_id}_battery_capacity).state;
id(bms${bms_id}_combined_once) = true;
}
// Combine (not continuously)
if (id(bms${bms_id}_combined) == false)
{
// Can be combined bms counter
id(${yambms_id}_can_be_combined_bms_counter) += 1;
// To combine bms counter
id(${yambms_id}_var_to_combine_bms_counter) += 1;
// TOTAL cell_count
id(${yambms_id}_total_cell_count) += id(bms${bms_id}_cell_count).state;
// id(${yambms_id}_var_total_cell_count) += id(bms${bms_id}_cell_count).state;
// TOTAL battery_capacity
id(${yambms_id}_total_battery_capacity) += id(bms${bms_id}_battery_capacity).state;
id(${yambms_id}_var_total_battery_capacity) += id(bms${bms_id}_battery_capacity).state;
// Combined
id(bms${bms_id}_combined) = true;
@@ -85,24 +85,27 @@ interval:
// Uncombine (not continuously)
else if (id(bms${bms_id}_combined) == true)
{
// Can be combined bms counter
id(${yambms_id}_can_be_combined_bms_counter) -= 1;
// To combine bms counter
id(${yambms_id}_var_to_combine_bms_counter) -= 1;
// TOTAL cell_count
id(${yambms_id}_total_cell_count) -= id(bms${bms_id}_cell_count).state;
// id(${yambms_id}_var_total_cell_count) -= id(bms${bms_id}_cell_count).state;
// TOTAL battery_capacity
id(${yambms_id}_total_battery_capacity) -= id(bms${bms_id}_battery_capacity).state;
id(${yambms_id}_var_total_battery_capacity) -= id(bms${bms_id}_battery_capacity).state;
// Uncombined
id(bms${bms_id}_combined) = false;
}
// Combine continuously (all BMS)
if (id(${yambms_id}_processed_bms_counter) < id(${yambms_id}_bms_counter))
if (id(${yambms_id}_var_to_combine_bms_number) == ${bms_id})
{
// BMS processed counter
id(${yambms_id}_processed_bms_counter) += 1;
// TOTAL charging_allowed_counter
if (id(bms${bms_id}_charging_allowed).state) id(${yambms_id}_var_charging_allowed_counter) += 1;
// TOTAL discharging_allowed_counter
if (id(bms${bms_id}_discharging_allowed).state) id(${yambms_id}_var_discharging_allowed_counter) += 1;
// +-----------------------------------------------+
// | Errors bitmask (16bit) |
@@ -110,109 +113,90 @@ interval:
if (id(bms${bms_id}_errors_bitmask).state > 1)
{
uint16_t bms_errors_bitmask = id(bms${bms_id}_errors_bitmask).state; // errors_bitmask (16bit)
id(${yambms_id}_var_errors_bitmask_alarm) |= bms_errors_bitmask; // Alarm - OR bitwise
id(${yambms_id}_var_errors_bitmask_warning) |= bms_errors_bitmask; // Warning - OR bitwise
id(${yambms_id}_var_errors_bitmask_counter) += 1; // errors_bitmask_counter
uint16_t bms_errors_bitmask = id(bms${bms_id}_errors_bitmask).state; // errors_bitmask (16bit)
id(${yambms_id}_var_errors_bitmask) |= bms_errors_bitmask; // OR bitwise
id(${yambms_id}_var_errors_bitmask_counter) += 1; // errors_bitmask_counter
}
// +-----------------------------------------------+
// Combine only if the device is able to be included in combine
else if (id(bms${bms_id}_can_be_combined).state)
if (id(bms${bms_id}_can_be_combined).state)
{
// TOTAL total_voltage
id(${yambms_id}_bms_total_voltage) += id(bms${bms_id}_total_voltage).state;
id(${yambms_id}_var_bms_total_voltage) += id(bms${bms_id}_total_voltage).state;
// TOTAL current
id(${yambms_id}_bms_total_current) += id(bms${bms_id}_current).state;
id(${yambms_id}_var_bms_total_current) += id(bms${bms_id}_current).state;
// TOTAL power
id(${yambms_id}_bms_total_power) += id(bms${bms_id}_power).state;
id(${yambms_id}_var_bms_total_power) += id(bms${bms_id}_power).state;
// TOTAL max_charge_current
if (id(bms${bms_id}_switch_charging).state)
id(${yambms_id}_total_max_charge_current) += id(bms${bms_id}_max_charge_current).state;
if (id(bms${bms_id}_charging_allowed).state)
id(${yambms_id}_var_total_max_charge_current) += id(bms${bms_id}_max_charge_current).state;
// TOTAL max_discharge_current
if (id(bms${bms_id}_switch_discharging).state)
id(${yambms_id}_total_max_discharge_current) += id(bms${bms_id}_max_discharge_current).state;
if (id(bms${bms_id}_discharging_allowed).state)
id(${yambms_id}_var_total_max_discharge_current) += id(bms${bms_id}_max_discharge_current).state;
// TOTAL capacity_remaining_ah
id(${yambms_id}_total_capacity_remaining_ah) += id(bms${bms_id}_capacity_remaining_ah).state;
id(${yambms_id}_var_total_capacity_remaining_ah) += id(bms${bms_id}_capacity_remaining_ah).state;
// TOTAL soc
id(${yambms_id}_bms_total_soc) += id(bms${bms_id}_state_of_charge).state;
id(${yambms_id}_var_bms_total_soc) += id(bms${bms_id}_state_of_charge).state;
// TOTAL charging_cycles
id(${yambms_id}_total_charging_cycles) += id(bms${bms_id}_charging_cycles).state;
id(${yambms_id}_var_total_charging_cycles) += id(bms${bms_id}_charging_cycles).state;
// TOTAL equalizing_counter
if (id(bms${bms_id}_equalizing).state) id(${yambms_id}_equalizing_counter) += 1;
// TOTAL bms_switch_charging_counter
if (id(bms${bms_id}_switch_charging).state) id(${yambms_id}_bms_switch_charging_counter) += 1;
// TOTAL bms_switch_discharging_counter
if (id(bms${bms_id}_switch_discharging).state) id(${yambms_id}_bms_switch_discharging_counter) += 1;
if (id(bms${bms_id}_equalizing).state) id(${yambms_id}_var_equalizing_counter) += 1;
// MIN/MAX values
// MAX balance_trigger_voltage
if (id(bms${bms_id}_balance_trigger_voltage).state > id(${yambms_id}_max_balance_trigger_voltage))
id(${yambms_id}_max_balance_trigger_voltage) = id(bms${bms_id}_balance_trigger_voltage).state;
if (id(bms${bms_id}_balance_trigger_voltage).state > id(${yambms_id}_var_max_balance_trigger_voltage))
id(${yambms_id}_var_max_balance_trigger_voltage) = id(bms${bms_id}_balance_trigger_voltage).state;
// MIN min_cell_voltage
// MIN min_voltage_cell (cell number)
if (id(bms${bms_id}_min_cell_voltage).state < id(${yambms_id}_min_min_cell_voltage))
if (id(bms${bms_id}_min_cell_voltage).state < id(${yambms_id}_var_min_cell_voltage))
{
id(${yambms_id}_min_min_cell_voltage) = id(bms${bms_id}_min_cell_voltage).state;
id(${yambms_id}_min_min_voltage_cell) = id(bms${bms_id}_min_voltage_cell).state + (${bms_id} * 100);
id(${yambms_id}_var_min_cell_voltage) = id(bms${bms_id}_min_cell_voltage).state;
id(${yambms_id}_var_min_voltage_cell) = id(bms${bms_id}_min_voltage_cell).state + (${bms_id} * 100);
}
// MAX max_cell_voltage
// MAX max_voltage_cell (cell number)
if (id(bms${bms_id}_max_cell_voltage).state > id(${yambms_id}_max_max_cell_voltage))
if (id(bms${bms_id}_max_cell_voltage).state > id(${yambms_id}_var_max_cell_voltage))
{
id(${yambms_id}_max_max_cell_voltage) = id(bms${bms_id}_max_cell_voltage).state;
id(${yambms_id}_max_max_voltage_cell) = id(bms${bms_id}_max_voltage_cell).state + (${bms_id} * 100);
id(${yambms_id}_var_max_cell_voltage) = id(bms${bms_id}_max_cell_voltage).state;
id(${yambms_id}_var_max_voltage_cell) = id(bms${bms_id}_max_voltage_cell).state + (${bms_id} * 100);
}
// MIN cell_ovp
if (id(bms${bms_id}_cell_ovp).state < id(${yambms_id}_min_cell_ovp))
id(${yambms_id}_min_cell_ovp) = id(bms${bms_id}_cell_ovp).state;
// MIN cell_ovpr
if (id(bms${bms_id}_cell_ovpr).state < id(${yambms_id}_min_cell_ovpr))
id(${yambms_id}_min_cell_ovpr) = id(bms${bms_id}_cell_ovpr).state;
// MAX cell_uvpr
if (id(bms${bms_id}_cell_uvpr).state > id(${yambms_id}_max_cell_uvpr))
id(${yambms_id}_max_cell_uvpr) = id(bms${bms_id}_cell_uvpr).state;
if (id(bms${bms_id}_cell_ovp).state < id(${yambms_id}_var_min_cell_ovp))
id(${yambms_id}_var_min_cell_ovp) = id(bms${bms_id}_cell_ovp).state;
// MAX cell_uvp
if (id(bms${bms_id}_cell_uvp).state > id(${yambms_id}_var_max_cell_uvp))
id(${yambms_id}_var_max_cell_uvp) = id(bms${bms_id}_cell_uvp).state;
// MIN temperature
// MIN temperature_sensor
if (id(bms${bms_id}_temperature_sensor_1).state < id(${yambms_id}_var_min_temperature))
if (id(bms${bms_id}_min_temperature).state < id(${yambms_id}_var_min_temperature))
{
id(${yambms_id}_var_min_temperature) = id(bms${bms_id}_temperature_sensor_1).state;
id(${yambms_id}_var_min_temperature_sensor) = (1 + ${bms_id} * 100);
}
if (id(bms${bms_id}_temperature_sensor_2).state < id(${yambms_id}_var_min_temperature))
{
id(${yambms_id}_var_min_temperature) = id(bms${bms_id}_temperature_sensor_2).state;
id(${yambms_id}_var_min_temperature_sensor) = (2 + ${bms_id} * 100);
id(${yambms_id}_var_min_temperature) = id(bms${bms_id}_min_temperature).state;
id(${yambms_id}_var_min_temperature_sensor) = id(bms${bms_id}_min_temperature_sensor).state;
}
// MAX temperature
// MAX temperature_sensor
if (id(bms${bms_id}_temperature_sensor_1).state > id(${yambms_id}_var_max_temperature))
if (id(bms${bms_id}_max_temperature).state > id(${yambms_id}_var_max_temperature))
{
id(${yambms_id}_var_max_temperature) = id(bms${bms_id}_temperature_sensor_1).state;
id(${yambms_id}_var_max_temperature_sensor) = (1 + ${bms_id} * 100);
}
if (id(bms${bms_id}_temperature_sensor_2).state > id(${yambms_id}_var_max_temperature))
{
id(${yambms_id}_var_max_temperature) = id(bms${bms_id}_temperature_sensor_2).state;
id(${yambms_id}_var_max_temperature_sensor) = (2 + ${bms_id} * 100);
id(${yambms_id}_var_max_temperature) = id(bms${bms_id}_max_temperature).state;
id(${yambms_id}_var_max_temperature_sensor) = id(bms${bms_id}_max_temperature_sensor).state;
}
}
// To combine BMS number
id(${yambms_id}_var_to_combine_bms_number)++;
}
@@ -0,0 +1,93 @@
# Updated : 2024.11.11
# Version : 1.1.1
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
# This YAML is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
sensor:
# MIN temperature
- platform: template
id: bms${bms_id}_min_temperature
name: "${name} ${bms_name} min temperature"
update_interval: ${bms_update_interval}
accuracy_decimals: 1
unit_of_measurement: °C
device_class: temperature
filters:
- or:
- throttle: 10s
- delta: 0.1
lambda: |-
// MIN temperature
// MIN temperature_sensor
float min_temperature = id(bms${bms_id}_temperature_sensor_1).state;
int min_temperature_sensor = (1 + ${bms_id} * 100);
if (id(bms${bms_id}_temperature_sensor_2).state < min_temperature)
{
min_temperature = id(bms${bms_id}_temperature_sensor_2).state;
min_temperature_sensor = (2 + ${bms_id} * 100);
}
id(bms${bms_id}_min_temperature_sensor).publish_state(min_temperature_sensor);
return min_temperature;
# MIN temperature sensor
- 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
filters:
- or:
- throttle: 10s
- delta: 1
# MAX temperature
- platform: template
id: bms${bms_id}_max_temperature
name: "${name} ${bms_name} max temperature"
update_interval: ${bms_update_interval}
accuracy_decimals: 1
unit_of_measurement: °C
device_class: temperature
filters:
- or:
- throttle: 10s
- delta: 0.1
lambda: |-
// MAX temperature
// MAX temperature_sensor
float max_temperature = id(bms${bms_id}_temperature_sensor_1).state;
int max_temperature_sensor = (1 + ${bms_id} * 100);
if (id(bms${bms_id}_temperature_sensor_2).state > max_temperature)
{
max_temperature = id(bms${bms_id}_temperature_sensor_2).state;
max_temperature_sensor = (2 + ${bms_id} * 100);
}
id(bms${bms_id}_max_temperature_sensor).publish_state(max_temperature_sensor);
return max_temperature;
# MAX temperature sensor
- 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
filters:
- or:
- throttle: 10s
- delta: 1
+113
View File
@@ -0,0 +1,113 @@
# Updated : 2024.11.11
# Version : 1.1.1
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
# This YAML is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
sensor:
# MIN temperature
- platform: template
id: bms${bms_id}_min_temperature
name: "${name} ${bms_name} min temperature"
update_interval: ${bms_update_interval}
accuracy_decimals: 1
unit_of_measurement: °C
device_class: temperature
filters:
- or:
- throttle: 10s
- delta: 0.1
lambda: |-
// MIN temperature
// MIN temperature_sensor
float min_temperature = id(bms${bms_id}_temperature_sensor_1).state;
int min_temperature_sensor = (1 + ${bms_id} * 100);
if (id(bms${bms_id}_temperature_sensor_2).state < min_temperature)
{
min_temperature = id(bms${bms_id}_temperature_sensor_2).state;
min_temperature_sensor = (2 + ${bms_id} * 100);
}
if (id(bms${bms_id}_temperature_sensor_3).state < min_temperature)
{
min_temperature = id(bms${bms_id}_temperature_sensor_3).state;
min_temperature_sensor = (3 + ${bms_id} * 100);
}
if (id(bms${bms_id}_temperature_sensor_4).state < min_temperature)
{
min_temperature = id(bms${bms_id}_temperature_sensor_4).state;
min_temperature_sensor = (4 + ${bms_id} * 100);
}
id(bms${bms_id}_min_temperature_sensor).publish_state(min_temperature_sensor);
return min_temperature;
# MIN temperature sensor
- 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
filters:
- or:
- throttle: 10s
- delta: 1
# MAX temperature
- platform: template
id: bms${bms_id}_max_temperature
name: "${name} ${bms_name} max temperature"
update_interval: ${bms_update_interval}
accuracy_decimals: 1
unit_of_measurement: °C
device_class: temperature
filters:
- or:
- throttle: 10s
- delta: 0.1
lambda: |-
// MAX temperature
// MAX temperature_sensor
float max_temperature = id(bms${bms_id}_temperature_sensor_1).state;
int max_temperature_sensor = (1 + ${bms_id} * 100);
if (id(bms${bms_id}_temperature_sensor_2).state > max_temperature)
{
max_temperature = id(bms${bms_id}_temperature_sensor_2).state;
max_temperature_sensor = (2 + ${bms_id} * 100);
}
if (id(bms${bms_id}_temperature_sensor_3).state > max_temperature)
{
max_temperature = id(bms${bms_id}_temperature_sensor_3).state;
max_temperature_sensor = (3 + ${bms_id} * 100);
}
if (id(bms${bms_id}_temperature_sensor_4).state > max_temperature)
{
max_temperature = id(bms${bms_id}_temperature_sensor_4).state;
max_temperature_sensor = (4 + ${bms_id} * 100);
}
id(bms${bms_id}_max_temperature_sensor).publish_state(max_temperature_sensor);
return max_temperature;
# MAX temperature sensor
- 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
filters:
- or:
- throttle: 10s
- delta: 1
+123
View File
@@ -0,0 +1,123 @@
# Updated : 2024.11.11
# Version : 1.1.1
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
# This YAML is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
sensor:
# MIN temperature
- platform: template
id: bms${bms_id}_min_temperature
name: "${name} ${bms_name} min temperature"
update_interval: ${bms_update_interval}
accuracy_decimals: 1
unit_of_measurement: °C
device_class: temperature
filters:
- or:
- throttle: 10s
- delta: 0.1
lambda: |-
// MIN temperature
// MIN temperature_sensor
float min_temperature = id(bms${bms_id}_temperature_sensor_1).state;
int min_temperature_sensor = (1 + ${bms_id} * 100);
if (id(bms${bms_id}_temperature_sensor_2).state < min_temperature)
{
min_temperature = id(bms${bms_id}_temperature_sensor_2).state;
min_temperature_sensor = (2 + ${bms_id} * 100);
}
if (id(bms${bms_id}_temperature_sensor_3).state < min_temperature)
{
min_temperature = id(bms${bms_id}_temperature_sensor_3).state;
min_temperature_sensor = (3 + ${bms_id} * 100);
}
if (id(bms${bms_id}_temperature_sensor_4).state < min_temperature)
{
min_temperature = id(bms${bms_id}_temperature_sensor_4).state;
min_temperature_sensor = (4 + ${bms_id} * 100);
}
if (id(bms${bms_id}_temperature_sensor_5).state < min_temperature)
{
min_temperature = id(bms${bms_id}_temperature_sensor_5).state;
min_temperature_sensor = (5 + ${bms_id} * 100);
}
id(bms${bms_id}_min_temperature_sensor).publish_state(min_temperature_sensor);
return min_temperature;
# MIN temperature sensor
- 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
filters:
- or:
- throttle: 10s
- delta: 1
# MAX temperature
- platform: template
id: bms${bms_id}_max_temperature
name: "${name} ${bms_name} max temperature"
update_interval: ${bms_update_interval}
accuracy_decimals: 1
unit_of_measurement: °C
device_class: temperature
filters:
- or:
- throttle: 10s
- delta: 0.1
lambda: |-
// MAX temperature
// MAX temperature_sensor
float max_temperature = id(bms${bms_id}_temperature_sensor_1).state;
int max_temperature_sensor = (1 + ${bms_id} * 100);
if (id(bms${bms_id}_temperature_sensor_2).state > max_temperature)
{
max_temperature = id(bms${bms_id}_temperature_sensor_2).state;
max_temperature_sensor = (2 + ${bms_id} * 100);
}
if (id(bms${bms_id}_temperature_sensor_3).state > max_temperature)
{
max_temperature = id(bms${bms_id}_temperature_sensor_3).state;
max_temperature_sensor = (3 + ${bms_id} * 100);
}
if (id(bms${bms_id}_temperature_sensor_4).state > max_temperature)
{
max_temperature = id(bms${bms_id}_temperature_sensor_4).state;
max_temperature_sensor = (4 + ${bms_id} * 100);
}
if (id(bms${bms_id}_temperature_sensor_5).state > max_temperature)
{
max_temperature = id(bms${bms_id}_temperature_sensor_5).state;
max_temperature_sensor = (5 + ${bms_id} * 100);
}
id(bms${bms_id}_max_temperature_sensor).publish_state(max_temperature_sensor);
return max_temperature;
# MAX temperature sensor
- 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
filters:
- or:
- throttle: 10s
- delta: 1
+133
View File
@@ -0,0 +1,133 @@
# Updated : 2024.11.11
# Version : 1.1.1
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
# This YAML is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
sensor:
# MIN temperature
- platform: template
id: bms${bms_id}_min_temperature
name: "${name} ${bms_name} min temperature"
update_interval: ${bms_update_interval}
accuracy_decimals: 1
unit_of_measurement: °C
device_class: temperature
filters:
- or:
- throttle: 10s
- delta: 0.1
lambda: |-
// MIN temperature
// MIN temperature_sensor
float min_temperature = id(bms${bms_id}_temperature_sensor_1).state;
int min_temperature_sensor = (1 + ${bms_id} * 100);
if (id(bms${bms_id}_temperature_sensor_2).state < min_temperature)
{
min_temperature = id(bms${bms_id}_temperature_sensor_2).state;
min_temperature_sensor = (2 + ${bms_id} * 100);
}
if (id(bms${bms_id}_temperature_sensor_3).state < min_temperature)
{
min_temperature = id(bms${bms_id}_temperature_sensor_3).state;
min_temperature_sensor = (3 + ${bms_id} * 100);
}
if (id(bms${bms_id}_temperature_sensor_4).state < min_temperature)
{
min_temperature = id(bms${bms_id}_temperature_sensor_4).state;
min_temperature_sensor = (4 + ${bms_id} * 100);
}
if (id(bms${bms_id}_temperature_sensor_5).state < min_temperature)
{
min_temperature = id(bms${bms_id}_temperature_sensor_5).state;
min_temperature_sensor = (5 + ${bms_id} * 100);
}
if (id(bms${bms_id}_temperature_sensor_6).state < min_temperature)
{
min_temperature = id(bms${bms_id}_temperature_sensor_6).state;
min_temperature_sensor = (6 + ${bms_id} * 100);
}
id(bms${bms_id}_min_temperature_sensor).publish_state(min_temperature_sensor);
return min_temperature;
# MIN temperature sensor
- 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
filters:
- or:
- throttle: 10s
- delta: 1
# MAX temperature
- platform: template
id: bms${bms_id}_max_temperature
name: "${name} ${bms_name} max temperature"
update_interval: ${bms_update_interval}
accuracy_decimals: 1
unit_of_measurement: °C
device_class: temperature
filters:
- or:
- throttle: 10s
- delta: 0.1
lambda: |-
// MAX temperature
// MAX temperature_sensor
float max_temperature = id(bms${bms_id}_temperature_sensor_1).state;
int max_temperature_sensor = (1 + ${bms_id} * 100);
if (id(bms${bms_id}_temperature_sensor_2).state > max_temperature)
{
max_temperature = id(bms${bms_id}_temperature_sensor_2).state;
max_temperature_sensor = (2 + ${bms_id} * 100);
}
if (id(bms${bms_id}_temperature_sensor_3).state > max_temperature)
{
max_temperature = id(bms${bms_id}_temperature_sensor_3).state;
max_temperature_sensor = (3 + ${bms_id} * 100);
}
if (id(bms${bms_id}_temperature_sensor_4).state > max_temperature)
{
max_temperature = id(bms${bms_id}_temperature_sensor_4).state;
max_temperature_sensor = (4 + ${bms_id} * 100);
}
if (id(bms${bms_id}_temperature_sensor_5).state > max_temperature)
{
max_temperature = id(bms${bms_id}_temperature_sensor_5).state;
max_temperature_sensor = (5 + ${bms_id} * 100);
}
if (id(bms${bms_id}_temperature_sensor_6).state > max_temperature)
{
max_temperature = id(bms${bms_id}_temperature_sensor_6).state;
max_temperature_sensor = (6 + ${bms_id} * 100);
}
id(bms${bms_id}_max_temperature_sensor).publish_state(max_temperature_sensor);
return max_temperature;
# MAX temperature sensor
- 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
filters:
- or:
- throttle: 10s
- delta: 1
+4 -4
View File
@@ -1,5 +1,5 @@
# Updated : 2024.10.03
# Version : 1.2.3
# Updated : 2024.11.11
# Version : 1.2.4
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -68,13 +68,13 @@ canbus:
light:
# https://esphome.io/components/light/esp32_rmt_led_strip
# ESP Light used to see the inverter heartbeat
# Internal : only specifying an id without a name will implicitly set this to true.
- platform: esp32_rmt_led_strip
id: esp_light
name: ${name} ESP Light
rgb_order: GRB
pin: 27
num_leds: 1
rmt_channel: 0
chipset: ws2812
entity_category: config
internal: true
+4 -4
View File
@@ -1,5 +1,5 @@
# Updated : 2024.10.03
# Version : 1.2.3
# Updated : 2024.11.11
# Version : 1.2.4
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -68,13 +68,13 @@ canbus:
light:
# https://esphome.io/components/light/esp32_rmt_led_strip
# ESP Light used to see the inverter heartbeat
# Internal : only specifying an id without a name will implicitly set this to true.
- platform: esp32_rmt_led_strip
id: esp_light
name: ${name} ESP Light
rgb_order: GRB
pin: 27
num_leds: 1
rmt_channel: 0
chipset: ws2812
entity_category: config
internal: true
+4 -4
View File
@@ -1,5 +1,5 @@
# Updated : 2024.10.03
# Version : 1.2.3
# Updated : 2024.11.11
# Version : 1.2.4
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -87,13 +87,13 @@ canbus:
light:
# https://esphome.io/components/light/esp32_rmt_led_strip
# ESP Light used to see the inverter heartbeat
# Internal : only specifying an id without a name will implicitly set this to true.
- platform: esp32_rmt_led_strip
id: esp_light
name: ${name} ESP Light
rgb_order: GRB
pin: 35
num_leds: 1
rmt_channel: 0
chipset: ws2812
entity_category: config
internal: true
+283
View File
@@ -0,0 +1,283 @@
# Updated : 2024.11.11
# Version : 1.2.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:
board_chip: "ESP32-S3"
board_name: "Atom S3"
# web_server_sorting_group: '666'
# From platform-espressif32 6.1.0
# https://github.com/espressif/esp-idf/releases
# https://github.com/platformio/platform-espressif32/releases
# esp32:
# board: m5stack-atoms3
# variant: esp32s3
# Atom S3 - SKU:C123
# https://docs.m5stack.com/en/core/AtomS3
esp32:
board: esp32-s3-devkitc-1
variant: esp32s3
framework:
type: esp-idf
esphome:
platformio_options:
board_build.flash_mode: dio # Standard uses a single line for data, Dual IO uses 2 lines for data (prevent reboot loop)
wifi:
id: my_network
ssid: !secret wifi_ssid
password: !secret wifi_password
domain: !secret domain
ap:
ssid: "YamBMS Fallback Hotspot"
password: "Y4mBM$85"
captive_portal:
logger:
hardware_uart: USB_SERIAL_JTAG
uart:
# UART 1
- id: uart_esp_1
tx_pin: 2
rx_pin: 1
baud_rate: 115200
rx_buffer_size: 512
# UART 2
# - id: uart_esp_2
# tx_pin: 8
# rx_pin: 7
# baud_rate: 115200
# rx_buffer_size: 512
canbus:
# CANBUS NODE 1
- platform: esp32_can
id: canbus_node1
tx_pin: 5
rx_pin: 6
can_id: 1
bit_rate: 500kbps
# +--------------------------------------+
# | Inverter Heartbeat Light |
# +--------------------------------------+
light:
# ESP Light used to see the inverter heartbeat
# Internal : only specifying an id without a name will implicitly set this to true.
- platform: binary
id: esp_light
output: esp_output
# +--------------------------------------+
# | Atom S3 related configuration |
# +--------------------------------------+
# LCD 0.85"
# GPIO15 CS
# GPIO16 BL
# GPIO17 SCK
# GPIO21 MOSI
# GPIO33 RS
# GPIO34 LCD-RST
# GPIO4 IR
# GPIO41 BUTTON
packages:
display: !include board_display_128x128.yaml
spi:
- id: atom_spi_bus
clk_pin: GPIO17
mosi_pin: GPIO21
fan:
# Backlight Control Platform
- platform: speed
id: backlight
output: backlight_out
name: "${name} ${board_name} Backlight control"
# web_server:
# sorting_weight: ${web_server_sorting_group}00
# sorting_group_id: group_${web_server_sorting_group}
restore_mode: RESTORE_DEFAULT_ON
icon: mdi:brightness-6
output:
# Backlight Output Hardware
- platform: ledc
id: backlight_out
pin:
number: GPIO16
# allow_other_uses: true
# inverted: true
frequency: 120Hz
channel: 1
max_power: 1.00
min_power: 0.10
zero_means_zero: true
# Inverter Heartbeat Output (ESP32 board without LED)
- platform: template
id: esp_output
type: binary
write_action:
- logger.log: "Inverter Heartbeat Output"
#- lambda: C++ code; # action to be performed at each inverter heartbeat
binary_sensor:
# Atom S3 Button
- platform: gpio
id: atom_button
pin:
number: GPIO41
inverted: true
mode:
input: true
pullup: true
filters:
- delayed_off: 10ms
on_press:
then:
- lambda: ESP_LOGI("Atom S3 Button", "Pressed");
- lambda: |-
// On press -> make sure set==ON & bri==100%
if ((id(backlight).speed != 100) || (id(backlight).state != true))
{
auto call = id(backlight).turn_on();
call.set_speed(100);
call.perform();
}
// if autodim enabled, execute script
if (id(backlight_autodim_time).state > 0)
{
id(backlight_autodim).execute();
}
- display.page.show_next: my_display
#- display.page.show_previous: my_display
display:
# Atom S3 display see https://esphome.io/components/display/ili9xxx.html
- platform: ili9xxx
id: my_display
spi_id: atom_spi_bus
model: M5STACK # M5STACK / ST7789V
cs_pin: GPIO15
dc_pin: GPIO33
reset_pin: GPIO34
dimensions:
height: 128
width: 128
offset_height: 1
offset_width: 2
invert_colors: true
# rotation: 180 # use transform instead! https://esphome.io/components/display/ili9xxx.html
number:
# Backlight max Level
- platform: template
id: backlight_max_power
name: "${name} ${board_name} Backlight max Level"
# web_server:
# sorting_weight: ${web_server_sorting_group}05
# sorting_group_id: group_${web_server_sorting_group}
icon: mdi:brightness-7
optimistic: true
min_value: 0
max_value: 100
step: 1
initial_value: 75
restore_value: true
mode: box
unit_of_measurement: "%"
on_value:
then:
- lambda: |-
int speed = id(backlight).speed; // get actual level
id(backlight_out).set_max_power(x / 100); // set max_power
auto call = id(backlight).turn_on(); // reset level
call.set_speed(speed);
call.perform();
update_interval: 10s
# Backlight Auto-Dim time
- platform: template
id: backlight_autodim_time
name: "${name} ${board_name} Backlight Auto-Dim Time in min."
# web_server:
# sorting_weight: ${web_server_sorting_group}20
# sorting_group_id: group_${web_server_sorting_group}
icon: mdi:brightness-auto
optimistic: true
min_value: 0
max_value: 10
step: 0.1
initial_value: 0.2
restore_value: true
mode: box
unit_of_measurement: "min"
update_interval: never #5s
# Backlight Auto-Dim Level
- platform: template
id: backlight_autodim_level
name: "${name} ${board_name} Backlight Auto-Dim Level"
# web_server:
# sorting_weight: ${web_server_sorting_group}15
# sorting_group_id: group_${web_server_sorting_group}
icon: mdi:brightness-4
optimistic: true
min_value: 0
max_value: 100
step: 1
initial_value: 25
restore_value: true
mode: box
unit_of_measurement: "%"
update_interval: never #5s
script:
# Backlight Auto-Dimming Script
- id: backlight_autodim
mode: restart
then:
- delay: !lambda return id(backlight_autodim_time).state * 60 * 1000; // delay (x min * 60s * 1000ms)
- lambda: |- # Handle Dimlevel
int speed = id(backlight_autodim_level).state; // get desired dimlevel
if (speed == 0) // if dimmlevel = 0
{
auto call = id(backlight).turn_off(); // turn off backlight
call.perform();
}
else
{
auto call = id(backlight).turn_on(); // set dimlevel
call.set_speed(speed);
call.perform();
}
# web_server v3 needs to be added and sorting_groups must be defined to use grouping
# web_server:
# version: 3
# sorting_groups:
# - id: group_666
# name: "${board_name} Backlight Control"
# sorting_weight: -10000
+183
View File
@@ -0,0 +1,183 @@
# Updated : 2024.11.11
# Version : 1.2.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:
board_chip: "ESP32-S3"
board_name: "Atom S3R"
esp32:
board: esp32-s3-devkitc-1
variant: esp32s3
flash_size: 8MB # ajust according to your ESP32-S3 version
framework:
type: esp-idf
esphome:
platformio_options:
board_build.flash_mode: dio # Standard uses a single line for data, Dual IO uses 2 lines for data (prevent reboot loop)
board_upload.maximum_ram_size: 524288 # Total Size of the internal RAM in bits. It's the same for all ESP32-S3 ( 512KB )
on_boot:
then:
- output.turn_on:
id: white
# PSRAM activation and settings
psram:
mode: octal
speed: 80MHz
<<: !include board_psram_settings.yaml
external_components:
# Backlight
- source:
type: git
url: https://github.com/ssieb/esphome
ref: lp5562
components: [ lp5562 ]
refresh: 1min
wifi:
id: my_network
ssid: !secret wifi_ssid
password: !secret wifi_password
domain: !secret domain
ap:
ssid: "YamBMS Fallback Hotspot"
password: "Y4mBM$85"
captive_portal:
logger:
hardware_uart: USB_SERIAL_JTAG
uart:
# UART 0 : USB UART port used for ESP32 flashing and logs, can be released if necessary (tx_pin: 43, rx_pin: 44)
# UART 1
- id: uart_esp_1
tx_pin: 2
rx_pin: 1
baud_rate: 115200
rx_buffer_size: 512
# UART 2
# - id: uart_esp_2
# tx_pin: 8
# rx_pin: 7
# baud_rate: 115200
# rx_buffer_size: 512
canbus:
# CANBUS NODE 1
- platform: esp32_can
id: canbus_node1
tx_pin: 5
rx_pin: 6
can_id: 1
bit_rate: 500kbps
# +--------------------------------------+
# | Inverter Heartbeat Light |
# +--------------------------------------+
light:
# ESP Light used to see the inverter heartbeat
# Internal : only specifying an id without a name will implicitly set this to true.
- platform: binary
id: esp_light
output: esp_output
# +--------------------------------------+
# | Atom S3R related configuration |
# +--------------------------------------+
packages:
display: !include board_display_128x128.yaml
spi:
- id: atom_spi_bus
clk_pin: 15
mosi_pin: 21
i2c:
- id: atom_i2c_bus
sda: 45
scl: 0
scan: true
lp5562:
- i2c_id: atom_i2c_bus
output:
# Backlight Output
- platform: lp5562
id: red
channel: 0
- platform: lp5562
id: green
channel: 1
- platform: lp5562
id: blue
channel: 2
- platform: lp5562
id: white
channel: 3
# Inverter Heartbeat Output (ESP32 board without LED)
- platform: template
id: esp_output
type: binary
write_action:
- logger.log: "Inverter Heartbeat Output"
#- lambda: C++ code; # action to be performed at each inverter heartbeat
binary_sensor:
# Atom S3R Button
- platform: gpio
id: atom_button
pin:
number: 41
inverted: true
mode:
input: true
pullup: true
filters:
- delayed_off: 10ms
on_press:
then:
- logger.log: Button Pressed
- display.page.show_next: my_display
#- display.page.show_previous: my_display
display:
# Atom S3R display
# https://esphome.io/components/display/st7789v.html
- platform: st7789v
spi_id: atom_spi_bus
id: my_display
model: Custom
cs_pin: 14
dc_pin: 42
reset_pin: 48
height: 128
width: 128
offset_height: 2
offset_width: 1
eightbitcolor: true
update_interval: 1s
data_rate: 40Mhz
# rotation: 180 # use transform instead! https://esphome.io/components/display/ili9xxx.html
@@ -1,5 +1,5 @@
# Updated : 2024.10.03
# Version : 1.2.3
# Updated : 2024.11.11
# Version : 1.2.4
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -17,106 +17,13 @@
# 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:
board_chip: "ESP32-S3"
board_name: "Atom S3"
# From platform-espressif32 6.1.0
# https://github.com/espressif/esp-idf/releases
# https://github.com/platformio/platform-espressif32/releases
# esp32:
# board: m5stack-atoms3
# variant: esp32s3
# Atom S3 - SKU:C123
# https://docs.m5stack.com/en/core/AtomS3
esp32:
board: esp32-s3-devkitc-1
variant: esp32s3
framework:
type: esp-idf
esphome:
platformio_options:
board_build.flash_mode: dio # Standard uses a single line for data, Dual IO uses 2 lines for data (prevent reboot loop)
on_boot:
then:
- lambda: |-
id(disp).enable();
id(disp).transfer_byte(0x11);
id(disp).disable();
wifi:
id: my_network
ssid: !secret wifi_ssid
password: !secret wifi_password
domain: !secret domain
ap:
ssid: "YamBMS Fallback Hotspot"
password: "Y4mBM$85"
captive_portal:
logger:
hardware_uart: USB_SERIAL_JTAG
uart:
# UART 1
- id: uart_esp_1
tx_pin: 2
rx_pin: 1
baud_rate: 115200
rx_buffer_size: 512
# UART 2
# - id: uart_esp_2
# tx_pin: 8
# rx_pin: 7
# baud_rate: 115200
# rx_buffer_size: 512
canbus:
# CANBUS NODE 1
- platform: esp32_can
id: canbus_node1
tx_pin: 5
rx_pin: 6
can_id: 1
bit_rate: 500kbps
output:
# ESP LED
- platform: gpio
pin: 4
id: esp_led
inverted: true
light:
# ESP Light
- platform: binary
output: esp_led
id: esp_light
name: "${name} On board light"
internal: true
# +--------------------------------------+
# | Display settings |
# | Display Related |
# +--------------------------------------+
# LCD 0.85"
# GPIO15 CS
# GPIO16 BL
# GPIO17 SCK
# GPIO21 MOSI
# GPIO33 RS
# GPIO34 LCD-RST
# GPIO4 IR
# GPIO41 BUTTON
spi:
clk_pin: GPIO17
mosi_pin: GPIO21
color:
- id: my_black
hex: "000000"
- id: my_red
red: 100%
green: 0%
@@ -137,6 +44,12 @@ color:
red: 50%
green: 50%
blue: 50%
- id: my_white
red: 100%
green: 100%
blue: 100%
- id: my_pink
hex: ff00ff
font:
- file: "gfonts://Roboto"
@@ -152,59 +65,20 @@ font:
id: roboto_18
size: 18
binary_sensor:
- platform: gpio
name: Atom S3 Button
pin:
number: GPIO41
inverted: true
mode:
input: true
pullup: true
filters:
- delayed_off: 10ms
on_press:
then:
- logger.log: Button Pressed
- display.page.show_next: disp
#- display.page.show_previous: disp
# Auto next page interval
interval:
- interval: ${display_auto_next_page_interval}
startup_delay: 5s
then:
- display.page.show_next: my_display
- component.update: my_display
# +--------------------------------------+
# | Display Handling |
# +--------------------------------------+
display:
# https://esphome.io/components/display/st7789v.html
- platform: st7789v
id: disp
model: Custom
backlight_pin: GPIO16
cs_pin: GPIO15
dc_pin: GPIO33
reset_pin: GPIO34
height: 128
width: 128
offset_height: 2
offset_width: 1
eightbitcolor: true
update_interval: 2s
lambda: |-
it.rectangle(0, 0, it.get_width(), it.get_height(), id(my_blue));
it.rectangle(0, 20, it.get_width(), it.get_height(), id(my_blue)); // header bar
if (id(esp32_online_status).state) {
it.print(115, 5, id(roboto_12), id(my_green), TextAlign::TOP_RIGHT, "ESP OK");
}
else {
it.print(115, 5, id(roboto_12), id(my_red), TextAlign::TOP_RIGHT, "ESP KO");
}
if (id(${canbus_id}_status).state) {
it.print(0, 5, id(roboto_12), id(my_green), TextAlign::TOP_LEFT, "CAN OK");
}
else {
it.print(0, 5, id(roboto_12), id(my_red), TextAlign::TOP_LEFT, "CAN KO");
}
# Atom S3 display see https://esphome.io/components/display/ili9xxx.html
- id: !extend my_display
pages:
- id: page1
lambda: |-
@@ -265,6 +139,5 @@ display:
else {
it.print(0, 5, id(roboto_12), id(my_red), TextAlign::TOP_LEFT, "CAN KO");
}
it.print((128 / 2), (128 / 3) * 1 + 5, id(roboto_24), id(my_gray), TextAlign::CENTER,"Voltage V");
it.printf((128 / 2), (128 / 3) * 2 - 5, id(roboto_32), id(my_gray), TextAlign::CENTER, "%.1f", id(${yambms_id}_total_voltage).state);
it.print((128 / 2), (128 / 3) * 1, id(roboto_24), id(my_gray), TextAlign::CENTER,"Voltage V");
it.printf((128 / 2), (128 / 3) * 2 - 5, id(roboto_32), id(my_gray), TextAlign::CENTER, "%.1f", id(${yambms_id}_total_voltage).state);
+5 -4
View File
@@ -1,5 +1,5 @@
# Updated : 2024.10.03
# Version : 1.2.3
# Updated : 2024.11.11
# Version : 1.2.4
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -23,6 +23,7 @@ substitutions:
esp32:
board: esp32-c3-devkitm-1
flash_size: 4MB # ajust according to your ESP32-C3 version
framework:
type: esp-idf
@@ -77,13 +78,13 @@ canbus:
light:
# https://esphome.io/components/light/esp32_rmt_led_strip
# ESP Light used to see the inverter heartbeat
# Internal : only specifying an id without a name will implicitly set this to true.
- platform: esp32_rmt_led_strip
id: esp_light
name: ${name} ESP Light
rgb_order: GRB
pin: 8
num_leds: 1
rmt_channel: 0
chipset: ws2812
entity_category: config
internal: true
+27 -13
View File
@@ -1,5 +1,5 @@
# Updated : 2024.10.03
# Version : 1.2.3
# Updated : 2024.11.11
# Version : 1.2.4
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -24,6 +24,7 @@ substitutions:
esp32:
board: esp32-c3-devkitm-1
variant: esp32c3
flash_size: 2MB
framework:
type: esp-idf
version: latest
@@ -33,8 +34,16 @@ esphome:
platformio_options:
board_build.flash_mode: dio # Standard uses a single line for data, Dual IO uses 2 lines for data (prevent reboot loop)
# external_components:
# - source: github://pr#6861
# components:
# - ethernet
external_components:
- source: github://pr#6861
- source:
type: git
url: https://github.com/esphome/esphome
ref: d5bdf2575c151abfad39b6c24c3856395a7d0901
components:
- ethernet
@@ -69,17 +78,22 @@ canbus:
can_id: 1
bit_rate: 500kbps
output:
# ESP LED
- platform: gpio
pin: 0
id: esp_led
inverted: true
# +--------------------------------------+
# | Inverter Heartbeat Light |
# +--------------------------------------+
light:
# ESP Light
# ESP Light used to see the inverter heartbeat
# Internal : only specifying an id without a name will implicitly set this to true.
- platform: binary
output: esp_led
id: esp_light
name: "${name} On board light"
internal: true
output: esp_output
output:
# ESP32 board without LED
- platform: template
id: esp_output
type: binary
write_action:
- logger.log: "Inverter Heartbeat Output"
#- lambda: C++ code; # action to be performed at each inverter heartbeat
+14 -11
View File
@@ -1,5 +1,5 @@
# Updated : 2024.10.03
# Version : 1.2.3
# Updated : 2024.11.11
# Version : 1.2.4
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -65,17 +65,20 @@ canbus:
can_id: 1
bit_rate: 500kbps
# +--------------------------------------+
# | Inverter Heartbeat Light |
# +--------------------------------------+
light:
# ESP Light used to see the inverter heartbeat
# Internal : only specifying an id without a name will implicitly set this to true.
- platform: binary
output: esp_led
id: esp_light
output:
# ESP LED
- platform: gpio
pin: 2
id: esp_led
inverted: true
light:
# ESP Light
- platform: binary
output: esp_led
id: esp_light
name: "${name} On board light"
internal: true
inverted: true
+4 -4
View File
@@ -1,5 +1,5 @@
# Updated : 2024.10.03
# Version : 1.2.3
# Updated : 2024.11.11
# Version : 1.2.4
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -87,13 +87,13 @@ canbus:
light:
# https://esphome.io/components/light/esp32_rmt_led_strip
# ESP Light used to see the inverter heartbeat
# Internal : only specifying an id without a name will implicitly set this to true.
- platform: esp32_rmt_led_strip
id: esp_light
name: ${name} ESP Light
rgb_order: GRB
pin: 48
num_leds: 1
rmt_channel: 0
chipset: ws2812
entity_category: config
internal: true
@@ -1,5 +1,5 @@
# Updated : 2024.10.03
# Version : 1.2.3
# Updated : 2024.11.11
# Version : 1.2.4
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -94,13 +94,13 @@ canbus:
light:
# https://esphome.io/components/light/esp32_rmt_led_strip
# ESP Light used to see the inverter heartbeat
# Internal : only specifying an id without a name will implicitly set this to true.
- platform: esp32_rmt_led_strip
id: esp_light
name: ${name} ESP Light
rgb_order: GRB
pin: 48
num_leds: 1
rmt_channel: 0
chipset: ws2812
entity_category: config
internal: true
@@ -1,200 +0,0 @@
interval:
- interval: ${fake_bms_update_interval}
then:
# Start: 0x4E, 0x57, 0x01, 0x1B, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x01
- lambda: |-
id(bms${fake_bms_id}).on_jk_modbus_data(0x06, {
0x79, 0x30, 0x01, 0x0D, 0x71, 0x02, 0x0D, 0x72, 0x03, 0x0D, 0x73, 0x04, 0x0D, 0x74, 0x05, 0x0D, 0x75, 0x06,
0x0D, 0x76, 0x07, 0x0D, 0x77, 0x08, 0x0D, 0x78, 0x09, 0x0D, 0x79, 0x0A, 0x0D, 0xDE, 0x0B, 0x0D, 0xDF, 0x0C,
0x0D, 0xE0, 0x0D, 0x0D, 0xE1, 0x0E, 0x0D, 0xE2, 0x0F, 0x0D, 0xE3, 0x10, 0x0D, 0xE4, 0x80, 0x00, 0x1D, 0x81,
0x00, 0x1E, 0x82, 0x00, 0x1A, 0x83, 0x15, 0xD4, 0x84, 0x80, 0xD0, 0x85, 0x4F, 0x86, 0x02, 0x87, 0x00, 0x04,
0x89, 0x00, 0x00, 0x00, 0x00, 0x8A, 0x00, 0x10, 0x8B, 0x00, 0x00, 0x8C, 0x00, 0x07, 0x8E, 0x16, 0xD0, 0x8F,
0x0F, 0xA0, 0x90, 0x0E, 0x10, 0x91, 0x0D, 0xDE, 0x92, 0x00, 0x05, 0x93, 0x09, 0xC4, 0x94, 0x0A, 0xF0, 0x95,
0x00, 0x05, 0x96, 0x01, 0x2C, 0x97, 0x00, 0x96, 0x98, 0x00, 0x03, 0x99, 0x00, 0x96, 0x9A, 0x00, 0x05, 0x9B,
0x0D, 0x7A, 0x9C, 0x00, 0x05, 0x9D, 0x01, 0x9E, 0x00, 0x5A, 0x9F, 0x00, 0x46, 0xA0, 0x00, 0x64, 0xA1, 0x00,
0x64, 0xA2, 0x00, 0x14, 0xA3, 0x00, 0x46, 0xA4, 0x00, 0x46, 0xA5, 0xFF, 0xEC, 0xA6, 0xFF, 0xF6, 0xA7, 0xFF,
0xEC, 0xA8, 0xFF, 0xF6, 0xA9, 0x10, 0xAA, 0x00, 0x00, 0x01, 0x18, 0xAB, 0x01, 0xAC, 0x01, 0xAD, 0x04, 0x11,
0xAE, 0x01, 0xAF, 0x00, 0xB0, 0x00, 0x0A, 0xB1, 0x14, 0xB2, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x00, 0x00,
0x00, 0x00, 0xB3, 0x00, 0xB4, 0x49, 0x6E, 0x70, 0x75, 0x74, 0x20, 0x55, 0x73, 0xB5, 0x32, 0x31, 0x30, 0x31,
0xB6, 0x00, 0x00, 0xE2, 0x00, 0xB7, 0x48, 0x36, 0x2E, 0x58, 0x5F, 0x5F, 0x53, 0x36, 0x2E, 0x31, 0x2E, 0x33,
0x53, 0x5F, 0x5F, 0xB8, 0x00, 0xB9, 0x00, 0x00, 0x00, 0x00, 0xBA, 0x42, 0x54, 0x33, 0x30, 0x37, 0x32, 0x30,
0x32, 0x30, 0x31, 0x32, 0x30, 0x30, 0x30, 0x30, 0x32, 0x30, 0x30, 0x35, 0x32, 0x31, 0x30, 0x30, 0x31, 0xC0,
0x01,
});
# End: 0x00 0x00 0x00 0x00 0x68 0x00 0x00 0x54 0xD1
# Status response
# <- 0x4E 0x57 0x01 0x1B 0x00 0x00 0x00 0x00 0x06 0x00 0x01: Header
#
# *Data*
#
# Address Content: Description Decoded content Coeff./Unit
# 0x79: Individual Cell voltage
# 0x30: Cell count 48 / 3 bytes = 16 cells
# 0x01 0x0D 0x71: Cell 1 3441 * 0.001 = 3.441V 0.001 V
# 0x02 0x0D 0x72: Cell 2 3442 * 0.001 = 3.442V 0.001 V
# 0x03 0x0D 0x73: Cell 3 3443 * 0.001 = 3.443V 0.001 V
# 0x04 0x0D 0x74: Cell 4 3444 0.001 V
# 0x05 0x0D 0x75: Cell 5 3445 0.001 V
# 0x06 0x0D 0x76: Cell 6 3446 0.001 V
# 0x07 0x0D 0x77: Cell 7 3447 0.001 V
# 0x08 0x0D 0x78: Cell 8 3448 0.001 V
# 0x09 0x0D 0x79: Cell 9 3449 0.001 V
# 0x0A 0x0D 0xDE: Cell 10 3550 0.001 V
# 0x0B 0x0D 0xDF: Cell 11 3551 0.001 V
# 0x0C 0x0D 0xE0: Cell 12 3552 0.001 V
# 0x0D 0x0D 0xE1: Cell 13 3553 0.001 V
# 0x0E 0x0D 0xE2: Cell 14 3554 0.001 V
# 0x0F 0x0D 0xE3: Cell 15 3555 0.001 V
# 0x10 0x0D 0xE4: Cell 16 3556 0.001 V
# 0x80 0x00 0x1D: Read power tube temperature 29°C 1.0 °C
# ---> 99 = 99°C, 100 = 100°C, 101 = -1°C, 140 = -40°C
# 0x81 0x00 0x1E: Read the temperature in the battery box 30°C 1.0 °C
# 0x82 0x00 0x1A: Read battery temperature 26°C 1.0 °C
# 0x83 0x15 0xD4: Total battery voltage 5588 * 0.01 = 55.88V 0.01 V
# 0x84 0x80 0xD0: Current data 32976 0.01 A
# 0x85 0x4F: Battery remaining capacity 79% soc
# 0x86 0x02: Number of battery temperature sensors 2 1.0 count
# 0x87 0x00 0x04: Number of battery cycles 4 1.0 count
# 0x89 0x00 0x00 0x00 0x00: Total battery cycle capacity
# 0x8A 0x00 0x10: Total number of battery strings 16 1.0 count
# 0x8B 0x00 0x00: Battery warning message 0000000000000000 NoAlarm
#
# Bit 0 Low capacity 1 (alarm), 0 (normal) warning
# Bit 1 Power tube overtemperature 1 (alarm), 0 (normal) alarm
# Bit 2 Charging overvoltage 1 (alarm), 0 (normal) alarm
# Bit 3 Discharging undervoltage 1 (alarm), 0 (normal) alarm
# Bit 4 Battery over temperature 1 (alarm), 0 (normal) alarm
# Bit 5 Charging overcurrent 1 (alarm), 0 (normal) alarm
# Bit 6 Discharging overcurrent 1 (alarm), 0 (normal) alarm
# Bit 7 Cell pressure difference 1 (alarm), 0 (normal) alarm
# Bit 8 Overtemperature alarm in the battery box 1 (alarm), 0 (normal) alarm
# Bit 9 Battery low temperature 1 (alarm), 0 (normal) alarm
# Bit 10 Cell overvoltage 1 (alarm), 0 (normal) alarm
# Bit 11 Cell undervoltage 1 (alarm), 0 (normal) alarm
# Bit 12 309_A protection 1 (alarm), 0 (normal) alarm
# Bit 13 309_A protection 1 (alarm), 0 (normal) alarm
# Bit 14 Reserved
# Bit 15 Reserved
#
# Examples:
# 0x0001 = 00000000 00000001: Low capacity alarm
# 0x0002 = 00000000 00000010: MOS tube over-temperature alarm
# 0x0003 = 00000000 00000011: Low capacity alarm AND power tube over-temperature alarm
# 0x8C 0x00 0x07: Battery status information 0000 0000 0000 0111
# Bit 0: Charging enabled 1 (on), 0 (off)
# Bit 1: Discharging enabled 1 (on), 0 (off)
# Bit 2: Balancer enabled 1 (on), 0 (off)
# Bit 3: Battery dropped(?) 1 (normal), 0 (offline)
# Bit 4...15: Reserved
# Example: 0000 0000 0000 0111 -> Charging + Discharging + Balancer enabled
# 0x8E 0x16 0xD0: Total voltage overvoltage protection 5840 * 0.01 = 58.40V 0.01 V
# 0x8F 0x0F 0xA0: Total voltage undervoltage protection 4000 * 0.01 = 40.00V 0.01 V
# 0x90 0x0E 0x10: Cell overvoltage protection voltage 3600 * 0.001 = 3.600V 0.001 V
# 0x91 0x0D 0xDE: Cell overvoltage recovery voltage 3550 * 0.001 = 3.550V 0.001 V
# 0x92 0x00 0x05: Cell overvoltage protection delay 5s 1.0 s
# 0x93 0x09 0xC4: Cell undervoltage protection voltage 2500 * 0.001 = 2.500V 0.001 V
# 0x94 0x0A 0xF0: Cell undervoltage recovery voltage 2800 * 0.001 = 2.800V 0.001 V
# 0x95 0x00 0x05: Cell undervoltage protection delay 5s 1.0 s
# 0x96 0x01 0x2C: Cell pressure difference protection value 300 * 0.001 = 0.300V 0.001 V 0.000-1.000V
# 0x97 0x00 0x96: Discharge overcurrent protection value 150A 1.0 A
# 0x98 0x00 0x03: Discharge overcurrent delay 3s 1.0 s
# 0x99 0x00 0x96: Charging overcurrent protection value 150A 1.0 A
# 0x9A 0x00 0x05: Charge overcurrent delay 5s 1.0 s
# 0x9B 0x0D 0x7A: Balanced starting voltage 3450 * 0.001 = 3.450V 0.001 V
# 0x9C 0x00 0x05: Balanced opening pressure difference 5 * 0.001 = 0.005V 0.001 V 0.01-1V
# 0x9D 0x01: Active balance switch 1 (on) Bool 0 (off), 1 (on)
# 0x9E 0x00 0x5A: Power tube temperature protection value 90°C 1.0 °C 0-100°C
# 0x9F 0x00 0x46: Power tube temperature recovery value 70°C 1.0 °C 0-100°C
# 0xA0 0x00 0x64: Temperature protection value in the battery box 100°C 1.0 °C 40-100°C
# 0xA1 0x00 0x64: Temperature recovery value in the battery box 100°C 1.0 °C 40-100°C
# 0xA2 0x00 0x14: Battery temperature difference protection value 20°C 1.0 °C 5-10°C
# 0xA3 0x00 0x46: Battery charging high temperature protection value 70°C 1.0 °C 0-100°C
# 0xA4 0x00 0x46: Battery discharge high temperature protection value 70°C 1.0 °C 0-100°C
# 0xA5 0xFF 0xEC: Charging low temperature protection value -20°C 1.0 °C -45...25°C
# 0xA6 0xFF 0xF6: Charging low temperature protection recovery value -10°C 1.0 °C -45...25°C
# 0xA7 0xFF 0xEC: Discharge low temperature protection value -20°C 1.0 °C -45...25°C
# 0xA8 0xFF 0xF6: Discharge low temperature protection recovery value -10°C 1.0 °C -45...25°C
# 0xA9 0x10: Battery string setting 16 1.0 count
# 0xAA 0x00 0x00 0x01 0x18: Total battery capacity setting 280 Ah 1.0 Ah
# 0xAB 0x01: Charging MOS tube switch 1 (on) Bool 0 (off), 1 (on)
# 0xAC 0x01: Discharge MOS tube switch 1 (on) Bool 0 (off), 1 (on)
# 0xAD 0x04 0x11: Current calibration 1041mA * 0.001 = 1.041A 0.001 A 0.1-2.0A
# 0xAE 0x01: Protection board address 1 1.0
# 0xAF 0x00: Battery Type 0 1.0
# ---> 0 (lithium iron phosphate), 1 (ternary), 2 (lithium titanate)
# 0xB0 0x00 0x0A: Sleep waiting time 10s 1.0 s
# 0xB1 0x14: Low volume alarm 20% 1.0 % 0-80%
# 0xB2 0x31 0x32 0x33 0x34 0x35 0x36 0x00 0x00 0x00 0x00: Modify parameter password
# 0xB3 0x00: Dedicated charger switch 1 (on) Bool 0 (off), 1 (on)
# 0xB4 0x49 0x6E 0x70 0x75 0x74 0x20 0x55 0x73: Device ID code
# 0xB5 0x32 0x31 0x30 0x31: Date of manufacture
# 0xB6 0x00 0x00 0xE2 0x00: System working hours
# 0xB7 0x48 0x36 0x2E 0x58 0x5F 0x5F 0x53
# 0x36 0x2E 0x31 0x2E 0x33 0x53 0x5F 0x5F: Software version number
# 0xB8 0x00: Whether to start current calibration
# 0xB9 0x00 0x00 0x00 0x00: Actual battery capacity
# Firmware version >= 10.10 required
# See https://github.com/syssi/esphome-jk-bms/issues/212 for details
# 0xBA 0x42 0x54 0x33 0x30 0x37 0x32 0x30 0x32 0x30 0x31 0x32 0x30
# 0x30 0x30 0x30 0x32 0x30 0x30 0x35 0x32 0x31 0x30 0x30 0x31: Manufacturer ID naming
# 0xC0 0x01: Protocol version number
# 00 00 00 00 68 00 00 54 D1: End of frame
@@ -1,200 +0,0 @@
interval:
- interval: ${fake_bms_update_interval}
then:
# Start: 0x4E, 0x57, 0x01, 0x1B, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x01
- lambda: |-
id(bms${fake_bms_id}).on_jk_modbus_data(0x06, {
0x79, 0x30, 0x01, 0x0E, 0x39, 0x02, 0x0E, 0x3A, 0x03, 0x0E, 0x3B, 0x04, 0x0E, 0x3C, 0x05, 0x0E, 0x3D, 0x06,
0x0E, 0x3E, 0x07, 0x0E, 0x3F, 0x08, 0x0E, 0x40, 0x09, 0x0E, 0x41, 0x0A, 0x0E, 0x42, 0x0B, 0x0E, 0x43, 0x0C,
0x0E, 0x44, 0x0D, 0x0E, 0x45, 0x0E, 0x0E, 0x46, 0x0F, 0x0E, 0x47, 0x10, 0x0E, 0x48,
0x80, 0x00, 0x1D, 0x81, 0x00, 0x20, 0x82, 0x00, 0x1C, 0x83, 0x16, 0xCD,
0x84, 0x80, 0xD0, 0x85, 0x59, 0x86, 0x02, 0x87, 0x00, 0x04, 0x89, 0x00, 0x00, 0x00, 0x00, 0x8A,
0x00, 0x10, 0x8B, 0x00, 0x00, 0x8C, 0x00, 0x07, 0x8E, 0x16, 0xD0, 0x8F, 0x0F, 0xA0, 0x90, 0x0E, 0x42, 0x91,
0x0D, 0xAC, 0x92, 0x00, 0x05, 0x93, 0x09, 0xC4, 0x94, 0x0A, 0x28, 0x95, 0x00, 0x05, 0x96, 0x01, 0x2C, 0x97,
0x00, 0x96, 0x98, 0x00, 0x03, 0x99, 0x00, 0x96, 0x9A, 0x00, 0x05, 0x9B, 0x0D, 0x7A, 0x9C, 0x00, 0x05, 0x9D,
0x01, 0x9E, 0x00, 0x5A, 0x9F, 0x00, 0x46, 0xA0, 0x00, 0x64, 0xA1, 0x00, 0x64, 0xA2, 0x00, 0x14, 0xA3, 0x00,
0x46, 0xA4, 0x00, 0x46, 0xA5, 0xFF, 0xEC, 0xA6, 0xFF, 0xF6, 0xA7, 0xFF, 0xEC, 0xA8, 0xFF, 0xF6, 0xA9, 0x10,
0xAA, 0x00, 0x00, 0x01, 0x18, 0xAB, 0x01, 0xAC, 0x01, 0xAD, 0x04, 0x11, 0xAE, 0x01, 0xAF, 0x00, 0xB0, 0x00,
0x0A, 0xB1, 0x14, 0xB2, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x00, 0x00, 0x00, 0x00, 0xB3, 0x00, 0xB4, 0x49,
0x6E, 0x70, 0x75, 0x74, 0x20, 0x55, 0x73, 0xB5, 0x32, 0x31, 0x30, 0x31, 0xB6, 0x00, 0x00, 0xE2, 0x00, 0xB7,
0x48, 0x36, 0x2E, 0x58, 0x5F, 0x5F, 0x53, 0x36, 0x2E, 0x31, 0x2E, 0x33, 0x53, 0x5F, 0x5F, 0xB8, 0x00, 0xB9,
0x00, 0x00, 0x00, 0x00, 0xBA, 0x42, 0x54, 0x33, 0x30, 0x37, 0x32, 0x30, 0x32, 0x30, 0x31, 0x32, 0x30, 0x30,
0x30, 0x30, 0x32, 0x30, 0x30, 0x35, 0x32, 0x31, 0x30, 0x30, 0x31, 0xC0, 0x01,
});
# End: 0x00 0x00 0x00 0x00 0x68 0x00 0x00 0x54 0xD1
# Status response
# <- 0x4E 0x57 0x01 0x1B 0x00 0x00 0x00 0x00 0x06 0x00 0x01: Header
#
# *Data*
#
# Address Content: Description Decoded content Coeff./Unit
# 0x79: Individual Cell voltage
# 0x30: Cell count 48 / 3 bytes = 16 cells
# 0x01 0x0E 0x39: Cell 1 3641 * 0.001 = 3.641V 0.001 V
# 0x02 0x0E 0x3A: Cell 2 3642 * 0.001 = 3.642V 0.001 V
# 0x03 0x0E 0x3B: Cell 3 3643 * 0.001 = 3.643V 0.001 V
# 0x04 0x0E 0x3C: Cell 4 3644 0.001 V
# 0x05 0x0E 0x3D: Cell 5 3645 0.001 V
# 0x06 0x0E 0x3E: Cell 6 3646 0.001 V
# 0x07 0x0E 0x3F: Cell 7 3647 0.001 V
# 0x08 0x0E 0x40: Cell 8 3648 0.001 V
# 0x09 0x0E 0x41: Cell 9 3649 0.001 V
# 0x0A 0x0E 0x42: Cell 10 3650 0.001 V
# 0x0B 0x0E 0x43: Cell 11 3651 0.001 V
# 0x0C 0x0E 0x44: Cell 12 3652 0.001 V
# 0x0D 0x0E 0x45: Cell 13 3653 0.001 V
# 0x0E 0x0E 0x46: Cell 14 3654 0.001 V
# 0x0F 0x0E 0x47: Cell 15 3655 0.001 V
# 0x10 0x0E 0x48: Cell 16 3656 0.001 V
# 0x80 0x00 0x1D: Read power tube temperature 29°C 1.0 °C
# ---> 99 = 99°C, 100 = 100°C, 101 = -1°C, 140 = -40°C
# 0x81 0x00 0x20: Read the temperature in the battery box 32°C 1.0 °C
# 0x82 0x00 0x1C: Read battery temperature 28°C 1.0 °C
# 0x83 0x16 0xCD: Total battery voltage 5837 * 0.01 = 58.37V 0.01 V
# 0x84 0x80 0xD0: Current data 32976 0.01 A
# 0x85 0x59: Battery remaining capacity 89% soc
# 0x86 0x02: Number of battery temperature sensors 2 1.0 count
# 0x87 0x00 0x04: Number of battery cycles 4 1.0 count
# 0x89 0x00 0x00 0x00 0x00: Total battery cycle capacity
# 0x8A 0x00 0x10: Total number of battery strings 16 1.0 count
# 0x8B 0x00 0x00: Battery warning message 0000000000000000 NoAlarm
#
# Bit 0 Low capacity 1 (alarm), 0 (normal) warning
# Bit 1 Power tube overtemperature 1 (alarm), 0 (normal) alarm
# Bit 2 Charging overvoltage 1 (alarm), 0 (normal) alarm
# Bit 3 Discharging undervoltage 1 (alarm), 0 (normal) alarm
# Bit 4 Battery over temperature 1 (alarm), 0 (normal) alarm
# Bit 5 Charging overcurrent 1 (alarm), 0 (normal) alarm
# Bit 6 Discharging overcurrent 1 (alarm), 0 (normal) alarm
# Bit 7 Cell pressure difference 1 (alarm), 0 (normal) alarm
# Bit 8 Overtemperature alarm in the battery box 1 (alarm), 0 (normal) alarm
# Bit 9 Battery low temperature 1 (alarm), 0 (normal) alarm
# Bit 10 Cell overvoltage 1 (alarm), 0 (normal) alarm
# Bit 11 Cell undervoltage 1 (alarm), 0 (normal) alarm
# Bit 12 309_A protection 1 (alarm), 0 (normal) alarm
# Bit 13 309_A protection 1 (alarm), 0 (normal) alarm
# Bit 14 Reserved
# Bit 15 Reserved
#
# Examples:
# 0x0001 = 00000000 00000001: Low capacity alarm
# 0x0002 = 00000000 00000010: MOS tube over-temperature alarm
# 0x0003 = 00000000 00000011: Low capacity alarm AND power tube over-temperature alarm
# 0x8C 0x00 0x07: Battery status information 0000 0000 0000 0111
# Bit 0: Charging enabled 1 (on), 0 (off)
# Bit 1: Discharging enabled 1 (on), 0 (off)
# Bit 2: Balancer enabled 1 (on), 0 (off)
# Bit 3: Battery dropped(?) 1 (normal), 0 (offline)
# Bit 4...15: Reserved
# Example: 0000 0000 0000 0111 -> Charging + Discharging + Balancer enabled
# 0x8E 0x16 0xD0: Total voltage overvoltage protection 5840 * 0.01 = 58.40V 0.01 V
# 0x8F 0x0F 0xA0: Total voltage undervoltage protection 4000 * 0.01 = 40.00V 0.01 V
# 0x90 0x0E 0x42: Cell overvoltage protection voltage 3650 * 0.001 = 3.650V 0.001 V
# 0x91 0x0D 0xAC: Cell overvoltage recovery voltage 3500 * 0.001 = 3.500V 0.001 V
# 0x92 0x00 0x05: Cell overvoltage protection delay 5s 1.0 s
# 0x93 0x09 0xC4: Cell undervoltage protection voltage 2500 * 0.001 = 2.500V 0.001 V
# 0x94 0x0A 0x28: Cell undervoltage recovery voltage 2600 * 0.001 = 2.600V 0.001 V
# 0x95 0x00 0x05: Cell undervoltage protection delay 5s 1.0 s
# 0x96 0x01 0x2C: Cell pressure difference protection value 300 * 0.001 = 0.300V 0.001 V 0.000-1.000V
# 0x97 0x00 0x96: Discharge overcurrent protection value 150A 1.0 A
# 0x98 0x00 0x03: Discharge overcurrent delay 3s 1.0 s
# 0x99 0x00 0x96: Charging overcurrent protection value 150A 1.0 A
# 0x9A 0x00 0x05: Charge overcurrent delay 5s 1.0 s
# 0x9B 0x0D 0x7A: Balanced starting voltage 3450 * 0.001 = 3.450V 0.001 V
# 0x9C 0x00 0x05: Balanced opening pressure difference 5 * 0.001 = 0.005V 0.001 V 0.01-1V
# 0x9D 0x01: Active balance switch 1 (on) Bool 0 (off), 1 (on)
# 0x9E 0x00 0x5A: Power tube temperature protection value 90°C 1.0 °C 0-100°C
# 0x9F 0x00 0x46: Power tube temperature recovery value 70°C 1.0 °C 0-100°C
# 0xA0 0x00 0x64: Temperature protection value in the battery box 100°C 1.0 °C 40-100°C
# 0xA1 0x00 0x64: Temperature recovery value in the battery box 100°C 1.0 °C 40-100°C
# 0xA2 0x00 0x14: Battery temperature difference protection value 20°C 1.0 °C 5-10°C
# 0xA3 0x00 0x46: Battery charging high temperature protection value 70°C 1.0 °C 0-100°C
# 0xA4 0x00 0x46: Battery discharge high temperature protection value 70°C 1.0 °C 0-100°C
# 0xA5 0xFF 0xEC: Charging low temperature protection value -20°C 1.0 °C -45...25°C
# 0xA6 0xFF 0xF6: Charging low temperature protection recovery value -10°C 1.0 °C -45...25°C
# 0xA7 0xFF 0xEC: Discharge low temperature protection value -20°C 1.0 °C -45...25°C
# 0xA8 0xFF 0xF6: Discharge low temperature protection recovery value -10°C 1.0 °C -45...25°C
# 0xA9 0x10: Battery string setting 16 1.0 count
# 0xAA 0x00 0x00 0x01 0x18: Total battery capacity setting 280 Ah 1.0 Ah
# 0xAB 0x01: Charging MOS tube switch 1 (on) Bool 0 (off), 1 (on)
# 0xAC 0x01: Discharge MOS tube switch 1 (on) Bool 0 (off), 1 (on)
# 0xAD 0x04 0x11: Current calibration 1041mA * 0.001 = 1.041A 0.001 A 0.1-2.0A
# 0xAE 0x01: Protection board address 1 1.0
# 0xAF 0x00: Battery Type 0 1.0
# ---> 0 (lithium iron phosphate), 1 (ternary), 2 (lithium titanate)
# 0xB0 0x00 0x0A: Sleep waiting time 10s 1.0 s
# 0xB1 0x14: Low volume alarm 20% 1.0 % 0-80%
# 0xB2 0x31 0x32 0x33 0x34 0x35 0x36 0x00 0x00 0x00 0x00: Modify parameter password
# 0xB3 0x00: Dedicated charger switch 1 (on) Bool 0 (off), 1 (on)
# 0xB4 0x49 0x6E 0x70 0x75 0x74 0x20 0x55 0x73: Device ID code
# 0xB5 0x32 0x31 0x30 0x31: Date of manufacture
# 0xB6 0x00 0x00 0xE2 0x00: System working hours
# 0xB7 0x48 0x36 0x2E 0x58 0x5F 0x5F 0x53
# 0x36 0x2E 0x31 0x2E 0x33 0x53 0x5F 0x5F: Software version number
# 0xB8 0x00: Whether to start current calibration
# 0xB9 0x00 0x00 0x00 0x00: Actual battery capacity
# Firmware version >= 10.10 required
# See https://github.com/syssi/esphome-jk-bms/issues/212 for details
# 0xBA 0x42 0x54 0x33 0x30 0x37 0x32 0x30 0x32 0x30 0x31 0x32 0x30
# 0x30 0x30 0x30 0x32 0x30 0x30 0x35 0x32 0x31 0x30 0x30 0x31: Manufacturer ID naming
# 0xC0 0x01: Protocol version number
# 00 00 00 00 68 00 00 54 D1: End of frame
@@ -1,200 +0,0 @@
interval:
- interval: ${fake_bms_update_interval}
then:
# Start: 0x4E, 0x57, 0x01, 0x1B, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x01
- lambda: |-
id(bms${fake_bms_id}).on_jk_modbus_data(0x06, {
0x79, 0x30, 0x01, 0x0E, 0x39, 0x02, 0x0E, 0x3A, 0x03, 0x0E, 0x3B, 0x04, 0x0E, 0x3C, 0x05, 0x0E, 0x3D, 0x06,
0x0E, 0x3E, 0x07, 0x0E, 0x3F, 0x08, 0x0E, 0x40, 0x09, 0x0E, 0x41, 0x0A, 0x0E, 0x42, 0x0B, 0x0E, 0x43, 0x0C,
0x0E, 0x44, 0x0D, 0x0E, 0x45, 0x0E, 0x0E, 0x46, 0x0F, 0x0E, 0x47, 0x10, 0x0E, 0x48,
0x80, 0x00, 0x1D, 0x81, 0x00, 0x1E, 0x82, 0x00, 0x1C, 0x83, 0x16, 0xCD,
0x84, 0x80, 0xD0, 0x85, 0x62, 0x86, 0x02, 0x87, 0x00, 0x04, 0x89, 0x00, 0x00, 0x00, 0x00, 0x8A,
0x00, 0x10, 0x8B, 0x00, 0x02, 0x8C, 0x00, 0x07, 0x8E, 0x16, 0xD0, 0x8F, 0x0F, 0xA0, 0x90, 0x0E, 0x42, 0x91,
0x0D, 0xDE, 0x92, 0x00, 0x05, 0x93, 0x09, 0xC4, 0x94, 0x0A, 0x28, 0x95, 0x00, 0x05, 0x96, 0x01, 0x2C, 0x97,
0x00, 0x96, 0x98, 0x00, 0x03, 0x99, 0x00, 0x96, 0x9A, 0x00, 0x05, 0x9B, 0x0D, 0x7A, 0x9C, 0x00, 0x05, 0x9D,
0x01, 0x9E, 0x00, 0x5A, 0x9F, 0x00, 0x46, 0xA0, 0x00, 0x64, 0xA1, 0x00, 0x64, 0xA2, 0x00, 0x14, 0xA3, 0x00,
0x46, 0xA4, 0x00, 0x46, 0xA5, 0xFF, 0xEC, 0xA6, 0xFF, 0xF6, 0xA7, 0xFF, 0xEC, 0xA8, 0xFF, 0xF6, 0xA9, 0x10,
0xAA, 0x00, 0x00, 0x01, 0x18, 0xAB, 0x01, 0xAC, 0x01, 0xAD, 0x04, 0x11, 0xAE, 0x01, 0xAF, 0x00, 0xB0, 0x00,
0x0A, 0xB1, 0x14, 0xB2, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x00, 0x00, 0x00, 0x00, 0xB3, 0x00, 0xB4, 0x49,
0x6E, 0x70, 0x75, 0x74, 0x20, 0x55, 0x73, 0xB5, 0x32, 0x31, 0x30, 0x31, 0xB6, 0x00, 0x00, 0xE2, 0x00, 0xB7,
0x48, 0x36, 0x2E, 0x58, 0x5F, 0x5F, 0x53, 0x36, 0x2E, 0x31, 0x2E, 0x33, 0x53, 0x5F, 0x5F, 0xB8, 0x00, 0xB9,
0x00, 0x00, 0x00, 0x00, 0xBA, 0x42, 0x54, 0x33, 0x30, 0x37, 0x32, 0x30, 0x32, 0x30, 0x31, 0x32, 0x30, 0x30,
0x30, 0x30, 0x32, 0x30, 0x30, 0x35, 0x32, 0x31, 0x30, 0x30, 0x31, 0xC0, 0x01,
});
# End: 0x00 0x00 0x00 0x00 0x68 0x00 0x00 0x54 0xD1
# Status response
# <- 0x4E 0x57 0x01 0x1B 0x00 0x00 0x00 0x00 0x06 0x00 0x01: Header
#
# *Data*
#
# Address Content: Description Decoded content Coeff./Unit
# 0x79: Individual Cell voltage
# 0x30: Cell count 48 / 3 bytes = 16 cells
# 0x01 0x0E 0x39: Cell 1 3641 * 0.001 = 3.641V 0.001 V
# 0x02 0x0E 0x3A: Cell 2 3642 * 0.001 = 3.642V 0.001 V
# 0x03 0x0E 0x3B: Cell 3 3643 * 0.001 = 3.643V 0.001 V
# 0x04 0x0E 0x3C: Cell 4 3644 0.001 V
# 0x05 0x0E 0x3D: Cell 5 3645 0.001 V
# 0x06 0x0E 0x3E: Cell 6 3646 0.001 V
# 0x07 0x0E 0x3F: Cell 7 3647 0.001 V
# 0x08 0x0E 0x40: Cell 8 3648 0.001 V
# 0x09 0x0E 0x41: Cell 9 3649 0.001 V
# 0x0A 0x0E 0x42: Cell 10 3650 0.001 V
# 0x0B 0x0E 0x43: Cell 11 3651 0.001 V
# 0x0C 0x0E 0x44: Cell 12 3652 0.001 V
# 0x0D 0x0E 0x45: Cell 13 3653 0.001 V
# 0x0E 0x0E 0x46: Cell 14 3654 0.001 V
# 0x0F 0x0E 0x47: Cell 15 3655 0.001 V
# 0x10 0x0E 0x48: Cell 16 3656 0.001 V
# 0x80 0x00 0x1D: Read power tube temperature 29°C 1.0 °C
# ---> 99 = 99°C, 100 = 100°C, 101 = -1°C, 140 = -40°C
# 0x81 0x00 0x1E: Read the temperature in the battery box 30°C 1.0 °C
# 0x82 0x00 0x1C: Read battery temperature 28°C 1.0 °C
# 0x83 0x16 0xCD: Total battery voltage 5837 * 0.01 = 58.37V 0.01 V
# 0x84 0x80 0xD0: Current data 32976 0.01 A
# 0x85 0x62: Battery remaining capacity 98% soc
# 0x86 0x02: Number of battery temperature sensors 2 1.0 count
# 0x87 0x00 0x04: Number of battery cycles 4 1.0 count
# 0x89 0x00 0x00 0x00 0x00: Total battery cycle capacity
# 0x8A 0x00 0x10: Total number of battery strings 16 1.0 count
# 0x8B 0x00 0x02: Battery warning message 0000000000000010 OTP
#
# Bit 0 Low capacity 1 (alarm), 0 (normal) warning
# Bit 1 Power tube overtemperature 1 (alarm), 0 (normal) alarm
# Bit 2 Charging overvoltage 1 (alarm), 0 (normal) alarm
# Bit 3 Discharging undervoltage 1 (alarm), 0 (normal) alarm
# Bit 4 Battery over temperature 1 (alarm), 0 (normal) alarm
# Bit 5 Charging overcurrent 1 (alarm), 0 (normal) alarm
# Bit 6 Discharging overcurrent 1 (alarm), 0 (normal) alarm
# Bit 7 Cell pressure difference 1 (alarm), 0 (normal) alarm
# Bit 8 Overtemperature alarm in the battery box 1 (alarm), 0 (normal) alarm
# Bit 9 Battery low temperature 1 (alarm), 0 (normal) alarm
# Bit 10 Cell overvoltage 1 (alarm), 0 (normal) alarm
# Bit 11 Cell undervoltage 1 (alarm), 0 (normal) alarm
# Bit 12 309_A protection 1 (alarm), 0 (normal) alarm
# Bit 13 309_A protection 1 (alarm), 0 (normal) alarm
# Bit 14 Reserved
# Bit 15 Reserved
#
# Examples:
# 0x0001 = 00000000 00000001: Low capacity alarm
# 0x0002 = 00000000 00000010: MOS tube over-temperature alarm
# 0x0003 = 00000000 00000011: Low capacity alarm AND power tube over-temperature alarm
# 0x8C 0x00 0x07: Battery status information 0000 0000 0000 0111
# Bit 0: Charging enabled 1 (on), 0 (off)
# Bit 1: Discharging enabled 1 (on), 0 (off)
# Bit 2: Balancer enabled 1 (on), 0 (off)
# Bit 3: Battery dropped(?) 1 (normal), 0 (offline)
# Bit 4...15: Reserved
# Example: 0000 0000 0000 0111 -> Charging + Discharging + Balancer enabled
# 0x8E 0x16 0xD0: Total voltage overvoltage protection 5840 * 0.01 = 58.40V 0.01 V
# 0x8F 0x0F 0xA0: Total voltage undervoltage protection 4000 * 0.01 = 40.00V 0.01 V
# 0x90 0x0E 0x42: Cell overvoltage protection voltage 3650 * 0.001 = 3.650V 0.001 V
# 0x91 0x0D 0xDE: Cell overvoltage recovery voltage 3550 * 0.001 = 3.600V 0.001 V
# 0x92 0x00 0x05: Cell overvoltage protection delay 5s 1.0 s
# 0x93 0x09 0xC4: Cell undervoltage protection voltage 2500 * 0.001 = 2.500V 0.001 V
# 0x94 0x0A 0x28: Cell undervoltage recovery voltage 2600 * 0.001 = 3.100V 0.001 V
# 0x95 0x00 0x05: Cell undervoltage protection delay 5s 1.0 s
# 0x96 0x01 0x2C: Cell pressure difference protection value 300 * 0.001 = 0.300V 0.001 V 0.000-1.000V
# 0x97 0x00 0x96: Discharge overcurrent protection value 150A 1.0 A
# 0x98 0x00 0x03: Discharge overcurrent delay 3s 1.0 s
# 0x99 0x00 0x96: Charging overcurrent protection value 150A 1.0 A
# 0x9A 0x00 0x05: Charge overcurrent delay 5s 1.0 s
# 0x9B 0x0D 0x7A: Balanced starting voltage 3450 * 0.001 = 3.450V 0.001 V
# 0x9C 0x00 0x05: Balanced opening pressure difference 5 * 0.001 = 0.005V 0.001 V 0.01-1V
# 0x9D 0x01: Active balance switch 1 (on) Bool 0 (off), 1 (on)
# 0x9E 0x00 0x5A: Power tube temperature protection value 90°C 1.0 °C 0-100°C
# 0x9F 0x00 0x46: Power tube temperature recovery value 70°C 1.0 °C 0-100°C
# 0xA0 0x00 0x64: Temperature protection value in the battery box 100°C 1.0 °C 40-100°C
# 0xA1 0x00 0x64: Temperature recovery value in the battery box 100°C 1.0 °C 40-100°C
# 0xA2 0x00 0x14: Battery temperature difference protection value 20°C 1.0 °C 5-10°C
# 0xA3 0x00 0x46: Battery charging high temperature protection value 70°C 1.0 °C 0-100°C
# 0xA4 0x00 0x46: Battery discharge high temperature protection value 70°C 1.0 °C 0-100°C
# 0xA5 0xFF 0xEC: Charging low temperature protection value -20°C 1.0 °C -45...25°C
# 0xA6 0xFF 0xF6: Charging low temperature protection recovery value -10°C 1.0 °C -45...25°C
# 0xA7 0xFF 0xEC: Discharge low temperature protection value -20°C 1.0 °C -45...25°C
# 0xA8 0xFF 0xF6: Discharge low temperature protection recovery value -10°C 1.0 °C -45...25°C
# 0xA9 0x10: Battery string setting 16 1.0 count
# 0xAA 0x00 0x00 0x01 0x18: Total battery capacity setting 280 Ah 1.0 Ah
# 0xAB 0x01: Charging MOS tube switch 1 (on) Bool 0 (off), 1 (on)
# 0xAC 0x01: Discharge MOS tube switch 1 (on) Bool 0 (off), 1 (on)
# 0xAD 0x04 0x11: Current calibration 1041mA * 0.001 = 1.041A 0.001 A 0.1-2.0A
# 0xAE 0x01: Protection board address 1 1.0
# 0xAF 0x00: Battery Type 0 1.0
# ---> 0 (lithium iron phosphate), 1 (ternary), 2 (lithium titanate)
# 0xB0 0x00 0x0A: Sleep waiting time 10s 1.0 s
# 0xB1 0x14: Low volume alarm 20% 1.0 % 0-80%
# 0xB2 0x31 0x32 0x33 0x34 0x35 0x36 0x00 0x00 0x00 0x00: Modify parameter password
# 0xB3 0x00: Dedicated charger switch 1 (on) Bool 0 (off), 1 (on)
# 0xB4 0x49 0x6E 0x70 0x75 0x74 0x20 0x55 0x73: Device ID code
# 0xB5 0x32 0x31 0x30 0x31: Date of manufacture
# 0xB6 0x00 0x00 0xE2 0x00: System working hours
# 0xB7 0x48 0x36 0x2E 0x58 0x5F 0x5F 0x53
# 0x36 0x2E 0x31 0x2E 0x33 0x53 0x5F 0x5F: Software version number
# 0xB8 0x00: Whether to start current calibration
# 0xB9 0x00 0x00 0x00 0x00: Actual battery capacity
# Firmware version >= 10.10 required
# See https://github.com/syssi/esphome-jk-bms/issues/212 for details
# 0xBA 0x42 0x54 0x33 0x30 0x37 0x32 0x30 0x32 0x30 0x31 0x32 0x30
# 0x30 0x30 0x30 0x32 0x30 0x30 0x35 0x32 0x31 0x30 0x30 0x31: Manufacturer ID naming
# 0xC0 0x01: Protocol version number
# 00 00 00 00 68 00 00 54 D1: End of frame
@@ -1,200 +0,0 @@
interval:
- interval: ${fake_bms_update_interval}
then:
# Start: 0x4E, 0x57, 0x01, 0x1B, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x01
- lambda: |-
id(bms${fake_bms_id}).on_jk_modbus_data(0x06, {
0x79, 0x30, 0x01, 0x0E, 0x39, 0x02, 0x0E, 0x3A, 0x03, 0x0E, 0x3B, 0x04, 0x0E, 0x3C, 0x05, 0x0E, 0x3D, 0x06,
0x0E, 0x3E, 0x07, 0x0E, 0x3F, 0x08, 0x0E, 0x40, 0x09, 0x0E, 0x41, 0x0A, 0x0E, 0x42, 0x0B, 0x0E, 0x43, 0x0C,
0x0E, 0x44, 0x0D, 0x0E, 0x45, 0x0E, 0x0E, 0x46, 0x0F, 0x0E, 0x47, 0x10, 0x0E, 0x48,
0x80, 0x00, 0x1D, 0x81, 0x00, 0x1E, 0x82, 0x00, 0x1C, 0x83, 0x16, 0xCD,
0x84, 0x80, 0xD0, 0x85, 0x63, 0x86, 0x02, 0x87, 0x00, 0x04, 0x89, 0x00, 0x00, 0x00, 0x00, 0x8A,
0x00, 0x10, 0x8B, 0x04, 0x00, 0x8C, 0x00, 0x07, 0x8E, 0x16, 0xD0, 0x8F, 0x0F, 0xA0, 0x90, 0x0E, 0x42, 0x91,
0x0D, 0xDE, 0x92, 0x00, 0x05, 0x93, 0x09, 0xC4, 0x94, 0x0A, 0x28, 0x95, 0x00, 0x05, 0x96, 0x01, 0x2C, 0x97,
0x00, 0x96, 0x98, 0x00, 0x03, 0x99, 0x00, 0x96, 0x9A, 0x00, 0x05, 0x9B, 0x0D, 0x7A, 0x9C, 0x00, 0x05, 0x9D,
0x01, 0x9E, 0x00, 0x5A, 0x9F, 0x00, 0x46, 0xA0, 0x00, 0x64, 0xA1, 0x00, 0x64, 0xA2, 0x00, 0x14, 0xA3, 0x00,
0x46, 0xA4, 0x00, 0x46, 0xA5, 0xFF, 0xEC, 0xA6, 0xFF, 0xF6, 0xA7, 0xFF, 0xEC, 0xA8, 0xFF, 0xF6, 0xA9, 0x10,
0xAA, 0x00, 0x00, 0x01, 0x18, 0xAB, 0x01, 0xAC, 0x01, 0xAD, 0x04, 0x11, 0xAE, 0x01, 0xAF, 0x00, 0xB0, 0x00,
0x0A, 0xB1, 0x14, 0xB2, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x00, 0x00, 0x00, 0x00, 0xB3, 0x00, 0xB4, 0x49,
0x6E, 0x70, 0x75, 0x74, 0x20, 0x55, 0x73, 0xB5, 0x32, 0x31, 0x30, 0x31, 0xB6, 0x00, 0x00, 0xE2, 0x00, 0xB7,
0x48, 0x36, 0x2E, 0x58, 0x5F, 0x5F, 0x53, 0x36, 0x2E, 0x31, 0x2E, 0x33, 0x53, 0x5F, 0x5F, 0xB8, 0x00, 0xB9,
0x00, 0x00, 0x00, 0x00, 0xBA, 0x42, 0x54, 0x33, 0x30, 0x37, 0x32, 0x30, 0x32, 0x30, 0x31, 0x32, 0x30, 0x30,
0x30, 0x30, 0x32, 0x30, 0x30, 0x35, 0x32, 0x31, 0x30, 0x30, 0x31, 0xC0, 0x01,
});
# End: 0x00 0x00 0x00 0x00 0x68 0x00 0x00 0x54 0xD1
# Status response
# <- 0x4E 0x57 0x01 0x1B 0x00 0x00 0x00 0x00 0x06 0x00 0x01: Header
#
# *Data*
#
# Address Content: Description Decoded content Coeff./Unit
# 0x79: Individual Cell voltage
# 0x30: Cell count 48 / 3 bytes = 16 cells
# 0x01 0x0E 0x39: Cell 1 3641 * 0.001 = 3.641V 0.001 V
# 0x02 0x0E 0x3A: Cell 2 3642 * 0.001 = 3.642V 0.001 V
# 0x03 0x0E 0x3B: Cell 3 3643 * 0.001 = 3.643V 0.001 V
# 0x04 0x0E 0x3C: Cell 4 3644 0.001 V
# 0x05 0x0E 0x3D: Cell 5 3645 0.001 V
# 0x06 0x0E 0x3E: Cell 6 3646 0.001 V
# 0x07 0x0E 0x3F: Cell 7 3647 0.001 V
# 0x08 0x0E 0x40: Cell 8 3648 0.001 V
# 0x09 0x0E 0x41: Cell 9 3649 0.001 V
# 0x0A 0x0E 0x42: Cell 10 3650 0.001 V
# 0x0B 0x0E 0x43: Cell 11 3651 0.001 V
# 0x0C 0x0E 0x44: Cell 12 3652 0.001 V
# 0x0D 0x0E 0x45: Cell 13 3653 0.001 V
# 0x0E 0x0E 0x46: Cell 14 3654 0.001 V
# 0x0F 0x0E 0x47: Cell 15 3655 0.001 V
# 0x10 0x0E 0x48: Cell 16 3656 0.001 V
# 0x80 0x00 0x1D: Read power tube temperature 29°C 1.0 °C
# ---> 99 = 99°C, 100 = 100°C, 101 = -1°C, 140 = -40°C
# 0x81 0x00 0x1E: Read the temperature in the battery box 30°C 1.0 °C
# 0x82 0x00 0x1C: Read battery temperature 28°C 1.0 °C
# 0x83 0x16 0xCD: Total battery voltage 5837 * 0.01 = 58.37V 0.01 V
# 0x84 0x80 0xD0: Current data 32976 0.01 A
# 0x85 0x63: Battery remaining capacity 99% soc
# 0x86 0x02: Number of battery temperature sensors 2 1.0 count
# 0x87 0x00 0x04: Number of battery cycles 4 1.0 count
# 0x89 0x00 0x00 0x00 0x00: Total battery cycle capacity
# 0x8A 0x00 0x10: Total number of battery strings 16 1.0 count
# 0x8B 0x04 0x00: Battery warning message 0000010000000000 OVP
#
# Bit 0 Low capacity 1 (alarm), 0 (normal) warning
# Bit 1 Power tube overtemperature 1 (alarm), 0 (normal) alarm
# Bit 2 Charging overvoltage 1 (alarm), 0 (normal) alarm
# Bit 3 Discharging undervoltage 1 (alarm), 0 (normal) alarm
# Bit 4 Battery over temperature 1 (alarm), 0 (normal) alarm
# Bit 5 Charging overcurrent 1 (alarm), 0 (normal) alarm
# Bit 6 Discharging overcurrent 1 (alarm), 0 (normal) alarm
# Bit 7 Cell pressure difference 1 (alarm), 0 (normal) alarm
# Bit 8 Overtemperature alarm in the battery box 1 (alarm), 0 (normal) alarm
# Bit 9 Battery low temperature 1 (alarm), 0 (normal) alarm
# Bit 10 Cell overvoltage 1 (alarm), 0 (normal) alarm
# Bit 11 Cell undervoltage 1 (alarm), 0 (normal) alarm
# Bit 12 309_A protection 1 (alarm), 0 (normal) alarm
# Bit 13 309_A protection 1 (alarm), 0 (normal) alarm
# Bit 14 Reserved
# Bit 15 Reserved
#
# Examples:
# 0x0001 = 00000000 00000001: Low capacity alarm
# 0x0002 = 00000000 00000010: MOS tube over-temperature alarm
# 0x0003 = 00000000 00000011: Low capacity alarm AND power tube over-temperature alarm
# 0x8C 0x00 0x07: Battery status information 0000 0000 0000 0111
# Bit 0: Charging enabled 1 (on), 0 (off)
# Bit 1: Discharging enabled 1 (on), 0 (off)
# Bit 2: Balancer enabled 1 (on), 0 (off)
# Bit 3: Battery dropped(?) 1 (normal), 0 (offline)
# Bit 4...15: Reserved
# Example: 0000 0000 0000 0111 -> Charging + Discharging + Balancer enabled
# 0x8E 0x16 0xD0: Total voltage overvoltage protection 5840 * 0.01 = 58.40V 0.01 V
# 0x8F 0x0F 0xA0: Total voltage undervoltage protection 4000 * 0.01 = 40.00V 0.01 V
# 0x90 0x0E 0x42: Cell overvoltage protection voltage 3650 * 0.001 = 3.650V 0.001 V
# 0x91 0x0D 0xDE: Cell overvoltage recovery voltage 3550 * 0.001 = 3.600V 0.001 V
# 0x92 0x00 0x05: Cell overvoltage protection delay 5s 1.0 s
# 0x93 0x09 0xC4: Cell undervoltage protection voltage 2500 * 0.001 = 2.500V 0.001 V
# 0x94 0x0A 0x28: Cell undervoltage recovery voltage 2600 * 0.001 = 3.100V 0.001 V
# 0x95 0x00 0x05: Cell undervoltage protection delay 5s 1.0 s
# 0x96 0x01 0x2C: Cell pressure difference protection value 300 * 0.001 = 0.300V 0.001 V 0.000-1.000V
# 0x97 0x00 0x96: Discharge overcurrent protection value 150A 1.0 A
# 0x98 0x00 0x03: Discharge overcurrent delay 3s 1.0 s
# 0x99 0x00 0x96: Charging overcurrent protection value 150A 1.0 A
# 0x9A 0x00 0x05: Charge overcurrent delay 5s 1.0 s
# 0x9B 0x0D 0x7A: Balanced starting voltage 3450 * 0.001 = 3.450V 0.001 V
# 0x9C 0x00 0x05: Balanced opening pressure difference 5 * 0.001 = 0.005V 0.001 V 0.01-1V
# 0x9D 0x01: Active balance switch 1 (on) Bool 0 (off), 1 (on)
# 0x9E 0x00 0x5A: Power tube temperature protection value 90°C 1.0 °C 0-100°C
# 0x9F 0x00 0x46: Power tube temperature recovery value 70°C 1.0 °C 0-100°C
# 0xA0 0x00 0x64: Temperature protection value in the battery box 100°C 1.0 °C 40-100°C
# 0xA1 0x00 0x64: Temperature recovery value in the battery box 100°C 1.0 °C 40-100°C
# 0xA2 0x00 0x14: Battery temperature difference protection value 20°C 1.0 °C 5-10°C
# 0xA3 0x00 0x46: Battery charging high temperature protection value 70°C 1.0 °C 0-100°C
# 0xA4 0x00 0x46: Battery discharge high temperature protection value 70°C 1.0 °C 0-100°C
# 0xA5 0xFF 0xEC: Charging low temperature protection value -20°C 1.0 °C -45...25°C
# 0xA6 0xFF 0xF6: Charging low temperature protection recovery value -10°C 1.0 °C -45...25°C
# 0xA7 0xFF 0xEC: Discharge low temperature protection value -20°C 1.0 °C -45...25°C
# 0xA8 0xFF 0xF6: Discharge low temperature protection recovery value -10°C 1.0 °C -45...25°C
# 0xA9 0x10: Battery string setting 16 1.0 count
# 0xAA 0x00 0x00 0x01 0x18: Total battery capacity setting 280 Ah 1.0 Ah
# 0xAB 0x01: Charging MOS tube switch 1 (on) Bool 0 (off), 1 (on)
# 0xAC 0x01: Discharge MOS tube switch 1 (on) Bool 0 (off), 1 (on)
# 0xAD 0x04 0x11: Current calibration 1041mA * 0.001 = 1.041A 0.001 A 0.1-2.0A
# 0xAE 0x01: Protection board address 1 1.0
# 0xAF 0x00: Battery Type 0 1.0
# ---> 0 (lithium iron phosphate), 1 (ternary), 2 (lithium titanate)
# 0xB0 0x00 0x0A: Sleep waiting time 10s 1.0 s
# 0xB1 0x14: Low volume alarm 20% 1.0 % 0-80%
# 0xB2 0x31 0x32 0x33 0x34 0x35 0x36 0x00 0x00 0x00 0x00: Modify parameter password
# 0xB3 0x00: Dedicated charger switch 1 (on) Bool 0 (off), 1 (on)
# 0xB4 0x49 0x6E 0x70 0x75 0x74 0x20 0x55 0x73: Device ID code
# 0xB5 0x32 0x31 0x30 0x31: Date of manufacture
# 0xB6 0x00 0x00 0xE2 0x00: System working hours
# 0xB7 0x48 0x36 0x2E 0x58 0x5F 0x5F 0x53
# 0x36 0x2E 0x31 0x2E 0x33 0x53 0x5F 0x5F: Software version number
# 0xB8 0x00: Whether to start current calibration
# 0xB9 0x00 0x00 0x00 0x00: Actual battery capacity
# Firmware version >= 10.10 required
# See https://github.com/syssi/esphome-jk-bms/issues/212 for details
# 0xBA 0x42 0x54 0x33 0x30 0x37 0x32 0x30 0x32 0x30 0x31 0x32 0x30
# 0x30 0x30 0x30 0x32 0x30 0x30 0x35 0x32 0x31 0x30 0x30 0x31: Manufacturer ID naming
# 0xC0 0x01: Protocol version number
# 00 00 00 00 68 00 00 54 D1: End of frame
-26
View File
@@ -1,26 +0,0 @@
# Updated : 2024.07.25
# Version : 1.1.4
# GitHub : https://github.com/Sleeper85/esphome-yambms
switch:
- platform: template
name: "Fake inverter ACK"
id: switch_fake_inverter_ack
restore_mode: RESTORE_DEFAULT_ON
optimistic: true
entity_category: config
# Inverter ACK simulation
canbus:
- id: !extend canbus_node2
on_frame:
- can_id: 0x356
then:
- if:
condition:
lambda: return (id(switch_fake_inverter_ack).state);
then:
- canbus.send:
canbus_id: canbus_node2
can_id: 0x305
data: [0, 0, 0, 0, 0, 0, 0, 0]
+17 -18
View File
@@ -1,6 +1,6 @@
# Updated : 2024.08.28
# Version : 1.4.4
# GitHub : https://github.com/Sleeper85/esphome-yamshunt
# Updated : 2024.11.11
# Version : 1.5.1
# GitHub : https://github.com/Sleeper85/esphome-yambms
# This YAML is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -47,7 +47,7 @@ esphome:
on_boot:
then:
# Shunt counter (total)
- lambda: id(${yambms_id}_shunt_counter) += 1;
- lambda: id(${yambms_id}_var_shunt_counter) += 1;
interval:
- interval: ${shunt_combine_interval}
@@ -58,11 +58,11 @@ interval:
{
if (id(shunt${shunt_id}_combined_once) == false)
{
// Can be combined shunt counter
id(${yambms_id}_can_be_combined_shunt_counter) += 1;
// To combine shunt counter
id(${yambms_id}_var_to_combine_shunt_counter) += 1;
// Shunt use (replace BMS infos)
id(${yambms_id}_shunt_use) = true;
id(${yambms_id}_var_shunt_use) = true;
// Combined
id(shunt${shunt_id}_combined_once) = true;
@@ -71,32 +71,31 @@ interval:
// Uncombine once
else if (id(shunt${shunt_id}_combined_once) == true)
{
// Can be combined shunt counter
id(${yambms_id}_can_be_combined_shunt_counter) -= 1;
// To combine shunt counter
id(${yambms_id}_var_to_combine_shunt_counter) -= 1;
// Shunt use (replace BMS infos)
if (id(${yambms_id}_can_be_combined_shunt_counter) == 0) id(${yambms_id}_shunt_use) = false;
if (id(${yambms_id}_var_to_combine_shunt_counter) == 0) id(${yambms_id}_var_shunt_use) = false;
// Uncombined
id(shunt${shunt_id}_combined_once) = false;
}
// Combine continuously (all Shunt)
if (id(${yambms_id}_processed_shunt_counter) < id(${yambms_id}_shunt_counter))
if (id(${yambms_id}_var_to_combine_shunt_number) == ${shunt_id})
{
// Shunt processed counter
id(${yambms_id}_processed_shunt_counter) += 1;
// Combine only if the device is able to be included in combine
if (id(shunt${shunt_id}_can_be_combined).state)
{
// TOTAL voltage
id(${yambms_id}_shunt_total_voltage) += id(shunt${shunt_id}_voltage).state;
id(${yambms_id}_var_shunt_total_voltage) += id(shunt${shunt_id}_voltage).state;
// TOTAL current
id(${yambms_id}_shunt_total_current) += id(shunt${shunt_id}_current).state;
id(${yambms_id}_var_shunt_total_current) += id(shunt${shunt_id}_current).state;
// TOTAL power
id(${yambms_id}_shunt_total_power) += id(shunt${shunt_id}_power).state;
id(${yambms_id}_var_shunt_total_power) += id(shunt${shunt_id}_power).state;
// TOTAL soc
id(${yambms_id}_shunt_total_soc) += id(shunt${shunt_id}_soc).state;
id(${yambms_id}_var_shunt_total_soc) += id(shunt${shunt_id}_soc).state;
}
// To combine shunt number
id(${yambms_id}_var_to_combine_shunt_number)++;
}
@@ -1,5 +1,5 @@
# Updated : 2024.08.08
# Version : 1.1.1
# Updated : 2024.11.11
# Version : 1.1.2
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -22,7 +22,7 @@ packages:
shunt_combine: !include shunt_combine.yaml
sensor:
# total_voltage MEAN
# total_voltage
- platform: template
id: shunt${shunt_id}_voltage
name: "${name} ${shunt_name} Voltage"
@@ -34,9 +34,9 @@ sensor:
- or:
- throttle: 10s
- delta: 0.01
lambda: return 54.32;
lambda: return ${shunt_voltage};
# current SUM
# current
- platform: template
id: shunt${shunt_id}_current
name: "${name} ${shunt_name} Current"
@@ -48,9 +48,9 @@ sensor:
- or:
- throttle: 10s
- delta: 0.1
lambda: return 12.3;
lambda: return ${shunt_current};
# power SUM
# power
- platform: template
id: shunt${shunt_id}_power
name: "${name} ${shunt_name} Power"
@@ -62,9 +62,9 @@ sensor:
- or:
- throttle: 10s
- delta: 1
lambda: return 668;
lambda: return ${shunt_power};
# state_of_charge MEAN
# state_of_charge
- platform: template
id: shunt${shunt_id}_soc
name: "${name} ${shunt_name} SoC"
@@ -76,4 +76,4 @@ sensor:
- or:
- throttle: 10s
- delta: 1
lambda: return 96;
lambda: return ${shunt_soc};
@@ -1,4 +1,4 @@
# Updated : 2024.10.03
# Updated : 2024.10.17
# Version : 1.1.2
# GitHub : https://github.com/Sleeper85/esphome-junctek_khf
@@ -17,9 +17,13 @@
# 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:
# shunt_base: !include shunt_base.yaml
# shunt_combine: !include shunt_combine.yaml
packages:
shunt_base: !include shunt_base.yaml
shunt_combine: !include shunt_combine.yaml
# +--------------------------------------+
# | Component settings |
# +--------------------------------------+
external_components:
- source: github://Sleeper85/esphome-junctek_khf@main
@@ -28,14 +32,15 @@ external_components:
# type: local
# path: components
# uart:
# - id: !extend ${shunt_uart_id}
# baud_rate: 115200
# rx_buffer_size: 384
# UART baud_rate : 115200
# +--------------------------------------+
# | Component entities |
# +--------------------------------------+
# Platform :
# junctek_khf : with display version (UART and RS485)
# junctek_khf_wod : without display version (only RS485)
# junctek_khf : version with the screen connected (UART and RS485)
# junctek_khf_rs485 : version without the screen connected (only RS485)
sensor:
- platform: junctek_khf
uart_id: ${shunt_uart_id}
@@ -0,0 +1,106 @@
# Updated : 2024.11.11
# Version : 1.1.1
# GitHub : https://github.com/Fabian-Schmidt/esphome-victron_ble
# 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:
shunt_base: !include shunt_base.yaml
shunt_combine: !include shunt_combine.yaml
# +--------------------------------------+
# | Component settings |
# +--------------------------------------+
external_components:
- source: github://Fabian-Schmidt/esphome-victron_ble
refresh: 0s
esp32_ble_tracker:
victron_ble:
- id: victron_ble${shunt_id}
mac_address: ${shunt_mac_address}
bindkey: ${shunt_encryption_key}
# +--------------------------------------+
# | Component entities |
# +--------------------------------------+
# A SmartShunt is a Battery monitor. Therefore the following sensor values are available:
# BATTERY_VOLTAGE in V
# BATTERY_CURRENT in A
# BATTERY_POWER in W
# STATE_OF_CHARGE in %
# CONSUMED_AH in Ah
# AUX_VOLTAGE in V (*)
# MID_VOLTAGE in V (*)
# TEMPERATURE in °C (*)
# TIME_TO_GO in minutes
# (*) Available if device aux port is configured.
# The amount of charged and discharged energy is in the field CONSUMED_AH.
# The battery SOC is in the field STATE_OF_CHARGE.
# These are all available fields transmitted by the Victron Battery Shunt. I cannot add additional fields.
sensor:
- platform: victron_ble
victron_ble_id: victron_ble${shunt_id}
name: "${name} ${shunt_name} Time remaining"
type: TIME_TO_GO
- platform: victron_ble
victron_ble_id: victron_ble${shunt_id}
id: shunt${shunt_id}_voltage
name: "${name} ${shunt_name} Voltage"
type: BATTERY_VOLTAGE
- platform: victron_ble
victron_ble_id: victron_ble${shunt_id}
id: shunt${shunt_id}_current
name: "${name} ${shunt_name} Current"
type: BATTERY_CURRENT
- platform: victron_ble
victron_ble_id: victron_ble${shunt_id}
id: shunt${shunt_id}_power
name: "${name} ${shunt_name} Power"
type: BATTERY_POWER
- platform: victron_ble
victron_ble_id: victron_ble${shunt_id}
id: shunt${shunt_id}_soc
name: "${name} ${shunt_name} State of Charge"
type: STATE_OF_CHARGE
- platform: victron_ble
victron_ble_id: victron_ble${shunt_id}
name: "${name} ${shunt_name} Consumed Ah"
type: CONSUMED_AH
# - platform: victron_ble
# victron_ble_id: victron_ble${shunt_id}
# name: "${name} ${shunt_name} Starter Battery" # BAUX_VOLTAGE or MID_VOLTAGE or TEMPERATURE, depending on configuration of SmartShunt.
# type: AUX_VOLTAGE
binary_sensor:
- platform: victron_ble
victron_ble_id: victron_ble${shunt_id}
name: "${name} ${shunt_name} Battery has Alarm"
type: ALARM
text_sensor:
- platform: victron_ble
victron_ble_id: victron_ble${shunt_id}
name: "${name} ${shunt_name} Battery Alarm reason"
type: ALARM_REASON
@@ -0,0 +1,76 @@
# Updated : 2024.11.11
# Version : 1.1.1
# GitHub : https://github.com/Fabian-Schmidt/esphome-victron_ble
# 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:
shunt_base: !include shunt_base.yaml
shunt_combine: !include shunt_combine.yaml
# +--------------------------------------+
# | Component settings |
# +--------------------------------------+
external_components:
- source: github://Fabian-Schmidt/esphome-victron_ble
refresh: 0s
esp32_ble:
io_capability: keyboard_only
esp32_ble_tracker:
ble_client:
- mac_address: ${shunt_mac_address}
id: ble_client${shunt_id}
on_passkey_request:
then:
- logger.log: "Authenticating with passkey"
- ble_client.passkey_reply:
id: ble_client${shunt_id}
passkey: ${shunt_ble_passkey}
# +--------------------------------------+
# | Component entities |
# +--------------------------------------+
sensor:
- platform: victron_ble_connect
ble_client_id: ble_client${shunt_id}
# Notify supports max 7 sensors
notify: true
# If notify is active then on every update_interval sensors are updated.
# If notify is disabled then on every update_interval a new connection to victron is made.
update_interval: ${shunt_update_interval} # 20s
state_of_charge:
id: shunt${shunt_id}_soc
name: "${name} ${shunt_name} State of Charge"
voltage:
id: shunt${shunt_id}_voltage
name: "${name} ${shunt_name} Voltage"
current:
id: shunt${shunt_id}_current
name: "${name} ${shunt_name} Current"
power:
id: shunt${shunt_id}_power
name: "${name} ${shunt_name} Power"
ah:
name: "${name} ${shunt_name} Consumed Ah"
starter_battery_voltage:
name: "${name} ${shunt_name} Starter Battery Voltage"
remaining_time:
name: "${name} ${shunt_name} Remaining Time"
@@ -1,5 +1,5 @@
# Updated : 2024.08.08
# Version : 1.1.1
# Updated : 2024.10.17
# Version : 1.1.2
# GitHub : https://github.com/KinDR007/VictronMPPT-ESPHOME
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -21,23 +21,33 @@ packages:
shunt_base: !include shunt_base.yaml
shunt_combine: !include shunt_combine.yaml
# +--------------------------------------+
# | Component settings |
# +--------------------------------------+
external_components:
- source: github://KinDR007/VictronMPPT-ESPHOME@main
refresh: 0s
# UART baud_rate: 19200
# UART rx_buffer_size: 256
uart:
- id: !extend ${shunt_uart_id}
baud_rate: 19200
rx_buffer_size: 256
victron:
uart_id: ${shunt_uart_id}
id: victron0
throttle: ${shunt_update_interval}
- uart_id: ${shunt_uart_id}
id: victron${shunt_id}
throttle: ${shunt_update_interval}
# +--------------------------------------+
# | Component entities |
# +--------------------------------------+
sensor:
- platform: victron
victron_id: victron0
victron_id: victron${shunt_id}
battery_voltage:
id: shunt${shunt_id}_voltage
name: "${name} ${shunt_name} battery voltage"
@@ -103,7 +113,7 @@ sensor:
text_sensor:
- platform: victron
victron_id: victron0
victron_id: victron${shunt_id}
alarm_condition_active:
name: "${name} ${shunt_name} alarm condition active"
alarm_reason:
@@ -121,6 +131,6 @@ text_sensor:
binary_sensor:
- platform: victron
victron_id: victron0
victron_id: victron${shunt_id}
relay_state:
name: "${name} ${shunt_name} relay state"
@@ -0,0 +1,132 @@
# Updated : 2024.10.17
# Version : 1.1.2
# GitHub : https://github.com/KinDR007/VictronMPPT-ESPHOME
# 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:
shunt_base: !include shunt_base.yaml
shunt_combine: !include shunt_combine.yaml
# +--------------------------------------+
# | Component settings |
# +--------------------------------------+
external_components:
- source: github://KinDR007/VictronMPPT-ESPHOME@main
refresh: 0s
# UART baud_rate: 19200
# UART rx_buffer_size: 256
victron:
- uart_id: ${shunt_uart_id}
id: victron${shunt_id}
throttle: ${shunt_update_interval}
# +--------------------------------------+
# | Component entities |
# +--------------------------------------+
sensor:
- platform: victron
victron_id: victron${shunt_id}
battery_voltage:
id: shunt${shunt_id}_voltage
name: "${name} ${shunt_name} battery voltage"
auxiliary_battery_voltage:
name: "${name} ${shunt_name} auxiliary battery voltage"
midpoint_voltage_of_the_battery_bank:
name: "${name} ${shunt_name} midpoint voltage of the battery bank"
midpoint_deviation_of_the_battery_bank:
name: "${name} ${shunt_name} midpoint deviation of the battery bank"
battery_current:
id: shunt${shunt_id}_current
name: "${name} ${shunt_name} battery current"
battery_temperature:
name: "${name} ${shunt_name} battery temperature"
instantaneous_power:
id: shunt${shunt_id}_power
name: "${name} ${shunt_name} instantaneous power"
consumed_amp_hours:
name: "${name} ${shunt_name} consumed amp hours"
state_of_charge:
id: shunt${shunt_id}_soc
name: "${name} ${shunt_name} state of charge"
time_to_go:
name: "${name} ${shunt_name} time to go"
depth_of_the_deepest_discharge:
name: "${name} ${shunt_name} depth of the deepest discharge"
depth_of_the_last_discharge:
name: "${name} ${shunt_name} depth of the last discharge"
depth_of_the_average_discharge:
name: "${name} ${shunt_name} depth of the average discharge"
number_of_charge_cycles:
name: "${name} ${shunt_name} number of charge cycles"
number_of_full_discharges:
name: "${name} ${shunt_name} number of full discharges"
cumulative_amp_hours_drawn:
name: "${name} ${shunt_name} cumulative amp hours drawn"
min_battery_voltage:
name: "${name} ${shunt_name} min battery voltage"
max_battery_voltage:
name: "${name} ${shunt_name} max battery voltage"
last_full_charge:
name: "${name} ${shunt_name} last full charge"
number_of_automatic_synchronizations:
name: "${name} ${shunt_name} number of automatic synchronizations"
number_of_low_main_voltage_alarms:
name: "${name} ${shunt_name} number of low main voltage alarms"
number_of_high_main_voltage_alarms:
name: "${name} ${shunt_name} number of high main voltage alarms"
number_of_low_auxiliary_voltage_alarms:
name: "${name} ${shunt_name} number of low auxiliary voltage alarms"
number_of_high_auxiliary_voltage_alarms:
name: "${name} ${shunt_name} number of high auxiliary voltage alarms"
min_auxiliary_battery_voltage:
name: "${name} ${shunt_name} min auxiliary battery voltage"
max_auxiliary_battery_voltage:
name: "${name} ${shunt_name} max auxiliary battery voltage"
amount_of_discharged_energy:
name: "${name} ${shunt_name} amount of discharged energy"
amount_of_charged_energy:
name: "${name} ${shunt_name} amount of charged energy"
dc_monitor_mode_id:
name: "${name} ${shunt_name} dc monitor mode id"
text_sensor:
- platform: victron
victron_id: victron${shunt_id}
alarm_condition_active:
name: "${name} ${shunt_name} alarm condition active"
alarm_reason:
name: "${name} ${shunt_name} alarm reason"
model_description:
name: "${name} ${shunt_name} model description"
firmware_version:
name: "${name} ${shunt_name} firmware version"
device_type:
name: "${name} ${shunt_name} device type"
serial_number:
name: "${name} ${shunt_name} serial number"
dc_monitor_mode:
name: "${name} ${shunt_name} dc monitor mode"
binary_sensor:
- platform: victron
victron_id: victron${shunt_id}
relay_state:
name: "${name} ${shunt_name} relay state"
+94 -114
View File
@@ -1,5 +1,5 @@
# Updated : 2024.10.03
# Version : 1.4.5
# Updated : 2024.11.11
# Version : 1.5.1
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -31,21 +31,6 @@ packages:
# Custom user config
# yambms_custom: !include yambms_custom.yaml
substitutions:
# +----------------------------------------------------------------+
# Information from the EVE LF280K v2 cell datasheet
# LFP Recommended Operating Temperature Range : 10~45°C
# Number of cycles at 25°C : 6000
# Number of cycles at 45°C : 2500
# >= 60°C : Never charging or discharging
# <= 0°C : Never charging
# <= -30°C : Never discharging
# +----------------------------------------------------------------+
# Over Temp Protection, Temp > OTP = Stop Charging and Discharging
yambms_otp: "45.0"
# Under Temp Protection, Temp < UTP = Stop Charging
yambms_utp: "1.0"
# Execute once
esphome:
on_boot:
@@ -57,34 +42,37 @@ esphome:
if (${yambms_battery_chemistry} == 1) // LFP
{
// LFP
id(${yambms_id}_mominal_v) = 3.20;
id(${yambms_id}_min_charge_v) = 3.37; // Fully charged at rest
id(${yambms_id}_max_charge_v) = 3.65;
id(${yambms_id}_cell_mominal_v) = 3.20;
id(${yambms_id}_cell_min_charge_v) = 3.37; // Fully charged at rest
id(${yambms_id}_cell_max_charge_v) = 3.65;
id(${yambms_id}_cell_max_discharge_v) = 3.00; // Not used
}
else if (${yambms_battery_chemistry} == 2) // Li-ion
{
// Li-ion
id(${yambms_id}_mominal_v) = 3.60;
id(${yambms_id}_min_charge_v) = 3.90;
id(${yambms_id}_max_charge_v) = 4.20;
id(${yambms_id}_cell_mominal_v) = 3.60;
id(${yambms_id}_cell_min_charge_v) = 3.90;
id(${yambms_id}_cell_max_charge_v) = 4.20;
id(${yambms_id}_cell_max_discharge_v) = 3.20; // Not used
}
else if (${yambms_battery_chemistry} == 3) // LTO
{
// LTO
id(${yambms_id}_mominal_v) = 2.40;
id(${yambms_id}_min_charge_v) = 2.55; // Fully charged at rest
id(${yambms_id}_max_charge_v) = 2.85;
id(${yambms_id}_cell_mominal_v) = 2.40;
id(${yambms_id}_cell_min_charge_v) = 2.55; // Fully charged at rest
id(${yambms_id}_cell_max_charge_v) = 2.85;
id(${yambms_id}_cell_max_discharge_v) = 2.00; // Not used
}
int cell_count = ${yambms_cell_count};
// Bulk V.
id(${yambms_id}_bulk_voltage).traits.set_min_value(round(cell_count * id(${yambms_id}_min_charge_v) * 10) / 10);
id(${yambms_id}_bulk_voltage).traits.set_max_value(round(cell_count * id(${yambms_id}_max_charge_v) * 10) / 10);
id(${yambms_id}_bulk_voltage).traits.set_min_value(round(cell_count * id(${yambms_id}_cell_min_charge_v) * 10) / 10);
id(${yambms_id}_bulk_voltage).traits.set_max_value(round(cell_count * id(${yambms_id}_cell_max_charge_v) * 10) / 10);
// Float V.
id(${yambms_id}_float_voltage).traits.set_min_value(round(cell_count * (id(${yambms_id}_min_charge_v) - 0.1) * 10) / 10);
id(${yambms_id}_float_voltage).traits.set_max_value(round(cell_count * (id(${yambms_id}_min_charge_v) + 0.1) * 10) / 10);
id(${yambms_id}_float_voltage).traits.set_min_value(round(cell_count * (id(${yambms_id}_cell_min_charge_v) - 0.1) * 10) / 10);
id(${yambms_id}_float_voltage).traits.set_max_value(round(cell_count * (id(${yambms_id}_cell_min_charge_v) + 0.1) * 10) / 10);
// Rebulk V.
id(${yambms_id}_rebulk_voltage).traits.set_min_value(round(cell_count * id(${yambms_id}_mominal_v) * 10) / 10);
id(${yambms_id}_rebulk_voltage).traits.set_max_value(round(cell_count * id(${yambms_id}_min_charge_v) * 10) / 10);
id(${yambms_id}_rebulk_voltage).traits.set_min_value(round(cell_count * id(${yambms_id}_cell_mominal_v) * 10) / 10);
id(${yambms_id}_rebulk_voltage).traits.set_max_value(round(cell_count * id(${yambms_id}_cell_min_charge_v) * 10) / 10);
globals:
- id: ${yambms_id}_service
@@ -101,15 +89,19 @@ globals:
- id: ${yambms_id}_canbus_protocol
type: std::string
restore_value: no
- id: ${yambms_id}_mominal_v
- id: ${yambms_id}_cell_mominal_v
type: float
restore_value: no
initial_value: '0.0'
- id: ${yambms_id}_min_charge_v
- id: ${yambms_id}_cell_min_charge_v
type: float
restore_value: no
initial_value: '0.0'
- id: ${yambms_id}_max_charge_v
- id: ${yambms_id}_cell_max_charge_v
type: float
restore_value: no
initial_value: '0.0'
- id: ${yambms_id}_cell_max_discharge_v
type: float
restore_value: no
initial_value: '0.0'
@@ -410,16 +402,42 @@ sensor:
- throttle: 10s
- delta: 0.1
lambda: |-
if (id(${yambms_id}_bms_combined).state == 0) // no BMS combined
return 0;
// Bulk
if (id(${yambms_id}_charging_instruction).state == "Bulk"){
if(id(${yambms_id}_auto_cvl) == -1.0) return (id(${yambms_id}_bulk_voltage).state + id(${yambms_id}_inverter_offset_v).state); // Auto CVL not used
else return (id(${yambms_id}_auto_cvl) + id(${yambms_id}_inverter_offset_v).state);
else if (id(${yambms_id}_charging_instruction).state == "Bulk")
{
if(id(${yambms_id}_auto_cvl) == -1.0) // Auto CVL not used
return (id(${yambms_id}_bulk_voltage).state + id(${yambms_id}_inverter_offset_v).state);
else
return (id(${yambms_id}_auto_cvl) + id(${yambms_id}_inverter_offset_v).state);
}
// Float
else if (id(${yambms_id}_charging_instruction).state == "Float") return (id(${yambms_id}_float_voltage).state + id(${yambms_id}_inverter_offset_v).state);
else if (id(${yambms_id}_charging_instruction).state == "Float")
return (id(${yambms_id}_float_voltage).state + id(${yambms_id}_inverter_offset_v).state);
// Stop Charging
else return (id(${yambms_id}_rebulk_voltage).state + id(${yambms_id}_inverter_offset_v).state);
# +--------------------------------------+
# | Requested Discharge Voltage (DVL) |
# +--------------------------------------+
- platform: template
name: ${name} ${yambms_name} Requested Discharge Voltage
id: ${yambms_id}_requested_discharge_voltage
unit_of_measurement: V
device_class: voltage
update_interval: ${yambms_update_interval}
accuracy_decimals: 1
filters:
- or:
- throttle: 10s
- delta: 0.1
lambda: |-
if (id(${yambms_id}_bms_combined).state == 0) // no BMS combined
return 0;
else
return ((id(${yambms_id}_cell_uvp).state + 0.2) * id(${yambms_id}_cell_count).state);
# +--------------------------------------+
# | Requested Charge Current (CCL) |
# +--------------------------------------+
@@ -436,29 +454,16 @@ sensor:
- delta: 0.1
lambda: |-
// Charging Allowed
if ((id(${yambms_id}_charging_instruction).state == "Bulk") | (id(${yambms_id}_charging_instruction).state == "Float")){
if(id(${yambms_id}_auto_ccl) == -1.0) return id(${yambms_id}_max_charge_current).state; // Auto CCL not used
else return id(${yambms_id}_auto_ccl);
if ((id(${yambms_id}_charging_instruction).state == "Bulk") | (id(${yambms_id}_charging_instruction).state == "Float"))
{
if(id(${yambms_id}_auto_ccl) == -1.0) // Auto CCL not used
return id(${yambms_id}_max_charge_current).state;
else
return id(${yambms_id}_auto_ccl);
}
// Charging Not Allowed
else return 0;
# +--------------------------------------+
# | Requested Discharge Voltage (DVL) |
# +--------------------------------------+
- platform: template
name: ${name} ${yambms_name} Requested Discharge Voltage
id: ${yambms_id}_requested_discharge_voltage
unit_of_measurement: V
device_class: voltage
update_interval: ${yambms_update_interval}
accuracy_decimals: 1
filters:
- or:
- throttle: 10s
- delta: 0.1
lambda: return (id(${yambms_id}_cell_uvpr).state * id(${yambms_id}_cell_count).state);
# +--------------------------------------+
# | Requested Discharge Current (DCL) |
# +--------------------------------------+
@@ -475,11 +480,14 @@ sensor:
- delta: 0.1
lambda: |-
// Discharging Allowed
if (id(${yambms_id}_discharging_instruction).state == true){
if(id(${yambms_id}_auto_dcl) == -1.0) return id(${yambms_id}_max_discharge_current).state; // Auto DCL not used
else return id(${yambms_id}_auto_dcl);
if (id(${yambms_id}_discharging_instruction).state == true)
{
if(id(${yambms_id}_auto_dcl) == -1.0) // Auto DCL not used
return id(${yambms_id}_max_discharge_current).state;
else
return id(${yambms_id}_auto_dcl);
}
// Stop Discharging
// Discharging Not Allowed
else return 0;
# +--------------------------------------+
@@ -499,8 +507,9 @@ sensor:
lambda: |-
float soc = id(${yambms_id}_state_of_charge).state;
float min_cell_v = id(${yambms_id}_min_cell_voltage).state;
float cell_uvpr = id(${yambms_id}_cell_uvpr).state;
if (min_cell_v <= cell_uvpr) return 0; // Real 0% Sending 0%
float cell_low_v = (id(${yambms_id}_cell_uvp).state + 0.2);
if (id(${yambms_id}_bms_combined).state == 0) return 0; // no BMS combined
else if (min_cell_v <= cell_low_v) return 0; // Real 0% Sending 0%
else if (soc < 1) return 2; // False 0% sending 2%
else if (soc < 99) return soc; // SOC < 99% => Sending BMS SOC
// Useful for some inverters, will not send 100% until charging is complete
@@ -521,7 +530,9 @@ sensor:
- or:
- throttle: 10s
- delta: 1
lambda: return round(((id(${yambms_id}_charging_cycles).state/${yambms_max_cycles})-1)*-100);
lambda: |-
if (id(${yambms_id}_bms_combined).state == 0) return 0; // no BMS combined
else return round(((id(${yambms_id}_charging_cycles).state/${yambms_max_cycles})-1)*-100);
# +--------------------------------------+
# | Cell Count |
@@ -563,29 +574,17 @@ text_sensor:
// Warning : information from JK BMS is not available immediately after boot
// YamBMS Alarm ?
if ((id(${yambms_id}_alarm).state != "NoAlarm") & (id(${yambms_id}_alarm).state != "Warning")) id(${yambms_id}_charge_status) = "Alarm";
// YamBMS Alarm ended ?
else if ((id(${yambms_id}_charge_status) == "Alarm") & ((id(${yambms_id}_alarm).state == "NoAlarm") | (id(${yambms_id}_alarm).state == "Warning")))
{
if (id(${yambms_id}_eoc) == true)
{
if (id(${yambms_id}_switch_float).state) id(${yambms_id}_charge_status) = "Float";
else id(${yambms_id}_charge_status) = "EOC";
}
else id(${yambms_id}_charge_status) = "Wait";
}
// EOC => Float
else if ((id(${yambms_id}_charge_status) == "EOC") & (id(${yambms_id}_switch_float).state)) id(${yambms_id}_charge_status) = "Float";
if ((id(${yambms_id}_charge_status) == "EOC") & (id(${yambms_id}_switch_float).state)) id(${yambms_id}_charge_status) = "Float";
// No Float => EOC
else if ((id(${yambms_id}_charge_status) == "Float") & (!id(${yambms_id}_switch_float).state)) id(${yambms_id}_charge_status) = "EOC";
// No Force Bulk => Wait
else if ((id(${yambms_id}_charge_status) == "Force Bulk") & (!id(${yambms_id}_switch_force_bulk).state)) id(${yambms_id}_charge_status) = "Wait";
// +-----------------------------------------------+
// | Charge ON : BMS and ESP charging switch is ON |
// | Charging allowed (BMS and YamBMS) |
// +-----------------------------------------------+
else if ((id(${yambms_id}_bms_switch_charging).state) & (id(${yambms_id}_switch_charging).state)) {
else if ((id(${yambms_id}_charging_allowed).state) & (id(${yambms_id}_switch_charging).state)) {
// Variables
float cell_bulk_v = (id(${yambms_id}_bulk_voltage).state / id(${yambms_id}_cell_count).state);
@@ -623,8 +622,8 @@ text_sensor:
// +-----------------------------------------------+
if (id(${yambms_id}_current).state >= 0)
{
float cv_min = id(${yambms_id}_min_charge_v);
float cv_max = id(${yambms_id}_max_charge_v);
float cv_min = id(${yambms_id}_cell_min_charge_v);
float cv_max = id(${yambms_id}_cell_max_charge_v);
float cutoff_current = (id(${yambms_id}_battery_capacity).state * 0.05 * (cell_bulk_v - cv_min) / (cv_max - cv_min));
float cutoff_voltage = (cv_min + (cv_max - cv_min)/(0.05 + cutoff_offset_v) * (id(${yambms_id}_current).state / id(${yambms_id}_battery_capacity).state));
@@ -675,7 +674,7 @@ text_sensor:
}
}
}
// Charge OFF
// Charging allowed (BMS or YamBMS)
else id(${yambms_id}_charge_status) = "Wait";
ESP_LOGI("yambms", "Charge Status : %s", id(${yambms_id}_charge_status).c_str());
@@ -690,15 +689,10 @@ text_sensor:
update_interval: ${yambms_update_interval}
icon: mdi:battery-plus
lambda: |-
// Alarm > Stop Charging
if ((id(${yambms_id}_alarm).state == "Alarm") | (id(${yambms_id}_alarm).state == "OVP") | (id(${yambms_id}_alarm).state == "UTP") | (id(${yambms_id}_alarm).state == "COCP") | (id(${yambms_id}_alarm).state == "OTP") | (id(${yambms_id}_alarm).state == "BMS"))
{
return {"Stop"};
}
// Bulk Charge
else if ((id(${yambms_id}_charge_status) != "EOC") && (id(${yambms_id}_charge_status) != "Float") && (id(${yambms_id}_charge_status) != "Wait"))
if ((id(${yambms_id}_charge_status) != "EOC") && (id(${yambms_id}_charge_status) != "Float") && (id(${yambms_id}_charge_status) != "Wait"))
{
id(${yambms_id}_eoc) = false; // SOC 100% can't be sent
id(${yambms_id}_eoc) = false; // SoC 100% can't be sent
return {"Bulk"};
}
// Float Charge
@@ -712,10 +706,11 @@ text_sensor:
return {"Stop"};
}
// Wait
// Charging not allowed, alarms or charging switch OFF
else return {"Stop"};
# +--------------------------------------+
# | YamBMS Alarm and Warning |
# | YamBMS Alarm and Warning |
# +--------------------------------------+
# | Errors Bitmask (16bit) |
# +--------------------------------------+
@@ -755,8 +750,11 @@ text_sensor:
// Error Bitmask ?
uint16_t errors_bitmask = id(${yambms_id}_errors_bitmask_alarm).state;
int eb_counter = id(${yambms_id}_errors_bitmask_counter).state;
// At least one BMS in alarm
if ((eb_counter > 0) & (eb_counter < id(${yambms_id}_var_bms_counter))) return {"Warning"};
// All BMS are in alarm
if (errors_bitmask > 1) {
else if (errors_bitmask > 1) {
if ((errors_bitmask & 0x04) | (errors_bitmask & 0x80) | (errors_bitmask & 0x400)) { // Cell Over Voltage bit 2,7,10
return {"OVP"};
@@ -784,8 +782,6 @@ text_sensor:
}
else return {"Alarm"};
}
// At least one BMS in alarm
else if ((eb_counter > 0) & (eb_counter < id(${yambms_id}_bms_counter))) return {"Warning"};
// No Alarm
else return {"NoAlarm"};
@@ -796,20 +792,7 @@ text_sensor:
update_interval: ${yambms_update_interval}
entity_category: diagnostic
icon: mdi:battery-alert
lambda: |-
// Preventive Warning ?
if (id(${yambms_id}_bms_combined).state > 0){
// Over Temp Protection
if (id(${yambms_id}_max_temperature).state > ${yambms_otp}) {
return {"OTP"};
}
// Under Temp Protection
else if (id(${yambms_id}_min_temperature).state < ${yambms_utp}) {
return {"UTP"};
}
}
lambda: |-
// Error Bitmask ?
uint16_t errors_bitmask = id(${yambms_id}_errors_bitmask_warning).state;
if (errors_bitmask > 1) {
@@ -852,13 +835,11 @@ binary_sensor:
id: ${yambms_id}_discharging_instruction
icon: mdi:battery-minus
lambda: |-
// Alarm > Stop Discharging
if ((id(${yambms_id}_alarm).state == "Alarm") | (id(${yambms_id}_alarm).state == "UVP") | (id(${yambms_id}_alarm).state == "DOCP") | (id(${yambms_id}_alarm).state == "OTP") | (id(${yambms_id}_alarm).state == "BMS")) return false;
// BMS or ESP32 switch is OFF > Stop Discharging
else if ((!id(${yambms_id}_bms_switch_discharging).state) | (!id(${yambms_id}_switch_discharging).state)) return false;
// Discharging not allowed (all BMS or YamBMS)
if ((!id(${yambms_id}_discharging_allowed).state) | (!id(${yambms_id}_switch_discharging).state)) return false;
// Battery voltage is low > Stop Discharging
else if (id(${yambms_id}_total_voltage).state <= id(${yambms_id}_requested_discharge_voltage).state) return false;
// Discharging Allowed
// Discharging allowed
else return true;
# +--------------------------------------+
@@ -877,4 +858,3 @@ binary_sensor:
else return false;
}
else return false;
+6 -4
View File
@@ -1,5 +1,5 @@
# Updated : 2024.08.08
# Version : 1.2.1
# Updated : 2024.11.15
# Version : 1.2.2
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -53,10 +53,12 @@ sensor:
filters:
- lambda: !lambda |-
// Variables
double cell_bulk_v = (id(${yambms_id}_bulk_voltage).state / id(${yambms_id}_cell_count).state);
double cell_float_v = (id(${yambms_id}_float_voltage).state / id(${yambms_id}_cell_count).state);
double cell_high_v = ((id(${yambms_id}_cell_ovp).state + cell_bulk_v) / 2);
// Auto Charge Current function
if (id(${yambms_id}_max_cell_voltage).state > id(${yambms_id}_cell_ovpr).state) return 0.0;
else return max(0.0,(- pow(${charge_a_factor_curve_end}, pow( max(0.0, ((x - cell_float_v) / (id(${yambms_id}_cell_ovpr).state - cell_float_v))),${charge_a_factor_curve_shape}))+2) * id(${yambms_id}_max_charge_current).state);
if (id(${yambms_id}_max_cell_voltage).state > cell_high_v) return 0.0;
else return max(0.0,(- pow(${charge_a_factor_curve_end}, pow( max(0.0, ((x - cell_float_v) / (cell_high_v - cell_float_v))),${charge_a_factor_curve_shape}))+2) * id(${yambms_id}_max_charge_current).state);
# Second, an exponential moving average is calculated. This will be used to smooth the transition between different initial charge current values.
- platform: copy
source_id: auto_ccl_initial
+7 -5
View File
@@ -1,5 +1,5 @@
# Updated : 2024.08.08
# Version : 1.2.1
# Updated : 2024.11.15
# Version : 1.2.2
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -54,9 +54,11 @@ sensor:
internal: true
filters:
- lambda: !lambda |-
// Variables
double cell_low_v = id(${yambms_id}_cell_uvp).state + 0.2;
// Auto Discharge Current function
if (id(${yambms_id}_min_cell_voltage).state < id(${yambms_id}_cell_uvpr).state) return 0.0;
else return max(0.0,(- pow(${discharge_a_factor_curve_end}, pow( max(0.0, ((x - ${discharge_knee_v}) / (id(${yambms_id}_cell_uvpr).state - ${discharge_knee_v}))),${discharge_a_factor_curve_shape}))+2) * id(${yambms_id}_max_discharge_current).state);
if (id(${yambms_id}_min_cell_voltage).state < cell_low_v) return 0.0;
else return max(0.0,(- pow(${discharge_a_factor_curve_end}, pow( max(0.0, ((x - ${discharge_knee_v}) / (cell_low_v - ${discharge_knee_v}))),${discharge_a_factor_curve_shape}))+2) * id(${yambms_id}_max_discharge_current).state);
# Second, an exponential moving average is calculated. This will be used to smooth the transition between different initial discharge current values.
- platform: copy
source_id: auto_dcl_initial
@@ -84,4 +86,4 @@ sensor:
- lambda: !lambda |-
if (id(${yambms_id}_switch_auto_dcl).state) id(${yambms_id}_auto_dcl) = (round(min(id(auto_dcl_moving_average).state, x) * 10) / 10);
else id(${yambms_id}_auto_dcl) = -1.0; // Auto DCL not used
return (round(min(id(auto_dcl_moving_average).state, x) * 10) / 10);
return (round(min(id(auto_dcl_moving_average).state, x) * 10) / 10);
+6 -4
View File
@@ -1,5 +1,5 @@
# Updated : 2024.09.09
# Version : 2.3.6
# Updated : 2024.11.11
# Version : 2.3.7
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -112,7 +112,7 @@ script:
- id: ${canbus_id}_script_canbus_link_timer
mode: restart
then:
- delay: ${canbus_link_timer}s
- delay: ${canbus_link_timer}
- lambda: |-
id(${canbus_id}_send_canbus_data) = false; // Stop sending CANBUS datas
id(${canbus_id}_status).publish_state(false); // Set CANBUS Status to OFF
@@ -154,7 +154,7 @@ interval:
id(${yambms_id}_canbus_name) = id(${canbus_id}_bms_name).state.c_str();
id(${yambms_id}_canbus_protocol) = id(${canbus_id}_protocol).state.c_str();
- interval: 120s
- interval: 60s
then:
- lambda: |-
// Test inverter 0x305 ACK
@@ -610,6 +610,8 @@ interval:
uint8_t can_mesg[] = {0, 0, 0, 0, 0, 0, 0, 0};
can_mesg[0] = id(${yambms_id}_bms_combined).state;
can_mesg[2] = id(${yambms_id}_bms_blocking_charge).state;
can_mesg[4] = id(${yambms_id}_bms_blocking_discharge).state;
can_mesg[6] = (id(${yambms_id}_bms_count).state - id(${yambms_id}_bms_combined).state);
ESP_LOGI("canbus", "send can_id: 0x372 hex: %x %x %x %x %x %x %x %x", can_mesg[0], can_mesg[1], can_mesg[2], can_mesg[3], can_mesg[4], can_mesg[5], can_mesg[6], can_mesg[7]);
+211 -201
View File
@@ -1,5 +1,5 @@
# Updated : 2024.10.03
# Version : 1.4.5
# Updated : 2024.11.11
# Version : 1.5.1
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -19,15 +19,15 @@
globals:
# BMS
- id: ${yambms_id}_bms_counter
- id: ${yambms_id}_var_bms_counter
type: int
restore_value: no
initial_value: '0'
- id: ${yambms_id}_can_be_combined_bms_counter
- id: ${yambms_id}_var_to_combine_bms_number
type: int
restore_value: no
initial_value: '0'
- id: ${yambms_id}_processed_bms_counter
initial_value: '1'
- id: ${yambms_id}_var_to_combine_bms_counter
type: int
restore_value: no
initial_value: '0'
@@ -35,83 +35,75 @@ globals:
type: int
restore_value: no
initial_value: '0'
- id: ${yambms_id}_var_errors_bitmask_alarm
- id: ${yambms_id}_var_errors_bitmask
type: int
restore_value: no
initial_value: '0'
- id: ${yambms_id}_var_errors_bitmask_warning
- id: ${yambms_id}_var_equalizing_counter
type: int
restore_value: no
initial_value: '0'
- id: ${yambms_id}_equalizing_counter
- id: ${yambms_id}_var_charging_allowed_counter
type: int
restore_value: no
initial_value: '0'
- id: ${yambms_id}_bms_switch_charging_counter
- id: ${yambms_id}_var_discharging_allowed_counter
type: int
restore_value: no
initial_value: '0'
- id: ${yambms_id}_bms_switch_discharging_counter
- id: ${yambms_id}_var_total_cell_count
type: int
restore_value: no
initial_value: '0'
- id: ${yambms_id}_total_cell_count
- id: ${yambms_id}_var_min_voltage_cell
type: int
restore_value: no
initial_value: '0'
- id: ${yambms_id}_min_min_voltage_cell
- id: ${yambms_id}_var_max_voltage_cell
type: int
restore_value: no
initial_value: '0'
- id: ${yambms_id}_max_max_voltage_cell
type: int
restore_value: no
initial_value: '0'
- id: ${yambms_id}_min_min_cell_voltage
- id: ${yambms_id}_var_min_cell_voltage
type: float
restore_value: no
initial_value: '5.0'
- id: ${yambms_id}_max_max_cell_voltage
- id: ${yambms_id}_var_max_cell_voltage
type: float
restore_value: no
initial_value: '0.0'
- id: ${yambms_id}_total_max_charge_current
- id: ${yambms_id}_var_total_max_charge_current
type: float
restore_value: no
initial_value: '0.0'
- id: ${yambms_id}_total_max_discharge_current
- id: ${yambms_id}_var_total_max_discharge_current
type: float
restore_value: no
initial_value: '0.0'
- id: ${yambms_id}_total_installed_battery_capacity
- id: ${yambms_id}_var_total_installed_battery_capacity
type: float
restore_value: no
initial_value: '0.0'
- id: ${yambms_id}_total_battery_capacity
- id: ${yambms_id}_var_total_battery_capacity
type: float
restore_value: no
initial_value: '0.0'
- id: ${yambms_id}_total_capacity_remaining_ah
- id: ${yambms_id}_var_total_capacity_remaining_ah
type: float
restore_value: no
initial_value: '0.0'
- id: ${yambms_id}_total_charging_cycles
- id: ${yambms_id}_var_total_charging_cycles
type: float
restore_value: no
initial_value: '0.0'
- id: ${yambms_id}_min_cell_ovp
- id: ${yambms_id}_var_min_cell_ovp
type: float
restore_value: no
initial_value: '5.0'
- id: ${yambms_id}_min_cell_ovpr
type: float
restore_value: no
initial_value: '5.0'
- id: ${yambms_id}_max_cell_uvpr
- id: ${yambms_id}_var_max_cell_uvp
type: float
restore_value: no
initial_value: '0.0'
- id: ${yambms_id}_max_balance_trigger_voltage
- id: ${yambms_id}_var_max_balance_trigger_voltage
type: float
restore_value: no
initial_value: '0.0'
@@ -131,52 +123,52 @@ globals:
type: int
restore_value: no
initial_value: '0'
- id: ${yambms_id}_bms_total_voltage
- id: ${yambms_id}_var_bms_total_voltage
type: float
restore_value: no
initial_value: '0.0'
- id: ${yambms_id}_bms_total_current
- id: ${yambms_id}_var_bms_total_current
type: float
restore_value: no
initial_value: '0.0'
- id: ${yambms_id}_bms_total_power
- id: ${yambms_id}_var_bms_total_power
type: float
restore_value: no
initial_value: '0.0'
- id: ${yambms_id}_bms_total_soc
- id: ${yambms_id}_var_bms_total_soc
type: float
restore_value: no
initial_value: '0.0'
# Shunt
- id: ${yambms_id}_shunt_use
- id: ${yambms_id}_var_shunt_use
type: bool
restore_value: no
initial_value: "false"
- id: ${yambms_id}_shunt_counter
- id: ${yambms_id}_var_shunt_counter
type: int
restore_value: no
initial_value: '0'
- id: ${yambms_id}_can_be_combined_shunt_counter
- id: ${yambms_id}_var_to_combine_shunt_number
type: int
restore_value: no
initial_value: '1'
- id: ${yambms_id}_var_to_combine_shunt_counter
type: int
restore_value: no
initial_value: '0'
- id: ${yambms_id}_processed_shunt_counter
type: int
restore_value: no
initial_value: '0'
- id: ${yambms_id}_shunt_total_voltage
- id: ${yambms_id}_var_shunt_total_voltage
type: float
restore_value: no
initial_value: '0.0'
- id: ${yambms_id}_shunt_total_current
- id: ${yambms_id}_var_shunt_total_current
type: float
restore_value: no
initial_value: '0.0'
- id: ${yambms_id}_shunt_total_power
- id: ${yambms_id}_var_shunt_total_power
type: float
restore_value: no
initial_value: '0.0'
- id: ${yambms_id}_shunt_total_soc
- id: ${yambms_id}_var_shunt_total_soc
type: float
restore_value: no
initial_value: '0.0'
@@ -187,189 +179,196 @@ interval:
then:
- lambda: |-
// If all device have communicated their informations
int device_counter = (id(${yambms_id}_bms_counter) + id(${yambms_id}_shunt_counter));
int processed_device_counter = (id(${yambms_id}_processed_bms_counter) + id(${yambms_id}_processed_shunt_counter));
if (device_counter == processed_device_counter)
int device_counter = (id(${yambms_id}_var_bms_counter) + id(${yambms_id}_var_shunt_counter));
int processed_device_counter = (id(${yambms_id}_var_to_combine_bms_number) + id(${yambms_id}_var_to_combine_shunt_number));
if ((device_counter + 2) == processed_device_counter)
{
// +-----------------------------------------------+
// | Errors bitmask (16bit) |
// | Errors bitmask (JK 16bit) |
// +-----------------------------------------------+
// Alarm - OR bitwise
if (id(${yambms_id}_var_errors_bitmask_counter) == id(${yambms_id}_bms_counter)) {
id(${yambms_id}_errors_bitmask_alarm).publish_state(id(${yambms_id}_var_errors_bitmask_alarm));
id(${yambms_id}_var_errors_bitmask_alarm) = 0; // global var reset
// Alarm - all BMS are in alarm ?
if (id(${yambms_id}_var_errors_bitmask_counter) == id(${yambms_id}_var_bms_counter))
{
id(${yambms_id}_errors_bitmask_alarm).publish_state(id(${yambms_id}_var_errors_bitmask));
}
// At least one BMS is not in alarm
else id(${yambms_id}_errors_bitmask_alarm).publish_state(0);
// Warning - OR bitwise
id(${yambms_id}_errors_bitmask_warning).publish_state(id(${yambms_id}_var_errors_bitmask_warning));
id(${yambms_id}_var_errors_bitmask_warning) = 0; // global var reset
// errors_bitmask_counter
// Warning
id(${yambms_id}_errors_bitmask_warning).publish_state(id(${yambms_id}_var_errors_bitmask));
// errors_bitmask_counter ( number of BMS in alarms)
id(${yambms_id}_errors_bitmask_counter).publish_state(id(${yambms_id}_var_errors_bitmask_counter));
id(${yambms_id}_var_errors_bitmask_counter) = 0; // global var reset
// +-----------------------------------------------+
// MEAN total_voltage
// Vars init
float total_voltage = 0.0;
// Shunt
if (id(${yambms_id}_shunt_use) == true)
total_voltage = (id(${yambms_id}_shunt_total_voltage) / id(${yambms_id}_can_be_combined_shunt_counter));
// BMS
else if (id(${yambms_id}_can_be_combined_bms_counter) > 0)
total_voltage = (id(${yambms_id}_bms_total_voltage) / id(${yambms_id}_can_be_combined_bms_counter));
// Publish sensor and global var reset
id(${yambms_id}_total_voltage).publish_state(total_voltage);
id(${yambms_id}_bms_total_voltage) = 0.0;
id(${yambms_id}_shunt_total_voltage) = 0.0;
// TOTAL current
// Shunt
if (id(${yambms_id}_shunt_use) == true)
id(${yambms_id}_current).publish_state(id(${yambms_id}_shunt_total_current));
// BMS
else
id(${yambms_id}_current).publish_state(id(${yambms_id}_bms_total_current));
// Global var reset
id(${yambms_id}_bms_total_current) = 0.0;
id(${yambms_id}_shunt_total_current) = 0.0;
// TOTAL power
// Shunt
if (id(${yambms_id}_shunt_use) == true)
id(${yambms_id}_power).publish_state(id(${yambms_id}_shunt_total_power));
// BMS
else
id(${yambms_id}_power).publish_state(id(${yambms_id}_bms_total_power));
// Global var reset
id(${yambms_id}_bms_total_power) = 0.0;
id(${yambms_id}_shunt_total_power) = 0.0;
// MEAN state_of_charge
float current = 0.0;
float power = 0.0;
float soc = 0.0;
// Shunt
if (id(${yambms_id}_shunt_use) == true)
soc = (id(${yambms_id}_shunt_total_soc) / id(${yambms_id}_can_be_combined_shunt_counter));
// BMS
else if (id(${yambms_id}_can_be_combined_bms_counter) > 0)
soc = (id(${yambms_id}_bms_total_soc) / id(${yambms_id}_can_be_combined_bms_counter));
// Publish sensor and global var reset
float charging_cycles = 0.0;
// At least one BMS can be combined
if (id(${yambms_id}_var_to_combine_bms_counter) > 0)
{
// MEAN total_voltage (Shunt/BMS)
if (id(${yambms_id}_var_shunt_use) == true)
total_voltage = (id(${yambms_id}_var_shunt_total_voltage) / id(${yambms_id}_var_to_combine_shunt_counter));
else
total_voltage = (id(${yambms_id}_var_bms_total_voltage) / id(${yambms_id}_var_to_combine_bms_counter));
// TOTAL current (Shunt/BMS)
if (id(${yambms_id}_var_shunt_use) == true)
current = id(${yambms_id}_var_shunt_total_current);
else
current = id(${yambms_id}_var_bms_total_current);
// TOTAL power (Shunt/BMS)
if (id(${yambms_id}_var_shunt_use) == true)
power = id(${yambms_id}_var_shunt_total_power);
else
power = id(${yambms_id}_var_bms_total_power);
// MEAN state_of_charge (Shunt/BMS)
if (id(${yambms_id}_var_shunt_use) == true)
soc = (id(${yambms_id}_var_shunt_total_soc) / id(${yambms_id}_var_to_combine_shunt_counter));
else
soc = (id(${yambms_id}_var_bms_total_soc) / id(${yambms_id}_var_to_combine_bms_counter));
// MEAN charging_cycles
charging_cycles = (id(${yambms_id}_var_total_charging_cycles) / id(${yambms_id}_var_to_combine_bms_counter));
}
// Publishing sensors
id(${yambms_id}_total_voltage).publish_state(total_voltage);
id(${yambms_id}_current).publish_state(current);
id(${yambms_id}_power).publish_state(power);
id(${yambms_id}_state_of_charge).publish_state(soc);
id(${yambms_id}_bms_total_soc) = 0.0;
id(${yambms_id}_shunt_total_soc) = 0.0;
id(${yambms_id}_charging_cycles).publish_state(charging_cycles);
// TOTAL capacity_remaining_ah
id(${yambms_id}_capacity_remaining_ah).publish_state(id(${yambms_id}_total_capacity_remaining_ah));
id(${yambms_id}_total_capacity_remaining_ah) = 0.0; // global var reset
id(${yambms_id}_capacity_remaining_ah).publish_state(id(${yambms_id}_var_total_capacity_remaining_ah));
// TOTAL max_charge_current
id(${yambms_id}_max_charge_current).publish_state(id(${yambms_id}_total_max_charge_current) * (id(${yambms_id}_max_charge_current_pct).state / 100));
id(${yambms_id}_total_max_charge_current) = 0.0; // global var reset
id(${yambms_id}_max_charge_current).publish_state(id(${yambms_id}_var_total_max_charge_current) * (id(${yambms_id}_max_charge_current_pct).state / 100));
// TOTAL max_discharge_current
id(${yambms_id}_max_discharge_current).publish_state(id(${yambms_id}_total_max_discharge_current) * (id(${yambms_id}_max_discharge_current_pct).state / 100));
id(${yambms_id}_total_max_discharge_current) = 0.0; // global var reset
// MEAN charging_cycles
float charging_cycles = 0.0;
if (id(${yambms_id}_can_be_combined_bms_counter) > 0)
charging_cycles = (id(${yambms_id}_total_charging_cycles) / id(${yambms_id}_can_be_combined_bms_counter));
id(${yambms_id}_charging_cycles).publish_state(charging_cycles);
id(${yambms_id}_total_charging_cycles) = 0.0; // global var reset
// equalizing_counter
if (id(${yambms_id}_equalizing_counter) > 0) id(${yambms_id}_equalizing).publish_state(true);
else id(${yambms_id}_equalizing).publish_state(false);
id(${yambms_id}_equalizing_counter) = 0; // global var reset
// bms_switch_charging_counter
if (id(${yambms_id}_bms_switch_charging_counter) > 0) id(${yambms_id}_bms_switch_charging).publish_state(true);
else id(${yambms_id}_bms_switch_charging).publish_state(false);
id(${yambms_id}_bms_switch_charging_counter) = 0; // global var reset
// bms_switch_discharging_counter
if (id(${yambms_id}_bms_switch_discharging_counter) > 0) id(${yambms_id}_bms_switch_discharging).publish_state(true);
else id(${yambms_id}_bms_switch_discharging).publish_state(false);
id(${yambms_id}_bms_switch_discharging_counter) = 0; // global var reset
id(${yambms_id}_max_discharge_current).publish_state(id(${yambms_id}_var_total_max_discharge_current) * (id(${yambms_id}_max_discharge_current_pct).state / 100));
// MIN/MAX values
// MAX balance_trigger_voltage
id(${yambms_id}_balance_trigger_voltage).publish_state(id(${yambms_id}_max_balance_trigger_voltage));
id(${yambms_id}_max_balance_trigger_voltage) = 0.0; // global var reset
id(${yambms_id}_balance_trigger_voltage).publish_state(id(${yambms_id}_var_max_balance_trigger_voltage));
// MIN min_cell_voltage
// MIN min_voltage_cell (cell number)
id(${yambms_id}_min_cell_voltage).publish_state(id(${yambms_id}_min_min_cell_voltage));
id(${yambms_id}_min_voltage_cell).publish_state(id(${yambms_id}_min_min_voltage_cell));
id(${yambms_id}_min_min_cell_voltage) = 5.0; // global var reset
id(${yambms_id}_min_min_voltage_cell) = 0; // global var reset
id(${yambms_id}_min_cell_voltage).publish_state(id(${yambms_id}_var_min_cell_voltage));
id(${yambms_id}_min_voltage_cell).publish_state(id(${yambms_id}_var_min_voltage_cell));
// MAX max_cell_voltage
// MAX max_voltage_cell (cell number)
id(${yambms_id}_max_cell_voltage).publish_state(id(${yambms_id}_max_max_cell_voltage));
id(${yambms_id}_max_voltage_cell).publish_state(id(${yambms_id}_max_max_voltage_cell));
id(${yambms_id}_max_max_cell_voltage) = 0.0; // global var reset
id(${yambms_id}_max_max_voltage_cell) = 0; // global var reset
id(${yambms_id}_max_cell_voltage).publish_state(id(${yambms_id}_var_max_cell_voltage));
id(${yambms_id}_max_voltage_cell).publish_state(id(${yambms_id}_var_max_voltage_cell));
// MIN cell_ovp
id(${yambms_id}_cell_ovp).publish_state(id(${yambms_id}_min_cell_ovp));
id(${yambms_id}_min_cell_ovp) = 5.0; // global var reset
id(${yambms_id}_cell_ovp).publish_state(id(${yambms_id}_var_min_cell_ovp));
// MIN cell_ovpr
id(${yambms_id}_cell_ovpr).publish_state(id(${yambms_id}_min_cell_ovpr));
id(${yambms_id}_min_cell_ovpr) = 5.0; // global var reset
// MAX cell_uvpr
id(${yambms_id}_cell_uvpr).publish_state(id(${yambms_id}_max_cell_uvpr));
id(${yambms_id}_max_cell_uvpr) = 0.0; // global var reset
// MAX cell_uvp
id(${yambms_id}_cell_uvp).publish_state(id(${yambms_id}_var_max_cell_uvp));
// MIN temperature
// MIN temperature_sensor
id(${yambms_id}_min_temperature).publish_state(id(${yambms_id}_var_min_temperature));
id(${yambms_id}_min_temperature_sensor).publish_state(id(${yambms_id}_var_min_temperature_sensor));
id(${yambms_id}_var_min_temperature) = 100.0; // global var reset
id(${yambms_id}_var_min_temperature_sensor) = 0; // global var reset
// MAX temperature
// MAX temperature_sensor
id(${yambms_id}_max_temperature).publish_state(id(${yambms_id}_var_max_temperature));
id(${yambms_id}_max_temperature_sensor).publish_state(id(${yambms_id}_var_max_temperature_sensor));
id(${yambms_id}_var_max_temperature) = -100.0; // global var reset
id(${yambms_id}_var_max_temperature_sensor) = 0; // global var reset
// Reset processed device counter (new cycle)
// The device are once again authorized to communicate their informations
id(${yambms_id}_processed_bms_counter) = 0;
id(${yambms_id}_processed_shunt_counter) = 0;
// BMS equalizing state
if (id(${yambms_id}_var_equalizing_counter) > 0)
id(${yambms_id}_equalizing).publish_state(true);
else
id(${yambms_id}_equalizing).publish_state(false);
// BMS charging allowed
if (id(${yambms_id}_var_to_combine_bms_counter) && id(${yambms_id}_var_charging_allowed_counter) > 0)
id(${yambms_id}_charging_allowed).publish_state(true);
else
id(${yambms_id}_charging_allowed).publish_state(false);
// bms_blocking_charge
id(${yambms_id}_bms_blocking_charge).publish_state(id(${yambms_id}_var_bms_counter) - id(${yambms_id}_var_charging_allowed_counter));
// BMS discharging allowed
if (id(${yambms_id}_var_to_combine_bms_counter) && id(${yambms_id}_var_discharging_allowed_counter) > 0)
id(${yambms_id}_discharging_allowed).publish_state(true);
else
id(${yambms_id}_discharging_allowed).publish_state(false);
// bms_blocking_discharge
id(${yambms_id}_bms_blocking_discharge).publish_state(id(${yambms_id}_var_bms_counter) - id(${yambms_id}_var_discharging_allowed_counter));
// Global vars reset
id(${yambms_id}_var_errors_bitmask) = 0;
id(${yambms_id}_var_errors_bitmask_counter) = 0;
id(${yambms_id}_var_bms_total_voltage) = 0.0;
id(${yambms_id}_var_shunt_total_voltage) = 0.0;
id(${yambms_id}_var_bms_total_current) = 0.0;
id(${yambms_id}_var_shunt_total_current) = 0.0;
id(${yambms_id}_var_bms_total_power) = 0.0;
id(${yambms_id}_var_shunt_total_power) = 0.0;
id(${yambms_id}_var_bms_total_soc) = 0.0;
id(${yambms_id}_var_shunt_total_soc) = 0.0;
id(${yambms_id}_var_total_capacity_remaining_ah) = 0.0;
id(${yambms_id}_var_total_max_charge_current) = 0.0;
id(${yambms_id}_var_total_max_discharge_current) = 0.0;
id(${yambms_id}_var_total_charging_cycles) = 0.0;
id(${yambms_id}_var_max_balance_trigger_voltage) = 0.0;
id(${yambms_id}_var_min_cell_voltage) = 5.0;
id(${yambms_id}_var_min_voltage_cell) = 0;
id(${yambms_id}_var_max_cell_voltage) = 0.0;
id(${yambms_id}_var_max_voltage_cell) = 0;
id(${yambms_id}_var_min_cell_ovp) = 5.0;
id(${yambms_id}_var_max_cell_uvp) = 0.0;
id(${yambms_id}_var_min_temperature) = 100.0;
id(${yambms_id}_var_min_temperature_sensor) = 0;
id(${yambms_id}_var_max_temperature) = -100.0;
id(${yambms_id}_var_max_temperature_sensor) = 0;
id(${yambms_id}_var_equalizing_counter) = 0;
id(${yambms_id}_var_charging_allowed_counter) = 0;
id(${yambms_id}_var_discharging_allowed_counter) = 0;
// The devices are once again authorized to communicate their informations
id(${yambms_id}_var_to_combine_bms_number) = 1;
id(${yambms_id}_var_to_combine_shunt_number) = 1;
}
binary_sensor:
# equalizing
- platform: template
name: "${name} ${yambms_name} Equalizing state"
id: ${yambms_id}_equalizing
# bms_switch_charging
name: "${name} ${yambms_name} BMS equalizing state"
# charging_allowed
- platform: template
name: "${name} ${yambms_name} BMS Charge switch state"
id: ${yambms_id}_bms_switch_charging
# bms_switch_discharging
id: ${yambms_id}_charging_allowed
name: "${name} ${yambms_name} BMS charging allowed"
# discharging_allowed
- platform: template
name: "${name} ${yambms_name} BMS Discharge switch state"
id: ${yambms_id}_bms_switch_discharging
id: ${yambms_id}_discharging_allowed
name: "${name} ${yambms_name} BMS discharging allowed"
sensor:
# cell_count SUM
- platform: template
id: ${yambms_id}_cell_count_total
name: "${name} ${yambms_name} Cell Count (Σ)"
update_interval: ${yambms_update_interval}
accuracy_decimals: 0
icon: mdi:counter
filters:
- or:
- throttle: 10s
- delta: 1
lambda: return id(${yambms_id}_total_cell_count);
# # cell_count SUM
# - platform: template
# id: ${yambms_id}_cell_count_total
# name: "${name} ${yambms_name} Cell Count (Σ)"
# update_interval: ${yambms_update_interval}
# accuracy_decimals: 0
# icon: mdi:counter
# filters:
# - or:
# - throttle: 10s
# - delta: 1
# lambda: return id(${yambms_id}_var_total_cell_count);
# max_charge_current SUM
- platform: template
@@ -526,7 +525,7 @@ sensor:
- or:
- throttle: 10s
- delta: 1
lambda: return id(${yambms_id}_total_installed_battery_capacity);
lambda: return id(${yambms_id}_var_total_installed_battery_capacity);
# battery_capacity SUM
- platform: template
@@ -540,7 +539,7 @@ sensor:
- or:
- throttle: 10s
- delta: 1
lambda: return id(${yambms_id}_total_battery_capacity);
lambda: return id(${yambms_id}_var_total_battery_capacity);
# capacity_remaining_ah SUM
- platform: template
@@ -555,7 +554,7 @@ sensor:
- throttle: 10s
- delta: 1
# cell_ovp MIN
# cell_ovp MIN (Auto CCL)
- platform: template
id: ${yambms_id}_cell_ovp
name: "${name} ${yambms_name} Cell OVP (MIN)"
@@ -568,23 +567,10 @@ sensor:
- throttle: 10s
- delta: 0.001
# cell_ovpr MIN
# cell_uvp MAX (Auto DCL and MAX Discharge Voltage)
- platform: template
id: ${yambms_id}_cell_ovpr
name: "${name} ${yambms_name} Cell OVPR (MIN)"
update_interval: ${yambms_update_interval}
accuracy_decimals: 3
unit_of_measurement: V
device_class: voltage
filters:
- or:
- throttle: 10s
- delta: 0.001
# cell_uvpr MAX
- platform: template
id: ${yambms_id}_cell_uvpr
name: "${name} ${yambms_name} Cell UVPR (MAX)"
id: ${yambms_id}_cell_uvp
name: "${name} ${yambms_name} Cell UVP (MAX)"
update_interval: ${yambms_update_interval}
accuracy_decimals: 3
unit_of_measurement: V
@@ -716,7 +702,7 @@ sensor:
- or:
- throttle: 10s
- delta: 1
lambda: return id(${yambms_id}_bms_counter);
lambda: return id(${yambms_id}_var_bms_counter);
# BMS combined
- platform: template
@@ -729,7 +715,31 @@ sensor:
- or:
- throttle: 10s
- delta: 1
lambda: return id(${yambms_id}_can_be_combined_bms_counter);
lambda: return id(${yambms_id}_var_to_combine_bms_counter);
# BMS blocking charge
- platform: template
name: ${name} ${yambms_name} BMS blocking charge
id: ${yambms_id}_bms_blocking_charge
update_interval: ${yambms_update_interval}
accuracy_decimals: 0
icon: mdi:counter
filters:
- or:
- throttle: 10s
- delta: 1
# BMS blocking discharge
- platform: template
name: ${name} ${yambms_name} BMS blocking discharge
id: ${yambms_id}_bms_blocking_discharge
update_interval: ${yambms_update_interval}
accuracy_decimals: 0
icon: mdi:counter
filters:
- or:
- throttle: 10s
- delta: 1
# Shunt count
- platform: template
@@ -742,7 +752,7 @@ sensor:
- or:
- throttle: 10s
- delta: 1
lambda: return id(${yambms_id}_shunt_counter);
lambda: return id(${yambms_id}_var_shunt_counter);
# Shunt combined
- platform: template
@@ -755,7 +765,7 @@ sensor:
- or:
- throttle: 10s
- delta: 1
lambda: return id(${yambms_id}_can_be_combined_shunt_counter);
lambda: return id(${yambms_id}_var_to_combine_shunt_counter);
# power_tube_temperature MIN_MAX
# - platform: template