ioBroker / ioBroker.sql

Store history data in SQL Database: MySQL, PostgreSQL or SQLite
MIT License
45 stars 24 forks source link

Highest Value per Day #327

Closed anno171986 closed 12 months ago

anno171986 commented 12 months ago

Is your feature request related to a problem? Please describe. I want to save storrage space in my DB. I want to monitor the amount of energy generated by my PV systems. On the current day I#m interessted in the current value. For past days I only need the latest/highest value, I'n not interrested in the other values.

Describe the solution you'd like Would be fine if there would be such a option. Everytime a value needs to be written to the DB, it should be checked if there is already a value at the current day, if yes: check if old value smaller than current value, if yes, delete old value and write new value.

Describe alternatives you've considered To use a seperate datapoint which is written at the end of the day would not include the current day.

Additional context This could be used for all values which are startes with 0 at midnight and can only increase.

Apollon77 commented 12 months ago

Sorry. This adapter is for data logging and will not do any data aggregations. Please check adapters like statistics or sourceanalytics.