Re: NEW frontpage.html - request comments
Posted: Monday 25 May 2015 8:14
thanks for sharing!G3rard wrote:Here is the link to my updated frontpage.
http://we.tl/Hl5AoKa7Md
Open source Home Automation System
https://forum.domoticz.com/
thanks for sharing!G3rard wrote:Here is the link to my updated frontpage.
http://we.tl/Hl5AoKa7Md
G3rard, thanks for sharing your code.G3rard wrote:Here is the link to my updated frontpage.
...
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?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
But this is not working. Google informed me:http://<username:password@>domoticz-ip<:port>/json.htm?api-call
Is there another way to do this? Because I want to have website protection enabled.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
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).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 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.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:
But this is not working. Google informed me:http://<username:password@>domoticz-ip<:port>/json.htm?api-call
Is there another way to do this? Because I want to have website protection enabled.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
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.Luuc_a wrote:G3rard, thanks for sharing your code.G3rard wrote:Here is the link to my updated frontpage.
...
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
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!G3rard wrote: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.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:
But this is not working. Google informed me:http://<usernameassword@>domoticz-ip<
ort>/json.htm?api-call
Is there another way to do this? Because I want to have website protection enabled.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)://usernameassword@server/resource.ext
Which frontpage are you using? And what is the url of buienradar in frontpage.html?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
That looks nice. Looking forward to your code.G3rard wrote:Which frontpage are you using? And what is the url of buienradar in frontpage.html?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
I have just updated the Somfy settings of my frontpage to include the stop function.
I will upload this new version somewhere next weekend.
That looks nice. Looking forward to your code.G3rard wrote:Which frontpage are you using? And what is the url of buienradar in frontpage.html?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
I have just updated the Somfy settings of my frontpage to include the stop function.
I will upload this new version somewhere next weekend.
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 closedLuuc_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.
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);
}
Nice, Thanks again for sharingG3rard wrote: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 closedLuuc_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..
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); }
Didn't notice before but I had the same here.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
Code: Select all
<!-- <meta http-equiv="refresh" content="300" /> -->
Code: Select all
<meta http-equiv="refresh" content="300" />
I have implemented your code for the blinds but is not working for my. What kind of blind switch do you use?G3rard wrote:.....Luuc_a wrote: .....
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+')">';
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.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 partIt looks like the switch don't know the stop command.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+')">';
thanks!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" />
Well, I have edit the code to:G3rard wrote: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.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 partIt looks like the switch don't know the stop command.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+')">';
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.
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);
}
I have set the blinds with value Data in frontpage_settings.js, maybe a bit strange but it is working.