Stories about Software


Introduction to Home Automation Course Now Live

I have received a comment or two here and there over the last year, asking whatever happened to the home automation posts I used to do. These were admittedly sporadic, largely because I work all day, then I moonlight at night with freelance gigs and Pluralsight, and then I blog regularly, and only then do I split my time between many hobbies. Only one of those hobbies is home automation. But, enough excuses, I decided a few months back. I’d merge two of these interests and optimize my life.

The result has been a few fun months in the making. I have created a Pluralsight course, now live, that is a detailed introduction to home automation that’s far more comprehensive than anything I’d have been able to convey on the blog easily. I think that this course probably makes up for a whole lot of posts that I otherwise may or may not have done. If you have a Pluralsight subscription and are interested, please go check it out and give it a good review if you like it. If you do not have a subscription, but are interested, email me at erik at daedtech and I’ll send you a free 7 day trial so that you can watch it and any other courses that interest you.

For this course, I used X10 and a Raspberry Pi. Some might ask why I’d do this when things like Google’s Nest are all the rage. The reason I chose this for a “fundamentals” course was for the same reason that programmers might start out with C if they’re serious about programming — it’s the original tech, and it’s an excellent platform from which to grow and really understand the various principles involved. Depending on how this course is received, I may opt to do others where I get even more advanced with X10, where I bring in other, similar technologies, or where I start expanding out to use more polished, turn-key products as part of a broader solution. We shall see.

If you’re not sure whether home automation will interest you or what, exactly, home automation is, this course will cover you. It goes into the back-story and it assumes you know absolutely nothing about the topic. Within a few hours of course time (and probably a week of real time since you’ll need to order some equipment), you can go from knowing nothing about home automation to making REST calls that turn on a light in your house, using your favorite HTTP client. And the cost of all of the infrastructure that you’ll need for this will have an upper bound of $100. But heck, watch if you’re just curious — you can always decide whether to order the stuff and follow along later.

I’ll leave you with the introductory section of my script to give you a feeling for the course.

What is Home Automation?

Let’s talk a bit about what home automation actually is.  You’re an intelligent person, and I have little doubt that the words “home” and “automation” used in succession probably conjure up an image in your mind, even if you aren’t already familiar with the term.  And whatever it is you’re imagining is quite likely accurate to some degree and at least a subset of what home automation is.

We all do a lot of manual things around the house.  When the sun goes down, we walk over to a wall switch and turn on a light.  If we suddenly feel cold, we go downstairs and adjust the thermostat.  If it hasn’t rained in a week and the garden plants are wilted and unhappy, we go out to water them.  If it’s too dark and depressing during the day, we open the blinds.  We dust, we vacuum, we scrub, and we clean.

Home automation is the process whereby we stop doing all of that manually.  We automate tasks around the house to varying degrees, either through mechanisms like remote control or through a centralized computer programmed with triggers and actions or even machine learning algorithms.  When the sun goes down, the house senses growing darkness and turns on the lights.  If we suddenly feel cold, we say into our phones “turn the heat up 2 degrees” and go back to whatever we were doing.  If it hasn’t rained in a week, the sprinkler system is smart enough to know the garden plants need water.  We needn’t bother opening the blinds because the house knows we prefer them open on sunny days and does this automatically.  We don’t dust, vacuum, scrub or clean because we have devices that do these things for us.


There are various terms for the concept of home automation.  It’s been called “Domotics” when it involves some form of domestic robotics, or having a “Smart Home.”    Lately, the idea of an “Internet of Things” has had some overlap with the concept of home automation, though there is nothing that requires any of the automation be exposed to a broader network.  Here are some of the many concepts that fall under the broad heading of home automation:

  • Controlling the lighting inside and outside of the home
  • Temperature and HVAC, or heating, ventilation, and air condition, control
  • Media management, such as music and movie playing
  • Shading, which includes the drawing and opening of curtains, blinds, etc
  • Home security, including, but not limited to door locking, intrusion detection, and monitoring systems
  • Communications systems such as intercoms
  • Cleaning devices, of which the Roomba is probably the most iconic example
  • Appliance triggering and status monitoring

Needless to say, the subject covers a lot of ground, but it can be loosely summarized as the idea of automating previously manual household tasks.

A Quick History of Home Automation

If you are somewhat familiar with the concept of Home Automation, what probably comes to your mind is recent commercials such as one for an iPhone app that lets you turn your house’s lights off when you’re not at home or else perhaps Google’s recent foray into the market with the purchase of the Nest learning thermostat.  But it goes back a lot further than that.

The absolute precursor to any concept whatsoever of home automation was the introduction of electricity into the home, which happened on a widespread scale in the early 20th century.  In the same timeframe, RF remote control technology was first introduced by Tesla and would lay groundwork for later home automation in earnest.  The first half of the 20th century was accompanied by a couple of other important advances on the front of media: radio, and later television.  Still, by the 1950’s the most significant advances were largely in the imaginations of people who uses phrases like “home of tomorrow” to describe what they thought would be possible, though some remote operation of various devices was possible, and concepts like mechanical timers for lights and thermostats did exist.

In the 1970’s, a landmark first step toward the modern concept of home automation was taken with the introduction of the X10 protocol.  The concept was simple but groundbreaking and elegant – existing AC wiring in homes could be used to transmit signals between electronic devices.  In the late 1970’s, this idea had been realized with the introduction of a command module, an appliance module, and a lamp module that allowed lights and appliances to be controlled from a centralized point in the home.  It wasn’t long before these became available for retail sale.

Since that promising development, however, progress has not been nearly as rapid as a 70’s home automation enthusiast might have hoped.  Various niche commercial devices such as The Clapper have struck the public largely as curiosities rather than game-changing developments.  More elaborate home automation systems have remained largely the province of tech-savvy hobbyists and millionaires with consultants that setup boutique, custom arrangements.  Retail brands emerged, such as X10, which was named after the protocol, but also Z-Wave, Insteon, Zigbee, and others, but none of these has been able to last in retail stores, and the X10 corporation actually wound up going bankrupt in the early 2000’s.

In spite of its disappointing lack of movement over the last 30 years or so, the home automation market is showing some signs that it may truly be about to take off.  Of course, enthusiasts have been saying that for the last 30 years, and companies like IBM and Honeywell have tried without success to capitalize on this line of products, but these days, Google, Apple, Comcast, and ADT are all pushing products that are gaining more widespread adoption.


I personally think that this is a very exciting time to get into home automation as a hobby.  As a society we’ve enjoyed such stunning technological advancement that phones we carry in our pockets have made maps, calculators and separate cameras virtually obsolete in one fell swoop, but we still turn our lights on and off in largely the same way that people in the late 1800s did.  I’d like to get a lot smarter about that and see it change, and I think that being a home automation enthusiast right now is probably comparable to being a personal computing enthusiast in the late 70’s and early 80’s.

So, Check it Out!

I’ll return to this subject matter here and there, the way I do with my other Pluralsight courses, so if you prefer the blog medium, you’ll still get to see some of the static content.  But what I won’t be doing is posting any of the video demos that are property of Pluralsight, so if you want the full experience, I definitely suggest checking out the course.  I take you through literally every nitty gritty detail of ordering parts, Linux command line setup, implementing REST with Python, and configuring Apache on the Raspberry Pi.  End product code is also up on github and downloadable through Pluralsight.



Static Analysis, NDepend, and a Pluralsight Course

I absolutely love statistics. Not statistics as in the school subject — I don’t particularly love that branch of mathematics with its binomial distributions and standard deviations and whatnot. I once remarked to a friend in college that statistics-the-subject seemed like the ‘science’ of taking a guess and then rigorously figuring out how wrong you were. Flippant as that assessment may have been, statistics-the subject has hardly the elegant smoothness of calculus or the relentlessly logical pursuit of discrete math. Not that it isn’t interesting at all — to a math geek like me, it’s all good — but it just isn’t really tops on my list.

But what is fascinating to me is tabulating outcomes and gamification. I love watching various sporting events on television and keep track of odd things. When watching a basketball game, I always the amount of a “run” the teams are on before the announcers think to say something like “Chicago is on a 15-4 run over the last 6:33 this quarter.” I could have told you that. In football, if the quarterback is approaching a fist half passing record, I’m calculating the tally mentally after every play and keeping track. Heck, I regularly watch poker on television not because of the scintillating personalities at the tables but because I just like seeing what cards come out, what hands win, and whether the game is statistically normal or aberrant. This extends all the way back to my childhood when things like my standardized test scores and my class rank were dramatically altered by me learning that someone was keeping score and ranking them.

I’m not sure what it is that drives this personality quirk of mine, but you can imagine what happened some years back when I discovered static analysis and then NDepend. I was hooked. Before I understood what the Henderson Sellers Lack of Cohesion in Methods score was, I knew that I wanted mine to be lower than other people’s. For those of you not familiar, static analysis is a way to examine your code without actually executing it and seeing what happens retroactively. Static analysis, (over) simplified, is an activity that examines your source code and makes educated guesses about how it will behave at runtime and beyond (i.e. maintenance). NDepend is a tool that performs static analysis at a level and with an amount of detail that makes it, in my opinion, the best game in town.

After overcoming an initial pointless gamification impulse, I learned to harness it instead. I read up on every metric under the sun and started to understand what high and low scores correlated with in code bases. In other words, I studied properties of good code bases and bad code bases, as described by these metrics, and started to rely on my own extreme gamification tendencies in order to drive my work toward better code. It wasn’t just a matter of getting in the habit of limiting my methods to the absolute minimum in size or really thinking through the coupling in my code base. I started to learn when optimizing to improve one metric led to a decline in another — I learned lessons about design tradeoffs.

It was this behavior of seeking to prove myself via objective metrics that got me started, but it was the ability to ask and answer lots of questions about my code base that kept me coming back. I think that this is the real difference maker when it comes NDepend, at least for me. I can ask questions, and then I can visualize, chart and track the answer in just about every conceivable way. I have a “Moneyball” approach to code, and NDepend is like my version of the Jonah Hill character in that movie.

Because of my high opinion of this tool and its importance in the lives of developers, I made a Pluralsight course about it. If you have a subscription and have any interest in this subject at all, I invite you to check it out. If you’re not familiar with the subject, I’d say that if your interest in programming breaks toward architecture — if you’re an architect or an aspiring architect — you should also check it out. Static analysis will give you a huge leg up on your competition for architect roles, and my course will provide an introduction for getting started. If you don’t have a Pluralsight subscription, I highly recommend trying one out and/or getting one. This isn’t just a plug for me to sell a course I’ve made, either. I was a Pluralsight subscriber and fan before I ever became an author.

If you get a chance to check it out, I hope you enjoy.