Webcamscript 0.3

Forum over Homeseer scripts (DUTCH forum)

Moderators: Ruud, TANE

Webcamscript 0.3

Postby Verkenner » Fri May 04, 2012 12:18 am

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
You do not have the required permissions to view the files attached to this post.
Best regards, Verkenner
Verkenner
Member
Member
 
Posts: 277
Joined: May 2008
Location: Netherlands

geen plakplaatjes

Postby Verkenner » Fri May 04, 2012 9:09 am

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

And is html\ added automatically ??

Thanks
Best regards, Verkenner
Verkenner
Member
Member
 
Posts: 277
Joined: May 2008
Location: Netherlands

Re: Webcamscript 0.3

Postby DJF3 » Sat May 05, 2012 12:00 pm

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)
User avatar
DJF3
Advanced Member
Advanced Member
 
Posts: 755
Joined: July 2007

Re: Webcamscript 0.3E

Postby Verkenner » Sun May 06, 2012 9:47 pm

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.

Sony_2012-05-06_20-57-52.jpg
You do not have the required permissions to view the files attached to this post.
Best regards, Verkenner
Verkenner
Member
Member
 
Posts: 277
Joined: May 2008
Location: Netherlands

Re: Webcamscript 0.3

Postby Digit » Sun May 06, 2012 10:28 pm

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:
User avatar
Digit
Global Moderator
Global Moderator
 
Posts: 3102
Joined: March 2006
Location: Netherlands

Geflipped ;-)

Postby Verkenner » Sun May 06, 2012 11:59 pm

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
Verkenner
Member
Member
 
Posts: 277
Joined: May 2008
Location: Netherlands

Re: Webcamscript 0.3

Postby Digit » Mon May 07, 2012 12:09 am

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:
User avatar
Digit
Global Moderator
Global Moderator
 
Posts: 3102
Joined: March 2006
Location: Netherlands

Re: Webcamscript 0.3

Postby Verkenner » Mon May 07, 2012 12:13 am

I wanted to show my new DCF-watch either ;-) ;-)
Best regards, Verkenner
Verkenner
Member
Member
 
Posts: 277
Joined: May 2008
Location: Netherlands

Re: Webcamscript 0.3E

Postby DJF3 » Mon May 07, 2012 10:53 am

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.
User avatar
DJF3
Advanced Member
Advanced Member
 
Posts: 755
Joined: July 2007

Re: Webcamscript 0.3

Postby Verkenner » Fri May 11, 2012 11:53 pm

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
You do not have the required permissions to view the files attached to this post.
Best regards, Verkenner
Verkenner
Member
Member
 
Posts: 277
Joined: May 2008
Location: Netherlands

Re: Webcamscript 0.3

Postby DJF3 » Sun May 13, 2012 2:09 pm

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>"
User avatar
DJF3
Advanced Member
Advanced Member
 
Posts: 755
Joined: July 2007

Re: Webcamscript 0.3e

Postby Verkenner » Mon May 14, 2012 12:15 am

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/oneshotimage.jpg|Sony|html/Camerabeelden/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: 277
Joined: May 2008
Location: Netherlands

Webcamscript 0.3e

Postby Verkenner » Mon May 14, 2012 12:34 am

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.
You do not have the required permissions to view the files attached to this post.
Best regards, Verkenner
Verkenner
Member
Member
 
Posts: 277
Joined: May 2008
Location: Netherlands

Re: Webcamscript 0.3

Postby DJF3 » Mon May 14, 2012 2:27 pm

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>"
User avatar
DJF3
Advanced Member
Advanced Member
 
Posts: 755
Joined: July 2007

Re: Webcamscript 0.3e

Postby DJF3 » Mon May 14, 2012 2:44 pm

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/oneshotimage.jpg|Sony|[color=#FF0000]html/Camerabeelden/Sony
|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: [/color]


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)
User avatar
DJF3
Advanced Member
Advanced Member
 
Posts: 755
Joined: July 2007

Next

Return to Homeseer Scripts Forum

Who is online

Users browsing this forum: No registered users and 0 guests