Things Gateway, Part 1 - History

This is the first in a series of blog postings about the Internet of Things (IoT).  I'm going to cover some history, and then talk about and demonstrate Mozilla's secure privacy protecting Things Gateway and finally talk about writing the software for my own IoT devices to work with the Things Gateway.  


First, though, my history with home automation:

When I was a teenager in the 1970s, I had an analog alarm clock with an electrical outlet on the back labeled "coffee".  About ten minutes before the alarm would go off, it would turn on the power to the outlet.  This was apparently to start a coffee maker that had been setup the night before.  I, instead, used the outlet to turn on my record player so I could wake to music of my own selection.  Ten years after the premier of the Jetsons automated utopia, this was the extent of home automation available to the average consumer.

By the late 1970s and into the 1980s, the landscape changed in consumer home automation.  A Scottish electronics company conceived of a remote control system that would communicate over power lines.  By the mid 1980s, the X10 system of controllers and devices was available at Radio Shack and many other stores.

I was an early adopter of this technology, automating lamps, ceiling lights and porch lights.  After the introduction of an RS-232 controller that allowed the early MS-DOS PCs to control lights, I was able to get porch lights to follow sunrise, sunset and daylight savings rules.

X10 was unreliable.  In communicating over power lines, it encoded its data into the momentary zero voltage between the peaks of alternating current: it maxed out at about 20 bits per second.  Nearly anything could garble communication: the dish washer, the television, the neighbor's electric drill.  Many of the components were poorly manufactured.  Wall switches not only completely lacked style and ergonomics, but they would last only a year or so before requiring replacement. In 1990, a power surge during a thunderstorm wiped out almost all of my X10 devices.  I was done with X10, it was too expensive and unreliable. 

For the next twenty years, I lived just fine without home automation, but the industry advanced.  Insteon, Z-Wave and Zigbee were all invented in the 2000s for home automation.  Their high cost and my soured experience with X10, kept me away.

In the last ten years, there has been a renaissance in home automation in connection with the Internet: the Internet of Things.  I looked at the new options, saw they were still expensive and they had new flaws: security and privacy.  I bought a couple of the Belkin Wemo devices that I could control with my iPhone and found they were, like X10, unreliable.  Sometimes they'd work and sometimes they wouldn't.  Then in 2013, a security flaw was found that could result in someone else taking control or even invade the home network.  The Wemo devices required a firmware security update and on hurting my back crawling behind the couch to do the update, I decided they were not worth the effort.  The Wemo devices were added to my local landfill.


I watched from the sidelines as more and more companies jumped into the IoT field.  A little research showed how ZWave and Zigbee devices could be more secure, but with two competing incompatible standards, how could I decide?  I didn't want to buy the wrong thing and then suffer a orphaned  system.  I couldn't justify the expense.

What really got me interested again were the Phillips Hue system of color changeable lights.  The cost coupled with Phillips on again, off again willingness to allow third party products to interact with their hub, forestalled my adoption.

I held back until the Samsung SmartThings device was introduced.  Here was a smart home hub that could talk to both ZWave and Zigbee devices.  I added one to my Amazon shopping cart along with a number of lamp controller switches.  I didn't press the buy button because I was looking for the flaw.  Of course, there was one, a big one: the Internet was required.  Since it relied on mobile phones to control the Smart Home hub, if the Internet was down, the control of the devices stopped.  Or so it seemed, the documentation was vague on the subject.  I finally confirmed it by talking with an acquaintance that had the system.  This system was not for me.

I was again a IoT wallflower, longing to dance but unwilling to step onto the dance floor.

In December of 2017, however, I saw a demonstration of a new experimental system from Mozilla called the Things Gateway.  It offers a protocol agnostic control over IoT devices.  It can control the Z-Wave and the Zigbee stuff at the same time.  The software runs on a computer, even a Raspberry Pi.  Because it offers a web server on the local home network, any Web browser on a phone, tablet or desktop machine at home can control it.  Unlike most commercial IoT controllers, if the internet is out, I can still control things while I'm home.  As a plus, Mozilla offers a secure method from the internet to the local Things Gateway web server. For many folks controlling things while away from home is important, for me, I could do without that feature.

The final convincing argument?  It's open source and completely customizable.   I cannot resist any longer.

My next blog posting will walk through the process of downloading and setting up a Mozilla Things Gateway.   I'll show how I connected  Z-Wave, Zigbee and Philips Hue lights into one smart home network.  Subsequent postings will show how I can use the Python programming language to enable new devices to join the Internet of Things.

I'm quite excited about this project.

Mozilla Things Gateway

Mozilla Hacks Blog about Things Gateway