Files
esphome-yambms/packages/bms/bms_combine_JK_RS485_Modbus_sniffer_dev.yaml
T
Sleeper85 bb071e6565 JK RS485 - Load the components 1.2 from @dev and remove protocol_version
The sniffer packages load the JK RS485 components from the dev branch of
Sleeper85/esphome-components (JK RS485 1.2) until it is tested and merged
into main ; they will then go back to @main.

JK RS485 1.2 removes the protocol_version key of jk_rs485_sniffer (the
JK-PB RS485 protocol has only one version) and refuses it, while 1.1
requires it : both changes have to be made together. The sniffer packages
no longer pass it, and the sniffer_protocol var is removed from the JK-B
and JK-PB RS485 YAML and examples. A user YAML that still defines
sniffer_protocol keeps working, the var is simply unused.
2026-11-13 08:02:20 +01:00

67 lines
2.1 KiB
YAML

# Updated : 2026.11.11
# Version : 1.3.5
# GitHub : https://github.com/txubelaxu/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:
sniffer_id: "jk_sniffer_1"
sniffer_name: "JK sniffer"
packages:
modbus_sniffer: !include bms_base_sniffer_sub_device.yaml
sniffer_uart: !include
file: ../board/board_options_itf_${sniffer_uart_id}.yaml
vars:
uart_baud_rate: ${sniffer_uart_baud_rate | default(115200)}
logger:
tx_buffer_size: 1024
# +--------------------------------------+
# | Component settings |
# +--------------------------------------+
external_components:
- source: github://Sleeper85/esphome-components@dev
refresh: 0s
components: [ jk_rs485_sniffer , jk_rs485_bms ]
# - source:
# type: local
# path: ../esphome-components/components
jk_rs485_sniffer:
- id: ${sniffer_id}
rx_timeout: 500ms
uart_id: ${sniffer_uart_id}
# +--------------------------------------+
# | Component entities |
# +--------------------------------------+
switch:
- platform: template
device_id: sniffer_${sniffer_uart_id}
name: "Broadcasting BMS settings to all BMS"
icon: "mdi:cast"
restore_mode: RESTORE_DEFAULT_ON
optimistic: true
entity_category: config
turn_on_action:
- lambda: id(${sniffer_id}).set_broadcast_changes_to_all_bms(true);
turn_off_action:
- lambda: id(${sniffer_id}).set_broadcast_changes_to_all_bms(false);