Nicholas Skinner

Freelance website and web application developer

Archive for July, 2011

Home Automation with a AXIS M1054 Network Camera / Mini Review

Sunday, July 24th, 2011

AXIS M1054I recently purchased a network camera, primarily to be able to see who is at the door before answering. The slight complication was that there was no obvious / straight forward position to mount it with an ideal view of the front door, even externally (external waterproof cameras are also more expensive, and installing it would be more complicated involving drilling through brickwork). For that reason I decided to mount it pointing out of a window onto the path leading upto the front door this however meant that the camera could only see people walking up to, and away from the house, not who is currently at the front door. I therefore needed to find a camera that was easily interface-able with / flexible from a technical perspective.

The AXIS M1054 (purchased from Network Webcams) fit my requirements. It has a very fully featured web interface, with a number of potentially useful features such as:

  • Uploading /sending files via HTTP/FTP/Email
  • Video based motion detection
  • PIR based motion detection
  • Triggering events via GPIO on camera
  • Event notification via custom TCP socket protocol
  • Pre/post event buffers (capture images from before/after the actual event is triggered)
  • Motion JPEG, H.264 support, single image frame capture (JPEG)

I initially attempted to use the PIR to trigger an event (image upload to server) however the PIR has a limited range/does not work well through a glass window, I therefore switched to using the video motion detection. At first I found the motion detection to be somewhat unreliable however after spending time tweaking it, and a firmware update the situation improved, however not to a level where it was usable as a primary trigger (I found it would falsely trigger if too much changed in the image, e.g. shadows from sunlight). I therefore decided to setup the camera to upload images to a server on motion detection, and use a doorbell press event from my existing Synapse home automation mesh network to trigger a PC popup with the latest camera image. The combination of the camera motion detection, and doorbell event works well since it means I can obtain a single image of the caller (rather than relying on taking the last 5 images from the buffer – where depending on their walking speed any one / none of the images will have their image) and using the doorbell even eliminates the false positives of the cameras motion detection.

On the server end I had some difficulties receiving the images in PHP, however after some trial and error worked out that they could be read In the slightly non standard way of using “php://input” rather than “$_FILES”:

<?php
file_put_contents('camera_photo.jpg', file_get_contents('php://input'));
?>

In terms of the physical hardware, I was fairly impressed, it is a well constructed unit, supports POE, and supports a traditional wall based mount, or a clamp based mount (both or which are supplied in the box). It has a swivel arm with a large range of movement for finer adjustment. At 720p HD resolution the image quality is also quite reasonable, and with the motion JPEG support there are a number of apps that support the camera on the iPhone, such as the free NetcamViewer.

The camera comes with the AXIS Camera Station PC software. As far as I can see the main benefit of using the software is the ability to manage video recordings play/record (manually or motion captured – since the web interface only allows JPEG images). I had some problems with the server side component seemingly crashing/not responding to client connections, but not really needing this functionality it was not something I looked into any further (may have been a memory issue on the server).

In the future I may look into integrating it into with a SparkPad “open platform digital display” picture frame to popup the callers image in other rooms that do not have a PC.

Download: Camera Viewer Popup C#

Further Resources: