Page 19 of 66

Re: NEW frontpage.html - request comments

Posted: Friday 13 February 2015 13:47
by mvveelen
Found it. Going to try to get the button the way I want it :)

Re: NEW frontpage.html - request comments

Posted: Friday 13 February 2015 13:50
by Siewert308SW
mvveelen wrote:Found it. Going to try to get the button the way I want it :)
Great...

Just started working on the popup.
This how i got it now.
Click the lock and the popup appears on screen.
Now let e see if i can include the secpanel as i want it to...

Re: NEW frontpage.html - request comments

Posted: Friday 13 February 2015 14:15
by mvveelen
Hmmm...problem with the 'Status' of the alarm-switch is that it isn't a real switch that changes the status to On or Set or Armed or anything else. It only gives me the status 'Normal'. Setting the alarm doesn't change anything.

Re: NEW frontpage.html - request comments

Posted: Friday 13 February 2015 14:17
by Siewert308SW
mvveelen wrote:Hmmm...problem with the 'Status' of the alarm-switch is that it isn't a real switch that changes the status to On or Set or Armed or anything else. It only gives me the status 'Normal'. Setting the alarm doesn't change anything.
Okay, haven't tested it so couldn't/didn't know. ;-)
btw: how did you insert the keypad in the popup?
Seems my layout is screwed up after i try to include the entire page remotely or inserted manually.

Re: NEW frontpage.html - request comments

Posted: Friday 13 February 2015 14:29
by mvveelen
See if you can use my code for it.

Temp. downloadlink here: LINK

In this package are also some unused icons, but also the code for the UP and DOWN buttons to be grey when not used. It's the frontpage I use at the moment. But.....work in progress :D

Re: NEW frontpage.html - request comments

Posted: Friday 13 February 2015 14:49
by Siewert308SW
mvveelen wrote:See if you can use my code for it.

Temp. downloadlink here: LINK

In this package are also some unused icons, but also the code for the UP and DOWN buttons to be grey when not used. It's the frontpage I use at the moment. But.....work in progress :D
Thx...

Implanted your stuff to see if it worked on my 7" tablet.
It does popup up and seems like it does work.
Could be my tablet but loading takes a few seconds.

Re: NEW frontpage.html - request comments

Posted: Friday 13 February 2015 15:05
by mvveelen
I think that might be the bottleneck :)

From work, via OpenVPN on the Pi, it takes me < 1 second to load. But hey, it only has to load once, so no big deal is iet 8-) ?

If you find a solution for changing the status of the icon: let me know what variable I could use, then I will alter the code. And if you know a way of getting the text in the description field of the cell: let me know too?

Re: NEW frontpage.html - request comments

Posted: Friday 13 February 2015 15:06
by Siewert308SW
mvveelen wrote:I think that might be the bottleneck :)

From work, via OpenVPN on the Pi, it takes me < 1 second to load. But hey, it only has to load once, so no big deal is iet 8-) ?

If you find a solution for changing the status of the icon: let me know what variable I could use, then I will alter the code. And if you know a way of getting the text in the description field of the cell: let me know too?
Working on it...

Re: NEW frontpage.html - request comments

Posted: Friday 13 February 2015 16:35
by Siewert308SW
mvveelen wrote:I think that might be the bottleneck :)

From work, via OpenVPN on the Pi, it takes me < 1 second to load. But hey, it only has to load once, so no big deal is iet 8-) ?

If you find a solution for changing the status of the icon: let me know what variable I could use, then I will alter the code. And if you know a way of getting the text in the description field of the cell: let me know too?
I had the idea to be a smartass. ;)
I had the idea to create a new virtual switch and let it controled by the secpanel via blocky.

Code: Select all

If Security = Armed
Then set <virtual switch> = on
Works as it should be.
Then i had the idea to write a extra part in de frontpage.js
But seems the iframe is opened as it should be.
But it opens as a complete new window.

Code: Select all

    // Replace ON and OFF for the virtual switch 'Alarm' by images
	if(item.idx == '173' && vdata == 'Off'){
	vdata=new String(vdata).replace( "Off","<a href class=iframe src=secpanel/index.html><img src=icons/alarm_off.png align=bottom></a>");		// Normal
        	}
	if(item.idx == '173' && vdata == 'On'){
	vdata=new String(vdata).replace( "On","<a href class=iframe src=secpanel/index.html><img src=icons/alarm_on.png align=bottom></a>");		// Armed
	}

Re: NEW frontpage.html - request comments

Posted: Friday 13 February 2015 17:08
by mvveelen
That has to do with the general code that is used when you click on a switch. That might be something to solve, but I first tried what you did....I've tried your setup with using a virtual switch, but it never turns ON. It only shows the OFF in the log file and not the ON status. Does it show the ON in your setup?

Re: NEW frontpage.html - request comments

Posted: Friday 13 February 2015 17:13
by Siewert308SW
mvveelen wrote:That has to do with the general code that is used when you click on a switch. That might be something to solve, but I first tried what you did....I've tried your setup with using a virtual switch, but it never turns ON. It only shows the OFF in the log file and not the ON status. Does it show the ON in your setup?
it does..

Code: Select all

2015-02-13 17:09:47.782 Event: triggered: Inbraak Secpanel Sleep_1
2015-02-13 17:09:47.787 Event: triggered: Inbraak Secpanel Away_1
2015-02-13 17:09:47.795 Event: triggered: test_3
Fri Feb 13 17:09:47 2015 (System) Domoticz Security Status
2015-02-13 17:09:48.121 (Alarm Home_Sleep) Lighting 2 (Alarm Sleep)
2015-02-13 17:09:48.166 (Security Panel) Lighting 2 (Security Panel)

Re: NEW frontpage.html - request comments

Posted: Saturday 14 February 2015 20:09
by maluko
on mine heater i have put letter color change with temperature like that

Code: Select all

	if(item.idx == '6' && vdata < 17){		// Temperatura muda cor conforme grau CÂș (Interior)
	alarmcss=';color:#0000FF;';
	  } else if (item.idx == '6' && vdata < 20) {
	     alarmcss=';color:#FF8000;';
	  } else if (item.idx == '6' && vdata < 50) {
	     alarmcss=';color:#FF0A0A;';

Re: NEW frontpage.html - request comments

Posted: Sunday 15 February 2015 1:25
by maluko
for control blind i have to add this code

Code: Select all

	if (vdata == 'Closed' ) {
	switchclick = 'onclick="SwitchToggle('+item.idx+', \'On\');(\'switch\', '+switch_on_timeout+', '+txt_switch_on+')"';
	alarmcss=';color:#E24E2A;';
	vdata = txt_off;
	}
	if (vdata == 'Open' ) {
	switchclick = 'onclick="SwitchToggle('+item.idx+', \'Off\');(\'switch\', '+switch_off_timeout+', '+txt_switch_off+')"';
	alarmcss=';color:#1B9772;';
	vdata = txt_on;
because the status are "Closed" and "Open"

Re: NEW frontpage.html - request comments

Posted: Sunday 15 February 2015 15:27
by mvveelen
I've managed to get a cell with a button for the security panel. When you click on it, a pop-up appears where you can enter the code to arm or disarm the alarm. The status of the alarm will be shown in the cell by changing the image (I will make another, nicer image when I find the time for it). When you click near the pop-up, the pop-up will disappear again :)

There is only one thing I can't find: the border of the cell is a bit brighter than all other borders. I want this to be the same color of course. If someone can find the solution for this :D ?

A temporary download link for this can be found here: LINK

Re: NEW frontpage.html - request comments

Posted: Sunday 15 February 2015 22:19
by Siewert308SW
mvveelen wrote:I've managed to get a cell with a button for the security panel. When you click on it, a pop-up appears where you can enter the code to arm or disarm the alarm. The status of the alarm will be shown in the cell by changing the image (I will make another, nicer image when I find the time for it). When you click near the pop-up, the pop-up will disappear again :)

There is only one thing I can't find: the border of the cell is a bit brighter than all other borders. I want this to be the same color of course. If someone can find the solution for this :D ?

A temporary download link for this can be found here: LINK
Thx...
Didn't think of that, i mean href-ing the cell.
For this does the trick.
As for you cell border, maybe it's me or my display.
But i can't see any color change.

Re: NEW frontpage.html - request comments

Posted: Monday 16 February 2015 7:00
by mvveelen
Are you using exact the same .css files? Because, as you can see, I do have a slightly brighter 'Alarm-cell' :?

Re: NEW frontpage.html - request comments

Posted: Monday 16 February 2015 8:33
by mvveelen
I've checked in another browser and it seems fine. So: in Safari it has a slightly brighter border, but in Firefox it is OK :o

Re: NEW frontpage.html - request comments

Posted: Monday 16 February 2015 12:24
by Siewert308SW
mvveelen wrote:I've checked in another browser and it seems fine. So: in Safari it has a slightly brighter border, but in Firefox it is OK :o
That could be the issues.
Not all browsers are inserting values the same.
I use firefox on laptop and tablet.
But just in case i will attach my frontpage here for you to look at.

For those who are interested.
Be aware the layout is adjusted to fir my 7" tablet.
I made some slight changes.

1. Added auto refresh of 4min in frontpage.html te reflect the buienradar screenshot to the current condition
2. Adjusted the weather icon layout to reflect your dusk sensor, it will now show the sun and moon according to the light condition
3. As per mvveelen his frontpage the Outside temperature text is colored blue when temp is below 0 degrees
4. Outside temperature text will color red when temp is 25 degrees or above
5. Changed Lock and unlock switch icon
6. Changed Alarm Status button which reflects the current alarm status
7. Changed Weather icons to HTC Sense 4 Weather Icons

Download: (temporally)
https://dl.dropboxusercontent.com/u/232 ... moticz.zip

Re: NEW frontpage.html - request comments

Posted: Monday 16 February 2015 12:38
by mvveelen
I see you actually use the same kind of code to use the day or night icons as I uploaded ;) , but if you ask me, the way I use it with the Sunrise or Sunset is better because my dusk sensor will turn on the lights when there is a thunderstorm for example, and in your code it will then show the night-icons. That doesn't seem right does it :) ?

The alarm button is nearly the same as I had, but it doesn't really look smooth enough. I'm going to try to get a similar icon as the others.

Here I go again: wouldn't it be great if someone actually could get the Skycons to work with this frontpage..... :oops: ?

Re: NEW frontpage.html - request comments

Posted: Monday 16 February 2015 12:44
by Siewert308SW
mvveelen wrote:I see you actually use the same kind of code to use the day or night icons as I uploaded ;) , but if you ask me, the way I use it with the Sunrise or Sunset is better because my dusk sensor will turn on the lights when there is a thunderstorm for example, and in your code it will then show the night-icons. That doesn't seem right does it :) ?

The alarm button is nearly the same as I had, but it doesn't really look smooth enough. I'm going to try to get a similar icon as the others.

Here I go again: wouldn't it be great if someone actually could get the Skycons to work with this frontpage..... :oops: ?
I understand but my Sunrise/Sunset is triggered by a virtual switch and my dusksensor is set to very dark.
My setup doesn't trigger that fast.
I tried your code but then my frontpage didn't load anything and i would end up with a blank page.
Will make adjustment in the future to change it according realtime sunrise/sunset time.

The Alarm icon doesn't look smooth indeed.
Tomorrow i will play with those icons to make them smoother ;-)