-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathepever-upower.yaml
274 lines (252 loc) · 6.14 KB
/
epever-upower.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
270
271
272
273
274
esphome:
name: epever-upower
friendly_name: epever-upower
esp8266:
board: d1_mini
# Enable logging
logger:
uart:
id: mod_bus
tx_pin: TX
rx_pin: RX
baud_rate: 115200
stop_bits: 1
modbus:
flow_control_pin: D1
id: modbus1
send_wait_time: 200ms
modbus_controller:
- id: epever
## the Modbus device addr
address: 0xA
modbus_id: modbus1
setup_priority: -10
command_throttle: 200ms
update_interval: 30s
binary_sensor:
- platform: modbus_controller
modbus_controller_id: epever
id: inverter_bypass
name: "Inverter Bypass"
# 0:NoBypass, 1:Bypass
address: 0x2100
register_type: discrete_input
switch:
#- platform: modbus_controller
# modbus_controller_id: epever
# id: reset_to_fabric_default
# name: "Reset to Factory Default"
# register_type: coil
# address: 0x15
# bitmask: 1
- platform: modbus_controller
modbus_controller_id: epever
id: manual_control_load
register_type: coil
address: 0x0106
name: "manual control the load"
bitmask: 1
- platform: modbus_controller
modbus_controller_id: epever
id: charge_from_grid
name: "Charge from grid"
address: 0x9607
register_type: holding
# 1:Solar Priority, 2:Utility & Solar, 3:Solar
write_lambda: |-
ESP_LOGD("main","Modbus Switch incoming state = %f",x);
// return false ; // use this to just change the value
payload.push_back(0x2); // On
payload.push_back(0x3); // Off
return true;
sensor:
- platform: wifi_signal
name: "WiFi Signal"
update_interval: 60s
# Utility
- platform: modbus_controller
modbus_controller_id: epever
id: grid_voltage
name: "Grid Voltage"
unit_of_measurement: V
address: 0x3500
register_type: read
accuracy_decimals: 2
filters:
- multiply: 0.01
- platform: modbus_controller
modbus_controller_id: epever
id: grid_current
name: "Grid Current"
unit_of_measurement: A
address: 0x3501
register_type: read
accuracy_decimals: 2
filters:
- multiply: 0.01
- platform: modbus_controller
modbus_controller_id: epever
id: grid_power
name: "Grid Power"
unit_of_measurement: W
address: 0x3502
register_type: read
accuracy_decimals: 0
filters:
- multiply: 0.1
- platform: modbus_controller
modbus_controller_id: epever
id: grid_state
name: "Grid State"
# 0:Normal, 1:Low input; 2:High input, 3: No connected
address: 0x3511
register_type: read
- platform: modbus_controller
modbus_controller_id: epever
id: grid_total
name: "Grid Total"
unit_of_measurement: kWh
address: 0x350F
register_type: read
accuracy_decimals: 2
filters:
- multiply: 0.01
# PV Array
- platform: modbus_controller
modbus_controller_id: epever
id: pv_voltage
name: "PV Voltage"
unit_of_measurement: V
address: 0x3549
register_type: read
accuracy_decimals: 2
filters:
- multiply: 0.01
- platform: modbus_controller
modbus_controller_id: epever
id: pv_current
name: "PV Current"
unit_of_measurement: A
address: 0x354A
register_type: read
accuracy_decimals: 2
filters:
- multiply: 0.01
- platform: modbus_controller
modbus_controller_id: epever
id: pv_power
name: "PV Power"
unit_of_measurement: W
address: 0x354B
register_type: read
accuracy_decimals: 2
filters:
- multiply: 0.01
- platform: modbus_controller
modbus_controller_id: epever
id: pv_total
name: "PV Total"
unit_of_measurement: kWh
address: 0x3557
register_type: read
accuracy_decimals: 2
filters:
- multiply: 0.01
# Load
- platform: modbus_controller
modbus_controller_id: epever
id: load_voltage
name: "Load Voltage"
unit_of_measurement: V
address: 0x3521
register_type: read
accuracy_decimals: 2
filters:
- multiply: 0.01
- platform: modbus_controller
modbus_controller_id: epever
id: load_current
name: "Load Current"
unit_of_measurement: A
address: 0x3522
register_type: read
accuracy_decimals: 2
filters:
- multiply: 0.01
- platform: modbus_controller
modbus_controller_id: epever
id: load_total
name: "Load Total"
unit_of_measurement: kWh
address: 0x3530
register_type: read
accuracy_decimals: 2
filters:
- multiply: 0.01
# Battery
- platform: modbus_controller
modbus_controller_id: epever
id: battery_voltage
name: "Battery Voltage"
unit_of_measurement: V
address: 0x3580
register_type: read
accuracy_decimals: 2
filters:
- multiply: 0.01
- platform: modbus_controller
modbus_controller_id: epever
id: battery_current
name: "Battery Current"
unit_of_measurement: A
address: 0x3581
register_type: read
accuracy_decimals: 2
filters:
- multiply: 0.01
- platform: modbus_controller
modbus_controller_id: epever
id: battery_capacity
name: "Battery Capacity"
unit_of_measurement: "%"
address: 0x3586
register_type: read
accuracy_decimals: 1
- platform: modbus_controller
modbus_controller_id: epever
id: battery_temp
name: "Battery Temp"
unit_of_measurement: "°C"
address: 0x3512
register_type: read
filters:
- multiply: 0.01
- platform: modbus_controller
modbus_controller_id: epever
id: battery_state
name: "Battery State"
# 0:Normal, 1:Overvoltage, 2:Undervoltage, 3:Undervoltage Disconnect, 4:Fault
address: 0x3589
register_type: read
- platform: modbus_controller
modbus_controller_id: epever
id: charging_mode
name: "Charging Mode"
address: 0x9607
register_type: holding
# Enable Home Assistant API
api:
encryption:
key: "Qe6Y3FaoxNhQIltffbHTaTd/XgM7y3j9W3tSO46wu4A="
ota:
password: "1876349ef83259523a36893c241d1ad2"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Epever Fallback Hotspot"
password: "69fYokgtS49H"
captive_portal:
web_server:
port: 80