Mastering a power outage in the smart home
Thriving Without Power
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!
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!
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
(incl. VAT)
Buy Linux Magazine
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.
News
-
Linux Servers Targeted by Akira Ransomware
A group of bad actors who have already extorted $42 million have their sights set on the Linux platform.
-
TUXEDO Computers Unveils Linux Laptop Featuring AMD Ryzen CPU
This latest release is the first laptop to include the new CPU from Ryzen and Linux preinstalled.
-
XZ Gets the All-Clear
The back door xz vulnerability has been officially reverted for Fedora 40 and versions 38 and 39 were never affected.
-
Canonical Collaborates with Qualcomm on New Venture
This new joint effort is geared toward bringing Ubuntu and Ubuntu Core to Qualcomm-powered devices.
-
Kodi 21.0 Open-Source Entertainment Hub Released
After a year of development, the award-winning Kodi cross-platform, media center software is now available with many new additions and improvements.
-
Linux Usage Increases in Two Key Areas
If market share is your thing, you'll be happy to know that Linux is on the rise in two areas that, if they keep climbing, could have serious meaning for Linux's future.
-
Vulnerability Discovered in xz Libraries
An urgent alert for Fedora 40 has been posted and users should pay attention.
-
Canonical Bumps LTS Support to 12 years
If you're worried that your Ubuntu LTS release won't be supported long enough to last, Canonical has a surprise for you in the form of 12 years of security coverage.
-
Fedora 40 Beta Released Soon
With the official release of Fedora 40 coming in April, it's almost time to download the beta and see what's new.
-
New Pentesting Distribution to Compete with Kali Linux
SnoopGod is now available for your testing needs