Mastering a power outage in the smart home

Thriving Without Power

© Lead Image © higyou, 123RF.com

© Lead Image © higyou, 123RF.com

Article from Issue 198/2017
Author(s):

A power failure can cause the IQ of a smart home to plummet suddenly. An emergency power supply and a script on the SmartThings platform can prevent a total outage and inform the owner. The polyglot Perlmeister embarks on a foray into the territory of the Groovy scripting language in this issue.

Hard to believe but a sad reality: Even in major cities in the United States, power outages from one second to the next are not uncommon, whether because of the wild mess of overhead cables stretching between houses in the City of San Francisco (Figure 1) or because the electrical infrastructure of the substations is outdated and starting to crack under the strain. You should always expect the worst as a smart homeowner and implement strategies, just in case the power stops flowing for a few hours. Even if you live in a country with a more stable power supply, you will still appreciate the fail-safes introduced here. Then, if a shrewd burglar takes the precaution of removing a fuse before invading your privacy, they will definitely get a good scare when the alarm still goes off!

Figure 1: San Francisco: Supplying power through a bird's-nest of cables can lead to failure.

Emergency Power

In case of an outage, I want my key automation components, such as the controlling hub and its connection to the Internet – including the path thereto encompassing the router and cable or DSL modem – to continue working without electricity. If you limit yourself to keeping just a few essential components alive during a power outage, the consumption adds up to just a few watts; even a cheap battery-backed emergency power supply for less than $50 can keep this minimal infrastructure alive for a while.

Choosing the Hardware

Devices known as uninterruptible power supplies (UPSs) typically specify their characteristics in volt-amperes (VA), which is unfortunately not sufficiently helpful to answer the most fundamental question: How long will they keep a consumer with a known power consumption rate running? To find out, you need to know more about the fundamentals of the internal batteries and plug this information into a formula [1] that will give you the number of minutes to the point of exhaustion.

Initially, I bought a cheap UPS for $30, but it kept bugging me with senseless beeping during power outages and wouldn't even let me disable it, because, apparently, it knew better. Finally, I grudgingly plunked down $120 for a solidly crafted UPS by Tripp-Lite (Figure 2), which digitally indicates how many minutes of juice are left for battery-backed operation and has a "quiet" key, which ensures that the device does its job without beeping during a power outage. The wonders of technology!

Figure 2: The SmartThings hub (top) and the emergency power supply for the Internet connection.

Smart Home Despite Outage

As mentioned in a previous article [2], the SmartThings home automation kit I set up includes a controlling hub and a set of four different sensors and actuators; until recently, it was only available in the United States. In September 2015, a customized version of the SmartThings hub starter kit [3] for the UK was released for the European market; you can order it on Amazon for about $199 (EUR215/£199). Additional suitable sensors and actuators that support the Z-Wave or ZigBee Protocol are available for about $40 (EUR40/£30).

Most of the components in this smart home solution are battery operated; even the controller is battery-buffered, and when the mains voltage goes missing, no further measures are needed to switch seamlessly to battery. Also, my Arlo wireless surveillance cameras [4] run on battery power, so the UPS only needs to back up the Arlo base station, the router, and the ISP modem. Virtually everything continues running for up to three hours with this simple solution if the power fails. Outages of more than an hour are thankfully rare, even out here in the Wild Wild West.

Buy this article as PDF

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

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • AcpiTool and PowerTOP

    AcpiTool and PowerTOP ensure a sustainable battery lifetime and guarantee low energy consumption of laptops running Linux by identifying power hogs and maintaining the battery.

  • Smart Cities

    Making the city of Messina, Italy, smarter with open source and IoT.

  • Wildlife Photo Trap

    Armed with no more than a Raspberry Pi photo trap, you can discover who pays a visit to your garden at night.

  • Z-Wave Home Assistant

    Z-Wave components, a RaZberry module, and the free Home Assistant software make the Raspberry Pi a powerful smart home control center.

  • Perl: Uninterruptible Power Supply

    An uninterruptible power supply can help get you through a short power outage without losing data or damaging hardware. A Nagios script written in Perl checks UPS health and initiates a controlled powerdown if the unit exhausts its battery capacity.

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News