Cloud Storage In Home Automation
This project was conceived whilst we were evaluating and reviewing cloud storage solutions. The objective is to see if cloud storage can be usefully used in home automation and to identify any services and features that add value to our home automation installation.
For the purposes of this project, we are not assuming any one cloud storage provider or service. We are looking generically at the capabilities and testing out our ideas and concepts.
The Ideas & Concepts
The following is a view of the things we have looked at so far and the experiments we are planning or have undertaken already. These are based upon the key strengths of cloud storage services:
- Resilient synchronisation to the cloud.
- Resilient and secure storage in the cloud.
- Remote web and apps access to cloud stored data.
- Ability to share content from the cloud.
Currently, our Home Control System (HCS) is capturing events, debug data, errors, etc. in daily event logs. To enable quick and easy remote access (especially whilst away from home), these are processed and emailed out at the end of each day. The processing removes some of the many events, to make the delivered file a bit more readable.
This step has now been replaced and the log file is now copied across into the synchronisation folder. It is then replicated out onto the cloud storage service and can now be accessed by the iPhone app. In this instance we have used the Dropbox service. The advantage of this approach is that we now have cloud backup of the logs directly off of our Home Control System (HCS) and they are all now accessible remotely. This includes access to historical log files that would previously have been in deleted emails.
One slightly different approach under investigation, is whether we can create the log files directly in the synchronisation folder, so that changes are instantly replicated into the cloud. This would be a great way of ensuring that the latest log file data is secure, in the event of a major disaster in our home. This assumes the desktop application that performs the synchronisation does not lock the files. It also assumes that it replicates in a timely manner.
The downside of this approach is that to reduce power consumption and improve performance and disk drive reliability, the log files are initially written to solid state storage (USB pen drive). The desktop synchronisation client will not let you create a synchronisation folder pair with a removable drive.
IP Security Cameras
Whilst thinking about data security, we thought also make sense to do something similar with images captured on our IP security cameras. This could be achieved by synchronisation directly from the Home Control System (HCS) mini-ITX PC to the cloud storage or by using the 'Camera Station' feature on our NAS device, which then synchronises to the cloud.
What we have implemented is the former. We have installed an FTP server on the Home Control System (HCS), which is an in-built feature of Windows 7 and just needs to be enabled. We also had to enable an FTP rule in the Windows Firewall.
We tested this with an Axis M1011 camera and set up motion detection rules, with an FTP action event. Files are sent up to the FTP server and deposited in a 'camera' folder within the Dropbox synchronisation folders. Each camera has a sub-folder, in this test case called 'garage'. The images also have filenames that are essentially time and date stamped, to make it easier to see what has happened. Images uploaded into this folder are synchronised to the cloud storage almost instantly, thanks to our FTTP network connection.
Using the Dropbox iPhone app, we can browse the images from any location and swipe through them.
What we would really like to do, is have the camera events controlled by our house status, so that images are only captured when we are out or away from home. This is something that we are investigating. Fortunately, the Axis IP cameras we are using support an HTTP admin API called VAPIX V3.0 (PDF document). We can use the following authenticated commands to control the events on the camera:
Check for event support: http://192.168.1.21/axis-cgi/admin/param.cgi?action=list&group=Properties.API.HTTP.Version
Response was: Properties.API.HTTP.Version=3
List the FTP event servers: http://192.168.1.21/axis-cgi/admin/param.cgi?action=list&EventServers.FTP
Showed the event we wanted to be F0
List the events: http://192.168.1.21/axis-cgi/admin/param.cgi?action=list&Event
Showed our event to be called E0
Disable the event: http://192.168.1.21/axis-cgi/admin/param.cgi?action=update&Event.E0.Enabled=no
Response was OK
Enable the event: http://192.168.1.21/axis-cgi/admin/param.cgi?action=update&Event.E0.Enabled=yes
Response was OK
Any More Ideas?
We are still looking out for other ideas, where cloud storage can add value to home automation. Please let us know if you think of anything to try out.