-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathesp32-0x25-sensors_only.yaml
269 lines (226 loc) · 6.54 KB
/
esp32-0x25-sensors_only.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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
substitutions:
name: "esp32-0x25-sensors_only"
friendly_name: "esp32-0x25-sensors_only"
esphome:
name: ${name}
friendly_name: ${friendly_name}
min_version: 2024.6.0
name_add_mac_suffix: false
project:
name: esphome.web
version: dev
esp32:
board: esp32dev
framework:
type: arduino
# Enable logging
logger:
# needed for C3, S2 and S3 (and possibly others) to read logs via USB, depending on framework used
#hardware_uart: USB_CDC
# use INFO for production, VERY_VERBOSE for debugging or filing an issue report
level: INFO
#level: DEBUG
#level: VERBOSE
#level: VERY_VERBOSE
# Enable Home Assistant API
api:
encryption:
key: !secret api_encryption_key
# disable reboot if unable to connect API
reboot_timeout: 0min
# Allow Over-The-Air updates
ota:
platform: esphome
password: !secret ota_password
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# In conjunction with captive_portal, this spawns an AP with the device name and mac address if unable to connect
ap:
password: !secret fallback_hotspot_password
# how long to try connecting to WiFi before spawning the backup AP
ap_timeout: 5min
# disable reboot if unable to connect to WiFi
reboot_timeout: 0min
# In combination with the wifi fallback AP this allows the user
# to provision wifi credentials to the device via WiFi AP.
captive_portal:
# allows access to all BMS sensors and configuration
web_server:
version: 3
# this would just be annoying every time, so disable ota from here instead
#auth:
# username: !secret web_server_username
# password: !secret web_server_password
# disable firmware upload via the web server which is currently un-authenticated
ota: false
# don't reference external resources hosted on the net so that device webserver dashboard will continue working if internet is down
local: true
# import the pace_bms component
external_components:
- source:
type: git
url: https://github.com/nkinnan/esphome-pace-bms
ref: "main"
components: [ pace_bms ]
refresh: 1s
# this can be removed once the PR goes through: https://github.com/esphome/esphome/pull/7425
- source:
type: git
url: https://github.com/nkinnan/esphome
ref: "make_time_dependency_optional"
components: [ datetime ]
refresh: 1s
uart:
id: uart_1
baud_rate: 9600
tx_pin: GPIO17
rx_pin: GPIO16
rx_buffer_size: 256
pace_bms:
id: pace_bms_at_address_1
address: 1
uart_id: uart_1
# needed for RS485
flow_control_pin: GPIO4
update_interval: 5s
request_throttle: 50ms
response_timeout: 1000ms
protocol_commandset: 0x25 # example only
# protocol_variant: "EG4" # example only
# protocol_version: 0x20 # example only
# battery_chemistry: 0x4A # example only
sensor:
- platform: pace_bms
pace_bms_id: pace_bms_at_address_1
cell_count:
name: "Cell Count"
cell_voltage_01:
name: "Cell Voltage 01"
cell_voltage_02:
name: "Cell Voltage 02"
cell_voltage_03:
name: "Cell Voltage 03"
cell_voltage_04:
name: "Cell Voltage 04"
cell_voltage_05:
name: "Cell Voltage 05"
cell_voltage_06:
name: "Cell Voltage 06"
cell_voltage_07:
name: "Cell Voltage 07"
cell_voltage_08:
name: "Cell Voltage 08"
cell_voltage_09:
name: "Cell Voltage 09"
cell_voltage_10:
name: "Cell Voltage 10"
cell_voltage_11:
name: "Cell Voltage 11"
cell_voltage_12:
name: "Cell Voltage 12"
cell_voltage_13:
name: "Cell Voltage 13"
cell_voltage_14:
name: "Cell Voltage 14"
cell_voltage_15:
name: "Cell Voltage 15"
cell_voltage_16:
name: "Cell Voltage 16"
temperature_count:
name: "Temperature Count"
# Generally the first four temperatures are cell measurements and the last two are
# MOSFET / Environment or Environment / MOSFET with the order of those two depending on manufacturer
temperature_01:
name: "Cell Temperature 1"
temperature_02:
name: "Cell Temperature 2"
temperature_03:
name: "Cell Temperature 3"
temperature_04:
name: "Cell Temperature 4"
temperature_05:
name: "MOSFET Temperature"
temperature_06:
name: "Environment Temperature"
total_voltage:
name: "Total Voltage"
current:
name: "Current"
power:
name: "Power"
remaining_capacity:
name: "Remaining Capacity"
full_capacity:
name: "Full Capacity"
design_capacity: # not available on EG4 protocol 0x20 variant
name: "Design Capacity"
state_of_charge:
name: "State of Charge"
state_of_health:
name: "State of Health"
cycle_count:
name: "Cycle Count"
min_cell_voltage:
name: "Min Cell Voltage"
max_cell_voltage:
name: "Max Cell Voltage"
avg_cell_voltage:
name: "Avg Cell Voltage"
max_cell_differential:
name: "Max Cell Differential"
text_sensor:
- platform: pace_bms
pace_bms_id: pace_bms_at_address_1
hardware_version:
name: "Hardware Version"
serial_number: # not available on EG4 protocol 0x20 variant
name: "Serial Number"
# pre-decoded human readable text strings that describe all of the specific status values and are suitable for display
warning_status:
name: "Warning Status"
protection_status:
name: "Protection Status"
fault_status:
name: "Fault Status"
system_status:
name: "System Status"
configuration_status:
name: "Configuration Status"
balancing_status:
name: "Balancing Status"
datetime:
- platform: pace_bms
pace_bms_id: pace_bms_at_address_1
system_date_and_time:
name: "System Date and Time"
button:
- platform: pace_bms
pace_bms_id: pace_bms_at_address_1
shutdown:
name: "Shutdown" # will actually "reboot" if the battery is charging/discharging - it only stays shut down if idle
switch:
- platform: pace_bms
pace_bms_id: pace_bms_at_address_1
buzzer_alarm:
name: "Buzzer Alarm"
led_alarm:
name: "Led Alarm"
charge_current_limiter:
name: "Charge Current Limiter"
charge_mosfet:
name: "Charge Mosfet"
discharge_mosfet:
name: "Discharge Mosfet"
select:
- platform: pace_bms
pace_bms_id: pace_bms_at_address_1
charge_current_limiter_gear:
name: "Charge Current Limiter Gear"
# setting the protocol is possible on some version 25 BMSes but not all
protocol_can:
name: "Protocol (CAN)"
protocol_rs485:
name: "Protocol (RS485)"
protocol_type:
name: "Protocol (Type)"