NEW frontpage.html - request comments

Moderator: leecollings

stlaha2007
Posts: 370
Joined: Monday 05 October 2015 10:16
Target OS: -
Domoticz version:
Contact:

Re: RE: Re: NEW frontpage.html - request comments

Post by stlaha2007 »

JuanUil wrote:Hi there all,

I have a Foscam FI9900P camera and I am still not able to get the stream in this frontpage.
I have this code in my frontpage.html:

Code: Select all

<div id="frame">
	<div id="ls_cell3"></div>
	<div id="cell3"><img src="http://192.168.1.133:88/cgi-bin/CGIStream.cgi?cmd=snappicture&usr=User&pwd=Password"  onClick="lightbox_open('camera', 25400);" width="200px" class="camera" /></div>
	<!--  <div id="cell3"><img src="" onClick="lightbox_open('camera', 25400);" width="200px" class="camera" /></div> -->
	<div id="bcell3"></div>
	<div id="desc_cell3">Camera achter</div>
</div>
but I stil get webcam offline.
anybody any idea what I am doing wrong?

tnx for any help
Jan
After a deep dig into my memory, ran into it myself. At the end of the frontpage.html there's another section which also controls a bit of the webcam cells.

My advice is test it first with a static image (you put it there first) in the domoticz www folder/directory and call that with the url http://domoticz.ip.add.ess:port/imagefilename.jpg

And use one of the other camera names first eg camera2 or camera3. These names need to be the same also.
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:Hi there all,
I have a Foscam FI9900P camera and I am still not able to get the stream in this frontpage.
I have this code in my frontpage.html:
...
but I stil get webcam offline.
anybody any idea what I am doing wrong?
tnx for any help
Jan
If you have the camera added in Domoticz you can use the following code in the html:

Code: Select all

<img src="http://192.168.1.100:8080/camsnapshot.jpg?idx=5&t="  onClick="lightbox_open('camera1, 25400);" width="200px" class='camera' />
And at the bottom of the html file use:

Code: Select all

<div id="popup_camera1"><img src="http://192.168.1.100:8080/camsnapshot.jpg?idx=5&t=" onClick="lightbox_close('camera');" width="640" height="480" onload='setTimeout(function() {src = src.substring(0, (src.lastIndexOf("t=")+2))+(new Date()).getTime()}, 100)' onerror='setTimeout(function() {src = src.substring(0, (src.lastIndexOf("t=")+2))+(new Date()).getTime()}, 1000)' class='bigcamera' /></div>
Change IP and port to your Domoticz settings and the idx=5 to the camera idx you are using.
Not using Domoticz anymore
denisj
Posts: 58
Joined: Saturday 17 December 2016 13:13
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: NEW frontpage.html - request comments

Post by denisj »

G3rard wrote: Change IP and port to your Domoticz settings and the idx=5 to the camera idx you are using.
Sorry G3rard... I have a cam on cell3 that it's work using the domoticz idx 1 ... but only the jpeg it's work.
If I click on it I take an error:
2016-12-29 08:18:10.511 frontpage.html:93 Uncaught SyntaxError: Invalid or unexpected token

The code I have is:
on frontpage.html:

Code: Select all

<div id="cell3"><img src="http://192.168.1.96:8080/camsnapshot.jpg?idx=1&t=" width="200px" class='camera'  /></div>
.
.
.
<div id="popup_camera"><img src="http://casuta.me/camsnapshot.jpg?idx=1&t=" onClick="lightbox_close('camera');" width="640" height="480" onload='setTimeout(function() {src = src.substring(0, (src.lastIndexOf("t=")+2))+(new Date()).getTime()}, 100)' onerror='setTimeout(function() {src = src.substring(0, (src.lastIndexOf("t=")+2))+(new Date()).getTime()}, 1000)' class='bigcamera' /></div>

on js/frontpage_settings.js

Code: Select all

['0','Data',            'cell3',        'Camera garage','0','0'],
Can you please help me
Thanks in advance
Denis
stlaha2007
Posts: 370
Joined: Monday 05 October 2015 10:16
Target OS: -
Domoticz version:
Contact:

Re: RE: Re: NEW frontpage.html - request comments

Post by stlaha2007 »

denisj wrote:
G3rard wrote: Change IP and port to your Domoticz settings and the idx=5 to the camera idx you are using.
Sorry G3rard... I have a cam on cell3 that it's work using the domoticz idx 1 ... but only the jpeg it's work.
If I click on it I take an error:
2016-12-29 08:18:10.511 frontpage.html:93 Uncaught SyntaxError: Invalid or unexpected token

The code I have is:
on frontpage.html:

Code: Select all

<div id="cell3"><img src="http://192.168.1.96:8080/camsnapshot.jpg?idx=1&t=" width="200px" class='camera'  /></div>
.
.
.
<div id="popup_camera"><img src="http://casuta.me/camsnapshot.jpg?idx=1&t=" onClick="lightbox_close('camera');" width="640" height="480" onload='setTimeout(function() {src = src.substring(0, (src.lastIndexOf("t=")+2))+(new Date()).getTime()}, 100)' onerror='setTimeout(function() {src = src.substring(0, (src.lastIndexOf("t=")+2))+(new Date()).getTime()}, 1000)' class='bigcamera' /></div>

on js/frontpage_settings.js

Code: Select all

['0','Data',            'cell3',        'Camera garage','0','0'],
Can you please help me
Thanks in advance
Denis
Check the javascript code... sometimes copy/paste doesn't work, including 'hidden' formatting or other code.
Also check the url.

Syntax means simply said theres a call which isn't correctly formed. Missing closing single qoute, double quote, round or square hooks.
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 G3rard,
Change IP and port to your Domoticz settings and the idx=5 to the camera idx you are using.
thanx for your help.
maybe a stupid question but where do I find the IDX of the camera?
It is not mentioned in the hardware section nor in the apparaten.
At the cameratavb I only find the ip and port.

Jan
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
denisj
Posts: 58
Joined: Saturday 17 December 2016 13:13
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: NEW frontpage.html - request comments

Post by denisj »

JuanUil wrote:Hi G3rard,
maybe a stupid question but where do I find the IDX of the camera?
Jan
Maybe can help you if you take a look at:
http://yourdomoticz:port/json.htm?type=devices&plan=0
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 Denisj,

No the camera is not in that list. All other devices are but no camera

Jan
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
denisj
Posts: 58
Joined: Saturday 17 December 2016 13:13
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: NEW frontpage.html - request comments

Post by denisj »

But the name ... camera1, camera2 etc... where is get from ?
Must be declared in some place, but I didn't find

Thanks again
Denis
denisj
Posts: 58
Joined: Saturday 17 December 2016 13:13
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: RE: Re: NEW frontpage.html - request comments

Post by denisj »

stlaha2007 wrote: Check the javascript code... sometimes copy/paste doesn't work, including 'hidden' formatting or other code.
Also check the url.
Syntax means simply said theres a call which isn't correctly formed. Missing closing single qoute, double quote, round or square hooks.
Thanks a lot ... there was missing closing single qoute after 'camera

Now it's work :-)
Thanks again
Denis
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 helpers,

I think I am getting crazy.
I have my camera working now but the pop-up of thed camera is constantly at the bottom of my screen.

Image

This is the code I am using in frontpage.html:

Code: Select all

<div id="frame">
	<div id="ls_cell3"></div>
	<div id="cell3"><img src="http://192.168.1.133:88/cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=Username&pwd=Password&t=" onClick="lightbox_open('camera1, 25400);" width="200px" class='camera' " /></div>
	<div id="bcell3"></div>
	<div id="desc_cell3">Camera kamer</div>
</div>
and at the bottom:

Code: Select all

<!-- Popups under -->
<div id="popup_protected"></div>
<div id="popup_switch"></div>

<div id="popup_camera1"><img src="http://192.168.1.133:88/cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=Username&pwd=Password&t=" onClick="lightbox_close('camera');" width="640" height="480" onload='setTimeout(function() {src = src.substring(0, (src.lastIndexOf("t=")+2))+(new Date()).getTime()}, 100)' onerror='setTimeout(function() {src = src.substring(0, (src.lastIndexOf("t=")+2))+(new Date()).getTime()}, 1000)' class='bigcamera' " /></div>
<div id="popup_camera2"><img src="http://api.buienradar.nl/image/1.0/RadarMapNL?w=640&h=480"  onClick="lightbox_close('camera2');" class="" /></div>
<div id="fade"></div>
Buienradar is working well but my camera not.
What am I doing wrong?

Jan
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
denisj
Posts: 58
Joined: Saturday 17 December 2016 13:13
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: NEW frontpage.html - request comments

Post by denisj »

JuanUil wrote: <div id="popup_camera1"><img src="http://192.168.1.133:88/cgi-bin/CGIProx ... assword&t=" onClick="lightbox_close('camera');" width="640" height="480" onload='setTimeout(function() {src = src.substring(0, (src.lastIndexOf("t=")+2))+(new Date()).getTime()}, 100)' onerror='setTimeout(function() {src = src.substring(0, (src.lastIndexOf("t=")+2))+(new Date()).getTime()}, 1000)' class='bigcamera' " /></div>
If I can help you, it's like it not take well the bigcamera class
Take a look with chrome debug mode and control if the bigcamera class is charge.
Denis
denisj
Posts: 58
Joined: Saturday 17 December 2016 13:13
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: NEW frontpage.html - request comments

Post by denisj »

Try to take out the double quote here:
class='bigcamera' " /></div>

Denis
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:Hi G3rard,
Change IP and port to your Domoticz settings and the idx=5 to the camera idx you are using.
thanx for your help.
maybe a stupid question but where do I find the IDX of the camera?
It is not mentioned in the hardware section nor in the apparaten.
At the cameratavb I only find the ip and port.

Jan
Open the Camera tab in Domoticz and rightclick on the camera icon (to take a snapshot). Then you can save the URL and see the idx.
Otherwise just start at idx=1 and try until you find it. The camera idx is different then the devices idx, so it will start at 1.
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 »

Try to take out the double quote here:
class='bigcamera' " /></div>

Denis
took out the doublequote and bigcamera class is working.
I have added

Code: Select all

onClick="lightbox_close('camera1')
and now I can close the pop-up
but clicking on cell 3 doesn't open it again
pop-up is also in the wrong place
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
denisj
Posts: 58
Joined: Saturday 17 December 2016 13:13
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: NEW frontpage.html - request comments

Post by denisj »

I think is better if you take a look at the original frontend file here:
https://github.com/gerard33/frontpage/b ... tpage.html

And the control your strings of "camera" ...see if there is some difference.

Denis
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 »

That did the trick!!@

It's working perfectly now!

Thank you all for the help!

Jan
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
Trigun
Posts: 390
Joined: Wednesday 30 November 2016 11:58
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.10717
Contact:

Re: NEW frontpage.html - request comments

Post by Trigun »

Polygontrauma wrote:Hey everyone!

I tried different frontpages which where posted here, and liked Gerards version best. Unfortunately, I can't get my devices to get displayed in this design (of course I edited roomplan number, domoticz url and devices IDX in the frontpage_settings.js, exactly the same way I did as I was testing other frontpages, which worked that way). What could be my problem regarding this frontpage?!

Hello, did you manage to get the frontpage working?
if so, I am running into the same issue.

Thnx!
denisj
Posts: 58
Joined: Saturday 17 December 2016 13:13
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: NEW frontpage.html - request comments

Post by denisj »

Hi there all,
I found a little traffic problem with the popup_camera script:

Code: Select all

<div id="popup_camera"><img src="http://casuta.me/camsnapshot.jpg?idx=1&t=" 
	onClick="lightbox_close('camera');" width="640" height="480" 
	onload= 'setTimeout(function() {src = src.substring(0, (src.lastIndexOf("t=")+2))+(new Date()).getTime()}, 100)' 
	onerror='setTimeout(function() {src = src.substring(0, (src.lastIndexOf("t=")+2))+(new Date()).getTime()}, 1000)' class='bigcamera' />
</div>
In this case allready on the "onload" the div begin to download a lot of jpeg.
It's ok if you open the bigcamera ... but if it's still close it didn't must download all the pics.

If you go in chrome debug(F12) on the network tab you will see all traffic.

It's there anybody know how to load this div in order to make it stay calm :-)
..until we open it ?

Thanks all
Denis
vgr2
Posts: 71
Joined: Monday 29 August 2016 12:02
Target OS: -
Domoticz version:
Contact:

Re: NEW frontpage.html - request comments

Post by vgr2 »

Hi, I’ve started my first steps with the New FrontPage and I have a problem with the scaling on Windows PC . The values are not fitting into the boxes. Can anybody give me a helping hand because I’m not an expert.
Attachments
Unbenannt.JPG
Unbenannt.JPG (28.07 KiB) Viewed 2166 times
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 »

Hi!

Working on this frontpage for a while now, and everything starts to work!

However, I would like to adjust the frontpage so it will be full screen on my tablet (1920x1200). I cannot get this to work.

Any help on this would be very welcome!
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests