
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