NEW frontpage.html - request comments

Moderator: leecollings

User avatar
EdwinK
Posts: 1820
Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:

Re: NEW frontpage.html - request comments

Post by EdwinK »

Yup... I see the following:

Image

It's looking for '192.168.1.102', but I don't have that ip-address, and I can't find in what file it does call this.
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
User avatar
G3rard
Posts: 669
Joined: Wednesday 04 March 2015 22:15
Target OS: -
Domoticz version: No
Location: The Netherlands
Contact:

Re: NEW frontpage.html - request comments

Post by G3rard »

The 192.168.1.102:8084 is from my Domoticz settings. That means you haven't changed that in frontpage_settings.js.
So change that line to your Domoticz settings and that should work.

The 192.168.1.1 for the videostream is in line 290 of frontpage.html. So you can change that as well (or remove it).

Check this readme instruction .
Not using Domoticz anymore
User avatar
G3rard
Posts: 669
Joined: Wednesday 04 March 2015 22:15
Target OS: -
Domoticz version: No
Location: The Netherlands
Contact:

Re: NEW frontpage.html - request comments

Post by G3rard »

Trigun wrote:
Hi G3rard,
I was looking at this post and this is exactly what I would like to use.
I am able to control the sonos via HTTP but I can't get it to work with the PHP option in G3rards files.

perhaps you can help me out here?
maybe a noob question but how do I install the PHP server on the Domoticz Pi?

Thanks in advance!

Kind regards,
Is your question regarding installing PHP on a Pi? Then check this.
If you have any questions regarding the config of the Sonos files, then show some more info on your setup and what is not working.
Not using Domoticz anymore
User avatar
G3rard
Posts: 669
Joined: Wednesday 04 March 2015 22:15
Target OS: -
Domoticz version: No
Location: The Netherlands
Contact:

Re: NEW frontpage.html - request comments

Post by G3rard »

hpapagaj wrote:
G3rard wrote:@hpapagaj,

Can you try this

Code: Select all

var d = ((level + 10)/100 * 32) +  0.5;
Super it's working now. :P Thank you!
Little glitch that one step is 6% instead of 3% (like in Domoticz):
50 to 56:
plus 50
in plus 19.7 50
SUCCES

56 to 62:
plus 56
in plus 21.62 56
SUCCES
Then just try to change the formula until it works for you.
Something like

Code: Select all

var d = ((level + 10)/100 * 31) +  0.3;
should do the trick.
Not using Domoticz anymore
User avatar
EdwinK
Posts: 1820
Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:

Re: NEW frontpage.html - request comments

Post by EdwinK »

G3rard wrote:The 192.168.1.102:8084 is from my Domoticz settings. That means you haven't changed that in frontpage_settings.js.
So change that line to your Domoticz settings and that should work.
I had it changed. See below

Code: Select all

// ############################################################################################################
// #### vvvvv   USER VALUES below vvvvv   #######
// ############################################################################################################

$(document).ready(function() {
        $.roomplan=0;	// define roomplan in Domoticz and create items below.
        $.domoticzurl="http://192.168.0.10:8084";
		//format: idx, value, label, description, lastseen(1 when lastseen is wanted, 2 is only time), plusmin button or protected (0 for empty, 1 for buttons, 2 for volume of Sonos, 4 for protected, 5 for zwave dimmer, 6 for protected when on), [override css], [alarm value]
        $.PageArray = [

g3rard wrote: The 192.168.1.1 for the videostream is in line 290 of frontpage.html. So you can change that as well (or remove it).

Check this readme instruction .
I had this line commented out with <!-- -->, but somehow that line was still being executed.
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
User avatar
G3rard
Posts: 669
Joined: Wednesday 04 March 2015 22:15
Target OS: -
Domoticz version: No
Location: The Netherlands
Contact:

Re: NEW frontpage.html - request comments

Post by G3rard »

My guess would be that you have 2 frontpages and changed the settings in one of them, but open the other.
Because the log shows that it tries to open 192.168.1.102:8084 and that URL is only present in frontpage_settings.js.
https://github.com/gerard33/frontpage/s ... .168.1.102

Same applies for frontpage.html. Because if you have commented that line out, it will not try to open the url.
Not using Domoticz anymore
User avatar
EdwinK
Posts: 1820
Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:

Re: NEW frontpage.html - request comments

Post by EdwinK »

That might have be the problem, because now it isn't trying to connect to the cam's anymore. :)
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
RobvdB
Posts: 8
Joined: Wednesday 29 June 2016 20:13
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: NEW frontpage.html - request comments

Post by RobvdB »

Hi all,

I've been busting my balls over this one. I have Gerards frontpage on an old ipad on the wall. all works like a charm, except for one wish. I have two camera's in screen 1 and 2, cell 3 and cell 2_3. I get a still image from these camera's, but what i want is a moving image. Adding in the stream URL does not work, and I think it never will due to lack of codec support on the ipad.

My question; how and where can I add a script of some kind to refresh the image every second. Or at least refresh when I tap it?

I've tried to add the below code in frontpage.js, but no luck:

Code: Select all

function updateCamera() {
	var d = new Date();
	var t = d.getTime();
	document.getElementById("popup_camera").src="http://<IPADDRESS>/cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=******&pwd=********&"+t;
	document.getElementById("popup_camera3").src="http://<IPADDRESS>/snapshot.cgi?user=*****&pwd=*****&"+t;
}

setInterval(updateCamera,1000);
Hope someone can help me with this, since I'm going crazy ;)
Synology DS213, RFXtrx433E, COCO, HomeEasy, Promax, Denon, Philips TV, Logitech Harmony, Nest, Smart meters.
ropske
Posts: 483
Joined: Tuesday 12 August 2014 5:37
Target OS: Raspberry Pi / ODroid
Domoticz version: V3_8394
Location: Rumbeke,Belgium
Contact:

Re: NEW frontpage.html - request comments

Post by ropske »

hi, anyone using setpoint in this FrontPage?
I'm just wondering if it's also taking some seconds with you guys when it changes state? guess 2-3 seconds

so when i want to go from 16degrees to for example 20degrees, this takes long
i'm going up/down by steps off 0.5degree so i need to press 8 times on the temp up button (8x2sec = 16sec)
RobvdB
Posts: 8
Joined: Wednesday 29 June 2016 20:13
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: NEW frontpage.html - request comments

Post by RobvdB »

I'm using it. The same issue here too. The frontpage refreshes every few seconds, and in addition the path for an update of your setpoint is frontpage > domoticz > Nest cloud > domoticz > frontpage. So that adds some extra time.

As a suggestion it could be handy to open a small popup, set the value you want locally in frontpage, and then update accordingly. But I lack the skills to code that I'm afraid :-)
Synology DS213, RFXtrx433E, COCO, HomeEasy, Promax, Denon, Philips TV, Logitech Harmony, Nest, Smart meters.
ropske
Posts: 483
Joined: Tuesday 12 August 2014 5:37
Target OS: Raspberry Pi / ODroid
Domoticz version: V3_8394
Location: Rumbeke,Belgium
Contact:

Re: NEW frontpage.html - request comments

Post by ropske »

yeah, like the popup-window now in domoticz when you change a setpoint
franzelare
Posts: 141
Joined: Thursday 19 February 2015 21:48
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: NEW frontpage.html - request comments

Post by franzelare »

I like to add some graphs to my frontpage, anyone who knows how to do that? like by using the highcharts function that domoticz web interface is using?
User avatar
EdwinK
Posts: 1820
Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:

Re: NEW frontpage.html - request comments

Post by EdwinK »

I thought I read a fix somewhere in this topic, but can't find it anymore.

What happens is that one of the cell 2_3 I'm using for one of my Pi's (LMS). The title of the playing song is just going all over the place. (see image)
Imageimage post

How can I fix this so that it is just in one cell? Btw.. it was just a random music-list playing
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
ErwinWes
Posts: 3
Joined: Sunday 05 February 2017 17:35
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: NEW frontpage.html - request comments

Post by ErwinWes »

Hi guys,

I see a lot of stuff what I can do with domoticz.
At this moment the only thing that I want is show the outside sensors (wind, rain, temp, etc.)
The only thing that I want is that the graphs are automatically made for use on websites.
How can I do that?

I make use of my Synology NAS in combination with the RFlink 868 mhz receiver.

Thanks for any answer.
barbaar
Posts: 56
Joined: Wednesday 24 December 2014 16:01
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: NEW frontpage.html - request comments

Post by barbaar »

Right.. Has anyone succeeded with displaying a group?

I have entered the group into the roomplan, and added the line below to frontpage_settings.js:

Code: Select all

['1','Status',          'cell11',       'Licht Beneden','1','0'],
The IDX is correct for sure..

But, the cell in Chrome stays empty. When I inspect the element, I get the following error:

Code: Select all

Uncaught TypeError: Cannot read property 'length' of undefined
    at Object.<anonymous> (frontpage.js:954)
    at Function.each (jquery.min.js:4)
    at Object.success (frontpage.js:953)
    at c (jquery.min.js:4)
    at Object.fireWith [as resolveWith] (jquery.min.js:4)
    at k (jquery.min.js:6)
    at HTMLScriptElement.n.onload.n.onreadystatechange (jquery.min.js:6)
Line 954 of frontpage.js is:

Code: Select all

for( var ii = 0, len = $.PageArray_Scenes.length; ii < len; ii++ ) {
Any help would be appreciated!
ropske
Posts: 483
Joined: Tuesday 12 August 2014 5:37
Target OS: Raspberry Pi / ODroid
Domoticz version: V3_8394
Location: Rumbeke,Belgium
Contact:

Re: NEW frontpage.html - request comments

Post by ropske »

anyone that can help us please?
ropske wrote:hi, anyone using setpoint in this FrontPage?
I'm just wondering if it's also taking some seconds with you guys when it changes state? guess 2-3 seconds

so when i want to go from 16degrees to for example 20degrees, this takes long
i'm going up/down by steps off 0.5degree so i need to press 8 times on the temp up button (8x2sec = 16sec)
ubfssF
Posts: 59
Joined: Monday 02 November 2015 14:12
Target OS: Linux
Domoticz version: 2.2364
Location: Netherlands
Contact:

Re: NEW frontpage.html - request comments

Post by ubfssF »

barbaar wrote:Right.. Has anyone succeeded with displaying a group?

I have entered the group into the roomplan, and added the line below to frontpage_settings.js:

Code: Select all

['1','Status',          'cell11',       'Licht Beneden','1','0'],
The IDX is correct for sure..

But, the cell in Chrome stays empty. When I inspect the element, I get the following error:

Code: Select all

Uncaught TypeError: Cannot read property 'length' of undefined
    at Object.<anonymous> (frontpage.js:954)
    at Function.each (jquery.min.js:4)
    at Object.success (frontpage.js:953)
    at c (jquery.min.js:4)
    at Object.fireWith [as resolveWith] (jquery.min.js:4)
    at k (jquery.min.js:6)
    at HTMLScriptElement.n.onload.n.onreadystatechange (jquery.min.js:6)
Line 954 of frontpage.js is:

Code: Select all

for( var ii = 0, len = $.PageArray_Scenes.length; ii < len; ii++ ) {
Any help would be appreciated!
What works for me is:

Code: Select all

	$.PageArray_Scenes = [
	
	['2','Status',		'cell14',	'Thuis werken','0','0'],
	['1','Status',		'cell15',	'HiFi systemen','0','0'],
	];
barbaar
Posts: 56
Joined: Wednesday 24 December 2014 16:01
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: NEW frontpage.html - request comments

Post by barbaar »

Works! Great, thanks!
Ewaldharmsen
Posts: 130
Joined: Tuesday 07 February 2017 15:00
Target OS: Linux
Domoticz version:
Contact:

Re: NEW frontpage.html - request comments

Post by Ewaldharmsen »

I cannot get it to work.

Add a room, it got IDX 2

Extracted the file two times to get the frontpage.html
Edited line 250 to $.roomplan=2; That is the IDX of the "Ruimte" right?
Edited line 251 to $.domoticzurl="http://192.168.0.116:8080";
Edited line 264 to ['3', 'UVI', 'cell21', 'UV straling (UVI)', 'color:orange', '>4'], as a test

Copied the file to the domoticz/www folder

browsed to 192.168.0.116:8080/frontpage.html, but no numbers there just the plain picture.

http://192.168.0.116:8080/json.htm?type=devices&plan=2 gives me the data I expected

What is going wrong?
Ewaldharmsen
Posts: 130
Joined: Tuesday 07 February 2017 15:00
Target OS: Linux
Domoticz version:
Contact:

Re: NEW frontpage.html - request comments

Post by Ewaldharmsen »

Ah Room needs to be 0
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest