Page 1 of 1

log graphs on longer period

Posted: Saturday 23 March 2024 20:52
by ricorico94
Hi,
Would it be possible to visualize data on more than 1 week or more than 1 year ?
Currently, there's a comparison graph which is useful, but I'd appreciate being able to compare "month to month", like comparing January 2023 with January 2024, or comparing the same day between current week with current one (like today, we're Saturday 23rd, and I'd like to compare Friday22d with Friday 17th).
I understand that there's need to summarize data to avoid database growth, but it could be interesting to have a setting to enable graphs showing like "13 months" instead of 12 months, and 8 days instead of 7, to have at least some detailed comparison available.
There could be also a feature to "export" the detailed measurements regularly and automatically, so that we don't lose detailed historical measurements (for users having enough storage) and so that we could add some comparison graphs or calculations, and this, without impacting size of the main domoticz database..
br,
Ricorico94

Re: log graphs on longer period

Posted: Sunday 24 March 2024 12:52
by waltervl
For that users normally use the export to influxdb functionality.
https://www.domoticz.com/wiki/Influxdb

Combined with Grafana you can show all kind of neat comparisons on detailed information in nice graphics.

Google the combination Domoticz Influxdb Grafana for more information.

Re: log graphs on longer period

Posted: Sunday 24 March 2024 15:43
by ricorico94
Hi,
I've indeed used Influxdb and Grafana to export data, but it forces to add other apps, so higher maintenance, more problems, more knowledge on reporting, etc. Not really user friendly as an overall solution, even thoughI agree that these 2 other tools are themselves individually very powerful.
It would be so much simpler if graphs in domoticz were showing the last 13 or 14 months instead of only 12 , meaning that you can't compare the existing month with the same of previous year.. Same thing for week view where comparing 2 same days of the week would be so useful.
Maybe it's just a couple settings in Domoticz which would allow people to define the detailed view window.. then anyone could decide whether they want to optimize viewing capabilities or minimize size of database.

br,
Ricorico94

Re: log graphs on longer period

Posted: Sunday 24 March 2024 16:13
by waltervl
If it were just some settings it would already been done....

But, in a lot of sensors you also have the previous year option which enables you to compare last 2 years including last month
Screenshot_20240324-160740.png
Screenshot_20240324-160740.png (99.69 KiB) Viewed 1695 times
If someone with JavaScript programming experience feels the need to add functionality they are welcome to create a PR.

Re: log graphs on longer period

Posted: Sunday 24 March 2024 16:25
by Kedi
How do you get that graph?
Mine shows Past Usage and Trend Usage with strikethrough text

Re: log graphs on longer period

Posted: Sunday 24 March 2024 16:44
by ricorico94
To be honest, I had seen this "total usage" and "past usage" without understanding what it was calculating..
What is this "past usage" ? the usage during previous period (previous year or previous month depending on the graph you look at ?) ? or the sum of several previous periods ? Is it documented somewhere ?
waltervl wrote: Sunday 24 March 2024 16:13 If it were just some settings it would already been done....
Then indeed, if it means a structural change in Domoticz, I can understand reluctancy.. I don't know enough of domoticz structure and its underlying database to assess the difficulty and I know developer's time is precious. Thanks anyway for having answered.

Re: log graphs on longer period

Posted: Sunday 24 March 2024 16:53
by Kedi
Found it, so simple. :oops: A mouseover would help.

Re: log graphs on longer period

Posted: Sunday 24 March 2024 23:10
by waltervl
Kedi wrote: Sunday 24 March 2024 16:25 How do you get that graph?
Mine shows Past Usage and Trend Usage with strikethrough text
You can click on the greyed out options to enable them

Re: log graphs on longer period

Posted: Sunday 24 March 2024 23:16
by waltervl
ricorico94 wrote: Sunday 24 March 2024 16:44 To be honest, I had seen this "total usage" and "past usage" without understanding what it was calculating..
What is this "past usage" ? the usage during previous period (previous year or previous month depending on the graph you look at ?) ? or the sum of several previous periods ? Is it documented somewhere ?
It is what is says. The past years values shows the corresponding value of last year so you can compare it with this year's value.