Office window time-lapse

As followers of this blog will know, I’ve been experimenting with a Raspberry Pi (RPi) and one of the uses that I found for it is as a webcam server. I have plans to put a permanent webcam in the TrustIV office window in Manchester and I’ll be using a RPi to do this.

My installation is pretty straightforward:

  • Raspberry Pi
  • Logitech C270 webcam
  • Shared windows folder for storage of images

I installed the standard Raspbian operating system and connected the Pi to the Office network. Once I identified it by IP address, I connected to it via SSH. I left the RPi in “headless mode” without a keyboard, monitor or mouse attached.

I installed fswebcam software. Fswebcam is a simple webcam app. It captures images from a V4L1/V4L2 compatible device or file, averages them to reduce noise and outputs the image to PNG or JPEG formats. The resulting image can then be saved to a file, like the image below.

Webcam time-lapse

Click on the image above to see the timelapse, alternatively read on for the geeky bit…

I mounted an external shared windows folder (called nas) using these commands:

cd /mnt
sudo mkdir nas
sudo mount -t cifs -o username=<username>,password=<password> //PC/nas /mnt/nas
(instructions from the Raspberry Pi adventures blog.

Then I wrote a short script called webcam.sh  that created a folder on the NAS and saved images to that share at five-second intervals

mkdir /mnt/nas/$(date +”%Y%m%d”)
sudo fswebcam -r 640×480 -S 15 –jpeg 95 –save /mnt/nas/$(date +”%Y%m%d”)/webcam.jpg

while true
     do
     sleep5
     sudo mv /mnt/nas/$(date +”%Y%m%d”)/webcam.jpg /mnt/nas/$(date
+”%Y%m%d”)/webcam_$(date +”%m%d%Y%H%M%S”).jpg
     sudo fswebcam -r 640×480 -S 15 –jpeg 95 –save /mnt/nas/20130121/webcam.jpg
done

run using
sudo ./webcam.sh

To “stitch” the video together, I used Windows Live Movie Maker to convert the folder of images to a time-lapse video. Images were replaced every 0.05 seconds, meaning that the “action” was sped up 160x faster than real life.

If you read this far, well done. The video is now on the TrustIV blog page, click the image below to see the timelapse footage, and keep checking back there for the webcam. (When I finally get round to installing it) 🙂

Webcam time-lapse

 

 

Google Cloud Print – Is this Google’s best kept secret?

Printing to your iPhone or iPad
Yesterday I was in the TrustIV office and I registered to attend a Microsoft Partner event in Manchester. At the end of the process I was advised to print a copy of the ticket to take with me so that I could be given access on the day of the event.

I had registered using Google Chrome browser but because I rebuilt my laptop last week I didn’t have a default printer. Perhaps this is what drew my attention to a printer that I didn’t remember configuring.

Chrome screenshot

As well as this, I noticed a link to my iPad. I have installed Google Chrome on each of these devices but until now I hadn’t noticed that this gave printer support.

I printed my ticket to the iPhone and within a few seconds I was a pop-up on my iPhone to say that a document was ready to view. Clicking on the link opened Google Chrome where I could view a copy of my document…… or so I thought.

iPhone screenshot - document ready

 

When Chrome opened I saw a warning message saying that I had to sign in and enable the print-to-phone feature to see my documents.

iPhone screenshot - Print-to-phone jobs are available: please sign in and enable this feature to get data

 

I wasn’t sure how to do this initially but then I found that if I opened  “Settings” -> Basics, then clicked on my Google account name, I was able to enable the “Chrome to Mobile” setting which meant that I could view my printed documents.

 

So far so good, but a little experimentation showed me even more features.

Printing from your iPhone/iPad
By modifying settings in Chrome it is possible to allow iPhones or iPads to print to your PC or laptop printer. [Other devices are available – Ed]

  • Open Chrome settings (using your mouse to click the “three horizontal lines” icon or typing chrome://settings/ in the address bar.
  • Click “Show advanced settings…”
  • Scroll down to “Google Cloud Print”
  • Click “Manage Print Settings”

This opens a page where you can grant different Google accounts access to your laptop or PC printers. Once you do this it is possible to print directly to your shared printers from within your iPhone applications.

This is such a useful feature, I can’t believe that I hadn’t heard of it until now.

Why all the outages?

Last night I was “playing around” with a new product that we have under development at TrustIV. The application tests the relative performance of different websites and ranks them. A couple of the sites that it was monitoring seemed to be experiencing problems.

Showcase cinemas was offline.

Capture

So was “LoveFilm”. (I particularly like their error page referring to Gremlins).

1nGZe

As well as this asda.com, coventry building society and ToysRus were all experiencing outages.
I confirmed this with my own browser but I found it odd that they were all offline.

Perhaps they all sit on the same cloud server….who knows. I’m going to keep monitoring these sites and I’ll report back here and on the TrustIV blog when I have more news.