Friday, December 12, 2014

Christmas Tree Control with the SmartThings Hub and SmartThings SmartPower Outlet

In the last post we talked about tying together a bunch of Smart Home type Home Automation devices with a Home Automation Hub, and I told you I got a SmartThings Hub:

I went with SmartThings for a number of reasons. It was one of several solid choices that would tie into a variety of the more popular automation standards, its smartphone app is less panned than some of the others in the online reviews, and, important to me but not necessarily everyone, or even most people, it has a strong developer community so that you're not stuck with limited support for various devices, but can install homebrew applications to let you do particularly gee-whiz stuff.  That's a technical term.  Also, SmartThings is kind of the original product in this category and was started by a "Kickstarter" campaign, which just kind of makes it cool, and they don't take themselves that seriously, as indicated by statements like "time travel is still in beta" in their FAQ.

Along with my hub, I ordered a couple of SmartThings branded products.  They actually have a couple of starter kits that are good deals if you want everything in them, but I picked some items à la carte.  The first item I picked is the SmartThings SmartPower Outlet:

A staple of home automation, the connected plug lets you do a number of things.  Obviously it lets you turn the plug on and off at will.  Additionally, this plug and many like it will let you sense the current flowing through it, so you can sense if a device plugged into the outlet is running, which may be used as a trigger for something else.  In this case, my first application for the SmartPower Outlet would be seasonal and simple: control of our Christmas tree lights.  It would do that by communicating with the SmartThings Hub via the ZigBee.  You wouldn't need to know that if you're using it with the SmartThings Hub since it's safe to buy any of their branded products, but as we add things that aren't SmartThings branded, knowing that we can use them is going to be a little more complicated, so it's worth learning to pay attention to the technology in use.  But wait, we have to actually set all this stuff up...

Setting up the SmartThings Hub is pretty straightforward.  You unbox it, go to your nerd closet (you have a nerd closet, right?) and plug it in.  You then plug the included Ethernet patch cable into the hub and your network switch.  So, the first thing you need to know is that it requires a wired connection into your home network.  Next, you download the app on your device of choice and walk through the account setup and the rest of the guided setup.  I found that it didn't do a great job of finding several of the devices that I knew it could control, but I had no trouble at all adding them through the menu.  Different devices did require different actions to pair them with the hub, but they were all described on screen and easy to accomplish.  After adding a few devices you end up with something that looks like this:

From there, you can browse into your things and select the settings box for the one you want, getting something like this (I added the Christmas Tree from the seasonal section when I configured the plug):

From here, you can touch the big green circle to turn the switch on and off, and you can go into "SmartApps" to set up behavior.  I created custom apps named "Christmas Tree On" and "Christmas Tree Off" only to find an annoying limitation.  I could set the switch to come on based on any number of triggers, including the ones that would be useful in this case, like time, sunrise, sunset, etc., but for each of the time related categories you could only select one time.  The option was either to create "Christmas Tree On 2" and "Christmas Tree Off 2" or to set both a time and a sunrise/sunset trigger for on an off.  I chose the latter, with the tree coming on and off before and after sunrise and on and off at fixed times in the evening, but for other things you may have to set up multiple types of events.  If you want something to happen on the hour every hour?  Prepare to create 24 "SmartApps." That's a little less "Smart" than I would have liked.

Once it was done, it worked like a champ.  You get a log of power usage in Watts every 5 minutes (this logging might be configurable, I haven't played with it) and a recording of every on/off event and why it was triggered.

So, mission accomplished.  We've installed our SmartThings Hub, paired a device, and configured that device to do what we want.   As my son would say, "easy peasy, lemon squeezy."

Products referenced in this post:
For advanced reading on home automation I recommend the SmartHomeHub forums.


  1. So, mission accomplished. We've installed our SmartThings Hub, paired a device, and configured that device to do what we want. As my son would say, "easy peasy, lemon squeezy." رضا شیری

    محسن چاوشی