As I mentioned in the introduction article of this series, there isn't a standard yet for smart home devices to talk to each other. However, the advertising and hype sure makes smart homes look like an easy care free way of life. Well, it isn't. If someone is telling you it is, beware! Snake oil will soon follow!
Before I get into what I'm using and why, let's start with a bit of background. When I say smart home, what pops in your mind? Probably, an Amazon Echo or a Google Home smart speaker. For many, this is the first step into the smart home ecosystem. I say ecosystem because from this point on, everything you choose to buy probably hinges on a stamp on the side of the box that says "Works with ..." and your chosen ecosystem. If you've been in this world for a while, you may have graduated up to a Wink or SmartThings hub and some lights. This is the natural progression in which most people find themselves and to be entirely fair, this is a sensible move. It wasn't too difficult to pull off and it achieved a certain wow-factor and utility.
I almost went down this same road - I have an Echo with Alexa and it's cool. So, what stopped me? What's wrong with this scenario?
For most people, nothing is wrong with this route; it works just fine until it doesn't! How do you know that this or that thing will work and what does failure look like with something this complex and obscure? Did you know that people have figured out how to combine hubs? I started to get paralyzed from too many options. So, I took a step back and ignored the options. I began by thinking about what I wanted to ultimately accomplish.
As I mentioned in 8 Months of Home Automation Lessons, I wanted to achieve these goals:
These are great for the big-picture goals but for me as the builder and maintainer, I had a few more requirements:
I'm planning on going into this in more detail in future articles but one major concern is limiting, as much as possible, complexity. This is a wide topic in this sense because 'complex' is context sensitive - it means different things depending on the topic.
At the heart of this project is a need for simplicity - for me as the designer and for my family as the users. However, with regard to the whole, some complexity in one part is better than simplicity in another. For example, while the setup of the system is complicated and has a steep learning curve (*for now), the user interface for my family is very simple. Lights switches still work as one would expect a light switch to work and the automation is intuitive and disappears into the background.
Stability and Redundancy
I've had many design teachers point out that "a complex system will fail in complicated ways." It has been my experience that complex systems tend to fail often as well. One aspect of analyzing a technical system is to determine the potential Points Of Failure - the number of parts in the whole that, if it fails, would result in large sections of a system or a full system wide failure.
Think of a desktop computer. Inside the case there are lots of mysterious parts that make up all of the functions and abilities of your machine. If the power goes out, it doesn't matter how well constructed the machine is, you'll have a useless thing. The power supply is known as a single point of failure. Now, you can mitigate this by adding a backup power supply (a UPS) inline with the power from the wall. Now, if the line power goes out, you have a small window of time to prepare the computer to be shut down or for the main power to be restored in. The UPS is considered a failover device.
Now think about the hard drive of your computer. As most would understand in this day and age, if the hard drive fails, then the system is useless and furthermore, you've lost more than just the immediate availability of the machine, you potentially lost your data as well. One solution is to use two or more drives in what is called an array. If one fails, another is already running with the same data. This is an example of redundant device.
Lastly, let's say that we've accounted for all of the hardware issues that may come up, but the Operating System that is chosen was built to answer every need - making it very big and complex. If some unforeseen issue with software is introduced that causes the system to lock up then you're right back where you started - the power might as well be out, the system is just as useless. In this case, bigger is not always better. A hammer rarely fails because it isn't complex. However, it also can only be a hammer and not a saw.
Simplicity in solutions, complexity in redundancy
As I've mentioned already, there is no common protocol or standards with regard to home automation. Subsequently, there are thousands of devices that use many different ways to talk to their own ecosystems. Those ecosystems are fairly well developed and stable in and of themselves but if you try to add in something not in that ecosystem then you need a bridge - a device that speaks both languages and in doing so, added a point of failure and a multiplier in complexity.
With all of this in mind, I am trying to design my system so it uses the least number of potential points of failure and maximizes the ability for redundancy or failover and needs only simple troubleshooting for large problems.
As stated, I almost went the commercial route for the hub but the more I dug into it, the less I liked that idea. First, they will achieve almost all of my big-picture objectives except two - cost effectiveness and stability. It also doesn't satisfy my security requirement entirely but I'll get to that a bit later. Second, the commercial route really faltered on my technical requirements. For now, let's look at the popular commercial products you could pickup at your local Walmart or Best Buy.
|Extendable||Proprietary code base but a public API is available||Proprietary code base but a public API is available|
|Device support||Works with an unlimited number of devices spanning many communications types|| Works with up to 200 devices spanning many communications types
May not be the case with Wink2
|Internet Required||Yes, but some local processing is available||Depends on what equipment you have.|
|Account Creation Required||Yes||Yes|
|Auto-Update||Yes and no opt out / reschedule||Yes but you have the option to opt out or have it prompt|
|Cost||$89 for the hub||$69 for the hub $99 for Wink2|
Why only SmartThings and Wink?
They are the only two I considered due to their large device and technology support, massive user base and means of community support, and relatively inexpensive price point. There are a several others but most of the rest are very limited in their direct connection support over wireless communication standards such as z-wave, zigbee, bluetooth, etc. Just about every device even closely resembling a hub communicates over wifi so that one is a given. In the next article, I'll go into more detail on these technologies. You can see more options and reviews below. I suggest that you read as many reviews as you can tolerate. You'll notice that, depending on the writer's point of view, they all like and dislike different devices and attributes.
Where these items fail the most is in the realm of personal security and privacy. So why do I care so much about creating accounts and sharing my usage data? Isn't that stuff out there anyway? Who cares? Well, I do. I care that every bit of my life is starting to show up as a data point for mass marketing, and I care that I am paying for the "privilege" of being marketed to. It's ok with me if this is not important to you, I'm not here to debate ideologies, but rather just to point out that this matters to me and factored into why I didn't choose a commercial solution.
Additionally, I care a great deal that the more devices we have in our homes, the more likely they will be used for cybercrime. It is a real problem that low security devices like cheap home monitoring systems have easily hacked root accounts that can be used to turn that device into an eavesdropping tool or a botnet drone. I would very much like to avoid this problem. This one you should be concerned with too.
Just as an example, how ok are you with someone watching you live your life through your baby monitor?
If you are not going with a commercial product, then you're really only left with writing your own or using an open source solution. What is open source? Generally it is software or hardware that has had the code or design made freely available for anyone to use or modify. If you've used any flavor of Linux, you have used open source software. An Arduino is an example of open source hardware.
There are a lot of open source home automation solutions in various stages of maturity out there. Below is a list of some of the most popular ones that I considered but this list is by no means exhaustive.
For a good article showing several of the pros and cons of many of the popular projects out there please see this article for details, videos and screenshots:
One other notable mention in this class is NodeRed. For those who want the bare minimum but don't want to code their solution either, then NodeRed might be the solution for you. It is a flow control tool that makes automating states for devices pretty simple. I considered this tool during my research and am still considering it as an automation add-on for Home Assistant - my chosen hub software.
When I was evaluating Home Assistant I nearly didn't choose it due to one specific problem - usability for my family. While the interface ultimately came together in a friendly way, getting it to be friendly wasn't very straight forward, plus, it was somewhat the new kid on the block and I'm not much of an early adopter. However, from a technical standpoint, I quickly gravitated to the product as it easily overcame most of the other checklist items.
There are some other niceties to the software as well like the ability to roll your own interface using AppDaemon or the built in API. Also, there is a user contributed project called lovelace that gives a lot more options to the existing web interface and it may be that this becomes the de facto interface in the near future. Also, they just added in basic local accounts so that, in the future, different accounts could have access to different parts of the system so you won't have one of your kids disabling an automation "for fun".
There is also a big push to make the interface much more user friendly. They just recently announced that they will begin integration of Mozilla’s Web Thing API - an attempt at a communications standard for IoT. I think that, in time, this product will be much easier to setup and use.
I started with a Raspberry Pi kit plus a good SD card. Some kits come with cards and adapters. Next, I read through the documentation on the Getting Started section of the Home Assistant website. I am not going to go through a step by step setup of home assistant because smarter, prettier people than me have already done great work on the topic. The following videos can help get you going with HASS.io which is the version I recommend and am running. If you get stumped during installation, please take a look at the community site for Home Assistant. Post your questions there and the friendly community of users will likely have an answer for you in short order.
Let me say that again! It IS ok if you DO NOT want to use Home Assistant! This is not a "I'm taking my marbles and I'm going home!" statement either.
It is just fine for you to use something else. I hope that I am creating all of this generically enough so that it doesn't matter what hub you use. However, for the rest of my articles on the subject I will be talking about "the hub" from my perspective and that perspective has the following context:
In the next article, I'll go over what communication standards and protocols there are in the IoT world and why there is no standard for all of these things.
Main graphic Designed by Macrovector