Hardware Switch for Hue (and other) Scenes

(Convinced ST will never be unbroken…) #1

I’ve mentioned before that I rarely touch a light switch anymore, but as more and more connected bulbs make there way into my home, there are “others” that wish to disrupt the bliss of my automated lighting.

To keep things civil, I picked up 7 Intermatic CA5100’s for under 12 bucks a piece. I hardwired the Hues at the switchbox, and replaced the old switches with these. Initially I was using ‘The Big Switch’ to turn the Hues on and off when they were activated, but I wanted more control.

I wanted control over a single set of lights (like the ones over the pool table or kitchen island), but also to restore and/or adjust scenes that may have been changed from physical use of the switch, all from the same switch.

I just finished an app I call ‘HAM and Switch on Tap’. This app essentially combines ‘The Big Switch’ and ‘Double Tap’, but in a way where the single taps and double taps for both on and off are handled discretely (that essentially means four possible modes for each switch). The options are the same: lights to go on and off; lights just to go on; and lights just to go off. I have also added HAM Bridge commands for tap on, tap off, doubleTap on, and doubleTap off. And all of the above are totally optional.

I now have three of these installed in the main living areas downstairs and that ‘other’ person is now going to be very happy when she returns. She can get the light she wants when she wants it, and I can control the rest of the scenes in the process.

There is currently a delay of 3 seconds for the single tap events (while it waits to see if the second tap is coming). That can probably be moved down to 2 (or maybe even one). I’ll play with it some more tonight.

Upstairs is next!

(Chrisb) #2


I’ll be very interested to see your results when you move upstairs. Specifically I want to see if the double tap works for switches that are not connected directly to the Hub.

Switch Event Handler: Discerning One Press or Two
(Convinced ST will never be unbroken…) #3

Not sure I understand Chris. These switches do nothing but send on and off events (they control nothing physically).

(Chrisb) #4

There is an issue with some Z-wave switches. Supposedly Lutron has a patent on a HA network light switch sending a signal to it’s master controller when it’s physically pressed. If you don’t pay the license fee to Lutron, your switch can’t directly tell the Hub when it’s been pressed.

GE/Jasco and Intermatic usually do not pay the fee and therefore can’t signal. Some, like Cooper and Leviaton do pay the fee, and therefore can signal to the hub when they’ve been pressed.

SmartThings got around this a little bit by taking advantage of a characteristic of z-wave devices. When they are activated they send a “node update” (if I’m remember the terminology correctly) signal. This update doesn’t signal that anything specific has happened with the switch, just that something probably happened. SmartThings then intelligently sees this update and immediately does a poll of the switch to figure out what happened.

It’s a nice little work around but it does have a few issues. The potential issue here is that the “node update” is NOT repeated across the Mesh Network. So if you’re switch is not in direct communication with the Hub, the hub never sees the “node update” and never knows to poll the switch to get recent activity. Obviously it will eventually poll the switch and update, but that could be many seconds later.

Now, I should say that this is all information that was accurate months ago. I don’t know for sure if ST has changed the way they do things. I do know that they’ve always wanted to increase the poll rate to near instantaneous and they’ve made strides towards this with firmware updates, so it is entirely possible that this info is now out of date and much more rapid refreshes make this “node update” workaround obsolete.

That’s why I’m eager to see what results you get with switches that are furthest from the hub, and therefore hopefully communicating via mesh instead of direct.

(Convinced ST will never be unbroken…) #5

Ahhh… I see. Hmmm, that would be a bummer if that is still the case. The good news is that the switches that are currently installed and working, are the furthest from the hub (it is upstairs).

I suppose I’ll know more when the rest of my CA5100’s arrive (hopefully by Friday). I can temporarily install one in the other wing of the house.

(Convinced ST will never be unbroken…) #6

@chrisb BTW, is there a method for determining if a device is communicating directly or otherwise?

(Chrisb) #7

Not that I’m aware of… I have a few switches that I suspect are “meshing” because I can’t get double tap to work with them, but that’s obviously not a 100% reliable method.

(Convinced ST will never be unbroken…) #8

Double Tap uses a method to get the event status of the device, where as HAM and Switch on Tap uses a simple timer. Maybe that is the issue. Have you tried HAM and Switch on Tap with your ‘problem switches’?

(Convinced ST will never be unbroken…) #9

Three more CA5100’s installed in the upstairs master suite this afternoon (man… putting 2 of these side by side in a 2 gang box is tight).

Each switch’s on command creates a Hue scene that focuses light in the area of the switch. There is no need to turn one off and the other on when moving from one area to another; the existing scene is just adjusted to focus on the area of the last pressed switch.

Low tech GF was actually excited to see this tonight! Scene scripts still need a little tweaking (including disabling motion detected behavior when manually switched scenes are in place). But this has been a resounding success in pleasing the “I just want a switch like I had before” crowd.

BTW, I experimented a bit yesterday wirh a 2 second delay (as opposed to 3) and things were a little finicky. Went back to 3 and everything is reliable again. Dunno if it was SmartThings having scheduling issuesx at that point, or whether 2 seconds is just pushing it.

(Joe) #10

@scottinpollock - where did you get the CA5100’s for 12 bucks each? Also, does this setup require the HAM Bridge application to work?

(Convinced ST will never be unbroken…) #11

I bought a 6-pak of 'em on eBay for 69 bucks.

No. You could allow for all of the scene settings in a SmartApp; it is just simpler to store them on the server and send a single command to HAM Bridge.

BTW, since my last post above, I have abandoned the timed double-tap approach for a much more reliable sequenced tap method. Using a state variable, I simply increment its value based on an on event with no off event…

Tap on: You get the scene coresponding to the last state that was set.

Tap on again: you get scene (initial state + 1).

Tap on again: you get scene (initial state + 2).

The number of scenes is defined in the settings of the app, so it knows when to start the incremental counting over again. This allows defining an unlimited number of scenes to a single switch. I have one switch near my kitchen counter with 3 scenes. Press once, counter lights come on. Press again, counter and sink lights; press again, sink lights only. And since state variables persist, the last state is remembered for the next on event after a subsequent off event.

This method is rock solid compared to the somewhat iffy timing of double tap, and allows for more scenes than 2.

(Danny C) #12

@scottinpollock is this updated code in the link in the first post?

(Convinced ST will never be unbroken…) #13

No; but you can find it on my SmartThings page at http://soletc.com/SmartThings