How to mimic Domoticz "past gas" graph?

Dashticz, alternative dashboard based on HTML, CSS, jQuery

Moderators: leecollings, htilburgs, robgeerts

Post Reply
Multikoe
Posts: 4
Joined: Thursday 15 April 2021 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

How to mimic Domoticz "past gas" graph?

Post by Multikoe »

Domoticz has this feature in "Last Month" and "Last year" graphs that shows the values from the same month last year. I like this in my gas and electricity graphs that I get from my P1 smart meter as it allows me to compare my usage with last year's.
I have not found a way to mimic this in any Dasthicz graph. I have added a screenshot that shows what it looks like.
Any help or pointers would be welcome!
Attachments
Screenshot 2021-05-29 at 07.37.57.png
Screenshot 2021-05-29 at 07.37.57.png (342.41 KiB) Viewed 428 times
User avatar
HansieNL
Posts: 964
Joined: Monday 28 September 2015 15:13
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: How to mimic Domoticz "past gas" graph?

Post by HansieNL »

As far as I know this is not possible. You can only retrieve info for max one year.
For example if you want to show may 2020 it can only show the days left this month and not the full month.
Blah blah blah
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: How to mimic Domoticz "past gas" graph?

Post by waaren »

HansieNL wrote: Saturday 29 May 2021 10:08 As far as I know this is not possible. You can only retrieve info for max one year.
For example if you want to show may 2020 it can only show the days left this month and not the full month.
I don't know how the data is processed in Dashticz but to retrieve data from previous years / months from domoticz database.

Code: Select all

http://<domoticz ip: domoticz:port>/json.htm?actyear=<yyyy>&idx=<idx>&range=year&sensor=counter&type=graph
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
User avatar
HansieNL
Posts: 964
Joined: Monday 28 September 2015 15:13
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: How to mimic Domoticz "past gas" graph?

Post by HansieNL »

waaren wrote: Saturday 29 May 2021 11:47
HansieNL wrote: Saturday 29 May 2021 10:08 As far as I know this is not possible. You can only retrieve info for max one year.
For example if you want to show may 2020 it can only show the days left this month and not the full month.
I don't know how the data is processed in Dashticz but to retrieve data from previous years / months from domoticz database.

Code: Select all

http://<domoticz ip: domoticz:port>/json.htm?actyear=<yyyy>&idx=<idx>&range=year&sensor=counter&type=graph
It's not a Domoticz limitation, but a Dashticz limitation.
range: This is the name of the range as requested from Domoticz, and can be 'day', 'today', 'month' or 'year'.
Naamloos 1.jpg
Naamloos 1.jpg (71.28 KiB) Viewed 411 times
Now it looks like I almost didn't use gas in May 2020, but the value is just from today date till the end of the month.
Blah blah blah
Multikoe
Posts: 4
Joined: Thursday 15 April 2021 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: How to mimic Domoticz "past gas" graph?

Post by Multikoe »

HansieNL wrote: Saturday 29 May 2021 12:41
waaren wrote: Saturday 29 May 2021 11:47
HansieNL wrote: Saturday 29 May 2021 10:08 As far as I know this is not possible. You can only retrieve info for max one year.
For example if you want to show may 2020 it can only show the days left this month and not the full month.
I don't know how the data is processed in Dashticz but to retrieve data from previous years / months from domoticz database.

Code: Select all

http://<domoticz ip: domoticz:port>/json.htm?actyear=<yyyy>&idx=<idx>&range=year&sensor=counter&type=graph
It's not a Domoticz limitation, but a Dashticz limitation.
range: This is the name of the range as requested from Domoticz, and can be 'day', 'today', 'month' or 'year'.
Naamloos 1.jpg
Now it looks like I almost didn't use gas in May 2020, but the value is just from today date till the end of the month.
This is something else that stumped me for a while. But I realized (as you did), it just looks back *exactly* one year (365 days) which means that the first bar is no longer accurate almost immediately after it is displayed....
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest