UPDATED 10/7/2015 -- "Double Duty" - Use redundant switch presses to control other lights. You paid a lot for those switches, make them work Double Duty!

Hi all,

UPDATE 10/7/2015: This app now allows you to specify independent slave switches for the redundant “on” and “off” presses.

A WORD ABOUT DIMMERS: I recommend using this app with pure on/off switches and NOT dimmers. Due to the nature of dimmer switches, this app may have the following unexpected behavior: Turning the master switch “off” from “on” may result in toggling your slave switches/lights (because Dimmers send redundant events). Additionally, dimming your lights to “0” via an app may also result in the toggle being triggered. This is because the dim to 0 is interpreted as “off” and sent as a physical event. As of right now, there is no elegant way for me to handle these situations, but I don’t think they “break” anything – just be mindful of them! I personally use this app with a dimmer and just live with how it works. You may lose some “WAF” though :slight_smile:

A WORD ABOUT PRESSING THINGS TOO FAST: Please be mindful that wall switches have a tendency to suppress an event if you press too soon after a state change (which is why Double Tap doesn’t work well). Now that this app supports “On” and “Off” presses, I think it behooves me to mention that if you are changing the state of a switch and THEN want to use another press to toggle your slave switches, give the switch a few seconds to get back to what I will call a “rest” mode. BETTER YET: If you intend to both turn your master switch on or off AND toggle your slave switches, do the toggle first and then the change to the master switch second. This will improve your user experience! (Of course this also depends on your configuration and what slaves you have attached to which command. Personally, I just toggle the same groups of lights with both “on” and “off” to avoid confusion).

This app allows you to utilize redundant “on” or “off” presses of a switch to control a secondary switch or group of switches. For example, if my living room track lights are “off” and I press “off”, I can toggle my corner lamp which has a GE Link Bulb. You can do the same for “on”, you can even have “off” and “on” control different switches!

Hope someone finds this useful:


That’s a pretty cool idea. I have the same issue but solved it with the Amazon Echo.

This specific implementation wouldn’t work for me, because as I understand it, it will only work if the light switch is off. In our case, the most appropriate switch will be the kitchen light to toggle the kitchen bar lights. It would not be a good experience to turn off the kitchen light and then press off again to turn on the bar lights and then turn on the kitchen light again.

Of course, you can change this behavior by making your app use both double on and double off presses as toggle. I.e. toggle the lights if an off switch is turned off and an on switch is turned on.

This is the BEST idea since the “double tap app”. Was looking for something like this for a long time. I tried the double tap method but that was too finicky for me. This works! Great work…

Thank you, I am glad you like it! My motivation for this was the poor ability for Double Tap to work. I did also make an app called “Better Double Tap” which works a lot better than the stock one (it allows you to specify your own “window” for the double taps to take place), but it still isn’t 100% reliable due to cloud processing and the way it seems switches suppress events that happen too quickly. I wanted a 100% reliable, easy, “wife friendly” solution, and this app “Off as Toggle” (was hard to think of a good name) was it!

Unfortunately, double taps don’t work well with ST. There is a huge delay in zwave commands making it to the cloud and it seems like switches suppress second events if they are pressed too fast. So, even if you use my version “Better Double Tap”, you still have to do the presses slowly (i.e., Press, count 2 Mississippi, press again). As a result, it’s kind of annoying and not reliable.

1 Like

Looks like I didn’t explain myself well enough. What I was suggesting, was to modify the app to do exactly what it does now, except include processing for cases where the switch is off AND on. So the use case will be - if the primary light is already on, then press the on side of the button to toggle the secondary lights, and if the primary light switch is already off, then press the off side to toggle the secondary lights. That way, you can control the secondary light without affecting the state of the primary light,

Ah, I’m with you. That’s certainly something that I can implement with ease. I’ll be happy to include that in the functionality for you later today!

What I’m trying to play through my head is whether ther eis any downside to that functionality and whether it should be “baked in” or an optional feature of the app? No downside comes to mind. Hell, I could even make it so that you could control separate groups of lights with on vs off :slight_smile:

I modified the code a bit and added an optional dim level. I’ll try it tonight. My use case is actually when I get up early in the morning and the rest of the house is still asleep, I don’t want to use the Echo and wake folks up. I also don’t need a lot of light in the kitchen. So I can use this scheme to turn on a light and dim it low.

Love it, love it, love it. Works well. I think you should offer one for ‘On as Toggle’ and submit both to ST.

Thank you for this @pranalli. This is an awesome little extra to have for sure.

Thank you. I am working on making “On” an option, I might even go as far as to offer the ability to use a different list of switches controlled by “On”. I have a baby and I work full time as a programmer so I just need to find the time :slight_smile: I could do it in 2 seconds if I had a proper IDE, but the online one makes development a lot slower (it doesn’t interpret valid Groovy correctly all of the time). I’ll do it though!

By the way, how do I submit an app to Smartthings? I’m very new here, I remember seeing that option somewhere but can’t recall now.

1 Like

Tagging our IDE keeper, maybe he can give you some pointers on how things work. @slagle

1 Like

Thanks amigo, appreciate it and your kind words.

I edited my OP because it turns out that the default “Dimmer Switch” device does, in fact, send redundant events – so no need to create a custom device type.

@SBDOBRESCU @Navat604 @Dan999

This app has now been renamed “Double Duty” and has an option when you install it to also use redundant “on” presses for the same purpose. I edited the OP. Just remember that if you are trying to turn on both the master and slave lights at the same time, you will need to wait 2-3 seconds between the initial “on” presses so that they register correctly. Instead, I would actually recommend using the off toggle to first turn the slaves on, and then use the regular on button to turn the main lights on – this will be a better user experience! But once the main light is on and hasn’t been touched in a while, “on” works as a toggle just the same way as “off” does.

Also, if I could ask a favor if any of your are using a dimmer switch as your master. Would you mind turning the dimmer switch on, waiting a few seconds, and then turn it off normally and see if the slave lights/switches toggle? They shouldn’t but I am having an issue where my dimmer sends duplicate “off” events thus creating this scenario. I assure you, it has nothing to do with my app. But I need to find out if it’s just my device (maybe something screwy with my account?) or if other people are seeing this issue.

I found the place to submit for publication :slight_smile: I was right here smack dab in front of my nose! I went ahead and submitted it with the current functionality. Basic, clean and neat. Can always add more features later.


I tried this app with my GE 12722 light switch. I want to activate a lamp with the double duty. I plugged the lamp into an Aeon Smart Energy Switch, and the app only sends “on” commands, it will not toggle. So I switched the lamp to a Wemo Insight, and the app sent on and off commands, but with high latency. I am guessing the latency is due to zwave switch to ST hub to router to Wemo, so I am wanting the Aeon switch to work instead. Any thoughts?

Edit: I tried it with a GE 12721 receptacle and it works perfect. However, I dont want to move the recepacle. I may buy another, they are cheaper than some switches.

Any other switches that work well with this smartapp?

@pranalli Pressing up or down on my light switch showed the change on my Aeon switch on the ST app, but physically would not turn off.

Nice! I still think it would be helpful to have independent toggle for “on” state. That way, you would basically have three switches into one. You can even call your app that way “3 in 1 z-wave switch.”

1 Like

I agree. I will implement that. It will just be an optional second list of lights that can be controlled with “on”. If nothing is specified, “on” and “off” will control the same list.

I’m really happy you found a way to make this work for you. I don’t have an Aeon switch to test this on, so I am not able to debug it and see what’s happening. What I can say is that ST has devices pretty well abstracted, so as long as the Aeon switch supports capability.switch, it should work… I might pick one up at some point, but until then I’m not able to help, sorry. I find it very odd if the app shows the switch as having turned on but it doesn’t physically. That sounds unusual, like some sort of ST bug.

As for latency, there’s nothing I can do about that. That’s the ST cloud. Sometimes it takes an inordinate amount of time for commands to make it to their cloud. If/when they allow apps like this to be locally processed, I would image the response would be almost immediate, if not immediate. This is a VERY lightweight app, it has no fat whatsoever.

One other thing. Keep in mind that these switches have a bad tendency to suppress events if you press the button too fast (hence why I made this app as an alternative to double tap). But, while testing, you may find yourself pressing too fast. Make sure when you are testing that you give several seconds after turning the switch on or off before testing the toggle. Think of it like this: this app makes the on/off buttons toggles when the switch is at a “rest” stare, of sorts. The switch needs a few seconds after being turned off/on before it returns back to a “rest” state. I don’t know if this is your issue, but its something you want to rule out.

Finally, this app only works for PHYSICAL button presses, so make sure you aren’t trying to use it with virtual presses through the app.

Super, when you make more changes, can you also add the single instance manager code? I can see lots of instances being installed, so it would be nice to group them together. I already have 5 of them…


Thanks for replying. The Aeon switch shows on in the ST app, and turns on physically. If I press my light switch again (seconds later, I knew that part already) to toggle the command to off, the app says my light went off, but physically it is still on, and checking the “recently” tab shows an “on” command was sent, not off. It will not turn off at all. I tried several times, no toggle, just on commands.

However, it is now info only for you, as I have already ordered another GE receptacle. I have been waiting for an app like this. I had one similar to this for a Wemo light switch, which was long press for second action. But I am replacing that light switch with all GE ones for visual appearance / matching look. The GE receptacle I have now responded perfectly several times to Double Duty. It’s just in a different room.

Thanks again, and I look forward to future updates!

Absolutely. Very easy to implement and will be a nice addition. Thanks for providing the link.

That’s really odd behavior with the Aeon Switch. It’s like my app is working just fine, but somehow the command never gets sent back to the device to trigger the actual behavior. Sounds like an issue with the ST cloud or the device type, but if I come across anything I can do to address it, I will. I really don’t think it’s anything under my control though.

I hope to have some updates soon. I’m a full-time developer so working on this on a work computer is a HUGE no-no and I have a baby at home. I’m glad I at least got it to a point where it can be considered a “complete app” – now when I find the time I’ll just add the last few pieces of sugar. I appreciate your feedback and patience :slight_smile:

1 Like