mirror of
https://github.com/CeeWeasel/fresh-home.git
synced 2026-08-09 10:30:14 -04:00
282 lines
7.4 KiB
YAML
282 lines
7.4 KiB
YAML
# CT01 - A - Grid Phase A
|
|
# CT02 - G - Dryer
|
|
# CT03 - D - Furnace
|
|
# CT04 - B - Grid Phase B
|
|
# CT05 - E - Basement Plugs (Computer is on this circuit)
|
|
# CT06 - F - Nursery, Kitchen, and Dining Room Lights
|
|
# CT07 - C - Sump Pump Plug
|
|
# CT08 - H - Microwave Plug
|
|
# CT09 - I - Stove/Oven
|
|
# CT10 - J - Front Room Plugs
|
|
# CT11 - M - Heat Pump
|
|
# CT12 - L - Kitchen Circuit 1 (Fridge is on this circuit)
|
|
|
|
substitutions:
|
|
devicename: power-monitor
|
|
disp_name: power-monitor
|
|
friendly_name: 'PM:'
|
|
entity_name: power_monitor
|
|
comment: Clever Power Monitor
|
|
static_ip: !secret power-monitor-ip
|
|
platform: ESP32
|
|
board: nodemcu-32s
|
|
update_time: 500ms
|
|
kwh_report_interval: 60s
|
|
watt_heartbeat: 60s
|
|
throttle_time: 60s
|
|
watt_delta: "50.0"
|
|
#watt_delta: "5.0"
|
|
#grid_watt_delta: "10.0"
|
|
grid_watt_delta: "200.0"
|
|
#fast_update_time: 10s
|
|
#medium_update_time: 30s
|
|
#slow_update_time: 60s
|
|
|
|
main_meter_name1: Meter 1-3
|
|
main_meter_name2: Meter 4-6
|
|
main_meter_id1: meter_main1
|
|
main_meter_id2: meter_main2
|
|
## Addon1
|
|
addon1_name1: Addon1 7-9
|
|
addon1_name2: Addon1 10-12
|
|
addon1_id1: addon1_1
|
|
addon1_id2: addon1_2
|
|
## Addon2
|
|
addon2_name1: Addon2 13-15
|
|
addon2_name2: Addon2 16-18
|
|
addon2_id1: addon2_1
|
|
addon2_id2: addon2_2
|
|
## Addon3
|
|
addon3_name1: Addon3 19-21
|
|
addon3_name2: Addon3 22-24
|
|
addon3_id1: addon3_1
|
|
addon3_id2: addon3_2
|
|
|
|
ct1_name: 'Grid Phase A'
|
|
ct4_name: 'Grid Phase B'
|
|
|
|
ct22_name: 'Well' # 1, 3 # sct010 - O
|
|
ct12_name: 'Kitchen 1' # 5 # sct006 - L
|
|
ct16_name: 'Kitchen 2' # 7 # sct006 - S
|
|
ct18_name: 'Laundry Plug' # 9 # sct006 - N
|
|
ct8_name: 'Microwave Plug' # 11 # sct006 - H
|
|
ct17_name: 'Bathroom Plug' # 13 # sct006 - R
|
|
ct11_name: 'Heat Pump' # 15, 17 - M
|
|
ct24_name: 'Basement Bedroom and Furnace Room Lights' # 19 # sct006 - K
|
|
ct5_name: 'Basement Plugs' # 21a # sct006 - E
|
|
ct23_name: 'Basement and Laundry Lights and Plugs' # 21b # sct006 - W
|
|
ct7_name: 'Sump Pump Plug' # 23 # sct006 - C
|
|
|
|
ct6_name: 'Nursery, Dining, Kitchen Lights' # 2 # sct006 - F
|
|
ct20_name: 'Master Suite' # 4 # sct006 - T
|
|
ct3_name: 'Furnace' # 6 # sct006 - D
|
|
ct15_name: 'Basement Stairs and Lights' # 8 # sct006 - P
|
|
ct21_name: 'Dishwasher' # 10 # sct006 - V
|
|
ct13_name: 'Garage Outside and Front Garage Lights' # 12 # sct006 - U
|
|
ct10_name: 'Front Room Plugs' # 14 # sct006 - J
|
|
ct14_name: 'Garage and Outside Plugs' # 16 # sct006 - Q
|
|
ct9_name: 'Stove' # 18, 20 # sct016 - I
|
|
ct2_name: 'Dryer' # 22, 24 # sct010 - G
|
|
|
|
ct19_name: 'Unused'
|
|
|
|
|
|
# Current Transformers:
|
|
# 20A/25mA SCT-006: 11143
|
|
sct006: '11143'
|
|
# 30A/1V SCT-013-030: 8650
|
|
# 50A/1V SCT-013-050: 15420
|
|
# 80A/26.6mA SCT-010: 41660
|
|
sct010: '41660'
|
|
# 100A/50ma SCT-013-000: 27518
|
|
sct013: '27518'
|
|
# 120A/40mA: SCT-016: 41787
|
|
sct016: '41787'
|
|
# 200A/100mA SCT-024: 27518
|
|
#current_cal: '27518'
|
|
# Jameco 9VAC Transformer:
|
|
# For meter versions:
|
|
# >= v1.3: 7305
|
|
#voltage_cal: '7305'
|
|
|
|
## Main Board
|
|
current_cal_ct1: '41787'
|
|
current_cal_ct2: '41660'
|
|
current_cal_ct3: '11143'
|
|
current_cal_ct4: '41787'
|
|
current_cal_ct5: '11143'
|
|
current_cal_ct6: '11143'
|
|
## Addon1
|
|
current_cal_ct7: '11143'
|
|
current_cal_ct8: '11143'
|
|
current_cal_ct9: '27518'
|
|
current_cal_ct10: '11143'
|
|
current_cal_ct11: '41660'
|
|
current_cal_ct12: '11143'
|
|
## Addon2
|
|
current_cal_ct13: '11143'
|
|
current_cal_ct14: '11143'
|
|
current_cal_ct15: '11143'
|
|
current_cal_ct16: '11143'
|
|
current_cal_ct17: '11143'
|
|
current_cal_ct18: '11143'
|
|
## Addon3
|
|
current_cal_ct19: '11143'
|
|
current_cal_ct20: '11143'
|
|
current_cal_ct21: '11143'
|
|
current_cal_ct22: '41660'
|
|
current_cal_ct23: '11143'
|
|
current_cal_ct24: '11143'
|
|
# This only needs to be changed if you're using something other than the
|
|
# Jameco 9VAC Transformer:
|
|
voltage_cal1: '7305'
|
|
voltage_cal2: '7305'
|
|
|
|
electric_freq: "60Hz"
|
|
|
|
offset_calibration: "true"
|
|
gain_calibration: "true"
|
|
|
|
|
|
# spi_clk: 18
|
|
# spi_miso: 19
|
|
# spi_mosi: 23
|
|
# ic1_main: 5
|
|
# ic1_addon1: 0
|
|
# ic1_addon2: 27
|
|
# ic1_addon3: 2
|
|
# ic2_main: 4
|
|
# ic2_addon1: 16
|
|
# ic2_addon2: 17
|
|
# ic2_addon3: 21
|
|
|
|
# ethernet:
|
|
# id: eth
|
|
# type: W5500
|
|
# clk_pin: GPIO13
|
|
# mosi_pin: GPIO11
|
|
# miso_pin: GPIO12
|
|
# cs_pin: GPIO14
|
|
# interrupt_pin: GPIO10
|
|
# reset_pin: GPIO9
|
|
esphome:
|
|
name: ${disp_name}
|
|
friendly_name: "${friendly_name}"
|
|
name_add_mac_suffix: true
|
|
min_version: '2025.7.0'
|
|
project:
|
|
name: circuitsetup.6c-energy-meter-3-addons
|
|
version: "1.7"
|
|
|
|
packages:
|
|
wifi: !include common/wifi.yaml
|
|
# device_base: !include common/complex_esp32_base.yaml
|
|
common: !include circuit-setup/6chan_common.yaml
|
|
main: !include circuit-setup/meter_sensors/6chan_main_sensor.yaml
|
|
main_status: !include circuit-setup/status_fields/6chan_main_status.yaml
|
|
main_cal: !include circuit-setup/calibration/6chan_main_calibration.yaml
|
|
addon_1: !include circuit-setup/meter_sensors/6chan_addon1.yaml
|
|
addon_2: !include circuit-setup/meter_sensors/6chan_addon2.yaml
|
|
addon_3: !include circuit-setup/meter_sensors/6chan_addon3.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
|
|
|
|
|
|
# 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:
|
|
## The max value for current that the meter can output is 65.535. If you expect to measure current over 65A,
|
|
## divide the current_cal_ctx (above) by 2 (120A CT) or 4 (200A CT) and multiply the current and power values
|
|
## by 2 or 4, uncommenting the below and changing the id and phase_x accordingly
|
|
#- id: !extend ${main_meter_id1} # CTs 1-3
|
|
# phase_a: # CT1
|
|
# current:
|
|
# filters:
|
|
# - multiply: 2
|
|
# power:
|
|
# filters:
|
|
# - multiply: 2
|
|
#
|
|
## uncomment if monitoring 2 voltages
|
|
#- id: !extend ${main_meter_id2}
|
|
# phase_a:
|
|
# voltage:
|
|
# name: Voltage 2
|
|
# id: ic2Volts
|
|
# accuracy_decimals: 1
|
|
# frequency:
|
|
# name: Frequency 2
|
|
|
|
## Comment out to show amps and watts per meter board in Home Assistant
|
|
- id: !extend totalAmpsMain
|
|
internal: true
|
|
- id: !extend totalWattsMain
|
|
internal: true
|
|
- id: !extend totalAmpsAddOn1
|
|
internal: true
|
|
- id: !extend totalWattsAddOn1
|
|
internal: true
|
|
- id: !extend totalAmpsAddOn2
|
|
internal: true
|
|
- id: !extend totalWattsAddOn2
|
|
internal: true
|
|
- id: !extend totalAmpsAddOn3
|
|
internal: true
|
|
- id: !extend totalWattsAddOn3
|
|
internal: true
|
|
|
|
#Total Amps
|
|
###########
|
|
- platform: template
|
|
name: ${friendly_name} Total Amps
|
|
id: totalAmps
|
|
lambda: return id(totalAmpsMain).state + id(totalAmpsAddOn1).state + id(totalAmpsAddOn2).state + id(totalAmpsAddOn3).state ;
|
|
accuracy_decimals: 2
|
|
unit_of_measurement: A
|
|
device_class: current
|
|
update_interval: ${update_time}
|
|
|
|
#Total Watts
|
|
############
|
|
- platform: template
|
|
name: ${friendly_name} Total Watts
|
|
id: totalWatts
|
|
lambda: return id(totalWattsMain).state + id(totalWattsAddOn1).state + id(totalWattsAddOn2).state + id(totalWattsAddOn3).state ;
|
|
accuracy_decimals: 1
|
|
unit_of_measurement: W
|
|
device_class: power
|
|
update_interval: ${update_time}
|
|
|
|
#kWh
|
|
####
|
|
- platform: total_daily_energy
|
|
name: ${friendly_name} Total kWh
|
|
power_id: totalWatts
|
|
filters:
|
|
- multiply: 0.001
|
|
unit_of_measurement: kWh
|
|
device_class: energy
|
|
state_class: total_increasing |