Dashticz v3.10.5 beta

Dashticz, alternative dashboard based on HTML, CSS, jQuery

Moderators: leecollings, htilburgs, robgeerts

Post Reply
Lokonli
Posts: 2290
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Dashticz v3.10.5 beta

Post by Lokonli »

In the latest Domoticz versions (build 15327, beginning of June) some changes have been implemented in the API that is used by Dashticz.

This new Dashticz beta release supports the new Domoticz API while maintaining backwards compatibility for older Domoticz versions.

So if you have updated Domoticz, and encounter some issues using Dashticz (graphs not working, warnings in the Domoticz log) please update to this Dashticz version v3.10.5

Please leave a remark here if you have tested this Dashticz version. If everything is working I'll release a new master version.
solarboy
Posts: 345
Joined: Thursday 01 November 2018 19:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.6
Location: Portugal
Contact:

Re: Dashticz v3.10.5 beta

Post by solarboy »

I'm using the new Beta now, I was on a very old version, about 3 years old. I have a dual filled line graph of solar power and consumed power, overlaid. The graphs were filled red below the line for consumed power, and green for solar with solar on top. It used to work great with a visual red zone of "paid for" energy use and a green area that covered the red of solar power.

Since I updated due to the "deprecated" Domoticz log spam issue my graphs seem to have failed and the red area is inconsistently rendered, sometimes showing red and sometimes a shadow type effect.

Also, the latest Beta would not load on my ancient RpiStretch/kiosk/Chromium browser (failed with a generic "error" or stuck at "Dashticz V3 is loading") but this error could have happened many versions ago as I haven't updated in ages (if it 'aint broke don't try to fix it). I've updated to Bullseye on the Kiosk now and it does load but with the glitchy graph. Perhaps there were some changes to graphing I am unaware of.

I'm not sure if it's possible to post images to the forum...
Intel NUC with Ubuntu Server VM (Proxmox),mosquitto(docker),RFXtrx433E,zwavejsUI (docker),Zigbee2mqtt(docker),SMA Hub (docker),Harmony Hub plugin, Kodi plugin,Homebridge(docker)+Google Home,APC UPS,SMA Modbus,Mitsubishi MQTT, Broadlink,Dombus
User avatar
HansieNL
Posts: 964
Joined: Monday 28 September 2015 15:13
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz v3.10.5 beta

Post by HansieNL »

You can use Full Editor & Preview - Select the Attachments tab - Add files. You can then select the added files in your message.
Hope this will help you to be be able to post your image(s)
Blah blah blah
solarboy
Posts: 345
Joined: Thursday 01 November 2018 19:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.6
Location: Portugal
Contact:

Re: Dashticz v3.10.5 beta

Post by solarboy »

HansieNL wrote: Sunday 20 August 2023 2:02 You can use Full Editor & Preview - Select the Attachments tab - Add files. You can then select the added files in your message.
Hope this will help you to be be able to post your image(s)
Brilliant, thanks for that tip !

So the 2 graphs:

Old Dashticz gave me this result...
graph OLD.jpg
graph OLD.jpg (42.44 KiB) Viewed 2279 times
And since I upgraded the same data gives me this...
graph.jpg
graph.jpg (54.72 KiB) Viewed 2279 times
My Block is:

Code: Select all

blocks['powergraph'] = {
devices: [595,719],
title: 'x',
custom:{
  },
graph: ['line','line'],
lineFill: true,
height: '150px',
legend: false,
ylabels: ['W'],
range: 'today',
filter: '24 hours',
datasetColors: ['forestgreen','red'],
lineTension: 0.1,
maxTicksLimit: 9,
decimals: 0,
}
Which is in config.js

(originally "range" was set to 'daily' and not 'today')

I'm not sure what changed but in the new image you can see the peaks seem to be greyed out.

The data in Domoticz looks like this:

Solar (KWh), Power Use (W)
d.jpg
d.jpg (241.52 KiB) Viewed 2279 times
Intel NUC with Ubuntu Server VM (Proxmox),mosquitto(docker),RFXtrx433E,zwavejsUI (docker),Zigbee2mqtt(docker),SMA Hub (docker),Harmony Hub plugin, Kodi plugin,Homebridge(docker)+Google Home,APC UPS,SMA Modbus,Mitsubishi MQTT, Broadlink,Dombus
Lokonli
Posts: 2290
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz v3.10.5 beta

Post by Lokonli »

Since a few releases, a Domoticz energy device receives both the actual power and the hourly energy usage graph data.

That means you receive 3 or 4 datasets for your graph, since you are combining two devices.

I think you have to add a third 'dataSetColors'-element, and a third 'graph'-element.

If you set legend:true, you can see the different datasets that have been collected.
solarboy
Posts: 345
Joined: Thursday 01 November 2018 19:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.6
Location: Portugal
Contact:

Re: Dashticz v3.10.5 beta

Post by solarboy »

Lokonli wrote: Sunday 20 August 2023 20:06 Since a few releases, a Domoticz energy device receives both the actual power and the hourly energy usage graph data.

That means you receive 3 or 4 datasets for your graph, since you are combining two devices.

I think you have to add a third 'dataSetColors'-element, and a third 'graph'-element.

If you set legend:true, you can see the different datasets that have been collected.
Thank you soo much for this, I am definitely heading in the right direction. You were right ; turns out device 595 is now 2 sub-devices, "v_595" and "eu_595" so I changed the draw order and added a "grey" for the 3rd device/subdevice. However this block now covers the green area.
graphNEW.jpg
graphNEW.jpg (104.21 KiB) Viewed 2245 times

Code: Select all

blocks['powergraph'] = {
devices: [719,'595'],
title: 'x',
custom:{
  },
graph: ['line','line'],
lineFill: true,
height: '150px',
legend: true,
ylabels: ['W'],
range: 'today',
filter: '24 hours',
datasetColors: ['red','forestgreen','grey'],
lineTension: 0.4,
maxTicksLimit: 9,
decimals: 0,
}
I tried changing '595' to '595_1' but the graph would then not display with an error underneath saying "For graph powergraph device 595_1 does not exist" despite '595_1' working fine for another block where I just show the actual current value.

So I am a bit stumped on how to refer to the sub-device for the graph. Otherwise, definitely some progress !
Intel NUC with Ubuntu Server VM (Proxmox),mosquitto(docker),RFXtrx433E,zwavejsUI (docker),Zigbee2mqtt(docker),SMA Hub (docker),Harmony Hub plugin, Kodi plugin,Homebridge(docker)+Google Home,APC UPS,SMA Modbus,Mitsubishi MQTT, Broadlink,Dombus
Lokonli
Posts: 2290
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz v3.10.5 beta

Post by Lokonli »

What would you like to achieve?

With the graphTypes block parameter you can select which datasets to show.

For instance, add the following:

Code: Select all

   graphTypes: ['u', 'v'],
You have selected to fill the line graphs. You can also play with the colors and use transparant colors instead of solid colors.

Or change the draw order.

Most info can be found in the documentation:
https://dashticz.readthedocs.io/en/mast ... raphs.html

edit: Originally there was a typo in the code block above. Accidentally I typed blockTypes instead of graphTypes
Last edited by Lokonli on Tuesday 22 August 2023 18:10, edited 2 times in total.
solarboy
Posts: 345
Joined: Thursday 01 November 2018 19:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.6
Location: Portugal
Contact:

Re: Dashticz v3.10.5 beta

Post by solarboy »

Once again, thanks for your help.

My intention is to end up with something like my original graph which gives a clear visual warning of lots of imported power while also showing the amount of solar generated. At a glance it gives me and the rest of the family plenty of data to make decisions regarding power use and/or problems in the home.

I tried "blockTypes" and also "graphTypes" but to no avail. I also tried transparency but applying it only to the "eu_595" dataset also applied the style to the "v_595" dataset. I have almost got it going by colouring the unwanted "eu_595" data set the same red as "v-595" with my final Block definition being...

Code: Select all

blocks['powergraph'] = {
devices: [595,719],
title: false,
custom:{
  },
graph: ['line','line','line'],
lineFill: [false,true,true],
displayFormats: false,
height: '150px',
legend: false,
blockTypes: ['u','v'],
ylabels: ['W'],
range: 'day',
drawOrderDay: ['v_595','u_719','eu_595'],
filter: '24 hours',
datasetColors: ['forestgreen','forestgreen','red'],
lineTension: 0.4,
maxTicksLimit: 9,
decimals: 0,
}
Giving this result..
final.jpg
final.jpg (102.52 KiB) Viewed 2193 times
Which is close enough to what I wanted. You can still see the blocking of the KWh dataset rather than the smooth curve of the W dataset but it's close enough. Thanks for your pointer,s you definitely helped my find a solution. Now onwards to getting my calender working again....
Intel NUC with Ubuntu Server VM (Proxmox),mosquitto(docker),RFXtrx433E,zwavejsUI (docker),Zigbee2mqtt(docker),SMA Hub (docker),Harmony Hub plugin, Kodi plugin,Homebridge(docker)+Google Home,APC UPS,SMA Modbus,Mitsubishi MQTT, Broadlink,Dombus
Lokonli
Posts: 2290
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz v3.10.5 beta

Post by Lokonli »

It should work ...

Start with a basic graph combining a 'usage electric' and a 'general - kWh' device:

Code: Select all

blocks['gr'] = {
    devices: [1396, 6],
    type: 'graph',
    legend: true,
}
This gives:
graph1.jpg
graph1.jpg (88.73 KiB) Viewed 2175 times
As you can see, device 1396 provides dataset 'u', device 6 provides datasets 'v' and 'eu'.

Now remove the 'eu' dataset by defining graphTypes parameter (case sensitive):

Code: Select all

blocks['gr'] = {
    devices: [1396, 6],
    type: 'graph',
    legend: true,
    graphTypes: ['v','u']
}
This gives:
graph2.jpg
graph2.jpg (89.26 KiB) Viewed 2175 times
Now we can start coloring the chart area.

Code: Select all

blocks['gr'] = {
    devices: [1396, 6],
    type: 'graph',
    legend: true,
    graphTypes: ['v','u'],
    datasetColors: ['rgba(44,130,201,0.5)', 'rgba(201,130,44,0.5)'],
    lineFill: [true, true],
    drawOrderLast: ['v_6','u_1396']
}
graph3.jpg
graph3.jpg (80.12 KiB) Viewed 2175 times
I think this is what you would like to have. Enjoy :)
solarboy
Posts: 345
Joined: Thursday 01 November 2018 19:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.6
Location: Portugal
Contact:

Re: Dashticz v3.10.5 beta

Post by solarboy »

Amazing !

I adapted your block definition to the colours and transparency I wanted and added a "scales" definition so they both share the same scale which I set at my maximum utility supply of 7000W. Now it's exactly how I wanted it and I couldn't have done it without your help.

Code: Select all

blocks['powergraph'] = {
    devices: [595, 719],
    type: 'graph',
    legend: false,
    graphTypes: ['v','u'],
    datasetColors: ['rgba(0,255,0,1)', 'rgba(255,0,0,1)'],
    options: {scales: 
		{yAxes: 
			[{ticks: {min: 0,max: 7000}}, {ticks: {min: 0,max: 7000}}]
			}},
    lineFill: [true, true],
    range: 'day',
    drawOrderDay: ['v_595','u_719']
}
newer.jpg
newer.jpg (158.12 KiB) Viewed 2151 times
Pretty happy now :mrgreen:
Intel NUC with Ubuntu Server VM (Proxmox),mosquitto(docker),RFXtrx433E,zwavejsUI (docker),Zigbee2mqtt(docker),SMA Hub (docker),Harmony Hub plugin, Kodi plugin,Homebridge(docker)+Google Home,APC UPS,SMA Modbus,Mitsubishi MQTT, Broadlink,Dombus
Maikel76
Posts: 71
Joined: Friday 14 August 2020 6:34
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: Bangkok
Contact:

Re: Dashticz v3.10.5 beta

Post by Maikel76 »

Hi Edwin/Lokonli/everyone,

I added my first dial as a selector switch and dimer on the outside ring.

Code: Select all

blocks[22] = {
         //idx: 22,
         //title: 'Music',
         type: 'dial',
         values: [
           {
           idx: 177,
           value: 'level',
           last_update: true,
           isSetpoint: true
           },
         ],
         width: 6,
         showring: true,
         shownumbers: true,
         min:0,
         max: 100
 } //, icon: 'fas fa-music'}
With the isSetpoint my setting is changing device 177 (switch-dimmer) like it should
However if I change the device 177 in Domoticz, the dial ring does'nt change. Can I make that happen with some extra code in custom.js? and could you/anyone help me?
download/file.php?mode=view&id=30611

I just installed the latest and greatest Dashticz version, however I'm still on Domoticz 2022.1
Also I tried to use a RGBWW and RGBW switch but without change
Ofcourse i can use isNeedle but then I cannot change the value with the dial which is the main reason it's there
For insight, I'm changing the volume level with dzVents script according to different events
Attachments
dial.png
dial.png (35.77 KiB) Viewed 2119 times
Scripting is my passion, dzVents, LUA, Bash
Dashticz v3.10.7 Beta --Raspbian Buster
Lokonli
Posts: 2290
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz v3.10.5 beta

Post by Lokonli »

Maikel76 wrote: Friday 25 August 2023 11:42 Hi Edwin/Lokonli/everyone,

I added my first dial as a selector switch and dimer on the outside ring.

Code: Select all

blocks[22] = {
         //idx: 22,
         //title: 'Music',
         type: 'dial',
         values: [
           {
           idx: 177,
           value: 'level',
           last_update: true,
           isSetpoint: true
           },
         ],
         width: 6,
         showring: true,
         shownumbers: true,
         min:0,
         max: 100
 } //, icon: 'fas fa-music'}
With the isSetpoint my setting is changing device 177 (switch-dimmer) like it should
However if I change the device 177 in Domoticz, the dial ring does'nt change. Can I make that happen with some extra code in custom.js? and could you/anyone help me?
download/file.php?mode=view&id=30611

I just installed the latest and greatest Dashticz version, however I'm still on Domoticz 2022.1
Also I tried to use a RGBWW and RGBW switch but without change
Ofcourse i can use isNeedle but then I cannot change the value with the dial which is the main reason it's there
For insight, I'm changing the volume level with dzVents script according to different events
That seems to be bug.
I'll fix it.
Maikel76
Posts: 71
Joined: Friday 14 August 2020 6:34
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: Bangkok
Contact:

Re: Dashticz v3.10.5 beta

Post by Maikel76 »

Lokonli wrote: Sunday 27 August 2023 22:28 That seems to be bug.
I'll fix it.
Awesome, thanks a lot
Scripting is my passion, dzVents, LUA, Bash
Dashticz v3.10.7 Beta --Raspbian Buster
Maikel76
Posts: 71
Joined: Friday 14 August 2020 6:34
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: Bangkok
Contact:

Re: Dashticz v3.10.5 beta

Post by Maikel76 »

Lokonli wrote: Sunday 27 August 2023 22:28
Maikel76 wrote: Friday 25 August 2023 11:42 Hi Edwin/Lokonli/everyone,

I added my first dial as a selector switch and dimer on the outside ring.

Code: Select all

blocks[22] = {
         //idx: 22,
         //title: 'Music',
         type: 'dial',
         values: [
           {
           idx: 177,
           value: 'level',
           last_update: true,
           isSetpoint: true
           },
         ],
         width: 6,
         showring: true,
         shownumbers: true,
         min:0,
         max: 100
 } //, icon: 'fas fa-music'}
With the isSetpoint my setting is changing device 177 (switch-dimmer) like it should
However if I change the device 177 in Domoticz, the dial ring does'nt change. Can I make that happen with some extra code in custom.js? and could you/anyone help me?
download/file.php?mode=view&id=30611

I just installed the latest and greatest Dashticz version, however I'm still on Domoticz 2022.1
Also I tried to use a RGBWW and RGBW switch but without change
Ofcourse i can use isNeedle but then I cannot change the value with the dial which is the main reason it's there
For insight, I'm changing the volume level with dzVents script according to different events
That seems to be bug.
I'll fix it.
If you need any extra info please let me know Sander
Scripting is my passion, dzVents, LUA, Bash
Dashticz v3.10.7 Beta --Raspbian Buster
Lokonli
Posts: 2290
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz v3.10.5 beta

Post by Lokonli »

Thanks, not needed, I've fixed it already.

I've to do some additional testing to check there are no side effects. I'll publish a new version later this week.
Maikel76
Posts: 71
Joined: Friday 14 August 2020 6:34
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: Bangkok
Contact:

Re: Dashticz v3.10.5 beta

Post by Maikel76 »

Lokonli wrote: Wednesday 30 August 2023 14:12 Thanks, not needed, I've fixed it already.

I've to do some additional testing to check there are no side effects. I'll publish a new version later this week.
Thanks for your effort!!
Scripting is my passion, dzVents, LUA, Bash
Dashticz v3.10.7 Beta --Raspbian Buster
Lokonli
Posts: 2290
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz v3.10.5 beta

Post by Lokonli »

Maikel76 wrote: Wednesday 30 August 2023 15:59
Lokonli wrote: Wednesday 30 August 2023 14:12 Thanks, not needed, I've fixed it already.

I've to do some additional testing to check there are no side effects. I'll publish a new version later this week.
Thanks for your effort!!
Should be fixed in latest Dashticz version (3.10.8 beta)
Maikel76
Posts: 71
Joined: Friday 14 August 2020 6:34
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: Bangkok
Contact:

Re: Dashticz v3.10.5 beta

Post by Maikel76 »

Lokonli wrote: Tuesday 05 September 2023 21:17
Maikel76 wrote: Wednesday 30 August 2023 15:59
Lokonli wrote: Wednesday 30 August 2023 14:12 Thanks, not needed, I've fixed it already.

I've to do some additional testing to check there are no side effects. I'll publish a new version later this week.
Thanks for your effort!!
Should be fixed in latest Dashticz version (3.10.8 beta)
Hi Sander,
I updated to 3.10.8. Unfortunately it's not working. This is the result of;

Code: Select all

http://192.168.88.50:8099/json.htm?username=bla==&password=bla=&type=devices&rid=177

Code: Select all

ActTime	1693976510
AstrTwilightEnd	"19:38"
AstrTwilightStart	"04:55"
CivTwilightEnd	"18:48"
CivTwilightStart	"05:45"
DayLength	"12:20"
NautTwilightEnd	"19:13"
NautTwilightStart	"05:20"
ServerTime	"2023-09-06 12:01:50"
SunAtSouth	"12:16"
Sunrise	"06:06"
Sunset	"18:26"
app_version	"2022.1"
result	
0	
AddjMulti	1
AddjMulti2	1
AddjValue	0
AddjValue2	0
BatteryLevel	255
CustomImage	0
Data	"Set Level: 100 %"
Description	""
DimmerType	"abs"
Favorite	0
HardwareDisabled	false
HardwareID	4
HardwareName	"VirtualSwitches"
HardwareType	"Dummy (Does nothing, use for virtual switches only)"
HardwareTypeVal	15
HaveDimmer	true
HaveGroupCmd	true
HaveTimeout	false
ID	"00014101"
Image	"Light"
IsSubDevice	false
LastUpdate	"2023-09-06 11:55:51"
Level	100
LevelInt	100
MaxDimLevel	100
Name	"Volume"
Notifications	"false"
PlanID	"0"
PlanIDs	
0	0
Protected	false
ShowNotifications	true
SignalLevel	"-"
Status	"Set Level: 100 %"
StrParam1	""
StrParam2	""
SubType	"Switch"
SwitchType	"Dimmer"
SwitchTypeVal	7
Timers	"false"
Type	"Light/Switch"
TypeImg	"dimmer"
Unit	1
Used	1
UsedByCamera	false
XOffset	"0"
YOffset	"0"
idx	"177"
status	"OK"
title	"Devices"
If you need any more info please let me know
Scripting is my passion, dzVents, LUA, Bash
Dashticz v3.10.7 Beta --Raspbian Buster
Lokonli
Posts: 2290
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz v3.10.5 beta

Post by Lokonli »

Can you try with Level instead of level in your block definition?
Maikel76
Posts: 71
Joined: Friday 14 August 2020 6:34
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: Bangkok
Contact:

Re: Dashticz v3.10.5 beta

Post by Maikel76 »

Lokonli wrote: Wednesday 06 September 2023 17:46 Can you try with Level instead of level in your block definition?
That was the solution, once again you're the best. Thanks so much Sander!
Scripting is my passion, dzVents, LUA, Bash
Dashticz v3.10.7 Beta --Raspbian Buster
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest