forked from syssi/esphome-seplos-bms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
esp32-seplos-v3-example-multiple-battery-banks.yaml
112 lines (99 loc) · 2.39 KB
/
esp32-seplos-v3-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
substitutions:
name: seplos-bms
battery_bank0: "${name} bank 0"
battery_bank1: "${name} bank 1"
battery_bank2: "${name} bank 2"
device_description: "Monitor and control multiple Seplos V3 BMS via RS485 (Modbus)"
tx_pin: GPIO16
rx_pin: GPIO17
esphome:
name: ${name}
comment: ${device_description}
min_version: 2024.6.0
project:
name: "syssi.esphome-seplos-bms"
version: 1.2.0
esp32:
board: wemos_d1_mini32
framework:
type: esp-idf
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: 19200
tx_pin: ${tx_pin}
rx_pin: ${rx_pin}
debug:
direction: BOTH
dummy_receiver: false
modbus:
- id: modbus0
uart_id: uart_0
send_wait_time: 200ms
modbus_controller:
- id: bms0
address: 0x00
modbus_id: modbus0
command_throttle: 200ms
update_interval: 10s
- id: bms1
address: 0x01
modbus_id: modbus0
command_throttle: 200ms
update_interval: 10s
- id: bms2
address: 0x02
modbus_id: modbus0
command_throttle: 200ms
update_interval: 10s
sensor:
- platform: modbus_controller
modbus_controller_id: bms0
name: "${battery_bank0} total voltage"
address: 0x1000
register_type: read
value_type: U_WORD
unit_of_measurement: "V"
device_class: voltage
state_class: measurement
accuracy_decimals: 2
filters:
- multiply: 0.01
- platform: modbus_controller
modbus_controller_id: bms1
name: "${battery_bank1} total voltage"
address: 0x1000
register_type: read
value_type: U_WORD
unit_of_measurement: "V"
device_class: voltage
state_class: measurement
accuracy_decimals: 2
filters:
- multiply: 0.01
- platform: modbus_controller
modbus_controller_id: bms2
name: "${battery_bank2} total voltage"
address: 0x1000
register_type: read
value_type: U_WORD
unit_of_measurement: "V"
device_class: voltage
state_class: measurement
accuracy_decimals: 2
filters:
- multiply: 0.01