Programming Your Home
Programming Your Home

Author: Mike Riley
Publisher: Pragmatic Bookshelf
Pages: 200
ISBN: 978-1934356906
Aimed at: Makers
Rating: 3
Pros: Some interesting ideas for projects
Cons: Odd mix of methods, some strange design decisions
Reviewed by: Harry Fairhead


What exactly does programming your home make you think of? Security, home automation and some sort of unified approach. Can a book of projects tackle the bigger picture?

The subtitle of this book is "Automate with Arduino, Android and Your Computer" and this gives you some idea of the hardware approach used.  The introduction explains that the author is a believer in open source so the choice of language to be used is Ruby and Python. For an open source enthusiast there is also a lot of discussion of the Mac which is about as un-open as you can find.

The first chapter discusses the general idea of home automation and is very low level - most readers can skip it. Chapter 2 is another very general look at what you need - wire, components and Arduino. As with the first chapter it is all too simple and general to be of much use. It tells you that the Arduino and other things, like xBee radio, exist but not much more about them.




The book really gets started at Part II - the projects. The first project is a water level notifier using an Arduino and a flex sensor. Nothing deep (pun intended) here. If you know how to use an Arduino then you should be able to build the project without the book's help. So the only reason to read is to learn about using such devices and basically the discussion is more about implementing the project than principle.

What is interesting and useful is that the projects suggest ways of dealing with the data the Arduino gathers that you might not think of. For example, the water detector emails alerts. The strange thing is the way that the email is sent - not directly from the Arduino but via a PHP script running on a server. The Arduino sends an HTTP message to the webserver which then converts this into an SMTP request using PHP. This is a very odd way of doing the job and I can't really see any reason for not just using the same mail server that the PHP program uses directly from the Arduino and cutting out an entire level of complexity. I have to admit to losing faith with the book at this point. 

The next chapter is a nice project - an electric guard dog. This uses an Arduino with a PIR sensor to detect an intruder. It then plays a dog barking audio clip, which isn't particularly novel, but it also uses a servo to imitate a dog scratching a door. This is a good idea and you could use the same method to twitch a curtain, say, or knock a vase over - well perhaps that one is going too far.

The next project is a little strange - a tweeting bird feeder This again is an Arduino project, but it uses a pair of XBee radios to signal that a bird feeder is being used and is empty. This is overkill and the project doesn't seem rational - unless you really want to monitor a bird feeder in minute detail. It would make more sense to use a WiFi link and get the Arduino to do the tweeting, but again we have a server acting as middle man and a Python program doing the tweeting and keeping a database (SQLite).

Chapter 6 implements a package delivery sensor, which is more or less the same idea over again, only this time it sends an email when a package is put down on the porch.  If we can use GMail for this, why not for the earlier project?

Next we have a web enabled light switch, which uses an X10 controller. The the web server is equipped with an open source command line program that sends X10 commands. This is only easy to use under Linux or Mac. The client is a full Android application and, yes, you are expected to learn how to use the Android SDK almost instantly.  As so many of the other projects used web servers, it would have been much simpler to stick with this mode of operation and create a web app to do the job. This would have allowed any device with a web browser to switch the light on and off.

Chapter 8 is on curtain automation and it uses an Arduino motor shield and a stepper motor to move the curtains. An easy-sounding project, but my guess is that it's not easy to actually make a good job of moving the curtains with a stepper motor. Again the choice of hardware and approach is a little odd - why a stepper motor? A simple DC motor would be cheaper and just as good.

Chapter 9 is an Android-based door lock. This uses an off-the- shelf electric lock and an Android IOIO board - which doesn't work with all Androids so take care. This gets very complicated with Android programming needed to use the IOIO card and to create a web server. It is so complicated that the book ducks the issue of explaining and just tells you to download the software.  Again, complex Android development could have been avoided by using a web app which would have run on any device.

The final chapter is on using speech synthesis and recognition in the home via a standard Mac feature. Although Windows has a complete voice subsystem, only the Mac is used in the project.

The book closes with a fairly irrelevant look at the future of home automation and some ideas for projects.

At the end of the book I was left feeling a little doubtful about many of the design decisions made. I also think that many readers will manage to cope with say the Arduino programming but the Android programming more complex and it is presented and not really explained. There is also a tendency to move away from the Arduino code as quickly as possible to coding on a server, which sometimes then involves a web service.

What is really missing from the book is any sense of organization. Each of the projects is a one-off and there is no thought for integration.It would be nice if the projects reused ideas and techniques. For example, we first implement a complicated way of sending an email using PHP and a server and then in a later project we use Python and a Gmail SMTP server. Very odd. It would be better to have more discussion of why particular methods are used.

If you are looking for a book on how to create an automated home you will be disappointed - this is just a collection of projects which happen to be based around the home. A more critical problem with the book is that it isn't clear what it hopes to teach the reader who is clearly supposed to already know Arduino programming, Android programming and quite a lot of interfacing ideas. If you know this much you probably don't need to read about how to implement a set of fairly obvious projects, unless you are looking for inspiration about what to build.



Head First Android Development

Authors: Dawn and David Griffiths
Publisher: O'Reilly
Pages: 734
ISBN: 978-1449362188
Print: 1449362184
Kindle: B00ZVG1REQ 
Audience: Java programmers moving to Android
Rating: 3.5
Reviewer: Mike James

Head First Android Development sounds like a good way to get started, h [ ... ]

Learning Node (2e)

Author: Shelley Powers
Publisher: O'Reilly
Pages: 288
ISBN: 978-1491943120
Print: 1491943122
Audience: Experienced clientside JavaScript devs
Rating: 5
Reviewer: Ian Elliot

Node.js has become very popular. Does this book tell you what you need to know?

More Reviews

Last Updated ( Friday, 13 July 2012 )

RSS feed of book reviews only
I Programmer Book Reviews
RSS feed of all content
I Programmer Book Reviews
Copyright © 2017 All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.