Page 12 of 66

Re: NEW frontpage.html - request comments

Posted: Wednesday 28 January 2015 21:10
by mvveelen
jan_nl, in the past (...) I used the following code to change the background color of a cell, or the font color when a certain level was reached. This doesn't work anymore. Can you help me fix it again, using your code ?

Code: Select all

	// set the background color of the DIV when a certain limit has been reached
	if(item.idx == '1' && vdata > 50){
	alarmcss=';background-color:#FF0000;';
	}
	if(item.idx == '5' && vdata > 40){
	alarmcss=';background-color:#FF0000;';
	}
	if(item.idx == '31' && vdata < 0){        // it's freezing outside
	alarmcss=';background-color:#0000FF;';
	}

Re: NEW frontpage.html - request comments

Posted: Wednesday 28 January 2015 21:25
by floris74
BTW: the rain forecast screen size can be changed in the css file, look for the .camera class at the bottom.
thanks, i changed it to W 280 H 216.
Floris

Re: NEW frontpage.html - request comments

Posted: Wednesday 28 January 2015 21:41
by jannl
mvveelen wrote:jan_nl, in the past (...) I used the following code to change the background color of a cell, or the font color when a certain level was reached. This doesn't work anymore. Can you help me fix it again, using your code ?

Code: Select all

	// set the background color of the DIV when a certain limit has been reached
	if(item.idx == '1' && vdata > 50){
	alarmcss=';background-color:#FF0000;';
	}
	if(item.idx == '5' && vdata > 40){
	alarmcss=';background-color:#FF0000;';
	}
	if(item.idx == '31' && vdata < 0){        // it's freezing outside
	alarmcss=';background-color:#0000FF;';
	}

hm, should still work.
Oops, there is a line alarmcss='';
This line should be way higher in the code, just before
//Push on ....

Re: NEW frontpage.html - request comments

Posted: Wednesday 28 January 2015 21:58
by mvveelen
jan_nl wrote: hm, should still work.
Oops, there is a line alarmcss='';
This line should be way higher in the code, just before
//Push on ....
Yes, that's it :mrgreen: Thanks again !

Edit: nope....not working for all cells.....hmmm....weird :shock:

Re: NEW frontpage.html - request comments

Posted: Thursday 29 January 2015 0:19
by maluko
sorry,but cant get the blind working on my.

Re: NEW frontpage.html - request comments

Posted: Thursday 29 January 2015 6:51
by jannl
Do your blinds do anything when you press a button?

Re: NEW frontpage.html - request comments

Posted: Thursday 29 January 2015 10:11
by maluko
jan_nl wrote:Do your blinds do anything when you press a button?
not, i have put like a 'status' on cel configuration, and only appears close but dont respond to touch, the light its work but not inverter blind.

i think the best way to put blind on frontpage will be with 2 bottons (one open and other close) because like i said before the x10 blind dont are compatible with dimmer so when i want to stop at midle i have to touch on same botton before.
ex: total seconds to open or close totaly one blind =18s
so if i touch "open" and 9s after touch again on open, the blind will stop at middle, this apply on close too.

thanks

Re: NEW frontpage.html - request comments

Posted: Thursday 29 January 2015 10:37
by pwhooftman
ThinkPad wrote:I got a weird bug when i open the page on my tablet. The right column of cells falls of the screen. When i swipe to the second screen, i see a little bit of those cells.

Screenshot:
https://i.imgur.com/WAE9u7c.jpg

It probably has something to do with the resolution, as on my PC and a iPad Mini it looks fine.
On all three devices i use Google Chrome.
Either you have solar panels, or you are very conservative in using energy. 2.174 kWh power used halfway the afternoon? My base level usage is 350 watts, so i have reached that amount even before my alarmclock goes off in the morning...

Btw, i have made separate cells to show the solarpanel power & energy, so i can monitor grid power & solar power.

Re: NEW frontpage.html - request comments

Posted: Thursday 29 January 2015 10:42
by mvveelen
Jan_nl, is there a way to display page 2 when I open the frontpage.html in my browser on my Mac? That way it is easier to test, refresh, test, etc. Or do I have to use my iPad for this (which doesn't make it easier :)) ?

Re: NEW frontpage.html - request comments

Posted: Thursday 29 January 2015 11:06
by jannl
maluko wrote:
jan_nl wrote:Do your blinds do anything when you press a button?
not, i have put like a 'status' on cel configuration, and only appears close but dont respond to touch, the light its work but not inverter blind.

i think the best way to put blind on frontpage will be with 2 bottons (one open and other close) because like i said before the x10 blind dont are compatible with dimmer so when i want to stop at midle i have to touch on same botton before.
ex: total seconds to open or close totaly one blind =18s
so if i touch "open" and 9s after touch again on open, the blind will stop at middle, this apply on close too.

thanks
If you could find out the json url's to accomplish this and post them here, I could give it a try.
Jan_nl, is there a way to display page 2 when I open the frontpage.html in my browser on my Mac? That way it is easier to test, refresh, test, etc. Or do I have to use my iPad for this (which doesn't make it easier :)) ?
I know the problem, as soon as I want to test something on screen 2 I take my tablet. I came across some code to have < and > on either side, but did not implement this. As soon as the code is finished, I do not think I will use frontpage (a lot) on a desktop, but mainly on one of the tablets.

Re: NEW frontpage.html - request comments

Posted: Thursday 29 January 2015 12:35
by maluko
thanks jan

open - /json.htm?type=command&param=switchlight&idx=42&switchcmd=on
close - /json.htm?type=command&param=switchlight&idx=42&switchcmd=off

Re: NEW frontpage.html - request comments

Posted: Thursday 29 January 2015 12:42
by ThinkPad
pwhooftman wrote: [..]
Either you have solar panels, or you are very conservative in using energy. 2.174 kWh power used halfway the afternoon? My base level usage is 350 watts, so i have reached that amount even before my alarmclock goes off in the morning...
No solar panels, just being conservative :D Saving energy (and thus saving money) is my mission. A base level of 350W is, sorry to say, ridiculous.
My average day consumption is about 4,5 - 5kWh.

Make a visit to this (Dutch) topic: http://gathering.tweakers.net/forum/lis ... es/1491207 to get some good tips to easily save on electricity. For gas there is also a (Dutch) topic: http://gathering.tweakers.net/forum/lis ... es/1619229
See you there ;)

When i am not at home, or we are sleeping my energy consumption is around 60W. The TV, settopbox, FM-tuner etc are behind a KaKu plug, which is automatically turned off by Domoticz when we go to sleep (i activate a scene 'Sleeping') or when we leave the house (domoticz pings our smartphones so it knows if there is someone home or not).
Home automation is not only for having nice gimmicks by turning on lights etc, you can also easily save on electricity 8-)

If you want to know more, please send a PM. I don't want to go too much offtopic in this nice topic ;)

Re: NEW frontpage.html - request comments

Posted: Thursday 29 January 2015 12:44
by jannl
hm, is almost the same.
Now is used:

Code: Select all

url: "json.htm?type=command&param=switchlight" + "&idx=" + idx + "&switchcmd=" + switchcmd + "&level=0"
This is a line in js/frontpage.js.

What happens if you remove + "&level=0" in that file?
Does it work in that case? Do the other switches still work?

Re: NEW frontpage.html - request comments

Posted: Thursday 29 January 2015 19:50
by jkimmel

Code: Select all

$.PageArray = [
                ['75','Temp',            'cell3',                        'Salon (&deg;C)','0','0'],
		  ['291','Status',         'cell6',                        'Downlight Terrasse','0','0'],
		  ['187','Status',         'cell8',                        'Stehlampen Salon','0','0'],
	        // ['291','Level',          'cell11',                       'Downlight Terrasse (%)','2','1'],
	      //   ['290','Level',          'cell12',                       'Downlight Kamin (%)','2','1'],
		  ['290','Status',         'cell7',                        'Downlight Kamin','0','0'],
                ['187','Status',         'cell8',                        'Stehlampen Salon','0','0'],
	      // ['187','Level',          'cell13',                       'Stehlampen (%)','2','1'],
                ['179','Status',         'cell9',                        'Downlight Tresen','0','0'],
	       //['290','Level',          'cell14',                       'Downlight Tresen (%)','2','1'],
		  ['105','Status',         'cell10',                       'Esstisch','0','0'],
              //['290','Level',          'cell15',                       'Esstisch (%)','2','1'],
	         ['338','Temp', 	     'cell25',                       'Dach (&deg;C)','0','0'],
              //['0','Link',            'cell17',                       '<a href="http://www.nu.nl" target="_blank">NU.nl</a>','0','0'],
                ['0','Tijd',            'cell22',                       '','0','color:#17E213;font-size:150%'],
                        ];
Cells "Status" are visible and toggable but if only one line "Level" is activated some of the "Status" cells get empty.

I'm aware that I'm just fiddling around not understanding what the code is about but with your help I'm sure I will manage it ;)

Re: NEW frontpage.html - request comments

Posted: Thursday 29 January 2015 22:05
by pjeterinfo
jkimmel I had the same issue, and try to recall what I did yesterday. Do you have those lines in the frontpage_settings.js:

<!-- Global vars -->
var img_vspace=5;
var sign_2='%';

Re: NEW frontpage.html - request comments

Posted: Thursday 29 January 2015 22:40
by jkimmel
pjeterinfo wrote:jkimmel I had the same issue, and try to recall what I did yesterday. Do you have those lines in the frontpage_settings.js:

<!-- Global vars -->
var img_vspace=5;
var sign_2='%';
Tx pjeterinfo, this did the job at least half the way. Then now I don't know from where to get the +- icons.

Re: NEW frontpage.html - request comments

Posted: Thursday 29 January 2015 23:31
by maluko
jan_nl wrote:hm, is almost the same.
Now is used:

Code: Select all

url: "json.htm?type=command&param=switchlight" + "&idx=" + idx + "&switchcmd=" + switchcmd + "&level=0"
This is a line in js/frontpage.js.

What happens if you remove + "&level=0" in that file?
Does it work in that case? Do the other switches still work?
i has done but without sucess, its strange the text appear "close" and "open" on blind because the settings are:

Code: Select all

<!-- Change the text for on/off switches -->
var txt_on = 'ON';
var txt_off = 'OFF';
and the color are gray

Re: NEW frontpage.html - request comments

Posted: Friday 30 January 2015 8:36
by thorbj
thorbj wrote:Anyone know how I can get sunset time and sunrise time to display in two different cells?

And does anyone know if there is a command to get Lux and battery values from a multisensor, and amount of rain in mm to display in a cell?
Hi, just a little bump on this. Would be great if this was possible.

Thanks!

Re: NEW frontpage.html - request comments

Posted: Friday 30 January 2015 10:24
by jannl
I am a bit busy coming days with ehm carnaval. So after the weekend I will see if I can impement some of the requests.

Re: NEW frontpage.html - request comments

Posted: Friday 30 January 2015 11:06
by mvveelen
Whehehe, don't drink and code :lol:

What are the requests you are going to (try) to build in? Is Skycons one of them :?

I was thinking: you have buienradar, but there is also something like routeradar. Maybe this could be implemented the same way as buienradar? Could be nice if people are going somewhere: just swipe and see what the weather conditions are, and what traffic jams you might encounter.