My setup:  since I am cheap, somewhat technically inclined, and care about image quality, I spent about 25 GBP and picked up a Sandisk Eye-Fi SD card along with about 10 GBP for a wired power supply (for the camera).  These was coupled with my Canon SX20 camera, Mac Mini, software I already had, and a homemade script to process the images. 

This setup then allowed me to locate my now always-on, wireless camera anywhere that was reasonably close to an electrical socket and, with the necessary bits of software and scripting, to begin taking a photo every few minutes, processing it, and uploading a copy to for display on my webcam page there.  My total cost was about 35 GBP and I get great, frequent photos.

Stuff you will need in order to completely replicate my setup:

  1. Canon SX20 IS w/ CHDK + Sunset v4 script

  2. SanDisk Eye-Fi 4GB SDHC card

  3. Canon SX20 power supply (Canon CA-PS700, just search on Amazon)

  4. Mac Mini (mid-2010 model)

  5. Macports (which needs Xcode (you can get it via the AppStore)) w/ wput, imagemagick, and, optionally, sed, cut, and some other stuff if you want to add in temperature, humidity, barometric pressure, and other similar bits of data

  6. WeatherSnoop or something else capable of outputting weather data to an ASCII text file of some kind.  This is optional and is only used if you want weather data (temperature, barometer, humidity, etc. info added to the photo)

  7. A wireless router of some kind

  8. An internet connection of some kind that is always on (DSL or Cable preferred)

Before you go down this road: this is somewhat technical.  Consider another solution if your time has a lot of value and/or you are not technically inclined.  Consider an Edimax IC-3030WN camera if you want a decent camera with wireless capabilities for less than 100 GBP.  You’ll still need to process the images and upload them, though, so some of this would still be relevant.

Anyway, let’s plow on pretend that you wish to completely replicate my setup.

  1. 1.While WeatherSnoop is optional in this setup, it’s what I use.  In this setup, WeatherSnoop is used to gather information from my Personal Weather Station.  Since it doesn’t neatly save everything to a flat text file, it’s necessary to pull the appropriate information from it via wget and then to deal with the output with sed, cut, etc.  However, if you do not require this information (temperature, humidity, etc) then don’t worry about it.  In fact, the first time through I’d suggest skipping this to get the basic setup up and running as quickly and easily as possible.

  1. 2.To start with, you should have a machine that has (or has the capabilities to reasonably get) the command line programs wput and imagemagick.  This means a Mac running a fairly recent version of OS X ...or a machine running Linux, *BSD, or something similar.  This is a requirement because we need to have imagemagick to, at the very least, ensure that the images being uploaded to wunderground are under 150KB in size.  Simply dropping an Eye-Fi card into a camera and telling the software to FTP it to wunderground’s servers won’t work because the images will invariably be far too large in terms of file size and wunderground will reject anything over 150KB.

  1. 3.Installing Macports is usually fairly easy.  Upgrading it can be a bit more troublesome.  If you don’t have Macports, get it and install it.  Grab wput and imagemagick via the “port install” command.  Note that imagemagick takes a bit of time to get installed.

  1. 4.Setup the Eye-Fi software.  I personally found it mildly irritating.  On both machines I installed it on it took ages to complete the install, the settings themselves are often ambiguous and the software itself has some cosmetic bugs.  It works, though.  Plug the card into a card reader or your computer and, once the software is installed...

  1. a.Go into the Eye-Fi Center software and open the ‘Eye-Fi Card’ Settings (gear/sprocket icon).

  2. b.Networks tab: add your local, private wireless network.

  3. c.Photos tab: set the folder location you want the photos dropped into.  Note that wherever this is the subsequent scripts will be interacting with the photos in that folder in an often destructive way so I suggest you make a folder that is used only by the Eye-Fi card to drop weather pics into.  Also, select “Do not create date-based subfolders.

  4. d.Do not select (or deselect) “Eye-Fi Card allows you to share photos online.” on the Online sub-tab.

  5. e.Skip to the Transfer Mode tab: under Manage, select “Automatic” or ensure that it is selected.

  6. f.Under the “Relayed Transfer” sub-tab, ensure that “Enable Relay Transfer for ‘Eye-Fi Card’ is NOT selected.

  7. g.Under the “Endless Memory” sub-tab, ensure that “Endless Memory” is NOT selected.  Note, I understand that this feature makes sense in theory but in operation it doesn’t work very well - images are only automatically removed from an Eye-Fi card after power-cycling a camera.  So this isn’t much of a feature.  Once a week (or longer, depending on how frequently photos are being taken (the unprocessed photos run about 650KB/ea), manually erase all the images off’ve the Eye-Fi card.  Done.

  8. h.Close the Eye-Fi Settings software’s window but leave the app running - it won’t deal with the photo transfer if it isn’t running.

  9. i.Test it.  Take a few photos. They ought to show up in the folder you specified.

  10. j.Occasionally it takes 5-30 seconds for an image to show up.  If it is taking longer than that they probably are not going to show up at all.  Go back and double-check the settings you used.  Keep in mind that, even with a reasonably powerful and well-positioned wireless router, the range for the Eye-Fi card is about 10-12 meters.  Any more than that and I’ve found that it becomes unreliable about transferring images.

  1. 5.Install CHDK on an Eye-Fi SD card with the intent that the two will work happily together.  While others may have an easier time of this, I personally found it absurdly finicky.

  1. a.Your milage may vary but I found that CHDK and the Eye-Fi card’s firmware did not work together as a team unless there was only one (1) partition on the card.  This is a PITA but can be dealt with.  CHDK insists on having a single FAT16 partition to boot from and will only boot from it if the Eye-Fi card is physically locked (the small, slidable tab on the side of the card).

  2. b.Download and extract CHDK.

  3. c.Follow the instructions from the CHDK Mac FAQ.  Reformat the card as FAT16, make the card bootable (you will need 0xED or some other hex editor to complete this task), and finally copy the extracted CHDK files as specified by the instructions on the CHDK Mac FAQ.

  4. d.Verify it works.  Lock the card, pop it in your camera, verify you see the CHDK startup image (if not, go back to to through the CHDK Mac FAQ and try, try again) and, if you see it, take some photos.  They ought to show up (usually in less than a minute for the first photo and just a few seconds for subsequent photos) in the folder you specified.  If not, it is likely you somehow ended up with two partitions on the card and the Eye-Fi firmware is monitoring the CHDK small partition.  Otherwise, you either are looking in the wrong location for the dropped files or specified the drop location incorrectly.

  1. 6.Test imagemagick and wput.  Just make sure that both were installed correctly.  Do “convert -version” and “wput -V” from the command line.  If something odd happens, you’ll need to figure that out.  Likely everything went ok, though.

  1. 7.Back to CHDK and your camera. 

  1. a.Grab the Sunset v4 script and drop it into CHDK’s scripts folder on the Eye-Fi card. 

  2. b.Modify the maximum exposure length line “@default b -414” to read “@default b -224” or do the math to produce a lower, logical setting.

  3. c.Modify the delay setting line “@default a 10” to read “@default a 120” or something that is sane.  Wunderground won’t allow more than one picture per minute to be uploaded.  In order to reduce power settings but still ensure that a recent photo is available on wunderground’s web site, 120 is a reasonable setting.

  4. d.After your camera is powered up, hit the ALT/print button and

  5. e.Test this out with Eye-Fi and ensure it is working.  If so, turn the camera off for now.

  1. 8.Set up your webcam on

  2. a.Go here:

  3. b.Pay attention to what Camera ID is eventually assigned - that will be your FTP login name.

  4. c.For some basic hints and such, see the WunderCams FTP wiki page.

  1. 9.Set up the image manipulation and image upload script.

  1. a.Create a scripts folder in your home directory/user folder for your script to live in.  “scripts” is fine.  Do the same for the logfile.  “logfiles” is fine.

  2. b.Create a new file - call it whatever (mine is “wunderscript”).

  3. c.Open the file (hereafter referred to as wunderscript) with a text editor and drop in the following lines:

# Starting directory

cd /Users/bob/wundpix

# Remove excess images - delete all but the newest jpg

(ls -t|head -n 1;ls)|sort|uniq -u|xargs rm

# Remove old weather.xml file, get a new one (weather.xml has temp, humidity, etc info in it)

# This bit is optional, remove it if you don’t need to add temp, humidity, etc info to the photos

rm weather.xml >/dev/null 2>&1

/opt/local/bin/wget >/dev/null 2>&1

# Populate the pressure, temperature, and humidity files and edit out any spurious data

# This bit is optional, remove it if you don’t need to add temp, humidity, etc info to the photos

sed -n -e 51p weather.xml | cut -c 20-23 | sed 's/<//g' > pressure.txt

sed -n -e 58p weather.xml | cut -c 29-33 | sed 's/<//g' | sed 's/\///g' > temp.txt

sed -n -e 131p weather.xml | cut -c 29-31 | sed 's/<//g' > hmid.txt

# Resize the image; there’s no point in uploading more than about 1-1.2MP photos...

/opt/local/bin/convert IMG_*.JPG -resize "75%" IMG_*.JPG >/dev/null 2>&1

# Optional, crop the bottom to turn the photo into 16:9 format

/opt/local/bin/convert IMG_*.JPG -crop '1200x675' -gravity 'south' IMG_OUT1.JPG >/dev/null 2>&1

# Add location information and direction

/opt/local/bin/convert -background '#0008' -pointsize 18 -fill white -gravity SouthEast -size 1200 caption:"Facing W-NW from Krakow\, Poland" IMG_OUT1-0.JPG +swap -gravity SouthEast -composite IMG_OUT2.JPG >/dev/null 2>&1

# Add time (nice to have!), plus the really optional stuff (pressure, temp, humidity)

# Edit this as necessary (can remove everything between [exif:DateTimeOriginal] and IMG_OUT2.JPG

/opt/local/bin/convert IMG_OUT2.JPG -pointsize 18 -fill white -annotate +2+671 %[exif:DateTimeOriginal] -annotate +209+671 "|      Barometer (mb):               |      Temp (C):               |      Humidity (%):          |" -annotate +392+671 @pressure.txt -annotate +587+671 @temp.txt -annotate +818+671 @hmid.txt IMG_OUT2.JPG >/dev/null 2>&1

# Resize the image so that it is well under wunderground’s 150KB limit

/opt/local/bin/convert IMG_OUT2.JPG -define jpeg:extent=120kb IMG_OUT3.JPG >/dev/null 2>&1

# Rename the final image

mv IMG_OUT3.JPG image.jpg >/dev/null 2>&1

# Remove miscellaneous jpgs, xml files, txt files, etc - the leftovers, basically

rm *.JPG *.xml *.txt >/dev/null 2>&1

# Update the log file with info regarding the success or failure of the image upload to wunderground

echo '-----' >> /Users/bob/logfiles/wundercam.log

date >> /Users/bob/logfiles/wundercam.log

/opt/local/bin/wput image.jpg >> /Users/bob/logfiles/out.log

echo '-----' >> /Users/bob/logfiles/wundercam.log

echo ' ' >> /Users/bob/logfiles/wundercam.log

# Remove the uploaded image

rm image.jpg >/dev/null 2>&1

  1. d.Note: change the “Starting directory” line to be whatever is appropriate for you.

  2. e.Note: I crop the bottoms off’ve the photos purely for vanity.  If you don’t do this that’s fine but you’ll need to change the third convert line to be IMG_*.JPG instead of IMG_OUT1-0.JPG, and you’ll need to change the “mv” filename as well.

  3. f.Note: I found that telling imagemagick (convert) to -define jpeg:extent=150kb actually resulted in files that were over 150kb.  I’m not sure why this is but found that setting -define to 120kb resulted in files that were always about 143-148kb.

  4. g.Note: you should hand-test portions of the above script or at least run it all a few times, manually, from the command line.  Most important is to ensure that the log files directory exists and can be written to so you’ll have somewhere to go and look when images don’t show up on

  5. h.Note: the script above needs to be chmod 700 at least or possibly 750.  Security is left up to you.

  6. i.To have this run automatically, you can set up a crontab job (see below) that runs once every three minutes.  Do:  crontab -e from the command line and then, in the crontab file for your username, add the lines (below)...and save/exit from crontab.  Note that I am only running the script every three minutes, just to keep things sane.  Wunderground won’t let you upload more than once per minute anyway.


*/3  *  *  *  *  /Users/bob/wunderpicscript

  1. 10.Time to test everything to see if it works together.  Turn the camera on, have it pointed out the window, start the CHDK Sunshine script, check to see that it is uploading photos to your local machine, check to see that it is uploading photos to wunderground, check on your wunderground cam page to see if the image finally shows up (it often takes 1-3 minutes for an uploaded image to appear).


Custom Webcam Setup