Webcamscript 0.3

Forum over Homeseer scripts (DUTCH forum)

Moderators: TANE, Ruud

Verkenner
Member
Member
Posts: 338
Joined: Tue May 27, 2008 6:14 pm
Location: Netherlands

Webcamscript 0.3

Post 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
Attachments
Camera3.JPG
Camera3.JPG (47.67 KiB) Viewed 20768 times
Camera2.JPG
Camera2.JPG (34.74 KiB) Viewed 20768 times
Camera1.JPG
Camera1.JPG (17.95 KiB) Viewed 20768 times
Best regards, Verkenner
Verkenner
Member
Member
Posts: 338
Joined: Tue May 27, 2008 6:14 pm
Location: Netherlands

geen plakplaatjes

Post by Verkenner »

Thera are no pictures in de map: homeseer pro/html/camerabeelden/sony

And is html\ added automatically ??

Thanks
Best regards, Verkenner
DJF3
Advanced Member
Advanced Member
Posts: 895
Joined: Thu Jul 12, 2007 9:28 am
Contact:

Re: Webcamscript 0.3

Post 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)
Verkenner
Member
Member
Posts: 338
Joined: Tue May 27, 2008 6:14 pm
Location: Netherlands

Re: Webcamscript 0.3E

Post 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 20708 times
Best regards, Verkenner
Digit
Global Moderator
Global Moderator
Posts: 3388
Joined: Sat Mar 25, 2006 10:23 am
Location: Netherlands
Contact:

Re: Webcamscript 0.3

Post 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:
Verkenner
Member
Member
Posts: 338
Joined: Tue May 27, 2008 6:14 pm
Location: Netherlands

Geflipped ;-)

Post 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
Last edited by Verkenner on Tue May 08, 2012 12:26 am, edited 1 time in total.
Best regards, Verkenner
Digit
Global Moderator
Global Moderator
Posts: 3388
Joined: Sat Mar 25, 2006 10:23 am
Location: Netherlands
Contact:

Re: Webcamscript 0.3

Post 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:
Verkenner
Member
Member
Posts: 338
Joined: Tue May 27, 2008 6:14 pm
Location: Netherlands

Re: Webcamscript 0.3

Post by Verkenner »

I wanted to show my new DCF-watch either ;-) ;-)
Best regards, Verkenner
DJF3
Advanced Member
Advanced Member
Posts: 895
Joined: Thu Jul 12, 2007 9:28 am
Contact:

Re: Webcamscript 0.3E

Post 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.
Verkenner
Member
Member
Posts: 338
Joined: Tue May 27, 2008 6:14 pm
Location: Netherlands

Re: Webcamscript 0.3

Post 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
Attachments
HTML script from webcam in HS homepage.
HTML script from webcam in HS homepage.
webcam2.JPG (78.07 KiB) Viewed 20677 times
Best regards, Verkenner
DJF3
Advanced Member
Advanced Member
Posts: 895
Joined: Thu Jul 12, 2007 9:28 am
Contact:

Re: Webcamscript 0.3

Post 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>"
Verkenner
Member
Member
Posts: 338
Joined: Tue May 27, 2008 6:14 pm
Location: Netherlands

Re: Webcamscript 0.3e

Post 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
Best regards, Verkenner
Verkenner
Member
Member
Posts: 338
Joined: Tue May 27, 2008 6:14 pm
Location: Netherlands

Webcamscript 0.3e

Post 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.
Attachments
test.jpg
test.jpg (17.58 KiB) Viewed 20646 times
Best regards, Verkenner
DJF3
Advanced Member
Advanced Member
Posts: 895
Joined: Thu Jul 12, 2007 9:28 am
Contact:

Re: Webcamscript 0.3

Post 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>"
DJF3
Advanced Member
Advanced Member
Posts: 895
Joined: Thu Jul 12, 2007 9:28 am
Contact:

Re: Webcamscript 0.3e

Post 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)
Post Reply

Return to “Homeseer Scripts Forum”