Dashticz - General Discussions

Dashticz, alternative dashboard based on HTML, CSS, jQuery

Moderators: leecollings, htilburgs, robgeerts

Locked
User avatar
gielie
Posts: 290
Joined: Tuesday 12 January 2016 11:40
Target OS: Raspberry Pi / ODroid
Domoticz version: latest β
Location: The Netherlands (Alkmaar)
Contact:

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

Post by gielie »

Can someone help with the following problem.
Rob created some code to change the on/off status with af/aanwezig in the following code

Code: Select all

else if(parseFloat(device['idx'])==6 && device['Name']=='Thuis'){ //Special made for HansieNL! :)
							   $('.block_'+idx).attr('onclick','switchDevice(this)');
							   html+='<div class="col-xs-4 col-icon">';
								  if(device['Status']=='Off') html+='<img src="img/switch_off.png" class="off icon" />';
								  else html+='<img src="img/switch_on.png" class="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>';
But when i use this in my own settings i get the following
before
Image
after
Image


So the icon isn't showing correct, how can this be fixed?


I also like to change the colour of the fan icon, but because this is a .png within the img folder i don't know how. I tried to change the fan_off.png but that doesn't work, if i change the fan.png both on and off are changing. Can someone point m i the right direction.
- Aeon Labs USB Stick met Z-wave plus
- Aeotec MultiSensor 6
- FIBARO FGS223
- FIBARO FGWPE Wall Plug
- Neo CoolCam Power plug
- Popp Smoke Detector
- Toon
- Kodi Media Server
Ierlandfan
Posts: 89
Joined: Friday 09 October 2015 17:40
Target OS: Linux
Domoticz version:
Contact:

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

Post by Ierlandfan »

@mvveelen, it looks like you're recieving the wrong code.

In the code i can see a string search for the word "Moonphase" or somethin alike. You're output isnt showing that.
Let me look at the right output. I''ll put it here in a sec.
To check yourself:

sudo curl -s http://api.wunderground.com/api/api-key ... Hoorn.json
I don't think the output would differ that much from where I live (There are three sort of the same cities and it's not Enkhuizen)

{
"response": {
"version":"0.1",
"termsofService":"http://www.wunderground.com/weather/api/d/terms.html",
"features": {
"astronomy": 1
}
}
, "moon_phase": {
"percentIlluminated":"6",
"ageOfMoon":"2",
"phaseofMoon":"Waxing Crescent",
"hemisphere":"North",
"current_time": {
"hour":"14",
"minute":"10"
},
"sunrise": {
"hour":"6",
"minute":"13"
},
"sunset": {
"hour":"21",
"minute":"01"
},
"moonrise": {
"hour":"7",
"minute":"54"
},
"moonset": {
"hour":"23",
"minute":"34"
}
},
"sun_phase": {
"sunrise": {
"hour":"6",
"minute":"13"
},
"sunset": {
"hour":"21",
"minute":"01"
}
}
}
Last edited by Ierlandfan on Friday 28 April 2017 14:16, edited 1 time in total.
poudenes
Posts: 667
Joined: Wednesday 08 March 2017 9:42
Target OS: Linux
Domoticz version: 3.8993
Location: Amsterdam
Contact:

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

Post by poudenes »

Can you add IDX devices that have a TEXT setup ? When i want add one it shown as a switch... :)
tried everything but can't get it good to see the text into the dashboard.
RPi3 B+, Debain Stretch, Domoticz, Homebridge, Dashticz, RFLink, Milight, Z-Wave, Fibaro, Nanoleaf, Nest, Harmony Hub, Now try to understand pass2php
sonar
Posts: 18
Joined: Saturday 31 January 2015 11:19
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Contact:

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

Post by sonar »

gielie wrote:Can someone help with the following problem.
Rob created some code to change the on/off status with af/aanwezig in the following code

Code: Select all

								  if(device['Status']=='Off') html+='<img src="img/switch_off.png" class="off icon" />';
								  else html+='<img src="img/switch_on.png" class="on icon" />';
Are you sure the folder img contains the two files: switch_off.png and switch_on.png?
Ierlandfan
Posts: 89
Joined: Friday 09 October 2015 17:40
Target OS: Linux
Domoticz version:
Contact:

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

Post by Ierlandfan »

For the "text" switch:

In main.js around line 940 you '' ll find this piece of code

Code: Select all

else if(device['Type']=='Group' || device['Type']=='Scene'){
                       if(device['Type']=='Group') $('.block_'+idx).attr('onclick','switchDevice(this)');
                       if(device['Type']=='Scene') $('.block_'+idx).attr('onclick','switchGroup(this)');

       if(buttonimg==''){
       if(device['Status']=='Off') html+=iconORimage(idx,'fa-lightbulb-o','','off icon');
       else html+=iconORimage(idx,'fa-lightbulb-o','','on icon');
        }
        else {
       if(device['Status']=='Off') html+=iconORimage(idx,'',buttonimg+'.png','off icon');
       else html+=iconORimage(idx,'',buttonimg+'.png','on icon');
       }
Put this piece of code BELOW

Code: Select all

else if(device['SubType']=='Text'){ 
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['Data']+'</strong><br />';
html+='<span class="state">'+device['Name']+'</span>';
}
else {
html+='<strong class="title">'+device['Name']+'</strong><br />';
html+='<span class="state">'+device['Data']+'</span>';
}
html+='</div>';
} 
User avatar
gielie
Posts: 290
Joined: Tuesday 12 January 2016 11:40
Target OS: Raspberry Pi / ODroid
Domoticz version: latest β
Location: The Netherlands (Alkmaar)
Contact:

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

Post by gielie »

sonar wrote:
gielie wrote:Can someone help with the following problem.
Rob created some code to change the on/off status with af/aanwezig in the following code

Code: Select all

								  if(device['Status']=='Off') html+='<img src="img/switch_off.png" class="off icon" />';
								  else html+='<img src="img/switch_on.png" class="on icon" />';
Are you sure the folder img contains the two files: switch_off.png and switch_on.png?
That was the problem, there is no which_off/on image, ok that solved that problem.

i figured it out and used this code.

Code: Select all

 
 
 
 else if(parseFloat(device['idx'])==6 && device['Name']=='Thuis'){ //Special made for HansieNL! :)
							   $('.block_'+idx).attr('onclick','switchDevice(this)');
							   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>';
							   
I want to prevend a write over by the next update, how can i put this code in a custom file so it won't be overwritten?
Last edited by gielie on Friday 28 April 2017 14:51, edited 1 time in total.
- Aeon Labs USB Stick met Z-wave plus
- Aeotec MultiSensor 6
- FIBARO FGS223
- FIBARO FGWPE Wall Plug
- Neo CoolCam Power plug
- Popp Smoke Detector
- Toon
- Kodi Media Server
User avatar
mvveelen
Posts: 678
Joined: Friday 31 October 2014 10:22
Target OS: NAS (Synology & others)
Domoticz version: Beta
Location: Hoorn, The Netherlands
Contact:

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

Post by mvveelen »

Ierlandfan wrote:@mvveelen, it looks like you're recieving the wrong code.

In the code i can see a string search for the word "Moonphase" or somethin alike. You're output isnt showing that.
Let me look at the right output. I''ll put it here in a sec.
To check yourself:

sudo curl -s http://api.wunderground.com/api/api-key ... Hoorn.json
I don't think the output would differ that much from where I live (There are three sort of the same cities and it's not Enkhuizen)

{
"response": {
"version":"0.1",
"termsofService":"http://www.wunderground.com/weather/api/d/terms.html",
"features": {
"astronomy": 1
}
}
, "moon_phase": {
"percentIlluminated":"6",
"ageOfMoon":"2",
"phaseofMoon":"Waxing Crescent",
"hemisphere":"North",
"current_time": {
"hour":"14",
"minute":"10"
},
"sunrise": {
"hour":"6",
"minute":"13"
},
"sunset": {
"hour":"21",
"minute":"01"
},
"moonrise": {
"hour":"7",
"minute":"54"
},
"moonset": {
"hour":"23",
"minute":"34"
}
},
"sun_phase": {
"sunrise": {
"hour":"6",
"minute":"13"
},
"sunset": {
"hour":"21",
"minute":"01"
}
}
}
Almost neighbors :) ??

Wow......when I use "Enkhuizen" it works, I get a whole other output. Will look into it, probably "Kersenboogerd" will work, because that also worked for the weather forecast. Such a stupid error.....

But hey, thanks a lot, it now works and I see a very small piece of the moon on my dashboard :D !
RPi3b+/RFXCOM rfxtrx433E/Shelly/Xiaomi Gateway/Philips HUE Lights/Atag Zone One/2 SunnyBoy inverters/AirconWithMe/P1 smartmeter/Domoticz latest Beta
User avatar
gielie
Posts: 290
Joined: Tuesday 12 January 2016 11:40
Target OS: Raspberry Pi / ODroid
Domoticz version: latest β
Location: The Netherlands (Alkmaar)
Contact:

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

Post by gielie »

Ierlandfan wrote:For the "text" switch:

In main.js around line 940 you '' ll find this piece of code

Code: Select all

else if(device['Type']=='Group' || device['Type']=='Scene'){
                       if(device['Type']=='Group') $('.block_'+idx).attr('onclick','switchDevice(this)');
                       if(device['Type']=='Scene') $('.block_'+idx).attr('onclick','switchGroup(this)');

       if(buttonimg==''){
       if(device['Status']=='Off') html+=iconORimage(idx,'fa-lightbulb-o','','off icon');
       else html+=iconORimage(idx,'fa-lightbulb-o','','on icon');
        }
        else {
       if(device['Status']=='Off') html+=iconORimage(idx,'',buttonimg+'.png','off icon');
       else html+=iconORimage(idx,'',buttonimg+'.png','on icon');
       }
Put this piece of code BELOW

Code: Select all

else if(device['SubType']=='Text'){ 
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['Data']+'</strong><br />';
html+='<span class="state">'+device['Name']+'</span>';
}
else {
html+='<strong class="title">'+device['Name']+'</strong><br />';
html+='<span class="state">'+device['Data']+'</span>';
}
html+='</div>';
} 
I tried this code but then i got nothing (dashboard is not loading), i can't figure out whats wrong. On my system its on line 1045
- Aeon Labs USB Stick met Z-wave plus
- Aeotec MultiSensor 6
- FIBARO FGS223
- FIBARO FGWPE Wall Plug
- Neo CoolCam Power plug
- Popp Smoke Detector
- Toon
- Kodi Media Server
Ierlandfan
Posts: 89
Joined: Friday 09 October 2015 17:40
Target OS: Linux
Domoticz version:
Contact:

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

Post by Ierlandfan »

html+='</div>';
} <<<<<try removing this one
Dropshot
Posts: 44
Joined: Tuesday 20 December 2016 22:29
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post by Dropshot »

I can't get my dimmable lights to 100%. If I use the slider, it gets only to 99%. I saw the same in other dashboards. Of course this difference is not visible to the naked eye, but would it be possible to make a change so the dashboard says 100%?
poudenes
Posts: 667
Joined: Wednesday 08 March 2017 9:42
Target OS: Linux
Domoticz version: 3.8993
Location: Amsterdam
Contact:

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

Post by poudenes »

Dropshot wrote:I can't get my dimmable lights to 100%. If I use the slider, it gets only to 99%. I saw the same in other dashboards. Of course this difference is not visible to the naked eye, but would it be possible to make a change so the dashboard says 100%?
In Domoticz it will not goto 100% as well... :) 99% is the new 100% !
RPi3 B+, Debain Stretch, Domoticz, Homebridge, Dashticz, RFLink, Milight, Z-Wave, Fibaro, Nanoleaf, Nest, Harmony Hub, Now try to understand pass2php
madrian
Posts: 231
Joined: Saturday 27 August 2016 1:18
Target OS: -
Domoticz version:
Contact:

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

Post by madrian »

Apple Calendar support for iCalendar plugin is here.

How to get Apple Calendar url?
Calendar_and_Favorites_and_Favorites.jpg
Calendar_and_Favorites_and_Favorites.jpg (33.77 KiB) Viewed 1708 times
How to get Google Calendar url?

On settings page go to Calendars tab, click on your Calendar name then find Private Access row (or Calendar Address if you set your Calendar public):
Google_Calendar_-_Details.jpg
Google_Calendar_-_Details.jpg (24.57 KiB) Viewed 1708 times
One thing is missing: auto update calendar (at this time it is refreshing when you hit the refresh button).

Here is my idea: maybe if we ask Rob nicely, then he will check this part. :)
sonar
Posts: 18
Joined: Saturday 31 January 2015 11:19
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Contact:

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

Post by sonar »

Am I the only one that thinks it is not a good development that we are relying on https://crossorigin.me/ more and more?
Would it not be better to have a proxy in the code of Dashticz?

Some quotes from his site:
- PLEASE DO NOT USE THE PROXY ON A PRODUCTION SITE.
- I cannot guarantee the stability of the service, and you will probably experience service interruptions.
- And, as always, don't send sensitive information through the proxy. This is a good rule of thumb for any third party service.
- There is a 2MB size limit on files passed through the proxy
- etc.
Last edited by sonar on Friday 28 April 2017 21:40, edited 1 time in total.
User avatar
mvveelen
Posts: 678
Joined: Friday 31 October 2014 10:22
Target OS: NAS (Synology & others)
Domoticz version: Beta
Location: Hoorn, The Netherlands
Contact:

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

Post by mvveelen »

madrian wrote:Apple Calendar support for iCalendar plugin is here.

How to get Apple Calendar url?

Calendar_and_Favorites_and_Favorites.jpg

How to get Google Calendar url?

On settings page go to Calendars tab, click on your Calendar name then find Private Access row (or Calendar Address if you set your Calendar public):

Google_Calendar_-_Details.jpg

One thing is missing: auto update calendar (at this time it is refreshing when you hit the refresh button).

Here is my idea: maybe if we ask Rob nicely, then he will check this part. :)
Nice add-on !!

2 questions:

- If I make my iCloud calendar public, what 'risk' will I take? Can people see into my Calendar somehow?
- If I alter the code, like you explained earlier, and I update to the latest (beta), all code will be deleted, right?
RPi3b+/RFXCOM rfxtrx433E/Shelly/Xiaomi Gateway/Philips HUE Lights/Atag Zone One/2 SunnyBoy inverters/AirconWithMe/P1 smartmeter/Domoticz latest Beta
madrian
Posts: 231
Joined: Saturday 27 August 2016 1:18
Target OS: -
Domoticz version:
Contact:

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

Post by madrian »

mvveelen wrote:
madrian wrote:Apple Calendar support for iCalendar plugin is here.

How to get Apple Calendar url?

Calendar_and_Favorites_and_Favorites.jpg

How to get Google Calendar url?

On settings page go to Calendars tab, click on your Calendar name then find Private Access row (or Calendar Address if you set your Calendar public):

Google_Calendar_-_Details.jpg

One thing is missing: auto update calendar (at this time it is refreshing when you hit the refresh button).

Here is my idea: maybe if we ask Rob nicely, then he will check this part. :)
Nice add-on !!

2 questions:

- If I make my iCloud calendar public, what 'risk' will I take? Can people see into my Calendar somehow?
- If I alter the code, like you explained earlier, and I update to the latest (beta), all code will be deleted, right?
A. nothing, only when you share that URL with someone else. No else can view your Calendar.
B, Better wait for Rob, in a couple of hours he going to merge the request.
User avatar
EdwinK
Posts: 1820
Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:

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

Post by EdwinK »

sonar wrote:Am I the only one that thinks it is not a good development that we are relying on https://crossorigin.me/ more and more?
Would it not be better to have a proxy in the code of Dashticz?

Some quotes from his site:
- PLEASE DO NOT USE THE PROXY ON A PRODUCTION SITE.
- I cannot guarantee the stability of the service, and you will probably experience service interruptions.
- And, as always, don't send sensitive information through the proxy. This is a good rule of thumb for any third party service.
- There is a 2MB size limit on files passed through the proxy
- etc.
I agree with you. I believe this is running on some blokes computer. Not sure if it's something that could /should be done in the Dashboard.
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
b00n
Posts: 26
Joined: Saturday 15 April 2017 12:28
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: The Netherlands
Contact:

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

Post by b00n »

@madrian

Nice work!!!

Is anyone having problems with the time in the calendar it shows my appointments 2 hours earlier ?
User avatar
EdwinK
Posts: 1820
Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:

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

Post by EdwinK »

b00n wrote:@madrian

Nice work!!!

Is anyone having problems with the time in the calendar it shows my appointments 2 hours earlier ?
At least you will be on time :)
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
User avatar
EdwinK
Posts: 1820
Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:

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

Post by EdwinK »

[quote="gielie"]Can someone help with the following problem.
Rob created some code to change the on/off status with af/aanwezig in the following code

Removed the code to shorten this post ;)

Where exactly should this code be placed? I rather be 'aanwezig' then 'on'.
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
b00n
Posts: 26
Joined: Saturday 15 April 2017 12:28
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: The Netherlands
Contact:

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

Post by b00n »

EdKo66 wrote:
b00n wrote:@madrian

Nice work!!!

Is anyone having problems with the time in the calendar it shows my appointments 2 hours earlier ?
At least you will be on time :)

hahahah indeed :o :lol:
Locked

Who is online

Users browsing this forum: No registered users and 1 guest