Dashticz - General Discussions

Dashticz, alternative dashboard based on HTML, CSS, jQuery

Moderators: leecollings, htilburgs, robgeerts

Locked
User avatar
htilburgs
Posts: 464
Joined: Tuesday 03 November 2015 11:01
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Dashticz v2.0, custom positioning and multiple screens

Post by htilburgs »

HansieNL wrote:
Derik wrote:
robgeerts wrote:I've installed Dashticz outside Domoticz-folder. Every folder you can reach via your webbrowser is suitable to put Dashticz in... you dont need to run a webserver for it ;)
So there is no problem?
Please a example :-) What map and place u use..

xx
x
Just updated Domoticz beta and my Dashticz folder is still in place.
Me also, no problems
Hardware:
RPi3 - Aeon Labs Z-Stick GEN5 - Fibaro Dimmer 2 - Fibaro Roller Shutter 2 - Fibaro Smoke Sensor - Yeelight RGBW Led bulb - Yeelight Smart LED Light Strip - Neo Coolcam PIR Motion Sensor - Neo Coolcam PowerPlug - Nest Thermostat v3
Blueone
Posts: 130
Joined: Friday 29 November 2013 11:30
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz v2.0, custom positioning and multiple screens

Post by Blueone »

robgeerts wrote:NEW FUNCTION IN BETA!

Want your block to show up differently then Dashticz generates and do you have a little bit of coding skills?
Add to custom.js the following function:

Code: Select all

function getBlock_233(device,idx){ //change 233 to the idx of your device!
	$('.block_'+idx).attr('onclick','switchDevice(this)');
	var html='';
	html+='<div class="col-xs-4 col-icon">';
		if(device['Status']=='Off') html+=iconORimage(idx,'fa-toggle-off','','off icon');
		else html+=iconORimage(idx,'fa-toggle-on','','on icon');
	html+='</div>';
	html+='<div class="col-xs-8 col-data">';
	html+='<strong class="title">'+device['Name']+'</strong><br />';
	if(device['Status']=='Off') html+='<span class="state">AFWEZIG</span>';
	else html+='<span class="state">AANWEZIG</span>';

	if(_SHOW_LASTUPDATE) html+='<br /><span class="lastupdate">'+moment(device['LastUpdate']).format(_LASTUPDATE_FORMAT)+'</span>';
	html+='</div>';
	return html;
}
Change '233' in the function-name to the idx of your device!
This is a sample-function, you can do whatever you want inside this function.

In the show your dashboard topic you can show what you've created. If it may usefull for other users to, I can include it in the core of Dashticz!

Thanks! Now I can create something for the burner state based on a other switch
robgeerts
Posts: 1273
Joined: Saturday 24 January 2015 22:12
Target OS: NAS (Synology & others)
Domoticz version: 3.7067
Location: NL
Contact:

Re: Dashticz v2.0, custom positioning and multiple screens

Post by robgeerts »

Please show the result when finished :)
Teunissm
Posts: 19
Joined: Sunday 22 March 2015 20:50
Target OS: Raspberry Pi / ODroid
Domoticz version: V3.5858
Location: Nederland
Contact:

Re: Dashticz v2.0, custom positioning and multiple screens

Post by Teunissm »

Hello, what a great dasboard is this.
I almost bot it set up. There is only one question.
Is it possible to set up rgb Lights like hue or mi-light and Control also the colors, now i only can turn the lights on or of and the dim slider works.

Really a Great job on this dasboard, Thanx.
Marcel
User avatar
HansieNL
Posts: 964
Joined: Monday 28 September 2015 15:13
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz v2.0, custom positioning and multiple screens

Post by HansieNL »

Teunissm wrote: Is it possible to set up rgb Lights like hue or mi-light and Control also the colors, now i only can turn the lights on or of and the dim slider works.
Not yet. It's on the todo list https://github.com/robgeerts/dashticz_v2/issues/3
Blah blah blah
bsmeding
Posts: 34
Joined: Tuesday 28 October 2014 18:29
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz v2.0, custom positioning and multiple screens

Post by bsmeding »

robgeerts wrote:NEW FUNCTION IN BETA!

Want your block to show up differently then Dashticz generates and do you have a little bit of coding skills?
Add to custom.js the following function:

Code: Select all

function getBlock_233(device,idx){ //change 233 to the idx of your device!
	$('.block_'+idx).attr('onclick','switchDevice(this)');
	var html='';
	html+='<div class="col-xs-4 col-icon">';
		if(device['Status']=='Off') html+=iconORimage(idx,'fa-toggle-off','','off icon');
		else html+=iconORimage(idx,'fa-toggle-on','','on icon');
	html+='</div>';
	html+='<div class="col-xs-8 col-data">';
	html+='<strong class="title">'+device['Name']+'</strong><br />';
	if(device['Status']=='Off') html+='<span class="state">AFWEZIG</span>';
	else html+='<span class="state">AANWEZIG</span>';

	if(_SHOW_LASTUPDATE) html+='<br /><span class="lastupdate">'+moment(device['LastUpdate']).format(_LASTUPDATE_FORMAT)+'</span>';
	html+='</div>';
	return html;
}
Change '233' in the function-name to the idx of your device!
This is a sample-function, you can do whatever you want inside this function.

In the show your dashboard topic you can show what you've created. If it may usefull for other users to, I can include it in the core of Dashticz!

That would be great, then it would also be possible to only show the status of a switch without name or time last changed?
Because i would like to use a 1-column row with the status of devices on- or offline in the network and also a 1-column for the status of door- and window state. Therefor the text and padding needs to be smaller.

Will try this in beta, thanks for this very nice dashboard!
woody4165
Posts: 476
Joined: Monday 14 March 2016 13:55
Target OS: Linux
Domoticz version: beta
Location: Rome, Italy
Contact:

Re: Dashticz v2.0, custom positioning and multiple screens

Post by woody4165 »

Hi all.
Fantastic dashboard, easy to customize.

Some questions:
I just updated my Domoticz beta via CLI and the Dashticz folder in www is still there. I have read in the github page that www folder should be overwritten losing that folder. Does it happen only when updating via Web interface?

I have some temperature block, but I would like to show only temp and no humidity. In this case I can't activate the temp graph. Is there a way to show it up?

I have an OWL to measure electricity consumption, it shows in dashticz current_now, current_today and total, but no graph. Is it possibile to how them up?

Thanks
Cubietruck - Linux cubietruck 4.13.16 (Debian GNU/Linux 8 (jessie)) + Domoticz + RFLink, Xiaomi Gateway, Owl USB, Yeelight Color and B/W, ESP8266, Broadlink RM2, Netatmo Thermostat
robgeerts
Posts: 1273
Joined: Saturday 24 January 2015 22:12
Target OS: NAS (Synology & others)
Domoticz version: 3.7067
Location: NL
Contact:

Re: Dashticz v2.0, custom positioning and multiple screens

Post by robgeerts »

Just merged the beta with the master, so that one is up-to-date too.
Fixes can be found here: https://github.com/robgeerts/dashticz_v ... s%3Aclosed

Now I'm going to work on the RGB-slider for Hue/Mi-light lamps in BETA.
Last edited by robgeerts on Tuesday 02 May 2017 8:59, edited 1 time in total.
bsmeding
Posts: 34
Joined: Tuesday 28 October 2014 18:29
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz v2.0, custom positioning and multiple screens

Post by bsmeding »

bsmeding wrote: That would be great, then it would also be possible to only show the status of a switch without name or time last changed?
Because i would like to use a 1-column row with the status of devices on- or offline in the network and also a 1-column for the status of door- and window state. Therefor the text and padding needs to be smaller.

Will try this in beta, thanks for this very nice dashboard!

Just tested this code in beta and it does exactly what i need! Thanks Rob!
Schermafbeelding 2017-05-02 om 08.47.50.png
Schermafbeelding 2017-05-02 om 08.47.50.png (30.65 KiB) Viewed 2832 times
bsmeding
Posts: 34
Joined: Tuesday 28 October 2014 18:29
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz v2.0, custom positioning and multiple screens

Post by bsmeding »

custom file change request

is it possible to separate the CONFIG.js file from the real configuration settings and a new file for the block, column and screen layout? (layout.js maybe? )

This because I use the master and beta branch both a lot now, and it would be easier when i only have to create the block layout once for both (create symbolic link between master and beta folder) and the custom.js setting can be changed when by an update with new functions
poudenes
Posts: 667
Joined: Wednesday 08 March 2017 9:42
Target OS: Linux
Domoticz version: 3.8993
Location: Amsterdam
Contact:

Re: Dashticz v2.0, custom positioning and multiple screens

Post by poudenes »

robgeerts wrote:
mvveelen wrote: Could the weatherforecast-icons be replaced by the skycons you see here: http://darkskyapp.github.io/skycons/ ? Gives the dashboard some 'action' :)
Is now available in the beta-version!
The weather icons are COOL
RPi3 B+, Debain Stretch, Domoticz, Homebridge, Dashticz, RFLink, Milight, Z-Wave, Fibaro, Nanoleaf, Nest, Harmony Hub, Now try to understand pass2php
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 v2.0, custom positioning and multiple screens

Post by EdwinK »

woody4165 wrote:Hi all.
Fantastic dashboard, easy to customize.

Some questions:
I just updated my Domoticz beta via CLI and the Dashticz folder in www is still there. I have read in the github page that www folder should be overwritten losing that folder. Does it happen only when updating via Web interface?
Perhaps something changed in the way how Domoticz updates. Maybe ignoring the www folder.
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
robgeerts
Posts: 1273
Joined: Saturday 24 January 2015 22:12
Target OS: NAS (Synology & others)
Domoticz version: 3.7067
Location: NL
Contact:

Re: Dashticz v2.0, custom positioning and multiple screens

Post by robgeerts »

First preview of color changer:

Image

Image
poudenes
Posts: 667
Joined: Wednesday 08 March 2017 9:42
Target OS: Linux
Domoticz version: 3.8993
Location: Amsterdam
Contact:

Re: Dashticz v2.0, custom positioning and multiple screens

Post by poudenes »

robgeerts wrote:First preview of color changer:

Image

Image
:P
RPi3 B+, Debain Stretch, Domoticz, Homebridge, Dashticz, RFLink, Milight, Z-Wave, Fibaro, Nanoleaf, Nest, Harmony Hub, Now try to understand pass2php
woody4165
Posts: 476
Joined: Monday 14 March 2016 13:55
Target OS: Linux
Domoticz version: beta
Location: Rome, Italy
Contact:

Re: Dashticz v2.0, custom positioning and multiple screens

Post by woody4165 »

Another question about calendar events

I see that I need to use crossorigin.me before the calendar ics url.

What about privacy policy of this service, since I'm providing a private calendar url ?

I haven't found anything on their website?


Thanks
Last edited by woody4165 on Tuesday 02 May 2017 10:07, edited 3 times in total.
Cubietruck - Linux cubietruck 4.13.16 (Debian GNU/Linux 8 (jessie)) + Domoticz + RFLink, Xiaomi Gateway, Owl USB, Yeelight Color and B/W, ESP8266, Broadlink RM2, Netatmo Thermostat
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 v2.0, custom positioning and multiple screens

Post by EdwinK »

robgeerts wrote:First preview of color changer:

Image

Image
Looks neat, although I'm not very fond of this kind of color-things. I would prefer something like this
Screen Shot 2017-05-02 at 09.38.41.png
Screen Shot 2017-05-02 at 09.38.41.png (18.18 KiB) Viewed 2801 times
(couldn't find a better example right now)
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
robgeerts
Posts: 1273
Joined: Saturday 24 January 2015 22:12
Target OS: NAS (Synology & others)
Domoticz version: 3.7067
Location: NL
Contact:

Re: Dashticz v2.0, custom positioning and multiple screens

Post by robgeerts »

I think you must have the possibility to change to EVERY color you want.
Although, it will be possible to predefine colors you use the most in config.js.
Blueone
Posts: 130
Joined: Friday 29 November 2013 11:30
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz v2.0, custom positioning and multiple screens

Post by Blueone »

robgeerts wrote:Please show the result when finished :)
Oke, almost done (only have to create the icons)

I use the OTGW so I have a switch active when the Central heating is active and a switch when the Hot Water is active (The boiler gives a higher priority to the Hot Water), so when both are active the icon for the hot water have to be shown. This is my custom.js at the moment (copied the setpoint code from main.js and added some icon code, just a few lines needed.

Code: Select all

//add custom javascript in here
function afterGetDevices(){

}


function getBlock_628(device,idx){ //Setpoint block
	//CHstate = getDevicestatus(224)
	//DHWstate = getDevicestatus(225)
	
	//debug with dummy devices
	CHstate = getDevicestatus(631)
	DHWstate = getDevicestatus(632)
	console.log('CHstate: ' + CHstate)
	console.log('DHWstate: ' + DHWstate)
	
	
    $('.block_'+idx).attr('onclick','switchDevice(this)');
    var html='';
    html+=iconORimage(idx+'_1','','heating.png','on icon','style="max-height:35px;"');
		html+='<div class="col-xs-8 col-data">';
			if(typeof(blocks[idx])!=='undefined' && typeof(blocks[idx]['switch'])!=='undefined' && blocks[idx]['switch']==true){
				html+='<strong class="title">'+device['Name']+'</strong><br />';
				html+='<span class="state">'+device['Data']+_TEMP_SYMBOL+'</span>';

			}
			else {
				html+='<strong class="title">'+device['Data']+_TEMP_SYMBOL+'</strong><br />';
				html+='<span class="state">'+device['Name']+'</span>';
			}
			if(_SHOW_LASTUPDATE && (typeof(blocks[idx])=='undefined' || typeof(blocks[idx]['hide_lastupdate'])=='undefined' || blocks[idx]['hide_lastupdate']===false)){
				html+='<br /><span class="lastupdate">'+moment(device['LastUpdate']).format(_LASTUPDATE_FORMAT)+'</span>';
			}
		html+='</div>';

		$('div.block_'+idx+'_1').html(html);
		addHTML=false;

		html='';
		var random = getRandomInt(1,100000);
		html+='<ul class="col-thermostat input-groupBtn">';
		  html+='<li class="up"><a href="javascript:void(0)" class="btn btn-number plus" data-type="plus" data-field="quant['+device['idx']+']" onclick="this.blur();">';
					html+='<em class="fa fa-plus fa-small fa-thermostat"></em>';
				html+='</a></li>';
		  html+='<li class="down"><a href="javascript:void(0)" class="btn btn-number min" data-type="minus" data-field="quant['+device['idx']+']" onclick="this.blur();">';
		  html+='<em class="fa fa-minus fa-small fa-thermostat"></em>';
				html+='</a></li>';
		html+='</ul>';
		
		
		//Extra code for dynamic Icons
		if(DHWstate == 'On') {
		html+=iconORimage(idx+'_2','','Hot_Water.png','on icon iconheating','','2');
		}
		else if(CHstate == 'On') {
		html+=iconORimage(idx+'_2','','CHActive.png','on icon iconheating','','2');
		}
		else {
		html+=iconORimage(idx+'_2','','heating.png','on icon iconheating','','2');
		}
		
		html+='<div class="col-xs-8 col-data">';
			html+='<strong class="title input-number title-input" min="12" max="25" data-light="'+device['idx']+'">'+device['Data']+_TEMP_SYMBOL+'</strong>';
			html+='<div class="state stateheating">'+device['Name']+'</div>';

		html+='</div>';

		$('div.block_'+idx+'_2').addClass('thermostat'+random).html(html);
		$('div.block_'+idx).addClass('thermostat'+random).html(html);
		addHTML=false;

		addThermostatFunctions('.thermostat'+random);
    return html;
}


function getExtendedBlockTypes(blocktypes){
	//blocktypes.Type['Lighting 2'] = { icon: 'fa fa-lightbulb-o', title: '<Name>', value: 'ds' }
	return blocktypes;
}



function getDevicestatus(idx){									
					for(r in data.result){
						
						var device = data.result[r];
					
						if(device['idx'] == idx){
							return (device['Status'])
						}				
					}				
}
Maybe you can use something like this for the color picker:
2017-05-02 10_17_31-iconnecthue color - Google zoeken.png
2017-05-02 10_17_31-iconnecthue color - Google zoeken.png (117.13 KiB) Viewed 2752 times
Last edited by Blueone on Tuesday 02 May 2017 10:41, edited 1 time in total.
SuperMouse
Posts: 30
Joined: Sunday 09 April 2017 11:14
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz v2.0, custom positioning and multiple screens

Post by SuperMouse »

bsmeding wrote:
bsmeding wrote: That would be great, then it would also be possible to only show the status of a switch without name or time last changed?
Because i would like to use a 1-column row with the status of devices on- or offline in the network and also a 1-column for the status of door- and window state. Therefor the text and padding needs to be smaller.

Will try this in beta, thanks for this very nice dashboard!

Just tested this code in beta and it does exactly what i need! Thanks Rob!

Schermafbeelding 2017-05-02 om 08.47.50.png
bsmeding,

Can you show me the custom.js ?

And maybe show the complete screen in :
Show your Dashticz v2.0 and how-to's!
https://www.domoticz.com/forum/viewtopi ... =8&t=17242
poudenes
Posts: 667
Joined: Wednesday 08 March 2017 9:42
Target OS: Linux
Domoticz version: 3.8993
Location: Amsterdam
Contact:

Re: Dashticz v2.0, custom positioning and multiple screens

Post by poudenes »

mvveelen wrote: Confirmed. We wait patiently for a fix. Rob is probably enjoying the weekend, as he should :)

As for the size of the text of the headers / calendar titles, would be nice if this could be resizable with a setting in CONFIG.js and maybe make it an option to have a title or not. As far as I'm concerned, I'd rather have the calendars merged, but maybe I'm over-asking :mrgreen:

About the afvalwijzer - add-on: could this script be altered so that the switch isn't a 'selectable' switch anymore, but a text-switch? Now, you can select from the drop-down-menu, and it would be nicer if this wasn't selectable, but just a simple value: 'GFT', or 'Restafval', or 'Plastic', etc. Just my 2 cents.
I'm using now the iCal function and see something strange. I have multiple items on 1 day. Its only showing the 1st item on a day and then select the next one on other day etc. Does the script not supporting multiple agenda items on same day?
RPi3 B+, Debain Stretch, Domoticz, Homebridge, Dashticz, RFLink, Milight, Z-Wave, Fibaro, Nanoleaf, Nest, Harmony Hub, Now try to understand pass2php
Locked

Who is online

Users browsing this forum: No registered users and 1 guest