NEW frontpage.html - request comments

Moderator: leecollings

User avatar
mvveelen
Posts: 678
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 »

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;';
	}
RPi3b+/RFXCOM rfxtrx433E/Shelly/Xiaomi Gateway/Philips HUE Lights/Atag Zone One/2 SunnyBoy inverters/AirconWithMe/P1 smartmeter/Domoticz latest Beta
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 »

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
jannl
Posts: 625
Joined: Thursday 02 October 2014 6:36
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Geleen
Contact:

Re: NEW frontpage.html - request comments

Post 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 ....
User avatar
mvveelen
Posts: 678
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 »

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:
RPi3b+/RFXCOM rfxtrx433E/Shelly/Xiaomi Gateway/Philips HUE Lights/Atag Zone One/2 SunnyBoy inverters/AirconWithMe/P1 smartmeter/Domoticz latest Beta
maluko
Posts: 105
Joined: Sunday 02 February 2014 23:57
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Portugal
Contact:

Re: NEW frontpage.html - request comments

Post by maluko »

sorry,but cant get the blind working on my.
jannl
Posts: 625
Joined: Thursday 02 October 2014 6:36
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Geleen
Contact:

Re: NEW frontpage.html - request comments

Post by jannl »

Do your blinds do anything when you press a button?
maluko
Posts: 105
Joined: Sunday 02 February 2014 23:57
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Portugal
Contact:

Re: NEW frontpage.html - request comments

Post 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
pwhooftman
Posts: 75
Joined: Monday 11 November 2013 18:04
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: NEW frontpage.html - request comments

Post 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.
Domoticz v 1.16xx
1X RFXtrx433 USB 433.92MHz Transceiver Firmware version: 71
1X Synology Nas DS918+ DSM 7 (12Gb RAM mod)
User avatar
mvveelen
Posts: 678
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 »

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 :)) ?
RPi3b+/RFXCOM rfxtrx433E/Shelly/Xiaomi Gateway/Philips HUE Lights/Atag Zone One/2 SunnyBoy inverters/AirconWithMe/P1 smartmeter/Domoticz latest Beta
jannl
Posts: 625
Joined: Thursday 02 October 2014 6:36
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Geleen
Contact:

Re: NEW frontpage.html - request comments

Post 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.
maluko
Posts: 105
Joined: Sunday 02 February 2014 23:57
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Portugal
Contact:

Re: NEW frontpage.html - request comments

Post 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
ThinkPad
Posts: 890
Joined: Tuesday 30 September 2014 8:49
Target OS: Linux
Domoticz version: beta
Location: The Netherlands
Contact:

Re: NEW frontpage.html - request comments

Post 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 ;)
I am not active on this forum anymore.
jannl
Posts: 625
Joined: Thursday 02 October 2014 6:36
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Geleen
Contact:

Re: NEW frontpage.html - request comments

Post 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?
jkimmel
Posts: 129
Joined: Monday 25 November 2013 17:51
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Location: Mallorca
Contact:

Re: NEW frontpage.html - request comments

Post 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 ;)
Rfxcom
Raspi 4
pjeterinfo
Posts: 5
Joined: Tuesday 29 April 2014 21:34
Target OS: Linux
Domoticz version:

Re: NEW frontpage.html - request comments

Post 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='%';
jkimmel
Posts: 129
Joined: Monday 25 November 2013 17:51
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Location: Mallorca
Contact:

Re: NEW frontpage.html - request comments

Post 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.
Rfxcom
Raspi 4
maluko
Posts: 105
Joined: Sunday 02 February 2014 23:57
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Portugal
Contact:

Re: NEW frontpage.html - request comments

Post 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
thorbj
Posts: 113
Joined: Thursday 20 November 2014 22:11
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Norway
Contact:

Re: NEW frontpage.html - request comments

Post 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!
2xRaspberry Pi Model 2 w/RaZberry z-wave chip (master/slave)|Fibaro Wall Plug|Fibaro Universal Dimmer 500W|Aeon Labs Multisensor|RFXtrx433E|Nexa WMR-1000|Nexa Pe-3|Nexa Remote|Nexa LGDR3500|Lightify Gateway|Lightify RGBW bulb
jannl
Posts: 625
Joined: Thursday 02 October 2014 6:36
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Geleen
Contact:

Re: NEW frontpage.html - request comments

Post 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.
User avatar
mvveelen
Posts: 678
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 »

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.
RPi3b+/RFXCOM rfxtrx433E/Shelly/Xiaomi Gateway/Philips HUE Lights/Atag Zone One/2 SunnyBoy inverters/AirconWithMe/P1 smartmeter/Domoticz latest Beta
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests