contact us

Use the form on the right to contact us.

You can edit the text in this area, and change where the contact form on the right submits to, by entering edit mode using the modes on the bottom right.


Norton, MA
USA

Home Automation

Something I've been wanting to do for a long time is some degree of home automation.  My ideal configuration is that it just does things for me that make things more convenient and automatic, with minimal overt interaction from anyone.  I'd played with X-10 in the past, but it was always tough to get working reliably, and slow.

I funded the SmartThings Kickstarter campaign.  SmartThings is a Z-Wave and Zigbee home automation hub with support for writing your own SmartApps to manage your devices through a web-based IDE and the Groovy language, and building your own Arduino-based devices through their ThingShield .  Most modules support two-way communication so that you can do more advanced actions related to reading state from the devices.  It's pretty powerful, although the iPhone app can be a bit tough to navigate a times.

Basement

The basement has the laundry room, our main entertainment setup and three closets.  I had done some significant remodeling and wiring updates after a flood ruined the floor and part of the walls, and put much better lights in the closets.

Closet Lights

I decided that my first project was to rig up the lights in the closets to toggle automatically when the doors open and close.  This was quite simple.  I replaced the light switches with GE Z-Wave switches (not dimmers, since the lights are non-dimming florescent tubes) and mounted SmartThings Multi-Sense modules on each door.  I grouped each switch with its light in the SmartThings app, and added the "Turn on when a door or window is opened" SmartApp to each pair.

At the time we also kept the basement door closed so that the cats had a place to hide from the dogs, but sometimes we'd forget the door open.  I put another context sensor on the basement door, and linked it to a simple custom SmartApp that sent notifications to my phone if we left the door open for more than a minute.

Washer and Dryer

Since we spend most of our time on the second floor, I wanted an easy way to know when the washer and dryer.  The normal method is to mount a vibration sensor like the SmartThings Multi-Sense to the appliances and detect when they stop moving.  The problem is that our high-efficiency washer and dryer would periodically pause, so that didn't really work.

I instead built an Arduino and ThingShield based 

Kitchen

When we upgraded the basement TV, I moved the old 36" HDTV into the kitchen and mounted it on the wall.  What I really wanted was for it to act as a glorified digital picture frame most of the time, using an Apple TV's screensaver and my iCloud library as the photo source.  But I also didn't want to have the TV on all the time due to the enormous amount of power that would use

The solution was two motion sensors.  The first was near the front door, which you have to pass if you're going into the kitchen.  This one turns on the TV if it sense any motion, an it's between 6:30 AM and 9 PM.   This avoids turning the TV on if you come down late at night to grab a snack or drink.  The second motion sensor is in the kitchen, and half an hour after it stops detecting motion it turns everything off again.  The long timeout period is to ensure that if you're sitting fairly still eating that the TV won't turn off on you.  The TV also turns off automatically at 10:15 PM, if it's still on.

Luckily, my Samsung HDTV automatically turns itself back on when power is restored, which saved me from having to rig up an Arduino-based IR remote solution to turn the TV on after the power went on.  The TV power is connected to a SmartThings-branded plug-in switch.  The Apple TV and Vizio speaker bar remain on all the time, but they use quite a bit less power than the TV itself.

The end result was a large digital picture frame and Apple TV display that seems to be on all the time, but actually is coming on just before you enter the room and turns off when you leave, thus using much less power than simply leaving it on continuously.

Living Room

The living room features some accent lights, and is also the location of our air conditioning thermostat.  Our front door leads pretty much right into the living room as well.

Air Conditioning Thermostat

This was straight forward -- I bought a Nest.  Someone on the SmartThings forums wrote a device type for it, allowing me to have the Nest react to SmartThings or visa versa.  I haven't used this functionality as yet, though.

Accent Lights

The living room has two small accent lights that illuminate the couch and a painting on the wall.  We leave these on all the time, but it's tough to get the level right; during the day they can be too dim, but at night they can be too bright.

I installed a GE Z-Wave dimmer for these lights and replaced the bulbs with dimable LEDs.  There isn't a standard app to change dimming levels based on time of day, just apps to turn things on and off.  However, this is a shared app called Dim and Dimmer that changes dimming levels on mode changes that would did the job nicely.

I created two new SmartThings modes, Morning and Evening, which are automatically switched to at sunrise and sunset respectively.  I added the Dim and Dimmer app for the switch and set the dimming levels to 75% when the mode switches to Morning and 5%  for Evening.  This keeps a reasonably consistent amount of lighting on the wall relative to the ambient light from the windows.  A more robust solution would probably be dynamically adjusting the light level based on luminance levels, but I don't have any luminance sensors (yet).

Master Bedroom

The main bedroom has a closet light and lamps, plus its own electric heater thermostat like every other room in the house.  I wanted to remotely control  and automate all of these, too.

Thermostat

Once again I installed a Nest to replace the old thermostat.  This was slightly trickier than the A/C, as we have electric heat, and the Nest can only control low voltage devices.  The solution was to get an Aube electric heating relay from SmartHome's online store.  This relay has a built-in transformer to power the Nest as well.  I did have to cut into the wall to mount the relay above the junction box and patch it up after it was installed; it just wouldn't fit inside the box with the other wiring in there.  I'd like to have Nests in every room, but they're far too expensive even without having to buy a relay and go through the hassle of cutting up the wall for each.

Closet

I had installed a light in the bedroom closet, and I wanted it to turn on automatically when the sliding doors opened.  This was basically the same setup as the basement.  A GE Z-Wave switch provided the SmartThings link, and a SmartThings Multi-Sense detected when the doors were open.  The main trick was setting up the contact switch and its magnet so that they'd meet reliably.  The solution was to stack them vertically, with the magnet above the switch.  This would let them pass each other no matter which way you opened the doors, although you did need to make sure you didn't "swap the doors" (sliding the left one all the way right and visa versa) to ensure the switch would turn off.  That could be solved with a second set of switches, but that seemed unnecessary.

Nightstand Lamps

We have lamps on our nightstands, and we sometimes forget to turn off the hallway lights.  I wanted to rig up some buttons that would turn on the individual lamps, and be able to turn off all of the lamps.

I got two Schlage inline dimmer modules to plug the bedroom lamps into, and had the hallway lights controlled with an Aeon Micro Dimmer mounted in the light housings.  The next trick was the buttons.

It is surprisingly hard to find a simple Z-Wave or Zigbee button.  I didn't feel like using a ThingShield for a button or having to have an Aeon Minimote around, so I looked into other options.  I found some stick-on dimmer modules that looked like wall switches, but they were $80 each and their light color didn't match the dark nightstands.

Buttons through Contact Switch Mods

Some Googling found someone who had turned a contact sensor and a Staples Easy Button into a Z-Wave button.  This gave me an idea, so I opened up one of my SmartThings Mutli-Senses and took a look.

The Multi-Sense uses a simple reed switch that closes in the presence of a strong enough magnetic field.  Reed switches are exactly what they sound like -- a nice, simple switch.  I did a test by clipping a pushbutton to the ends of the reed switch, and found that pushing the button "closed" the contact sensor exactly as I'd expected.

I bought two more contact switches from Amazon, this time Aeon Labs models, as well as two black flush-mount momentary push buttons.  The Aeon Labs models are glued together, so I swapped one with a Multi-Sense with the intention of using two of them.  Unfortunately, this approach really didn't work as well as I'd hoped.

Buttons through Arduino and ThingShield

In the end, I used an Arduino and a ThingShield to build my own button controller.  Each nightstand had a button mounted in it, but only one button.  The Arduino could control both nightstands from one module. It could also detect multiple taps quickly for special behaviors.  This is what I configured it to do:

  • One tap: turn the corresponding light on or off
  • Hold: Set both lights to 50% intensity
  • Two taps: Turn both lights on
  • Tap Hold: Turn both lights off, as well as the hallway lights

I mounted the buttons by drilling a  hole in the side of each of the nightstands, and another in the back to run the wires.  The Arduino sits behind one of the nightstands and is powered via a USB wall adaptor.

Wake Up Mode

I also decided to turn on the Gentle Wake Up SmartApp.  This just slowly fades the lights up in the morning, in my case from about 6:30 AM to 6:50 AM.  I have them automatically turn off at 7:15 AM, which is when we usually leave for the train.  It's subtle, but it's nice to have.  While I was able to set it to only do this on weekdays, there's no good way to disable it on the holidays or other days off, nor stop it half way through.  The only option in those cases is to either uninstall he app or turn of the lights own switches (not the Z-Wave controlled switches) manually.

Second Floor Hallway

There are two lights in the hallway, each controlled by two switches, with one switch at the bottom of a stairway and the other at the top.  I wanted to be able to turn these off from the bedroom via SmartThings.

This wound up being more of a pain than I thought.  I actually got all the switches out of the walls before I realized that they had only run two wires.  The missing neutral wire necessary to power the Z-Wave switches was inside the fixture.

After returning the switches, I discovered the Aeon Labs Micro Dimmer.  This is small enough that it can be installed inside the junction box, and simply detects when the conventional light switch wired into it turns on or off.  I bought one to test with and installed it in one of the light boxes, replacing the lights themselves with dimmable LEDs.  It worked perfectly.  It's also cheaper, since I didn't have to replace both switches for the light, but rather install this one module between the light and the switches.

Now that I had control, I was able to rig them up to my bedroom ThingShield.  But I also had another goal: after 10 PM, I wanted the lights turn on dimly instead of at full intensity after 10 PM at night, and at normal intensity after 6 AM.  Unfortunately, it seems that you can't change the dimming levels without turning on the light at the same time, but you can immediately turn the light off after setting the level, as discussed in this thread.  There may be a momentary flicker, but it should be quick.  It would be better if the switches supported changing dimming levels independent of turning the lights on, but this will do.