Page 57 of 66

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

Posted: Wednesday 28 December 2016 16:39
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.

Re: NEW frontpage.html - request comments

Posted: Thursday 29 December 2016 0:15
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.

Re: NEW frontpage.html - request comments

Posted: Thursday 29 December 2016 8:39
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

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

Posted: Thursday 29 December 2016 8:51
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.

Re: NEW frontpage.html - request comments

Posted: Thursday 29 December 2016 9:45
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

Re: NEW frontpage.html - request comments

Posted: Thursday 29 December 2016 9:51
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

Re: NEW frontpage.html - request comments

Posted: Thursday 29 December 2016 10:38
by JuanUil
Hi Denisj,

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

Jan

Re: NEW frontpage.html - request comments

Posted: Thursday 29 December 2016 10:40
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

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

Posted: Thursday 29 December 2016 10:54
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

Re: NEW frontpage.html - request comments

Posted: Thursday 29 December 2016 12:03
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

Re: NEW frontpage.html - request comments

Posted: Thursday 29 December 2016 12:11
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

Re: NEW frontpage.html - request comments

Posted: Thursday 29 December 2016 12:13
by denisj
Try to take out the double quote here:
class='bigcamera' " /></div>

Denis

Re: NEW frontpage.html - request comments

Posted: Thursday 29 December 2016 12:17
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.

Re: NEW frontpage.html - request comments

Posted: Thursday 29 December 2016 12:33
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

Re: NEW frontpage.html - request comments

Posted: Thursday 29 December 2016 12:54
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

Re: NEW frontpage.html - request comments

Posted: Thursday 29 December 2016 14:27
by JuanUil
That did the trick!!@

It's working perfectly now!

Thank you all for the help!

Jan

Re: NEW frontpage.html - request comments

Posted: Thursday 29 December 2016 18:17
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!

Re: NEW frontpage.html - request comments

Posted: Friday 30 December 2016 6:37
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

Re: NEW frontpage.html - request comments

Posted: Saturday 31 December 2016 0:56
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.

Re: NEW frontpage.html - request comments

Posted: Tuesday 03 January 2017 16:50
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!