Smart home products, like dumb ones, fall into a couple different categories: there’s “fun and entertaining” and then there’s “practical.” Fun stuff when made smart tends to offer me the benefit of convenience; for example, I can ask a smart speaker to play my choice of music. Practical products can bring me added safety and cost savings, such as fire and burglar alarms that notify me of trouble when I’m remote, detectors that sense a leak before it becomes a flood, or monitors on energy and water use, so I can tune my habits to protect our planet’s natural resources.
You need money to make a change from dumb to smart, so the benefit of adding smarts to your home has to outweigh that cost. Another cost is the potential for unforeseen new problems. What downsides exist? The one risk universally discussed at Internet of Things conferences I attend is digital security. Unauthorized hackers exposing your IP camera feeds to the internet is super creepy. Imagine the dark web selling data on which homes contain latchkey kids who are alone after school, and which homes are empty during the workday. The potential losses and safety risks are downright depressing.
Security is something that must be addressed by smart home products; that’s a given. But in addition, I want to stress two additional important values that are often overlooked by today’s smart home vendors: privacy and interoperability. Here’s a short description of these three values, from my perspective:
Privacy — For maximum privacy, I want my smart home system, and its data, located in my house. It’s mine. I want to set it up. No company should be required to have access to it. It should be possible to add secure logins for everyone in my family. From within my house, the system should still work even if my broadband connection to the internet is down.
Security — A remote https: login is the best web security framework available. It’s the same type of security mechanism I use to log into my bank account or pay for online purchases. I will have peace of mind knowing that my smart home keys only work using HTTPS, so that unauthorized hackers are locked out. Also, if none of my login keys or raw data are shared with a cloud data center, there’s nothing to hack “up there” either.
Interoperability — I want to mix and match different smart home products and brands. And I don’t want to be limited to searching for symbols of “works with brand A” (or B, C, or D). Instead, my brand-A pushbutton should be able to turn on and off my brand-B bulbs, my brand-C outlets, or anything else I’ve installed.
As outlined in the Mozilla Foundation’s 2019 Internet Health Report, there’s no single commercial vendor you can point to that does an outstanding job on privacy, security, and interoperability.
But with a maker spirit, and a mix of open source technology and off-the-shelf products, you can create a home environment that optimally addresses these core values. If you follow the approach outlined here, many benefits await:
- Your voice commands can be locally processed and therefore private.
- You can buy wireless devices with attractive designs and optimized battery life.
- You can easily make your own web things to mix with ones you buy.
- You can create custom rules for home automation tasks and remote notification alerts across a variety of brands.
- You can completely ignore smartphone apps specific to wireless Zigbee and Z-Wave devices.
- You can delete many of the brand-specific smartphone apps you’ve downloaded after getting a Wi-Fi product onto your local network (you only need them for first-time setup).
- You can “just say no” to cloud services accounts and ongoing fees.
Making Your Dream Home Smart — and Private
“Where can I buy one?” you ask. Today, the solution described in this article is free and available to makers, early adopters, and anyone willing to roll up their sleeves to take advantage of personalized smart home control and monitoring. The maker approach is outlined in two parts:
Gateway —First you’ll set up the central nervous system, the Mozilla WebThings Gateway. The gateway bridges all your smart device data to the web and lets you control and monitor everything from one personal web portal (above).
There’s a Getting Started Guide online and an excellent gateway setup video on YouTube that was created by Shawn Hymel.
Things — Then you’ll connect your smart things to the gateway. It can be tricky to get good advice on what you need to buy and/or build, because your family and friends may have limited experience with smart home use. You typically have to search outside your comfort zone of local advisors. Fortunately, many smart home products can already be bridged to the WebThings gateway via its add-on framework, due to impressive contributions from the open source community (below). These include Apple HomeKit, Zigbee and Z-Wave, X10, Roku, Sonos, and many more; and for makers, boards like Arduino, Raspberry Pi, and ESP32 (for a list of supported hardware see github.com/mozilla-iot/wiki/wiki/Supported-Hardware). If you’re a developer you can join the fun and tackle writing your own add-on to bridge an existing device.
Rather than having to reverse-engineer all sorts of different devices, it would be much better if the smart home industry could move toward a standards-based approach. The W3C Web of Things is one such approach, and we continue to invest time in it at Mozilla. For lower-power devices that can’t run a full web server on battery power, the recent “Project CHIP” announcement by Amazon, Apple, Google, and the Zigbee Alliance looks promising for improved interoperability of low-power IP-capable devices. It could tie into the Web of Things standard with a single add-on, much as the Zigbee add-on does today.
We want to see standards that are open and accessible to all, like the internet itself. Then, using free and open source software and low-cost hardware, anyone could build their own native “web things” or buy from any vendor, rather than be locked into an ecosystem dominated by one or two brands.
Build Your Own Private Smart Home Gateway
1. Create a Mozilla WebThings Gateway on a Raspberry Pi
The best approach we can recommend today is to build your own private gateway, and carefully select or build smart devices to manage through it.
It’s easy to get started. To “self-install” the WebThings Gateway application onto a Raspberry Pi, just download the Raspbian-based image from iot.mozilla.org/gateway, flash it onto a microSD card, insert the card into the Pi (and any USB dongles if you want to talk directly to Z-Wave type devices), and boot the Pi. That’s it!
You’ve built your own WebThings Gateway.
Another option is to use the Docker image or command-line installation on any suitable computer (Linux, MacOS, or Microsoft Windows).
Complete the remaining steps in the Getting Started Guide to set up Wi-Fi and add users to your gateway, and watch the setup video by Shawn Hymel. Then you’ll likely need to install some add-ons for the devices you want to manage.
Follow the tips in the following sections to take advantage of a few of my favorite features. My favorite “convenience” add-on is the voice control add-on. It processes voice commands locally on the gateway. When I talk to my smart home, nobody is listening to me!
2. Connect your smart things to make them WebThings
Here’s my starter list of useful smart home things, how I use them, and example products.
3. Set up useful add-ons
Pulse — I use one-second pulses to turn groups of things on and off. For example, in my own home I created a pulse called house, and another that is “inverted” called everything. I then create rules, one associating the house pulse “event on” with turning on a bunch of lights, and another associating the everything pulse “event off” with turning off those same lights. For added convenience without having to open a browser to the gateway nor pop open a smartphone app, I can simply speak a voice command such as “Turn on the house.” Then all the lights in the house rule will go on at once. I can also say “Turn everything off” to turn them all back off.
Pulses are also great for grouping lights and assigning them all to the same color. I have a red alert pulse that triggers all the colored lights to turn red for 10 seconds. Right now I have it tied to the detection of an earthquake over 5.0 magnitude within 500km of my house, using data pulled into my gateway from the USGS via the Earthquake add-on.
Voice control — Even though there’s still a lot of room for enhancements and improvements to this add-on, including deeper integration with the gateway, it’s already one of my favorites. I have several pulses that I use in conjunction with voice commands to turn devices on or off, and to trigger other actions. For example:
- “Turn on the rainbow” sets my smart bulbs to reflect the colors of a rainbow.
- “Turn on blueberry” sets them all to blue, and “strawberry” to pink.
- “Turn on the music” activates “playing” mode on my Sonos, automatically playing whatever tune it was left pointing to as a source (i.e., streamed or local content).
- “Turn on the TV,” “Turn on the coffee,” and “Turn on the fan” are examples of devices I control using smart plugs.
There are no skills to install nor manual configuration required when adding new devices, adding rules, or changing the names of things. Your gateway figures it all out automagically. The commands just work, as long as the device you’re commanding has a property you’re allowed to change, such as on/off. Slightly more advanced commands include “Set the study lamp to blue” or “Set the desk lamp to 50%” (for a dimmable smart bulb).
The same commands I can speak using the voice control add-on, I can also type into my gateway’s web user interface. These typed commands are also processed locally and therefore completely private.
The current voice control add-on uses Snips libraries for the wake-word detection and speech-to-text elements of the voice stack (which can run locally on a Raspberry Pi 3). Since Snips was recently acquired by Sonos, and they announced that the open source components we use today won’t continue to be innovated upon in the future, the voice team at Mozilla is researching how to replace those components with other open source options. We have already experimented and successfully integrated Mozilla’s own DeepSpeech engine (for local speech-to-text processing) on the Raspberry Pi 4.
Zigbee — The sensors and actuators that I typically buy are Zigbee. I’ve found that this low-power radio protocol works well for door, motion, and leak detectors, as well as portable pushbuttons (all those things are battery-operated). A secondary benefit of Zigbee (and Z-Wave) devices is privacy. They don’t connect directly to the internet; they use non-IP protocols. By buying Zigbee light bulbs, power outlets, and other devices, I further enjoy the privacy of smart home devices that don’t connect out to the internet without my permission or knowledge.
Notifiers — How can you hear an alarm or receive evidence of intruders when you’re not home? Through a notification alert. Notifier add-ons are useful for letting me know about an important event or property change that I have configured in a rule to be monitored. I typically use browser alerts (since I’m at a computer a lot), but I have also tried email and messaging alerts. Many different notification add-ons that provide alerts are possible.
If I’m at my computer when earthquake data comes in, my Firefox browser will alert me and if I have the time, I’ll go look at where it occurred and how big it was. The little ones occur multiple times per day.
Filtered internet content — One last type of useful add-ons don’t represent data from smart devices installed in my home. Rather, I use them to pull data from the internet into my gateway (based on my configuration filters). I currently pull in date/time data (so I can trigger a front bedroom light automatically at sunset), earthquake data from the USGS (within 500km), local tide data from NOAA (since I row on San Francisco Bay), and local weather data (which I plan to eventually tie into my automatic sprinkler system).
Your thing data — whether locally produced or from internet queries — can be logged for up to 7 days. The logged data above shows that many little earthquakes occur each day, within 500km of my house. (Three of them in the last day registered a magnitude over 3.0.)
Add-on curation — The first few add-ons (for Zigbee, Z-Wave, and native WebThings) were written by the Mozilla IoT team; since then, we’ve received far more add-ons from the open source community than we’ve contributed ourselves. Mozilla reviews and curates these add-ons and, once approved, makes them available to any user who wishes to extend the capability of their gateway. The full list of available add-ons can be found on Github or you can browse them by clicking the “+” icon on the add-ons page of a WebThings Gateway (they’re listed alphabetically). Each add-on shows the author and the open source license. The author’s name hyperlinks to the add-on’s Github repository.
The Private-By-Design Approach
Compare Mozilla’s Smart Home approach to that typical of today’s commercial solutions. With WebThings, the data stay in the privacy of your own home, remote access is securely available via the internet using HTTPS, and all your smart products are made interoperable and manageable over a unified web portal.
Help Create the WebThings Future
At Mozilla, we’re still exploring the best way to build and distribute a smart home gateway with private local voice control and related products that support the needs of everyday users. We’re eager for feedback and insight from the maker community, to help Mozilla bring “people first” IoT solutions to the next level. We hope you’ll install the WebThings Gateway, optionally join our developer community, and let us know what you think!
.
ADVERTISEMENT