Files
fresh-home/esphome/circuit-setup/README.md
T
2025-12-09 16:59:38 -05:00

6.6 KiB

ESPHome Configuration for Expandable 6-Channel ESP32 Energy Meter

This folder contains ESPHome configuration files used to monitor power and energy via the CircuitSetup Expandable 6-Channel Energy Meter. These configurations support flexible deployments - with or without add-on boards - as well as Wi-Fi or Ethernet connections. Many files use !include statements to modularize calibration, sensor definitions, power quality metrics, and device status.


📁 Base Config Files

File Description
6chan_common.yaml Base shared configuration: sets platform (esp32), SPI, includes time and API components. Meant to be included in Wi-Fi-based setups.
6chan_common_ethernet.yaml Same as 6chan_common.yaml, but for the Lilygo T-ETH-Lite ESP32S3 and the CircuitSetup 6 Channel Energy Meter Ethernet Adapter .
6chan_energy_meter_main_board.yaml Full configuration for monitoring only the main board's 6 channels via Wi-Fi.
6chan_energy_meter_main_ethernet.yaml Ethernet-based variant of 6chan_energy_meter_main_board.yaml.
6chan_energy_meter_1-addon.yaml Main board + 1 add-on board (12 channels).
6chan_energy_meter_2-addons.yaml Main board + 2 add-ons (18 channels).
6chan_energy_meter_3-addons.yaml Main board + 3 add-ons (24 channels).

📂 calibration/

When these files are included, and calibration is enabled, semi-automatic calibration can be done for each current and voltage channel by providing a current and voltage reference. Calculated values for offset and gain stored in memory take priority over config values. To save calculated calibration values, copy them from the ESPHome logs to your config then use the clear buttons to clear the calibration values from memory

See details on semi-automatic calibrations here

File Description
6chan_xxxx_calibration.yaml Enables calibration buttons for gain, power offset, current/voltage offset, and clear buttons for each
6chan_xxxx_offset_calibrations.yaml Offset calibration values fine tuned via the output of the semi-automatic calibrations. Values should be copied in from the meter's ESPHome log

📂 meter_sensors/

Default current, power (watts), and voltage sensor entities per meter board More details on each sensor here


📂 status_fields/

These fields display the status of each CT, or phase, with a short text description. See more details here


📂 power_quality/

Contains power quality values that are available for each phase, and can be enabled per meter board. Enabling these on every current channel is possible, but will produce a lot of data and sensors that are likely not needed. They include reactive_power, apparent_power, harmonic_power, power_factor, phase_angle, peak_current More details on each sensor here


📂 examples/

Pre-configured use cases to jumpstart your setup.

File Description
6chan_energy_meter_3-phase_ethernet.yaml Configuration for 3-phase measurement with Ethernet. Uses main board + 1 add-on.
6chan_energy_meter_6-addons_ethernet.yaml Max configuration: main board + 6 add-ons over Ethernet (42 channels).
6chan_energy_meter_house_solar_ha_kwh.yaml Real-world example measuring house + solar circuits.
6chan_main_calibration_beta.yaml Beta calibration test — for experimentation only, not recommended for production.

Measuring More Than 65A on a Current Channel

The max value for current that the meter can output is 65.535. If you expect to measure current over 65A, divide current_cal_ctx 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.

Under sensor: add:

- id: !extend ${main_meter_id1} # CTs 1-3 
  phase_a: # CT1
    current:
      filters:
        - multiply: 2
    power:
      filters:
        - multiply: 2

Monitoring More Than 1 Voltage

By default, all voltage channels are connected, and set up to monitor a single phase. See here on what needs to be done with hardware if monitoring more than 1 voltage.

In the config, under sensor: add:

- id: !extend ${main_meter_id2}
  phase_a:
    voltage:
       name: Voltage 2
       id: ic2Volts
       accuracy_decimals: 1
  frequency:
    name: Frequency 2

Excluding/Removing Sensors

If you, for example, want to see power quality sensors on only 2 out of the 4 CT channels of the main board, you could add something like this in your base config file. This is assuming you are including Software/ESPHome/power_quality/6chan_main_power_quality.yaml and you want to exclude power quality sensors for the last 4 CTs:

Under sensor: add:

- id: !extend ${main_meter_id1}
  phase_c: # CT3
    reactive_power: !remove
    apparent_power: !remove
    harmonic_power: !remove
    power_factor: !remove
    phase_angle: !remove
    peak_current: !remove

- id: !extend ${main_meter_id2}
  phase_a: # CT4
    reactive_power: !remove
    apparent_power: !remove
    harmonic_power: !remove
    power_factor: !remove
    phase_angle: !remove
    peak_current: !remove
  phase_b: #CT5
    reactive_power: !remove
    apparent_power: !remove
    harmonic_power: !remove
    power_factor: !remove
    phase_angle: !remove
    peak_current: !remove
  phase_c: #CT6
    reactive_power: !remove
    apparent_power: !remove
    harmonic_power: !remove
    power_factor: !remove
    phase_angle: !remove
    peak_current: !remove

Including Files Locally

You can copy config files to your local directories and change the packages: part of your config to something like this:

packages:
  common: !include Software/ESPHome/6chan_common.yaml
  main: !include Software/ESPHome/meter_sensors/6chan_main_sensor.yaml
  main_status: !include Software/ESPHome/status_fields/6chan_main_status.yaml
  main_cal: !include Software/ESPHome/calibration/6chan_main_calibration.yaml

Compiled Firmware

See here to flash your ESP32