Dashticz Graphs - Features, Fixes & Updates

Dashticz, alternative dashboard based on HTML, CSS, jQuery

Moderators: leecollings, htilburgs, robgeerts

Post Reply
User avatar
clinkadink
Posts: 417
Joined: Tuesday 31 December 2019 1:15
Target OS: Linux
Domoticz version: 2020.2
Location: Swindon, UK
Contact:

Dashticz Graphs - Features, Fixes & Updates

Post by clinkadink »

Dashticz graphs have been updated this evening.

Fixed: undefined second Y axis added when 2 or more datasets present with the same unit of measure.

New: groupByDevices

New graph block parameter added, groupByDevice, allowing user to show the live status of several devices in a single graph. Instead of the data being group by time intervals, it is grouped by the devices. Note, unlike other graphs, this type of graph does not report on historic data. I.e. there are no 'last', 'today', 'month' buttons.
Spoiler: show

Code: Select all

blocks['server_status'] = { 
    title: 'Server Status',
    devices: [17, 18, 189, 190, 192],
    groupByDevice: true,    
    beginAtZero: true
}
Image

The feature works with device sensors such as counter, percentage and temperature.

With temperature sensors that have setpoints, it calculates whether the device is:
  • Cold - blue
  • At setpoint - orange
  • Hot - red
The office and penthouse rooms are showing red, as the temperature is above the setpoint ...
Spoiler: show

Code: Select all

blocks['all_zones'] = {	
   title: 'Room Temperatures',
   devices: [6, 11, 12, 8, 14, 9, 15, 235, 10, 13],
   groupByDevice: true,	
   beginAtZero: true
}  
Image

Same as above, but setting groupByDevice to 'horizontal' shows this ...
Spoiler: show

Code: Select all

blocks['all_zones'] = {	
   title: 'Room Temperatures',
   devices: [6, 11, 12, 8, 14, 9, 15, 235, 10, 13],
   groupByDevice: 'horizontal',	
   beginAtZero: true
}  
Image

As always, with all updates to this beta, any feedback is appreciated ;)
Last edited by clinkadink on Friday 10 April 2020 13:03, edited 1 time in total.
"UI is the saddle, the stirrups, & the reins. UX is the feeling you get being able to ride the horse."
User avatar
EdwinK
Posts: 1820
Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:

Re: Dashticz Graphs - New Features, Fixes & Updates

Post by EdwinK »

Okay, this I got to work ;)
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
Ewaldharmsen
Posts: 130
Joined: Tuesday 07 February 2017 15:00
Target OS: Linux
Domoticz version:
Contact:

Re: Dashticz Graphs - New Features, Fixes & Updates

Post by Ewaldharmsen »

I have a problem with graphs as defined in the manual:
This works:

Code: Select all

columns[3]['blocks'] = [
    'graph_6'
]

But adding this has no effect:

Code: Select all


blocks['graph_6'] = {
    graphTypes : ['te', 'hu'],
    legend: true
}

Any clue why?
User avatar
HansieNL
Posts: 957
Joined: Monday 28 September 2015 15:13
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz Graphs - New Features, Fixes & Updates

Post by HansieNL »

Ewaldharmsen wrote: Monday 02 March 2020 13:05 I have a problem with graphs as defined in the manual:
This works:

Code: Select all

columns[3]['blocks'] = [
    'graph_6'
]

But adding this has no effect:

Code: Select all


blocks['graph_6'] = {
    graphTypes : ['te', 'hu'],
    legend: true
}

Any clue why?
Can you try to add: devices: [6], to the block.
For latest manual see: https://dashticz.readthedocs.io/en/beta ... raphs.html
Blah blah blah
Ewaldharmsen
Posts: 130
Joined: Tuesday 07 February 2017 15:00
Target OS: Linux
Domoticz version:
Contact:

Re: Dashticz Graphs - New Features, Fixes & Updates

Post by Ewaldharmsen »

thanks! I was looking at the maste documentation
Ewaldharmsen
Posts: 130
Joined: Tuesday 07 February 2017 15:00
Target OS: Linux
Domoticz version:
Contact:

Re: Dashticz Graphs - New Features, Fixes & Updates

Post by Ewaldharmsen »

I now have this:

Code: Select all

blocks['graph_5'] = {
	devices: [5,11],
	graphTypes : ['te', 'hu'],
	interval: 5,
	sortDevices: true,
	custom : {
		"Vandaag": {
			range: 'day',
			filter: '24 hours',
			data: {
				Outside: 'd.te_5',
				Inside: 'd.te_11',
				Humidity: 'd.hu_5'
			}
		},
	},
	height : '300px'
}
Some other questions:

1) I have one sensor which is not always on, so for instance 6hours of data is missing for d.te_11. Tos 6 hours are then not displayed at all, also not for d.te_5. How can I prevent that?
2) I now have one button "vandaag", can I hide that button?
User avatar
clinkadink
Posts: 417
Joined: Tuesday 31 December 2019 1:15
Target OS: Linux
Domoticz version: 2020.2
Location: Swindon, UK
Contact:

Re: Dashticz Graphs - New Features, Fixes & Updates

Post by clinkadink »

1. You can use spanGaps
  • If true, lines will be drawn between points with no or null data
  • If false, points with NaN data will create a break in the line (default)
2. You can hide the buttons group for that graph by adding this to your custom.css.

Code: Select all

[data-id='graph_5'] .graphbuttons {
   display: none;
}
Although this means you will not be able to use other buttons such as zoom and debug. If you want to hide individual buttons, instead of the whole button group, you will need to use this.

Code: Select all

[data-id='graph_5'] .graphbuttons:nth-child(1) {
   display: none;
}
The number in brackets is the button number you want to hide (1 being the first on the left).
"UI is the saddle, the stirrups, & the reins. UX is the feeling you get being able to ride the horse."
Ewaldharmsen
Posts: 130
Joined: Tuesday 07 February 2017 15:00
Target OS: Linux
Domoticz version:
Contact:

Re: Dashticz Graphs - New Features, Fixes & Updates

Post by Ewaldharmsen »

Thanks!

This works now, but spanGaps: doesnt do anything, I stil have a gap in my graph, even if I make it true:

Code: Select all

blocks['graph_5'] = {
	devices: [Temp_Studeerkamer,Weerstation],
	graphTypes : ['te', 'hu'],
	spanGaps: false,
	legend: {
      'te_5': 'Outside',
	  'te_11': 'Inside',
	  'hu_5': 'Humidity'
    },
	height : '300px'
}
Working.JPG
Working.JPG (108.66 KiB) Viewed 3923 times
But I want "today" be te default not "Last hours"

This doesn't work:

Code: Select all

blocks['graph_5'] = {
	devices: [Temp_Studeerkamer,Weerstation],
	graphTypes : ['te', 'hu'],
	spanGaps: false,
	custom : {
		"24H": {
			range: 'day',
			filter: '24 hours',
			data: {
				Outside: 'd.te_5',
				Inside: 'd.te_11',
				Humidity: 'd.hu_5'
			}
		},
	},
	legend: {
      'te_5': 'Outside',
	  'te_11': 'Inside',
	  'hu_5': 'Humidity'
    },
	height : '300px'
}

If I do the above, it places the the inside temperature and humidity on the right y-ax and the outside temperature on the left y-ax.
see this:
custom.JPG
custom.JPG (112.92 KiB) Viewed 3923 times
If I add CSS:

Code: Select all

[data-id='graph_5'] .graphbuttons {
   display: none;
}
this is the result:
css.JPG
css.JPG (117.86 KiB) Viewed 3923 times
Last edited by Ewaldharmsen on Tuesday 03 March 2020 10:27, edited 2 times in total.
User avatar
EdwinK
Posts: 1820
Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:

Re: Dashticz Graphs - New Features, Fixes & Updates

Post by EdwinK »

EdwinK wrote: Sunday 01 March 2020 9:59 Okay, this I got to work ;)
And finally I got the 'outside vs inside temp' graph to work as well. And I feel stupid for not finding it any sooner. Forgot to change the IDX in the script. Only changed it in the devices line.
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
User avatar
clinkadink
Posts: 417
Joined: Tuesday 31 December 2019 1:15
Target OS: Linux
Domoticz version: 2020.2
Location: Swindon, UK
Contact:

Re: Dashticz Graphs - New Features, Fixes & Updates

Post by clinkadink »

Ewaldharmsen wrote: Tuesday 03 March 2020 9:24 This works now, but spanGaps: doesnt do anything, I stil have a gap in my graph, even if I make it true:
I cannot see any gaps in your lines, so I am not clear on what you are trying achieve.
Ewaldharmsen wrote: Tuesday 03 March 2020 9:24 But I want "today" be te default not "Last hours"
Ensure this is in your config.js

Code: Select all

config['standard_graph'] = 'day';
EdwinK wrote: Tuesday 03 March 2020 9:44 It places the the inside temperature and humidity on the right y-ax and the outside temperature on the left y-ax.
If you add custom data, you don't have to specify a custom legend too. Just try legend: true.
Ewaldharmsen wrote: Tuesday 03 March 2020 9:24 If I add CSS this is the result:
Is that not what you wanted?
"UI is the saddle, the stirrups, & the reins. UX is the feeling you get being able to ride the horse."
User avatar
clinkadink
Posts: 417
Joined: Tuesday 31 December 2019 1:15
Target OS: Linux
Domoticz version: 2020.2
Location: Swindon, UK
Contact:

Re: Dashticz Graphs - New Features, Fixes & Updates

Post by clinkadink »

EdwinK wrote: Tuesday 03 March 2020 9:44 And finally I got the 'outside vs inside temp' graph to work as well. And I feel stupid for not finding it any sooner. Forgot to change the IDX in the script. Only changed it in the devices line.
Great to hear, good catch ;)
"UI is the saddle, the stirrups, & the reins. UX is the feeling you get being able to ride the horse."
Ewaldharmsen
Posts: 130
Joined: Tuesday 07 February 2017 15:00
Target OS: Linux
Domoticz version:
Contact:

Re: Dashticz Graphs - New Features, Fixes & Updates

Post by Ewaldharmsen »

thank you very much!

I could not find

Code: Select all

config['standard_graph'] = 'day';
in the manual.

That one works now.
But the gap is there still, I highligted it in red:
gap.JPG
gap.JPG (160.2 KiB) Viewed 3832 times
My current code is:

Code: Select all

blocks['temperature'] = {
	devices: [Temp_Studeerkamer,Weerstation],
	graphTypes : ['te', 'hu'],
	spanGaps: true,
	maxTicksLimit: 10,
	legend: {
     	 'te_5': 'Outside',
	  'te_11': 'Inside',
	  'hu_5': 'Humidity'
    },
	height : '300px'
}
User avatar
clinkadink
Posts: 417
Joined: Tuesday 31 December 2019 1:15
Target OS: Linux
Domoticz version: 2020.2
Location: Swindon, UK
Contact:

Re: Dashticz Graphs - New Features, Fixes & Updates

Post by clinkadink »

Ewaldharmsen wrote: Wednesday 04 March 2020 9:49 But the gap is there still, I highligted it in red:
spanGaps will span any gaps (breaks) in a line. You do not have any gaps. The graph is accurately displaying the data provided from Domoticz. Understandably, If you want the graph to accurately report on the sensor for those 6 hours, the sensor needs to be on and providing data.
"UI is the saddle, the stirrups, & the reins. UX is the feeling you get being able to ride the horse."
Ewaldharmsen
Posts: 130
Joined: Tuesday 07 February 2017 15:00
Target OS: Linux
Domoticz version:
Contact:

Re: Dashticz Graphs - New Features, Fixes & Updates

Post by Ewaldharmsen »

clinkadink wrote: Wednesday 04 March 2020 13:04
Ewaldharmsen wrote: Wednesday 04 March 2020 9:49 But the gap is there still, I highligted it in red:
spanGaps will span any gaps (breaks) in a line. You do not have any gaps. The graph is accurately displaying the data provided from Domoticz. Understandably, If you want the graph to accurately report on the sensor for those 6 hours, the sensor needs to be on and providing data.
I still quite get it. I have 2 sensors one of which is alwasy on. The other not. The data of my always-on sensor is not showing because the other sensor has missing data.
Janco
Posts: 17
Joined: Monday 25 April 2016 10:27
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz Graphs - New Features, Fixes & Updates

Post by Janco »

In many of the graphs above and also in my own Dashticz graphs I notice the following bugs(?):
- Humidity seems to be expressed in ºC and temperature in % (which can be solved by defining them yourselves, but still)
- beginAtZero only works for one of the axes (in case of multiple axis)
User avatar
clinkadink
Posts: 417
Joined: Tuesday 31 December 2019 1:15
Target OS: Linux
Domoticz version: 2020.2
Location: Swindon, UK
Contact:

Re: Dashticz Graphs - New Features, Fixes & Updates

Post by clinkadink »

Janco wrote: Friday 06 March 2020 22:41 In many of the graphs above and also in my own Dashticz graphs I notice the following bugs(?):
- Humidity seems to be expressed in ºC and temperature in % (which can be solved by defining them yourselves, but still)
- beginAtZero only works for one of the axes (in case of multiple axis)
  • Please post the debug log (debugButton: true), this will help trace the issue
  • beginAtZero can be applied to multiple axes with custom data/options, I will also look to see if the block param can be improved
"UI is the saddle, the stirrups, & the reins. UX is the feeling you get being able to ride the horse."
Janco
Posts: 17
Joined: Monday 25 April 2016 10:27
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz Graphs - New Features, Fixes & Updates

Post by Janco »

This is the resulting file.
Don't pay too much attention to the array value for beginAtZero. I tried a simple value as well, no change.
Since not everything is documented, I sometimes use trial and error.

Log file:
block_49158.json.zip
Block definition:
Spoiler: show
blocks['outside_weather'] = {
debugButton: true,
title: 'Outside',
devices: [158, 161],
graphTypes: ['te', 'hu', 'ba'],
graph: ['line', 'line', 'line'],
beginAtZero: [true, true, true],
buttonsSize: 5,
buttonsText: ['1', '7'],
buttonsColor: 'green',
legend: true,
height: '185px',
lineTension: 0.4,
borderWidth: 2,
datasetColors: ['red', 'yellow', 'white'],
custom: {
"today": {
range: 'day',
filter: '24 hours',
data: {
Temperature: 'd.te_158',
Humidity: 'd.hu_158',
Pressure: 'd.ba_161'
}
},
"3 days": {
range: 'month',
filter: '14 days',
data: {
Temperature: 'd.te_158',
Humidity: 'd.hu_158',
Pressure: 'd.ba_161'
}
}
},
width: 12,
}
User avatar
clinkadink
Posts: 417
Joined: Tuesday 31 December 2019 1:15
Target OS: Linux
Domoticz version: 2020.2
Location: Swindon, UK
Contact:

Re: Dashticz Graphs - New Features, Fixes & Updates

Post by clinkadink »

That's your graph block from your config.js. What I meant is the debug file from the graph's 'debug button' itself.

More info can be found at this link:
https://www.domoticz.com/forum/viewtopi ... 60#p237106
"UI is the saddle, the stirrups, & the reins. UX is the feeling you get being able to ride the horse."
Janco
Posts: 17
Joined: Monday 25 April 2016 10:27
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz Graphs - New Features, Fixes & Updates

Post by Janco »

I know what mean. It's just that for some reason the debug file didn't upload (maybe because I made a draft first?).
Second attempt:
block_49158.json.zip
Debug file
(9.04 KiB) Downloaded 71 times
User avatar
clinkadink
Posts: 417
Joined: Tuesday 31 December 2019 1:15
Target OS: Linux
Domoticz version: 2020.2
Location: Swindon, UK
Contact:

Re: Dashticz Graphs - New Features, Fixes & Updates

Post by clinkadink »

Janco wrote: Saturday 07 March 2020 8:08 I know what mean. It's just that for some reason the debug file didn't upload (maybe because I made a draft first?).
Thanks for the log. I think I have found the issue, if I'm right, this only applies to graphs with multiple devices, each with multidata, but no Y labels specified in the custom data. I have tested my humidity/temp devices and the correct unit of measure is displayed.

As a test, please can you try changing this ...
Spoiler: show

Code: Select all

"data": {
   "Temperature": "d.te_158",
   "Humidity": "d.hu_158",
   "Pressure": "d.ba_161"
}
To this ...
Spoiler: show

Code: Select all

"data": {
   "Humidity": "d.hu_158",
   "Temperature": "d.te_158",
   "Pressure": "d.ba_161"
}
Please let me know if this corrects the Y axis label issue?
"UI is the saddle, the stirrups, & the reins. UX is the feeling you get being able to ride the horse."
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest