NEW frontpage.html - request comments

Moderator: leecollings

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 »

I have made a group for my limitless light in Domoticz (Scenes tab). That way I have preconfigured the color and dim level. I have added that group to my frontpage, it's the last line in my frontpage_settings.js file (in page array scenes part).
I am not sure if I have tried the lamp directly (so not as a group).

What type of switch are your Rolluiken in Domoticz?
Not using Domoticz anymore
ragsharky
Posts: 5
Joined: Tuesday 04 August 2015 10:18
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Sittard, Netherlands
Contact:

Re: NEW frontpage.html - request comments

Post by ragsharky »

Gerard, Smart idea i'm gonna try to make the scene en control them. now i trying to control the all group. "Create the scene / group did the trick" Thanks.

Rolluiken are Conrad RSL curtain Switches, Problem is solved Solution select blinds type, NOT venetian blinds.

['11','Status', 'cell7', 'Woonkamer Lamp','1','0'] /// Home easy Eu shows NAN Powersocket "'Create the scene/group did also the trick.

One problem, how can i get the alarm status in cell23 i'ts impossible to add it to a roomplan. Url is already changed in the html

Problems Solved sofar Thanks for the support. :D
jannl
Posts: 673
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 »

You can use room 0 (zero) all elements are in that room
trekker25
Posts: 40
Joined: Tuesday 26 May 2015 10:50
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: NEW frontpage.html - request comments

Post by trekker25 »

i took the template from g3rard, but for some reason when i view the frontpage on my iphone or android tablet, all the cells just keep emtpy (says cell1 cell2 cell3 etc)

chrome desktop pc all works?

Other question: can i give 1 switch a different image? I have a dummy switching for starting a specific radio stream on my sonos and i want to use the logo of this radio station as a button?

also trying to figure out how to open Sonos controller app directly from the frontpage.html:

<a href="intent://scan/#Intent;scheme=acr;package=com.sonos.acr;end"> SONOS IMAGE </a>

according to google this should work, but for some reason the Playstore is opened and not the App itself...
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 »

trekker25 wrote:i took the template from g3rard, but for some reason when i view the frontpage on my iphone or android tablet, all the cells just keep emtpy (says cell1 cell2 cell3 etc)

chrome desktop pc all works?

Other question: can i give 1 switch a different image? I have a dummy switching for starting a specific radio stream on my sonos and i want to use the logo of this radio station as a button?

also trying to figure out how to open Sonos controller app directly from the frontpage.html:

<a href="intent://scan/#Intent;scheme=acr;package=com.sonos.acr;end"> SONOS IMAGE </a>

according to google this should work, but for some reason the Playstore is opened and not the App itself...
Can you share some more information on your config? Is the frontpage in the Domoticz www folder or on a web server? Have you protected Domoticz? Is there not any cell filled with data on the iPhone or Android tablet?

You can give a switch a different image, it's being used for the weather prediction.
Just change the blue parts in the following example and put it in frontpage.js (somewere around line 450):

if (item.idx == idxnumberhere & vdata == 'On')
{
vdata=new String(vdata).replace( "On","<img src=icons/image.png width=272 height=256 style='margin-top: -30px;'>");
vdesc="Radio";
}
Not using Domoticz anymore
trekker25
Posts: 40
Joined: Tuesday 26 May 2015 10:50
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: NEW frontpage.html - request comments

Post by trekker25 »

G3rard wrote:
trekker25 wrote:i took the template from g3rard, but for some reason when i view the frontpage on my iphone or android tablet, all the cells just keep emtpy (says cell1 cell2 cell3 etc)

chrome desktop pc all works?

Other question: can i give 1 switch a different image? I have a dummy switching for starting a specific radio stream on my sonos and i want to use the logo of this radio station as a button?

also trying to figure out how to open Sonos controller app directly from the frontpage.html:

<a href="intent://scan/#Intent;scheme=acr;package=com.sonos.acr;end"> SONOS IMAGE </a>

according to google this should work, but for some reason the Playstore is opened and not the App itself...
Can you share some more information on your config? Is the frontpage in the Domoticz www folder or on a web server? Have you protected Domoticz? Is there not any cell filled with data on the iPhone or Android tablet?

You can give a switch a different image, it's being used for the weather prediction.
Just change the blue parts in the following example and put it in frontpage.js (somewere around line 450):

if (item.idx == idxnumberhere & vdata == 'On')
{
vdata=new String(vdata).replace( "On","<img src=icons/image.png width=272 height=256 style='margin-top: -30px;'>");
vdesc="Radio";
}
thanks for this info. Been reading for 1,5 hours in this thread only on page 20 yet :)

in the www of the rpi running domoticz. Domoticz is password secured. (could it be i'm not logged in on the android tablet? My iphone also gives empty values and it's logged in!)

Also on desktop when loading the frontpage, you first see Cell1 Cell2 etc until the page is loaded. But on iphone and android tabled it just keeps like that!
But i really like the frontpage concept! Need to experiment with the weather and how to display the days usage of Gas/Power.

EDIT must be some kind of security issue and when on Desktop and Chrome in Incognito mode the values also stay empty!
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 »

Check the $.domoticzurl in frontpage_settings.js.
I think you can use "http://user:password@ip:port" but I am not sure as I am not using password protect...
Not using Domoticz anymore
trekker25
Posts: 40
Joined: Tuesday 26 May 2015 10:50
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: NEW frontpage.html - request comments

Post by trekker25 »

console indeed shows http 401 problems, but adjusting the url doesn't seem to work. Or does it only work with Basic Auth?

edit: solution can be to first go to the dashboard and login and keep yourself logged in!
Last edited by trekker25 on Monday 17 August 2015 10:47, edited 1 time in total.
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 »

Why not whitelist your LAN network for Domoticz access? See Domoticz settings, there is a field where you can enter IP-adresses that don't have to fill in a password.
192.168.1.* should work (if you have a 192.168.1.x range).
I am not active on this forum anymore.
trekker25
Posts: 40
Joined: Tuesday 26 May 2015 10:50
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: NEW frontpage.html - request comments

Post by trekker25 »

thanks excellent idea. Never saw that option in the Settings page :)
JuanUil
Posts: 497
Joined: Friday 22 May 2015 12:21
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.11083
Location: Asten NB Nederland
Contact:

Re: NEW frontpage.html - request comments

Post by JuanUil »

Hi All,

I'm sorry to ask but I am completely new to this.
I am struggling with the frontpage. In below code I have put Idx 57 in as a lamp on the dressoir.
This is a Z-wave switch.
In the frontpage I see Dressoir and his status (off) but I can't get it switchable.
What else do I have to do to get it switchable?
Many thanks in advance for your help!

Greetz
Juan

Code: Select all

$(document).ready(function() {
        $.roomplan=0;           // define roomplan in Domoticz and create items below.
        $.domoticzurl="http://192.168.1.129:8080";
        //format: idx, value, label, description, [override css], [alarm value]
        $.PageArray = [
                ['82',  'Temp',                 'cell1',        'Aanvoer CV (&deg;C)'],
                ['83',  'Temp',                 'cell2',        'Retour CV (&deg;C)'],
                ['7',   'Temp',                 'itemp',        'Woonkamer (&deg;C)'],
                ['33',  'CounterToday',         'cell4',        'Electra vandaag (kWh)',],
                ['34',  'CounterToday',         'cell5',        'Gas vandaag (m<sup>3</sup>)',],       
 
                ['68',  'Status',               'cell6',        'CV-ketel',],
                ['6',   'Status',               'cell7',        'Keuken',],
                ['57',   'Status',               'cell8',        'Dressoir'],
                ['8',   'Status',               'cell9',        'LED-strip TV + Kast'],
                ['33',  'Usage',                'cell10',       'Huidig verbruik (W)',],
 
 
                ['87',  'Temp',                 'cell11',       'Buitentemperatuur (&deg;C)'],
                ['888', 'Data',                 'cell12',       'RAM gebruik Pi (%)'],
                ['57',  'Status',               'cell13',       'Lampje Expedit'],
                ['63',  'Status',               'cell14',       'Lampje TV-meubel'],
                ['5',   'Data',                 'cell15',       'CPU Gebruik Pi (%)'],
 
                ['87',  'Humidity',             'cell16',       'Luchtv. buiten (%)'],
                ['85',  'Status',               'cell17',       'Schemer'],
                ['87',  'ForecastStr',          'cell18',       'Voorspelling'],
                ['64',  'Status',               'cell19',       'Eettafel'],   
                ['1',   'Data',                 'cell20',       'RAM gebruik Pi (%)'],
        ];
 
Your mind is like a parachute,
It only works when it is opened!

RPI4 several Fibaro, KaKu, Neocoolcam switches, Z-Wave, Zigbee2Mqtt, Ikea bulbs and remote, Zigbee temp nodes
trekker25
Posts: 40
Joined: Tuesday 26 May 2015 10:50
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: NEW frontpage.html - request comments

Post by trekker25 »

JuanUil wrote:Hi All,

I'm sorry to ask but I am completely new to this.
I am struggling with the frontpage. In below code I have put Idx 57 in as a lamp on the dressoir.
This is a Z-wave switch.
In the frontpage I see Dressoir and his status (off) but I can't get it switchable.
What else do I have to do to get it switchable?
Many thanks in advance for your help!

Greetz
Juan

Code: Select all

$(document).ready(function() {
        $.roomplan=0;           // define roomplan in Domoticz and create items below.
        $.domoticzurl="http://192.168.1.129:8080";
        //format: idx, value, label, description, [override css], [alarm value]
        $.PageArray = [
                ['82',  'Temp',                 'cell1',        'Aanvoer CV (&deg;C)'],
                ['83',  'Temp',                 'cell2',        'Retour CV (&deg;C)'],
                ['7',   'Temp',                 'itemp',        'Woonkamer (&deg;C)'],
                ['33',  'CounterToday',         'cell4',        'Electra vandaag (kWh)',],
                ['34',  'CounterToday',         'cell5',        'Gas vandaag (m<sup>3</sup>)',],       
 
                ['68',  'Status',               'cell6',        'CV-ketel',],
                ['6',   'Status',               'cell7',        'Keuken',],
                ['57',   'Status',               'cell8',        'Dressoir'],
                ['8',   'Status',               'cell9',        'LED-strip TV + Kast'],
                ['33',  'Usage',                'cell10',       'Huidig verbruik (W)',],
 
 
                ['87',  'Temp',                 'cell11',       'Buitentemperatuur (&deg;C)'],
                ['888', 'Data',                 'cell12',       'RAM gebruik Pi (%)'],
                ['57',  'Status',               'cell13',       'Lampje Expedit'],
                ['63',  'Status',               'cell14',       'Lampje TV-meubel'],
                ['5',   'Data',                 'cell15',       'CPU Gebruik Pi (%)'],
 
                ['87',  'Humidity',             'cell16',       'Luchtv. buiten (%)'],
                ['85',  'Status',               'cell17',       'Schemer'],
                ['87',  'ForecastStr',          'cell18',       'Voorspelling'],
                ['64',  'Status',               'cell19',       'Eettafel'],   
                ['1',   'Data',                 'cell20',       'RAM gebruik Pi (%)'],
        ];
 
have you started with an older version?
I have started with the version of G3rard
https://github.com/gerard33/frontpage

and this is in the frontpage_settings.js for a zwave switch:

['35','Status', 'cell12', 'Keukenblad','1','0'],

I have a different question. I see people using the CounterToday type to get the current usage of power/gas. But do i need to define a switch for this??
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 »

Download ZIP button is on the right in Github :-)
You can also use this link.
https://github.com/gerard33/frontpage/a ... master.zip
Not using Domoticz anymore
JuanUil
Posts: 497
Joined: Friday 22 May 2015 12:21
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.11083
Location: Asten NB Nederland
Contact:

Re: NEW frontpage.html - request comments

Post by JuanUil »

Tnx for your reply.
Downloaded this version, added '1','0' but still no switching
What am I doing wrong?????????? :oops:
Your mind is like a parachute,
It only works when it is opened!

RPI4 several Fibaro, KaKu, Neocoolcam switches, Z-Wave, Zigbee2Mqtt, Ikea bulbs and remote, Zigbee temp nodes
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 »

trekker25 wrote: I have a different question. I see people using the CounterToday type to get the current usage of power/gas. But do i need to define a switch for this??
I saw this is already answered on Tweakers by Thinkpad. The utilities can be used on frontpage as well.
Example from Thinkpad:

Code: Select all

['6','CounterToday',            'cell4',        'Elektra vandaag (kWh)','1','0'],
['7','CounterToday',            'cell5',        'Gas vandaag (m<sup>3</sup>)','1','0'],
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 »

JuanUil wrote:Tnx for your reply.
Downloaded this version, added '1','0' but still no switching
What am I doing wrong?????????? :oops:
Did you already downloaded and installed that in the meanwhile? Seams a bit quick in 2 minutes, because the install and config will take some time ;)
Please do some extensive testing or share some more details (config, screenprints, F12 console in Chrome etc.).
Not using Domoticz anymore
JuanUil
Posts: 497
Joined: Friday 22 May 2015 12:21
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.11083
Location: Asten NB Nederland
Contact:

Re: NEW frontpage.html - request comments

Post by JuanUil »

G3rard wrote:
JuanUil wrote:Tnx for your reply.
Downloaded this version, added '1','0' but still no switching
What am I doing wrong?????????? :oops:
Did you already downloaded and installed that in the meanwhile? Seams a bit quick in 2 minutes, because the install and config will take some time ;)
Please do some extensive testing or share some more details (config, screenprints, F12 console in Chrome etc.).
Yes I downloaded everything, adjusted the json-config end copied everything to the www folder.
Do I need to do more?
I only get a black backgroundscreen with a moving image of buienradar, nothing more....

Image

In the config file I just alterd the domoticz url and put some idx nmbers in just for testing:

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.1.129:8080";
		//format: idx, value, label, description,lastseen(1 when lastseen is wanted, 2 is only time) ,plusmin button or protected (1 for buttons, 2 for volume of Sonos, 4 for protected), [override css], [alarm value]
        $.PageArray = [

//	['0','Desc',		'cell1',	'Kamer','0','0'], //Desc means show the sub cells
	['7','Temp',		'cell1a',	'Kamer','1','0'], //Lastseen only from cell_a possible
	['7','Temp',	    'cell1b',	'Kamer'],//,'0','0'],
	['0','Desc',		'cell2',	'Garage','0','0'],
	['18','Temp',		'cell2a',	'Garage','1','0'],
	['18','Humidity',	'cell2b',	'Garage','0','0'],
	['0','Data',		'cell3',	'Camera garage','0','0'],
	['0','Desc',		'cell4',	'Buitentemp + vocht','0','0'],
	['176','Data',		'cell4a',	'Buitentemp','1','0'],
	['98','Humidity',	'cell4b',	'Buitenvocht','0','0'],
	['0','Desc',		'cell5',	'Regen + regenkans','0','0'],
	['39','Rain',		'cell5a',	'Regen','1','0'],
	['97','Humidity',	'cell5b',	'Regenkans','0','0'],

	['8','Level',		'cell6',	'Hue kamer bank','1','1'],
	['9','Level',		'cell7',	'Hue kamer gang','1','1'],
	['57','Status',		'cell8',	'Dressoir','1','0'],
	['116','Status',	'cell9',	'Sonos Keuken','1','2'],
	['115','Status',	'cell10',	'Sonos Kantoor','1','2'],

	['24','Level',		'cell11',	'Keuken','1','1'],
	['25','Status',		'cell12',	'Keukenkastjes','1','0'],
	['0','Status',		'cell13',	'Kantoor lamp (25%)','1','0'],
	['171','Level',		'cell14',	'Kantoor','1','5'], //Level using for ZWave dimmer, vplusmin = 5 to start with level from z_dimmer
	['177','Status',	'cell15',	'Tuin','1','0'],

	['153','Status',	'cell16',	'Voordeur','1','4'],
	['149','Status',	'cell17',	'Garagedeur','1','4'],
	['10','Status',		'cell18',	'iPhone 5s','1','4'],
	['71','Data',		'cell19',	'Scherm (V)','1','0'],
	['79','Data',		'cell20',	'Scherm (A)','1','0'],

	['66','Status',		'cell21',	'Zon','2','0'],
	['0','Tijd',		'cell22',	'Tijd','0','0'],
	['109','Data',		'cell23',	'Alarm','1','0'],
	
	['0','Temp',		'cell25',	'Temperatuur buiten (C)','0','0'],
	
	['0','SunBoth',		'cell26',	'Dummy cel voor bepaling zon op en zon onder','0','0'],


	['37','Status',		'cell00',	'IsDonker','0','0'],

	['0','Desc',		'cell2_1',	'Barometer + zicht','0','0'],
	['49','Barometer',	'cell2_1a',	'Barometer','1','0'],
	['53','Visibility',	'cell2_1b',	'Zicht','0','0'],
	['0','Desc',		'cell2_2',	'Windrichting','0','0'],
	['100','Data',		'cell2_2a',	'Windrichting','1','0'],
	['101','Data',		'cell2_2b',	'Windsnelheid','0','0'],
	['49','ForecastStr','cell2_3',	'Weersvoorspelling','0','0'],
	['0','Desc',		'cell2_4',	'NAS CPU + HDD','0','0'],
	['17','Data',		'cell2_4a',	'CPU','1','0'],
	['13','Data',		'cell2_4b',	'HDD','0','0'],
	['0','Desc',		'cell2_5',	'Temp + Lux F','1','0'],
	['154','Data',		'cell2_5a',	'Temperatuur Fibaro','1','0'],
	['147','Data',		'cell2_5b',	'Temperatuur Fibaro','1','0'],

	['43','Level',		'cell2_6',	'Lamp slaapkamer','1','1'],
	['21','Status',		'cell2_7',	'Slaapkamer kast','1','0'],
	['145','Data',		'cell2_8',	'Bewegingssensor F','1','4'],
	['32','Status',		'cell2_9',	'Led gang','1','0'],
	['33','Status',		'cell2_10',	'Led zolder','1','0'],

	['29','Status',		'cell2_11',	'Lamp TV','1','0'],
	['30','Status',		'cell2_12',	'Lamp vensterbank','1','0'],
	['0','Usage',		'cell2_13',	'Cell 2_13','0','0'],
	['45','Status',		'cell2_14',	'Vijver pomp','1','0'],
	['46','Status',		'cell2_15',	'Vijver luchtpomp','1','0'],

	['139','Status',	'cell2_16',	'Droger','1','0'],
	['34','Status',		'cell2_17',	'Garage','1','0'],
	['0','Data',		'cell2_18',	'0','0','0'],
	['0','Data',		'cell2_19',	'0','0','0'],
	['141','Status',	'cell2_20',	'IJskast','1','0'],

	['140','Data',		'cell2_21',	'Verbruik droger','1','0'],
	['0','Tijd',		'cell2_22',	'Tijd','0','0'],
	['142','Data',		'cell2_23',	'Verbruik IJskast','1','0'],
	['73','ForecastStr','cell2_25',	'Weersvoorspelling (FC)','0','0'],
	];
	$.PageArray_Scenes = [
	
	['5','Status',		'cell8',	'Lampen kamer (groep)','1','0'],
	['7','Status',		'cell13',	'Studeerkamer (30%)','1','0'],

	];

// ############################################################################################################
// #### ^^^^^   USER VALUES above ^^^^^   #######
// ############################################################################################################

RefreshData();
});


Sorry for being a newbie on this, but I like your frontpage verry much and would like to install it on my laptop
Thnx for your help


Juan
Your mind is like a parachute,
It only works when it is opened!

RPI4 several Fibaro, KaKu, Neocoolcam switches, Z-Wave, Zigbee2Mqtt, Ikea bulbs and remote, Zigbee temp nodes
User avatar
G3rard
Posts: 669
Joined: Wednesday 04 March 2015 22:15
Target OS: -
Domoticz version: No
Location: The Netherlands
Contact:

NEW frontpage.html - request comments

Post by G3rard »

You have to open the frontpage.html from the Domoticz www folder. I see in your screenprint that you are opening it from a temp folder and that will not work...
Try http://192.168.1.129:8080/frontpage.html.
Not using Domoticz anymore
JuanUil
Posts: 497
Joined: Friday 22 May 2015 12:21
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.11083
Location: Asten NB Nederland
Contact:

Re: NEW frontpage.html - request comments

Post by JuanUil »

G3rard,
Super bedankt nu werkt het.

Image

Echt mooi!
Na heel wat gepuzzel nu dan toch met jouw hulp werkend.
Het schakelen werkt ook prima nu!

Groet

Juan
Your mind is like a parachute,
It only works when it is opened!

RPI4 several Fibaro, KaKu, Neocoolcam switches, Z-Wave, Zigbee2Mqtt, Ikea bulbs and remote, Zigbee temp nodes
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 »

I'm glad that it is working now .
Not using Domoticz anymore
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest