Page 90 of 184

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

Posted: Monday 01 May 2017 22:15
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

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

Posted: Monday 01 May 2017 22:46
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

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

Posted: Monday 01 May 2017 23:08
by robgeerts
Please show the result when finished :)

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

Posted: Tuesday 02 May 2017 7:55
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

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

Posted: Tuesday 02 May 2017 8:04
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

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

Posted: Tuesday 02 May 2017 8:30
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!

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

Posted: Tuesday 02 May 2017 8:38
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

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

Posted: Tuesday 02 May 2017 8:46
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.

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

Posted: Tuesday 02 May 2017 8:50
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 2830 times

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

Posted: Tuesday 02 May 2017 9:04
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

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

Posted: Tuesday 02 May 2017 9:12
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

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

Posted: Tuesday 02 May 2017 9:25
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.

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

Posted: Tuesday 02 May 2017 9:31
by robgeerts
First preview of color changer:

Image

Image

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

Posted: Tuesday 02 May 2017 9:32
by poudenes
robgeerts wrote:First preview of color changer:

Image

Image
:P

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

Posted: Tuesday 02 May 2017 9:33
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

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

Posted: Tuesday 02 May 2017 9:40
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 2799 times
(couldn't find a better example right now)

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

Posted: Tuesday 02 May 2017 9:46
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.

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

Posted: Tuesday 02 May 2017 10:15
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 2750 times

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

Posted: Tuesday 02 May 2017 10:20
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

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

Posted: Tuesday 02 May 2017 10:35
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?