Dashticz - General Discussions

Dashticz, alternative dashboard based on HTML, CSS, jQuery

Moderators: leecollings, htilburgs, robgeerts

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

Re: RE: Re: Dashticz - General Discussions

Post by htilburgs »

HansieNL wrote:
robgeerts wrote:
HansieNL wrote:Hello Rob,
Is it possible to change the icon/image for the trash block. I've made a kliko image and wanna use that one if possible...
kliko.jpg
Could you send me that image?
Goodmorning,
You did accept my pull request already? If so, you should have it in the img folder as kliko.png.
I see a nice kliko....;)
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
koowee
Posts: 62
Joined: Thursday 29 December 2016 18:17
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Finland
Contact:

Re: Dashticz - General Discussions

Post by koowee »

Rob, can you add these two new device types to Dashticz

Thermostat mode selector. There is four different mode 0 = Off, 1 = Heat (Default), 2 = Cool, 3 = Energy Heat;

Code: Select all

{
   "ActTime" : 1493975839,
   "ServerTime" : "2017-05-05 12:17:19",
   "Sunrise" : "05:01",
   "Sunset" : "21:41",
   "result" : [
      {
         "AddjMulti" : 1.0,
         "AddjMulti2" : 1.0,
         "AddjValue" : 0.0,
         "AddjValue2" : 0.0,
         "BatteryLevel" : 255,
         "CustomImage" : 0,
         "Data" : "Off",
         "Description" : "",
         "Favorite" : 0,
         "HardwareID" : 4,
         "HardwareName" : "Razberry",
         "HardwareType" : "OpenZWave USB",
         "HardwareTypeVal" : 21,
         "HaveTimeout" : false,
         "ID" : "00001801",
         "LastUpdate" : "2017-05-05 12:16:43",
         "Mode" : 0,
         "Modes" : "0;Off;1;Heat (Default);2;Cool;3;Energy Heat;",
         "Name" : "Thermostat Mode",
         "Notifications" : "false",
         "PlanID" : "0",
         "PlanIDs" : [ 0 ],
         "Protected" : false,
         "ShowNotifications" : true,
         "SignalLevel" : "-",
         "SubType" : "Thermostat Mode",
         "Timers" : "false",
         "Type" : "General",
         "TypeImg" : "mode",
         "Unit" : 1,
         "Used" : 1,
         "XOffset" : "0",
         "YOffset" : "0",
         "idx" : "329"
      }
   ],
   "status" : "OK",
   "title" : "Devices"
}
Solar radiation, now Dashticz shows it as a switch

Code: Select all

{
   "ActTime" : 1493976213,
   "ServerTime" : "2017-05-05 12:23:33",
   "Sunrise" : "05:01",
   "Sunset" : "21:41",
   "result" : [
      {
         "AddjMulti" : 1.0,
         "AddjMulti2" : 1.0,
         "AddjValue" : 0.0,
         "AddjValue2" : 0.0,
         "BatteryLevel" : 255,
         "CustomImage" : 0,
         "Data" : "347.2 Watt/m2",
         "Description" : "",
         "Favorite" : 0,
         "HardwareID" : 9,
         "HardwareName" : "Dark Sky",
         "HardwareType" : "DarkSky (Weather Lookup)",
         "HardwareTypeVal" : 25,
         "HaveTimeout" : false,
         "ID" : "0",
         "LastUpdate" : "2017-05-05 12:14:53",
         "Name" : "Solar",
         "Notifications" : "false",
         "PlanID" : "0",
         "PlanIDs" : [ 0 ],
         "Protected" : false,
         "Radiation" : 347.19999999999999,
         "ShowNotifications" : true,
         "SignalLevel" : "-",
         "SubType" : "Solar Radiation",
         "SwitchTypeVal" : 0,
         "Timers" : "false",
         "Type" : "General",
         "TypeImg" : "radiation",
         "Unit" : 1,
         "Used" : 1,
         "XOffset" : "0",
         "YOffset" : "0",
         "forecast_url" : "aHR0cHM6Ly9kYXJrc2t5Lm5ldC8jL2YvNjEuNjM2NjUzJTJDJTIwMjMuNzg3MjA1",
         "idx" : "115"
      }
   ],
   "status" : "OK",
   "title" : "Devices"
}
User avatar
wizjos
Posts: 79
Joined: Monday 07 March 2016 19:35
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Dashticz - General Discussions

Post by wizjos »

Great new functionality this Afvalwijzer (trash)!

However, I noticed that not all dates are displayed because in trash.js (the mijnafvalwijzer part) the object returnDates has the date as a keyname... When trashcollection on a given date has two different collections (for instance 'restafval' and 'plastic') only the latter of these two is added to the object...
Bit confusing: for some mondays 'plastic' is displayed and for other ones 'restafval'. At my place a monday is always 'restafval' and 'plastic' combined...
To solve this I've added a counter (called 'teller') which takes care of making the keys unique:

Code: Select all

	if(service=='mijnafvalwijzer'){
		$.getJSON('http://json.mijnafvalwijzer.nl/?method=postcodecheck&postcode=' + postcode + '&street=&huisnummer=' + homenumber + '&toevoeging=',function(data){
			data = data.data.ophaaldagen.data;
			teller=0;
			for(d in data){
				if(typeof(returnDates[curr])=='undefined'){
					returnDates[curr] = {}
				}
				
				var startDate = moment(moment().format("DD-MM-YYYY"), "DD-MM-YYYY");
				var endDate = moment(moment(Date.now() + 64 * 24 * 3600 * 1000).format("DD-MM-YYYY"), "DD-MM-YYYY");
				var testDate = moment(data[d]['date'], "YYYY-MM-DD");

				if(testDate.isBetween(startDate, endDate, 'days', true)){
						
					returnDates[curr][moment(moment(data[d]['date'], "YYYY-MM-DD")).format("YYYY-MM-DD")+teller]='<div>'+data[d]['nameType']+': '+moment(moment(data[d]['date'], "YYYY-MM-DD")).format("DD-MM-YYYY")+'</div>';
				}
				teller++;
			}
			
			addToContainer(random,returnDates);

		});
In the original situation these moments are displayed (I've hacked a little to display more than 3 collection dates):
trash1.PNG
trash1.PNG (90.36 KiB) Viewed 2555 times
and with the counter:
trash2.PNG
trash2.PNG (130.4 KiB) Viewed 2555 times
Suits my needs a bit more... :mrgreen:

Regards,
Wizjos
Last edited by wizjos on Friday 05 May 2017 11:59, edited 1 time in total.
robgeerts
Posts: 1273
Joined: Saturday 24 January 2015 22:12
Target OS: NAS (Synology & others)
Domoticz version: 3.7067
Location: NL
Contact:

Re: Dashticz - General Discussions

Post by robgeerts »

wizjos wrote:Great new functionality this Afvalwijzer (trash)!

However, I noticed that not all dates are displayed because in trash.js (the mijnafvalwijzer part) the object returnDates has the date as a keyname... When trashcollection on a given date has two different collections (for instance 'restafval' and 'plastic') only the latter of these two is added to the object...
Bit confusing: for some mondays 'plastic' is displayed and for other ones 'restafval'. At my place a monday is always 'restafval' and 'plastic' combined...
To solve this I've added a counter (called 'teller') which takes care of making the keys unique:

Code: Select all

	if(service=='mijnafvalwijzer'){
		$.getJSON('http://json.mijnafvalwijzer.nl/?method=postcodecheck&postcode=' + postcode + '&street=&huisnummer=' + homenumber + '&toevoeging=',function(data){
			data = data.data.ophaaldagen.data;
			teller=0;
			for(d in data){
				if(typeof(returnDates[curr])=='undefined'){
					returnDates[curr] = {}
				}
				
				var startDate = moment(moment().format("DD-MM-YYYY"), "DD-MM-YYYY");
				var endDate = moment(moment(Date.now() + 64 * 24 * 3600 * 1000).format("DD-MM-YYYY"), "DD-MM-YYYY");
				var testDate = moment(data[d]['date'], "YYYY-MM-DD");

				if(testDate.isBetween(startDate, endDate, 'days', true)){
						
					returnDates[curr][moment(moment(data[d]['date'], "YYYY-MM-DD")).format("YYYY-MM-DD")+teller]='<div>'+data[d]['nameType']+': '+moment(moment(data[d]['date'], "YYYY-MM-DD")).format("DD-MM-YYYY")+'</div>';
				}
				teller++;
			}
			
			addToContainer(random,returnDates);

		});
In the original situation these moments are displayed (I've hack a little to display more than 3 collection dates):trash1.PNG and with the counter:trash2.PNG

Suits my needs a bit more... :mrgreen:

Regards,
Wizjos
Thanks, will fix this!
robgeerts
Posts: 1273
Joined: Saturday 24 January 2015 22:12
Target OS: NAS (Synology & others)
Domoticz version: 3.7067
Location: NL
Contact:

Re: Dashticz - General Discussions

Post by robgeerts »

koowee wrote:Rob, can you add these two new device types to Dashticz

Thermostat mode selector. There is four different mode 0 = Off, 1 = Heat (Default), 2 = Cool, 3 = Energy Heat;

Code: Select all

{
   "ActTime" : 1493975839,
   "ServerTime" : "2017-05-05 12:17:19",
   "Sunrise" : "05:01",
   "Sunset" : "21:41",
   "result" : [
      {
         "AddjMulti" : 1.0,
         "AddjMulti2" : 1.0,
         "AddjValue" : 0.0,
         "AddjValue2" : 0.0,
         "BatteryLevel" : 255,
         "CustomImage" : 0,
         "Data" : "Off",
         "Description" : "",
         "Favorite" : 0,
         "HardwareID" : 4,
         "HardwareName" : "Razberry",
         "HardwareType" : "OpenZWave USB",
         "HardwareTypeVal" : 21,
         "HaveTimeout" : false,
         "ID" : "00001801",
         "LastUpdate" : "2017-05-05 12:16:43",
         "Mode" : 0,
         "Modes" : "0;Off;1;Heat (Default);2;Cool;3;Energy Heat;",
         "Name" : "Thermostat Mode",
         "Notifications" : "false",
         "PlanID" : "0",
         "PlanIDs" : [ 0 ],
         "Protected" : false,
         "ShowNotifications" : true,
         "SignalLevel" : "-",
         "SubType" : "Thermostat Mode",
         "Timers" : "false",
         "Type" : "General",
         "TypeImg" : "mode",
         "Unit" : 1,
         "Used" : 1,
         "XOffset" : "0",
         "YOffset" : "0",
         "idx" : "329"
      }
   ],
   "status" : "OK",
   "title" : "Devices"
}
Solar radiation, now Dashticz shows it as a switch

Code: Select all

{
   "ActTime" : 1493976213,
   "ServerTime" : "2017-05-05 12:23:33",
   "Sunrise" : "05:01",
   "Sunset" : "21:41",
   "result" : [
      {
         "AddjMulti" : 1.0,
         "AddjMulti2" : 1.0,
         "AddjValue" : 0.0,
         "AddjValue2" : 0.0,
         "BatteryLevel" : 255,
         "CustomImage" : 0,
         "Data" : "347.2 Watt/m2",
         "Description" : "",
         "Favorite" : 0,
         "HardwareID" : 9,
         "HardwareName" : "Dark Sky",
         "HardwareType" : "DarkSky (Weather Lookup)",
         "HardwareTypeVal" : 25,
         "HaveTimeout" : false,
         "ID" : "0",
         "LastUpdate" : "2017-05-05 12:14:53",
         "Name" : "Solar",
         "Notifications" : "false",
         "PlanID" : "0",
         "PlanIDs" : [ 0 ],
         "Protected" : false,
         "Radiation" : 347.19999999999999,
         "ShowNotifications" : true,
         "SignalLevel" : "-",
         "SubType" : "Solar Radiation",
         "SwitchTypeVal" : 0,
         "Timers" : "false",
         "Type" : "General",
         "TypeImg" : "radiation",
         "Unit" : 1,
         "Used" : 1,
         "XOffset" : "0",
         "YOffset" : "0",
         "forecast_url" : "aHR0cHM6Ly9kYXJrc2t5Lm5ldC8jL2YvNjEuNjM2NjUzJTJDJTIwMjMuNzg3MjA1",
         "idx" : "115"
      }
   ],
   "status" : "OK",
   "title" : "Devices"
}
Added in latest beta!
User avatar
mlamie
Posts: 122
Joined: Friday 25 October 2013 17:12
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.5877
Location: The Netherlands
Contact:

Re: Dashticz - General Discussions

Post by mlamie »

I really like the Dashticz dashboard, the only issue for me to use it, is the power consumption. My wall tablet (nexus 7 2013) can't charge fast enough. The USB cable is to long and I need to change things, now it is located next to the thermostat. I used 2 wires connected to the thermostat and the other 2 wires for charging. The charger is located at my HR-kettle.

I now use ImperiHome, which does not drain the battery so fast and can be used 24/7 with the right display brightness.

Is there a way to improve power usage (other browser, refresh rate...) Any suggestions?
Raspberry Pi 3, RaZberry, RFXtrx433
Various Z-Wave devices, KlikAanKlikUit devices, ESP8266 NodeMCU, Sonoff POW and a Essent E-thermostaat
IP camera: Dahua 4MP IPC-HDBW4421R-AS, Vivotek FD8134V
woody4165
Posts: 476
Joined: Monday 14 March 2016 13:55
Target OS: Linux
Domoticz version: beta
Location: Rome, Italy
Contact:

Re: Dashticz - General Discussions

Post by woody4165 »

Hi all

I'm using the "currentweather_big" in a small size block, width 2 (below the sunrise block).

I see it in this way.

Image

Is there a way to center the text or resize it and show the weather icon on the left?

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
sander
Posts: 8
Joined: Monday 22 December 2014 22:28
Target OS: Raspberry Pi / ODroid
Domoticz version: latest..
Contact:

Re: Dashticz - General Discussions

Post by sander »

Ouch! Hansie, that did the trick, now I just need to configure, but I see manny more posts on that. At least I can access now. Thanks!
Raspberry Pi 2B+
connected: klik aan klik uit switches, dimmers, weather station, water meter (pulse)
Automation use: Blocky
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 »

robgeerts wrote:First preview of color changer:

Image
...
Hi @robgeerts

will it work also with Yeelight bulb ?

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 - General Discussions

Post by robgeerts »

Dont know yet, the color choosing is a bit hard for me, especially because I dont have any colored lights...
woody4165
Posts: 476
Joined: Monday 14 March 2016 13:55
Target OS: Linux
Domoticz version: beta
Location: Rome, Italy
Contact:

Re: Dashticz - General Discussions

Post by woody4165 »

The hue plugin is still on going, isn't it?

I will try to understand if I can contribute for yeelight...
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 - General Discussions

Post by robgeerts »

Yes, not finished yet..sorry
Blueone
Posts: 130
Joined: Friday 29 November 2013 11:30
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz - General Discussions

Post by Blueone »

robgeerts wrote:Thanks, please send me when you are done with the weekdays (Especially 'Tomorrow')
Here it is:

Code: Select all

function addToContainer(random,returnDates){
   
   var returnDatesSimple={}
   var done = {};
   for(c in returnDates){
      for(cr in returnDates[c]){
         returnDatesSimple[cr] = returnDates[c][cr];
         done[c]=true;
      }
   }

   $('.trash'+random+' .state').html('');
   var c=1;
   Object.keys(returnDatesSimple).sort().forEach(function(key) {

      var date = moment(key).format("DD-MM-YYYY");
		var currentdate = moment(Date.now()).format("DD-MM-YYYY");
		var tomorrow = moment(new Date()).add(1,'days').format("DD-MM-YYYY")
		var nextweek = (moment(new Date()).add(6,'days').format("DD-MM-YYYY"))
	
		if(date == currentdate){
			returnDatesSimple[key] = (returnDatesSimple[key]).replace(date, "Today");
			}	
		else if(date == tomorrow){
			returnDatesSimple[key] = (returnDatesSimple[key]).replace(date, "Tomorrow");
			}
		else if(date <= nextweek){
			returnDatesSimple[key] = (returnDatesSimple[key]).replace(date, moment(moment(date).format("DD-MM-YYYY")).format("dddd"));
			}	
		else {
			//console.log(date)
		}
         
      if(c<=4) $('.trash'+random+' .state').append(returnDatesSimple[key]);
      c++;
   });
}
Also changed the number of items to 4 so you have al the trash in one view. (PMD,GFT,Trash,paper). (but this could be a personal choice), I hope this code is usefull.
robgeerts
Posts: 1273
Joined: Saturday 24 January 2015 22:12
Target OS: NAS (Synology & others)
Domoticz version: 3.7067
Location: NL
Contact:

Re: Dashticz - General Discussions

Post by robgeerts »

Added to latest beta! Thanks!
Although I've changed it a bit so today/tomorrow and the daynames shows in the correct language!
Blueone
Posts: 130
Joined: Friday 29 November 2013 11:30
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz - General Discussions

Post by Blueone »

Cool, I just wanted to upload the code with the other languages, i thought about it when I already posted it.

Thanks again!
koowee
Posts: 62
Joined: Thursday 29 December 2016 18:17
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Finland
Contact:

Re: Dashticz - General Discussions

Post by koowee »

robgeerts wrote:
koowee wrote:Rob, can you add these two new device types to Dashticz

Thermostat mode selector. There is four different mode 0 = Off, 1 = Heat (Default), 2 = Cool, 3 = Energy Heat;
Spoiler: show

Code: Select all

{
   "ActTime" : 1493975839,
   "ServerTime" : "2017-05-05 12:17:19",
   "Sunrise" : "05:01",
   "Sunset" : "21:41",
   "result" : [
      {
         "AddjMulti" : 1.0,
         "AddjMulti2" : 1.0,
         "AddjValue" : 0.0,
         "AddjValue2" : 0.0,
         "BatteryLevel" : 255,
         "CustomImage" : 0,
         "Data" : "Off",
         "Description" : "",
         "Favorite" : 0,
         "HardwareID" : 4,
         "HardwareName" : "Razberry",
         "HardwareType" : "OpenZWave USB",
         "HardwareTypeVal" : 21,
         "HaveTimeout" : false,
         "ID" : "00001801",
         "LastUpdate" : "2017-05-05 12:16:43",
         "Mode" : 0,
         "Modes" : "0;Off;1;Heat (Default);2;Cool;3;Energy Heat;",
         "Name" : "Thermostat Mode",
         "Notifications" : "false",
         "PlanID" : "0",
         "PlanIDs" : [ 0 ],
         "Protected" : false,
         "ShowNotifications" : true,
         "SignalLevel" : "-",
         "SubType" : "Thermostat Mode",
         "Timers" : "false",
         "Type" : "General",
         "TypeImg" : "mode",
         "Unit" : 1,
         "Used" : 1,
         "XOffset" : "0",
         "YOffset" : "0",
         "idx" : "329"
      }
   ],
   "status" : "OK",
   "title" : "Devices"
}
Solar radiation, now Dashticz shows it as a switch
Spoiler: show

Code: Select all

{
   "ActTime" : 1493976213,
   "ServerTime" : "2017-05-05 12:23:33",
   "Sunrise" : "05:01",
   "Sunset" : "21:41",
   "result" : [
      {
         "AddjMulti" : 1.0,
         "AddjMulti2" : 1.0,
         "AddjValue" : 0.0,
         "AddjValue2" : 0.0,
         "BatteryLevel" : 255,
         "CustomImage" : 0,
         "Data" : "347.2 Watt/m2",
         "Description" : "",
         "Favorite" : 0,
         "HardwareID" : 9,
         "HardwareName" : "Dark Sky",
         "HardwareType" : "DarkSky (Weather Lookup)",
         "HardwareTypeVal" : 25,
         "HaveTimeout" : false,
         "ID" : "0",
         "LastUpdate" : "2017-05-05 12:14:53",
         "Name" : "Solar",
         "Notifications" : "false",
         "PlanID" : "0",
         "PlanIDs" : [ 0 ],
         "Protected" : false,
         "Radiation" : 347.19999999999999,
         "ShowNotifications" : true,
         "SignalLevel" : "-",
         "SubType" : "Solar Radiation",
         "SwitchTypeVal" : 0,
         "Timers" : "false",
         "Type" : "General",
         "TypeImg" : "radiation",
         "Unit" : 1,
         "Used" : 1,
         "XOffset" : "0",
         "YOffset" : "0",
         "forecast_url" : "aHR0cHM6Ly9kYXJrc2t5Lm5ldC8jL2YvNjEuNjM2NjUzJTJDJTIwMjMuNzg3MjA1",
         "idx" : "115"
      }
   ],
   "status" : "OK",
   "title" : "Devices"
}
Added in latest beta!
Thanks, now Dashticz shows correct mode!

There is also possibility to change mode In Domoticz. It can be done via device Edit-button. Can this feature also be implemented to Dashticz?
Thermostat_mode.png
Thermostat_mode.png (33.12 KiB) Viewed 2443 times
Blueone
Posts: 130
Joined: Friday 29 November 2013 11:30
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz - General Discussions

Post by Blueone »

robgeerts wrote:Added to latest beta! Thanks!
Although I've changed it a bit so today/tomorrow and the daynames shows in the correct language!
One minor change, the first letter of the day in uppercase :P

Code: Select all

function addToContainer(random,returnDates){
   
   var returnDatesSimple={}
   var done = {};
   for(c in returnDates){
      for(cr in returnDates[c]){
         returnDatesSimple[cr] = returnDates[c][cr];
         done[c]=true;
      }
   }

   $('.trash'+random+' .state').html('');
   var c=1;
   Object.keys(returnDatesSimple).sort().forEach(function(key) {

      var date = moment(key).format("DD-MM-YYYY");
      var currentdate = moment(Date.now()).format("DD-MM-YYYY");
      var tomorrow = moment(new Date()).add(1,'days').format("DD-MM-YYYY")
      var nextweek = (moment(new Date()).add(6,'days').format("DD-MM-YYYY"))
   
      if(date == currentdate){
         returnDatesSimple[key] = (returnDatesSimple[key]).replace(date, lang['today']);
         }   
      else if(date == tomorrow){
         returnDatesSimple[key] = (returnDatesSimple[key]).replace(date, lang['tomorrow']);
         }
      else if(date <= nextweek){
	 	returnDatesSimple[key] = (returnDatesSimple[key]).replace(date, moment(moment(date).format("DD-MM-YYYY")).locale('nl').format("dddd"));
		returnDatesSimple[key]= returnDatesSimple[key].charAt(0).toUpperCase() + date.slice(1);
	  }   
      else {
         //console.log(date)
      }
         
      if(c<=4) $('.trash'+random+' .state').append(returnDatesSimple[key]);
      c++;
   });
}
barbaar
Posts: 56
Joined: Wednesday 24 December 2014 16:01
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz - General Discussions

Post by barbaar »

Hi,

Just starteed using dashticz. Now I'm busybuilding a custom positioning. This works ok when I initially load the page om my Tablet. However, after the first automatic refresh, the screen s black with only the current time and outside temperature forecasts being displayed. Below you find my current CONFIG.js. On my tablet, I use the Kiosk Browser (https://play.google.com/store/apps/deta ... ully&hl=en)

Any idea what is wrong?
Spoiler: show
var _WEATHER_CITY = 'Utrecht';
var _WEATHER_COUNTRY = 'NL';
var _USE_AUTO_POSITIONING = false;
var _USE_FAVORITES = false;
var _HIDE_SECONDS_IN_CLOCK = true;
var _HIDE_MEDIAPLAYER_WHEN_OFF = false;
var _STANDBY_AFTER_MINUTES = 1;
var _USE_BEAUFORT = true;
var _TRANSLATE_SPEED = false;
var _SHOW_LASTUPDATE = true;
var _LASTUPDATE_FORMAT = 'DD-MM-YY HH:mm';
var _IDXmoonpicture = 31; //index of the uservariabele MoonPicture
var _SCREENSLIDER_EFFECT = 'slide';
var _USE_STATIC_WEATHERICONS = false; // Static or 'moving' weather icons

var _APIKEY_MAPS = 'XXXX';
var _MAPS_LATITUDE = 52.090737;
var _MAPS_LONGITUDE = 5.121420;
var _MAPS_ZOOMLEVEL = 11;

var _STREAMPLAYER_TRACKS = [
{"track":1,"name":"Q-music","file":"http://icecast-qmusic.cdp.triple-it.nl/ ... ive_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"},
];

var buttons = {}
buttons.buienradar = {width:12, isimage:true, image: 'http://api.buienradar.nl/image/1.0/Rada ... =285&h=256', url: 'http://www.weer.nl/verwachting/nederlan ... t/1811978/'}
buttons.calendar = {width:4, icon: 'fa-calendar', title: 'Kalender', url: 'https://calendar.google.com/calendar'}
buttons.radio = {width:12, image: 'img/radio_on.png', title: 'Radio', url: 'http://nederland.fm'}
buttons.nunl = {width:4, icon: 'fa-newspaper-o', title: 'Nu.nl', url: 'http://www.nu.nl'}
buttons.nzbget = {width:4, icon: 'fa-download', title: 'NZBget', url: 'http://192.168.1.5'}
buttons.moon= {width:12, isimage:true, refreshimage:60000, image: 'moon'}

var blocks = {}

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

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

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

blocks[92] = {}
blocks[92]['title'] = 'Boiler On'
blocks[92]['icon'] = 'fa-fire'

blocks[336] = {}
blocks[336]['title'] = 'Temp Buiten'

blocks[364] = {}
blocks[364]['title'] = 'Temp Binnen'

blocks['news_2'] = {}
blocks['news_2']['feed'] = 'http://feeds.nos.nl/nosnieuwsalgemeen';

blocks[106] = {}
blocks[106]['hide_stop'] = true;

var columns = {}
columns[1] = {}
columns[1]['blocks'] = ['blocktitle_1','s2',626,644,69,68,67,66,63,677,'blocktitle_2','s1',203,190,145]
columns[1]['width'] = 5;

columns[2] = {}
columns[2]['blocks'] = ['currentweather_big','weather','blocktitle_3',92,'336_1',364]
columns[2]['width'] = 5;

columns[3] = {}
columns[3]['blocks'] = ['clock',buttons.buienradar,buttons.moon]
columns[3]['width'] = 2;

var columns_standby = {}
columns_standby[1] = {}
columns_standby[1]['blocks'] = ['clock','currentweather_big','weather']
columns_standby[1]['width'] = 12;

var screens = {}
screens[1] = {}
screens[1]['background'] = 'bg1.jpg';
screens[1]['background_morning'] = 'bg_morning.jpg';
screens[1]['background_noon'] = 'bg_noon.jpg';
screens[1]['background_afternoon'] = 'bg_afternoon.jpg';
screens[1]['background_night'] = 'bg_night.jpg';
screens[1]['columns'] = [1,2,3]
Last edited by barbaar on Friday 05 May 2017 14:31, edited 1 time in total.
User avatar
HansieNL
Posts: 964
Joined: Monday 28 September 2015 15:13
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz - General Discussions

Post by HansieNL »

Blueone wrote:
robgeerts wrote:Added to latest beta! Thanks!
Although I've changed it a bit so today/tomorrow and the daynames shows in the correct language!
One minor change, the first letter of the day in uppercase :P
Spoiler: show

Code: Select all

function addToContainer(random,returnDates){
   
   var returnDatesSimple={}
   var done = {};
   for(c in returnDates){
      for(cr in returnDates[c]){
         returnDatesSimple[cr] = returnDates[c][cr];
         done[c]=true;
      }
   }

   $('.trash'+random+' .state').html('');
   var c=1;
   Object.keys(returnDatesSimple).sort().forEach(function(key) {

      var date = moment(key).format("DD-MM-YYYY");
      var currentdate = moment(Date.now()).format("DD-MM-YYYY");
      var tomorrow = moment(new Date()).add(1,'days').format("DD-MM-YYYY")
      var nextweek = (moment(new Date()).add(6,'days').format("DD-MM-YYYY"))
   
      if(date == currentdate){
         returnDatesSimple[key] = (returnDatesSimple[key]).replace(date, lang['today']);
         }   
      else if(date == tomorrow){
         returnDatesSimple[key] = (returnDatesSimple[key]).replace(date, lang['tomorrow']);
         }
      else if(date <= nextweek){
	 	returnDatesSimple[key] = (returnDatesSimple[key]).replace(date, moment(moment(date).format("DD-MM-YYYY")).locale('nl').format("dddd"));
		returnDatesSimple[key]= returnDatesSimple[key].charAt(0).toUpperCase() + date.slice(1);
	  }   
      else {
         //console.log(date)
      }
         
      if(c<=4) $('.trash'+random+' .state').append(returnDatesSimple[key]);
      c++;
   });
}
Maybe captalize the first letter of papier, restafval and plastic and change gft to GFT?
Blah blah blah
User avatar
HansieNL
Posts: 964
Joined: Monday 28 September 2015 15:13
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz - General Discussions

Post by HansieNL »

barbaar wrote:Hi,

Just starteed using dashticz. Now I'm busybuilding a custom positioning. This works ok when I initially load the page om my Tablet. However, after the first automatic refresh, the screen s black with only the current time and outside temperature forecasts being displayed. Below you find my current CONFIG.js. On my tablet, I use the Kiosk Browser (https://play.google.com/store/apps/deta ... ully&hl=en)

Any idea what is wrong?
Spoiler: show
var _WEATHER_CITY = 'Utrecht';
var _WEATHER_COUNTRY = 'NL';
var _USE_AUTO_POSITIONING = false;
var _USE_FAVORITES = false;
var _HIDE_SECONDS_IN_CLOCK = true;
var _HIDE_MEDIAPLAYER_WHEN_OFF = false;
var _STANDBY_AFTER_MINUTES = 1;
var _USE_BEAUFORT = true;
var _TRANSLATE_SPEED = false;
var _SHOW_LASTUPDATE = true;
var _LASTUPDATE_FORMAT = 'DD-MM-YY HH:mm';
var _IDXmoonpicture = 31; //index of the uservariabele MoonPicture
var _SCREENSLIDER_EFFECT = 'slide';
var _USE_STATIC_WEATHERICONS = false; // Static or 'moving' weather icons

var _APIKEY_MAPS = 'XXXX';
var _MAPS_LATITUDE = 52.090737;
var _MAPS_LONGITUDE = 5.121420;
var _MAPS_ZOOMLEVEL = 11;

var _STREAMPLAYER_TRACKS = [
{"track":1,"name":"Q-music","file":"http://icecast-qmusic.cdp.triple-it.nl/ ... ive_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"},
];

var buttons = {}
buttons.buienradar = {width:12, isimage:true, image: 'http://api.buienradar.nl/image/1.0/Rada ... =285&h=256', url: 'http://www.weer.nl/verwachting/nederlan ... t/1811978/'}
buttons.calendar = {width:4, icon: 'fa-calendar', title: 'Kalender', url: 'https://calendar.google.com/calendar'}
buttons.radio = {width:12, image: 'img/radio_on.png', title: 'Radio', url: 'http://nederland.fm'}
buttons.nunl = {width:4, icon: 'fa-newspaper-o', title: 'Nu.nl', url: 'http://www.nu.nl'}
buttons.nzbget = {width:4, icon: 'fa-download', title: 'NZBget', url: 'http://192.168.1.5'}
buttons.moon= {width:12, isimage:true, refreshimage:60000, image: 'moon'}

var blocks = {}

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

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

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

blocks[92] = {}
blocks[92]['title'] = 'Boiler On'
blocks[92]['icon'] = 'fa-fire'

blocks[336] = {}
blocks[336]['title'] = 'Temp Buiten'

blocks[364] = {}
blocks[364]['title'] = 'Temp Binnen'

blocks['news_2'] = {}
blocks['news_2']['feed'] = 'http://feeds.nos.nl/nosnieuwsalgemeen';

blocks[106] = {}
blocks[106]['hide_stop'] = true;

var columns = {}
columns[1] = {}
columns[1]['blocks'] = ['blocktitle_1','s2',626,644,69,68,67,66,63,677,'blocktitle_2','s1',203,190,145]
columns[1]['width'] = 5;

columns[2] = {}
columns[2]['blocks'] = ['currentweather_big','weather','blocktitle_3',92,'336_1',364]
columns[2]['width'] = 5;

columns[3] = {}
columns[3]['blocks'] = ['clock',buttons.buienradar,buttons.moon]
columns[3]['width'] = 2;

var columns_standby = {}
columns_standby[1] = {}
columns_standby[1]['blocks'] = ['clock','currentweather_big','weather']
columns_standby[1]['width'] = 12;

var screens = {}
screens[1] = {}
screens[1]['background'] = 'bg1.jpg';
screens[1]['background_morning'] = 'bg_morning.jpg';
screens[1]['background_noon'] = 'bg_noon.jpg';
screens[1]['background_afternoon'] = 'bg_afternoon.jpg';
screens[1]['background_night'] = 'bg_night.jpg';
screens[1]['columns'] = [1,2,3]
Nothing seems to be wrong. Your screen goes to standby after 1 minute and shows exactly what you told and have configured.
var _STANDBY_AFTER_MINUTES = 1;

var columns_standby = {}
columns_standby[1] = {}
columns_standby[1]['blocks'] = ['clock','currentweather_big','weather']
columns_standby[1]['width'] = 12;
Blah blah blah
Locked

Who is online

Users browsing this forum: No registered users and 1 guest