Many Sense users muse over what the Always On value really means and how it is calculated. I have seen suggestions on this forum that it is some kind of rolling average or rolling minimum over the past 48 hours. The near-exact definition can be found here:
Always On is a calculation of the lowest power of each of your mains, added together, where “lowest” refers to the 1% bin of the observed wattage histogram over the previous 24-48 hour period. It is updated every half second, though most users will not see significant real-time changes given the 48 hour lookback window.
But what does that really mean ? Thanks to Home Assistant, I have been able to pull 1 minute samples of Sense data, so I can try to duplicate the calculation. So I’m going to start with the results first, then show how the calculation was done and finally cover the caveats that make my calculation different.
Here’s a view of the one minute samples of Total Consumption for the past 4 days in red. Not quite the 1/2 second rolling usage visible in power meter, but close enough for now. The blue is my duplicated Always On calculation. You will note that the Always On is zero until 48 hours worth of data is “filled” -that’s because results of the calculation used (a statistical binning) is invalid until an entire 48 hours is available.
If I zoom in, I can get a better visual feel for the relationship between the Total Usage minimums and the Always On calculation. Definitely not an average or the absolute minimum. Also remember that the blue is based the samples for the 48 hours previous.
If I look at the Sense number for today, I can see that my April 1st number is in the same ballpark, around 400W.
Below are a couple of snapshots of the “calculation” for the 48 hours prior to 3/31 and 4/1. Each 48 hour window consists of 2880 one minute samples. The 1% bin is the 29th smallest sample of all those samples. The red line shows 1% bin line in the distribution. Techies out there will immediately recognize that we are NOT dealing with a simple Gaussian or normal distribution here, so the only way to compute a 1% bin is the discrete method that Sense uses.
So it seems I have a nearly working calculation. I say nearly, because the Sense number, at 410W right now, is a little lower than the 448W that my calculation is coming up with. Then again there are two big differences due to my limited data access:
- Sense use 1/2 second samples, so they are using 172,800 samples over 48 hours vs. 2,880.
- Sense also splits the 1% bin calculation across both legs (L1, L2) of the mains - they add the 1% bins for each leg.
Both of those differences are likely to lead to a lower result than mine, so I’m pretty confident I’m emulating the Sense calculation to the best of my ability.
ps: As I collect more data, I’ll update these graphs.