Balancer integration example
This commit is contained in:
1 parent
737cacdf09
commit
19606eb860
4 files changed
+617
-4
No files matched your search
@@ -0,0 +1,279 @@
|
||||
# Updated : 2025.08.13
|
||||
# Version : 1.5.9
|
||||
# GitHub : https://github.com/Sleeper85/esphome-yambms
|
||||
|
||||
# YamBMS ( Yet another multi-BMS Merging Solution )
|
||||
|
||||
# This YAML is free software: you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation, either version 3
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
|
||||
|
||||
######################## YamBMS Remote Packages Version ########################
|
||||
|
||||
# You can compile this YAML directly without the `packages` folder.
|
||||
# The packages will be automatically downloaded from GitHub.
|
||||
# Don't forget to configure your WiFi credentials in the secrets.yaml
|
||||
|
||||
################################################################################
|
||||
|
||||
# If needed, configure a static IP here
|
||||
# wifi:
|
||||
# manual_ip:
|
||||
# static_ip: 192.168.0.85
|
||||
# gateway: 192.168.0.1
|
||||
# subnet: 255.255.255.0
|
||||
# dns1: 8.8.8.8
|
||||
# dns2: 8.8.4.4
|
||||
|
||||
logger:
|
||||
level: INFO # VERBOSE / DEBUG / INFO / WARN
|
||||
|
||||
ota:
|
||||
- platform: esphome
|
||||
|
||||
api:
|
||||
reboot_timeout: 0s
|
||||
|
||||
# +--------------------------------------+
|
||||
# | Global Settings |
|
||||
# +--------------------------------------+
|
||||
substitutions:
|
||||
# Name
|
||||
friendly_name : 'YamBMS' # Prefix added in front of the `entity display name`, also used to classify them.
|
||||
hostname: 'yambms' # Name of your ESPHome node registered on the IP network (DNS name, must be unique) and prefix added in front of the `entity id`.
|
||||
name: '' # This name can be added as a second prefix, both for the `entity display name` and the `entity id`, you can leave it blank.
|
||||
# +--------------------------------------+
|
||||
# | YamBMS Settings |
|
||||
# +--------------------------------------+
|
||||
# Please read the cut-off charging logic README to understand how the YamBMS works
|
||||
yambms_id: 'yambms1'
|
||||
yambms_name: 'YamBMS 1'
|
||||
yambms_update_interval: '1s'
|
||||
# Input numbers can be displayed as a slider or an input box, options are 'slider' or 'box'.
|
||||
yambms_input_number_mode: 'slider'
|
||||
# Please check and fill in the options below correctly according to your battery chemistry and number of cells in series.
|
||||
# These parameters are important and used for charging logic.
|
||||
# Battery Chemistry
|
||||
yambms_battery_chemistry: '1' # 1-LFP | 2-Li-ion | 3-LTO
|
||||
# Number of cells in series
|
||||
yambms_cell_count: '16'
|
||||
# Bulk / Absorption Voltage : corresponds to the Bulk voltage that will be used to charge the battery. (LFP : 55.2V = 3.45V/Cell for 16S battery)
|
||||
yambms_bulk_v: '55.2'
|
||||
# Float Voltage : corresponds to the voltage at which the battery would be maintained at the end of charge. (LFP : 53.6V = 3.35V/Cell for 16S battery)
|
||||
yambms_float_v: '53.6'
|
||||
# Rebulk voltage, voltage from which a new Bulk charge can start. (LFP : 52.8V = 3.3V/Cell for 16S battery)
|
||||
yambms_rebulk_v: '52.8'
|
||||
# Maximum time in minutes that the cut-off step can last before charging is complete
|
||||
# If your cells are properly balanced this step ends at the fastest after the `cut-off timer`
|
||||
# This timer can be deactivated with a switch
|
||||
yambms_eoc_timer: '30'
|
||||
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
|
||||
yambms_cutoff_timer: '60'
|
||||
# Max. charge current : corresponds to the maximum charge current which may be requested by YamBMS.
|
||||
# The current requested will be proportional to the BMS count without ever exceeding this value.
|
||||
yambms_max_requested_charge_current: '300' # in Ampere
|
||||
# Max. discharge current : corresponds to the maximum discharge current which may be requested by YamBMS.
|
||||
# The current requested will be proportional to the BMS count without ever exceeding this value.
|
||||
yambms_max_requested_discharge_current: '300' # in Ampere
|
||||
# +--------------------------------------+
|
||||
# | Shunt Settings |
|
||||
# +--------------------------------------+
|
||||
shunt_update_interval: '3s' # frequency at which Shunt data is refreshed
|
||||
shunt_combine_interval: '1s' # frequency at which Shunt data is combined in YamBMS
|
||||
# +--------------------------------------+
|
||||
# | BMS Settings |
|
||||
# +--------------------------------------+
|
||||
bms_update_interval: '3s' # frequency at which BMS data is refreshed, going below '3s' can cause problems
|
||||
bms_combine_interval: '1s' # frequency at which BMS data is combined in YamBMS
|
||||
bms_cutoff_timer: '50s' # time during which the end of charge conditions must be respected (cut-off + cells not equalizing)
|
||||
|
||||
|
||||
|
||||
# +--------------------------------------+
|
||||
# | Packages |
|
||||
# +--------------------------------------+
|
||||
|
||||
# PLEASE READ : https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_LP_YAML.md
|
||||
|
||||
packages:
|
||||
|
||||
# +------------------------------------------------------------------------------+
|
||||
# | >>> UNCOMMENT YOUR BOARD
|
||||
# | >>> ONLY ONE BOARD !
|
||||
# +------------------------------------------------------------------------------+
|
||||
|
||||
# This list is incomplete, other board.yaml are available in the board folder
|
||||
|
||||
device_board: !include 'packages/board/board_ESP32_Generic.yaml'
|
||||
# device_board: !include 'packages/board/board_ESP32_DevKit-V1.yaml'
|
||||
# device_board: !include 'packages/board/board_ESP32_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'
|
||||
|
||||
# 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'
|
||||
|
||||
|
||||
|
||||
# +------------------------------------------------------------------------------+
|
||||
# | >>> Board Options
|
||||
# | >>> 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
|
||||
|
||||
# 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 - 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
|
||||
# psram_octal_80Mhz: !include packages/board/board_options_PSRAM_octal_80Mhz.yaml
|
||||
|
||||
# Web Server
|
||||
# web_server: !include packages/yambms/yambms_web_server.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
|
||||
|
||||
|
||||
|
||||
# +------------------------------------------------------------------------------+
|
||||
# | >>> 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'
|
||||
|
||||
balancer1: !include
|
||||
file: packages/balancer/balancer_sensors_JK_BLE.yaml
|
||||
vars:
|
||||
bms_id: '1' # must match the BMS ID
|
||||
balancer_name: 'Balancer 1'
|
||||
balancer_ble_mac_address: 11:22:33:44:55:66
|
||||
|
||||
|
||||
|
||||
# +------------------------------------------------------------------------------+
|
||||
# | >>> YamBMS
|
||||
# +------------------------------------------------------------------------------+
|
||||
|
||||
yambms: !include packages/yambms/yambms.yaml
|
||||
|
||||
|
||||
|
||||
# +------------------------------------------------------------------------------+
|
||||
# | >>> 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'
|
||||
|
||||
|
||||
|
||||
# +------------------------------------------------------------------------------+
|
||||
# | >>> 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'
|
||||
|
||||
|
||||
|
||||
# +------------------------------------------------------------------------------+
|
||||
# | >>> 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'
|
||||
|
||||
|
||||
|
||||
# +------------------------------------------------------------------------------+
|
||||
# | >>> Config and Custom Local Packages
|
||||
# +------------------------------------------------------------------------------+
|
||||
|
||||
# Local Packages intended for creating custom codes
|
||||
# or sharing settings between several main.yaml
|
||||
|
||||
# yambms_config: !include yambms_config.yaml
|
||||
# yambms_custom: !include yambms_custom.yaml
|
||||
|
||||
|
||||
@@ -0,0 +1,268 @@
|
||||
# Updated : 2025.08.13
|
||||
# Version : 1.1.1
|
||||
# GitHub : https://github.com/syssi/esphome-jk-bms
|
||||
|
||||
# YamBMS ( Yet another multi-BMS Merging Solution )
|
||||
|
||||
# This YAML is free software: you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation, either version 3
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
|
||||
|
||||
substitutions:
|
||||
balancer_model: "JK"
|
||||
balancer_protocol: "BLE"
|
||||
|
||||
ota:
|
||||
on_begin:
|
||||
then:
|
||||
- switch.turn_off: balancer${bms_id}_enable_bluetooth_connection
|
||||
- logger.log: "BLE shutdown for flashing"
|
||||
|
||||
# +--------------------------------------+
|
||||
# | Component settings |
|
||||
# +--------------------------------------+
|
||||
|
||||
external_components:
|
||||
- source: github://syssi/esphome-jk-bms@main
|
||||
refresh: 0s
|
||||
|
||||
esp32_ble_tracker:
|
||||
scan_parameters:
|
||||
active: false
|
||||
|
||||
ble_client:
|
||||
- id: ble_balancer_client${bms_id}
|
||||
mac_address: ${balancer_ble_mac_address}
|
||||
on_connect:
|
||||
then:
|
||||
- delay: 10s
|
||||
- button.press: balancer${bms_id}_retrieve_settings_button
|
||||
|
||||
heltec_balancer_ble:
|
||||
- ble_client_id: ble_balancer_client${bms_id}
|
||||
throttle: ${bms_update_interval}
|
||||
id: balancer_ble${bms_id}
|
||||
|
||||
# +--------------------------------------+
|
||||
# | Component entities |
|
||||
# +--------------------------------------+
|
||||
|
||||
binary_sensor:
|
||||
- platform: heltec_balancer_ble
|
||||
heltec_balancer_ble_id: balancer_ble${bms_id}
|
||||
online_status:
|
||||
id: balancer${bms_id}_online_status
|
||||
name: "${name} ${balancer_name} online status"
|
||||
on_state:
|
||||
then:
|
||||
- lambda: id(bms${bms_id}_var_ext_balancer_online) = x;
|
||||
balancing:
|
||||
id: balancer${bms_id}_equalizing
|
||||
name: "${name} ${balancer_name} balancing"
|
||||
on_state:
|
||||
then:
|
||||
- lambda: id(bms${bms_id}_var_ext_balancer_equalizing) = x;
|
||||
|
||||
switch:
|
||||
- platform: heltec_balancer_ble
|
||||
heltec_balancer_ble_id: balancer_ble${bms_id}
|
||||
balancer:
|
||||
id: balancer${bms_id}_balance_switch
|
||||
name: "${name} ${balancer_name} Balance switch"
|
||||
|
||||
- platform: ble_client
|
||||
ble_client_id: ble_balancer_client${bms_id}
|
||||
id: balancer${bms_id}_enable_bluetooth_connection
|
||||
name: "${name} ${balancer_name} enable Bluetooth"
|
||||
|
||||
sensor:
|
||||
- platform: heltec_balancer_ble
|
||||
heltec_balancer_ble_id: balancer_ble${bms_id}
|
||||
min_cell_voltage:
|
||||
id: balancer${bms_id}_min_cell_voltage
|
||||
name: "${name} ${balancer_name} min cell voltage"
|
||||
max_cell_voltage:
|
||||
id: balancer${bms_id}_max_cell_voltage
|
||||
name: "${name} ${balancer_name} max cell voltage"
|
||||
min_voltage_cell:
|
||||
id: balancer${bms_id}_min_voltage_cell
|
||||
name: "${name} ${balancer_name} min voltage cell"
|
||||
max_voltage_cell:
|
||||
id: balancer${bms_id}_max_voltage_cell
|
||||
name: "${name} ${balancer_name} max voltage cell"
|
||||
delta_cell_voltage:
|
||||
id: balancer${bms_id}_delta_cell_voltage
|
||||
name: "${name} ${balancer_name} delta cell voltage"
|
||||
average_cell_voltage:
|
||||
id: balancer${bms_id}_average_cell_voltage
|
||||
name: "${name} ${balancer_name} average cell voltage"
|
||||
cell_voltage_1:
|
||||
id: balancer${bms_id}_cell_v_01
|
||||
name: "${name} ${balancer_name} cell voltage 01"
|
||||
cell_voltage_2:
|
||||
id: balancer${bms_id}_cell_v_02
|
||||
name: "${name} ${balancer_name} cell voltage 02"
|
||||
cell_voltage_3:
|
||||
id: balancer${bms_id}_cell_v_03
|
||||
name: "${name} ${balancer_name} cell voltage 03"
|
||||
cell_voltage_4:
|
||||
id: balancer${bms_id}_cell_v_04
|
||||
name: "${name} ${balancer_name} cell voltage 04"
|
||||
cell_voltage_5:
|
||||
id: balancer${bms_id}_cell_v_05
|
||||
name: "${name} ${balancer_name} cell voltage 05"
|
||||
cell_voltage_6:
|
||||
id: balancer${bms_id}_cell_v_06
|
||||
name: "${name} ${balancer_name} cell voltage 06"
|
||||
cell_voltage_7:
|
||||
id: balancer${bms_id}_cell_v_07
|
||||
name: "${name} ${balancer_name} cell voltage 07"
|
||||
cell_voltage_8:
|
||||
id: balancer${bms_id}_cell_v_08
|
||||
name: "${name} ${balancer_name} cell voltage 08"
|
||||
cell_voltage_9:
|
||||
id: balancer${bms_id}_cell_v_09
|
||||
name: "${name} ${balancer_name} cell voltage 09"
|
||||
cell_voltage_10:
|
||||
id: balancer${bms_id}_cell_v_10
|
||||
name: "${name} ${balancer_name} cell voltage 10"
|
||||
cell_voltage_11:
|
||||
id: balancer${bms_id}_cell_v_11
|
||||
name: "${name} ${balancer_name} cell voltage 11"
|
||||
cell_voltage_12:
|
||||
id: balancer${bms_id}_cell_v_12
|
||||
name: "${name} ${balancer_name} cell voltage 12"
|
||||
cell_voltage_13:
|
||||
id: balancer${bms_id}_cell_v_13
|
||||
name: "${name} ${balancer_name} cell voltage 13"
|
||||
cell_voltage_14:
|
||||
id: balancer${bms_id}_cell_v_14
|
||||
name: "${name} ${balancer_name} cell voltage 14"
|
||||
cell_voltage_15:
|
||||
id: balancer${bms_id}_cell_v_15
|
||||
name: "${name} ${balancer_name} cell voltage 15"
|
||||
cell_voltage_16:
|
||||
id: balancer${bms_id}_cell_v_16
|
||||
name: "${name} ${balancer_name} cell voltage 16"
|
||||
cell_resistance_1:
|
||||
name: "${name} ${balancer_name} wire resistance 01"
|
||||
cell_resistance_2:
|
||||
name: "${name} ${balancer_name} wire resistance 02"
|
||||
cell_resistance_3:
|
||||
name: "${name} ${balancer_name} wire resistance 03"
|
||||
cell_resistance_4:
|
||||
name: "${name} ${balancer_name} wire resistance 04"
|
||||
cell_resistance_5:
|
||||
name: "${name} ${balancer_name} wire resistance 05"
|
||||
cell_resistance_6:
|
||||
name: "${name} ${balancer_name} wire resistance 06"
|
||||
cell_resistance_7:
|
||||
name: "${name} ${balancer_name} wire resistance 07"
|
||||
cell_resistance_8:
|
||||
name: "${name} ${balancer_name} wire resistance 08"
|
||||
cell_resistance_9:
|
||||
name: "${name} ${balancer_name} wire resistance 09"
|
||||
cell_resistance_10:
|
||||
name: "${name} ${balancer_name} wire resistance 10"
|
||||
cell_resistance_11:
|
||||
name: "${name} ${balancer_name} wire resistance 11"
|
||||
cell_resistance_12:
|
||||
name: "${name} ${balancer_name} wire resistance 12"
|
||||
cell_resistance_13:
|
||||
name: "${name} ${balancer_name} wire resistance 13"
|
||||
cell_resistance_14:
|
||||
name: "${name} ${balancer_name} wire resistance 14"
|
||||
cell_resistance_15:
|
||||
name: "${name} ${balancer_name} wire resistance 15"
|
||||
cell_resistance_16:
|
||||
name: "${name} ${balancer_name} wire resistance 16"
|
||||
total_voltage:
|
||||
id: balancer${bms_id}_total_voltage
|
||||
name: "${name} ${balancer_name} total voltage"
|
||||
temperature_sensor_1:
|
||||
id: balancer${bms_id}_temperature_sensor_1
|
||||
name: "${name} ${balancer_name} temperature sensor 1"
|
||||
temperature_sensor_2:
|
||||
id: balancer${bms_id}_temperature_sensor_2
|
||||
name: "${name} ${balancer_name} temperature sensor 2"
|
||||
total_runtime:
|
||||
name: "${name} ${balancer_name} total runtime"
|
||||
balancing_current:
|
||||
name: "${name} ${balancer_name} balancing current"
|
||||
cell_detection_failed_bitmask:
|
||||
name: "${name} ${balancer_name} cell detection failed bitmask"
|
||||
cell_overvoltage_bitmask:
|
||||
name: "${name} ${balancer_name} cell overvoltage bitmask"
|
||||
cell_undervoltage_bitmask:
|
||||
name: "${name} ${balancer_name} cell undervoltage bitmask"
|
||||
cell_polarity_error_bitmask:
|
||||
name: "${name} ${balancer_name} cell polarity error bitmask"
|
||||
cell_excessive_line_resistance_bitmask:
|
||||
name: "${name} ${balancer_name} cell excessive line resistance bitmask"
|
||||
|
||||
text_sensor:
|
||||
- platform: heltec_balancer_ble
|
||||
heltec_balancer_ble_id: balancer_ble${bms_id}
|
||||
operation_status:
|
||||
name: "${name} ${balancer_name} operation status"
|
||||
total_runtime_formatted:
|
||||
name: "${name} ${balancer_name} total runtime formatted"
|
||||
entity_category: diagnostic
|
||||
buzzer_mode:
|
||||
name: "${name} ${balancer_name} buzzer mode"
|
||||
battery_type:
|
||||
name: "${name} ${balancer_name} battery type"
|
||||
|
||||
number:
|
||||
- platform: heltec_balancer_ble
|
||||
heltec_balancer_ble_id: balancer_ble${bms_id}
|
||||
cell_count:
|
||||
id: balancer${bms_id}_cell_count
|
||||
name: "${name} ${balancer_name} cell count"
|
||||
balance_trigger_voltage:
|
||||
id: balancer${bms_id}_balance_trigger_voltage
|
||||
name: "${name} ${balancer_name} balance trigger voltage"
|
||||
on_value:
|
||||
then:
|
||||
- lambda: id(bms${bms_id}_var_ext_balancer_trigger_voltage) = x;
|
||||
max_balance_current:
|
||||
name: "${name} ${balancer_name} max balance current"
|
||||
balance_sleep_voltage:
|
||||
name: "${name} ${balancer_name} balance sleep voltage"
|
||||
balance_start_voltage:
|
||||
id: balancer${bms_id}_balance_starting_voltage
|
||||
name: "${name} ${balancer_name} balance starting voltage"
|
||||
# on_value:
|
||||
# then:
|
||||
# - lambda: |-
|
||||
# id(bms${bms_id}_var_ext_balancer_starting_voltage) = x;
|
||||
nominal_battery_capacity:
|
||||
name: "${name} ${balancer_name} total battery capacity"
|
||||
|
||||
button:
|
||||
- platform: heltec_balancer_ble
|
||||
heltec_balancer_ble_id: balancer_ble${bms_id}
|
||||
retrieve_settings:
|
||||
id: balancer${bms_id}_retrieve_settings_button
|
||||
name: "${name} ${balancer_name} retrieve settings"
|
||||
entity_category: config
|
||||
retrieve_device_info:
|
||||
name: "${name} ${balancer_name} retrieve device info"
|
||||
entity_category: config
|
||||
# retrieve_factory_defaults:
|
||||
# name: "${name} ${balancer_name} retrieve factory defaults"
|
||||
# entity_category: config
|
||||
|
||||
interval:
|
||||
- interval: 30min
|
||||
then:
|
||||
- button.press: balancer${bms_id}_retrieve_settings_button
|
||||
@@ -0,0 +1,65 @@
|
||||
# Updated : 2025.08.13
|
||||
# Version : 1.1.1
|
||||
# GitHub : https://github.com/Sleeper85/esphome-yambms
|
||||
|
||||
# YamBMS ( Yet another multi-BMS Merging Solution )
|
||||
|
||||
# This YAML is free software: you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation, either version 3
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
|
||||
|
||||
globals:
|
||||
# External balancer online
|
||||
- id: bms${bms_id}_var_ext_balancer_online
|
||||
type: bool
|
||||
restore_value: no
|
||||
initial_value: "false"
|
||||
# External balancer equalizing
|
||||
- id: bms${bms_id}_var_ext_balancer_equalizing
|
||||
type: bool
|
||||
restore_value: no
|
||||
initial_value: "false"
|
||||
# External balancer trigger voltage (V)
|
||||
- id: bms${bms_id}_var_ext_balancer_trigger_voltage
|
||||
type: float
|
||||
restore_value: no
|
||||
initial_value: '0.0'
|
||||
|
||||
binary_sensor:
|
||||
# equalizing
|
||||
- platform: template
|
||||
id: bms${bms_id}_equalizing
|
||||
name: "${name} ${bms_name} equalizing"
|
||||
lambda: |-
|
||||
if (id(bms${bms_id}_var_ext_balancer_online))
|
||||
return id(bms${bms_id}_var_ext_balancer_equalizing);
|
||||
else
|
||||
return id(bms${bms_id}_bms_equalizing).state;
|
||||
|
||||
sensor:
|
||||
# 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: |-
|
||||
if (id(bms${bms_id}_var_ext_balancer_online))
|
||||
return id(bms${bms_id}_var_ext_balancer_trigger_voltage);
|
||||
else
|
||||
return id(bms${bms_id}_bms_balance_trigger_voltage).state;
|
||||
@@ -1,5 +1,5 @@
|
||||
# Updated : 2025.06.11
|
||||
# Version : 1.2.8
|
||||
# Updated : 2025.08.13
|
||||
# Version : 1.2.9
|
||||
# GitHub : https://github.com/syssi/esphome-jk-bms
|
||||
|
||||
# YamBMS ( Yet another multi-BMS Merging Solution )
|
||||
@@ -22,6 +22,7 @@ packages:
|
||||
bms_temperature_sensor: !include bms_temperature_sensor_2.yaml
|
||||
bms_errors_bitmask: !include bms_errors_bitmask_JK_UART_4G-GPS.yaml
|
||||
bms_battery_soh: !include bms_battery_soh.yaml
|
||||
bms_balancer: !include bms_balancer.yaml
|
||||
|
||||
# +--------------------------------------+
|
||||
# | Component settings |
|
||||
@@ -48,7 +49,7 @@ binary_sensor:
|
||||
- platform: jk_bms
|
||||
jk_bms_id: jk_bms${bms_id}
|
||||
balancing:
|
||||
id: bms${bms_id}_equalizing
|
||||
id: bms${bms_id}_bms_equalizing
|
||||
name: "${name} ${bms_name} balancing"
|
||||
balancing_switch:
|
||||
name: "${name} ${bms_name} balancing switch"
|
||||
@@ -268,7 +269,7 @@ sensor:
|
||||
id: bms${bms_id}_balance_starting_voltage
|
||||
name: "${name} ${bms_name} balance starting voltage"
|
||||
balance_opening_pressure_difference:
|
||||
id: bms${bms_id}_balance_trigger_voltage
|
||||
id: bms${bms_id}_bms_balance_trigger_voltage
|
||||
name: "${name} ${bms_name} balance opening pressure difference"
|
||||
power_tube_temperature_protection:
|
||||
name: "${name} ${bms_name} power tube temperature protection"
|
||||
|
||||
Reference in new issue
Block a user