mirror of
https://github.com/CeeWeasel/fresh-home.git
synced 2026-08-10 11:00:14 -04:00
224 lines
6.2 KiB
YAML
224 lines
6.2 KiB
YAML
# 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
|