Page 22 of 51

Re: Dashticz - Show your dashboard and how-to's!

Posted: Monday 30 July 2018 13:50
by tycho28
This is my dashboard.
Image

I've a small tablet (got it free) which I 'mounted' on a pallet on the wall. The dashboard on the tablet is a older version, the picture above is the correct one :)
Image

Config.js
Spoiler: show

Code: Select all

var config = {}
config['language'] = 'nl_NL';
config['domoticz_ip'] = 'http://192.168.0.2:8081';
config['app_title'] = 'Breda';
config['domoticz_refresh'] = '60';
config['dashticz_refresh'] = '60';
config['auto_positioning'] = 0;
config['timeformat'] = 'DD-MM-YY HH:mm';
config['calendarformat'] = 'dd D MMM HH:mm';
config['calendarlanguage'] = 'nl_NL';
config['wu_api'] = 'xxx';
config['wu_city'] = 'Breda';
config['wu_name'] = '';
config['wu_country'] = 'NL';
config['hide_topbar'] = 1;

var publictransport = {}
publictransport.ovinfotrain= { station: 'station-breda', show_lastupdate:true, provider: '9292-train', icon: 'train', results: 5 };

var calendars = {}
calendars.private = { maxitems: 5, icalurl: 'https://calendar.google.com/calendar/xxx/basic.ics' }

/* BLOCKS CONFIGURATION */
var blocks = {}
blocks['bt_1'] = {}
blocks['bt_1']['type'] = 'blocktitle';
blocks['bt_1']['title'] = 'Verlichting';
blocks['bt_2'] = {}
blocks['bt_2']['type'] = 'blocktitle';
blocks['bt_2']['title'] = 'Temperatuur';
blocks['bt_3'] = {}
blocks['bt_3']['type'] = 'blocktitle';
blocks['bt_3']['title'] = 'Stroom';
blocks['bt_4'] = {}
blocks['bt_4']['type'] = 'blocktitle';
blocks['bt_4']['title'] = 'Status';

//Voordeur
blocks[8380] = {};
blocks[8380]['title'] = 'Voordeur';
blocks[8380]['show_lastupdate'] = false;
blocks[8380]['width'] = 6

//Balkondeur
blocks[8385] = {}; 
blocks[8385]['title'] = 'Balkondeur';
blocks[8385]['show_lastupdate'] = false;
blocks[8385]['width'] = 6

//Keukenraam
blocks[8382] = {}; 
blocks[8382]['title'] = 'Keukenraam';
blocks[8382]['show_lastupdate'] = false;
blocks[8382]['width'] = 6

//Slaapkamerraam 1
blocks[8391] = {}; 
blocks[8391]['title'] = 'Slaapkamer gallerij';
blocks[8391]['show_lastupdate'] = false;
blocks[8391]['width'] = 6

//Slaapkamerraam 2
blocks[8389] = {}; 
blocks[8389]['title'] = 'Slaapkamer balkon';
blocks[8389]['show_lastupdate'] = false;
blocks[8389]['width'] = 6

//Woonkamerraam
blocks[8387] = {}; 
blocks[8387]['title'] = 'Woonkamer';
blocks[8387]['show_lastupdate'] = false; 
blocks[8387]['width'] = 6

//* TEMPERATUUR *//
blocks['1389_1'] = {};
blocks['1389_1']['title'] = 'Woonkamer';
blocks['1389_1']['switch'] = true;

blocks['1833_1'] = {};
blocks['1833_1']['title'] = 'Slaapkamer';
blocks['1833_1']['switch'] = true;

blocks['1834_1'] = {};
blocks['1834_1']['title'] = 'Badkamer';
blocks['1834_1']['switch'] = true;

blocks[7208] = {};
blocks[7208]['title'] = 'Hal';
blocks[7208]['switch'] = true;

blocks[8368] = {};
blocks[8368]['title'] = 'Keuken';
blocks[8368]['switch'] = true;

blocks['6649_1'] = {};
blocks['6649_1']['title'] = 'Buiten';
blocks['6649_1']['switch'] = true;

//* STROOM *//

//Vaatwasser
blocks['8394_1'] = {};
blocks['8394_1']['title'] = 'Vaatwasser';
blocks['8394_1']['icon'] = 'fa-bolt';

//Wasmachine
blocks['8398_1'] = {};
blocks['8398_1']['title'] = 'Wasmachine';
blocks['8398_1']['icon'] = 'fa-bolt';

//Koelkast
blocks['8396_1'] = {};
blocks['8396_1']['title'] = 'Koelkast';
blocks['8396_1']['icon'] = 'fa-bolt';

//Gas
blocks['8405_1'] = {};
blocks['8405_1']['title'] = 'Gas';

//* VERLICHTING *//

//Sfeerverlichting Kast
blocks[82] = {}; 
blocks[82]['title'] = 'Kastverlichting';
blocks[82]['show_lastupdate'] = false;
blocks[82]['width'] = 4

//Sfeerverlichting pallet
blocks[83] = {}; 
blocks[83]['title'] = 'Pallet';
blocks[83]['show_lastupdate'] = false;
blocks[83]['width'] = 4

//Woonkamer bol
blocks[6576] = {}; 
blocks[6576]['title'] = 'Bol';
blocks[6576]['show_lastupdate'] = false;
blocks[6576]['width'] = 4

//Studiekamer
blocks[8330] = {}; 
blocks[8330]['title'] = 'Computer';
blocks[8330]['show_lastupdate'] = false;
blocks[8330]['width'] = 4

//Eettafel
blocks[8322] = {}; 
blocks[8322]['title'] = 'Eettafel';
blocks[8322]['show_lastupdate'] = false;
blocks[8322]['width'] = 4

//Woonkamer lamp
blocks[7207] = {}; 
blocks[7207]['title'] = 'Staande lamp';
blocks[7207]['show_lastupdate'] = false;
blocks[7207]['width'] = 12

//Woonkamer spot
blocks[8409] = {}; 
blocks[8409]['title'] = 'WK spots';
blocks[8409]['show_lastupdate'] = false;
blocks[8409]['width'] = 4

//Slaapkamer 1
blocks[8325] = {}; 
blocks[8325]['title'] = 'Slaapkamer gallerij';
blocks[8325]['show_lastupdate'] = false;
blocks[8325]['width'] = 4

//* Scenes *//

//Slaapkamer 2
blocks[8327] = {}; 
blocks[8327]['title'] = 'Slaapkamer balkon';
blocks[8327]['show_lastupdate'] = false;
blocks[8327]['width'] = 4

//Scene TV kijken
blocks['s2'] = {}; 
blocks['s2']['title'] = 'TV Kijken';
blocks['s2']['show_lastupdate'] = false;
blocks['s2']['width'] = 4
blocks['s2']['hide_data'] = true

//Scene alles uit
blocks['s3'] = {}; 
blocks['s3']['title'] = 'Alles uit';
blocks['s3']['show_lastupdate'] = false;
blocks['s3']['width'] = 4
blocks['s3']['hide_data'] = true

//* STROOM *//
//Energieverbruik_1
blocks['8403_1'] = {}; 
blocks['8403_1']['title'] = 'Huidig verbruik';

//Energieverbruik_2
blocks['8403_2'] = {}; 
blocks['8403_2']['title'] = 'Totaal vandaag';

//* STATUS DEVICES *//
//PC
blocks[1828] = {}; 
blocks[1828]['title'] = 'PC';
blocks[1828]['show_lastupdate'] = false;
blocks[1828]['width'] = 4
blocks[1828]['hide_data'] = true
blocks[1828]['icon'] = 'fa-circle'

//TV Woonkamer
blocks[8416] = {}; 
blocks[8416]['title'] = 'TV WK';
blocks[8416]['show_lastupdate'] = false;
blocks[8416]['width'] = 4
blocks[8416]['hide_data'] = true
blocks[8416]['icon'] = 'fa-circle'
blocks[8416]['protected'] = true

//TV Slaapkamer
blocks[1824] = {}; 
blocks[1824]['title'] = 'TV SK';
blocks[1824]['show_lastupdate'] = false;
blocks[1824]['width'] = 4
blocks[1824]['hide_data'] = true
blocks[1824]['icon'] = 'fa-circle'
blocks[1824]['protected'] = true

//ATV Woonkamer
blocks[8841] = {}; 
blocks[8841]['title'] = 'ATV WK';
blocks[8841]['show_lastupdate'] = false;
blocks[8841]['width'] = 4
blocks[8841]['hide_data'] = true
blocks[8841]['icon'] = 'fa-circle'
blocks[8841]['protected'] = true

//ATV Slaapkamer
blocks[1827] = {}; 
blocks[1827]['title'] = 'ATV SK';
blocks[1827]['show_lastupdate'] = false;
blocks[1827]['width'] = 4
blocks[1827]['hide_data'] = true
blocks[1827]['icon'] = 'fa-circle'
blocks[1827]['protected'] = true

//Philips Soundsystem
blocks[6517] = {}; 
blocks[6517]['title'] = 'Philips HTB';
blocks[6517]['show_lastupdate'] = false;
blocks[6517]['width'] = 4
blocks[6517]['hide_data'] = true
blocks[6517]['icon'] = 'fa-circle'
blocks[6517]['protected'] = true

//Printer
blocks[8839] = {}; 
blocks[8839]['title'] = 'Printer';
blocks[8839]['show_lastupdate'] = false;
blocks[8839]['width'] = 4
blocks[8839]['hide_data'] = true
blocks[8839]['icon'] = 'fa-circle'
blocks[8839]['protected'] = true

//Vaatwasser
blocks[8421] = {}; 
blocks[8421]['title'] = 'Vaatwasser';
blocks[8421]['show_lastupdate'] = false;
blocks[8421]['width'] = 4
blocks[8421]['hide_data'] = true
blocks[8421]['icon'] = 'fa-circle'
blocks[8421]['protected'] = true

//Wasmachine
blocks[8420] = {}; 
blocks[8420]['title'] = 'Wasmachine';
blocks[8420]['show_lastupdate'] = false;
blocks[8420]['width'] = 4
blocks[8420]['hide_data'] = true
blocks[8420]['icon'] = 'fa-circle'
blocks[8420]['protected'] = true

//Koelkast
blocks[8393] = {}; 
blocks[8393]['title'] = 'Koelkast';
blocks[8393]['show_lastupdate'] = false;
blocks[8393]['width'] = 4
blocks[8393]['hide_data'] = true
blocks[8393]['icon'] = 'fa-circle'
blocks[8393]['protected'] = true

//Xiaomi Gateway
blocks[8869] = {}; 
blocks[8869]['title'] = 'Xiaomi';
blocks[8869]['show_lastupdate'] = false;
blocks[8869]['width'] = 4
blocks[8869]['hide_data'] = true
blocks[8869]['icon'] = 'fa-circle'
blocks[8869]['protected'] = true

//Android Tablet
blocks[8868] = {}; 
blocks[8868]['title'] = 'Tablet lader';
blocks[8868]['show_lastupdate'] = false;
blocks[8868]['width'] = 4
blocks[8868]['hide_data'] = true
blocks[8868]['icon'] = 'fa-circle'
blocks[8868]['protected'] = true

//Android Batterij
blocks[8867] = {}; 
blocks[8867]['title'] = 'Android Tablet';
blocks[8867]['show_lastupdate'] = false;
blocks[8867]['width'] = 6
blocks[8867]['protected'] = true
blocks[8867]['icon'] = 'fa-percent'

/* IEMAND THUIS */
//Tycho
blocks[1825] = {};
blocks[1825]['title'] = 'Tycho';
blocks[1825]['icon'] = 'fa-male';
blocks[1825]['width'] = 6;
blocks[1825]['hide_data'] = true


/* COLUMN CONFIGURATION */
var columns = {}
columns['bar'] = {};
columns['bar']['blocks'] = ['sunrise','miniclock','settings'];
					
columns[1] = {};
columns[1]['blocks'] = ['clock','sunrise',publictransport.ovinfotrain,8380,8385,8382,8391,8389,8387,1825,8867];
columns[1]['width'] = 3;

columns[2] = {};
columns[2]['blocks'] = ['bt_1',8409,8322,8330,83,82,6576,'s3','s2',calendars.private,'bt_4',1828,8839,8869,8416,6517,8841,1824,1827,8868,8393,8421,8420];
columns[2]['width'] = 5; 

columns[3] = {};
columns[3]['blocks'] = ['bt_2','weather','1389_1','1833_1','1834_1',7208,8368,'6649_1','bt_3','8403_1','8403_2','8396_1','8398_1','8394_1','8405_1'];
columns[3]['width'] = 4; 

var columns_standby = {}
columns_standby[1] = {}
columns_standby[1]['blocks'] = ['clock','weather', 'currentweather_big']
columns_standby[1]['width'] = 12;
Custom.css
Spoiler: show

Code: Select all

/*
CUSTOM CSS FILE
*/

/* Titles */

div.mh.titlegroups h1, h2, h3, h4, h5, h6 {
font-family: -apple-system, BlinkMacSystemFont, 
"Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", 
"Fira Sans", "Droid Sans", "Helvetica Neue", 
sans-serif;
font-weight: medium;
font-style: normal;
font-size: 17pt;
letter-spacing: 0.5pt;
margin: 0px;
margin-left: 15px;
padding-top:0px;
height: auto !important;	/* default height=75px */
}

/* Blocks*/

.transbg.col-xs-1,
.transbg.col-xs-2,
.transbg.col-xs-4,
.transbg.col-xs-4,
.transbg.col-xs-5,
.transbg.col-xs-6,
.transbg.col-xs-7,
.transbg.col-xs-8,
.transbg.col-xs-9,
.transbg.col-xs-10,
.transbg.col-xs-11,
.transbg.col-xs-12 {
	padding-top:10px;
	padding-bottom:10px;
	border: 2px solid rgba(255,255,255,0);		/* border: 7px -> 3px - Smaller space between blocks */
	background: rgba(0,0,0,0.2);				
	background-clip: padding-box;
	border-radius: 8px;
}
.fa,.wi {
   font-size:24px !important;
}
.fa.fa-train { 
    font-size:18px !important;
}
.fa.fa-unlock.on.icon,
.fa.fa-lightbulb-o.on {
    color:#F1C300;
}
.fa.fa-lock.off.icon,
.fa.fa-lightbulb-o.off {
	color:#fff;
}


/*Toggle*/
.fa.fa-toggle-on.icon{
	color:#4bd961;
	opacity: 1 !important;
}
.fa.fa-toggle-off.icon{
	color:#fff;
	opacity: 0.5 !important;
}

/*Circle*/
.fa.fa-circle.on {
	color:#4bd961;
	font-size:15px !important;
	opacity: 1 !important;
}
.fa.fa-circle.off {
	color:#ff0000;
	font-size:15px !important;
	opacity: 1 !important;
}

.lastupdate {
	display: none;
}
.fa.fa-male.on {
	color:#F1C300
}

/*Status*/
.block_1828.transbg.col-xs-4,
.block_8839.transbg.col-xs-4,
.block_8416.transbg.col-xs-4,
.block_6517.transbg.col-xs-4,
.block_8841.transbg.col-xs-4,
.block_1824.transbg.col-xs-4,
.block_1827.transbg.col-xs-4,
.block_8393.transbg.col-xs-4,
.block_8421.transbg.col-xs-4,
.block_8420.transbg.col-xs-4,
.block_8868.transbg.col-xs-4,
.block_8869.transbg.col-xs-4 {
	height: 34px;
	padding-top:7px;
	padding-bottom:1px;
}

/*Temperatuur*/
.block_1389_1.transbg.col-xs-4,
.block_1833_1.transbg.col-xs-4,
.block_1834_1.transbg.col-xs-4,
.block_7208.transbg.col-xs-4,
.block_8368.transbg.col-xs-4,
.block_6649_1.transbg.col-xs-4 {
	height: 50px;
	padding-top:7px;
	padding-bottom:1px;
}

/*Verlichting*/
.block_8409.transbg.col-xs-4,
.block_8322.transbg.col-xs-4,
.block_8330.transbg.col-xs-4,
.block_83.transbg.col-xs-4,
.block_82.transbg.col-xs-4,
.block_6576.transbg.col-xs-4,
.block_s2.transbg.col-xs-4,
.block_s3.transbg.col-xs-4 {
	height: 50px;
	padding-top:7px;
	padding-bottom:1px;
}

/*Stroom*/
.block_8403_1.transbg.col-xs-4,
.block_8403_2.transbg.col-xs-4,
.block_8396_1.transbg.col-xs-4,
.block_8398_1.transbg.col-xs-4,
.block_8394_1.transbg.col-xs-4,
.block_8405_1.transbg.col-xs-4 {
	height: 60px;
	padding-top:7px;
	padding-bottom:1px;
}
/*Sensoren deur/raam + scene*/
.block_8380.transbg.col-xs-6,
.block_8385.transbg.col-xs-6,
.block_8382.transbg.col-xs-6,
.block_8391.transbg.col-xs-6,
.block_8389.transbg.col-xs-6,
.block_8387.transbg.col-xs-6,
.block_s3.transbg.col-xs-6 {
	height: 70px;
	padding-top:7px;
	padding-bottom:1px;
}
/*Tycho + Android Tablet*/
.block_8867.transbg.col-xs-6,
.block_1825.transbg.col-xs-6 {
	height: 50px;
	padding-top:7px;
	padding-bottom:1px;
}

div.mh.titlegroups {
	height: 40px !important;		/* default height=75px */
	padding-top: 2px;			/* center text for new height */
}
div.mh h3 {
	padding-top: 1px;
}

/*Warning*/
.warning {
   background: rgba(199,44,44,0.3) !important;
    background-clip: padding-box;
}

.warningblue {
   background: rgba(45,119,204,0.3) !important;
    background-clip: padding-box;
}
.verbruik {
    color: #F1C300;
}
Custom.js
Spoiler: show

Code: Select all

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

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

//Temperatuur woonkamer
function getStatus_1389_1(idx,value,device){
   if(parseFloat(device['Data'])>30){
      $('div.block_1389_1').addClass('warning');
   }
   else if (parseFloat(device['Data'])<5){
      $('div.block_1389_1').addClass('warningblue');
   }
   else {
      $('div.block_1389_1').removeClass('warning');
      $('div.block_1389_1').removeClass('warningblue');
   }
}
//Temperatuur Slaapkamer
function getStatus_1833_1(idx,value,device){
   if(parseFloat(device['Data'])>30){
      $('div.block_1833_1').addClass('warning');
   }
   else if (parseFloat(device['Data'])<5){
      $('div.block_1833_1').addClass('warningblue');
   }
   else {
      $('div.block_1833_1').removeClass('warning');
      $('div.block_1833_1').removeClass('warningblue');
   }
}
//Temperatuur Badkamer
function getStatus_1834_1(idx,value,device){
   if(parseFloat(device['Data'])>30){
      $('div.block_1834_1').addClass('warning');
   }
   else if (parseFloat(device['Data'])<5){
      $('div.block_1834_1').addClass('warningblue');
   }
   else {
      $('div.block_1834_1').removeClass('warning');
      $('div.block_1834_1').removeClass('warningblue');
   }
}
//Temperatuur Hal
function getStatus_7208(idx,value,device){
   if(parseFloat(device['Data'])>30){
      $('div.block_7208').addClass('warning');
   }
   else if (parseFloat(device['Data'])<5){
      $('div.block_7208').addClass('warningblue');
   }
   else {
      $('div.block_7208').removeClass('warning');
      $('div.block_7208').removeClass('warningblue');
   }
}
//Temperatuur Keuken
function getStatus_8368_1(idx,value,device){
   if(parseFloat(device['Data'])>30){
      $('div.block_8368').addClass('warning');
   }
   else if (parseFloat(device['Data'])<5){
      $('div.block_8368').addClass('warningblue');
   }
   else {
      $('div.block_8368').removeClass('warning');
      $('div.block_8368').removeClass('warningblue');
   }
}
//Temperatuur Buiten
function getStatus_6649_1(idx,value,device){
   if(parseFloat(device['Data'])>30){
      $('div.block_6649_1').addClass('warning');
   }
   else if (parseFloat(device['Data'])<5){
      $('div.block_6649_1').addClass('warningblue');
   }
   else {
      $('div.block_6649_1').removeClass('warning');
      $('div.block_6649_1').removeClass('warningblue');
   }
}

// SENSOREN

//Voordeur
function getStatus_8380(idx,value,device){
   if(device['Status']=='Open') { 
	blocks[8380]['icon'] = 'fa fa-unlock'}
   else { 
	blocks[8380]['icon'] = 'fa fa-lock'}
}
//Balkondeur
function getStatus_8385(idx,value,device){
   if(device['Status']=='Open') { 
	blocks[8385]['icon'] = 'fa fa-unlock'}
   else { 
	blocks[8385]['icon'] = 'fa fa-lock'}
}
//Keukenraam
function getStatus_8382(idx,value,device){
   if(device['Status']=='Open') { 
	blocks[8382]['icon'] = 'fa fa-unlock'}
   else { 
	blocks[8382]['icon'] = 'fa fa-lock'}
}
//Slaapkamer gallerij
function getStatus_8391(idx,value,device){
   if(device['Status']=='Open') { 
	blocks[8391]['icon'] = 'fa fa-unlock'}
   else { 
	blocks[8391]['icon'] = 'fa fa-lock'}
}
//Slaapkamer balkon
function getStatus_8389(idx,value,device){
   if(device['Status']=='Open') { 
	blocks[8389]['icon'] = 'fa fa-unlock'}
   else { 
	blocks[8389]['icon'] = 'fa fa-lock'}
}
//Woonkamer raam
function getStatus_8387(idx,value,device){
   if(device['Status']=='Open') { 
	blocks[8387]['icon'] = 'fa fa-unlock'}
   else { 
	blocks[8387]['icon'] = 'fa fa-lock'}
}

//VERLICHTING

//Woonkamer spot
function getStatus_8409(idx,value,device){
   if(device['Status']=='On') { 
	blocks[8409]['icon'] = 'fa fa-toggle-on'}
   else { 
	blocks[8409]['icon'] = 'fa fa-toggle-off'}
}
//Eettafel
function getStatus_8322(idx,value,device){
   if(device['Status']=='On') { 
	blocks[8322]['icon'] = 'fa fa-toggle-on'}
   else { 
	blocks[8322]['icon'] = 'fa fa-toggle-off'}
}
//Studeerkamer
function getStatus_8330(idx,value,device){
   if(device['Status']=='On') { 
	blocks[8330]['icon'] = 'fa fa-toggle-on'}
   else { 
	blocks[8330]['icon'] = 'fa fa-toggle-off'}
}
//Pallet
function getStatus_83(idx,value,device){
   if(device['Status']=='On') { 
	blocks[83]['icon'] = 'fa fa-toggle-on'}
   else { 
	blocks[83]['icon'] = 'fa fa-toggle-off'}
}
//Kastverlichting
function getStatus_82(idx,value,device){
   if(device['Status']=='On') { 
	blocks[82]['icon'] = 'fa fa-toggle-on'}
   else { 
	blocks[82]['icon'] = 'fa fa-toggle-off'}
}
//Bol
function getStatus_6576(idx,value,device){
   if(device['Status']=='On') { 
	blocks[6576]['icon'] = 'fa fa-toggle-on'}
   else { 
	blocks[6576]['icon'] = 'fa fa-toggle-off'}
}
//Alles uit
function getStatus_s3(idx,value,device){
   if(device['Status']=='On') { 
	blocks['s3']['icon'] = 'fa fa-toggle-on'}
   else { 
	blocks['s3']['icon'] = 'fa fa-toggle-off'}
}
//TV kijken
function getStatus_s2(idx,value,device){
   if(device['Status']=='On') { 
	blocks['s2']['icon'] = 'fa fa-toggle-on'}
   else { 
	blocks['s2']['icon'] = 'fa fa-toggle-off'}
}
//VERBRUIK

//Koelkast
function getStatus_8396_1(idx,value,device){
   if(parseFloat(device['Usage'])>0){
      $('div.block_8396_1.col-xs-4').addClass('verbruik');
   }
   else {
   }
}
//Wasmachine
function getStatus_8398_1(idx,value,device){
   if(parseFloat(device['Usage'])>0){
      $('div.block_8398_1.col-xs-4').addClass('verbruik');
   }
   else {
   }
}
//Vaatwasser
function getStatus_8394_1(idx,value,device){
   if(parseFloat(device['Usage'])>0){
      $('div.block_8394_1.col-xs-4').addClass('verbruik');
   }
   else {
   }
}

Re: Dashticz - Show your dashboard and how-to's!

Posted: Tuesday 07 August 2018 16:42
by Gianni
need to wait to get all my devices so i decide to tweak my dash a little bit.
css and png.

[youtube]https://youtu.be/bIMb4lTwiic[/youtube]

grts

Re: Dashticz - Show your dashboard and how-to's!

Posted: Friday 24 August 2018 20:41
by peet3kabo
He Guys,

Took some time to figure some stuff out but finally getting started.
Hoping to learn a lot from what all of you guys are making.
I'm in the development fase before a big renovation in my house where I plan to automate a lot of stuff and use a lot of indirect lighting tru LED strips.
So trying to implement one thing at a time.
For now using Dashticz on a tablet so everybody in the house can switch the lights on in a easy way besides the stuff that is automated.

Here is my temp fixture to put my tablet on in a central location in my house:
ImageDashticz2 by Peter van der Meulen, on Flickr
ImageDashticz by Peter van der Meulen, on Flickr

Re: Dashticz - Show your dashboard and how-to's!

Posted: Monday 03 September 2018 13:56
by amauryverschooren
elmardam wrote: Saturday 02 September 2017 12:09 my dash ;)

dash2.jpg
I like your dash, how did you get the weather blocks from monday to ...? and the spotify platlist?
greetz

Re: A little help to make my dashboard awesome

Posted: Monday 03 September 2018 14:06
by amauryverschooren
remb0 wrote: Wednesday 20 September 2017 19:07 I have a few (i hope small) questions:

1: google maps is not showing a map anymore.


2: Color bulbs on my hue not showing on screen. (known issue with rgbw?)


3: news is not showing (I use nu.nl as default and tweakers as second)
used with crossorigin and without.
with F12 i see:
XMLHttpRequest cannot load https://crossorigin.me/http://www.nu.nl/rss/Algemeen. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://192.168.0.8:8080' is therefore not allowed access. The response had HTTP status code 503.


4:
a iframe is not nice looking.
when using this code it's nice but My popup of cammeras are ugly. who has the right code to let the popups intact and the iframe nicer?
Spoiler: show

Code: Select all

/*
Verkleinen iframes
iframe {
-moz-transform: scale(0.80, 0.80);
-webkit-transform: scale(0.65, 0.65);
-o-transform: scale(0.65, 0.65);
-ms-transform: scale(0.65, 0.65);
-transform: scale(0.65, 0.65);
-moz-transform-origin: top left;
-webkit-transform-origin: top left;
-o-transform-origin: top left;
-ms-transform-origin: top left;
transform-origin: top left;
height:700px !important;
width:50vw !important;
overflow:hidden !important;
}
*/
5: got lots of calls like:
Spoiler: show

Code: Select all

VM445 pubads_impl_150.js:1 GET https://securepubads.g.doubleclick.net/gampad/ads?gdfp_req=1&correlator=2782147972516595&output=json_html&callback=googletag.impl.pubads.callbackProxy6&impl=fifs&json_a=1&eid=108809103&sc=0&sfv=1-0-10&iu_parts=7571%2CTEST-Weeronline_NL%2Cdesktop-web%2CTest-0001_lazyloading%2CGroup_A&enc_prev_ius=%2F0%2F1%2F2%2F3%2F4&prev_iu_szs=728x90%7C970x90&prev_scp=event%3DadSettings%26p%3Dlocale%26lang%3Dnl%26dext%3D.nl%26d%3D4057857-Dordrecht%26c%3D135-Nederland%26wcd%3Dbw____-wait-for-description-from-node-service%26wtd%3D18%26wctd%3Dwb____-wait-for-description-from-node-service%26wttd%3D20%26wcm%3Dbw____-wait-for-description-from-node-service%26wtm%3D17%26wctm%3Dbw____-wait-for-description-from-node-service%26wttm%3D19%26gtm.uniqueEventId%3D7&cookie_enabled=1&cdm=www.weeronline.nl&lmt=1505926277&dt=1505926277350&frm=24&biw=-12245933&bih=-12245933&isw=0&ish=0&oid=3&adxs=0&adys=0&adks=3544500888&gut=v2&ifi=11&ifk=2517980815&u_tz=120&u_his=50&u_h=864&u_w=1536&u_ah=824&u_aw=1536&u_cd=24&u_nplug=4&u_nmime=5&u_sd=1.25&flash=0&nhd=1&iag=3&url=http%3A%2F%2Fwww.weeronline.nl%2FEuropa%2FNederland%2FDordrecht%2F4057857%3Ft%3D1505926272817&ref=http%3A%2F%2F192.168.0.8%3A8080%2Fdashboard%2Findex.html&top=http%3A%2F%2F192.168.0.8%3A8080%2Fdashboard%2Findex.html&dssz=31&icsg=183075080320&std=0&vrg=150&vis=1&ga_vid=1585532819.1505837635&ga_sid=1505926277&ga_hid=52886125 net::ERR_BLOCKED_BY_CLIENT
hc @ VM445 pubads_impl_150.js:1
Ko @ VM445 pubads_impl_150.js:1
gm @ VM445 pubads_impl_150.js:1
$u @ VM445 pubads_impl_150.js:1
Zu @ VM445 pubads_impl_150.js:1
Zr @ VM445 pubads_impl_150.js:1
rm @ VM445 pubads_impl_150.js:1
(anonymous) @ VM445 pubads_impl_150.js:1
H @ VM445 pubads_impl_150.js:1
Xr.Jd @ VM445 pubads_impl_150.js:1
h.fillSlot @ VM445 pubads_impl_150.js:1
h.ta @ VM445 pubads_impl_150.js:1
(anonymous) @ VM445 pubads_impl_150.js:1
(anonymous) @ VM445 pubads_impl_150.js:1
value @ VM516 bundle.js:45
(anonymous) @ VM516 bundle.js:45
kq.push @ VM445 pubads_impl_150.js:1
(anonymous) @ VM445 pubads_impl_150.js:1
wr @ VM445 pubads_impl_150.js:1
(anonymous) @ VM445 pubads_impl_150.js:1
fv @ VM445 pubads_impl_150.js:1
(anonymous) @ VM445 pubads_impl_150.js:1
(anonymous) @ VM445 pubads_impl_150.js:1
VM445 pubads_impl_150.js:1 GET https://securepubads.g.doubleclick.net/static/3p_cookie.html net::ERR_BLOCKED_BY_CLIENT
6: my link to nas is not showing.?

MY screens:
Dashticz1.jpgdashticz.png

my config:
Spoiler: show

Code: Select all

var config = {}
config['edit_mode'] = 0;
config['domoticz_ip'] = 'sensored';
config['app_title'] = 'Dashticz';
config['domoticz_refresh'] = '5';
config['dashticz_refresh'] = '60';
config['default_news_url'] = 'https://crossorigin.me/http://www.nu.nl/rss/Algemeen';
config['news_scroll_after'] = '4';
config['standby_after'] = 0;
config['auto_swipe_back_to'] = 1;
config['auto_swipe_back_after'] = '10';
config['auto_slide_pages'] = 0;
config['slide_effect'] = 'slide';
config['standard_graph'] = 'month';
config['language'] = 'nl_NL';
config['timeformat'] = 'DD-MM-YY HH:mm';
config['calendarformat'] = 'dd DD.MM HH:mm';
config['calendarlanguage'] = 'nl_NL';
config['calendarurl'] = 0;
config['boss_stationclock'] = 'RedBoss';
config['gm_api'] = 'sensored';
config['gm_zoomlevel'] = '10';
config['gm_latitude'] = '51.860067';
config['gm_longitude'] = '4.412692';
config['wu_api'] = 'sensored';
config['wu_city'] = 'Dordrecht';
config['wu_name'] = 'Weer';
config['wu_country'] = 'NL';
config['idx_moonpicture'] = 0;
config['switch_horizon'] = 0;
config['host_nzbget'] = 'http://sensored';
config['spot_clientid'] = 'sensored';
config['sonarr_url'] = 'http://192.168.0.10:8989';
config['sonarr_apikey'] = 'sensored';
config['sonarr_maxitems'] = '7';
config['garbage_company'] = 'hvc';
config['garbage_icalurl'] = 0;
config['garbage_zipcode'] = 'sensored LN';
config['garbage_street'] = 'sensored 39';
config['garbage_housenumber'] = '39';
config['garbage_maxitems'] = 0;
config['garbage_width'] = 0;
config['selector_instead_of_buttons'] = 1;
config['auto_positioning'] = 1;
config['use_favorites'] = 1;
config['last_update'] = 1;
config['hide_topbar'] = 1;
config['hide_seconds'] = 1;
config['hide_seconds_stationclock'] = 0;
config['use_fahrenheit'] = 0;
config['use_beaufort'] = 0;
config['translate_windspeed'] = 1;
config['static_weathericons'] = 1;
config['hide_mediaplayer'] = 0;
config['garbage_hideicon'] = 0;

// Afvalwijzer
var trashnames = {}
trashnames['Gft']			= 			'GFT';
trashnames['Pmd']			= 			'Plastic';
var trashcolors 			= {}
trashcolors['Gft'] 			= 			'Green';
trashcolors['Pmd'] 			= 			'Orange';
trashcolors['Papier'] 		= 			'Blue';
trashcolors['Restafval'] 	=			'Red';
var _DO_NOT_USE_COLORED_TRASHCAN = false

var tvguide = {}
tvguide.dutch = { key:'dutch', icon: 'fa-television', width:12, channels: [1,2,3,4,31,46,92], maxitems: 10 }

//Buttons or images to open webpages in an iframe, like a news website or weather forecast
var buttons = {}
buttons.webcam1 = { width:6, isimage:true, refresh:5000, image: 'http://sensored/image.jpg', url: 'http://sensored/image.jpg' }
buttons.webcam2 = { width:6, isimage:true, refresh:5000, image: 'sensored' }
buttons.buienradar = {width:12, isimage:true, refreshimage:60000, image: 'http://api.buienradar.nl/image/1.0/RadarMapNL?w=sensored', url: 'http://www.weeronline.nl/Europa/Nederland/Dordrecht/sensored'}
buttons.radio = {width:12, image: 'img/radio_on.png', title: 'Radio', url: 'http://nederland.fm'}
buttons.nzbget = {width:12, icon: 'fa-download', title: 'NZBget', url: 'http://sensored:6789'}
buttons.log = {key:'log', width:12, icon:'fa-microchip', title: 'Domoticz Log', log:true, level: 2}

var _STREAMPLAYER_TRACKS = [
   {"track":1,"name":"Q-music","file":"http://icecast-qmusic.cdp.triple-it.nl/Qmusic_nl_live_96.mp3"},
   {"track":2,"name":"538 Hitzone","file":"http://vip-icecast.538.lw.triple-it.nl/WEB11_MP3"},
   {"track":3,"name":"Slam! NonStop","file":"http://stream.radiocorp.nl/web10_mp3"},
   {"track":4,"name":"100%NL","file":"http://stream.100p.nl/100pctnl.mp3"},
   {"track":5,"name":"StuBru","file":"http://mp3.streampower.be/stubru-high.mp3"},
   {"track":6,"name":"NPO Radio 1","file":"http://icecast.omroep.nl/radio1-bb-mp3"},
   {"track":7,"name":"Omroep Brabant","file":"http://streaming.omroepbrabant.nl/mp3"},
];

var calendars = {}
calendars.private = { maxitems: 5, icalurl: 'sensored' }

var frames = {}
frames.secpanel = {height:390,frameurl:"http://sensored:8080/secpanel/index.html",width:12}

var screens = {}
screens[1] = {}
screens[1]['background'] = 'bg7.jpg';
screens[1]['columns'] = [1,2,3]

screens[2] = {}
screens[2]['background'] = 'bg2.jpg';
screens[2]['columns'] = [4,5,6]

screens[3] = {}
screens[3]['background'] = 'bg8.jpg';
screens[3]['columns'] = [7,8,9] //blocks can be size 6

screens[4] = {}
screens[4]['background'] = 'bg9.jpg';
//screens[4]['background_morning'] = 'bg_morning.jpg';
//screens[4]['background_noon'] = 'bg_noon.jpg';
//screens[4]['background_afternoon'] = 'bg_afternoon.jpg';
//screens[4]['background_night'] = 'bg_night.jpg';
screens[4]['columns'] = [10,11,12] //blocks can be size 6

var blocks = {}

blocks['clock'] = {}
blocks['clock']['width'] = 12;

blocks['news_2'] = {} 
blocks['news_2']['feed'] = 'http://feeds.feedburner.com/tweakers/nieuws';

blocks['sonarr'] = {}
blocks['sonarr']['title'] = 'Sonarr';
blocks['sonarr']['title_position'] = 'left';
blocks['sonarr']['view'] = 'Banner';
blocks['sonarr']['width'] = 5;

blocks['nas'] = {} // Ping Esx
blocks['nas']['width'] = 3;
blocks['nas']['icon'] = 'fa-server';
blocks['nas']['title'] = 'NAS';
blocks['nas']['link'] = 'http://192.168.0.99';
blocks['nas']['target'] = 'iframe'; // iframe, tab, window

//Scene blocks
blocks['s7'] = {} // tuin
blocks['s7']['width'] = 3;
blocks['s7']['icon'] = 'fa-bed';

blocks['s3'] = {} // Alles uit
blocks['s3']['width'] = 4;
blocks['s3']['protected'] = true;
blocks['s3']['hide_data'] = true;
blocks['s3']['icon'] = 'fa-bed';

blocks['blocktitle_2'] = {}
blocks['blocktitle_2']['type'] = 'blocktitle';
blocks['blocktitle_2']['title'] = 'Switches';

blocks[30] = {} 
blocks[30]['width'] = 6;
blocks[30]['title'] = 'keuken';

blocks[829] = {} 
blocks[829]['width'] = 6;
blocks[829]['title'] = 'eettafel';

blocks[136] = {}
blocks[136]['width'] = 6;
blocks[136]['title'] = 'salon';

blocks['blocktitle_3'] = {}
blocks['blocktitle_3']['type'] = 'blocktitle';
blocks['blocktitle_3']['title'] = 'Temperature';

blocks['blocktitle_4'] = {}
blocks['blocktitle_4']['type'] = 'blocktitle';
blocks['blocktitle_4']['title'] = 'Beneden';

blocks['blocktitle_5'] = {}
blocks['blocktitle_5']['type'] = 'blocktitle';
blocks['blocktitle_5']['title'] = 'Tuin';

blocks['blocktitle_6'] = {}
blocks['blocktitle_6']['type'] = 'blocktitle';
blocks['blocktitle_6']['title'] = 'Boven';

blocks['blocktitle_7'] = {}
blocks['blocktitle_7']['type'] = 'blocktitle';
blocks['blocktitle_7']['title'] = 'Overig';

blocks['blocktitle_30'] = {}
blocks['blocktitle_30']['type'] = 'blocktitle';
blocks['blocktitle_30']['title'] = 'Gas';

blocks['blocktitle_31'] = {}
blocks['blocktitle_31']['type'] = 'blocktitle';
blocks['blocktitle_31']['title'] = 'Elektra';

blocks['blocktitle_32'] = {}
blocks['blocktitle_32']['type'] = 'blocktitle';
blocks['blocktitle_32']['title'] = 'Water';

//screen1
var columns = {}
columns[1] = {}
columns[1]['blocks'] = ['clock','garbage',calendars.private ,buttons.radio,'streamplayer'];
columns[1]['width'] = 3;


columns[2] = {}
columns[2]['blocks'] = ['weather','trafficmap','traffic','news','news_2'];
columns[2]['width'] = 4;

//woonkamer & tuin
columns[3] = {}
columns[3]['blocks'] = ['blocktitle_4',829,136,1023,88,'s3',951,14,994,1023,1877,1878,1903,30];
columns[3]['width'] = 5;


//screen2
columns[4] = {}
columns[4]['blocks'] = ['blocktitle_5', 1047,14, 'blocktitle_6', 560, 1170, 11, 1016, 1170, 1143, 1111, 1022];
columns[4]['width'] = 4;

columns[5] = {}
columns[5]['blocks'] = ['blocktitle_7',3,2,606,1459,1458,951];
columns[5]['width'] = 4;

columns[6] = {}
columns[6]['blocks'] = [buttons.webcam1,buttons.webcam2,frames.secpanel];
columns[6]['width'] = 4;

//screen3
columns[7] = {} //gas
columns[7]['blocks'] = ['blocktitle_30','graph_3'];
columns[7]['width'] = 4;

columns[8] = {} //energie
columns[8]['blocks'] = ['blocktitle_31','graph_2'];
columns[8]['width'] = 4;

columns[9] = {} //water
columns[9]['blocks'] = ['blocktitle_32','graph_606'];
columns[9]['width'] = 4;


//screen4
columns[10] = {} 
columns[10]['blocks'] = [buttons.buienradar,buttons.nzbget,buttons.log,'nas'];
columns[10]['width'] = 3;

//tvguide.dutch
columns[11] = {} 
columns[11]['blocks'] = [tvguide.dutch,'news','news_2'];
columns[11]['width'] = 4;

columns[12] = {} //4
columns[12]['blocks'] = ['sonarr'];
columns[12]['width'] = 5;

who can help me to make my dashboard awesome?
Hello, Nice dash! How did you get the 'afval kalender'? would like to get that to. i live in Belgium

Re: Dashticz - Show your dashboard and how-to's!

Posted: Monday 03 September 2018 16:55
by amauryverschooren
Hello,
I want to get away of the last update time and date in the blocks. The command 'hide_lastupdate' doesn't work for me. Who can help me?

Re: Dashticz - Show your dashboard and how-to's!

Posted: Monday 03 September 2018 17:52
by Stepdes
amauryverschooren wrote: Monday 03 September 2018 16:55 Hello,
I want to get away of the last update time and date in the blocks. The command 'hide_lastupdate' doesn't work for me. Who can help me?
Try this in your config file

var config = {}
config['last_update'] = 0;

Re: Dashticz - Show your dashboard and how-to's!

Posted: Thursday 20 September 2018 0:48
by HansieNL
I like the idea of having a button that shows how long Domoticz is up so I can use it in Dashticz.
I did find after trial and error some code that works... :o :shock:

Code: Select all

-- script_time_uptime.lua
-- 
-- Domoticz Configuration
local server="192.168.1.11"	-- Domoticz IP address
local port="8080"			-- Domoticz port
local devname="Uptime"		-- Dummy Text device name

json = (loadfile "/home/pi/domoticz/scripts/lua/JSON.lua")()
local gudata=assert(io.popen('curl "http://'..server..':'..port..'/json.htm?type=command&param=getuptime"'))

local guptime = gudata:read('*all')
gudata:close()
local jsonGetUptime = json:decode(guptime)

local days = jsonGetUptime.days
local hours = jsonGetUptime.hours
local minutes = jsonGetUptime.minutes
local dzuptime = days.. " dagen, " ..hours.. " uur en " ..minutes.. " minuten"

commandArray = {}

  -- print('(Uptime) '.. dzuptime)
  commandArray ['UpdateDevice'] = otherdevices_idx[devname] .. '|0|' .. dzuptime

return commandArray
Because I'm no programmer there can be a better solution. Be so kind to let me know.
Image
Domoticz image:
Image

Re: Dashticz - Show your dashboard and how-to's!

Posted: Thursday 20 September 2018 11:59
by pvm
How did you make the buienradar umbrella thing? Nice !

Re: Dashticz - Show your dashboard and how-to's!

Posted: Thursday 20 September 2018 14:10
by HansieNL
pvm wrote: Thursday 20 September 2018 11:59 How did you make the buienradar umbrella thing? Nice !
I use a LUA script for the Buienradar info:
Spoiler: show

Code: Select all

-- script_time_buienradar.lua
-- 
-- BuienRadar Module
--
-- curl in os required!!
-- create dummy text device from dummy hardware 'Buien Radar'
-- create dummy rain sensor from dummy hardware 'BuienRadarMeter'
-- create dummy switch from dummy hardware for triggering screens etc based on rain
-- add as time based lua script
-- set your longitude & latitude below!
-- 
-- 2017-12-27 working version
-- 2017-12-28 trying to get the rain device working .. missing documentation ..
-- 2017-12-30 isolated the bug, i was overwriting the updatedevice .. should be ok now
-- 2018-03-28 updated buienradar url
-- 2018-04-02 added follow redirect for curl & fixed typo as tipped by gizmocuz 
-- 
-- http://gpsgadget.buienradar.nl/data/raintext?lat=55.55&lon=4.44

commandArray = {}

local myBuienRadarDevice = 'Buienradar'
local myBuienRadarMeter = 'RegenData'
local myBuienRadarFlg = 'Paraplu'

-- longitude latitude
local lat='55.55'
local lon='4.44'

time = os.date("*t")
if time.min % 5 == 0 then 
    
    print('(Buienradar) Get data from Buienradar')

    function os.capture(cmd, rep)   -- execute command to get site
        -- rep is nr of repeats if result is empty
        r = rep or 1
        local s = ""
        while ( s == "" and r > 0) do
            r = r-1
            local f = assert(io.popen(cmd, 'r'))
            s = assert(f:read('*a'))
            f:close()
        end
        if ( rep - r > 1 ) then
            print("(Buienradar) os.capture needed more than 1 call: " .. rep-r)
        end
      return s
    end
 
    --  get data from buienradar
    local command = "curl --max-time 5 -L -s 'http://gpsgadget.buienradar.nl/data/raintext?lat=" .. lat .. "&lon=" .. lon .. "'"
    -- print("command: " .. command)
    local tmp = os.capture(command, 3)
 
    -- print('buienRadar data:\n' .. tmp)
    
    if ( tmp == "" ) then
        print("(BuienRadar) Empty result from curl command")
    else
        -- analyse data 

        -- to mm/h 10^((waarde-109)/32)        
        function tomm(r)
            return 10^((r-109)/32)
        end
        
        -- to string formatted
        function tos(r, c)
            c = c or 1
            return string.format("%." .. c .. "f", r)
        end

        local c=0
        local rainNow=0
        local rainNowAvg = 0
        local rainSoon = 0
        local rainTime = ""
        local rainMax = 0
        for k,v in tmp:gmatch('(.-)|(.-)\r?\n') do
            -- k is rain value, v is time
            kn = tonumber(k)
            if c<=1 then
                if rainNow < kn then
                    rainNow = kn
                end
                if kn > 0 then
                    rainNowAvg = rainNowAvg + tomm(kn)/2
                end
            end
            if c<=3 and rainSoon < kn then 
                rainSoon = kn
            end
            if rainTime == "" and kn > 0 then
                rainTime = v
            end
            if kn > rainMax then
                rainMax = kn
            end
            c = c+1
        end
        
        -- if c = 0 no data found!
        if ( c == 0 ) then
            print("(BuienRadar) Unparsable result from curl command")
        else
        
            if rainNow>0 then
                tmp = "Nu " .. tos(tomm(rainNow)) .. " mm/uur"
                if rainMax > rainNow then
                    tmp = tmp .. " tot " .. tos(tomm(rainMax)) .. " mm/uur"
                end
            elseif rainSoon>0 then
                tmp = "Verwacht " .. tos(tomm(rainSoon)) .. " mm/uur"
                if rainMax > rainSoon then
                    tmp = tmp .. " tot " .. tos(tomm(rainMax)) .. " mm/uur"
               end
            elseif rainTime ~= "" then
                tmp = "Verwacht om " .. rainTime .. " tot " .. tos(tomm(rainMax)) .. " mm/uur"
            else tmp = "Voorlopig droog"
            end
    
            -- calculate totalrainfall using rainNowAvg as average of 2 next reports
            -- print("buienRadarMeterOld: " .. otherdevices_svalues[myBuienRadarMeter])
            local rainTot = tonumber(otherdevices_svalues[myBuienRadarMeter]:match("[^;]+;([^;]+)")) + rainNowAvg/12 -- /12 to acount for 5min measurements ?? ..
            -- print("buienRadarDebug: rainNow=" .. tos(tomm(rainNow)) .. " rainNowAvg=" .. tos(rainNowAvg) .. " rainSoon=" .. 
            --      tos(tomm(rainSoon)) .. " rainTot=" .. tos(rainTot,2) .. " rainTime=" .. rainTime .. " rainMax=" .. tos(tomm(rainMax)))
            local cmd = otherdevices_idx[myBuienRadarMeter] .. "|0|" .. tos(tomm(rainNow)*100,0) .. ";" .. tos(rainTot,2)
            -- print("buienRadar: " .. cmd)
            table.insert(commandArray, { ['UpdateDevice'] = cmd } ) -- table.insert needed to avoid overwriting with next updatedevice
            
            -- write to text device
            if otherdevices[myBuienRadarDevice] ~= tmp then
                table.insert(commandArray, { ['UpdateDevice'] = otherdevices_idx[myBuienRadarDevice] .. '|0|' .. tmp })
                
                -- trigger based when rainNow or rainSoon
                if ( rainNow>0 or rainSoon>0 ) then
                    if otherdevices[myBuienRadarFlg] == "Off" then
                        commandArray[myBuienRadarFlg] = "On"
                    end
                elseif otherdevices[myBuienRadarFlg] == "On" then
                    commandArray[myBuienRadarFlg] = "Off"
                end
            end
        end -- unparsable
    end -- empty result
end

return commandArray

In CONFIG.js I have following code:
Spoiler: show

Code: Select all

blocks[345] = {} //Buienradar (text)
    blocks[345]['title'] = 'Buienradar';
    blocks[345]['switch'] = true;
    blocks[345]['width'] = 12;
    blocks[345]['image'] = 'cust_umbrella.png';
blocks[346] = {} //RegenData (rain sensor) not on dashboard
    blocks[346]['title'] = 'Regen';
blocks[347] = {} //Paraplu (switch) not on dashboard
In custom.css I added following code, because text length can be different and block can resize in height:
Spoiler: show

Code: Select all

/* Buienradar */
.block_345 {
    height: 100% !important;
}
And finally I created a custom image (rename to cust_umbrella.png):
Image

Re: Dashticz - Show your dashboard and how-to's!

Posted: Friday 21 September 2018 1:59
by pvm
Thanks, I've succeeded. Did not use your icon though, but used fa-umbrella icon and color it blue when rain is coming
css

Code: Select all

.fa.fa-umbrella {
    font-size: 64px !important;
    font-weight: bold !important;
}
.fa.fa-umbrella.on {
    color:#3399ff !important;
}
(intermediate) Result:
DashticzInProgress.jpg
DashticzInProgress.jpg (187.92 KiB) Viewed 5092 times
(i've hidden some info on my location and cars)

This is running on a 7" tablet. Next time I would buy a bigger one

Re: Dashticz - Show your dashboard and how-to's!

Posted: Friday 21 September 2018 12:31
by EdwinK
Looks nice ;), both HansieNL and PVM

Re: Dashticz - Show your dashboard and how-to's!

Posted: Thursday 27 September 2018 10:23
by TheRedOne09
HansieNL wrote: Thursday 20 September 2018 0:48 I like the idea of having a button that shows how long Domoticz is up so I can use it in Dashticz.
I did find after trial and error some code that works... :o :shock:

Code: Select all

-- script_time_uptime.lua
-- 
-- Domoticz Configuration
local server="192.168.1.11"	-- Domoticz IP address
local port="8080"			-- Domoticz port
local devname="Uptime"		-- Dummy Text device name

json = (loadfile "/home/pi/domoticz/scripts/lua/JSON.lua")()
local gudata=assert(io.popen('curl "http://'..server..':'..port..'/json.htm?type=command&param=getuptime"'))

local guptime = gudata:read('*all')
gudata:close()
local jsonGetUptime = json:decode(guptime)

local days = jsonGetUptime.days
local hours = jsonGetUptime.hours
local minutes = jsonGetUptime.minutes
local dzuptime = days.. " dagen, " ..hours.. " uur en " ..minutes.. " minuten"

commandArray = {}

  -- print('(Uptime) '.. dzuptime)
  commandArray ['UpdateDevice'] = otherdevices_idx[devname] .. '|0|' .. dzuptime

return commandArray
Because I'm no programmer there can be a better solution. Be so kind to let me know.
Image
Domoticz image:
Image
This looks very nice and clean! Can you please share your config.js and custom.css so I can use your dashboard as a kick-start?

Re: Dashticz - Show your dashboard and how-to's!

Posted: Thursday 27 September 2018 14:15
by Recky
I see everyone here using these nice 4 days weather forecast blocks from WU. Since they stopped their free API (thanks IBM..) I'm using OpenWeatherMap now. It works, but I can't get this to display in the same 4 days weather forecast blocks, like WU.

Anyone knows how to do this?

Re: Dashticz - Show your dashboard and how-to's!

Posted: Thursday 27 September 2018 15:13
by HansieNL
Recky wrote: Thursday 27 September 2018 14:15 I see everyone here using these nice 4 days weather forecast blocks from WU. Since they stopped their free API (thanks IBM..) I'm using OpenWeatherMap now. It works, but I can't get this to display in the same 4 days weather forecast blocks, like WU.

Anyone knows how to do this?
Try: currentweather_big_owm or weather_owm
Ok... it's not exactly the same as WU. Hopefully someone can fix this.

Re: Dashticz - Show your dashboard and how-to's!

Posted: Thursday 04 October 2018 16:14
by Thuis
Image

Image

If only I could center the blocks on the standby screen ....
And get weather to show in Dutch. WIP.

Re: Dashticz - Show your dashboard and how-to's!

Posted: Thursday 04 October 2018 16:44
by EdwinK
Nice.

Re: Dashticz - Show your dashboard and how-to's!

Posted: Thursday 04 October 2018 17:03
by Thuis
It's great fun, once you get to know all the different languages involved... (LUA, PHP, Python, CSS, HTML, JSON, etc.) Man I am used to two languages, FBD and ST, maybe three, IL.

And trying to find the logic behind things, what they mean and stand for if you press F12 in Firefox...
Also https://www.w3schools.com is getting lots of requests from me, every minute, haha.
Combined with the http://www.domoticz.com/wiki/Dashticz_V2. But it consumes a lot of time.
So I can only imagine the time Rob puts into this, well done Rob, and thank you for all your work, beer coming up !

Re: Dashticz - Show your dashboard and how-to's!

Posted: Friday 05 October 2018 0:12
by Thuis
I am trying to figure this out, maybe someone already know.


This is working, I can see the Thunderbolt
/*Binnenkomend Voltage*/
blocks[95] = {}
blocks[95]['width'] = 4;
blocks[95]['title'] = 'Inkomend Voltage';
blocks[95]['switch'] = true;
blocks[95]['image'] = 'current48.png'; <-------------------------------- Thunderbolt on the block from the png

This is not working
/*Totale KWh verbruik*/
blocks['94_3'] = {}
blocks['94_3']['title'] = 'Energie Totaal';
blocks['94_3']['width'] = 4;
blocks['94_3']['switch'] = true;
blocks['94_3']['image'] = 'current48.png'; <--------------------- No thunderbolt.png, oh yes a thunderbolt, but the one from fa fa fa

Same with the gas, id 96_1, looks like if it is _1 _2 _3 or what ever it is not working, but how ?


Now, why is that, i tried changing the the custom.js, but no luck.
blocktypes.Type['Electric'] = {image: '/img/icons/current48.png', title: '<Name>', value: '<Data>'}

Any one ?

Re: Dashticz - Show your dashboard and how-to's!

Posted: Friday 05 October 2018 14:42
by ArthurNL
Thuis wrote: Thursday 04 October 2018 16:14 Image

Image

If only I could center the blocks on the standby screen ....
And get weather to show in Dutch. WIP.
Could you post your config.js?