NEW frontpage.html - request comments

Moderator: leecollings

jeroenkl
Posts: 113
Joined: Sunday 14 July 2013 22:00
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: NL
Contact:

Re: NEW frontpage.html - request comments

Post by jeroenkl »

G3rard wrote:Here is the link to my updated frontpage.
http://we.tl/Hl5AoKa7Md
thanks for sharing!
roblom
Posts: 402
Joined: Wednesday 26 February 2014 15:28
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: the Netherlands
Contact:

Re: NEW frontpage.html - request comments

Post by roblom »

Is it me or is the "custom page" link in the upper menu gone?
Luuc_a
Posts: 24
Joined: Tuesday 16 July 2013 10:12
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: NEW frontpage.html - request comments

Post 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
User avatar
mvveelen
Posts: 687
Joined: Friday 31 October 2014 10:22
Target OS: NAS (Synology & others)
Domoticz version: Beta
Location: Hoorn, The Netherlands
Contact:

Re: NEW frontpage.html - request comments

Post 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?
RPi3b+/RFXCOM rfxtrx433E/Shelly/Xiaomi Gateway/Philips HUE Lights/Atag Zone One/2 SunnyBoy inverters/AirconWithMe/P1 smartmeter/Domoticz latest Beta
wizzard72
Posts: 116
Joined: Friday 20 December 2013 7:45
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: NEW frontpage.html - request comments

Post 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.
User avatar
G3rard
Posts: 669
Joined: Wednesday 04 March 2015 22:15
Target OS: -
Domoticz version: No
Location: The Netherlands
Contact:

Re: NEW frontpage.html - request comments

Post 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.
Not using Domoticz anymore
User avatar
G3rard
Posts: 669
Joined: Wednesday 04 March 2015 22:15
Target OS: -
Domoticz version: No
Location: The Netherlands
Contact:

Re: NEW frontpage.html - request comments

Post 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.
Not using Domoticz anymore
User avatar
G3rard
Posts: 669
Joined: Wednesday 04 March 2015 22:15
Target OS: -
Domoticz version: No
Location: The Netherlands
Contact:

Re: NEW frontpage.html - request comments

Post 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.
Not using Domoticz anymore
wizzard72
Posts: 116
Joined: Friday 20 December 2013 7:45
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: NEW frontpage.html - request comments

Post 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!
floris74
Posts: 75
Joined: Sunday 30 November 2014 8:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Hoorn, Netherlands
Contact:

Re: NEW frontpage.html - request comments

Post 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
User avatar
G3rard
Posts: 669
Joined: Wednesday 04 March 2015 22:15
Target OS: -
Domoticz version: No
Location: The Netherlands
Contact:

Re: NEW frontpage.html - request comments

Post 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 4104 times
I will upload this new version somewhere next weekend.
Not using Domoticz anymore
floris74
Posts: 75
Joined: Sunday 30 November 2014 8:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Hoorn, Netherlands
Contact:

Re: NEW frontpage.html - request comments

Post by floris74 »

Hi, great. I havehave luuc_ his version. Don't know the html of buienradar.looking forward to your somfy version!
Luuc_a
Posts: 24
Joined: Tuesday 16 July 2013 10:12
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: NEW frontpage.html - request comments

Post 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.
Luuc_a
Posts: 24
Joined: Tuesday 16 July 2013 10:12
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: NEW frontpage.html - request comments

Post 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.
User avatar
G3rard
Posts: 669
Joined: Wednesday 04 March 2015 22:15
Target OS: -
Domoticz version: No
Location: The Netherlands
Contact:

Re: NEW frontpage.html - request comments

Post 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
Not using Domoticz anymore
Luuc_a
Posts: 24
Joined: Tuesday 16 July 2013 10:12
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: NEW frontpage.html - request comments

Post 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
Luuc_a
Posts: 24
Joined: Tuesday 16 July 2013 10:12
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: NEW frontpage.html - request comments

Post 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.
User avatar
G3rard
Posts: 669
Joined: Wednesday 04 March 2015 22:15
Target OS: -
Domoticz version: No
Location: The Netherlands
Contact:

Re: NEW frontpage.html - request comments

Post 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.
Not using Domoticz anymore
floris74
Posts: 75
Joined: Sunday 30 November 2014 8:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Hoorn, Netherlands
Contact:

Re: NEW frontpage.html - request comments

Post 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.
Luuc_a
Posts: 24
Joined: Tuesday 16 July 2013 10:12
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: NEW frontpage.html - request comments

Post 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.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest