From 083e0daf876e33978419d1422b09ba72935462ae Mon Sep 17 00:00:00 2001 From: Sleeper85 Date: Thu, 14 Aug 2025 18:25:18 +0200 Subject: [PATCH] YamBMS 1.5.9 - Balancer example --- ...P_Balancer.yaml => YamBMS_RP_Balancer.yaml | 291 ++++++++++-------- 1 file changed, 162 insertions(+), 129 deletions(-) rename YamBMS_LP_Balancer.yaml => YamBMS_RP_Balancer.yaml (50%) diff --git a/YamBMS_LP_Balancer.yaml b/YamBMS_RP_Balancer.yaml similarity index 50% rename from YamBMS_LP_Balancer.yaml rename to YamBMS_RP_Balancer.yaml index 06346d7..e50535a 100644 --- a/YamBMS_LP_Balancer.yaml +++ b/YamBMS_RP_Balancer.yaml @@ -1,5 +1,5 @@ # Updated : 2025.08.14 -# Version : 1.5.10 +# Version : 1.5.9 # GitHub : https://github.com/Sleeper85/esphome-yambms # YamBMS ( Yet another multi-BMS Merging Solution ) @@ -40,9 +40,21 @@ logger: 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 + # +--------------------------------------+ # | Global Settings | # +--------------------------------------+ @@ -102,7 +114,7 @@ substitutions: # | Packages | # +--------------------------------------+ -# PLEASE READ : https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_LP_YAML.md +# PLEASE READ : https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_RP_YAML.md packages: @@ -111,37 +123,38 @@ packages: # | >>> ONLY ONE BOARD ! # +------------------------------------------------------------------------------+ - # This list is incomplete, other board.yaml are available in the board folder + board: + url: https://github.com/Sleeper85/esphome-yambms + ref: dev + refresh: 0s + files: + - path: 'packages/board/board_ESP32_Generic.yaml' + # - path: 'packages/board/board_ESP32_DevKit-V1.yaml' + # - path: 'packages/board/board_ESP32_Atom-Lite.yaml' + # - path: 'packages/board/board_ESP32_EVB.yaml' + # - path: 'packages/board/board_ESP32_LilyGo-T-CAN485.yaml' + # - path: 'packages/board/board_ESP32-C3_DevKitM-1.yaml' + # - path: 'packages/board/board_ESP32-C3_ETH01-EVO.yaml' + # - path: 'packages/board/board_ESP32-S3_AtomS3-Lite.yaml' + # - path: 'packages/board/board_ESP32-S3_DevKitC-1_LED-38.yaml' + # - path: 'packages/board/board_ESP32-S3_DevKitC-1_LED-48.yaml' + # - path: 'packages/board/board_ESP32-S3_LilyGo-T-Connect.yaml' + # - path: 'packages/board/board_ESP32-S3_Touch-LCD-4.3.yaml' + # - path: 'packages/board/board_ESP32-S3_Touch-LCD-7.yaml' + # - path: 'packages/board/board_ESP32-S3_XIAO.yaml' + # - path: 'packages/board/board_ESP32-S3_YBoard.yaml' - device_board: !include 'packages/board/board_ESP32_Generic.yaml' - # device_board: !include 'packages/board/board_ESP32_DevKit-V1.yaml' - # device_board: !include 'packages/board/board_ESP32_Atom-Lite.yaml' - # device_board: !include 'packages/board/board_ESP32_EVB.yaml' - # device_board: !include 'packages/board/board_ESP32_LilyGo-T-CAN485.yaml' - # device_board: !include 'packages/board/board_ESP32-C3_DevKitM-1.yaml' - # device_board: !include 'packages/board/board_ESP32-C3_ETH01-EVO.yaml' - # device_board: !include 'packages/board/board_ESP32-S3_AtomS3-Lite.yaml' - # device_board: !include 'packages/board/board_ESP32-S3_DevKitC-1_LED-38.yaml' - # device_board: !include 'packages/board/board_ESP32-S3_DevKitC-1_LED-48.yaml' - # device_board: !include 'packages/board/board_ESP32-S3_LilyGo-T-Connect.yaml' - # device_board: !include 'packages/board/board_ESP32-S3_Touch-LCD-4.3.yaml' - # device_board: !include 'packages/board/board_ESP32-S3_Touch-LCD-7.yaml' - # device_board: !include 'packages/board/board_ESP32-S3_XIAO.yaml' - # device_board: !include 'packages/board/board_ESP32-S3_YBoard.yaml' + # - path: 'packages/board/board_ESP32-S3_AtomS3.yaml' # 'packages/board/board_ESP32-S3_AtomS3R.yaml' + # vars: + # display_auto_next_page_interval: '5s' + # display_rotation: '0' # 0/90/180/270 rotation angle in degrees - # device_board: !include - # file: 'packages/board/board_ESP32-S3_AtomS3.yaml' # 'packages/board/board_ESP32-S3_AtomS3R.yaml' - # vars: - # display_auto_next_page_interval: '5s' - # display_rotation: '0' # 0/90/180/270 rotation angle in degrees - - # # LilyGo T-Connect Pro - Board - # device_board: !include 'packages/board/board_ESP32-S3_LilyGo-T-Connect-Pro.yaml' - # # LilyGo T-Connect Pro - Display - Importing the display also activates PSRAM - # device_dispay: !include - # file: 'packages/board/board_options_display_480x222.yaml' - # vars: - # display_auto_next_page_interval: '5s' + # # LilyGo T-Connect Pro - Board + # - path: 'packages/board/board_ESP32-S3_LilyGo-T-Connect-Pro.yaml' + # # LilyGo T-Connect Pro - Display - Importing the display also activates PSRAM + # - path: 'packages/board/board_options_display_480x222.yaml' + # vars: + # display_auto_next_page_interval: '5s' @@ -150,40 +163,43 @@ packages: # | >>> Uncomment your interfaces and options # +------------------------------------------------------------------------------+ - # UART 1 (uart_id: uart_esp_1) - uart_esp_1: !include packages/board/board_options_itf_uart_esp_1.yaml - # UART 2 (uart_id: uart_esp_2) - uart_esp_2: !include packages/board/board_options_itf_uart_esp_2.yaml - # UART 3 (uart_id: uart_esp_3) - # uart_esp_3: !include packages/board/board_options_itf_uart_esp_3.yaml + board_options: + url: https://github.com/Sleeper85/esphome-yambms + ref: dev + refresh: 0s + files: + # UART 1 (uart_id: uart_esp_1) + - path: 'packages/board/board_options_itf_uart_esp_1.yaml' + # UART 2 (uart_id: uart_esp_2) + # - path: 'packages/board/board_options_itf_uart_esp_2.yaml' + # UART 3 (uart_id: uart_esp_3) + # - path: 'packages/board/board_options_itf_uart_esp_3.yaml' - # CAN transceiver - ESP32_CAN (TJA105x, SN65HVD230, M5Stack CAN base/unit) - canbus_node_1: !include - file: packages/board/board_options_itf_canbus_esp32_can.yaml - vars: - # to bms = canbus_bms_1 - # to inverter = canbus_inverter_1 - canbus_node_id: 'canbus_inverter_1' + # CAN transceiver - ESP32_CAN (TJA105x, SN65HVD230, M5Stack CAN base/unit) + - path: 'packages/board/board_options_itf_canbus_esp32_can.yaml' + vars: + # to bms = canbus_bms_1 + # to inverter = canbus_inverter_1 + canbus_node_id: 'canbus_inverter_1' + + # CAN transceiver - MCP2515 + # - path: 'packages/board/board_options_itf_canbus_mcp2515.yaml' + # vars: + # # to bms = canbus_bms_1 + # # to inverter = canbus_inverter_1 + # canbus_node_id: 'canbus_inverter_1' - # CAN transceiver - MCP2515 - # canbus_node_2: !include - # file: packages/board/board_options_itf_canbus_mcp2515.yaml - # vars: - # # to bms = canbus_bms_1 - # # to inverter = canbus_inverter_1 - # canbus_node_id: 'canbus_inverter_1' + # PSRAM octal 80Mhz + # - path: 'packages/board/board_options_PSRAM_octal_80Mhz.yaml' - # PSRAM octal 80Mhz - # psram_octal_80Mhz: !include packages/board/board_options_PSRAM_octal_80Mhz.yaml + # Web Server + # - path: 'packages/yambms/yambms_web_server.yaml' - # Web Server - # web_server: !include packages/yambms/yambms_web_server.yaml + # WiFi AP @ 192.168.4.1 + # - path: 'packages/board/board_options_wifi_ap.yaml' - # WiFi AP @ 192.168.4.1 - # wifi_ap: !include packages/board/board_options_wifi_ap.yaml - - # Captive Portal @ 192.168.4.1 - # captive_portal: !include packages/board/board_options_captive_portal.yaml + # Captive Portal @ 192.168.4.1 + # - path: 'packages/board/board_options_captive_portal.yaml' @@ -191,47 +207,49 @@ packages: # | >>> BMS / Balancer / Shunt # +------------------------------------------------------------------------------+ - bms1: !include - file: packages/bms/bms_combine_JK_UART_4G-GPS_full.yaml - vars: - bms_id: '1' # must be a number - bms_name: 'JK-BMS 1' - bms_uart_id: 'uart_esp_1' - # Maximum cell charging cycles is used to calculate the battey SoH. - # MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required) - bms_cell_max_cycles: '6000.0' + # You don't have to import a shunt but you must import at least one BMS. + # You can mix different BMS models, the only condition is that the `bms_id` are numbered in order starting from 1 ! - sniffer1: !include - file: packages/bms/bms_combine_JK_RS485_Modbus_sniffer.yaml - vars: - sniffer_id: 'sniffer1' - sniffer_protocol: 'JK02_32S' - sniffer_uart_id: 'uart_esp_2' + # >>> Copy your BMS and Shunt packages here + # >>> You can find examples at this address : + # >>> https://github.com/Sleeper85/esphome-yambms/tree/main/examples/single-node/ - # Mode2 : configure the DIP switches of your BMS from 0x01 to 0x0F (don't use the 0x00 address, maximum 15 BMS) - bms2: !include - file: packages/bms/bms_sensors_JK_RS485_Modbus_bms_full.yaml - vars: - # Sniffer ID - sniffer_id: 'sniffer1' - # BMS vars - bms_id: '2' # must be a number - bms_name: 'JK-BMS 2' - bms_address: '0x02' # BMS 1 DIP switch - - balancer1: !include - file: packages/balancer/balancer_sensors_JK_NEEY_BLE.yaml - vars: - bms_id: '1' # must match the BMS ID - balancer_name: 'Balancer 1' - balancer_ble_mac_address: 11:22:33:44:55:66 - - balancer2: !include - file: packages/balancer/balancer_sensors_JK_NEEY_BLE.yaml - vars: - bms_id: '2' # must match the BMS ID - balancer_name: 'Balancer 2' - balancer_ble_mac_address: 11:22:33:44:55:67 + bms: + url: https://github.com/Sleeper85/esphome-yambms + ref: dev + refresh: 0s + files: + # Basen controller + - path: 'packages/bms/bms_combine_BASEN_RS485_controller.yaml' + vars: + basen_uart_id: 'uart_esp_1' + basen_uart_baud_rate: '9600' + basen_controller_id: "basen_controller_1" + # Basen module 1 + - path: 'packages/bms/bms_combine_BASEN_RS485_full.yaml' + vars: + bms_id: '1' # must be a number + bms_name: 'BASEN-BMS 1' + bms_address: '0x01' + # Basen module 2 + - path: 'packages/bms/bms_combine_BASEN_RS485_full.yaml' + vars: + bms_id: '2' # must be a number + bms_name: 'BASEN-BMS 2' + bms_address: '0x02' + + # Balancer 1 linked to BMS 1 + - path: 'packages/balancer/balancer_sensors_JK_NEEY_BLE.yaml' + vars: + bms_id: '1' # must match the BMS ID + balancer_name: 'Balancer 1' + balancer_ble_mac_address: 11:22:33:44:55:66 + # Balancer 2 linked to BMS 2 + - path: 'packages/balancer/balancer_sensors_JK_NEEY_BLE.yaml' + vars: + bms_id: '2' # must match the BMS ID + balancer_name: 'Balancer 2' + balancer_ble_mac_address: 11:22:33:44:55:67 @@ -239,7 +257,12 @@ packages: # | >>> YamBMS # +------------------------------------------------------------------------------+ - yambms: !include packages/yambms/yambms.yaml + yambms: + url: https://github.com/Sleeper85/esphome-yambms + ref: dev + refresh: 0s + files: + - path: 'packages/yambms/yambms.yaml' @@ -247,16 +270,20 @@ packages: # | >>> CAN bus to Inverter # +------------------------------------------------------------------------------+ - canbus1: !include - file: packages/yambms/yambms_canbus.yaml # yambms_canbus_web_server.yaml - vars: - canbus_id: 'canbus1' - canbus_name: 'CANBUS 1' - canbus_node_id: 'canbus_inverter_1' # CAN bus node to which your inverter is connected - 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' + canbus: + url: https://github.com/Sleeper85/esphome-yambms + ref: dev + refresh: 0s + files: + - path: 'packages/yambms/yambms_canbus.yaml' # yambms_canbus_web_server.yaml + vars: + canbus_id: 'canbus1' + canbus_name: 'CANBUS 1' + canbus_node_id: 'canbus_inverter_1' + canbus_light_id: 'esp_light' + # The CANBUS link will be considered down if no response from the inverter (0x305 frame) for 5s + # The Deye inverter sends the ACK 0x305 only when it receives the 0x356 frame. + canbus_link_timer: '5s' @@ -264,14 +291,18 @@ packages: # | >>> RS485 bus to Inverter # +------------------------------------------------------------------------------+ - # rs485_pylon: !include - # file: packages/yambms/yambms_rs485_pylon.yaml # yambms_rs485_pylon_web_server.yaml - # vars: - # rs485_id: 'rs485_1' - # rs485_name: 'RS485 1' - # rs485_uart_id: 'uart_esp_3' # UART interface to which your inverter is connected - # rs485_uart_baud_rate: '9600' - # rs485_update_timeout: '5s' + # rs485_pylon: + # url: https://github.com/Sleeper85/esphome-yambms + # ref: dev + # refresh: 0s + # files: + # - path: 'packages/yambms/yambms_rs485_pylon.yaml' # yambms_rs485_pylon_web_server.yaml + # vars: + # rs485_id: 'rs485_1' + # rs485_name: 'RS485 1' + # rs485_uart_id: 'uart_esp_3' # UART interface to which your inverter is connected + # rs485_uart_baud_rate: '9600' + # rs485_update_timeout: '5s' @@ -279,15 +310,19 @@ packages: # | >>> DEBUG ( logger level must be DEBUG ) # +------------------------------------------------------------------------------+ - device_debug: !include - file: packages/base/device_debug_ESP32.yaml - # file: packages/base/device_debug_ESP32_PSRAM.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' + debug: + url: https://github.com/Sleeper85/esphome-yambms + ref: dev + refresh: 0s + files: + - path: packages/base/device_debug_ESP32.yaml + # - path: packages/base/device_debug_ESP32_PSRAM.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' @@ -300,5 +335,3 @@ packages: # yambms_config: !include yambms_config.yaml # yambms_custom: !include yambms_custom.yaml - -