Page 32 of 66

Re: NEW frontpage.html - request comments

Posted: Monday 25 May 2015 8:14
by jeroenkl
G3rard wrote:Here is the link to my updated frontpage.
http://we.tl/Hl5AoKa7Md
thanks for sharing!

Re: NEW frontpage.html - request comments

Posted: Tuesday 26 May 2015 22:45
by roblom
Is it me or is the "custom page" link in the upper menu gone?

Re: NEW frontpage.html - request comments

Posted: Wednesday 27 May 2015 8:59
by Luuc_a
G3rard wrote:Here is the link to my updated frontpage.
...
G3rard, thanks for sharing your code.
I have modified your code to satisfy my needs.

the following is modified
- Zwave dimmers functioning again
- Implemented thermostat

The code can be downloaded here:
https://drive.google.com/file/d/0B5e3VQ ... sp=sharing

Edit: I removed the download link. Tonight I noticed that there was a little bug in the script. I will upload the new version when this is gone.
Edit2: Bugs are solved :D

Re: NEW frontpage.html - request comments

Posted: Thursday 28 May 2015 22:20
by mvveelen
G3rard wrote: - You can place the files anywhere you like. I have my frontpage running on my Synology webserver which is a different folder then Domoticz is using
Where exactly did you put your files on your Synology? I have a Synology too, and have the files in the 'www' folder. What folder did you put them in?

Re: NEW frontpage.html - request comments

Posted: Thursday 28 May 2015 22:47
by wizzard72
Is someone using website protection? When it is enabled, the frontpage is not working anymore. In the Wiki under "Domoticz API/JSON URL's" there is a format on how to integrate a username and password:
http://<username:password@>domoticz-ip<:port>/json.htm?api-call
But this is not working. Google informed me:
By default, versions of Windows Internet Explorer that were released starting with the release of security update 832894 do not support handling user names and passwords in HTTP and HTTP with Secure Sockets Layer (SSL) or HTTPS URLs. The following URL syntax is not supported in Internet Explorer or in Windows Explorer:
http(s)://username:password@server/resource.ext
Is there another way to do this? Because I want to have website protection enabled.

Re: NEW frontpage.html - request comments

Posted: Friday 29 May 2015 0:21
by G3rard
mvveelen wrote: Where exactly did you put your files on your Synology? I have a Synology too, and have the files in the 'www' folder. What folder did you put them in?
I am using the Synology webserver (https://www.synology.com/en-global/know ... orials/480). I have placed the frontpage in the web folder (made a domoticz subfolder).
You can browse to http://ip_synology/domoticz/frontpage.html.

Re: NEW frontpage.html - request comments

Posted: Friday 29 May 2015 0:25
by G3rard
wizzard72 wrote:Is someone using website protection? When it is enabled, the frontpage is not working anymore. In the Wiki under "Domoticz API/JSON URL's" there is a format on how to integrate a username and password:
http://<username:password@>domoticz-ip<:port>/json.htm?api-call
But this is not working. Google informed me:
By default, versions of Windows Internet Explorer that were released starting with the release of security update 832894 do not support handling user names and passwords in HTTP and HTTP with Secure Sockets Layer (SSL) or HTTPS URLs. The following URL syntax is not supported in Internet Explorer or in Windows Explorer:
http(s)://username:password@server/resource.ext
Is there another way to do this? Because I want to have website protection enabled.
I am not using the website protection, but I would think it works if you add your local network in the Domoticz setting page so no username and password is needed.

Re: NEW frontpage.html - request comments

Posted: Friday 29 May 2015 0:27
by G3rard
Luuc_a wrote:
G3rard wrote:Here is the link to my updated frontpage.
...
G3rard, thanks for sharing your code.
I have modified your code to satisfy my needs.

the following is modified
- Zwave dimmers functioning again
- Implemented thermostat

The code can be downloaded here:
https://drive.google.com/file/d/0B5e3VQ ... sp=sharing

Edit: I removed the download link. Tonight I noticed that there was a little bug in the script. I will upload the new version when this is gone.
Edit2: Bugs are solved :D
Great! I also saw that you added the codes for blinds. Will try these myself because now I am using a virtual switch and blockly for the blinds on my frontpage.

Re: NEW frontpage.html - request comments

Posted: Friday 29 May 2015 8:22
by wizzard72
G3rard wrote:
wizzard72 wrote:Is someone using website protection? When it is enabled, the frontpage is not working anymore. In the Wiki under "Domoticz API/JSON URL's" there is a format on how to integrate a username and password:
http://<usernameImageassword@>domoticz-ip<Imageort>/json.htm?api-call
But this is not working. Google informed me:
By default, versions of Windows Internet Explorer that were released starting with the release of security update 832894 do not support handling user names and passwords in HTTP and HTTP with Secure Sockets Layer (SSL) or HTTPS URLs. The following URL syntax is not supported in Internet Explorer or in Windows Explorer:
http(s)://usernameImageassword@server/resource.ext
Is there another way to do this? Because I want to have website protection enabled.
I am not using the website protection, but I would think it works if you add your local network in the Domoticz setting page so no username and password is needed.
Got it working. Added the local IP address, did that yesterday also, but made an type error. But still want to use a combination of username and password. My domoticz is also an alarm system. So it is not secure to give one or more IP addresses complete control over domoticz!

Re: NEW frontpage.html - request comments

Posted: Monday 08 June 2015 0:28
by floris74
Hi, iTS working Great! Only one question. Buienradar.nl doesnt refresh, it keeps cycling the same period. For example, it's still cycling around 18:00 o clock, wile it's 00:30 o'clock. Any help? And i see nice controls for my somfy screen, but not the stop button. Is there a clue for?

Floris

Re: NEW frontpage.html - request comments

Posted: Monday 08 June 2015 1:02
by G3rard
floris74 wrote:Hi, iTS working Great! Only one question. Buienradar.nl doesnt refresh, it keeps cycling the same period. For example, it's still cycling around 18:00 o clock, wile it's 00:30 o'clock. Any help? And i see nice controls for my somfy screen, but not the stop button. Is there a clue for?

Floris
Which frontpage are you using? And what is the url of buienradar in frontpage.html?

I have just updated the Somfy settings of my frontpage to include the stop function.
zonnescherm.png
zonnescherm.png (19.94 KiB) Viewed 4108 times
I will upload this new version somewhere next weekend.

Re: NEW frontpage.html - request comments

Posted: Monday 08 June 2015 11:49
by floris74
Hi, great. I havehave luuc_ his version. Don't know the html of buienradar.looking forward to your somfy version!

Re: NEW frontpage.html - request comments

Posted: Monday 08 June 2015 14:26
by Luuc_a
G3rard wrote:
floris74 wrote:Hi, iTS working Great! Only one question. Buienradar.nl doesnt refresh, it keeps cycling the same period. For example, it's still cycling around 18:00 o clock, wile it's 00:30 o'clock. Any help? And i see nice controls for my somfy screen, but not the stop button. Is there a clue for?

Floris
Which frontpage are you using? And what is the url of buienradar in frontpage.html?

I have just updated the Somfy settings of my frontpage to include the stop function.
zonnescherm.png
I will upload this new version somewhere next weekend.
That looks nice. Looking forward to your code.

I was playing arround with something like this. I was trying this with the plus and min buttons but didn't working.

Re: NEW frontpage.html - request comments

Posted: Monday 08 June 2015 14:27
by Luuc_a
G3rard wrote:
floris74 wrote:Hi, iTS working Great! Only one question. Buienradar.nl doesnt refresh, it keeps cycling the same period. For example, it's still cycling around 18:00 o clock, wile it's 00:30 o'clock. Any help? And i see nice controls for my somfy screen, but not the stop button. Is there a clue for?

Floris
Which frontpage are you using? And what is the url of buienradar in frontpage.html?

I have just updated the Somfy settings of my frontpage to include the stop function.
zonnescherm.png
I will upload this new version somewhere next weekend.
That looks nice. Looking forward to your code.

I was playing arround with something like this. I was trying this with the plus and min buttons but didn't working.

Re: NEW frontpage.html - request comments

Posted: Monday 08 June 2015 23:00
by G3rard
Luuc_a wrote: That looks nice. Looking forward to your code.

I was playing arround with something like this. I was trying this with the plus and min buttons but didn't working.
Here is the code, I changed it for the blinds (not blinds inverted etc). If the up arrow is green then the screens are open and if the down arrow is green then the screens are closed :D .
I also added the status to the desc text. You can set txt_zonon/txt_zonoff in frontpage_settings.

The new pictures are also included.

I am currently working on a better and simpler Sonos integration so you only have to include the idx and IP of your Sonos in a config file. Once that is ready I will upload the new frontpage.
I a have some time left I will also look into placing the frontpage on Github.

Code: Select all

//Blinds
	if (item.SwitchType == 'Blinds') {
		if(vdata == 'Closed') {
			if(IsNight == 'Yes') {
				var hlp = '<img src=icons/sun_stop_n.png hspace=15 vspace=10 onclick="SwitchToggle('+item.idx+', \'Stop\');lightbox_open(\'switch\', '+switch_on_timeout+', '+txt_blind_stop+')">';
			}
			else {
				var hlp = '<img src=icons/sun_stop_d.png hspace=15 vspace=10 onclick="SwitchToggle('+item.idx+', \'Stop\');lightbox_open(\'switch\', '+switch_on_timeout+', '+txt_blind_stop+')">';
			}
			var up = '<img src=icons/sun_up_off.png hspace=15 vspace=10 onclick="SwitchToggle('+item.idx+', \'Off\');lightbox_open(\'switch\', '+switch_off_timeout+', '+txt_blind_up+')">';
			var down = '<img src=icons/sun_down_on.png hspace=15 vspace=10 onclick="SwitchToggle('+item.idx+', \'On\');lightbox_open(\'switch\', '+switch_on_timeout+', '+txt_blind_down+')">';
			vdesc = vdesc + " | " + txt_zonon; //Change description text
		}
		if (vdata == 'Open') {
			if(IsNight == 'Yes') {
				var hlp = '<img src=icons/sun_stop_n.png hspace=15 vspace=10 onclick="SwitchToggle('+item.idx+', \'Stop\');lightbox_open(\'switch\', '+switch_on_timeout+', '+txt_blind_stop+')">';
			}
			else {
				var hlp = '<img src=icons/sun_stop_d.png hspace=15 vspace=10 onclick="SwitchToggle('+item.idx+', \'Stop\');lightbox_open(\'switch\', '+switch_on_timeout+', '+txt_blind_stop+')">';
			}
			//var hlp = '<span onclick="SwitchToggle('+item.idx+', \'Stop\');lightbox_open(\'switch\', '+switch_on_timeout+', '+txt_blind_stop+')">'+ "||" +'</span>';
			var up = '<img src=icons/sun_up_on.png hspace=15 vspace=10 onclick="SwitchToggle('+item.idx+', \'Off\');lightbox_open(\'switch\', '+switch_off_timeout+', '+txt_blind_up+')">';
			var down = '<img src=icons/sun_down_off.png hspace=15 vspace=10 onclick="SwitchToggle('+item.idx+', \'On\');lightbox_open(\'switch\', '+switch_on_timeout+', '+txt_blind_down+')">';
			vdesc = vdesc + " | " + txt_zonoff; //Change description text
		}
		vdata = down.concat(hlp,up);
		//console.log(vdata);
	}
icons.zip
(5.55 KiB) Downloaded 125 times

Re: NEW frontpage.html - request comments

Posted: Tuesday 09 June 2015 6:10
by Luuc_a
G3rard wrote:
Luuc_a wrote: That looks nice. Looking forward to your code.

I was playing arround with something like this. I was trying this with the plus and min buttons but didn't working.
Here is the code, I changed it for the blinds (not blinds inverted etc). If the up arrow is green then the screens are open and if the down arrow is green then the screens are closed :D .
I also added the status to the desc text. You can set txt_zonon/txt_zonoff in frontpage_settings.

The new pictures are also included.

I am currently working on a better and simpler Sonos integration so you only have to include the idx and IP of your Sonos in a config file. Once that is ready I will upload the new frontpage.
I a have some time left I will also look into placing the frontpage on Github.

Code: Select all

//Blinds
	if (item.SwitchType == 'Blinds') {
		if(vdata == 'Closed') {
			if(IsNight == 'Yes') {
				var hlp = '<img src=icons/sun_stop_n.png hspace=15 vspace=10 onclick="SwitchToggle('+item.idx+', \'Stop\');lightbox_open(\'switch\', '+switch_on_timeout+', '+txt_blind_stop+')">';
			}
			else {
				var hlp = '<img src=icons/sun_stop_d.png hspace=15 vspace=10 onclick="SwitchToggle('+item.idx+', \'Stop\');lightbox_open(\'switch\', '+switch_on_timeout+', '+txt_blind_stop+')">';
			}
			var up = '<img src=icons/sun_up_off.png hspace=15 vspace=10 onclick="SwitchToggle('+item.idx+', \'Off\');lightbox_open(\'switch\', '+switch_off_timeout+', '+txt_blind_up+')">';
			var down = '<img src=icons/sun_down_on.png hspace=15 vspace=10 onclick="SwitchToggle('+item.idx+', \'On\');lightbox_open(\'switch\', '+switch_on_timeout+', '+txt_blind_down+')">';
			vdesc = vdesc + " | " + txt_zonon; //Change description text
		}
		if (vdata == 'Open') {
			if(IsNight == 'Yes') {
				var hlp = '<img src=icons/sun_stop_n.png hspace=15 vspace=10 onclick="SwitchToggle('+item.idx+', \'Stop\');lightbox_open(\'switch\', '+switch_on_timeout+', '+txt_blind_stop+')">';
			}
			else {
				var hlp = '<img src=icons/sun_stop_d.png hspace=15 vspace=10 onclick="SwitchToggle('+item.idx+', \'Stop\');lightbox_open(\'switch\', '+switch_on_timeout+', '+txt_blind_stop+')">';
			}
			//var hlp = '<span onclick="SwitchToggle('+item.idx+', \'Stop\');lightbox_open(\'switch\', '+switch_on_timeout+', '+txt_blind_stop+')">'+ "||" +'</span>';
			var up = '<img src=icons/sun_up_on.png hspace=15 vspace=10 onclick="SwitchToggle('+item.idx+', \'Off\');lightbox_open(\'switch\', '+switch_off_timeout+', '+txt_blind_up+')">';
			var down = '<img src=icons/sun_down_off.png hspace=15 vspace=10 onclick="SwitchToggle('+item.idx+', \'On\');lightbox_open(\'switch\', '+switch_on_timeout+', '+txt_blind_down+')">';
			vdesc = vdesc + " | " + txt_zonoff; //Change description text
		}
		vdata = down.concat(hlp,up);
		//console.log(vdata);
	}
icons.zip
Nice, Thanks again for sharing

Re: NEW frontpage.html - request comments

Posted: Tuesday 09 June 2015 11:41
by Luuc_a
floris74 wrote:Hi, iTS working Great! Only one question. Buienradar.nl doesnt refresh, it keeps cycling the same period. For example, it's still cycling around 18:00 o clock, wile it's 00:30 o'clock. Any help? And i see nice controls for my somfy screen, but not the stop button. Is there a clue for?

Floris
Didn't notice before but I had the same here.
You can solve this by editing the file frontpage.html. Look for:

Code: Select all

<!-- <meta http-equiv="refresh" content="300" /> -->
and edit to

Code: Select all

<meta http-equiv="refresh" content="300" />
the frontpage will refresh every 300 seconds.
G3rard wrote:
Luuc_a wrote: .....
.....
I have implemented your code for the blinds but is not working for my. What kind of blind switch do you use?
I have tested it with a dummy blind switch and when I load the frontpage it will crash. It crashed at this part

Code: Select all

var hlp = '<img src=icons/sun_stop_n.png hspace=15 vspace=10 onclick="SwitchToggle('+item.idx+', \'Stop\');lightbox_open(\'switch\', '+switch_on_timeout+', '+txt_blind_stop+')">';
It looks like the switch don't know the stop command.

Re: NEW frontpage.html - request comments

Posted: Tuesday 09 June 2015 22:42
by G3rard
Luuc_a wrote:
I have implemented your code for the blinds but is not working for my. What kind of blind switch do you use?
I have tested it with a dummy blind switch and when I load the frontpage it will crash. It crashed at this part

Code: Select all

var hlp = '<img src=icons/sun_stop_n.png hspace=15 vspace=10 onclick="SwitchToggle('+item.idx+', \'Stop\');lightbox_open(\'switch\', '+switch_on_timeout+', '+txt_blind_stop+')">';
It looks like the switch don't know the stop command.
I am using it for 2 Somfy blinds with a stop function. I checked in Domoticz which code was sent when stopping the blinds. That was 'Stop' which I added in the onclick part.

If you replace Stop by On in the onclick part is it then working with the dumy switch?

I have set the blinds with value Data in frontpage_settings.js, maybe a bit strange but it is working :D.

Re: NEW frontpage.html - request comments

Posted: Tuesday 09 June 2015 23:53
by floris74
Didn't notice before but I had the same here.
You can solve this by editing the file frontpage.html. Look for:

Code: Select all
<!-- <meta http-equiv="refresh" content="300" /> -->



and edit to

Code: Select all
<meta http-equiv="refresh" content="300" />
thanks!

hope to test my somfy in the next few days.

Re: NEW frontpage.html - request comments

Posted: Wednesday 10 June 2015 8:05
by Luuc_a
G3rard wrote:
Luuc_a wrote:
I have implemented your code for the blinds but is not working for my. What kind of blind switch do you use?
I have tested it with a dummy blind switch and when I load the frontpage it will crash. It crashed at this part

Code: Select all

var hlp = '<img src=icons/sun_stop_n.png hspace=15 vspace=10 onclick="SwitchToggle('+item.idx+', \'Stop\');lightbox_open(\'switch\', '+switch_on_timeout+', '+txt_blind_stop+')">';
It looks like the switch don't know the stop command.
I am using it for 2 Somfy blinds with a stop function. I checked in Domoticz which code was sent when stopping the blinds. That was 'Stop' which I added in the onclick part.

If you replace Stop by On in the onclick part is it then working with the dumy switch?

I have set the blinds with value Data in frontpage_settings.js, maybe a bit strange but it is working :D.
Well, I have edit the code to:

Code: Select all

//Blinds
	if (item.SwitchType == 'Blinds') {
		if(vdata == 'Closed') {
			var up = '<img src=icons/sun_up_off.png hspace=15 vspace=10 onclick="SwitchToggle('+item.idx+', \'Off\');lightbox_open(\'switch\', '+switch_off_timeout+', '+txt_blind_up+')">';
			var down = '<img src=icons/sun_down_on.png hspace=15 vspace=10 onclick="SwitchToggle('+item.idx+', \'On\');lightbox_open(\'switch\', '+switch_on_timeout+', '+txt_blind_down+')">';
			vdesc = vdesc + " | " + txt_zonon; //Change description text
		}
		if (vdata == 'Open') {
			var up = '<img src=icons/sun_up_on.png hspace=15 vspace=10 onclick="SwitchToggle('+item.idx+', \'Off\');lightbox_open(\'switch\', '+switch_off_timeout+', '+txt_blind_up+')">';
			var down = '<img src=icons/sun_down_off.png hspace=15 vspace=10 onclick="SwitchToggle('+item.idx+', \'On\');lightbox_open(\'switch\', '+switch_on_timeout+', '+txt_blind_down+')">';
			vdesc = vdesc + " | " + txt_zonoff; //Change description text
		}
		vdata = down.concat(up);
		//console.log(vdata);
	}
so I only have a up and down button and this is working for blinds with only On/Off status.

and what doe you mean with?
I have set the blinds with value Data in frontpage_settings.js, maybe a bit strange but it is working :D.