Posted on Leave a comment

Unlock Your Door With Facial Recognition

Admit it, you have at least once had the thought that it would be awesome to have a door that automatically opened itself based on facial recognition! With this cool project from Team Windows IoT you can use a Raspberry Pi and a webcam to do just that. The project is very well written and should be surprisingly straightforward if you are willing to put in some effort. This is a great example of the endless possibilities that working with IoT devices provides. To get started check out the video below or the following link.

Screenshot 2016-09-11 at 4.53.23 PM

Want to keep in the loop about the latest in home automation? Subscribing to SuperHouse Automation on YouTube is the best place to start!

Working on your own home automation projects? The team at SuperHouse Automation would love to know! Tell us about it in the comments section below or on Facebook and Twitter.

cropped-SuperHouse-LogoOnly-512x512.jpg

Posted on Leave a comment

Motion Following Motorized Camera Base

Do the blindspots in your static security camera system cause you to sleep uneasily at night?  With this motion tracking camera system designed by Lindsay you can remove blind spots and ensure that your cameras will always be recording any intruders!  The project uses a motion sensor and servo to rotate a camera to ensure it is always facing the action. To get started on this cool project check out the following link. Full instructions, schematics and source code have been provided so you should have everything you need to get started.

Screenshot 2016-07-29 at 10.56.26 PM

If you are looking for an Arduino board to power your night light, the SuperHouse team recommends the Freetronics “Eleven” Arduino Compatible Board, click on the link to find out more.

Want to keep in the loop about the latest in home automation? Subscribing to SuperHouse Automation on YouTube is the best place to start!

Are you are thinking about making your own night light? Have a project you would like us to feature in this blog? The team at SuperHouse Automation would love to know! Tell us about it in the comments section below or on Facebook and Twitter.

SuperHouse-LogoOnly-512x512

Posted on Leave a comment

Add Keyless Entry to Your Home or Office with RFID

Being able to open and unlock a door with the quick touch of an RFID tag adds a new dimension to managing access to your home or office. Gone are the days of fumbling in the dark trying to find the right key for the particular door you are trying to open, or having to keep track of all the different sets of keys you have had cut. With an RFID enabled electronic door you can open your door with a simple “tap”, easily and securely manage who has access and even keep a log of who has opened the door. If you are keen to get started check out our video about how we added RFID to the door of our office:  

Although this project sounds difficult, with many electronic door locks commercially available it is really a simple matter of configuring the RFID reader to trigger the electronic lock. Indeed, the RFID Door Lock Shield from Freetronics provides a fantastic and simple interface between the RFID reader, your Arduino Compatible board and the electronic lock. For more information visit the RFID Door Lock Shield page.

DLOCK-oblique_1024x1024

Want to get started creating your own home automation system? Subscribing to SuperHouse Automation on YouTube is the best place to start!  Inspired to add an RFID door to your home or office? The team at SuperHouse Automation would love to know! Let us know in the comments section below or on Facebook and Twitter.

Posted on Leave a comment

#11: Processing and storing IP camera footage

Commonly available IP cameras are great if you just want something that lets you quickly view a live stream from your laptop or smartphone, but if you want to keep footage more permanently (such as for a security recording) you can do that too without too much trouble. In this episode I show you how to use an Ubuntu Linux machine on your network to run as an FTP server to accept snapshots from your cameras, process those snapshots to add timestamp watermarks on the images, and then periodically convert them into a time-lapse video to quickly see what happened over a period of time.

View directly on YouTube: youtu.be/HKv_F93RXDs

Parts Required

      • IP camera with FTP upload capability (eg: Foscam FS8918W)
      • Computer running Linux (I use Ubuntu in this demonstration)
      • ProFTPd (FTP server software)
      • Imagemagick (image processing software)
      • Mencoder (movie encoder software)

Setting Up An FTP Server

If you already have access to an FTP server you can skip this step, and go straight on to “Configuring Your IP Camera”. You can even use a third-party FTP server located off-site if you like, but my preference is to run a local server. This has a few advantages, including limiting use of the very insecure FTP to your local network, and giving you the opportunity to do some processing of the images on the server.

On Ubuntu, installing ProFTPd is as simple as opening a terminal and typing:

sudo apt-get install proftpd-basic

Ubuntu will install the FTP server and even start it for you automatically.

However, there’s one extra step you can take to increase security just a little. By default, ProFTPd does not jail users within a specific directory: that means anyone logging into your FTP server can see the whole filesystem. Let’s lock that down a bit.

Using a text editor, open the following file:

/etc/proftpd/proftpd.conf

Around line 34 you’ll find the following entry:

#DefaultRoot    ~

Remove the leading crosshatch to enable that option, so the line shows:

DefaultRoot    ~

Save the file, then restart ProFTPd so it will see the changes:

sudo /etc/init.d/proftpd restart

Now users who connect by FTP will be jailed inside their home directories.

I prefer to create separate users for each camera so they all end up compartmentalised, but that’s totally up to you. If you want to create a new user for a camera, you can enter the following:

sudo adduser camera41

Of course you can substitute your own username convention to suit your requirements. In the example shown in the video I set up a user for camera 41, so I just made that the username for convenience.

Configuring Your IP Camera

Configuration options may vary depending on your particular model of camera and firmware version, but look for a section titled “FTP Service Settings” or similar.

You’ll need to enter the address of your FTP server: usually the IP address of the Linux machine if you’re running your own server, otherwise it may be the hostname if it’s set up in DNS.

You’ll also need to enter the FTP username and password you just configured a moment ago, and optionally specify a target directory name if you want uploaded images to be put into a specific location. Some cameras create the target directory automatically if they find it there, otherwise you may need to create it yourself on the server.

In the case of Foscam cameras, you can’t test the setup or configure an upload rate until you save the settings. Click the submit button, tick the “Upload image now” checkbox, and enter a sensible value for the upload interval. In my example I set the upload interval to 1 second.

Watermarking Images With Timestamp

Most cameras upload snapshot images with the filename set to something useful such as the timestamp. In the case of Foscam cameras, the filename is the camera identifier, then the timestamp, then a sequence number. That’s useful information so I like to place the filename as a watermark in the image itself.

You can process a collection of images using ImageMagick. If you don’t have it installed on your Ubuntu Linux box already, open a terminal and enter:

sudo apt-get install imagemagick

​This will give you the “convert” program which can be used to place text on images.

In a terminal, go to the directory containing uploaded images and enter:

for name in *.jpg; do convert "$name" -font courier -pointsize 20 -draw "gravity south fill black text 0,12 '$name' fill white text 1,11 '$name'" "$name"; echo $name; done

That command can all be entered as one line, although it’s wrapped here in the browser.

This is a “for” loop that will step through all the files with names matching “*.jpg”, and write the filename into them near the bottom center first in black and then in white. This helps the text stand out whether the background is light or dark.

If you open the images after running that command you should see text added to the bottom that shows the filename. Here’s one from the example shown in the video:

00A110429069(LAB)_0_20130921041055_1278

Converting Images To A Time-Lapse Movie

Now that you have a collection of watermarked images taken at whatever interval you configured in your camera, you can process them periodically into a time-lapse movie so you can quickly scan through what happened while the camera was recording.

There are a variety of tools for doing this, but one that’s easy to use is mencoder. If you don’t have it installed, open a terminal on your Ubuntu Linux machine and type:

sudo apt-get install mencoder

​Now you can go into the directory containing the watermarked images are run the following command:

mencoder mf://*.jpg -mf w=640:h=480:fps=25:type=jpg -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell -oac copy -o output.avi

Once again that’s all one line.

This tells mencoder to operate on multi-file (mf) input, that it’s processing images of type JPG at 640×480, setting the output video codec (ovc) to libavcodec, setting mpeg4 compression, and writing the output file to “output.avi”.

Here’s the example video I created for the demo:

Wrapping It All Up

Of course you probably don’t want to run those commands manually all the time, so you could combine them into a shell script and execute it periodically using cron. You’ll probably also want to include a sequence number or (better still) timestamp in the name of the output file, so that you can come back later and easily see what period is covered by each movie.