forked from easybotics/esphome-ruixu-bms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
esp8266-example-multiple-battery-banks.yaml
144 lines (130 loc) · 3.93 KB
/
esp8266-example-multiple-battery-banks.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
substitutions:
name: seplos-bms
battery_bank0: "${name} bank 0"
battery_bank1: "${name} bank 1"
battery_bank2: "${name} bank 2"
device_description: "Monitor a Seplos BMS via RS485"
external_components_source: github://syssi/esphome-seplos-bms@main
tx_pin: GPIO4
rx_pin: GPIO5
esphome:
name: ${name}
comment: ${device_description}
min_version: 2024.6.0
project:
name: "syssi.esphome-seplos-bms"
version: 1.2.0
esp8266:
board: d1_mini
external_components:
- source: ${external_components_source}
refresh: 0s
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
ota:
platform: esphome
logger:
level: DEBUG
# If you use Home Assistant please remove this `mqtt` section and uncomment the `api` component!
# The native API has many advantages over MQTT: https://esphome.io/components/api.html#advantages-over-mqtt
mqtt:
broker: !secret mqtt_host
username: !secret mqtt_username
password: !secret mqtt_password
id: mqtt_client
# api:
uart:
id: uart_0
baud_rate: 9600
tx_pin: ${tx_pin}
rx_pin: ${rx_pin}
# The increased RX buffer size is important because
# the full BMS response must fit into the buffer
rx_buffer_size: 384
seplos_modbus:
id: modbus0
uart_id: uart_0
seplos_bms:
- id: battery_bank0
# Dip switch configuration of the first pack / address 0x01
# 8 7 6 5 4 3 2 1
# off, off, off, off, off, off, off, on
address: 0x01
# Known protocol versions: 0x20 (Seplos), 0x26 (Boqiang)
protocol_version: 0x20
seplos_modbus_id: modbus0
update_interval: 10s
- id: battery_bank1
# Dip switch configuration of the second pack / address 0x02
# 8 7 6 5 4 3 2 1
# off, off, off, off, off, off, on, off
address: 0x02
# Known protocol versions: 0x20 (Seplos), 0x26 (Boqiang)
protocol_version: 0x20
seplos_modbus_id: modbus0
update_interval: 10s
- id: battery_bank2
# Dip switch configuration of the third pack / address 0x03
# 8 7 6 5 4 3 2 1
# off, off, off, off, off, off, on, on
address: 0x03
# Known protocol versions: 0x20 (Seplos), 0x26 (Boqiang)
protocol_version: 0x20
seplos_modbus_id: modbus0
update_interval: 10s
sensor:
- platform: seplos_bms
seplos_bms_id: battery_bank0
min_cell_voltage:
name: "${battery_bank0} min cell voltage"
max_cell_voltage:
name: "${battery_bank0} max cell voltage"
delta_cell_voltage:
name: "${battery_bank0} delta cell voltage"
average_cell_voltage:
name: "${battery_bank0} average cell voltage"
total_voltage:
name: "${battery_bank0} total voltage"
current:
name: "${battery_bank0} current"
power:
name: "${battery_bank0} power"
state_of_charge:
name: "${battery_bank0} state of charge"
- platform: seplos_bms
seplos_bms_id: battery_bank1
min_cell_voltage:
name: "${battery_bank1} min cell voltage"
max_cell_voltage:
name: "${battery_bank1} max cell voltage"
delta_cell_voltage:
name: "${battery_bank1} delta cell voltage"
average_cell_voltage:
name: "${battery_bank1} average cell voltage"
total_voltage:
name: "${battery_bank1} total voltage"
current:
name: "${battery_bank1} current"
power:
name: "${battery_bank1} power"
state_of_charge:
name: "${battery_bank1} state of charge"
- platform: seplos_bms
seplos_bms_id: battery_bank2
min_cell_voltage:
name: "${battery_bank2} min cell voltage"
max_cell_voltage:
name: "${battery_bank2} max cell voltage"
delta_cell_voltage:
name: "${battery_bank2} delta cell voltage"
average_cell_voltage:
name: "${battery_bank2} average cell voltage"
total_voltage:
name: "${battery_bank2} total voltage"
current:
name: "${battery_bank2} current"
power:
name: "${battery_bank2} power"
state_of_charge:
name: "${battery_bank2} state of charge"