Skip to content

Instantly share code, notes, and snippets.

@nrrb
Last active August 29, 2015 14:06
Show Gist options
  • Select an option

  • Save nrrb/a14fa02a309709e63ec2 to your computer and use it in GitHub Desktop.

Select an option

Save nrrb/a14fa02a309709e63ec2 to your computer and use it in GitHub Desktop.
Laundry Cam Setup Notes with Logitech C210 on Ubuntu 14.04 x64
<html>
<head>
<title>LaundryCam</title>
<link rel="apple-touch-icon-precomposed" href="./apple-touch-icon.png" />
<meta http-equiv="refresh" content="5">
</head>
<body>
<img src="./snap.jpg">
</body>
</html>

LaundryCam

Logitech C210 (PID V-U0019) Setup in Linux

Review of Linux Compatibility

$ lsusb | grep C210
Bus 003 Device 002: ID 046d:0819 Logitech, Inc. Webcam C210
$ dmesg | tail
[77835.576217] usb 3-2: new high-speed USB device number 2 using xhci_hcd
[77835.770762] usb 3-2: New USB device found, idVendor=046d, idProduct=0819
[77835.770767] usb 3-2: New USB device strings: Mfr=0, Product=0, SerialNumber=2
[77835.770770] usb 3-2: SerialNumber: E51138C0
[77835.829644] Linux video capture interface: v2.00
[77836.454111] usb_audio: Warning! Unlikely big volume range (=6144), cval->res is probably wrong.
[77836.454116] usb_audio: [5] FU [Mic Capture Volume] ch = 1, val = 768/6912/1<6>
[77836.454408] usbcore: registered new interface driver snd-usb-audio
[77836.454415] uvcvideo: Found UVC 1.00 device <unnamed> (046d:0819)
[77836.468415] input: UVC Camera (046d:0819) as /devices/pci0000:00/0000:00:1c.2/0000:04:00.0/usb3/3-2/3-2:1.0/input/input9
[77836.469652] usbcore: registered new interface driver uvcvideo
[77836.469657] USB Video Class driver (1.1.1)

Setting Up a Linux Weather Webcam with uvccapture

  • Create folder mkdir ~/landrycam && cd ~/laundrycam
  • Create file start-capture.sh with the following contents to capture every 5 seconds and server via HTTP:
#! /bin/bash
uvccapture -x640 -y480 -q100 -t5 &
python -m SimpleHTTPServer
  • Create file index.html with the following contents that auto-refreshes every 5 seconds:
<html>
    <head>
        <title>LaundryCam</title>
        <link rel="apple-touch-icon-precomposed" href="./apple-touch-icon.png" />
        <meta http-equiv="refresh" content="5">
    </head>
<body>
    <img src="./snap.jpg">	
</body>
</html>
  • Capture Unicode symbol for washing to PNG and import to favicon creator to create favicon.ico. Put this file here as well, transfer by SFTP if necessary.
  • Create apple-touch-icon.png using pixlr.com by resizing canvas of washing symbol PNG to square and then resizing image to 129x129.
  • Start screen session.
  • Run sudo ~/laundrycam/start-capture.sh
  • Watch LaundryCam
#! /bin/bash
uvccapture -x640 -y480 -q100 -t5 &
python -m SimpleHTTPServer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment