jertel / vuegraf

Populate metrics from your Emporia Vue energy monitoring devices into an InfluxDB
MIT License
167 stars 55 forks source link

Added Days and Hours for history and daily pulls #119

Closed gauthig closed 1 year ago

gauthig commented 1 year ago

Please review and let me know if this should remain a forked project or merged into your project. The readme is just to acknowledge this work and your original work, it should not be merged, other files would need to be merged. Please provide your comments.

Goals

  1. Be able to load all historical emporia data
  2. Reset the json file so a second run after using history or RESET did not wipe out previous run
  3. Have fast (and low resources) monthly and daily charts while comparing year over year without all the minute data.
  4. Next feature will be pull latest min/hour/day on startup to catchup missing data if the program was not running for some time.

Reset config json file values to allow multiple runs without resetting database: Database reset back to False and History Days back to 0 after run.

Add additional scales to the pull allowing to get years of history since minutes/second have a short life at emporia. This also allows faster dashboards for creating items like daily or monthly graphs. Hours history and daily pull Days history and daily pull Notes While adding additional scales will keep seconds = true and minutes = false to not impact existing reporting. Was able to get 720 days of Hours and Days in history load. Day and Hour matched for 2 years of data. Minute/Seconds had slight discrepancy but matched emporia manual csv downloads.

jertel commented 1 year ago

I like the ideas and I appreciate your desire to contribute back to Vuegraf. Here are my thoughts:

What are your thoughts on this feedback?

gauthig commented 1 year ago

Thanks for reviewing.

Resetting the config value are bad, I agree but just wanted to use current process. Yes, I will change and remove both history days / database reset from config to command line parameters. I also prefer this style and leave the config file to operational settings, not initializing.

My Next steps

Since I will remove minutes, do you want to keep Seconds as Detail = True or change to Detailed = Seconds? I'll start next week on the above changes and reject the current pull request.

From: Jason Ertel @.> Sent: Sunday, April 9, 2023 2:55 PM To: jertel/vuegraf @.> Cc: Garrett @.>; Author @.> Subject: Re: [jertel/vuegraf] Added Days and Hours for history and daily pulls (PR #119)

I like the ideas and I appreciate your desire to contribute back to Vuegraf. Here are my thoughts:

docker run --rm -it -v $(pwd)/vuegraf.json:/opt/vuegraf/vuegraf.json jertel/vuegraf --reset-database --load-history-days=24

What are your thoughts on this feedback?

- Reply to this email directly, view it on GitHubhttps://github.com/jertel/vuegraf/pull/119#issuecomment-1501221355, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AOZL7VDD5QQILZE2BMH2OBLXAMV4BANCNFSM6AAAAAAWTFC4Y4. You are receiving this because you authored the thread.Message ID: @.**@.>>

jertel commented 1 year ago

Sounds like a good plan.

You can leave the Detail = True. That live fine-grained detail data will always be in seconds since we already get per-minute data on the regular live data updates. So removing the obsolete historic minute data is unrelated.

gauthig commented 1 year ago

Closing current pull request with pending work listed in the comments.