Page 81 of 184
Re: Dashticz v2.0, custom positioning and multiple screens
Posted: Friday 28 April 2017 14:00
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

after
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.
Re: Dashticz v2.0, custom positioning and multiple screens
Posted: Friday 28 April 2017 14:05
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"
}
}
}
Re: Dashticz v2.0, custom positioning and multiple screens
Posted: Friday 28 April 2017 14:13
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.
Re: Dashticz v2.0, custom positioning and multiple screens
Posted: Friday 28 April 2017 14:18
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?
Re: Dashticz v2.0, custom positioning and multiple screens
Posted: Friday 28 April 2017 14:22
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>';
}
Re: Dashticz v2.0, custom positioning and multiple screens
Posted: Friday 28 April 2017 14:25
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?
Re: Dashticz v2.0, custom positioning and multiple screens
Posted: Friday 28 April 2017 14:28
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

!
Re: Dashticz v2.0, custom positioning and multiple screens
Posted: Friday 28 April 2017 14:34
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
Re: Dashticz v2.0, custom positioning and multiple screens
Posted: Friday 28 April 2017 16:23
by Ierlandfan
html+='</div>';
} <<<<<try removing this one
Re: Dashticz v2.0, custom positioning and multiple screens
Posted: Friday 28 April 2017 16:39
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%?
Re: Dashticz v2.0, custom positioning and multiple screens
Posted: Friday 28 April 2017 18:32
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% !
Re: Dashticz v2.0, custom positioning and multiple screens
Posted: Friday 28 April 2017 18:53
by madrian
Apple Calendar support for iCalendar plugin is here.
How to get Apple Calendar url?

- Calendar_and_Favorites_and_Favorites.jpg (33.77 KiB) Viewed 1849 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 (24.57 KiB) Viewed 1849 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.

Re: Dashticz v2.0, custom positioning and multiple screens
Posted: Friday 28 April 2017 21:30
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.
Re: Dashticz v2.0, custom positioning and multiple screens
Posted: Friday 28 April 2017 21:39
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?
Re: Dashticz v2.0, custom positioning and multiple screens
Posted: Friday 28 April 2017 21:53
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.
Re: Dashticz v2.0, custom positioning and multiple screens
Posted: Friday 28 April 2017 22:01
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.
Re: Dashticz v2.0, custom positioning and multiple screens
Posted: Friday 28 April 2017 22:05
by b00n
@madrian
Nice work!!!
Is anyone having problems with the time in the calendar it shows my appointments 2 hours earlier ?
Re: Dashticz v2.0, custom positioning and multiple screens
Posted: Friday 28 April 2017 22:09
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

Re: Dashticz v2.0, custom positioning and multiple screens
Posted: Friday 28 April 2017 22:13
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'.
Re: Dashticz v2.0, custom positioning and multiple screens
Posted: Friday 28 April 2017 22:26
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
