Automate and monitor the physical systems in your home

Lead Image © yupiramos,

Smart House

Three Raspberry Pis, four Arduinos, and other readily available components create a custom-built home automation system that monitors and controls about 50 different devices.

In the beginning, a home owner was interested in installing a home automation project that uses a software product built by Catalina Computing [1]. The software is called Virtual Wiring [2], and it lets you build simple to sophisticated hardware systems using low-cost, readily available, third-party components (Raspberry Pis, Arduinos, XBees, Z-Wave devices). The home owner and I looked at the automation requirements and the Virtual Wiring software capabilities and saw that the two were a good fit. In this article, I'll provide a first look at what the software does, and you can find complete documentation on the Catalina Computing website [3].


The house to be automated was a just a few years old. When it was built, it had some of the best systems available: a built-in music system, super-quiet heating and AC systems (the AC is water cooled instead of air cooled), temperature sensors and touch panels in every room, a fire sprinkler system, a backup generator that comes online automatically within seconds, and an alarm system for security, fire, water leaks, and low temperature.

The system worked very well, but over the years, it became apparent that it had room for improvement.

The first step was to make a list of all the changes the home owner wanted, the most important of which included:

  • Email and texting of all alarm and fault conditions (security, water, temperature, furnace, power)
  • Ability to take action on any kind of alarm or fault condition
  • Remote control and monitoring of devices from the Internet or by text messaging
  • Programmable timers aware of house mode, time of day, sunrise, sunset
  • Control of three-way and four-way switch circuits
  • Motion sensing
  • Control of certain pumps, lights, valves, circulators, and fans
  • Power fault detection that fires only when both the grid and the generator are down
  • Four new buttons on the touch panel system for setting modes "here"/"away" and "winter"/"summer"
  • Two signals from the touch panel system indicating "here"/"away" and "winter"/"summer"

From this list, a colleague and I chose the devices needed to build the system. Desirable components supply solid communication links and are popular and available from multiple sources with proven high reliability, long product lifetimes (for replacements down the road), low power, and reasonable cost.

Host Hardware

We chose the Raspberry Pi to host the Virtual Wiring software because it is a well-proven, very low cost, easy to find and purchase fanless computer that uses little power and is one of the most popular embedded Linux platforms available.

Although the long-term availability of the Rasp Pi isn't really known, it seems as though Pis and Pi-like systems will be around for a long time. All in all, it should be an excellent choice for an embedded Linux system, and if the need were to arise, the Virtual Wiring software could run on many other embedded Linux devices.

The Raspberry Pi has various connectors and USB ports that can connect to external devices, but connecting signals directly into the Rasp Pi would likely violate the reliability goal. Many of these signals run directly to the Pi's main chip, so a bad voltage could take it out. Instead, connections were designed to go through Arduinos (connected to the Pi's USB ports). Arduinos have sturdy I/O interfaces and well-made boards (called Shields) that extend the base unit for interfacing with other hardware, and they support 18 or more I/O signals per board.

This project called for a hardened Arduino design, called "Ruggeduino," made by Rugged Circuits [4]. The Ruggeduino is an Arduino Uno with additional current-limiting resistors and clamping diodes.

The Virtual Wiring system requires that Arduinos run a program called Firmata [5]. After downloading the latest Arduino software at the time of writing (version 1.0.5) [6], we then uploaded the StandardFirmata program (version 2.3) to the Ruggeduinos. Arduino Unos often come with Firmata pre-installed, but Ruggeduinos do not. Figure 1 shows the Ruggeduino and Arduino Uno side by side.

Figure 1: Ruggeduino (left) and Arduino Uno (right). The Ruggeduino's extra components provide additional circuit protection.

To bring all the signals out to pushbutton headers for easy signal connection, the Arduinos are mounted on "Aussie" Arduino Shields [7], also made by Rugged. The Aussie goes "down under" the Arduinos, allowing easy unplugging from the top without disturbing the wiring to the headers.

Everything should fit either into standard electrical boxes or into one or two control system enclosures. The enclosure for the control system is an Altech AKL 744-003 with DIN mounting rails and a transparent cover that can hold up to two Pis and four Arduinos.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Raspberry Pi Geek

Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Digital – Analog – Mechanical

    As innovative companies consistently push the envelope of progress, antiquated hardware nearly two years old falls by the wayside. We take an old iPad, an Arduino Mega, and various other materials to create an in-dash climate control app.

  • Automated plant watering with Arduino

    House plants are fairly self-sufficient, but they do need certain care from people to survive. With a few Arduino sensors and a little programming, you can take the guesswork out of watering your plants.

  • Connecting a weather station to your Arduino

    After losing one weather station to tropical winds, the author reboots and designs a PCB that connects to an Arduino and monitors weather instruments.

  • A new way of no-solder prototyping

    The Grove system's standardized connector and multitude of devices allow quick and easy project prototyping with your favorite small-board computers.

  • Making your projects more reliable

    A watchdog timer is a great way of improving reliability for little cost in small, inexpensive computers such as the Raspberry Pi and Arduino.