Page 1 of 2

Webcamscript 0.3

Posted: Fri May 04, 2012 12:18 am
by Verkenner
Vrienden, uren getest maar ik krijg het fraaie webcamscript van DJ nog even niet aan de praat. Sorry.
Ik heb het script in een event gezet maar er komt geen plaatje in de Homepage van Homeseer.

Als ik het commando geef: http://user:password@192.168.178.14/oneshotimage.jpg
dan zie ik in de browser de foto wel verschijnen.

Kan het zijn dat plaatjes van de webcam worden weggeschreven naar de Directory \Homeseer 2\html\ ??
Hoe krijg ik ze dan weggeschreven naar \Homeseer PRO\html\ ?

Waarom komt er na het starten van het script geen foto in de homepage van Homeseer?

Dank voor de hulp. Appreciated !Verkenner

geen plakplaatjes

Posted: Fri May 04, 2012 9:09 am
by Verkenner
Thera are no pictures in de map: homeseer pro/html/camerabeelden/sony

And is html\ added automatically ??

Thanks

Re: Webcamscript 0.3

Posted: Sat May 05, 2012 12:00 pm
by DJF3
I don't think /Homeseer 2/ or /Homeseer PRO/ makes a difference. The parameters seem to be correct. You could, as a test, create the "Homeseer 2/html/Camerabeelden/" folder, just to make sure ;-)
In the script you can change the variable 'strDebug' from 0 to 1 or 2 ('2' won't save an image but provide a lot of debugging info in the HS Log)
Can you run that and reply with the debugging info?
DJ

PS. I have uploaded a slightly newer version, 0.3e on my website (without instructions but changes are documented in the script itself)

Re: Webcamscript 0.3E

Posted: Sun May 06, 2012 9:47 pm
by Verkenner
Thanks DJ,

Yes, one step further.
With the new script 0.3e the webcampicture comes into the directory:
../Homeseer pro/html/Camerabeelden/Sony/ Sony_2012-05-06_20-57-52.jpg
Now that works.

Next step: Now I have to debug to find out why the picture does not come into the Homeseer-homepage.
To be cont. I will report ASAP.

Thanks, cheers Verkenner.
Grabbed Camerapicture 1
Grabbed Camerapicture 1
Sony_2012-05-06_20-57-52.jpg (59.21 KiB) Viewed 20780 times

Re: Webcamscript 0.3

Posted: Sun May 06, 2012 10:28 pm
by Digit
Hey, wait... looking at the background, I think this image has to be flipped vertically to make it correct, right?
So how to interpret the direction of the thumb?? :lol:

Geflipped ;-)

Posted: Sun May 06, 2012 11:59 pm
by Verkenner
Yes ;-)
You did find it. ;-)

My Sony is standing on my desk but normaly it hangs on the ceiling.
On my desk the video is flipped.
Actuality I made the picture pointing my thumb down. ;-) ;-)
And I turned around my watch 180 degrees.
Reason for that all was that I wanted to show the time is nearly 21 hour.
Next time I will turn around the frontdoor of my office. ;-)

Yes Robert, SHARP, very SHARP ;-)

Cheers, Verkenner

Re: Webcamscript 0.3

Posted: Mon May 07, 2012 12:09 am
by Digit
LOL, I was watching at the file name of the image and your watch and thought: something else is wrong too.. am I going crazy or what???
Pfff, you cured me :lol:

Re: Webcamscript 0.3

Posted: Mon May 07, 2012 12:13 am
by Verkenner
I wanted to show my new DCF-watch either ;-) ;-)

Re: Webcamscript 0.3E

Posted: Mon May 07, 2012 10:53 am
by DJF3
Verkenner,

The easiest thing to do is use Firefox or Chrome and right click the missing image. Now click "Inspect Element" or something similar.
With Firefox you then have to select "HTML" on the bottom right. That should now show the HTML code for this image.

You'll be able to see if there's some URL problem.. Feel free to share that part of the HTML source code of your device page that shows the missing image.

Cheers
DJ

Verkenner wrote:Thanks DJ,

Yes, one step further.
With the new script 0.3e the webcampicture comes into the directory:
../Homeseer pro/html/Camerabeelden/Sony/ Sony_2012-05-06_20-57-52.jpg
Now that works.

Next step: Now I have to debug to find out why the picture does not come into the Homeseer-homepage.
To be cont. I will report ASAP.

Thanks, cheers Verkenner.

Re: Webcamscript 0.3

Posted: Fri May 11, 2012 11:53 pm
by Verkenner
Installed Chrome on a dedicated PC.
Made a screencopy (attached).

With Chrome in homeseer homepage I do not see script for the picture. Suprising.
Do not know why there is no picture in the homepage.

Thanks for help
Verkenner

Re: Webcamscript 0.3

Posted: Sun May 13, 2012 2:09 pm
by DJF3
What you can do: in the script, change 'strDebug=0' to '=2'.
Then it won't capture/save images but write entries to the HS log describing exactly what it wants to do. Can you share the log entries?

BTW, if you capture images without the date/time (fixed filename) you can manually set the W1 device to show that image. Here's how that should work in the HS 'Control Panel' page:
&hs.setdevicestring "W1","<img src='/Camerabeelden/SonyCam.jpg'></img>"

Re: Webcamscript 0.3e

Posted: Mon May 14, 2012 12:15 am
by Verkenner
Debug set to 2

Start event

HS-Logfile:
14-5-2012 0:08:27 Event Event Trigger "camera"
14-5-2012 0:08:27 Event Running script in background: DJ_WebCam_03.vb("Main","W1|http://user:password@192.168.178.14/one ... n/Sony|yes")
14-5-2012 0:08:27 DJ_Webcam_0.3e URL: http://user:password@192.168.178.14/one ... ge.jpgFILE: Sony.jpgDIR: html/Camerabeelden/SonyDATE:2012-05-14_00-08-27SERVER: http://user:password@192.168.178.14PATH: /oneshotimage.jpg
14-5-2012 0:08:27 DJ_Webcam_0.3e NAME+DATE:html/Camerabeelden/Sony\Sony_2012-05-14_00-08-27.jpg
14-5-2012 0:08:27 DJ_Webcam_0.3e IMAGE URL:


There is no Image url in the log.

Thanks for help.
Verkenner

Webcamscript 0.3e

Posted: Mon May 14, 2012 12:34 am
by Verkenner
Hi DJ, thanks for help.

Yes, the 'oneliner' in CONTRO PANEL Intermediate script command works.
The picture is very big, 640*480 pixels, but it appears in Homeseer-homepage.

Command:
&hs.setdevicestring "W1","<img src='/Camerabeelden/Sony/SonyCam.jpg'></img>"

Perhaps it s possible to shrink the picture.

Of course I like the time/date stamp to make the pictures unique.

Thanks.

Re: Webcamscript 0.3

Posted: Mon May 14, 2012 2:27 pm
by DJF3
Highlighted to code to make the picture appear smaller.
&hs.setdevicestring "W1","<img src='/Camerabeelden/Sony/SonyCam.jpg' width='250px'></img>"

OR: smaller picture in HS with a link opening the full picture in a new window.
&hs.setdevicestring "W1","<a href='/Camerabeelden/Sony/SonyCam.jpg' target='_blank'><img src='/Camerabeelden/Sony/SonyCam.jpg' width='250px'></img></a>"

Re: Webcamscript 0.3e

Posted: Mon May 14, 2012 2:44 pm
by DJF3
Verkenner wrote:HS-Logfile:
14-5-2012 0:08:27 Event Event Trigger "camera"
14-5-2012 0:08:27 Event Running script in background: DJ_WebCam_03.vb("Main","W1|http://user:password@192.168.178.14/one ... pg|Sony|[b]html/Camerabeelden/Sony[/b]|yes")
14-5-2012 0:08:27 DJ_Webcam_0.3e
URL: http://user:password@192.168.178.14/oneshotimage.jpg
FILE: Sony.jpg
DIR: html/Camerabeelden/Sony
DATE:2012-05-14_00-08-27
SERVER: http://user:password@192.168.178.14
PATH: /oneshotimage.jpg
14-5-2012 0:08:27 DJ_Webcam_0.3e NAME+DATE:html/Camerabeelden/Sony\Sony_2012-05-14_00-08-27.jpg
14-5-2012 0:08:27 DJ_Webcam_0.3e IMAGE URL:
Can you change
"html/Camerabeelden/Sony" to
"\html\Camerabeelden\Sony" and try again?

NOTE(1) You might have to change the device in the parameters to something that doesn't already have a picture, or clear the device-string of W1 (by setting devicestring to " ")
NOTE(2) That now it should also work with 'numbered' images (without a fixed name)