1# Updated : 2025.04.07
2# Version : 1.5.5
3# GitHub : https://github.com/Sleeper85/esphome-yambms
4
5# YamBMS ( Yet another multi-BMS Merging Solution )
6
7# This YAML is free software: you can redistribute it and/or
8# modify it under the terms of the GNU General Public License
9# as published by the Free Software Foundation, either version 3
10# of the License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15# See the GNU General Public License for more details.
16#
17# You should have received a copy of the GNU General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
19
20######################## YamBMS Remote Packages Version ########################
21
22# You can compile this YAML directly without the `packages` folder.
23# The packages will be automatically downloaded from GitHub.
24# Don't forget to configure your WiFi credentials in the secrets.yaml
25
26################################################################################
27
28# If needed, configure a static IP here
29# wifi:
30# manual_ip:
31# static_ip: 192.168.0.85
32# gateway: 192.168.0.1
33# subnet: 255.255.255.0
34# dns1: 8.8.8.8
35# dns2: 8.8.4.4
36
37logger:
38 level: INFO # VERBOSE / DEBUG / INFO / WARN
39
40ota:
41 platform: esphome
42
43# Please use the native `api` component instead of the `mqtt` section.
44# If you use Home Assistant, the native API is more lightweight.
45# If there is no HA server connected to this API, the ESP32 reboots every 15 minutes to try to resolve the problem.
46# The "reboot_timeout: 0s" option will keep your ESP32 up and running even if you lose connection to your HA server.
47api:
48 reboot_timeout: 0s
49
50# If you don't want to use ESPHome's native API you can use MQTT instead.
51# In this case don't forget to remove the 'api:' section.
52# mqtt:
53# broker: !secret mqtt_host
54# username: !secret mqtt_username
55# password: !secret mqtt_password
56# id: mqtt_client
57
58# Please note that enabling this component will take up a lot of memory and may decrease
59# stability and be the cause of reboot depending on the capabilities of the board used.
60# web_server:
61# port: 80
62# log: false
63# ota: false
64
65# +--------------------------------------+
66# | Global Settings |
67# +--------------------------------------+
68substitutions:
69 # ESP32 name / hostname
70 name: yambms
71 # +--------------------------------------+
72 # | YamBMS Settings |
73 # +--------------------------------------+
74 # Please read the cut-off charging logic README to understand how the YamBMS works
75 yambms_id: 'yambms1'
76 yambms_name: 'YamBMS 1'
77 yambms_update_interval: '1s'
78 # Input numbers can be displayed as a slider or an input box, options are 'slider' or 'box'.
79 yambms_input_number_mode: 'slider'
80 # Please check and fill in the options below correctly according to your battery chemistry and number of cells in series.
81 # These parameters are important and used for charging logic.
82 # Battery Chemistry
83 yambms_battery_chemistry: '1' # 1-LFP | 2-Li-ion | 3-LTO
84 # Number of cells in series
85 yambms_cell_count: '16'
86 # 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)
87 yambms_bulk_v: '55.2'
88 # 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)
89 yambms_float_v: '53.6'
90 # Rebulk voltage, voltage from which a new Bulk charge can start. (LFP : 52.8V = 3.3V/Cell for 16S battery)
91 yambms_rebulk_v: '52.8'
92 # Maximum time in minutes that the cut-off step can last before charging is complete
93 # If your cells are properly balanced this step ends at the fastest after the `cut-off timer`
94 # This timer can be deactivated with a switch
95 yambms_eoc_timer: '30'
96 # Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
97 yambms_cutoff_timer: '60'
98 # +--------------------------------------+
99 # | Shunt Settings |
100 # +--------------------------------------+
101 shunt_update_interval: '3s' # frequency at which Shunt data is refreshed
102 shunt_combine_interval: '1s' # frequency at which Shunt data is combined in YamBMS
103 # +--------------------------------------+
104 # | BMS Settings |
105 # +--------------------------------------+
106 bms_update_interval: '3s' # frequency at which BMS data is refreshed, going below '3s' can cause problems
107 bms_combine_interval: '1s' # frequency at which BMS data is combined in YamBMS
108 bms_cutoff_timer: '50s' # time during which the end of charge conditions must be respected (cut-off + cells not equalizing)
109
110# +--------------------------------------+
111# | Packages |
112# +--------------------------------------+
113
114# PLEASE READ : https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_main_YAML_HowTo.md
115
116packages:
117
118 ################ >>> CONFIG & CUSTOM LP <<< ################
119
120 # Local Packages intended for creating custom codes
121 # or sharing settings between several main.yaml
122
123 # yambms_config: !include yambms_config.yaml
124 # yambms_custom: !include yambms_custom.yaml
125
126 ############### >>> UNCOMMENT YOUR BOARD <<< ###############
127 ############### >>> ONLY ONE BOARD ! <<< ###############
128
129 board:
130 url: https://github.com/Sleeper85/esphome-yambms
131 ref: main
132 refresh: 0s
133 files:
134 # - path: 'packages/board/board_ESP32_Generic.yaml'
135 # - path: 'packages/board/board_ESP32_DevKit-V1.yaml'
136 - path: 'packages/board/board_ESP32_LilyGo-T-CAN485.yaml'
137 # - path: 'packages/board/board_ESP32_EVB.yaml'
138 # - path: 'packages/board/board_ESP32_Atom-Lite.yaml'
139 # - path: 'packages/board/board_ESP32-C3_DevKitM-1.yaml'
140 # - path: 'packages/board/board_ESP32-C3_ETH01-EVO.yaml'
141 # - path: 'packages/board/board_ESP32-S3_DevKitC-1_LED-38.yaml'
142 # - path: 'packages/board/board_ESP32-S3_DevKitC-1_LED-48.yaml'
143 # - path: 'packages/board/board_ESP32-S3_LilyGo-T-Connect.yaml'
144 # - path: 'packages/board/board_ESP32-S3_AtomS3-Lite.yaml'
145
146 # - path: 'packages/board/board_ESP32-S3_AtomS3.yaml'
147 # vars:
148 # display_auto_next_page_interval: '5s'
149 # display_rotation: '0' # 0/90/180/270 rotation angle in degrees
150
151 # - path: 'packages/board/board_ESP32-S3_AtomS3R.yaml'
152 # vars:
153 # display_auto_next_page_interval: '5s'
154 # display_rotation: '0' # 0/90/180/270 rotation angle in degrees
155
156 ########### >>> UNCOMMENT YOUR BOARD OPTIONS <<< ###########
157
158 board_options:
159 url: https://github.com/Sleeper85/esphome-yambms
160 ref: main
161 refresh: 0s
162 files:
163 # UART 1
164 - path: 'packages/board/board_options_itf_uart_esp_1.yaml'
165 # UART 2
166 - path: 'packages/board/board_options_itf_uart_esp_2.yaml'
167 # UART 3
168 - path: 'packages/board/board_options_itf_uart_esp_3.yaml'
169
170 # ESP32_CAN (TJA105x, SN65HVD230, M5Stack CAN base/unit)
171 - path: 'packages/board/board_options_itf_canbus_esp32_can.yaml'
172 vars:
173 canbus_node_id: 'canbus_inverter_1'
174
175 # MCP2515
176 # - path: 'packages/board/board_options_itf_canbus_mcp2515.yaml'
177 # vars:
178 # canbus_node_id: 'canbus_inverter_1'
179
180 ############################################################
181
182 # You don't have to import a shunt but you must import at least one BMS.
183
184 bms:
185 url: https://github.com/Sleeper85/esphome-yambms
186 ref: main
187 refresh: 0s
188 files:
189 # BMS 1
190 - path: 'packages/bms/bms_combine_JK_RS485_Modbus_bms_minimal.yaml'
191 vars:
192 bms_id: '1' # must be a number
193 bms_name: 'JK-BMS 1'
194 bms_uart_id: 'uart_esp_1'
195 # Maximum cell charging cycles is used to calculate the battey SoH.
196 # MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
197 bms_cell_max_cycles: '6000.0'
198 # BMS 2
199 - path: 'packages/bms/bms_combine_JK_RS485_Modbus_bms_minimal.yaml'
200 vars:
201 bms_id: '2' # must be a number
202 bms_name: 'JK-BMS 2'
203 bms_uart_id: 'uart_esp_2'
204 # Maximum cell charging cycles is used to calculate the battey SoH.
205 # MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
206 bms_cell_max_cycles: '6000.0'
207 # BMS 3
208 - path: 'packages/bms/bms_combine_JK_RS485_Modbus_bms_minimal.yaml'
209 vars:
210 bms_id: '3' # must be a number
211 bms_name: 'JK-BMS 3'
212 bms_uart_id: 'uart_esp_3'
213 # Maximum cell charging cycles is used to calculate the battey SoH.
214 # MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
215 bms_cell_max_cycles: '6000.0'
216 # BMS 4
217 - path: 'packages/bms/bms_combine_JK_RS485_Modbus_bms_minimal.yaml'
218 vars:
219 bms_id: '4' # must be a number
220 bms_name: 'JK-BMS 4'
221 bms_uart_id: 'uart_esp_4'
222 # Maximum cell charging cycles is used to calculate the battey SoH.
223 # MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
224 bms_cell_max_cycles: '6000.0'
225 # BMS 5
226 - path: 'packages/bms/bms_combine_JK_RS485_Modbus_bms_minimal.yaml'
227 vars:
228 bms_id: '5' # must be a number
229 bms_name: 'JK-BMS 5'
230 bms_uart_id: 'uart_esp_5'
231 # Maximum cell charging cycles is used to calculate the battey SoH.
232 # MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
233 bms_cell_max_cycles: '6000.0'
234 # BMS 6
235 - path: 'packages/bms/bms_combine_JK_RS485_Modbus_bms_minimal.yaml'
236 vars:
237 bms_id: '1' # must be a number
238 bms_name: 'JK-BMS 6'
239 bms_uart_id: 'uart_esp_6'
240 # Maximum cell charging cycles is used to calculate the battey SoH.
241 # MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
242 bms_cell_max_cycles: '6000.0'
243
244 # bms_options:
245 # url: https://github.com/Sleeper85/esphome-yambms
246 # ref: main
247 # refresh: 0s
248 # files:
249 # # BMS 1
250 # - path: 'packages/bms/bms_options_charging_logic.yaml'
251 # vars:
252 # bms_id: '1' # must be a number
253 # # BMS 2
254 # - path: 'packages/bms/bms_options_charging_logic.yaml'
255 # vars:
256 # bms_id: '2' # must be a number
257
258 yambms:
259 url: https://github.com/Sleeper85/esphome-yambms
260 ref: main
261 refresh: 0s
262 files:
263 - path: 'packages/yambms/yambms.yaml'
264
265 canbus:
266 url: https://github.com/Sleeper85/esphome-yambms
267 ref: main
268 refresh: 0s
269 files:
270 - path: 'packages/yambms/yambms_canbus.yaml'
271 vars:
272 canbus_id: 'canbus1'
273 canbus_name: 'CANBUS 1'
274 canbus_node_id: 'canbus_inverter_1'
275 canbus_light_id: 'esp_light'
276 # The CANBUS link will be considered down if no response from the inverter (0x305 frame) for 5s
277 # The Deye inverter sends the ACK 0x305 only when it receives the 0x356 frame.
278 canbus_link_timer: '5s'
279
280# +--------------------------------------+
281# | DEBUG ( logger level must be DEBUG ) |
282# +--------------------------------------+
283
284 debug:
285 url: https://github.com/Sleeper85/esphome-yambms
286 ref: main
287 refresh: 0s
288 files:
289 - path: packages/base/device_debug_ESP32.yaml
290 vars:
291 debug_name: 'Debug'
292 debug_update_interval: '5s'