forked from digiblur/digiNRG_ESPHome
-
Notifications
You must be signed in to change notification settings - Fork 0
/
diramu_12chan32.yaml
330 lines (315 loc) · 8.41 KB
/
diramu_12chan32.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
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
substitutions:
# Change the disp_name to something you want
disp_name: PM12C
# Interval of how often the power is updated
update_time: 10s
# frequency of local supply 50 or 60Hz
frequency: 50Hz
#SCT-013-000 100A/50ma - 32498
#gain_ct100A: '26077'
gain_ct100A: '32498'
# SCT-013-050 50A/1V - 15420
gain_ct50A: '15420'
#SCT-013-030 30A/1V - 9210
gain_ct30A: '8650'
gain_v: '45581'
mult_v: '3'
esphome:
name: power_monitor
platform: ESP32
board: nodemcu-32s
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_pass
# Enable logging
logger:
# Enable Home Assistant API
api:
password: !secret api_pass
ota:
password: !secret api_pass
mqtt:
broker: !secret mqtt_host
username: !secret mqtt_user
password: !secret mqtt_pass
web_server:
port: 80
spi:
clk_pin: 18
miso_pin: 19
mosi_pin: 23
sensor:
- platform: wifi_signal
name: ${disp_name} WiFi
update_interval: 60s
- platform: atm90e32
cs_pin: 5
phase_a:
voltage:
name: ${disp_name} Volts A
id: ic1Volts
accuracy_decimals: 1
filters:
- multiply: ${mult_v}
current:
name: ${disp_name} CT1 Amps
id: ct1Amps
power:
name: ${disp_name} CT1 Pwr
id: ct1Pwr
gain_voltage: ${gain_v}
# Voltage using a 9VAC power transformer
# Note: If you can not get the voltage correct with the highest gain of 65535, uncomment the 2.0 multiply filter above and lower the gain as needed
gain_ct: ${gain_ct100A}
phase_b:
current:
name: ${disp_name} CT2 Amps
id: ct2Amps
power:
name: ${disp_name} CT2 Pwr
id: ct2Pwr
gain_ct: ${gain_ct100A}
# Current calibration using a 100A/50ma SCT-013-000
# gain_ct: 8650
# Current calibration using a 30A/1V SCT-013-030
phase_c:
current:
name: ${disp_name} CT3 Amps
id: ct3Amps
power:
name: ${disp_name} CT3 Pwr
id: ct3Pwr
gain_ct: ${gain_ct30A}
# Current calibration using a 30A/1V SCT-013-030
frequency:
name: ${disp_name} Freq A
line_frequency: ${frequency}
gain_pga: 1X
update_interval: ${update_time}
- platform: atm90e32
cs_pin: 4
phase_a:
voltage:
name: ${disp_name} Volts B
id: ic2Volts
accuracy_decimals: 1
filters:
- multiply: ${mult_v}
current:
name: ${disp_name} CT4 Amps
id: ct4Amps
power:
name: ${disp_name} CT4 Pwr
id: ct4Pwr
gain_voltage: 45200
gain_ct: ${gain_ct30A}
# Current calibration using a 30A/1V SCT-013-030
phase_b:
current:
name: ${disp_name} CT5 Amps
id: ct5Amps
power:
name: ${disp_name} CT5 Pwr
id: ct5Pwr
gain_ct: ${gain_ct30A}
# Current calibration using a 30A/1V SCT-013-030
phase_c:
current:
name: ${disp_name} CT6 Amps
id: ct6Amps
power:
name: ${disp_name} CT6 Pwr
id: ct6Pwr
gain_ct: ${gain_ct30A}
# Current calibration using a 30A/1V SCT-013-030
frequency:
name: ${disp_name} Freq B
line_frequency: ${frequency}
gain_pga: 1X
update_interval: ${update_time}
- platform: atm90e32
cs_pin: 15
phase_a:
voltage:
name: ${disp_name} Volts C
id: ic3Volts
accuracy_decimals: 1
filters:
- multiply: ${mult_v}
current:
name: ${disp_name} CT7 Amps
id: ct7Amps
power:
name: ${disp_name} CT7 Pwr
id: ct7Pwr
gain_voltage: ${gain_v}
gain_ct: ${gain_ct30A}
#gain_ct: 9631
# Current calibration using a 30A/1V SCT-013-030
phase_b:
current:
name: ${disp_name} CT8 Amps
id: ct8Amps
power:
name: ${disp_name} CT8 Pwr
id: ct8Pwr
gain_ct: ${gain_ct30A}
# Current calibration using a 30A/1V SCT-013-030
phase_c:
current:
name: ${disp_name} CT9 Amps
id: ct9Amps
power:
name: ${disp_name} CT9 Pwr
id: ct9Pwr
gain_ct: ${gain_ct30A}
# Current calibration using a 30A/1V SCT-013-030
frequency:
name: ${disp_name} Freq C
line_frequency: ${frequency}
gain_pga: 1X
update_interval: ${update_time}
- platform: atm90e32
cs_pin: 16
phase_a:
voltage:
name: ${disp_name} Volts D
id: ic4Volts
accuracy_decimals: 1
filters:
- multiply: ${mult_v}
current:
name: ${disp_name} CT10 Amps
id: ct10Amps
power:
name: ${disp_name} CT10 Pwr
id: ct10Pwr
gain_voltage: ${gain_v}
gain_ct: ${gain_ct30A}
# Current calibration using a 30A/1V SCT-013-030
phase_b:
current:
name: ${disp_name} CT11 Amps
id: ct11Amps
power:
name: ${disp_name} CT11 Pwr
id: ct11Pwr
gain_ct: ${gain_ct30A}
# Current calibration using a 100A/50ma SCT-013-000
phase_c:
current:
name: ${disp_name} CT12 Amps
id: ct12Amps
power:
name: ${disp_name} CT12 Pwr
id: ct12Pwr
gain_ct: ${gain_ct30A}
# Current calibration using a 30A/1V SCT-013-030
frequency:
name: ${disp_name} Freq D
line_frequency: ${frequency}
gain_pga: 1X
update_interval: ${update_time}
- platform: template
name: ${disp_name} CT1 Watts
id: ct1Watts
lambda: return id(ct1Amps).state * id(ic1Volts).state;
accuracy_decimals: 0
unit_of_measurement: VA
icon: "mdi:flash-circle"
update_interval: ${update_time}
- platform: template
name: ${disp_name} CT2 Watts
id: ct2Watts
lambda: return id(ct2Amps).state * id(ic1Volts).state;
accuracy_decimals: 0
unit_of_measurement: VA
icon: "mdi:flash-circle"
update_interval: ${update_time}
- platform: template
name: ${disp_name} CT3 Watts
id: ct3Watts
lambda: return id(ct3Amps).state * id(ic1Volts).state;
accuracy_decimals: 0
unit_of_measurement: VA
icon: "mdi:flash-circle"
update_interval: ${update_time}
- platform: template
name: ${disp_name} CT4 Watts
id: ct4Watts
lambda: return id(ct4Amps).state * id(ic2Volts).state;
accuracy_decimals: 0
unit_of_measurement: VA
icon: "mdi:flash-circle"
update_interval: ${update_time}
- platform: template
name: ${disp_name} CT5 Watts
id: ct5Watts
lambda: return id(ct5Amps).state * id(ic2Volts).state;
accuracy_decimals: 0
unit_of_measurement: VA
icon: "mdi:flash-circle"
update_interval: ${update_time}
- platform: template
name: ${disp_name} CT6 Watts
id: ct6Watts
lambda: return id(ct6Amps).state * id(ic2Volts).state;
accuracy_decimals: 0
unit_of_measurement: VA
icon: "mdi:flash-circle"
update_interval: ${update_time}
- platform: template
name: ${disp_name} CT7 Watts
id: ct7Watts
lambda: return id(ct7Amps).state * id(ic3Volts).state;
accuracy_decimals: 0
unit_of_measurement: VA
icon: "mdi:flash-circle"
update_interval: ${update_time}
- platform: template
name: ${disp_name} CT8 Watts
id: ct8Watts
lambda: return id(ct8Amps).state * id(ic3Volts).state;
accuracy_decimals: 0
unit_of_measurement: VA
icon: "mdi:flash-circle"
update_interval: ${update_time}
- platform: template
name: ${disp_name} CT9 Watts
id: ct9Watts
lambda: return id(ct9Amps).state * id(ic3Volts).state;
accuracy_decimals: 0
unit_of_measurement: VA
icon: "mdi:flash-circle"
update_interval: ${update_time}
- platform: template
name: ${disp_name} CT10 Watts
id: ct10Watts
lambda: return id(ct10Amps).state * id(ic4Volts).state;
accuracy_decimals: 0
unit_of_measurement: VA
icon: "mdi:flash-circle"
update_interval: ${update_time}
- platform: template
name: ${disp_name} CT11 Watts
id: ct11Watts
lambda: return id(ct11Amps).state * id(ic4Volts).state;
accuracy_decimals: 0
unit_of_measurement: VA
icon: "mdi:flash-circle"
update_interval: ${update_time}
- platform: template
name: ${disp_name} CT12 Watts
id: ct12Watts
lambda: return id(ct12Amps).state * id(ic4Volts).state;
accuracy_decimals: 0
unit_of_measurement: VA
icon: "mdi:flash-circle"
update_interval: ${update_time}
switch:
- platform: restart
name: ${disp_name} Restart
time:
- platform: sntp
id: sntp_time
timezone: 'Australia/Sydney'