NEW frontpage.html - request comments

Moderator: leecollings

SwordFish
Posts: 278
Joined: Sunday 14 December 2014 12:28
Target OS: Raspberry Pi / ODroid
Domoticz version: V4.11375
Contact:

Re: NEW frontpage.html - request comments

Post by SwordFish »

Have the climacons working on my setup. Thanks mvveelen.
The only thing I want is the "zon op" and "zon onder" text replaced by the climacons, but so far no luck. I've someone has an idea?
Attachments
Screenshot_2015-02-20-16-17-50.png
Screenshot_2015-02-20-16-17-50.png (177.08 KiB) Viewed 6051 times
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 »

Just check the code I provided and the climacons for sunset and sunrise :) Have you seen the movie I made (a few posts ago) ?
RPi3b+/RFXCOM rfxtrx433E/Shelly/Xiaomi Gateway/Philips HUE Lights/Atag Zone One/2 SunnyBoy inverters/AirconWithMe/P1 smartmeter/Domoticz latest Beta
SwordFish
Posts: 278
Joined: Sunday 14 December 2014 12:28
Target OS: Raspberry Pi / ODroid
Domoticz version: V4.11375
Contact:

Re: NEW frontpage.html - request comments

Post by SwordFish »

I have seen the " movie" and for the forecast the climacons are working, but i don't use the IsDonker switch for the sunset and rise. When I set in the frontpage settings the text to the climacons it won't work.
I use this code to display the sunrise and sunset in to differend cells.

Code: Select all

else if ( $.PageArray[ii][1] === 'Sunrise' ) { //Special nummer, zonsop/onder in cell (test)
    //var vtype=    $.PageArray[ii][1];             // Domotitcz type (like Temp, Humidity)
    var vlabel=     $.PageArray[ii][2];             // cell number from HTML layout
    var vdesc = '';
    var vattr=    $.PageArray[ii][6];             // extra css attributes
    var valarm=     $.PageArray[ii][7];             // alarm value to turn text to red

    $('#'+vlabel).html( '<div style='+vattr+'>'+var_sunrise+'</div>');
    $('#desc_'+vlabel).html(txt_sunrise);
	}
	else if ( $.PageArray[ii][1] === 'Sunset' ) { //Special nummer, zonsop/onder in cell (test)
    //var vtype=    $.PageArray[ii][1];             // Domotitcz type (like Temp, Humidity)
    var vlabel=     $.PageArray[ii][2];             // cell number from HTML layout
    var vdesc = '';
    var vattr=    $.PageArray[ii][6];             // extra css attributes
    var valarm=     $.PageArray[ii][7];             // alarm value to turn text to red

    $('#'+vlabel).html( '<div style='+vattr+'>'+var_sunset+'</div>');
    $('#desc_'+vlabel).html(txt_sunset);
	}
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 »

SwordFish wrote:I have seen the " movie" and for the forecast the climacons are working, but i don't use the IsDonker switch for the sunset and rise. When I set in the frontpage settings the text to the climacons it won't work.
I use this code to display the sunrise and sunset in to differend cells.

Code: Select all

else if ( $.PageArray[ii][1] === 'Sunrise' ) { //Special nummer, zonsop/onder in cell (test)
    //var vtype=    $.PageArray[ii][1];             // Domotitcz type (like Temp, Humidity)
    var vlabel=     $.PageArray[ii][2];             // cell number from HTML layout
    var vdesc = '';
    var vattr=    $.PageArray[ii][6];             // extra css attributes
    var valarm=     $.PageArray[ii][7];             // alarm value to turn text to red

    $('#'+vlabel).html( '<div style='+vattr+'>'+var_sunrise+'</div>');
    $('#desc_'+vlabel).html(txt_sunrise);
	}
	else if ( $.PageArray[ii][1] === 'Sunset' ) { //Special nummer, zonsop/onder in cell (test)
    //var vtype=    $.PageArray[ii][1];             // Domotitcz type (like Temp, Humidity)
    var vlabel=     $.PageArray[ii][2];             // cell number from HTML layout
    var vdesc = '';
    var vattr=    $.PageArray[ii][6];             // extra css attributes
    var valarm=     $.PageArray[ii][7];             // alarm value to turn text to red

    $('#'+vlabel).html( '<div style='+vattr+'>'+var_sunset+'</div>');
    $('#desc_'+vlabel).html(txt_sunset);
	}
Ah, I see. I can't help you there, sorry. The way I show it, is in just 1 cell with a variable 'IsDonker'. Maybe someone else has the same setup as yours and can help you figure out what to do?
RPi3b+/RFXCOM rfxtrx433E/Shelly/Xiaomi Gateway/Philips HUE Lights/Atag Zone One/2 SunnyBoy inverters/AirconWithMe/P1 smartmeter/Domoticz latest Beta
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 »

I removed some posts about Weather Underground from this topic and created a new topic for them: http://domoticz.com/forum/viewtopic.php?f=13&t=5456

This topic is only for discussion about the frontpage.html, not on how getting Weather Underground to work.
I am not active on this forum anymore.
g-man
Posts: 2
Joined: Saturday 24 January 2015 20:29
Target OS: Linux
Domoticz version:
Location: Sweden
Contact:

Re: NEW frontpage.html - request comments

Post by g-man »

Hi

I am using Jan_nl lastest design and some things are a mystery for me, I can not get Sunrise/sunset to work.

Code: Select all

$(document).ready(function() {
        $.roomplan=0;           // define roomplan in Domoticz and create items below.
        $.domoticzurl="http://192.168.1.119:8080";
        //format: idx, value, label, description,lastseen(1 when lastseen is wanted, 2 print %) ,plusmin button (1 for buttons), [override css], [alarm value]
        $.PageArray = [
                ['56','Status',         'cell6',                        'Lamp gang onder','0','0'],
                ['15','Humidity',         'cell1',                        'Luftfuktighet','1','0'],
                ['35','sunboth',         'cell5',                        'Naar bed','0','0'],
                ['57','Level',          'cell13',                       'Lamp afdak (%)','0','1'],
                ['57','Status',         'cell14',                       'Lamp afdak','0','0'],
                ['15','Status',         'cell7',                        'Bijzettafel','0','0'],
                ['10','Status',         'cell11',                       'Feestverlichting','0','0'],
                ['19','Status',         'cell12',                       'Lampen tegen garage','0','0'],
                ['79','Status',         'cell00',                       'Donker switch','0','0'],
                ['8','Status',          'cell8',                        'Boekenkast','0','0'],
                ['17','Status',         'cell15',                       'Tuinlampen','0','0'],
                ['88','Status',         'cell4',                        'Naast Bank','0','0'],
                ['23','Status',         'cell21',                       'TV Slaapkamer','0','0'],
                ['73','Status',         'cell10',                       'Wijnrek','0','0'],
                ['26','Usage',          'cell16',                       'Huidig verbruik (Watt)','0','0'],
                ['78','Usage',          'cell19',                       'Actuele opwek (Watt)','1','0'],
                ['78','CounterToday',   'cell20',                       'Opwek vandaag (kWh)','0','0'],
                ['15','Temp',           'cell3',                        'Utomhustemperatur (&deg;C)','0','0'],
                ['46','DewPoint',       'cell2_5',                      'Dauwpunt buiten (&deg;C)','0','0'],
                ['46','ForecastStr',    'cell25',                       'Weersvoorspelling','0','0'],
                ['0','Link',            'cell17',                       '<a href="http://www.nu.nl" target="_blank">NU.nl</a>','0','0'],
                ['0','Tijd',            'cell22',                       '','0','0','color:#17E213;font-size:150%'],
                ['47','Chill',          'cell23',                       'Gevoelstemp. (&deg;C)','0','0'],
                ['47','Speed',          'cell2_4',                      'Windsnelheid (m/s)','0','0'],
                ['6','Temp',            'cell2_6',                      'Temp. onder afdak (&deg;C)','0','0'],
                ['6','DewPoint',        'cell2_8',                      'Dauwpunt onder afdak (&deg;C)','0','0'],
                ['6','Humidity',        'cell2_7',                      'Vocht onder afdak (%) ','0','0'],
                ['39','Temp',           'cell2_16',                     'Temp. kelder(&deg;C)','0','0'],
                ['39','DewPoint',       'cell2_18',                     'Dauwpunt kelder(&deg;C)','0','0'],
                ['39','Humidity',       'cell2_17',                     'Vocht kelder(%) ','0','0'],
                ['38','Temp',           'cell2_11',                     'Temp. bijkeuken(&deg;C)','0','0'],
                ['38','DewPoint',       'cell2_13',                     'Dauwpunt bijkeuken(&deg;C)','0','0'],
                ['38','Humidity',       'cell2_12',                     'Vocht bijkeuken(%) ','0','0'],
                ['29','Tijd',           'cell2_1',                      '','0','0','color:#17E213;font-size:50%'],
                ['0','SunBoth',       	'cell2_10',                      '','0','0','color:#17E213;font-size:50%'],
                ['0','Sunrise',       	'cell9',                      '','0','0','color:#17E213;font-size:50%'],
                ['16','Speed',  	'cell2',                        'speed','1','0'],
                ['5','Status',  	'cell18',                       'Scene Sauna','0','0']
        ];
        $.PageArray_Scenes = [
                ['29','Status',         'cell2_2',                      'Ventilator bijkeuken','0','0'],
                ['69','Status',         'cell2_23',                     'Kerstmis','0','0'],
                ['0','Traffic',        'cell2_3',                      '','0','0',';font-size:50%'],
        ];

// ############################################################################################################
// #### ^^^^^   USER VALUES above ^^^^^   #######
// ###########################################################################################################
Just to test i have tried to set it up in different cells, the funny thing is that the example provided in the code works, so i copied the whole row and just changed the cell number, but no luck!

The Json command works as expected

http://192.168.1.119:8080/json.htm?type ... SunRiseSet

gives

{ "ServerTime" : "Feb 22 2015 13:21:04", "Sunrise" : "07:12:00", "Sunset" : "17:08:00", "status" : "OK", "title" : "getSunRiseSet" }


Any suggestions?


Just a suggestion, this web interface to Domoticz is a gamechanger for the software, would it be a good idea to have a support thread and mabye a wiki on how the pages work? I hesitate to ask in this thread since I do not whant to disturb the creativity ;)
Slayer007
Posts: 29
Joined: Wednesday 18 June 2014 23:57
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Netherlands
Contact:

Re: NEW frontpage.html - request comments

Post by Slayer007 »

I see cell 5 isn't written with capitals. Maybe That's the issue. "SunBoth" instead of sunboth. Otherwise you won't get the status through json.
jannl
Posts: 666
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 »

What slayer007 says, the code actually compares 'SunBoth'
User avatar
Iron Man
Posts: 17
Joined: Wednesday 05 March 2014 21:37
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Netherland
Contact:

Re: NEW frontpage.html - request comments

Post by Iron Man »

I had some questions that are more in line with this topic.
I have two questions about the camera:

1. How do you load the img and refresh it because I noticed that some of the web browsers (like Google Chrome) won’t show the img on the way I loaded it now.
2. I have a camera with username and password and I can access it now with this format link:
“http://{IP address:port}/snapshot.cgi?user=#USERNAME&pwd=#PASSWORD?idx=1&t=”
But most of the time I need to reenter my username and password.
So my question is, is there a way to set it from the start? So the question for a username and password will not be asked in the first place.
And I also tried to replace #USERNAME and #PASSWORD in the url with the actual username and password but it still asks me for the username and password.

Kind Regards,

Iron Man
ab1976
Posts: 3
Joined: Friday 13 February 2015 17:01
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: NEW frontpage.html - request comments

Post by ab1976 »

Need some help can't get the sunset sunrise to work

Already created vSwitch IsDonker and Var IsNight but still no luck

can somebody provide more detailed description? Thanks aleardy
+++++++++++++++++++++++++++++
Raspberry Pi B+
RFXCOMe
Kaku switches
x10 Security System
My system also act as XBMC
Denman009
Posts: 5
Joined: Thursday 19 February 2015 7:23
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: NEW frontpage.html - request comments

Post by Denman009 »

The only thing what doen't work is the day and night frontpage. And i don't no why
SwordFish
Posts: 278
Joined: Sunday 14 December 2014 12:28
Target OS: Raspberry Pi / ODroid
Domoticz version: V4.11375
Contact:

Re: NEW frontpage.html - request comments

Post by SwordFish »

Denman009 wrote:The only thing what doen't work is the day and night frontpage. And i don't no why
Sorry, i don't use the day and night frontpage.
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 »

@ Atmosphere

Your frontpage package is one of the few containing thermostat setpoint handling which I'm looking for.

But I don't succeed installing it, think it is about the subfolder structure. So could you publish your frontpage without using subfolders?

I would also like to use several thermostats. Is this possible?

Tx in advance
Rfxcom
Raspi 4
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 »

Denman009 wrote:The only thing what doen't work is the day and night frontpage. And i don't no why
What have you tried and where do you get stuck?
RPi3b+/RFXCOM rfxtrx433E/Shelly/Xiaomi Gateway/Philips HUE Lights/Atag Zone One/2 SunnyBoy inverters/AirconWithMe/P1 smartmeter/Domoticz latest Beta
Denman009
Posts: 5
Joined: Thursday 19 February 2015 7:23
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: NEW frontpage.html - request comments

Post by Denman009 »

mvveelen wrote:
Denman009 wrote:The only thing what doen't work is the day and night frontpage. And i don't no why
What have you tried and where do you get stuck?
I started over again. and it works oke now.
Maybey i changed something what was not supposed to be. :roll:
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 »

Floris

update; i changed
var idx_Thermostat = '96';
so now the thermostat is working. the dimmer not yet. i guess i have another problem... i have 2 thermostats..... any ideas?

Floris

I got several thermostats working

Code: Select all

	//Thermostat
	if(viType == 'Thermostat' && vplusmin > 0) {
	if (vdata == txt_off) {
	var hlp = '<span onclick="SwitchToggle('+item.idx+',\'On\')"; style='+alarmcss+'>'+ vdata+'</span>';
	var plus = "<img src=images/monitor/up_off.png align=right onclick=ChangeTherm('plus',txt_off," + item.idx + ","+ vdimmercurrent+")>";
	var min = "<img src=images/monitor/down_off.png align=left onclick=ChangeTherm('min',txt_off," + item.idx + ","+ vdimmercurrent+")>"
	}
	else
	{
	var hlp = '<span onclick="SwitchToggle('+item.idx+',\'Off\')"; style='+alarmcss+'>'+ vdata+'</span>';
	var plus = "<img src=images/monitor/up.png align=right onclick=ChangeTherm('plus'," +vplusmin+ "," + item.idx + ","+ vdata+")>";
	var min = "<img src=images/monitor/down.png align=left onclick=ChangeTherm('min'," +vplusmin+ "," + item.idx + ","+ vdata+")>"
	}
	vdata = min.concat(hlp,plus);
	//console.log(vdata);
	}
but dimmers don't work. I don't see up/down buttons. Any suggestions?
Rfxcom
Raspi 4
jannl
Posts: 666
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 »

If vdata os text_off, the else is never reached.

Did you check this?
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 »

jan_nl wrote:If vdata os text_off, the else is never reached.

Did you check this?
To be honest I don't have the slightest idea what's behind this code and so I have no understanding of your remark

I just look into the code try to to see some logic and then copy and paste what I think will do.

So I got the thermostats working.

The code for dimmers looks quite similar but is not working because there are no up/down buttons visible.

Could you publish your latest FP so I can compare your code with mine?
Rfxcom
Raspi 4
jannl
Posts: 666
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 will post it later today. But I did not change the dimmer functionality I think since the last post I did.
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 »

Hey jkimmel,

How dit you fix the multiple thermostats then? Looking forward to the FP with thermostat and dimmer support.. :P
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest