Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
50 lines (34 sloc) 2.9 KB

This page describes the webcam setup at the cal-sailing club in Berkeley, CA. This setup is used (time of writing July 2013) to publish cam images to webcam on http://cal-sailing.org using http://cal-sailing.appspot.com .

Setup

  1. 2 webcam of model linksys/ cisco WVC80N (dock) and HiSilicon Hi3516C (restaurant) with fixed ip addresses (dock: 192.168.1.253, restaurant: 192.168.1.10) connected to cal-sailing router with ethernet cables.
  2. configured raspberry pi model B connected with ethernet cable to cal-sailing internet router

diagram

What does the raspberry pi look like?

On the outside, with paper case

pi in action

On the inside

Notice that a happy pi, as shown below, has red (power), green (network activity), yellow (network link) lights on. The lights can be seen in top right corner in picture.

happy pi

Sequence

Every minute, the pi downloads the script update_cam.sh from github and executes it.

The script captures images from two webcams with a HTTP GET using curl.

Then the scripts sends the images to cal-sailing.appspot.com with a HTTP POST using curl.

Troubleshooting

If the pi has troubles, you can used the following credentials to login to the pi and troubleshoot. There should be a logfile called update_cam.log with information.

At the clubhouse, connect to the club's wifi and login using something like

ssh pi@raspberrypi.local

You'll be prompted for a password. The password is the minimum wind speed at which a junior sailing test can be administered.

If you can't access the raspberry pi, then it is possible that the pi is (a) missing / destroyed (b) sdcard has become loose or detached (c) has no power or (d) is not connected to router / internet. Please open an issue here if you can't fix it yourself.

Rebuilding the Raspberry Pi

In case the raspberry pi dies, or gets injured, please follow these steps to create a new one.

  1. Image SD Card (4 GB min) with Raspbian “wheezy” image (see http://www.raspberrypi.org/downloads for more info).
  2. Connect pi to network using ethernet, use router to figure out which ip address pi got
  3. Login ssh pi@[ip address] with default password (see http://www.raspberrypi.org/downloads for more info).
  4. Change password to club password (see above) using passwd
  5. Setup avahi/zeroconf to allow easy login through raspberrypi.local (just google "avahi zeroconf raspberry pi")
  6. Edit crontab using crontab -e
  7. add crontab job to send images * * * * * sh -c "`curl -L --silent https://raw.github.com/jhpoelen/cal-sailing-cam/master/update_cam.sh`" >> /home/pi/update_cam.log 2>&1
  8. add contrab to clean logs every day at midnight 0 0 * * * rm /home/pi/update_cam.log 2>&1
  9. save crontab and . . . you're done.