Dashticz P1 Smart Meter: Last 7 days cumulative usage graph
Moderators: leecollings, htilburgs, robgeerts
- Antoinne
- Posts: 14
- Joined: Monday 30 March 2020 17:39
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Dashticz P1 Smart Meter: Last 7 days cumulative usage graph
I recently started my own Dashticz deployment and I really love the flexibility it offers compared with standard Domoticz. There is however one thing I haven’t figured out. How to recreate the “Last 7 days” cumulative usage graph (as shown in the image below) of P1 Smart Meter? I really would like to have an additional graph to the one I already have of P1 usage. But can someone provide an example on how to recreate this specific (original) Domoticz graph? Any help/tips would be much appreciated
Tnx,
Antoinne
Tnx,
Antoinne
- clinkadink
- Posts: 417
- Joined: Tuesday 31 December 2019 1:15
- Target OS: Linux
- Domoticz version: 2020.2
- Location: Swindon, UK
- Contact:
Re: Dashticz P1 Smart Meter: Last 7 days cumulative usage graph
What have you tried so far? If the Domoticz can report on it, the data is available. The above graph is a line graph, with filled with an opaque colour.
Something like this ...
And add to your column like this ...
P1 meters typically have multiple datasets, or sub-devices. If you don't want all datasets shown in the graph, use the graphTypes parameter. More info here: https://dashticz.readthedocs.io/en/beta ... raphs.html
Something like this ...
Code: Select all
blocks['cumalatief'] = {
title: 'P Elektriciteitsmeter',
devices: [idx], // <---- idx of your P1 device
graph: 'line',
borderColors:['rgba(83, 51, 198, 1)'],
datasetColors: ['rgba(83, 51, 198, 0.33)'],
legend: true
}
Code: Select all
columns[1] = {}
columns[1]['width'] = 12;
columns[1]['blocks'] = [ 'cumalatief']
"UI is the saddle, the stirrups, & the reins. UX is the feeling you get being able to ride the horse."
- Antoinne
- Posts: 14
- Joined: Monday 30 March 2020 17:39
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Dashticz P1 Smart Meter: Last 7 days cumulative usage graph
This helped me a lot. Thanks!
I'm still a bit confused though. I have been working on my dashticz project for 3 weeks now, using a lot of different devices. But the P1 output and graphs still puzzle me. Based on different examples I found in the wiki and on this forum, I have made two graphs (for gas and elektra) I like. See example for elektra below (not finished yet).
But as said, with the example you gave me, I can continue my learning exeperience
Antoinne
I'm still a bit confused though. I have been working on my dashticz project for 3 weeks now, using a lot of different devices. But the P1 output and graphs still puzzle me. Based on different examples I found in the wiki and on this forum, I have made two graphs (for gas and elektra) I like. See example for elektra below (not finished yet).
- Spoiler: show
But as said, with the example you gave me, I can continue my learning exeperience
Antoinne
- clinkadink
- Posts: 417
- Joined: Tuesday 31 December 2019 1:15
- Target OS: Linux
- Domoticz version: 2020.2
- Location: Swindon, UK
- Contact:
Re: Dashticz P1 Smart Meter: Last 7 days cumulative usage graph
The example block that I gave did not contain any custom data. Therefore, it will automatically create the default 3 range buttons; last day, week and month. You can set which range is used when the graph is loaded, by updating this is your config.sys.
More info here: https://dashticz.readthedocs.io/en/beta ... raphs.html
If you need anything else, just ask
Code: Select all
config['standard_graph'] = 'day';
If you need anything else, just ask
"UI is the saddle, the stirrups, & the reins. UX is the feeling you get being able to ride the horse."
-
- Posts: 2262
- Joined: Monday 29 August 2016 22:40
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Dashticz P1 Smart Meter: Last 7 days cumulative usage graph
config.sys => CONFIG.js
-
- Posts: 2262
- Joined: Monday 29 August 2016 22:40
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Dashticz P1 Smart Meter: Last 7 days cumulative usage graph
MS-DOS experience?
- Antoinne
- Posts: 14
- Joined: Monday 30 March 2020 17:39
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Dashticz P1 Smart Meter: Last 7 days cumulative usage graph
Maybe it is because I am running Dashticz V3.4.3 Beta, but my default buttons are last hours, today and last month. I also got confused because the available (or shown?) data of the P1 meter changes. Anyhow, I have learned a lot on P1 meters and making graphs in Dashticz today
The next challenge will be incorporating information from the JSON Buienradar offers. I already have some 20 Buienradar API-devices running on Domoticz/Dashticz, but now I need to figure out how to incorporate data that is only available through JSON on Buienradar. I still have a lot to learn to become a true power user in Domoticz/Dashticz
Once I have finished my designs, I will post them on the "show your design" post
Tnx,
Antoinne
The next challenge will be incorporating information from the JSON Buienradar offers. I already have some 20 Buienradar API-devices running on Domoticz/Dashticz, but now I need to figure out how to incorporate data that is only available through JSON on Buienradar. I still have a lot to learn to become a true power user in Domoticz/Dashticz
Once I have finished my designs, I will post them on the "show your design" post
Tnx,
Antoinne
- clinkadink
- Posts: 417
- Joined: Tuesday 31 December 2019 1:15
- Target OS: Linux
- Domoticz version: 2020.2
- Location: Swindon, UK
- Contact:
Re: Dashticz P1 Smart Meter: Last 7 days cumulative usage graph
What was I thinking. I haven't used config.sys (or autoexec.bat) since the '90s!!
"UI is the saddle, the stirrups, & the reins. UX is the feeling you get being able to ride the horse."
- clinkadink
- Posts: 417
- Joined: Tuesday 31 December 2019 1:15
- Target OS: Linux
- Domoticz version: 2020.2
- Location: Swindon, UK
- Contact:
Re: Dashticz P1 Smart Meter: Last 7 days cumulative usage graph
No, this is correct for the master and the beta. These will only change if you specify custom data in your block.
This is because P1 meters have multiple datasets. This can be demonstrated by using my example block above, i.e. without any custom data, and with legend set to true. The legend will then show each of your datasets and their key names, e.g. v2, v_2, etc. If you only want to display data for v2 (for example), then add this to your block:
Code: Select all
graphTypes: ['v2'],
Code: Select all
http://[DOMOTICZ_IP_AND_PORT]/json.htm?type=graph&sensor=counter&idx=[IDX]&range=day
Code: Select all
[code]http://[DOMOTICZ_IP_AND_PORT]/json.htm?type=devices&rid=[IDX]
Sorry, I cannot help you with this, I do not use Bienradar. Instead, I use Rainviewer. https://www.rainviewer.com/api.htmlAntoinne wrote: ↑Friday 17 April 2020 0:24 The next challenge will be incorporating information from the JSON Buienradar offers. I already have some 20 Buienradar API-devices running on Domoticz/Dashticz, but now I need to figure out how to incorporate data that is only available through JSON on Buienradar.
I host it locally, then embed it using the url in a frame in Dashticz. It is similar to Bienradar, except is available for any where in the world, the user has full controls, allowing them to zoom out and into another country. It updates every second in 10 minutes increments. It can also be styled/themed like Google Maps styling.
"UI is the saddle, the stirrups, & the reins. UX is the feeling you get being able to ride the horse."
- Antoinne
- Posts: 14
- Joined: Monday 30 March 2020 17:39
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Dashticz P1 Smart Meter: Last 7 days cumulative usage graph
Tnx again. That rainviewer look really nice. Maybe that is something I will use too. I also noticed that the documentation on graphs is now much more elaborate compared to the last time I looked at it. This really helps.
There is however still one thing I don't get. It is probably something really simple that I either forgot or did not implement correctly. But when I create the simple graph with the example you gave, it does not show the default 3 ranges last day, week and month. I get buttons with last hours, today and last month. And when I look at the output of the today button it show the last week instead of 24 hours?!?
I can not figure out how to correct this. The weird thing is, I really prefer the weekly view. And it must be a mild form of autism, but I can't stand the fact that the text on the standard button is incorrect with tho output I get
Any tips on how to fix this?
There is however still one thing I don't get. It is probably something really simple that I either forgot or did not implement correctly. But when I create the simple graph with the example you gave, it does not show the default 3 ranges last day, week and month. I get buttons with last hours, today and last month. And when I look at the output of the today button it show the last week instead of 24 hours?!?
I can not figure out how to correct this. The weird thing is, I really prefer the weekly view. And it must be a mild form of autism, but I can't stand the fact that the text on the standard button is incorrect with tho output I get
Any tips on how to fix this?
-
- Posts: 2262
- Joined: Monday 29 August 2016 22:40
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Dashticz P1 Smart Meter: Last 7 days cumulative usage graph
The 'today' button shows the data it receives from Domoticz defined as 'today'. There is a setting somewhere in Domitcz where you define how many days will be shown on the day graph.
In Dashticz the graph data is fully customizable. The documentation of the beta branch (not the master version!) contains quite some examples.
With the custom graphs you can filter the data, select data elements, custom computations, set button text, etc.
Probably people here are willing to help as well.
Sent from my SM-A320FL using Tapatalk
In Dashticz the graph data is fully customizable. The documentation of the beta branch (not the master version!) contains quite some examples.
With the custom graphs you can filter the data, select data elements, custom computations, set button text, etc.
Probably people here are willing to help as well.
Sent from my SM-A320FL using Tapatalk
- Antoinne
- Posts: 14
- Joined: Monday 30 March 2020 17:39
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Dashticz P1 Smart Meter: Last 7 days cumulative usage graph
Tnx, I did not think of that setting. I only looked at it when I installed Domoticz 2 years ago
- clinkadink
- Posts: 417
- Joined: Tuesday 31 December 2019 1:15
- Target OS: Linux
- Domoticz version: 2020.2
- Location: Swindon, UK
- Contact:
Re: Dashticz P1 Smart Meter: Last 7 days cumulative usage graph
Apologies, that is correct, last hours, today and last month.
Second example below if you want to give it a spin ...
Second example below if you want to give it a spin ...
Code: Select all
blocks['cumalatief'] = {
title: 'P Elektriciteitsmeter',
devices: [8],
graph: 'line',
graphTypes: ['eu_8'],
borderColors:['rgba(83, 51, 198, 1)'],
datasetColors: ['rgba(83, 51, 198, 0.33)'],
lineFill: [true],
buttonsText: ['Today', 'Week', 'Month'],
maxTicksLimit: 14,
zoom: 'x',
debugButton: true,
legend: {
'Cumalatief' : 'eu_8'
}
}
"UI is the saddle, the stirrups, & the reins. UX is the feeling you get being able to ride the horse."
- Antoinne
- Posts: 14
- Joined: Monday 30 March 2020 17:39
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Dashticz P1 Smart Meter: Last 7 days cumulative usage graph
As expected, resetting the Domoticz defined 'today' setting created another steep learning curve today (and tonight). More work to do on my graphs. Really love the "debugButton: true" option
Who is online
Users browsing this forum: No registered users and 1 guest