Last active
February 3, 2025 18:00
-
-
Save pashdown/4941d0f1761426f6c199b8faa7dc83aa to your computer and use it in GitHub Desktop.
circuitsetup energy monitor esphome yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
substitutions: | |
device_name: "laundry_panel" | |
friendly_name: "Laundry Panel" | |
disp_name: "$device_name" | |
# Interval of how often the power is updated | |
update_time: 10s | |
# Current Transformers: | |
# 20A/25mA SCT-006: 11143 | |
current_cal_20: '11143' | |
current_cal: '11143' | |
# 30A/1V SCT-013-030: 8650 | |
current_cal_30: '8650' | |
# 50A/1V SCT-013-050: 15420 | |
current_cal_50: '15420' | |
# 50A/16.6mA SCT-010: 41334 | |
# 80A/26.6mA SCT-010: 41660 | |
current_cal_80: '41660' | |
# 100A/50ma SCT-013-000: 27518 | |
# 120A/40mA: SCT-016: 41787 | |
current_cal_120: '41787' | |
# 200A/100mA SCT-024: 27518 | |
# 200A/50mA SCT-024: 55036 | |
# Jameco 9VAC Transformer: | |
# For meter versions: | |
# >= v1.3: 7305 | |
# <= v1.2: 42620 | |
voltage_cal: '7305' | |
esphome: | |
name: $device_name | |
platformio_options: | |
build_flags: | |
- -DCONFIG_ARDUINO_LOOP_STACK_SIZE=32768 | |
esp32: | |
board: esp32dev | |
framework: | |
version: 2.0.2 | |
source: https://github.com/espressif/arduino-esp32.git#2.0.2 | |
platform_version: https://github.com/platformio/platform-espressif32.git#feature/arduino-upstream | |
wifi: | |
ssid: !secret wifi_ssid | |
password: !secret wifi_password | |
# Optional manual IP | |
manual_ip: | |
static_ip: 10.0.0.42 | |
gateway: 10.0.0.1 | |
subnet: 255.255.255.0 | |
dns1: 10.0.0.1 | |
dns2: 10.0.0.10 | |
# Enable fallback hotspot (captive portal) in case wifi connection fails | |
ap: {} | |
captive_portal: | |
# Enable logging | |
logger: | |
# Enable Home Assistant API | |
api: | |
encryption: | |
key: "sekretkey=" | |
ota: | |
platform: esphome | |
password: !secret ota_password | |
time: | |
- platform: sntp | |
id: sntp_time | |
timezone: Denver/US | |
servers: | |
- local.ntp.server | |
- 1.pool.ntp.org | |
- 2.pool.ntp.org | |
# starting at the back | |
# 4 3 | |
# 5 2 | |
# 6 1 | |
#ct1 main right SCT016-A16 120A | |
#ct2 Panel 2 - AC Basement SCT013 50A | |
#ct3 Panel 4 - AC Basement SCT013 50A | |
#ct4 Panel 1 - AC Basement SCT006 20A | |
#ct5 Panel 3 - AC Basement SCT006 20A | |
#ct6 main left SCT016-A16 120A | |
#ct7 Panel 6 - Laundry/Office SCT006 20A | |
#ct8 Panel 8 - Master Closet/Master AV SCT006 20A | |
#ct9 Panel 25b - Microwave SCT006 20A | |
#ct10 Panel 9 - TV Room/Mechanical SCT006 20A | |
#ct11 Panel 5 - Dryer SCT013 30A | |
#ct12 Panel 7 - Dryer SCT013 30A | |
#ct13 Panel 16 - Boiler & Heat Pumps SCT006 20A | |
#ct14 Panel 22b - AC Attic SCT006 20A | |
#ct15 Panel 24a - AC Attic SCT006 20A | |
#ct16 Panel 21b - Oven SCT013 30A | |
#ct17 Panel 23a - Oven SCT013 30A | |
#ct18 Panel 23b - Refrigerator SCT006 20A | |
# 7-9 CT1-CT3 0 | |
# 10-12 CT4-CT6 16 | |
# 13-15 CT1-CT3 27 | |
# 16-18 CT4-CT6 17 | |
# Example CircuitSetup 6-channel without jumpers jp9-jp11 joined or < meter v1.4 | |
# power is calculated in a template | |
spi: | |
clk_pin: 18 | |
miso_pin: 19 | |
mosi_pin: 23 | |
sensor: | |
- 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 | |
gain_voltage: ${voltage_cal} | |
gain_ct: ${current_cal_120} | |
phase_b: | |
current: | |
name: ${disp_name} CT2 Amps | |
id: ct2Amps | |
internal: true | |
gain_voltage: ${voltage_cal} | |
gain_ct: ${current_cal_50} | |
phase_c: | |
current: | |
name: ${disp_name} CT3 Amps | |
id: ct3Amps | |
internal: true | |
gain_voltage: ${voltage_cal} | |
gain_ct: ${current_cal_50} | |
frequency: | |
name: ${disp_name} Freq A | |
line_frequency: 60Hz | |
current_phases: 3 | |
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 | |
current: | |
name: ${disp_name} CT4 Amps | |
id: ct4Amps | |
internal: true | |
gain_voltage: ${voltage_cal} | |
gain_ct: ${current_cal_20} | |
phase_b: | |
current: | |
name: ${disp_name} CT5 Amps | |
id: ct5Amps | |
internal: true | |
gain_voltage: ${voltage_cal} | |
gain_ct: ${current_cal_20} | |
phase_c: | |
current: | |
name: ${disp_name} CT6 Amps | |
id: ct6Amps | |
gain_voltage: ${voltage_cal} | |
gain_ct: ${current_cal_120} | |
frequency: | |
name: ${disp_name} Freq B | |
line_frequency: 60Hz | |
current_phases: 3 | |
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 | |
icon: mdi:flash | |
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 | |
icon: mdi:flash | |
update_interval: ${update_time} | |
internal: true | |
- platform: template | |
name: ${disp_name} CT3 Watts | |
id: ct3Watts | |
lambda: return id(ct3Amps).state * id(ic1Volts).state; | |
accuracy_decimals: 0 | |
unit_of_measurement: W | |
icon: mdi:flash | |
update_interval: ${update_time} | |
internal: true | |
- platform: template | |
name: ${disp_name} CT4 Watts | |
id: ct4Watts | |
lambda: return id(ct4Amps).state * id(ic2Volts).state; | |
accuracy_decimals: 0 | |
unit_of_measurement: W | |
icon: mdi:flash | |
update_interval: ${update_time} | |
internal: true | |
- platform: template | |
name: ${disp_name} CT5 Watts | |
id: ct5Watts | |
lambda: return id(ct5Amps).state * id(ic2Volts).state; | |
accuracy_decimals: 0 | |
unit_of_measurement: W | |
icon: mdi:flash | |
update_interval: ${update_time} | |
internal: true | |
- platform: template | |
name: ${disp_name} CT6 Watts | |
id: ct6Watts | |
lambda: return id(ct6Amps).state * id(ic2Volts).state; | |
accuracy_decimals: 0 | |
unit_of_measurement: W | |
icon: mdi:flash | |
update_interval: ${update_time} | |
#IC1 AddOn 1 | |
- platform: atm90e32 | |
cs_pin: 0 | |
phase_a: | |
power: | |
name: ${disp_name} CT7 Watts | |
id: ct7Watts | |
internal: true | |
gain_voltage: ${voltage_cal} | |
gain_ct: ${current_cal_20} | |
phase_b: | |
power: | |
name: ${disp_name} CT8 Watts | |
id: ct8Watts | |
internal: true | |
gain_voltage: ${voltage_cal} | |
gain_ct: ${current_cal_20} | |
phase_c: | |
power: | |
name: ${disp_name} CT9 Watts | |
id: ct9Watts | |
internal: true | |
gain_voltage: ${voltage_cal} | |
gain_ct: ${current_cal_20} | |
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 | |
internal: true | |
gain_voltage: ${voltage_cal} | |
gain_ct: ${current_cal_20} | |
phase_b: | |
power: | |
name: ${disp_name} CT11 Watts | |
id: ct11Watts | |
internal: true | |
gain_voltage: ${voltage_cal} | |
gain_ct: ${current_cal_30} | |
phase_c: | |
power: | |
name: ${disp_name} CT12 Watts | |
id: ct12Watts | |
internal: true | |
gain_voltage: ${voltage_cal} | |
gain_ct: ${current_cal_30} | |
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 | |
internal: true | |
gain_voltage: ${voltage_cal} | |
gain_ct: ${current_cal_20} | |
phase_b: | |
power: | |
name: ${disp_name} CT14 Watts | |
id: ct14Watts | |
internal: true | |
gain_voltage: ${voltage_cal} | |
gain_ct: ${current_cal_20} | |
phase_c: | |
power: | |
name: ${disp_name} CT15 Watts | |
id: ct15Watts | |
internal: true | |
gain_voltage: ${voltage_cal} | |
gain_ct: ${current_cal_20} | |
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 | |
internal: true | |
gain_voltage: ${voltage_cal} | |
gain_ct: ${current_cal_30} | |
phase_b: | |
power: | |
name: ${disp_name} CT17 Watts | |
id: ct17Watts | |
internal: true | |
gain_voltage: ${voltage_cal} | |
gain_ct: ${current_cal_30} | |
phase_c: | |
power: | |
name: ${disp_name} CT18 Watts | |
id: ct18Watts | |
internal: true | |
gain_voltage: ${voltage_cal} | |
gain_ct: ${current_cal_20} | |
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(ct6Amps).state; | |
accuracy_decimals: 2 | |
unit_of_measurement: A | |
icon: mdi:flash | |
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 | |
icon: mdi:flash | |
update_interval: ${update_time} | |
# Unmonitored Misc | |
- platform: template | |
name: "${disp_name} Misc Watts" | |
id: MiscWatts | |
lambda: |- | |
return id(totalWatts).state | |
- id(ct2Watts).state - id(ct3Watts).state - id(ct4Watts).state | |
- id(ct5Watts).state - id(ct7Watts).state - id(ct8Watts).state | |
- id(ct9Watts).state - id(ct10Watts).state - id(ct11Watts).state | |
- id(ct12Watts).state - 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 | |
icon: mdi:flash | |
update_interval: ${update_time} | |
- platform: total_daily_energy | |
name: "${disp_name} Misc Total Daily Energy" | |
power_id: MiscWatts | |
filters: | |
- throttle_average: 60s | |
# Dryer | |
- platform: template | |
name: "Dryer Watts" | |
id: dryerWatts | |
lambda: return id(ct11Watts).state + id(ct12Watts).state; | |
accuracy_decimals: 1 | |
unit_of_measurement: W | |
icon: mdi:flash | |
update_interval: ${update_time} | |
- platform: total_daily_energy | |
name: "Dryer Total Daily Energy" | |
power_id: dryerWatts | |
filters: | |
- throttle_average: 60s | |
# Basement HVAC | |
- platform: template | |
name: "Basement HVAC Watts" | |
id: BasementHVACWatts | |
lambda: return id(ct2Watts).state + id(ct3Watts).state + id(ct4Watts).state + id(ct5Watts).state; | |
accuracy_decimals: 1 | |
unit_of_measurement: W | |
icon: mdi:flash | |
update_interval: ${update_time} | |
- platform: total_daily_energy | |
name: "Basement HVAC Total Daily Energy" | |
power_id: BasementHVACWatts | |
filters: | |
- throttle_average: 60s | |
# Attic HVAC | |
- platform: template | |
name: "Attic HVAC Watts" | |
id: AtticHVACWatts | |
lambda: return id(ct14Watts).state + id(ct15Watts).state; | |
accuracy_decimals: 1 | |
unit_of_measurement: W | |
icon: mdi:flash | |
update_interval: ${update_time} | |
- platform: total_daily_energy | |
name: "Attic HVAC Total Daily Energy" | |
power_id: AtticHVACWatts | |
filters: | |
- throttle_average: 60s | |
# Oven | |
- platform: template | |
name: "Oven Watts" | |
id: OvenWatts | |
lambda: return id(ct16Watts).state + id(ct17Watts).state; | |
accuracy_decimals: 1 | |
unit_of_measurement: W | |
icon: mdi:flash | |
update_interval: ${update_time} | |
- platform: total_daily_energy | |
name: "Oven Total Daily Energy" | |
power_id: OvenWatts | |
filters: | |
- throttle_average: 60s | |
# Refrigerator | |
- platform: template | |
name: "Refrigerator Watts" | |
id: RefrigeratorWatts | |
lambda: return id(ct18Watts).state; | |
accuracy_decimals: 1 | |
unit_of_measurement: W | |
icon: mdi:flash | |
update_interval: ${update_time} | |
- platform: total_daily_energy | |
name: "Refrigerator Total Daily Energy" | |
power_id: RefrigeratorWatts | |
filters: | |
- throttle_average: 60s | |
# Boiler Pumps | |
- platform: template | |
name: "Boiler Pumps Watts" | |
id: BoilerPumpsWatts | |
lambda: return id(ct16Watts).state; | |
accuracy_decimals: 1 | |
unit_of_measurement: W | |
icon: mdi:flash | |
update_interval: ${update_time} | |
- platform: total_daily_energy | |
name: "Boiler Pumps Total Daily Energy" | |
power_id: BoilerPumpsWatts | |
filters: | |
- throttle_average: 60s | |
# TV Room | |
- platform: template | |
name: "TV Room & Servers Watts" | |
id: TVRoomServersWatts | |
lambda: return id(ct10Watts).state; | |
accuracy_decimals: 1 | |
unit_of_measurement: W | |
icon: mdi:flash | |
update_interval: ${update_time} | |
- platform: total_daily_energy | |
name: "TV Room & Servers Total Daily Energy" | |
power_id: TVRoomServersWatts | |
filters: | |
- throttle_average: 60s | |
# Office | |
- platform: template | |
name: "Office Watts" | |
id: OfficeWatts | |
lambda: return id(ct7Watts).state; | |
accuracy_decimals: 1 | |
unit_of_measurement: W | |
icon: mdi:flash | |
update_interval: ${update_time} | |
- platform: total_daily_energy | |
name: "Office Total Daily Energy" | |
power_id: OfficeWatts | |
filters: | |
- throttle_average: 60s | |
# Master AV | |
- platform: template | |
name: "Master AV Watts" | |
id: MasterAVWatts | |
lambda: return id(ct8Watts).state; | |
accuracy_decimals: 1 | |
unit_of_measurement: W | |
icon: mdi:flash | |
update_interval: ${update_time} | |
- platform: total_daily_energy | |
name: "Master AV Total Daily Energy" | |
power_id: MasterAVWatts | |
filters: | |
- throttle_average: 60s | |
# Microwave | |
- platform: template | |
name: "Microwave Watts" | |
id: MicrowaveWatts | |
lambda: return id(ct9Watts).state; | |
accuracy_decimals: 1 | |
unit_of_measurement: W | |
icon: mdi:flash | |
update_interval: ${update_time} | |
- platform: total_daily_energy | |
name: "Microwave Total Daily Energy" | |
power_id: MicrowaveWatts | |
filters: | |
- throttle_average: 60s | |
#kWh | |
- platform: total_daily_energy | |
name: ${disp_name} Total kWh | |
power_id: totalWatts | |
filters: | |
- multiply: 0.001 | |
unit_of_measurement: kWh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment