mirror of
https://github.com/CeeWeasel/fresh-home.git
synced 2026-08-09 18:40:14 -04:00
stop hating myself
This commit is contained in:
@@ -0,0 +1,223 @@
|
||||
# CircuitSetup 6 Channel Energy Meter Main Board with 1 add-on board, 3-Phase over ethernet - 12 current channels
|
||||
#
|
||||
# Uses the Lilygo T-ETH-Lite ESP32S3 and the CircuitSetup 6 Channel Energy Meter Ethernet Adapter.
|
||||
# Setup asumes JP12 and JP13 have been severed on the main and add-on board, and each phase has its
|
||||
# own voltage transformer hooked up to the main board jack, and VA2 on each meter.
|
||||
#
|
||||
# Current Trasnformers must be in phase with their respective voltage:
|
||||
# Phase 1: CT1-CT6 (main board, add-on board left side)
|
||||
# Phase 2: CT7-CT9 (main board right)
|
||||
# Phase 3: CT10-CT12 (add-on board right)
|
||||
|
||||
# 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'
|
||||
|
||||
esphome:
|
||||
name: "${disp_name}"
|
||||
friendly_name: "${friendly_name}"
|
||||
name_add_mac_suffix: true
|
||||
platformio_options:
|
||||
board_build.flash_mode: dio
|
||||
project:
|
||||
name: circuitsetup.6c-energy-meter-ethernet
|
||||
version: "1.6"
|
||||
|
||||
packages:
|
||||
common: github://CircuitSetup/Expandable-6-Channel-ESP32-Energy-Meter/Software/ESPHome/6chan_common_ethernet.yaml
|
||||
|
||||
# Enable Home Assistant API
|
||||
# An encryption key is recommended and can be generated here:
|
||||
# https://esphome.io/components/api.html#configuration-variables
|
||||
api:
|
||||
# encryption:
|
||||
# key: "YOUR_ENCRYPTION_KEY_HERE"
|
||||
|
||||
# Enable OTA updating
|
||||
ota:
|
||||
- platform: esphome
|
||||
|
||||
web_server:
|
||||
port: 80
|
||||
|
||||
sensor:
|
||||
#IC1 Main
|
||||
- platform: atm90e32
|
||||
cs_pin: 8
|
||||
phase_a:
|
||||
voltage:
|
||||
name: ${disp_name} Volts Phase 1
|
||||
id: voltsPhase1
|
||||
accuracy_decimals: 1
|
||||
power:
|
||||
name: ${disp_name} CT1 Watts
|
||||
id: ct1Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
phase_b:
|
||||
power:
|
||||
name: ${disp_name} CT2 Watts
|
||||
id: ct2Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
phase_c:
|
||||
power:
|
||||
name: ${disp_name} CT3 Watts
|
||||
id: ct3Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
frequency:
|
||||
name: ${disp_name} Freq Phase 1
|
||||
line_frequency: 50Hz
|
||||
gain_pga: 1X
|
||||
update_interval: ${update_time}
|
||||
#IC2 Main
|
||||
- platform: atm90e32
|
||||
cs_pin: 4
|
||||
phase_a:
|
||||
voltage:
|
||||
name: ${disp_name} Volts Phase 2
|
||||
id: voltsPhase2
|
||||
accuracy_decimals: 1
|
||||
power:
|
||||
name: ${disp_name} CT7 Watts
|
||||
id: ct7Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
phase_b:
|
||||
power:
|
||||
name: ${disp_name} CT8 Watts
|
||||
id: ct8Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
phase_c:
|
||||
power:
|
||||
name: ${disp_name} CT9 Watts
|
||||
id: ct9Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
line_frequency: 50Hz
|
||||
gain_pga: 1X
|
||||
update_interval: ${update_time}
|
||||
#IC1 AddOn 1
|
||||
- platform: atm90e32
|
||||
cs_pin: 0
|
||||
phase_a:
|
||||
power:
|
||||
name: ${disp_name} CT4 Watts
|
||||
id: ct4Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
phase_b:
|
||||
power:
|
||||
name: ${disp_name} CT5 Watts
|
||||
id: ct5Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
phase_c:
|
||||
power:
|
||||
name: ${disp_name} CT6 Watts
|
||||
id: ct6Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
line_frequency: 50Hz
|
||||
gain_pga: 1X
|
||||
update_interval: ${update_time}
|
||||
#IC2 AddOn 1
|
||||
- platform: atm90e32
|
||||
cs_pin: 16
|
||||
phase_a:
|
||||
voltage:
|
||||
name: ${disp_name} Volts Phase 3
|
||||
id: voltsPhase3
|
||||
accuracy_decimals: 1
|
||||
power:
|
||||
name: ${disp_name} CT10 Watts
|
||||
id: ct10Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
phase_b:
|
||||
power:
|
||||
name: ${disp_name} CT11 Watts
|
||||
id: ct11Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
phase_c:
|
||||
power:
|
||||
name: ${disp_name} CT12 Watts
|
||||
id: ct12Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
line_frequency: 50Hz
|
||||
gain_pga: 1X
|
||||
update_interval: ${update_time}
|
||||
|
||||
#Total Watts Phase 1
|
||||
- platform: template
|
||||
name: ${disp_name} Total Watts Phase 1
|
||||
id: totalWattsPhase1
|
||||
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}
|
||||
#Total Watts Phase 2
|
||||
- platform: template
|
||||
name: ${disp_name} Total Watts Phase 2
|
||||
id: totalWattsPhase2
|
||||
lambda: return id(ct7Watts).state + id(ct8Watts).state + id(ct9Watts).state ;
|
||||
accuracy_decimals: 1
|
||||
unit_of_measurement: W
|
||||
device_class: power
|
||||
update_interval: ${update_time}
|
||||
#Total Watts Phase 3
|
||||
- platform: template
|
||||
name: ${disp_name} Total Watts Phase 3
|
||||
id: totalWattsPhase3
|
||||
lambda: return id(ct10Watts).state + id(ct11Watts).state + id(ct12Watts).state ;
|
||||
accuracy_decimals: 1
|
||||
unit_of_measurement: W
|
||||
device_class: power
|
||||
update_interval: ${update_time}
|
||||
#Total Watts
|
||||
- platform: template
|
||||
name: ${disp_name} Total Watts
|
||||
id: totalWatts
|
||||
lambda: return id(totalWattsPhase1).state + id(totalWattsPhase2).state + id(totalWattsPhase3).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
|
||||
@@ -0,0 +1,459 @@
|
||||
# CircuitSetup 6 Channel Energy Meter Main Board with 6 add-on boards - 42 current channels
|
||||
# To reduce the number of sensors, only the power sensor for each current channel is output.
|
||||
# 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: '11143' # 20A/25mA
|
||||
|
||||
# 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 Main
|
||||
- platform: atm90e32
|
||||
cs_pin: 5
|
||||
phase_a:
|
||||
voltage:
|
||||
name: ${disp_name} Volts A Main
|
||||
id: ic1Volts
|
||||
accuracy_decimals: 1
|
||||
power:
|
||||
name: ${disp_name} CT1 Watts
|
||||
id: ct1Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
phase_b:
|
||||
power:
|
||||
name: ${disp_name} CT2 Watts
|
||||
id: ct2Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
phase_c:
|
||||
power:
|
||||
name: ${disp_name} CT3 Watts
|
||||
id: ct3Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
frequency:
|
||||
name: ${disp_name} Freq A Main
|
||||
line_frequency: 60Hz
|
||||
gain_pga: 1X
|
||||
update_interval: ${update_time}
|
||||
#IC2 Main
|
||||
- platform: atm90e32
|
||||
cs_pin: 4
|
||||
phase_a:
|
||||
power:
|
||||
name: ${disp_name} CT4 Watts
|
||||
id: ct4Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
phase_b:
|
||||
power:
|
||||
name: ${disp_name} CT5 Watts
|
||||
id: ct5Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
phase_c:
|
||||
power:
|
||||
name: ${disp_name} CT6 Watts
|
||||
id: ct6Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
line_frequency: 60Hz
|
||||
gain_pga: 1X
|
||||
update_interval: ${update_time}
|
||||
#IC1 AddOn 1
|
||||
- platform: atm90e32
|
||||
cs_pin: 0
|
||||
phase_a:
|
||||
power:
|
||||
name: ${disp_name} CT7 Watts
|
||||
id: ct7Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
phase_b:
|
||||
power:
|
||||
name: ${disp_name} CT8 Watts
|
||||
id: ct8Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
phase_c:
|
||||
power:
|
||||
name: ${disp_name} CT9 Watts
|
||||
id: ct9Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
line_frequency: 60Hz
|
||||
gain_pga: 1X
|
||||
update_interval: ${update_time}
|
||||
#IC2 AddOn 1
|
||||
- platform: atm90e32
|
||||
cs_pin: 16
|
||||
phase_a:
|
||||
power:
|
||||
name: ${disp_name} CT10 Watts
|
||||
id: ct10Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
phase_b:
|
||||
power:
|
||||
name: ${disp_name} CT11 Watts
|
||||
id: ct11Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
phase_c:
|
||||
power:
|
||||
name: ${disp_name} CT12 Watts
|
||||
id: ct12Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
line_frequency: 60Hz
|
||||
gain_pga: 1X
|
||||
update_interval: ${update_time}
|
||||
#IC1 AddOn 2
|
||||
- platform: atm90e32
|
||||
cs_pin: 27
|
||||
phase_a:
|
||||
power:
|
||||
name: ${disp_name} CT13 Watts
|
||||
id: ct13Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
phase_b:
|
||||
power:
|
||||
name: ${disp_name} CT14 Watts
|
||||
id: ct14Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
phase_c:
|
||||
power:
|
||||
name: ${disp_name} CT15 Watts
|
||||
id: ct15Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
line_frequency: 60Hz
|
||||
gain_pga: 1X
|
||||
update_interval: ${update_time}
|
||||
#IC2 AddOn 2
|
||||
- platform: atm90e32
|
||||
cs_pin: 17
|
||||
phase_a:
|
||||
power:
|
||||
name: ${disp_name} CT16 Watts
|
||||
id: ct16Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
phase_b:
|
||||
power:
|
||||
name: ${disp_name} CT17 Watts
|
||||
id: ct17Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
phase_c:
|
||||
power:
|
||||
name: ${disp_name} CT18 Watts
|
||||
id: ct18Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
line_frequency: 60Hz
|
||||
gain_pga: 1X
|
||||
update_interval: ${update_time}
|
||||
#IC1 AddOn 3
|
||||
- platform: atm90e32
|
||||
#do not use GPIO2 if ESP32 has an on-board LED assigned to it
|
||||
cs_pin: 2
|
||||
phase_a:
|
||||
power:
|
||||
name: ${disp_name} CT19 Watts
|
||||
id: ct19Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
phase_b:
|
||||
power:
|
||||
name: ${disp_name} CT20 Watts
|
||||
id: ct20Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
phase_c:
|
||||
power:
|
||||
name: ${disp_name} CT21 Watts
|
||||
id: ct21Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
line_frequency: 60Hz
|
||||
gain_pga: 1X
|
||||
update_interval: ${update_time}
|
||||
#IC2 AddOn 3
|
||||
- platform: atm90e32
|
||||
cs_pin: 21
|
||||
phase_a:
|
||||
power:
|
||||
name: ${disp_name} CT22 Watts
|
||||
id: ct22Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
phase_b:
|
||||
power:
|
||||
name: ${disp_name} CT23 Watts
|
||||
id: ct23Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
phase_c:
|
||||
power:
|
||||
name: ${disp_name} CT24 Watts
|
||||
id: ct24Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
line_frequency: 60Hz
|
||||
gain_pga: 1X
|
||||
update_interval: ${update_time}
|
||||
#IC1 AddOn 4
|
||||
- platform: atm90e32
|
||||
cs_pin: 13
|
||||
phase_a:
|
||||
power:
|
||||
name: ${disp_name} CT25 Watts
|
||||
id: ct25Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
phase_b:
|
||||
power:
|
||||
name: ${disp_name} CT26 Watts
|
||||
id: ct26Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
phase_c:
|
||||
power:
|
||||
name: ${disp_name} CT27 Watts
|
||||
id: ct27Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
line_frequency: 60Hz
|
||||
gain_pga: 1X
|
||||
update_interval: ${update_time}
|
||||
#IC2 AddOn 4
|
||||
- platform: atm90e32
|
||||
cs_pin: 22
|
||||
phase_a:
|
||||
power:
|
||||
name: ${disp_name} CT28 Watts
|
||||
id: ct28Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
phase_b:
|
||||
power:
|
||||
name: ${disp_name} CT29 Watts
|
||||
id: ct29Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
phase_c:
|
||||
power:
|
||||
name: ${disp_name} CT30 Watts
|
||||
id: ct30Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
line_frequency: 60Hz
|
||||
gain_pga: 1X
|
||||
update_interval: ${update_time}
|
||||
#IC1 AddOn 5
|
||||
- platform: atm90e32
|
||||
cs_pin: 14
|
||||
phase_a:
|
||||
power:
|
||||
name: ${disp_name} CT31 Watts
|
||||
id: ct31Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
phase_b:
|
||||
power:
|
||||
name: ${disp_name} CT32 Watts
|
||||
id: ct32Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
phase_c:
|
||||
power:
|
||||
name: ${disp_name} CT33 Watts
|
||||
id: ct33Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
line_frequency: 60Hz
|
||||
gain_pga: 1X
|
||||
update_interval: ${update_time}
|
||||
#IC2 AddOn 5
|
||||
- platform: atm90e32
|
||||
cs_pin: 25
|
||||
phase_a:
|
||||
power:
|
||||
name: ${disp_name} CT34 Watts
|
||||
id: ct34Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
phase_b:
|
||||
power:
|
||||
name: ${disp_name} CT35 Watts
|
||||
id: ct35Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
phase_c:
|
||||
power:
|
||||
name: ${disp_name} CT36 Watts
|
||||
id: ct36Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
line_frequency: 60Hz
|
||||
gain_pga: 1X
|
||||
update_interval: ${update_time}
|
||||
#IC1 AddOn 6
|
||||
- platform: atm90e32
|
||||
cs_pin: 15
|
||||
phase_a:
|
||||
power:
|
||||
name: ${disp_name} CT37 Watts
|
||||
id: ct37Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
phase_b:
|
||||
power:
|
||||
name: ${disp_name} CT38 Watts
|
||||
id: ct38Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
phase_c:
|
||||
power:
|
||||
name: ${disp_name} CT39 Watts
|
||||
id: ct39Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
line_frequency: 60Hz
|
||||
gain_pga: 1X
|
||||
update_interval: ${update_time}
|
||||
#IC2 AddOn 6
|
||||
- platform: atm90e32
|
||||
cs_pin: 26
|
||||
phase_a:
|
||||
power:
|
||||
name: ${disp_name} CT40 Watts
|
||||
id: ct40Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
phase_b:
|
||||
power:
|
||||
name: ${disp_name} CT41 Watts
|
||||
id: ct41Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
phase_c:
|
||||
power:
|
||||
name: ${disp_name} CT42 Watts
|
||||
id: ct42Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
line_frequency: 60Hz
|
||||
gain_pga: 1X
|
||||
update_interval: ${update_time}
|
||||
|
||||
#Total Watts Main
|
||||
- platform: template
|
||||
name: ${disp_name} Total Watts Main
|
||||
id: totalWattsMain
|
||||
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}
|
||||
#Total Watts AddOn1
|
||||
- platform: template
|
||||
name: ${disp_name} Total Watts Add-on1
|
||||
id: totalWattsAddOn1
|
||||
lambda: return id(ct7Watts).state + id(ct8Watts).state + id(ct9Watts).state + id(ct10Watts).state + id(ct11Watts).state + id(ct12Watts).state ;
|
||||
accuracy_decimals: 1
|
||||
unit_of_measurement: W
|
||||
device_class: power
|
||||
update_interval: ${update_time}
|
||||
#Total Watts AddOn2
|
||||
- platform: template
|
||||
name: ${disp_name} Total Watts Add-on2
|
||||
id: totalWattsAddOn2
|
||||
lambda: return id(ct13Watts).state + id(ct14Watts).state + id(ct15Watts).state + id(ct16Watts).state + id(ct17Watts).state + id(ct18Watts).state ;
|
||||
accuracy_decimals: 1
|
||||
unit_of_measurement: W
|
||||
device_class: power
|
||||
update_interval: ${update_time}
|
||||
#Total Watts AddOn3
|
||||
- platform: template
|
||||
name: ${disp_name} Total Watts Add-on3
|
||||
id: totalWattsAddOn3
|
||||
lambda: return id(ct19Watts).state + id(ct20Watts).state + id(ct21Watts).state + id(ct22Watts).state + id(ct23Watts).state + id(ct24Watts).state ;
|
||||
accuracy_decimals: 1
|
||||
unit_of_measurement: W
|
||||
device_class: power
|
||||
update_interval: ${update_time}
|
||||
#Total Watts AddOn4
|
||||
- platform: template
|
||||
name: ${disp_name} Total Watts Add-on4
|
||||
id: totalWattsAddOn4
|
||||
lambda: return id(ct25Watts).state + id(ct26Watts).state + id(ct27Watts).state + id(ct28Watts).state + id(ct29Watts).state + id(ct30Watts).state ;
|
||||
accuracy_decimals: 1
|
||||
unit_of_measurement: W
|
||||
device_class: power
|
||||
update_interval: ${update_time}
|
||||
#Total Watts AddOn5
|
||||
- platform: template
|
||||
name: ${disp_name} Total Watts Add-on5
|
||||
id: totalWattsAddOn5
|
||||
lambda: return id(ct31Watts).state + id(ct32Watts).state + id(ct33Watts).state + id(ct34Watts).state + id(ct35Watts).state + id(ct36Watts).state ;
|
||||
accuracy_decimals: 1
|
||||
unit_of_measurement: W
|
||||
device_class: power
|
||||
update_interval: ${update_time}
|
||||
#Total Watts AddOn6
|
||||
- platform: template
|
||||
name: ${disp_name} Total Watts Add-on6
|
||||
id: totalWattsAddOn6
|
||||
lambda: return id(ct37Watts).state + id(ct38Watts).state + id(ct39Watts).state + id(ct40Watts).state + id(ct41Watts).state + id(ct42Watts).state ;
|
||||
accuracy_decimals: 1
|
||||
unit_of_measurement: W
|
||||
device_class: power
|
||||
update_interval: ${update_time}
|
||||
#Total Watts
|
||||
- platform: template
|
||||
name: ${disp_name} Total Watts
|
||||
id: totalWatts
|
||||
lambda: return id(totalWattsMain).state + id(totalWattsAddOn1).state + id(totalWattsAddOn2).state + id(totalWattsAddOn3).state + id(totalWattsAddOn4).state + id(totalWattsAddOn5).state + id(totalWattsAddOn6).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
|
||||
@@ -0,0 +1,481 @@
|
||||
# CircuitSetup 6 Channel Energy Meter Main Board with 6 add-on boards over ethernet - 42 current channels
|
||||
#
|
||||
# To reduce the number of sensors, only the power sensor for each current channel is output.
|
||||
#
|
||||
# Uses the Lilygo T-ETH-Lite ESP32S3 and the CircuitSetup 6 Channel Energy Meter Ethernet Adapter
|
||||
# See all options at https://esphome.io/components/sensor/atm90e32.html
|
||||
#
|
||||
# CS pins for the ESP32-S3 are different, and must be changed if previously using a WiFi ESP32:
|
||||
#Main board:
|
||||
# 5 -> 8
|
||||
# 4 -> 4 (stays the same)
|
||||
#Add-on boards:
|
||||
#CS (CT1-3):
|
||||
# 0 -> 0
|
||||
# 27 -> 18
|
||||
# 2 -> 2
|
||||
# 13 -> 3
|
||||
# 14 -> 41
|
||||
# 15 -> 15
|
||||
#CS2 (CT3-6):
|
||||
# 16 -> 16
|
||||
# 17 -> 17
|
||||
# 21 -> 21
|
||||
# 22 -> 20
|
||||
# 25 -> 39
|
||||
# 26 -> 38
|
||||
|
||||
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: '11143' # 20A/25mA
|
||||
|
||||
# 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_ethernet.yaml
|
||||
|
||||
sensor:
|
||||
#IC1 Main
|
||||
- platform: atm90e32
|
||||
cs_pin: 8
|
||||
phase_a:
|
||||
voltage:
|
||||
name: ${disp_name} Volts A Main
|
||||
id: ic1Volts
|
||||
accuracy_decimals: 1
|
||||
power:
|
||||
name: ${disp_name} CT1 Watts
|
||||
id: ct1Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
phase_b:
|
||||
power:
|
||||
name: ${disp_name} CT2 Watts
|
||||
id: ct2Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
phase_c:
|
||||
power:
|
||||
name: ${disp_name} CT3 Watts
|
||||
id: ct3Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
frequency:
|
||||
name: ${disp_name} Freq A Main
|
||||
line_frequency: 60Hz
|
||||
gain_pga: 1X
|
||||
update_interval: ${update_time}
|
||||
#IC2 Main
|
||||
- platform: atm90e32
|
||||
cs_pin: 4
|
||||
phase_a:
|
||||
power:
|
||||
name: ${disp_name} CT4 Watts
|
||||
id: ct4Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
phase_b:
|
||||
power:
|
||||
name: ${disp_name} CT5 Watts
|
||||
id: ct5Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
phase_c:
|
||||
power:
|
||||
name: ${disp_name} CT6 Watts
|
||||
id: ct6Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
line_frequency: 60Hz
|
||||
gain_pga: 1X
|
||||
update_interval: ${update_time}
|
||||
#IC1 AddOn 1
|
||||
- platform: atm90e32
|
||||
cs_pin: 0
|
||||
phase_a:
|
||||
power:
|
||||
name: ${disp_name} CT7 Watts
|
||||
id: ct7Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
phase_b:
|
||||
power:
|
||||
name: ${disp_name} CT8 Watts
|
||||
id: ct8Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
phase_c:
|
||||
power:
|
||||
name: ${disp_name} CT9 Watts
|
||||
id: ct9Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
line_frequency: 60Hz
|
||||
gain_pga: 1X
|
||||
update_interval: ${update_time}
|
||||
#IC2 AddOn 1
|
||||
- platform: atm90e32
|
||||
cs_pin: 16
|
||||
phase_a:
|
||||
power:
|
||||
name: ${disp_name} CT10 Watts
|
||||
id: ct10Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
phase_b:
|
||||
power:
|
||||
name: ${disp_name} CT11 Watts
|
||||
id: ct11Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
phase_c:
|
||||
power:
|
||||
name: ${disp_name} CT12 Watts
|
||||
id: ct12Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
line_frequency: 60Hz
|
||||
gain_pga: 1X
|
||||
update_interval: ${update_time}
|
||||
#IC1 AddOn 2
|
||||
- platform: atm90e32
|
||||
cs_pin: 18
|
||||
phase_a:
|
||||
power:
|
||||
name: ${disp_name} CT13 Watts
|
||||
id: ct13Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
phase_b:
|
||||
power:
|
||||
name: ${disp_name} CT14 Watts
|
||||
id: ct14Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
phase_c:
|
||||
power:
|
||||
name: ${disp_name} CT15 Watts
|
||||
id: ct15Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
line_frequency: 60Hz
|
||||
gain_pga: 1X
|
||||
update_interval: ${update_time}
|
||||
#IC2 AddOn 2
|
||||
- platform: atm90e32
|
||||
cs_pin: 17
|
||||
phase_a:
|
||||
power:
|
||||
name: ${disp_name} CT16 Watts
|
||||
id: ct16Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
phase_b:
|
||||
power:
|
||||
name: ${disp_name} CT17 Watts
|
||||
id: ct17Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
phase_c:
|
||||
power:
|
||||
name: ${disp_name} CT18 Watts
|
||||
id: ct18Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
line_frequency: 60Hz
|
||||
gain_pga: 1X
|
||||
update_interval: ${update_time}
|
||||
#IC1 AddOn 3
|
||||
- platform: atm90e32
|
||||
cs_pin: 2
|
||||
phase_a:
|
||||
power:
|
||||
name: ${disp_name} CT19 Watts
|
||||
id: ct19Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
phase_b:
|
||||
power:
|
||||
name: ${disp_name} CT20 Watts
|
||||
id: ct20Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
phase_c:
|
||||
power:
|
||||
name: ${disp_name} CT21 Watts
|
||||
id: ct21Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
line_frequency: 60Hz
|
||||
gain_pga: 1X
|
||||
update_interval: ${update_time}
|
||||
#IC2 AddOn 3
|
||||
- platform: atm90e32
|
||||
cs_pin: 21
|
||||
phase_a:
|
||||
power:
|
||||
name: ${disp_name} CT22 Watts
|
||||
id: ct22Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
phase_b:
|
||||
power:
|
||||
name: ${disp_name} CT23 Watts
|
||||
id: ct23Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
phase_c:
|
||||
power:
|
||||
name: ${disp_name} CT24 Watts
|
||||
id: ct24Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
line_frequency: 60Hz
|
||||
gain_pga: 1X
|
||||
update_interval: ${update_time}
|
||||
#IC1 AddOn 4
|
||||
- platform: atm90e32
|
||||
cs_pin: 3
|
||||
phase_a:
|
||||
power:
|
||||
name: ${disp_name} CT25 Watts
|
||||
id: ct25Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
phase_b:
|
||||
power:
|
||||
name: ${disp_name} CT26 Watts
|
||||
id: ct26Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
phase_c:
|
||||
power:
|
||||
name: ${disp_name} CT27 Watts
|
||||
id: ct27Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
line_frequency: 60Hz
|
||||
gain_pga: 1X
|
||||
update_interval: ${update_time}
|
||||
#IC2 AddOn 4
|
||||
- platform: atm90e32
|
||||
cs_pin: 20
|
||||
phase_a:
|
||||
power:
|
||||
name: ${disp_name} CT28 Watts
|
||||
id: ct28Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
phase_b:
|
||||
power:
|
||||
name: ${disp_name} CT29 Watts
|
||||
id: ct29Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
phase_c:
|
||||
power:
|
||||
name: ${disp_name} CT30 Watts
|
||||
id: ct30Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
line_frequency: 60Hz
|
||||
gain_pga: 1X
|
||||
update_interval: ${update_time}
|
||||
#IC1 AddOn 5
|
||||
- platform: atm90e32
|
||||
cs_pin: 41
|
||||
phase_a:
|
||||
power:
|
||||
name: ${disp_name} CT31 Watts
|
||||
id: ct31Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
phase_b:
|
||||
power:
|
||||
name: ${disp_name} CT32 Watts
|
||||
id: ct32Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
phase_c:
|
||||
power:
|
||||
name: ${disp_name} CT33 Watts
|
||||
id: ct33Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
line_frequency: 60Hz
|
||||
gain_pga: 1X
|
||||
update_interval: ${update_time}
|
||||
#IC2 AddOn 5
|
||||
- platform: atm90e32
|
||||
cs_pin: 39
|
||||
phase_a:
|
||||
power:
|
||||
name: ${disp_name} CT34 Watts
|
||||
id: ct34Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
phase_b:
|
||||
power:
|
||||
name: ${disp_name} CT35 Watts
|
||||
id: ct35Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
phase_c:
|
||||
power:
|
||||
name: ${disp_name} CT36 Watts
|
||||
id: ct36Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
line_frequency: 60Hz
|
||||
gain_pga: 1X
|
||||
update_interval: ${update_time}
|
||||
#IC1 AddOn 6
|
||||
- platform: atm90e32
|
||||
cs_pin: 15
|
||||
phase_a:
|
||||
power:
|
||||
name: ${disp_name} CT37 Watts
|
||||
id: ct37Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
phase_b:
|
||||
power:
|
||||
name: ${disp_name} CT38 Watts
|
||||
id: ct38Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
phase_c:
|
||||
power:
|
||||
name: ${disp_name} CT39 Watts
|
||||
id: ct39Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
line_frequency: 60Hz
|
||||
gain_pga: 1X
|
||||
update_interval: ${update_time}
|
||||
#IC2 AddOn 6
|
||||
- platform: atm90e32
|
||||
cs_pin: 38
|
||||
phase_a:
|
||||
power:
|
||||
name: ${disp_name} CT40 Watts
|
||||
id: ct40Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
phase_b:
|
||||
power:
|
||||
name: ${disp_name} CT41 Watts
|
||||
id: ct41Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
phase_c:
|
||||
power:
|
||||
name: ${disp_name} CT42 Watts
|
||||
id: ct42Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
line_frequency: 60Hz
|
||||
gain_pga: 1X
|
||||
update_interval: ${update_time}
|
||||
|
||||
#Total Watts Main
|
||||
- platform: template
|
||||
name: ${disp_name} Total Watts Main
|
||||
id: totalWattsMain
|
||||
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}
|
||||
#Total Watts AddOn1
|
||||
- platform: template
|
||||
name: ${disp_name} Total Watts Add-on1
|
||||
id: totalWattsAddOn1
|
||||
lambda: return id(ct7Watts).state + id(ct8Watts).state + id(ct9Watts).state + id(ct10Watts).state + id(ct11Watts).state + id(ct12Watts).state ;
|
||||
accuracy_decimals: 1
|
||||
unit_of_measurement: W
|
||||
device_class: power
|
||||
update_interval: ${update_time}
|
||||
#Total Watts AddOn2
|
||||
- platform: template
|
||||
name: ${disp_name} Total Watts Add-on2
|
||||
id: totalWattsAddOn2
|
||||
lambda: return id(ct13Watts).state + id(ct14Watts).state + id(ct15Watts).state + id(ct16Watts).state + id(ct17Watts).state + id(ct18Watts).state ;
|
||||
accuracy_decimals: 1
|
||||
unit_of_measurement: W
|
||||
device_class: power
|
||||
update_interval: ${update_time}
|
||||
#Total Watts AddOn3
|
||||
- platform: template
|
||||
name: ${disp_name} Total Watts Add-on3
|
||||
id: totalWattsAddOn3
|
||||
lambda: return id(ct19Watts).state + id(ct20Watts).state + id(ct21Watts).state + id(ct22Watts).state + id(ct23Watts).state + id(ct24Watts).state ;
|
||||
accuracy_decimals: 1
|
||||
unit_of_measurement: W
|
||||
device_class: power
|
||||
update_interval: ${update_time}
|
||||
#Total Watts AddOn4
|
||||
- platform: template
|
||||
name: ${disp_name} Total Watts Add-on4
|
||||
id: totalWattsAddOn4
|
||||
lambda: return id(ct25Watts).state + id(ct26Watts).state + id(ct27Watts).state + id(ct28Watts).state + id(ct29Watts).state + id(ct30Watts).state ;
|
||||
accuracy_decimals: 1
|
||||
unit_of_measurement: W
|
||||
device_class: power
|
||||
update_interval: ${update_time}
|
||||
#Total Watts AddOn5
|
||||
- platform: template
|
||||
name: ${disp_name} Total Watts Add-on5
|
||||
id: totalWattsAddOn5
|
||||
lambda: return id(ct31Watts).state + id(ct32Watts).state + id(ct33Watts).state + id(ct34Watts).state + id(ct35Watts).state + id(ct36Watts).state ;
|
||||
accuracy_decimals: 1
|
||||
unit_of_measurement: W
|
||||
device_class: power
|
||||
update_interval: ${update_time}
|
||||
#Total Watts AddOn6
|
||||
- platform: template
|
||||
name: ${disp_name} Total Watts Add-on6
|
||||
id: totalWattsAddOn6
|
||||
lambda: return id(ct37Watts).state + id(ct38Watts).state + id(ct39Watts).state + id(ct40Watts).state + id(ct41Watts).state + id(ct42Watts).state ;
|
||||
accuracy_decimals: 1
|
||||
unit_of_measurement: W
|
||||
device_class: power
|
||||
update_interval: ${update_time}
|
||||
#Total Watts
|
||||
- platform: template
|
||||
name: ${disp_name} Total Watts
|
||||
id: totalWatts
|
||||
lambda: return id(totalWattsMain).state + id(totalWattsAddOn1).state + id(totalWattsAddOn2).state + id(totalWattsAddOn3).state + id(totalWattsAddOn4).state + id(totalWattsAddOn5).state + id(totalWattsAddOn6).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
|
||||
@@ -0,0 +1,272 @@
|
||||
# 6 Channel Example Config for Split Single Phase whole house, solar, and 2 other circuits
|
||||
# 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
|
||||
house_current_cal: '27518'
|
||||
solar_current_cal: '27518'
|
||||
current_cal: '27518'
|
||||
|
||||
# This only needs to be changed if you're using something other than the
|
||||
# Jameco 9VAC Transformer:
|
||||
voltage_cal: '7305'
|
||||
|
||||
esphome:
|
||||
name: ${disp_name}
|
||||
friendly_name: "${friendly_name}"
|
||||
name_add_mac_suffix: true
|
||||
min_version: '2025.5.0'
|
||||
project:
|
||||
name: circuitsetup.6c-energy-meter
|
||||
version: "1.6"
|
||||
|
||||
packages:
|
||||
common: github://CircuitSetup/Expandable-6-Channel-ESP32-Energy-Meter/Software/ESPHome/6chan_common.yaml
|
||||
|
||||
# Enable Home Assistant API
|
||||
# An encryption key is recommended and can be generated here:
|
||||
# https://esphome.io/components/api.html#configuration-variables
|
||||
api:
|
||||
# encryption:
|
||||
# key: "YOUR_ENCRYPTION_KEY_HERE"
|
||||
|
||||
# Enable OTA updating
|
||||
ota:
|
||||
- platform: esphome
|
||||
|
||||
# Set up a wifi access point
|
||||
wifi:
|
||||
ap:
|
||||
|
||||
# In combination with the `ap` this allows
|
||||
# provisioning wifi credentials to the device.
|
||||
captive_portal:
|
||||
|
||||
# Sets up Bluetooth LE to provision wifi credentials
|
||||
# to the device.
|
||||
esp32_improv:
|
||||
authorizer: none
|
||||
|
||||
# Sets up the improv via serial client for wifi provisioning
|
||||
improv_serial:
|
||||
|
||||
web_server:
|
||||
port: 80
|
||||
|
||||
sensor:
|
||||
#IC1
|
||||
- platform: atm90e32
|
||||
cs_pin: 5
|
||||
#CT1
|
||||
phase_a:
|
||||
voltage:
|
||||
name: ${disp_name} Volts
|
||||
id: HouseL1Volts
|
||||
accuracy_decimals: 1
|
||||
current:
|
||||
name: ${disp_name} House L1 Amps
|
||||
id: HouseL1Amps
|
||||
power:
|
||||
name: ${disp_name} House L1 Watts
|
||||
id: HouseL1Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${house_current_cal}
|
||||
#CT2
|
||||
phase_b:
|
||||
current:
|
||||
name: ${disp_name} Solar L1 Amps
|
||||
id: SolarL1Amps
|
||||
power:
|
||||
name: ${disp_name} Solar L1 Watts
|
||||
id: SolarL1Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${solar_current_cal}
|
||||
#CT3
|
||||
phase_c:
|
||||
current:
|
||||
name: ${disp_name} Hot Water Amps
|
||||
id: HotWaterAmps
|
||||
power:
|
||||
name: ${disp_name} Hot Water Watts
|
||||
id: HotWaterWatts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
frequency:
|
||||
name: ${disp_name} Freq
|
||||
line_frequency: 60Hz
|
||||
gain_pga: 1X
|
||||
update_interval: ${update_time}
|
||||
#IC2
|
||||
- platform: atm90e32
|
||||
cs_pin: 4
|
||||
#CT4
|
||||
phase_a:
|
||||
current:
|
||||
name: ${disp_name} Dryer Amps
|
||||
id: DryerAmps
|
||||
power:
|
||||
name: ${disp_name} Dryer Watts
|
||||
id: DryerWatts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
#CT5
|
||||
phase_b:
|
||||
current:
|
||||
name: ${disp_name} Solar L2 Amps
|
||||
id: SolarL2Amps
|
||||
power:
|
||||
name: ${disp_name} CT5 Watts
|
||||
id: SolarL2Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${solar_current_cal}
|
||||
#CT6
|
||||
phase_c:
|
||||
current:
|
||||
name: ${disp_name} House L2 Amps
|
||||
id: HouseL2Amps
|
||||
power:
|
||||
name: ${disp_name} House L2 Watts
|
||||
id: HouseL2Watts
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${house_current_cal}
|
||||
line_frequency: 60Hz
|
||||
gain_pga: 1X
|
||||
update_interval: ${update_time}
|
||||
|
||||
#Total House Amps
|
||||
- platform: template
|
||||
name: ${disp_name} Total House Amps
|
||||
id: totalHouseAmps
|
||||
lambda: return id(HouseL1Amps).state + id(HouseL2Amps).state ;
|
||||
accuracy_decimals: 2
|
||||
unit_of_measurement: A
|
||||
device_class: current
|
||||
update_interval: ${update_time}
|
||||
|
||||
#Total House Watts
|
||||
- platform: template
|
||||
name: ${disp_name} Total House Watts
|
||||
id: totalHouseWatts
|
||||
lambda: return id(HouseL1Watts).state + id(HouseL2Watts).state ;
|
||||
accuracy_decimals: 1
|
||||
unit_of_measurement: W
|
||||
device_class: power
|
||||
update_interval: ${update_time}
|
||||
|
||||
#Total House Watts Negative
|
||||
- platform: template
|
||||
name: ${disp_name} Total House Return To Grid Watts
|
||||
id: returnToGridWatts
|
||||
lambda: |-
|
||||
if (id(totalHouseWatts).state > 0) {
|
||||
return 0;
|
||||
} else {
|
||||
return abs(id(totalHouseWatts).state) ;
|
||||
}
|
||||
accuracy_decimals: 1
|
||||
unit_of_measurement: W
|
||||
device_class: power
|
||||
update_interval: ${update_time}
|
||||
|
||||
#House Negative kWh (HA Return to Grid)
|
||||
- platform: total_daily_energy
|
||||
name: ${disp_name} House Return To Grid kWh
|
||||
power_id: returnToGridWatts
|
||||
filters:
|
||||
- multiply: 0.001
|
||||
unit_of_measurement: kWh
|
||||
device_class: energy
|
||||
state_class: total_increasing
|
||||
|
||||
#Total House Watts Positive
|
||||
- platform: template
|
||||
name: ${disp_name} Total House Positive Watts
|
||||
id: totalHousePositiveWatts
|
||||
lambda: |-
|
||||
if (id(totalHouseWatts).state < 0) {
|
||||
return 0;
|
||||
} else {
|
||||
return id(totalHouseWatts).state ;
|
||||
}
|
||||
accuracy_decimals: 1
|
||||
unit_of_measurement: W
|
||||
device_class: power
|
||||
update_interval: ${update_time}
|
||||
|
||||
#House positive kWh
|
||||
- platform: total_daily_energy
|
||||
name: ${disp_name} House kWh
|
||||
power_id: totalHousePositiveWatts
|
||||
filters:
|
||||
- multiply: 0.001
|
||||
unit_of_measurement: kWh
|
||||
device_class: energy
|
||||
state_class: total_increasing
|
||||
|
||||
#Total Solar Amps
|
||||
- platform: template
|
||||
name: ${disp_name} Total Solar Amps
|
||||
id: totalSolarAmps
|
||||
lambda: return id(SolarL1Amps).state + id(SolarL2Amps).state ;
|
||||
accuracy_decimals: 2
|
||||
unit_of_measurement: A
|
||||
device_class: current
|
||||
update_interval: ${update_time}
|
||||
|
||||
#Total Solar Watts
|
||||
- platform: template
|
||||
name: ${disp_name} Total Solar Watts
|
||||
id: totalSolarWatts
|
||||
lambda: return id(SolarL1Watts).state + id(SolarL2Watts).state ;
|
||||
accuracy_decimals: 1
|
||||
unit_of_measurement: W
|
||||
device_class: power
|
||||
update_interval: ${update_time}
|
||||
|
||||
#Solar kWh
|
||||
- platform: total_daily_energy
|
||||
name: ${disp_name} Solar kWh
|
||||
power_id: totalSolarWatts
|
||||
filters:
|
||||
- multiply: 0.001
|
||||
unit_of_measurement: kWh
|
||||
device_class: energy
|
||||
state_class: total_increasing
|
||||
|
||||
#Individual Hot Water kWh
|
||||
- platform: total_daily_energy
|
||||
name: ${disp_name} Hot Water kWh
|
||||
power_id: HotWaterWatts
|
||||
filters:
|
||||
- multiply: 0.001
|
||||
unit_of_measurement: kWh
|
||||
device_class: energy
|
||||
state_class: total_increasing
|
||||
|
||||
#Individual Dryer kWh
|
||||
- platform: total_daily_energy
|
||||
name: ${disp_name} Dryer kWh
|
||||
power_id: DryerWatts
|
||||
filters:
|
||||
- multiply: 0.001
|
||||
unit_of_measurement: kWh
|
||||
device_class: energy
|
||||
state_class: total_increasing
|
||||
@@ -0,0 +1,205 @@
|
||||
substitutions:
|
||||
# Change the disp_name to something you want
|
||||
disp_name: 6C
|
||||
# Interval of how often the power is updated
|
||||
update_time: 10s
|
||||
# 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'
|
||||
# Jameco 9VAC Transformer: 42620
|
||||
voltage_cal: '42620'
|
||||
|
||||
esphome:
|
||||
name: 6chan_energy_meter
|
||||
platform: ESP32
|
||||
board: nodemcu-32s
|
||||
|
||||
wifi:
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_pass
|
||||
manual_ip:
|
||||
static_ip: !secret ip_eh_nrgnode
|
||||
gateway: !secret ip_gateway
|
||||
subnet: !secret ip_subnet
|
||||
dns1: !secret ip_dns1
|
||||
|
||||
# mqtt:
|
||||
# broker: !secret mqtt_broker
|
||||
# username: !secret mqtt_user
|
||||
# password: !secret mqtt_pass
|
||||
|
||||
# Enable logging
|
||||
logger:
|
||||
|
||||
# Enable Home Assistant API
|
||||
api:
|
||||
|
||||
ota:
|
||||
|
||||
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
|
||||
#IC1
|
||||
- platform: atm90e32
|
||||
cs_pin: 5
|
||||
phase_a:
|
||||
voltage:
|
||||
name: ${disp_name} Volts A
|
||||
id: ic1Volts
|
||||
accuracy_decimals: 1
|
||||
# filters:
|
||||
# - multiply: 2.0
|
||||
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 value by 2 or 4 by uncommenting the filter below
|
||||
# filters:
|
||||
# - multiply: 2.0
|
||||
gain_voltage: ${voltage_cal}
|
||||
# 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: ${current_cal}
|
||||
phase_b:
|
||||
current:
|
||||
name: ${disp_name} CT2 Amps
|
||||
id: ct2Amps
|
||||
gain_ct: ${current_cal}
|
||||
phase_c:
|
||||
current:
|
||||
name: ${disp_name} CT3 Amps
|
||||
id: ct3Amps
|
||||
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:
|
||||
voltage:
|
||||
name: ${disp_name} Volts B
|
||||
id: ic2Volts
|
||||
accuracy_decimals: 1
|
||||
current:
|
||||
name: ${disp_name} CT4 Amps
|
||||
id: ct4Amps
|
||||
gain_voltage: ${voltage_cal}
|
||||
gain_ct: ${current_cal}
|
||||
phase_b:
|
||||
current:
|
||||
name: ${disp_name} CT5 Amps
|
||||
id: ct5Amps
|
||||
gain_ct: ${current_cal}
|
||||
phase_c:
|
||||
current:
|
||||
name: ${disp_name} CT6 Amps
|
||||
id: ct6Amps
|
||||
gain_ct: ${current_cal}
|
||||
frequency:
|
||||
name: ${disp_name} Freq B
|
||||
line_frequency: 60Hz
|
||||
gain_pga: 1X
|
||||
update_interval: ${update_time}
|
||||
|
||||
#Watts per channel
|
||||
- platform: template
|
||||
name: ${disp_name} CT1 Watts
|
||||
id: ct1Watts
|
||||
lambda: return id(ct1Amps).state * id(ic1Volts).state;
|
||||
accuracy_decimals: 0
|
||||
unit_of_measurement: W
|
||||
device_class: power
|
||||
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: W
|
||||
device_class: power
|
||||
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: W
|
||||
device_class: power
|
||||
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: W
|
||||
device_class: power
|
||||
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: W
|
||||
device_class: power
|
||||
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: W
|
||||
device_class: power
|
||||
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(totalAmps).state * id(ic1Volts).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
|
||||
switch:
|
||||
- platform: restart
|
||||
name: ${disp_name} Restart
|
||||
time:
|
||||
- platform: sntp
|
||||
id: sntp_time
|
||||
@@ -0,0 +1,420 @@
|
||||
# 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 Wifi
|
||||
# Interval of how often the power data is updated
|
||||
update_time: 60s
|
||||
|
||||
# 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_ct1: '27518'
|
||||
current_cal_ct2: '27518'
|
||||
current_cal_ct3: '27518'
|
||||
current_cal_ct4: '27518'
|
||||
current_cal_ct5: '27518'
|
||||
current_cal_ct6: '27518'
|
||||
# This only needs to be changed if you're using something other than the
|
||||
# Jameco 9VAC Transformer:
|
||||
voltage_cal1: '7305'
|
||||
voltage_cal2: '7305'
|
||||
|
||||
main_meter_name1: Meter 1-3
|
||||
main_meter_name2: Meter 4-6
|
||||
main_meter_id1: meter_main1
|
||||
main_meter_id2: meter_main2
|
||||
ct1_name: CT1
|
||||
ct2_name: CT2
|
||||
ct3_name: CT3
|
||||
ct4_name: CT4
|
||||
ct5_name: CT5
|
||||
ct6_name: CT6
|
||||
|
||||
#packages:
|
||||
# common: github://CircuitSetup/Expandable-6-Channel-ESP32-Energy-Meter/Software/ESPHome/6chan_common.yaml
|
||||
esphome:
|
||||
name: energy-meter
|
||||
friendly_name: "${friendly_name}"
|
||||
name_add_mac_suffix: true
|
||||
min_version: '2025.5.0'
|
||||
project:
|
||||
name: circuitsetup.6c-energy-meter
|
||||
version: "1.5"
|
||||
|
||||
esp32:
|
||||
board: nodemcu-32s
|
||||
|
||||
captive_portal:
|
||||
|
||||
improv_serial:
|
||||
|
||||
logger:
|
||||
level: DEBUG
|
||||
|
||||
# Enable OTA updating
|
||||
ota:
|
||||
- platform: esphome
|
||||
|
||||
web_server:
|
||||
port: 80
|
||||
|
||||
spi:
|
||||
interface: software
|
||||
clk_pin: 18
|
||||
miso_pin: 19
|
||||
mosi_pin: 23
|
||||
|
||||
time:
|
||||
- platform: homeassistant
|
||||
id: homeassistant_time
|
||||
|
||||
dashboard_import:
|
||||
package_import_url: github://CircuitSetup/Expandable-6-Channel-ESP32-Energy-Meter/Software/ESPHome/6chan_main_calibration_beta.yaml
|
||||
import_full_config: false
|
||||
|
||||
api:
|
||||
|
||||
wifi:
|
||||
# Set up a wifi access point
|
||||
ap:
|
||||
|
||||
sensor:
|
||||
#IC1
|
||||
- platform: atm90e32
|
||||
cs_pin: 5
|
||||
id: ${main_meter_id1}
|
||||
phase_a:
|
||||
voltage:
|
||||
name: Voltage 1
|
||||
id: ic1Volts
|
||||
accuracy_decimals: 1
|
||||
current:
|
||||
name: ${ct1_name} 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: ${ct1_name} Watts
|
||||
id: ct1Watts
|
||||
# filters:
|
||||
# - multiply: 2
|
||||
reactive_power:
|
||||
name: ${ct1_name} VAR
|
||||
apparent_power:
|
||||
name: ${ct1_name} VA
|
||||
harmonic_power:
|
||||
name: ${ct1_name} Harmonic Power
|
||||
power_factor:
|
||||
name: ${ct1_name} PF
|
||||
phase_angle:
|
||||
name: ${ct1_name} Phase Angle
|
||||
peak_current:
|
||||
name: ${ct1_name} Peak Current
|
||||
gain_voltage: ${voltage_cal1}
|
||||
gain_ct: ${current_cal_ct1}
|
||||
offset_voltage: 0
|
||||
offset_current: 0
|
||||
offset_active_power: 0
|
||||
offset_reactive_power: 0
|
||||
phase_b:
|
||||
current:
|
||||
name: ${ct2_name} Amps
|
||||
id: ct2Amps
|
||||
power:
|
||||
name: ${ct2_name} Watts
|
||||
id: ct2Watts
|
||||
reactive_power:
|
||||
name: ${ct2_name} VAR
|
||||
apparent_power:
|
||||
name: ${ct2_name} VA
|
||||
harmonic_power:
|
||||
name: ${ct2_name} Harmonic Power
|
||||
power_factor:
|
||||
name: ${ct2_name} PF
|
||||
phase_angle:
|
||||
name: ${ct2_name} Phase Angle
|
||||
peak_current:
|
||||
name: ${ct2_name} Peak Current
|
||||
gain_voltage: ${voltage_cal1}
|
||||
gain_ct: ${current_cal_ct2}
|
||||
offset_voltage: 0
|
||||
offset_current: 0
|
||||
offset_active_power: 0
|
||||
offset_reactive_power: 0
|
||||
phase_c:
|
||||
current:
|
||||
name: ${ct3_name} Amps
|
||||
id: ct3Amps
|
||||
power:
|
||||
name: ${ct3_name} Watts
|
||||
id: ct3Watts
|
||||
reactive_power:
|
||||
name: ${ct3_name} VAR
|
||||
apparent_power:
|
||||
name: ${ct3_name} VA
|
||||
harmonic_power:
|
||||
name: ${ct3_name} Harmonic Power
|
||||
power_factor:
|
||||
name: ${ct3_name} PF
|
||||
phase_angle:
|
||||
name: ${ct3_name} Phase Angle
|
||||
peak_current:
|
||||
name: ${ct3_name} Peak Current
|
||||
gain_voltage: ${voltage_cal1}
|
||||
gain_ct: ${current_cal_ct3}
|
||||
offset_voltage: 0
|
||||
offset_current: 0
|
||||
offset_active_power: 0
|
||||
offset_reactive_power: 0
|
||||
frequency:
|
||||
name: Frequency 1
|
||||
chip_temperature:
|
||||
name: ${main_meter_name1} Chip Temp
|
||||
line_frequency: 60Hz
|
||||
gain_pga: 1X
|
||||
update_interval: ${update_time}
|
||||
enable_offset_calibration: true
|
||||
enable_gain_calibration: true
|
||||
#IC2
|
||||
- platform: atm90e32
|
||||
cs_pin: 4
|
||||
id: ${main_meter_id2}
|
||||
phase_a:
|
||||
#this voltage is only needed if monitoring 2 voltages
|
||||
# voltage:
|
||||
# name: Voltage 2
|
||||
# id: ic2Volts
|
||||
# accuracy_decimals: 1
|
||||
current:
|
||||
name: ${ct4_name} Amps
|
||||
id: ct4Amps
|
||||
power:
|
||||
name: ${ct4_name} Watts
|
||||
id: ct4Watts
|
||||
reactive_power:
|
||||
name: ${ct4_name} VAR
|
||||
apparent_power:
|
||||
name: ${ct4_name} VA
|
||||
harmonic_power:
|
||||
name: ${ct4_name} Harmonic Power
|
||||
power_factor:
|
||||
name: ${ct4_name} PF
|
||||
phase_angle:
|
||||
name: ${ct4_name} Phase Angle
|
||||
peak_current:
|
||||
name: ${ct4_name} Peak Current
|
||||
gain_voltage: ${voltage_cal2}
|
||||
gain_ct: ${current_cal_ct4}
|
||||
offset_voltage: 0
|
||||
offset_current: 0
|
||||
offset_active_power: 0
|
||||
offset_reactive_power: 0
|
||||
phase_b:
|
||||
current:
|
||||
name: ${ct5_name} Amps
|
||||
id: ct5Amps
|
||||
power:
|
||||
name: ${ct5_name} Watts
|
||||
id: ct5Watts
|
||||
reactive_power:
|
||||
name: ${ct5_name} VAR
|
||||
apparent_power:
|
||||
name: ${ct5_name} VA
|
||||
harmonic_power:
|
||||
name: ${ct5_name} Harmonic Power
|
||||
power_factor:
|
||||
name: ${ct5_name} PF
|
||||
phase_angle:
|
||||
name: ${ct5_name} Phase Angle
|
||||
peak_current:
|
||||
name: ${ct5_name} Peak Current
|
||||
gain_voltage: ${voltage_cal2}
|
||||
gain_ct: ${current_cal_ct5}
|
||||
offset_voltage: 0
|
||||
offset_current: 0
|
||||
offset_active_power: 0
|
||||
offset_reactive_power: 0
|
||||
phase_c:
|
||||
current:
|
||||
name: ${ct6_name} Amps
|
||||
id: ct6Amps
|
||||
power:
|
||||
name: ${ct6_name} Watts
|
||||
id: ct6Watts
|
||||
reactive_power:
|
||||
name: ${ct6_name} VAR
|
||||
apparent_power:
|
||||
name: ${ct6_name} VA
|
||||
harmonic_power:
|
||||
name: ${ct6_name} Harmonic Power
|
||||
power_factor:
|
||||
name: ${ct6_name} PF
|
||||
phase_angle:
|
||||
name: ${ct6_name} Phase Angle
|
||||
peak_current:
|
||||
name: ${ct6_name} Peak Current
|
||||
gain_voltage: ${voltage_cal2}
|
||||
gain_ct: ${current_cal_ct6}
|
||||
offset_voltage: 0
|
||||
offset_current: 0
|
||||
offset_active_power: 0
|
||||
offset_reactive_power: 0
|
||||
#this is only needed if monitoring 2 voltages
|
||||
# frequency:
|
||||
# name: Frequency 2
|
||||
chip_temperature:
|
||||
name: ${main_meter_name2} Chip Temp
|
||||
line_frequency: 60Hz
|
||||
gain_pga: 1X
|
||||
update_interval: ${update_time}
|
||||
enable_offset_calibration: true
|
||||
enable_gain_calibration: true
|
||||
|
||||
#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
|
||||
|
||||
#wifi diagnostic
|
||||
- platform: wifi_signal
|
||||
name: ${disp_name} WiFi
|
||||
id: wifi_signal_db
|
||||
entity_category: diagnostic
|
||||
|
||||
- platform: copy
|
||||
source_id: wifi_signal_db
|
||||
id: wifi_signal_pct
|
||||
name: ${disp_name} WiFi %
|
||||
filters:
|
||||
- lambda: return min(max(2 * (x + 100.0), 0.0), 100.0);
|
||||
unit_of_measurement: "%"
|
||||
entity_category: diagnostic
|
||||
|
||||
switch:
|
||||
- platform: restart
|
||||
name: ${disp_name} Restart
|
||||
entity_category: diagnostic
|
||||
|
||||
text_sensor:
|
||||
- platform: atm90e32
|
||||
id: ${main_meter_id1}
|
||||
phase_status:
|
||||
phase_a:
|
||||
name: "${ct1_name} Status"
|
||||
phase_b:
|
||||
name: "${ct2_name} Status"
|
||||
phase_c:
|
||||
name: "${ct3_name} Status"
|
||||
frequency_status:
|
||||
name: "Frequency Status 1"
|
||||
|
||||
- platform: atm90e32
|
||||
id: ${main_meter_id2}
|
||||
phase_status:
|
||||
phase_a:
|
||||
name: "${ct4_name} Status"
|
||||
phase_b:
|
||||
name: "${ct5_name} Status"
|
||||
phase_c:
|
||||
name: "${ct6_name} Status"
|
||||
#this is only needed if monitoring 2 voltages
|
||||
# freq_status:
|
||||
# name: "Frequency Status 2"
|
||||
|
||||
button:
|
||||
- platform: atm90e32
|
||||
id: ${main_meter_id1}
|
||||
run_gain_calibration:
|
||||
name: "Run ${main_meter_name1} Gain Calibration"
|
||||
clear_gain_calibration:
|
||||
name: "Clear ${main_meter_name1} Gain Calibration"
|
||||
run_offset_calibration:
|
||||
name: "Run ${main_meter_name1} Offset Calibration"
|
||||
clear_offset_calibration:
|
||||
name: "Clear ${main_meter_name1} Offset Calibration"
|
||||
run_power_offset_calibration:
|
||||
name: "Run ${main_meter_name1} Power Offset Calibration"
|
||||
clear_power_offset_calibration:
|
||||
name: "Clear ${main_meter_name1} Power Offset Calibration"
|
||||
|
||||
- platform: atm90e32
|
||||
id: ${main_meter_id2}
|
||||
run_gain_calibration:
|
||||
name: "Run ${main_meter_name2} Gain Calibration"
|
||||
clear_gain_calibration:
|
||||
name: "Clear ${main_meter_name2} Gain Calibration"
|
||||
run_offset_calibration:
|
||||
name: "Run ${main_meter_name2} Offset Calibration"
|
||||
clear_offset_calibration:
|
||||
name: "Clear ${main_meter_name2} Offset Calibration"
|
||||
run_power_offset_calibration:
|
||||
name: "Run ${main_meter_name2} Power Offset Calibration"
|
||||
clear_power_offset_calibration:
|
||||
name: "Clear ${main_meter_name2} Power Offset Calibration"
|
||||
|
||||
number:
|
||||
- platform: atm90e32
|
||||
id: ${main_meter_id1}
|
||||
reference_voltage:
|
||||
# will copy to phase_b/c for calibration reference
|
||||
phase_a:
|
||||
name: "Ref Voltage 1"
|
||||
reference_current:
|
||||
phase_a:
|
||||
name: "${ct1_name} Ref Current"
|
||||
phase_b:
|
||||
name: "${ct2_name} Ref Current"
|
||||
phase_c:
|
||||
name: "${ct3_name} Ref Current"
|
||||
|
||||
- platform: atm90e32
|
||||
id: ${main_meter_id2}
|
||||
reference_voltage:
|
||||
# needed to calibrate voltage registers even if not output
|
||||
phase_a:
|
||||
name: "Ref Voltage 2"
|
||||
reference_current:
|
||||
phase_a:
|
||||
name: "${ct4_name} Ref Current"
|
||||
phase_b:
|
||||
name: "${ct5_name} Ref Current"
|
||||
phase_c:
|
||||
name: "${ct6_name} Ref Current"
|
||||
Reference in New Issue
Block a user