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>@
  • 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
    example: “Frontdoor_2011-12-27_13-46-05.jpg”

: 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)
After: doorbell_2011-12-27_14-33-05.jpg
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.

screenshot-2011-12-28_14-54-56“Main” tab
screenshot-2011-12-28_14-55-15“Main” tab custom format
screenshot-2011-12-28_14-55-26“Filter” tab
screenshot-2011-12-28_14-55-37“Options” tab

Note: for unknown reasons the time in some renamed files is 1 hour earlier?


My Setup

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\FrontdoorDoorbellFrontdoorDoorbell_<date-time>.jpg
    \Homeseer 2\html\Camera\FrontdoorMotionFrontdoorMotion_<date-time>.jpg
    \Homeseer 2\html\Camera\BackdoorOpenBackdoorOpen_<date-time>.jpg
    \Homeseer 2\html\Camera\GardendoorOpenGardendoorOpen_<date-time>.jpg
    \Homeseer 2\html\Camera\GardenShedOpenGardenShedOpen_<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.

webcam_HS_devices               Here’s how it can look in Homeseer.

Camera URLs

Linksys WVC-210


More information


Webcams — 6 Comments

  1. 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*******

  2. 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.

  3. 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.

Leave a Reply

HTML tags allowed in your comment: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>