I watched a video on YT, but it’s too old to be very useful. I’m assuming it’s no longer necessary to compile a YAML file into the firmware to perform calibration, is that right?
I’m using Home Assistant (core & supervisor: 2026.2.1, Op Sys 16.3, frontend 20260128.6) in a KVM on linux.
I have the Waveshare ESP32-S3 ETH mated to the 6 channel CircuitSetup energy monitor (using the CS adapter so it plugs in the monitor directly). ESPHome firmware is installed, HA recognizes it, and reads current and voltage on all 6 inputs.
But the voltage is 5 volts too low. I can’t locate how to use the HA web interface to re-calibrate, I assume that’s what’s required. At the bottom of the device info page I see what appears to be a place to input voltage, offset and current values but nothing I change in the UI seems to affect the readings. I rebooted the device after entering the new values.
Any help for this HA newbie would be greatly appreciated!
If it is fixed 5v difference you could either adapt it on the ESP or create a new template sensor in HA based on the ‘wrong’ one. If it is not always the same difference then you can use this:
Thank you @vingerha for that approach. It’s clear I have much to learn about HA. I’m optimistic about that, being a retired software engineer with experience ranging from assembly language for embedded devices to building and using AI systems. It will be fun!
So far I’m very impressed with HA. My learning style relies heavily on questions if I can’t find the documentation I need. I am happy to learn from docs or people. My post here is simply asking for how the process works for calibrating the energy module. If that includes editing a YAML file, that easy and I’ve used YAML in python programming many times.
But I can’t seem to find info on how to go from an edited YAML file to incorporating it (be it via compiling a new firmware binary, then flashing) that into the device, or interacting with the HA / ESPHome UI to update the existing ESPHome firmware with the new values from the edited YAML file.
I was under the impression that once ESPHome is flashed into the device, subsequent changes (like changing parameters in a YAML file) were done via a web UI.
It was very easy to install ESPHome into the device using Circuitsetup’s web UI (CircuitSetup ESPHome Installer), but it doesn’t have a provision to provide a YAML file and flash a firmware that uses it, that I’ve found.
If there’s a way to simply upload the YAML file to the device using an HA or ESPHome interface I haven’t found that either.
That is usually the start of something good
HA has a lot of documentation which means it is not always easy to find, esp. when you search for calibrate and this one is compensate
I think you have a choice to make, complex way via ESP … which may be time consuming but fun too … or just create a template sensor in HA with the 5 difference (few minutes work).
I have no clue what your device is but a search for circuitsetup esphome github, provides this…do not take this as correct, just maybe or…search further : Expandable-6-Channel-ESP32-Energy-Meter/Software/ESPHome at master · CircuitSetup/Expandable-6-Channel-ESP32-Energy-Meter
That is the correct device, and I have seen that page. I just don’t know what to do with that information. After editing the appropriate YAML files, what do I do with them to create the firmware to flash the device?
I’m not sure yet but the fog is clearing as I read. I’ll be more patient and dig deeper before I continue to barrage this forum with questions.
Thanks for the suggestions.
I finally figured out the main piece of the puzzle I thought was already done: adding the ESPhome add on. I thought since the devices were detected and showing values that was already done. Once that addon was installed the device’s website was accessible and I could calibrate, add offsets etc right from HA.
You would install esphome and that would install the rpoper compenents based on your yaml, then create the firmware and then transfer that to your device, either OTA (if that works) or via cable.
Ok, I’m now ~ 1 month from when I posted the OP, and am generally feeling pretty confident in my HA knowledge, having created 2 dashboards, 1 for the RV park the other for monitoring the manager’s house.
I have delivered the system and installed the 6 channel CircuitSetup energy monitors and they are monitoring the correct circuits. However the amperage & watts are way off, and the voltage is ~ 5% off. I seem to recall fixing the reference voltage while testing the monitor here in my lab, so I’ll figure that out again.
I now see the 2nd type has an internal burden resistor, and I know there is one on the energy monitor too. However that doesn’t make sense b/c the wattage reported from the monitor is a factor of ~ 2.5 off, but too much wattage not too little which I would suspect would be the case with 2 resistors.
If you have a fixed value diff then yes, template is best, but if the diff changes e.g. depending on the current, then you could look into compensation, see post above
Thanks for that info, but it seems overly complicated. Perhaps that’s what’s necessary but I would like to hear from others with power monitoring experience, particularly using the CircuitSetup monitor device, but others as well that use a variety of CTs as input sensors.
I have posted a question to CircuitSetup about this but as yet have received no response.
The CTs are the same brand (YHDC) that we sell, but the 50A is a voltage output version (which, you are correct, has an internal burden resistor). For current channels using this CT, the jumper on the rear of the board needs to be severed so the on-board burden is not used. Having 2 burden resistors is what is causing the discrepancy, and it’s unlikely you can calibrate the meter to them properly without severing the jumper.
For the voltage, you can use the internal calibration feature to dial in the voltage_gain value. Basically, you put the expected value into the voltage fields in Home Assistant, hit the calibration button, and it will save the calibration values to flash. You should save these values in your config file (they can be viewed in the ESPHome logs). Details here: ATM90E32 Power Sensor - ESPHome - Smart Home Made Simple
btw, when you press the calibration buttons, for voltage or current, they are for CTs 1-3 or 4-6. If you don’t want to calibrate for certain CTs you can save the values to your config, then hit the clear button. This will remove the calibrations values from flash memory and use the config values instead.
Thanks for your reply here John, that fills in several gaps in my knowledge. You say:
Basically, you put the expected value into the voltage fields in Home Assistant, hit the calibration button, and it will save the calibration values to flash. You should save these values in your config file (they can be viewed in the ESPHome logs). Details here: ATM90E32 Power Sensor - ESPHome - Smart Home Made Simple
I do know there are 3 versions of the ESPhome device web interface. I don’t see a calibrate button related to voltage, and the sliders don’t allow very good control:
In the link you mentioned I see values I believe can be added to the firmware YAML, compiled and then uploaded, but I don’t know the process for doing that, or if it can be done within HA or not.
What I read here: OTA firmware updates via the web server leads me to believe it may be possible, but it seems like a chicken & egg scenario if the OTA isn’t enabled in the firmware by default.
The USB-C ports are not very accessible on all of the monitors now, but if I have to remove burden resistors that might be the time to reprogram the Waveshare. It would be better to be able to do it in situ if possible.
There is no separate button for calibrate voltage vs current. Whatever current channels, or voltage values you have filled in for the reference will be calibrated. You should see the same values in the HA ESPhome device as in the web interface. With the default config “Run ${meter_name} Gain Cal” buttons should be there.
As long as you can connect to the Waveshare, you can update through ESPHome builder in HA. There’s really no need to use the web server unless you can’t access things through HA.
that’s great news to hear, I was hoping this could all be done within HA. I just need to understand what and where “ESPhome Builder” is. I have the ESPhome integration installed in HA, but I don’t see a different one with Builder, and I’ve looked for compile, install all over the HA web GUI and within the ESPhome pages under setup–> Devices/Services–> ESPhome and don’t see them there either, or under any 3 dots or gear menus.
I can connect to the Waveshare, that’s where I got the earlier image.
Once again, I’m confused by the terminology changes. When you say “ESPhome builder”, are you talking about “ESPhome device builder” ?
And it’s not in the “Add on store”, but under “Apps”, at least that looks like the animal you are referring to, a one stop shop for updating the device yaml. Ok, got it figured out now.
Installed the …builder app, took control, now can edit then update the device firmware.
I actually see some of my CTs are CURRENT @ 1v. Are the ones rated by voltage the ones that have the internal burden resistor and need the one on the back of the monitor board removed? I also have 100A @ 1v and they read drastically to low.
My voltage at the mains in 218.9, I live in the Philippines.
I changed the calibration as follows
This only needs to be changed if you’re using something other than the
Jameco 9VAC Transformer:
voltage_cal1: ‘13310’
voltage_cal2: ‘13310’
Now the voltage is 197.5 Now, I am using the 9V 110V Jameco power supply as my home has both 110V and 220V systems. Should I just increase the calbration value?