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 »

There is no other documentation, but let my try to help you.

You have to use the IP of your Sonos in the config.php, not the IP of the Pi.
Part of the config.php where 115 is the IDX in Domoticz.

Code: Select all

'zones' => array(
      '115'   => '192.168.1.161', /* kitchen*/
	),
The url you have to use in this example is:

Code: Select all

http://yourserver/tablet/sonos/index.php?zone=115&action=Play
And you have to run the PHP on a PHP enabled web server. So if that's not installed on your Pi, you have to install PHP on it.
Not using Domoticz anymore
grelle
Posts: 7
Joined: Thursday 28 November 2013 11:08
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Sweden / Östersund
Contact:

Re: NEW frontpage.html - request comments

Post by grelle »

Thankyou for your reply! My guess is that PHP is not working but this makes me wonder...

How does Domoticz work with webserver, Is not Domoticz using PHP too ? I can find scripts in Domoticz wiki about PHP, will look into this further today. Maybe the problem is my subfolder "tablet".
Sweden / Östersund
grelle
Posts: 7
Joined: Thursday 28 November 2013 11:08
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Sweden / Östersund
Contact:

Re: NEW frontpage.html - request comments

Post by grelle »

Indeed, installed php5 and apache2 and moved sonos folder to /var/www/ which is the root of apache webdocs. Edited the "on" and "off" links in my Domoticz dummy switch and voila!

Wonderful. Thank you for sharing this piece of code!
Sweden / Östersund
woods
Posts: 8
Joined: Friday 30 October 2015 17:31
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: NEW frontpage.html - request comments

Post by woods »

Stupid question, please don't laugh!

How do I find the 'www' folder on my Raspberry Pi 2? I'm trying to follow some guides, but I can't figure out how to start. I've tried to use 'putty' and can't find any directory called 'www', if I try to 'sudo www'.

Thanks for the help!

Ps. Is there any ELI5 guides on this?
pj-r
Posts: 140
Joined: Wednesday 17 December 2014 17:30
Target OS: Linux
Domoticz version: V3.8650
Location: Jyväskylä, Finland
Contact:

Re: NEW frontpage.html - request comments

Post by pj-r »

woods wrote:How do I find the 'www' folder on my Raspberry Pi 2? I'm trying to follow some guides, but I can't figure out how to start. I've tried to use 'putty' and can't find any directory called 'www', if I try to 'sudo www'.
This quide might help a little. And then its about are you looking for www folder of apache or domoticz. Look for /var/www and /home/pi/domoticz/www.
LXC(x64 Ubuntu Xenial), RFXtrx433E, MySensors
Minimac
Posts: 2
Joined: Monday 09 November 2015 23:58
Target OS: Windows
Domoticz version:
Contact:

Re: NEW frontpage.html - request comments

Post by Minimac »

Hello..

I Have the same question about the www folder on a Raspberry PI.
I have my domoticz system working om a windows machine and now i want to switch to the Raspberry.

could someone tell me how to put the Frontpage fils into the www folder on a Raspberry PI

Thanx..
Kohen
Posts: 23
Joined: Monday 12 October 2015 12:05
Target OS: NAS (Synology & others)
Domoticz version:
Location: Veldhoven, The Netherlands
Contact:

Re: NEW frontpage.html - request comments

Post by Kohen »

First of all, looking great!
Second , I've been reading the whole topic but now I'm wondering, what's the latest version? :)
Synology NAS 412+, Aeotec stick V5, Aeotec recessed door sensor, Aeotec micro double smart switch, Fibaro Dimmer, iPad 2 with own 3d printed wall mount.
User avatar
1bigwink
Posts: 11
Joined: Wednesday 17 June 2015 21:07
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Wiltshire, UK
Contact:

Re: NEW frontpage.html - request comments

Post by 1bigwink »

This is a great feature for Domoticz - thanks for sharing it. As a newbie though I am struggling to create my own frontpage, even after reading through the whole thread... I'm having problems getting my IP Cam working and the popup to work with the doorbell, as well as 'on click' functions (e.g. show the thermostat up/down buttons when the temp value is clicked) is there a set of instructions anywhere? If there isn't could we get this added to the Domoticz wiki? I'd be happy to contribute myself as I learn (might need some pointers along the way though).
Thanks again!
1x RasPi, RFXtrx433e, v5 Aeon ZWave, MD210R Door Contacts, MC335R PIRs, MD326 Siren, 25 x MiLight RGBW Bulb (4 x WiFi Contoller), 12 IP Cam, Fibaro FGS221, 5x433mhz venetian blind, 433mhz TV ceiling lift.
Next: Touchscreen + frontpage.html
User avatar
1bigwink
Posts: 11
Joined: Wednesday 17 June 2015 21:07
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Wiltshire, UK
Contact:

Re: NEW frontpage.html - request comments

Post by 1bigwink »

Minimac wrote:Hello..
could someone tell me how to put the Frontpage fils into the www folder on a Raspberry PI
Thanx..
I connected via SFTP using an FTP client and default pi crednetials - then copied all the frontpage files into /home/pi/domoticz/www/
Kohen wrote:First of all, looking great!
Second , I've been reading the whole topic but now I'm wondering, what's the latest version? :)
From what I can see the latest version is https://github.com/gerard33/frontpage, not sure if this is the original authors but works for me.
1x RasPi, RFXtrx433e, v5 Aeon ZWave, MD210R Door Contacts, MC335R PIRs, MD326 Siren, 25 x MiLight RGBW Bulb (4 x WiFi Contoller), 12 IP Cam, Fibaro FGS221, 5x433mhz venetian blind, 433mhz TV ceiling lift.
Next: Touchscreen + frontpage.html
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 »

1bigwink wrote:This is a great feature for Domoticz - thanks for sharing it. As a newbie though I am struggling to create my own frontpage, even after reading through the whole thread... I'm having problems getting my IP Cam working and the popup to work with the doorbell, as well as 'on click' functions (e.g. show the thermostat up/down buttons when the temp value is clicked) is there a set of instructions anywhere? If there isn't could we get this added to the Domoticz wiki? I'd be happy to contribute myself as I learn (might need some pointers along the way though).
Thanks again!
What is the problem with the IP cam? Is it working in Domoticz? In that case you can also use the following in the frontpage.html (cell 25 is just an example).

Code: Select all

<div id="frame">
	<div id="ls_cell25"></div><div id="cell25">
	<img src="http://<domoticzip:port>/camsnapshot.jpg?idx=3&t=" onClick="lightbox_open('camera1', 92400);" width="200px" class='camera' /></div>
	<div id="bcell25"></div>
	<div id="desc_cell25">Buiten</div>
</div>
Replace the 3 after idx with the corresponding idx of the camera.

For the popup in the doorbell I use the following code in frontpage.js.

Code: Select all

//doorbell
	if (item.idx == idx_doorbell && vdata == doorbell_status) {
		lightbox_open('camera1', 15400);
		vdata=new String(vdata).replace( "On", "Tringgg");
	}
And in frontpage_settings.js.

Code: Select all

<!-- This triggers the camera PopUp when the doorbell is pressed -->
<!-- Text could be 'On', 'Group On' or 'Chime' -->
var doorbell_status = 'On';
var idx_doorbell = '200'; //dummy switch which goes on when doorbell rings, goes off after 10 seconds
var doorbell_cmd = "lightbox_open('camera1', 15400);"
I have made a dummy switch (idx 200) in Domoticz which goes on when the doorbell rings and goes off after 10 seconds.

How does you Thermostat line look like? Is the last value before the ] a 1? Then it should show the plus and min buttons.
Not using Domoticz anymore
User avatar
havnegata
Posts: 114
Joined: Wednesday 10 September 2014 11:05
Target OS: Raspberry Pi / ODroid
Domoticz version: V4.10162
Location: Norway
Contact:

Re: NEW frontpage.html - request comments

Post by havnegata »

Help me understand.

My goal is to start all over with clean sheets regarding the frontpage from G3rard. Recently I've experimenting with lots of different versions of frontpages, but now I wanted to start all over, so I deleted everything regarding frontpagefolders and downloaded the last version from G3rard. Still, trying to open the new frontpage.html (192.168.1.160:7050/frontpage.html) without editing any idx, I get my old frontpage with edited idx. Any advice is much appreciated

Edit: If I move frontpage.html from "c:\domoticz\www\" to "c:\domoticz\www\frontpage\" and then open it it's clean, but then it's not rechable from 192.168.1.160:7050/frontpage.html
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 »

Did you also replace the frontpage.html?
User avatar
havnegata
Posts: 114
Joined: Wednesday 10 September 2014 11:05
Target OS: Raspberry Pi / ODroid
Domoticz version: V4.10162
Location: Norway
Contact:

Re: NEW frontpage.html - request comments

Post by havnegata »

Yes, it's the same file, but appears differently in different locations

Sent from my LG-D855 using Tapatalk
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 »

You better search your system for duplicate versions of those files/directorys
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 »

havnegata wrote:Help me understand.

My goal is to start all over with clean sheets regarding the frontpage from G3rard. Recently I've experimenting with lots of different versions of frontpages, but now I wanted to start all over, so I deleted everything regarding frontpagefolders and downloaded the last version from G3rard. Still, trying to open the new frontpage.html (192.168.1.160:7050/frontpage.html) without editing any idx, I get my old frontpage with edited idx. Any advice is much appreciated

Edit: If I move frontpage.html from "c:\domoticz\www\" to "c:\domoticz\www\frontpage\" and then open it it's clean, but then it's not rechable from 192.168.1.160:7050/frontpage.html
Try to install it in c:\domoticz\www\frontpage\ and use 192.168.1.160:7050/frontpage/frontpage.html to open the frontpage.
Not using Domoticz anymore
User avatar
havnegata
Posts: 114
Joined: Wednesday 10 September 2014 11:05
Target OS: Raspberry Pi / ODroid
Domoticz version: V4.10162
Location: Norway
Contact:

Re: NEW frontpage.html - request comments

Post by havnegata »

Thanks!! That did the trick, but do you have any idea how this happened? Some sort of cache or what?

Sent from my LG-D855 using Tapatalk
User avatar
havnegata
Posts: 114
Joined: Wednesday 10 September 2014 11:05
Target OS: Raspberry Pi / ODroid
Domoticz version: V4.10162
Location: Norway
Contact:

Re: NEW frontpage.html - request comments

Post by havnegata »

So far so good! I'm reading G3rard's post on how to get the alarm working: http://www.domoticz.com/forum/viewtopic ... nel#p38181
I have the icon correct and the security panel pops up, but when I try to push the numbers for my code nothing happens, only sound. Any ideas?
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 »

G3rard, how do I get the 33dimmer.png enz to work?
Nice frontpage.
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 »

havnegata wrote:So far so good! I'm reading G3rard's post on how to get the alarm working: http://www.domoticz.com/forum/viewtopic ... nel#p38181
I have the icon correct and the security panel pops up, but when I try to push the numbers for my code nothing happens, only sound. Any ideas?
Which browser are you using? I use Chrome and it works over here.
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 »

SwordFish wrote:G3rard, how do I get the 33dimmer.png enz to work?
Nice frontpage.
Thanks.

Did you already check this post?
http://www.domoticz.com/forum/viewtopic ... mer#p37199
I am not using that function so let me know if this doesn't work then I will have another look at it.
Not using Domoticz anymore
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest