Page 22 of 66

Re: NEW frontpage.html - request comments

Posted: Friday 20 February 2015 16:22
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?

Re: NEW frontpage.html - request comments

Posted: Friday 20 February 2015 16:30
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) ?

Re: NEW frontpage.html - request comments

Posted: Friday 20 February 2015 16:58
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);
	}

Re: NEW frontpage.html - request comments

Posted: Friday 20 February 2015 17:30
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?

Re: NEW frontpage.html - request comments

Posted: Saturday 21 February 2015 10:55
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.

Re: NEW frontpage.html - request comments

Posted: Sunday 22 February 2015 13:32
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 ;)

Re: NEW frontpage.html - request comments

Posted: Sunday 22 February 2015 13:38
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.

Re: NEW frontpage.html - request comments

Posted: Sunday 22 February 2015 19:09
by jannl
What slayer007 says, the code actually compares 'SunBoth'

Re: NEW frontpage.html - request comments

Posted: Monday 23 February 2015 9:16
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

Re: NEW frontpage.html - request comments

Posted: Monday 23 February 2015 10:23
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

Re: NEW frontpage.html - request comments

Posted: Monday 23 February 2015 22:01
by Denman009
The only thing what doen't work is the day and night frontpage. And i don't no why

Re: NEW frontpage.html - request comments

Posted: Tuesday 24 February 2015 7:25
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.

Re: NEW frontpage.html - request comments

Posted: Tuesday 24 February 2015 11:57
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

Re: NEW frontpage.html - request comments

Posted: Tuesday 24 February 2015 12:36
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?

Re: NEW frontpage.html - request comments

Posted: Tuesday 24 February 2015 20:53
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:

Re: NEW frontpage.html - request comments

Posted: Thursday 26 February 2015 10:30
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?

Re: NEW frontpage.html - request comments

Posted: Thursday 26 February 2015 10:42
by jannl
If vdata os text_off, the else is never reached.

Did you check this?

Re: NEW frontpage.html - request comments

Posted: Thursday 26 February 2015 12:27
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?

Re: NEW frontpage.html - request comments

Posted: Thursday 26 February 2015 12:41
by jannl
I will post it later today. But I did not change the dimmer functionality I think since the last post I did.

Re: NEW frontpage.html - request comments

Posted: Thursday 26 February 2015 19:52
by floris74
Hey jkimmel,

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