-
Notifications
You must be signed in to change notification settings - Fork 114
/
Copy path6chan_energy_meter_main_board.yaml
146 lines (140 loc) · 4.18 KB
/
6chan_energy_meter_main_board.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
# CircuitSetup 6 Channel Energy Meter Main Board example config
# See all options at https://esphome.io/components/sensor/atm90e32.html
substitutions:
# Change the disp_name to something you want
disp_name: Energy Meter
friendly_name: CircuitSetup Energy Meter
# Interval of how often the power data is updated
update_time: 10s
# Change current_cal to the corresponding CT's that you're using
# If different CTs per current channel, remove or change "${current_cal}" from
# "gain_ct" below and replace with the CT calibration number respectively
# Current Transformers:
# 20A/25mA SCT-006: 11143
# 30A/1V SCT-013-030: 8650
# 50A/1V SCT-013-050: 15420
# 50A/16.6mA SCT-010: 41334
# 80A/26.6mA SCT-010: 41660
# 100A/50ma SCT-013-000: 27518
# 120A/40mA: SCT-016: 41787
# 200A/100mA SCT-024: 27518
# 200A/50mA SCT-024: 55036
current_cal: '27518'
# This only needs to be changed if you're using something other than the
# Jameco 9VAC Transformer:
voltage_cal: '7305'
packages:
common: github://CircuitSetup/Expandable-6-Channel-ESP32-Energy-Meter/Software/ESPHome/6chan_common.yaml
sensor:
#IC1
- platform: atm90e32
cs_pin: 5
phase_a:
voltage:
name: ${disp_name} Volts A
id: ic1Volts
accuracy_decimals: 1
current:
name: ${disp_name} CT1 Amps
id: ct1Amps
# The max value for current that the meter can output is 65.535. If you expect to measure current over 65A,
# divide the gain_ct by 2 (120A CT) or 4 (200A CT) and multiply the current and power values by 2 or 4 by uncommenting the filter below
# filters:
# - multiply: 2
power:
name: ${disp_name} CT1 Watts
id: ct1Watts
# filters:
# - multiply: 2
gain_voltage: ${voltage_cal}
gain_ct: ${current_cal}
phase_b:
current:
name: ${disp_name} CT2 Amps
id: ct2Amps
power:
name: ${disp_name} CT2 Watts
id: ct2Watts
gain_voltage: ${voltage_cal}
gain_ct: ${current_cal}
phase_c:
current:
name: ${disp_name} CT3 Amps
id: ct3Amps
power:
name: ${disp_name} CT3 Watts
id: ct3Watts
gain_voltage: ${voltage_cal}
gain_ct: ${current_cal}
frequency:
name: ${disp_name} Freq A
line_frequency: 60Hz
gain_pga: 1X
update_interval: ${update_time}
#IC2
- platform: atm90e32
cs_pin: 4
phase_a:
#this voltage is only needed if monitoring 2 voltages
voltage:
name: ${disp_name} Volts B
id: ic2Volts
accuracy_decimals: 1
current:
name: ${disp_name} CT4 Amps
id: ct4Amps
power:
name: ${disp_name} CT4 Watts
id: ct4Watts
gain_voltage: ${voltage_cal}
gain_ct: ${current_cal}
phase_b:
current:
name: ${disp_name} CT5 Amps
id: ct5Amps
power:
name: ${disp_name} CT5 Watts
id: ct5Watts
gain_voltage: ${voltage_cal}
gain_ct: ${current_cal}
phase_c:
current:
name: ${disp_name} CT6 Amps
id: ct6Amps
power:
name: ${disp_name} CT6 Watts
id: ct6Watts
gain_voltage: ${voltage_cal}
gain_ct: ${current_cal}
frequency:
name: ${disp_name} Freq B
line_frequency: 60Hz
gain_pga: 1X
update_interval: ${update_time}
#Total Amps
- platform: template
name: ${disp_name} Total Amps
id: totalAmps
lambda: return id(ct1Amps).state + id(ct2Amps).state + id(ct3Amps).state + id(ct4Amps).state + id(ct5Amps).state + id(ct6Amps).state ;
accuracy_decimals: 2
unit_of_measurement: A
device_class: current
update_interval: ${update_time}
#Total Watts
- platform: template
name: ${disp_name} Total Watts
id: totalWatts
lambda: return id(ct1Watts).state + id(ct2Watts).state + id(ct3Watts).state + id(ct4Watts).state + id(ct5Watts).state + id(ct6Watts).state ;
accuracy_decimals: 1
unit_of_measurement: W
device_class: power
update_interval: ${update_time}
#kWh
- platform: total_daily_energy
name: ${disp_name} Total kWh
power_id: totalWatts
filters:
- multiply: 0.001
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing