Dashticz - v3.4.0 Beta

Dashticz, alternative dashboard based on HTML, CSS, jQuery

Moderators: leecollings, htilburgs, robgeerts

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

Dashticz - v3.4.0 Beta

Post by Lokonli »

I've just released Dashticz v3.4.0 Beta

Enhancements
* Websocket interface for Domoticz version > 4.11000 to receive instant device updates.
* graph and multigraph have been combined into the same graph block. Several bug fixes and enhancements.
In case you update from 3.3.5 beta: The parameter 'multigraphTypes' has been replaced by 'graphTypes'

* The News block will show the inline images. By setting the news block parameter 'showimages: false' the inline images will be hidden.

Optimizations
* Dashticz will only receive the updates for devices that changed since the previous update. This will increase responsiveness. In the previous version Dashticz received all device info at every update (default 5 second cycle).


News
Newsblock with inline images:
news.jpg
news.jpg (82.86 KiB) Viewed 2309 times
Websocket
The Websocket connection is only supported by the Domoticz development branch. If you update your Domoticz version make a backup first! The Domoticz development branch might give issues on your system, and you cannot downgrade your Domoticz database.

Websocket connection in action:
dashticz-websocket.gif
dashticz-websocket.gif (387.03 KiB) Viewed 2309 times


EDIT
The websocket connection seems to give problems on some systems. If you encounter issues, you can disable the websocket connection by adding the following to CONFIG.js:

Code: Select all

config['enable_websocket'] = 0
If the websocket connect is not working on your system, please leave a note in this topic, describing your detailed system setup for Dashticz and Domoticz.
Last edited by Lokonli on Monday 09 March 2020 20:14, 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 - v3.4.0 Beta

Post by EdwinK »

Thanks.. Updated.
graph and multigraph have been combined into the same graph block
Does this mean that we now just use 'graph_*''?
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 - v3.4.0 Beta

Post by clinkadink »

EdwinK wrote: Sunday 09 February 2020 22:49 Does this mean that we now just use 'graph_*''?
You can either use 'graph_*'' or name your own block . Examples:

Code: Select all

blocks['profit_cost'] = {	
	title: 'Profit vs Cost',
	devices: [173, 172],
	graph: 'line',
	legend: true
} 

blocks['kitchen_temp'] = {	
	title: 'Kitchen Temperature',
	devices: [22],
	graphTypes: ['te'],
	graph: 'bar',
	legend: true
} 

columns[1] = {}
columns[1]['width'] = 4;
columns[1]['blocks'] = [ 'profit_cost', 'graph_16', 'kitchen_temp']
"UI is the saddle, the stirrups, & the reins. UX is the feeling you get being able to ride the horse."
User avatar
Phantom
Posts: 87
Joined: Saturday 31 December 2016 14:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.11652
Location: The Netherlands
Contact:

Re: Dashticz - v3.4.0 Beta

Post by Phantom »

Nice update, dashboard runs pretty smooth :)
Vomera
Posts: 184
Joined: Wednesday 06 September 2017 9:11
Target OS: Linux
Domoticz version:
Contact:

Re: Dashticz - v3.4.0 Beta

Post by Vomera »

Okay i installed the latest version 3.4.0 because i updated domoticz as well to the latest beta version.

I had 3.2.0 before, and i saw something changed in custom.js language.

With the 3.2.0: There was a virtual switch button for my mailbox. If the mailbox is triggered there is a virtual switch that will go ON.

When it goes on, my dashboard there will be a button that lights up with "you have got mail"

Also a point is when dashticz loads it starts first with the text BrievenbusTimer (because i called that switch in domoticz) and after a few seconds it checks the state of the button and changes to the state "post" with red background or "geen post" with black blackground.

Image

When i open the mailbox to get my mail, there is another sensor that triggers the virtual button and will set it to off.

Image

So that are 2 things that will happen
1. The text changes
2. the color of the background changes.

In the version 3.2.0 the code looks like this

custom.js 3.2.0

Code: Select all

// Brievenbus
function getStatus_7367(idx,value,device){
	if(device['Data']=="On"){
		$('div.block_7367').addClass('warningrood');
		blocks['7367']['icon'] = 'fas fa-envelope';
		blocks['7367']['title'] = 'Post!';
		
		
	}
	
	else if(device['Data']=="Off"){
		$('div.block_7367').removeClass('warningrood');
		blocks['7367']['icon'] = 'far fa-envelope';
		blocks['7367']['title'] = 'Geen Post';
	}
}
custom.css 3.2.0

Code: Select all

.warningrood {
	background: rgba(199,44,44,1.0) !important;  
	background-clip: padding-box;	
}

So i updated to 3.4.0 and i saw the first thing i notice the state doesnt change and stays at "BrievenbusTimer" (name of the switch).

Image

I checked the wiki on https://dashticz.readthedocs.io/en/beta ... omjss.html but i can't figure out the new code. I tried to combine some codes, but doesnt work.

custom.js

Code: Select all

function getStatus_7367(idx,value,device){
	if(device['Data']=="Off"){
		$('div.block_7367').removeClass('warningrood');
		blocks['7367']['icon'] = 'far fa-envelope';
		blocks['7367']['title'] = 'Geen post!';	
	}
	
	else if(device['Data']=="On"){
		$('div.block_7367').addClass('warningrood')
		blocks['7367']['icon'] = 'fas fa-envelope';
		blocks['7367']['title'] = 'Post!!';	
	}
}
The strange thing is now when, the swich is on, this happends : (geen post = no mail)

Image

and when the switch is off (post = mail)

Image

so the oppsite happends... Can someone help me? i think more people has this problem ? ( i got this also with another button, but coded it on the same way)
Lokonli
Posts: 2291
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz - v3.4.0 Beta

Post by Lokonli »

Vomera wrote: Tuesday 11 February 2020 9:46 Okay i installed the latest version 3.4.0 because i updated domoticz as well to the latest beta version.

I had 3.2.0 before, and i saw something changed in custom.js language.

With the 3.2.0: There was a virtual switch button for my mailbox. If the mailbox is triggered there is a virtual switch that will go ON.

When it goes on, my dashboard there will be a button that lights up with "you have got mail"

Also a point is when dashticz loads it starts first with the text BrievenbusTimer (because i called that switch in domoticz) and after a few seconds it checks the state of the button and changes to the state "post" with red background or "geen post" with black blackground.

Image

When i open the mailbox to get my mail, there is another sensor that triggers the virtual button and will set it to off.

Image

So that are 2 things that will happen
1. The text changes
2. the color of the background changes.

In the version 3.2.0 the code looks like this

custom.js 3.2.0

Code: Select all

// Brievenbus
function getStatus_7367(idx,value,device){
	if(device['Data']=="On"){
		$('div.block_7367').addClass('warningrood');
		blocks['7367']['icon'] = 'fas fa-envelope';
		blocks['7367']['title'] = 'Post!';
		
		
	}
	
	else if(device['Data']=="Off"){
		$('div.block_7367').removeClass('warningrood');
		blocks['7367']['icon'] = 'far fa-envelope';
		blocks['7367']['title'] = 'Geen Post';
	}
}
custom.css 3.2.0

Code: Select all

.warningrood {
	background: rgba(199,44,44,1.0) !important;  
	background-clip: padding-box;	
}

So i updated to 3.4.0 and i saw the first thing i notice the state doesnt change and stays at "BrievenbusTimer" (name of the switch).

Image

I checked the wiki on https://dashticz.readthedocs.io/en/beta ... omjss.html but i can't figure out the new code. I tried to combine some codes, but doesnt work.

custom.js

Code: Select all

function getStatus_7367(idx,value,device){
	if(device['Data']=="Off"){
		$('div.block_7367').removeClass('warningrood');
		blocks['7367']['icon'] = 'far fa-envelope';
		blocks['7367']['title'] = 'Geen post!';	
	}
	
	else if(device['Data']=="On"){
		$('div.block_7367').addClass('warningrood')
		blocks['7367']['icon'] = 'fas fa-envelope';
		blocks['7367']['title'] = 'Post!!';	
	}
}
The strange thing is now when, the swich is on, this happends : (geen post = no mail)

Image

and when the switch is off (post = mail)

Image

so the oppsite happends... Can someone help me? i think more people has this problem ? ( i got this also with another button, but coded it on the same way)
Thanks for reporting. I'll check.
smaus
Posts: 84
Joined: Sunday 18 February 2018 9:32
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Dashticz - v3.4.0 Beta

Post by smaus »

i installed the latest version 3.4.0, but now i have a white sceen and say loading.
Lokonli
Posts: 2291
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz - v3.4.0 Beta

Post by Lokonli »

smaus wrote: Wednesday 12 February 2020 11:25 i installed the latest version 3.4.0, but now i have a white sceen and say loading.
On what kind of system do you run Dashticz?
Which browser? Which OS?
What is your Domoticz version?
Did Dashticz work before?
Does is load correctly on a PC/laptop?
Lokonli
Posts: 2291
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz - v3.4.0 Beta

Post by Lokonli »

Lokonli wrote: Tuesday 11 February 2020 11:54
Vomera wrote: Tuesday 11 February 2020 9:46 Okay i installed the latest version 3.4.0 because i updated domoticz as well to the latest beta version.


The strange thing is now when, the swich is on, this happends : (geen post = no mail)

Image

and when the switch is off (post = mail)

Image

so the oppsite happends... Can someone help me? i think more people has this problem ? ( i got this also with another button, but coded it on the same way)
Thanks for reporting. I'll check.
It's caused by the 'incremental update feature' and the order of creating blocks and calling the getStatus function.
Current order:
Device update -> block creation -> getStatus

The block definition is changed in the getStatus function with the new image, but this has no direct effect. The block is updated at the next device update, showing the new image, but then the device already changed to the new value ...

In the previous version all devices got updated every 5 seconds, so then this problem was not visible.

So I've to think of how to fix this. Probably I'll call getStatus twice. The first time before the block creation, the second time after the block creation. The call before the block creation is needed to modify the block[idx] definition. The call after the block creation is needed to modify the styling (like .addClass('warningrood');

To summarize:
It will be fixed within a few days.
There is no easy workaround.
smaus
Posts: 84
Joined: Sunday 18 February 2018 9:32
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Dashticz - v3.4.0 Beta

Post by smaus »

Lokonli wrote: Wednesday 12 February 2020 12:14
smaus wrote: Wednesday 12 February 2020 11:25 i installed the latest version 3.4.0, but now i have a white sceen and say loading.
On what kind of system do you run Dashticz?
Which browser? Which OS?
What is your Domoticz version?
Did Dashticz work before?
Does is load correctly on a PC/laptop?
On a synology
android
V4.11597
Yes i went back to a previous version this one works
Vomera
Posts: 184
Joined: Wednesday 06 September 2017 9:11
Target OS: Linux
Domoticz version:
Contact:

Re: Dashticz - v3.4.0 Beta

Post by Vomera »

Lokonli wrote: Wednesday 12 February 2020 12:30
Lokonli wrote: Tuesday 11 February 2020 11:54
Vomera wrote: Tuesday 11 February 2020 9:46 Okay i installed the latest version 3.4.0 because i updated domoticz as well to the latest beta version.


The strange thing is now when, the swich is on, this happends : (geen post = no mail)

Image

and when the switch is off (post = mail)

Image

so the oppsite happends... Can someone help me? i think more people has this problem ? ( i got this also with another button, but coded it on the same way)
Thanks for reporting. I'll check.
It's caused by the 'incremental update feature' and the order of creating blocks and calling the getStatus function.
Current order:
Device update -> block creation -> getStatus

The block definition is changed in the getStatus function with the new image, but this has no direct effect. The block is updated at the next device update, showing the new image, but then the device already changed to the new value ...

In the previous version all devices got updated every 5 seconds, so then this problem was not visible.

So I've to think of how to fix this. Probably I'll call getStatus twice. The first time before the block creation, the second time after the block creation. The call before the block creation is needed to modify the block[idx] definition. The call after the block creation is needed to modify the styling (like .addClass('warningrood');

To summarize:
It will be fixed within a few days.
There is no easy workaround.
Okay i understand it :) i was thinking i did something wrong with the code. If you have a fix you can reply and i will test it out :) In the mean time i stay at 3.2.0 version. Tnx for your effort!
sieth
Posts: 33
Joined: Wednesday 15 November 2017 19:40
Target OS: Linux
Domoticz version: 2020.2
Location: Belgium
Contact:

Re: Dashticz - v3.4.0 Beta

Post by sieth »

When using the beta 3.4.0 and defining the blocks as follows:

//Buiten Temperatuur
blocks['367_1'] = {
title: 'Buiten temperatuur',
image: 'temperatuur.png',
width: 6,
};

//Buiten vochtigheid
blocks['367_2'] = {
title: 'Buiten vochtigheid',
image: 'vochtigheid.png',
width: 6,
};

Only the first one shows. Not the second one.

Dit Is made a mistake?

Greetings and thanks in advance!
Lokonli
Posts: 2291
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz - v3.4.0 Beta

Post by Lokonli »

Vomera wrote: Wednesday 12 February 2020 14:05
Lokonli wrote: Wednesday 12 February 2020 12:30
Lokonli wrote: Tuesday 11 February 2020 11:54
Thanks for reporting. I'll check.
It's caused by the 'incremental update feature' and the order of creating blocks and calling the getStatus function.
Current order:
Device update -> block creation -> getStatus

The block definition is changed in the getStatus function with the new image, but this has no direct effect. The block is updated at the next device update, showing the new image, but then the device already changed to the new value ...

In the previous version all devices got updated every 5 seconds, so then this problem was not visible.

So I've to think of how to fix this. Probably I'll call getStatus twice. The first time before the block creation, the second time after the block creation. The call before the block creation is needed to modify the block[idx] definition. The call after the block creation is needed to modify the styling (like .addClass('warningrood');

To summarize:
It will be fixed within a few days.
There is no easy workaround.
Okay i understand it :) i was thinking i did something wrong with the code. If you have a fix you can reply and i will test it out :) In the mean time i stay at 3.2.0 version. Tnx for your effort!
Fix has been merged. Can you test?
Vomera
Posts: 184
Joined: Wednesday 06 September 2017 9:11
Target OS: Linux
Domoticz version:
Contact:

Re: Dashticz - v3.4.0 Beta

Post by Vomera »

Lokonli wrote: Wednesday 12 February 2020 22:49
Vomera wrote: Wednesday 12 February 2020 14:05
Lokonli wrote: Wednesday 12 February 2020 12:30

It's caused by the 'incremental update feature' and the order of creating blocks and calling the getStatus function.
Current order:
Device update -> block creation -> getStatus

The block definition is changed in the getStatus function with the new image, but this has no direct effect. The block is updated at the next device update, showing the new image, but then the device already changed to the new value ...

In the previous version all devices got updated every 5 seconds, so then this problem was not visible.

So I've to think of how to fix this. Probably I'll call getStatus twice. The first time before the block creation, the second time after the block creation. The call before the block creation is needed to modify the block[idx] definition. The call after the block creation is needed to modify the styling (like .addClass('warningrood');

To summarize:
It will be fixed within a few days.
There is no easy workaround.
Okay i understand it :) i was thinking i did something wrong with the code. If you have a fix you can reply and i will test it out :) In the mean time i stay at 3.2.0 version. Tnx for your effort!
Fix has been merged. Can you test?
Going to test :)

edit: IT WORKS!!! :) :D thank you!!! a bug has been fixed!

edit edit: Found maybe another bug, someone did get the problem too https://www.domoticz.com/forum/viewtopi ... 67&t=31317 about the single block graph
madradrakie
Posts: 64
Joined: Wednesday 11 September 2019 21:24
Target OS: -
Domoticz version:
Contact:

Re: Dashticz - v3.4.0 Beta

Post by madradrakie »

after the update my graphs are not working anymore. The bar is not loading. Do i have to change something?

Code: Select all

//Watermeter grafiek
blocks['graph_water'] = {
    devices: [903],	
    graph: 'bar',
    datasetColors: ['lightblue'],
    legend: true,
    displayFormats : {
    	minute: 'kk:mm',
	hour: 'D MMM',
	day: 'll',
      	week: 'ww',
      	month: 'MMM D',
   },
    options: {
        scales: {
            xAxes: [{
	   	distribution: 'series'
            }]
        },
    },
    custom : {
        "last 6 hours": {
            range: 'day',
            filter: '6 hours',
            data: {
                liter: 'd.v*100'            }
            },

	"last 10 hours": {
            range: 'day',
            filter: '10 hours',
            data: {
                liter: 'd.v*100'            }
            },


 	"last week": {
            range: 'month',
            filter: '7 days',
            data: {
                liter: 'd.v*1000'            }
            },
		
	"last month": {
            range: 'year',
            filter: '1 month',
            data: {
                liter: 'd.v*1000'            }
            }


        }
   }
Vomera
Posts: 184
Joined: Wednesday 06 September 2017 9:11
Target OS: Linux
Domoticz version:
Contact:

Re: Dashticz - v3.4.0 Beta

Post by Vomera »

madradrakie wrote: Thursday 13 February 2020 18:36 after the update my graphs are not working anymore. The bar is not loading. Do i have to change something?

Code: Select all

//Watermeter grafiek
blocks['graph_water'] = {
    devices: [903],	
    graph: 'bar',
    datasetColors: ['lightblue'],
    legend: true,
    displayFormats : {
    	minute: 'kk:mm',
	hour: 'D MMM',
	day: 'll',
      	week: 'ww',
      	month: 'MMM D',
   },
    options: {
        scales: {
            xAxes: [{
	   	distribution: 'series'
            }]
        },
    },
    custom : {
        "last 6 hours": {
            range: 'day',
            filter: '6 hours',
            data: {
                liter: 'd.v*100'            }
            },

	"last 10 hours": {
            range: 'day',
            filter: '10 hours',
            data: {
                liter: 'd.v*100'            }
            },


 	"last week": {
            range: 'month',
            filter: '7 days',
            data: {
                liter: 'd.v*1000'            }
            },
		
	"last month": {
            range: 'year',
            filter: '1 month',
            data: {
                liter: 'd.v*1000'            }
            }


        }
   }
Same issue in https://www.domoticz.com/forum/viewtopi ... 67&t=31317 ?
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 - v3.4.0 Beta

Post by clinkadink »

I have just tested this on the latest beta, and can confirm it is working (for me).

Code: Select all

blocks['lounge_office'] = {	
	title: 'Lounge vs Office',
	devices: [11, 235],
	graph: 'bar',
	legend: true
}  
Image
"UI is the saddle, the stirrups, & the reins. UX is the feeling you get being able to ride the horse."
madradrakie
Posts: 64
Joined: Wednesday 11 September 2019 21:24
Target OS: -
Domoticz version:
Contact:

Re: Dashticz - v3.4.0 Beta

Post by madradrakie »

It is working when i delete the part after custom. So probably the error is in that part because of the new release?
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 - v3.4.0 Beta

Post by clinkadink »

madradrakie wrote: Thursday 13 February 2020 19:37 It is working when i delete the part after custom. So probably the error is in that part because of the new release?
You need to update the keys in your custom data. In this beta, the key names change to include the idx. In your case, swap "v" for "v_903".

See example below (key_idx).
Spoiler: show

Code: Select all

blocks['penthouse_cinema'] = {	
	title: 'Penthouse vs Cinema',
	devices: [10, 15],
	graphTypes: ['te'],
	custom : {
        "Last hours": {
            range: 'day',
            filter: '2 hours',
            data: {                
		te1: 'd.te_10',
		te2: 'd.te_15',
		delta: 'd.te_15-d.te_10'
            },
	},
        "Last week": {
            range: 'month',
            filter: '7 days',
            data: {
                te1: 'd.te_10',
		te2: 'd.te_15',
		delta: 'd.te_15-d.te_10'
            }
        },
        "Last 3 months": {
            range: 'year',
            filter: '3 months',
            data: {
                te1: 'd.te_10',
		te2: 'd.te_15',
		delta: 'd.te_15-d.te_10'
            }
        }
	},
	legend: true
}  
"UI is the saddle, the stirrups, & the reins. UX is the feeling you get being able to ride the horse."
madradrakie
Posts: 64
Joined: Wednesday 11 September 2019 21:24
Target OS: -
Domoticz version:
Contact:

Re: Dashticz - v3.4.0 Beta

Post by madradrakie »

working again, thanks!

The only problem i still face is the following one. I have a P1 smart meter (idx 76) and solar panels (Idx 413). On the frontpage all the values are shown just as it was in the previous version.

Code: Select all

columns[2] = {}
columns[2]['blocks'] = ['currentweather_big_owm','weather_owm','930_1',112,113,'blocktitle_14','76_1','76_2','76_5','413_1','413_2','903_1','blocktitle_23','longfonds',3301,2897]
columns[2]['width'] = 5;
But on the third page, underneath the energy graph, only the values are shown from the P1 meter. Not from the solar panels anymore.

Code: Select all

columns[9] = {}
columns[9]['blocks'] = ['energie_grafiek','76_1','76_2','76_5','413_1','413_2','413_3']
columns[9]['width'] = 9;
Any idea?
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest