NOTE: Update available! (0.3) This makes it a LOT easier!
This script allows you to capture Webcam images. You have multiple options to define the directory, filename, auto-numbering, etc.
After grabbing an image it updates the HomeSeer device so it shows a small version of the image. When you click this device-image a new window will open with the full image.
An important command for this script is hs.GetURLImageEx
Script parameters: (with example)
- HomeSeer device code – “W4“
- Webcam URL for image – “http://<username>:<password>@10.1.1.1/snapshot.cgi“
- Filename – “FrontDoorbell” (.jpg added automatically)
- Directory – “html\Camera\FrontDoorbell” (\Homeseer 2\html\ added automatically)
- Date/Time? – “yes”
Do you want to overwrite an existing image or add the date+time to the filename
UPDATE: version 0.3e (5 May 2012) – test script with some updates (see script for changes)
One change: You have to add the file extension (.jpg .png) to the filename you want to save!
NEW: version 0.3 (27 December 2011) – Moved from 2 scripts to 1 script that runs on the HS server.
OLD: version 0.2 (24 March 2009) – beta
Instructions included in the ZIP file (readme.txt). Carefully read the readme.txt and the examples. It’s not the most user-friendly but it is very reliable.
One challenge that I ran into: all of my existing webcam captures are numbered. “doorbell00923.jpg”.
The problem: if you FTP these files to a server and FTP them back the file date is gone. So I realized that I want the date + time to be in the file-name. In other words: if something happens date and time information for these files are gone. How are you going to put the file-created date into the filename for 1000s of images?
Fix: Use an application called stamp.
Before: doorbell00923.jpg (file-created date 27 December 2011, 14:33)
Bonus: Renaming will preserve the date-created/date-modified of the file.
Below you will find screenshots of the settings I used in Stamp to accomplish this. It took quite some testing to get it right.
“Main” tab custom format
Note: for unknown reasons the time in some renamed files is 1 hour earlier?
In my setup I use the following folders
- \Homeseer 2\html\Camera
Contains webcam images that are updated every 10 minutes.
These images are overwritten!
- \Homeseer 2\html\Camera\XXXXX\
Contains subfolders for specific camera actions
These images are saved (each with a different filename containing the date & time)
\Homeseer 2\html\Camera\FrontdoorOpen\ FrontdoorOpen_<date-time>.jpg
\Homeseer 2\html\Camera\FrontdoorDoorbell\ FrontdoorDoorbell_<date-time>.jpg
\Homeseer 2\html\Camera\FrontdoorMotion\ FrontdoorMotion_<date-time>.jpg
\Homeseer 2\html\Camera\BackdoorOpen\ BackdoorOpen_<date-time>.jpg
\Homeseer 2\html\Camera\GardendoorOpen\ GardendoorOpen_<date-time>.jpg
\Homeseer 2\html\Camera\GardenShedOpen\ GardenShedOpen_<date-time>.jpg
In my setup I use the following folders
– Doors opening – capture image
– Motion – capture image
- Script that displays multiple captured images based on time, weeknr, monthnr, camera name, capture type.
- I already have a beta version of this script that runs on your iPhone. It hasn’t reached the maturity level to which I feel comfortable posting it yet.
Here’s how it can look in Homeseer.
- Post announcing the version 0.3 script
- My Gardencam project
- Axis camera server developer info
- Axis camera HTTP API ( PDF )
- Linksys webcam URLs and Settings PDF
- Linksys Cisco WVC210 HTTP API
- Linksys Cisco 2300 Series HTTP API
- NEW Fantastic overview of nearly ALL camera URL‘s
I would like your assistance in adding a panning parameter to the script. I think I have most of the work done except the actual send…
‘— Move the camera first if a control parameter is included
if strControl = ” ← ” then strCommand = 4
if strControl = ” → ” then strCommand = 6
if strControl = ” ↑ ” then strCommand = 0
if strControl = ” ↓ ” then strCommand = 2
strURLcontrol = Replace(hs.stringitem(strURL,3,”snapshot”),”:”,”decoder_control”)
strURLcontrol = strURLcontrol & “command=” & strCommand & “&onestep=1”
If strControl “no” then *****strURLcontrol*******
Question: What would you like the Webcam image grabbing script to do with this addition?
If it’s only PTZ control you might have an easier option:
To control your webcam you could actually use a 1 line script in an event.
The script in the event would look like this:
Looks like you already know which URL you need to control the camera.
4 Events would give you up/down/left/right control. You could even add custom buttons to a device that give you this control.
Thank you for the reply. You are correct, I was going about it all wrong and in fact ended up doing a Homeseer webpage for complete control of the netcam.
Your script is perfect as-is for grabbing the thumbnail images.
Ben zo vrij om even een threat te openen op domoticaforum (dan kan ik plaatjes meesturen)
Hi DJ, the Webcamscript is the best HomeSeer-script ever! Very usefull!
Do you have plans to convert it to HomeSeer3? Thanks, Verkenner
Thank you! No plans to convert it to HS3.. Besides the fact that I’m **NOT** impressed by HS3 I’ve tried multiple times to convert scripts to VB.NET. This basically takes to much time so I can’t migrate… for now.