Voltage calibration via service #260
Replies: 2 comments 2 replies
-
First thanks for sharing the code to ease voltage calibration via a service. Quick questions: How often do you have to recalibrate the voltage for each phase? Did you automate the call to the calibration service? For example, when there is a certain delta between the accurate voltage and the reporting voltage. Last, just to mention that I had to define "id: phase_a_voltage" and "id: phase_b_voltage: under each phase "voltage:" definition for the code to compile correctly. |
Beta Was this translation helpful? Give feedback.
-
I'm confused as to what is the advantage over hard-coding the cal values? sensor:
- platform: emporia_vue
i2c_id: i2c_a
phases:
- id: phase_a # Verify that this specific phase/leg is connected to correct input wire color on device listed below
input: BLACK # Vue device wire color
calibration: 0.023103773
# 0.022 is used as the default as starting point but may need adjusted to ensure accuracy
# To calculate new calibration value use the formula <in-use calibration value> * <accurate voltage> / <reporting voltage>
voltage:
name: "Phase A Voltage"
filters: [*fast_avg ]
frequency:
disabled_by_default: true
name: "Phase A Frequency"
filters: [*moving_avg ]
... For power I used a linear model based on a very accurate power meter I have, and for current I didn't really care about accuracy. Unsure about the underlying mechanics - I played it safe and did voltage first, then power after. If doing current, I'd have done that 2nd. Implemented using the multiply and offset filters in the sensor definitions like below: < SNIP >
# Pay close attention to set the phase_id for each breaker by matching it to the phase/leg it connects to in the panel
- { phase_id: phase_a, input: "1", power: { name: "Circuit 01 Power", disabled_by_default: true, id: cir1, filters: [ *moving_avg, multiply: 0.996185684142185, offset: 1.66162960558336, *pos ] }
, current: { name: "Cicruit 01 Current", disabled_by_default: true, id: cur1, filters: [*fast_avg ] } }
- { phase_id: phase_a, input: "2", power: { name: "Circuit 02 Power", disabled_by_default: true, id: cir2, filters: [ *moving_avg, multiply: 2, multiply: 0.989759716174811, offset: 1.49379938719562, *pos ] }
, current: { name: "Cicruit 02 Current", disabled_by_default: true, id: cur2, filters: [*fast_avg ] } }
< SNIP >
|
Beta Was this translation helpful? Give feedback.
-
I think this might be useful for other people. I figured out how to use a
number
and a service to calibrate the voltage for a phase using a known voltage (measured with a multimeter at the bus bars). I find it faster and more convenient than calculating the calibration values manually and then re-flashing the device. It does require changing thepreferences.flash_write_interval
value to something less long (I chose 30m, but I don't think there's a benefit in leaving it at 48h because thetotal_daily_energy
instances haverestore: false
).With this config in place, in Home Assistant I go to Developer Tools → Services and call the appropriate service (one per phase):
That will recalculate the calibration value, and it will be restored from flash on boot.
Key changes to the config from this repo's
README.md
are:full config based on example in
README.md
Beta Was this translation helpful? Give feedback.
All reactions