ha-emporia-vue icon indicating copy to clipboard operation
ha-emporia-vue copied to clipboard

1MIN data is about 1-2 min late

Open xmorand opened this issue 2 years ago • 2 comments

Data from ha-emporia-vue is about 1-2 mins late on actual data. I have calculations in HA that compare the data from ha-emporia-view with other energy monitors (like thermostats) and the difference in time causes a bad sync in the calculations.

In the image below, the green graph is the data from ha-emporia-vue, and the blue line is an export of the data from emporia app (with the accurate time). The delta in this example is 1min 40 sec.

image

I don't know if this has to do with the way the data is polled and if this can be fixed without significant re-factoring.

Thanks for the great work on this integration!

xmorand avatar Jan 05 '22 17:01 xmorand

This might be due to a change I made to try to ensure good data came back. I think I can probably cut a minute off that gap but the remaining 40 seconds might be due to when home assistant decides to poll for new data, the exact second within the minute is effectively random.

magico13 avatar Jan 05 '22 17:01 magico13

Thanks, you know best on the reason why certain timers exist :) I guess this could be even closer to accuracy if ever emporia decides to enable per second metric on their API one day....

Thanks again!

xmorand avatar Jan 06 '22 02:01 xmorand