Dual switch to control lighting module AND light switch?


(Sean Vreeland) #1

So I have a lamp that is controlled by a GE lighting module, so I’ve found it’s annoying to control the lamp ONLY from the app since there is no button switch in my wall for it. So, I’m looking for an in-wall switch to control it? Does such a thing exist? Also, the lamp is right next to my kitchen lights which I plan to switch over to a GE light switch. So, wondering if there is such a things an in-wall multi switch that can control other z-wave devices (such as my lamp) as well as the built-in lighting fixtures. Almost something light this:

http://www.smarthomeusa.com/ShopByManufacturer/Leviton/Item/VRCS2-MR/

But with dimmers as well.


(Tim Slagle) #2

This should do what you need it to. It will copy a dim level a any switch to any number of other switches you specify.

// Automatically generated. Make future change here.
definition(
    name: "Dim With Me",
    namespace: "",
    author: "Tim Slagle",
    description: "App that will match dim for multiple lights to a master dim switch.",
    category: "Convenience",
    iconUrl: "http://icons.iconarchive.com/icons/pixelkit/swanky-outlines/128/15-Light-Bulb-icon.png",
    iconX2Url: "http://icons.iconarchive.com/icons/pixelkit/swanky-outlines/128/15-Light-Bulb-icon.png")

preferences {
    section("When This...") { //use this program with a virtual dimmer
        input "masters", "capability.switchLevel", 
            multiple: false, 
            title: "Master Dimmer Switch...", 
            required: true
    }

    section("Then these regular switches follow...") {
        input "slaves2", "capability.switch", 
            multiple: true, 
            title: "Slave Switch(es) Too...", 
            required: false
    }
    
    section("Then these dimmers follow...") {
        input "slaves", "capability.switchLevel", 
            multiple: true, 
            title: "Slave Dimmer(s) Switch Too...", 
            required: true
    }
}

def installed()
{
    subscribe(masters, "switch.on", switchOnHandler)
    subscribe(masters, "switch.off", switchOffHandler)
    subscribe(masters, "switch.setLevel", switchSetLevelHandler)
}

def updated()
{
    unsubscribe()
    subscribe(masters, "switch.on", switchOnHandler)
    subscribe(masters, "switch.off", switchOffHandler)
    subscribe(masters, "switch.setLevel", switchSetLevelHandler)
}

def switchSetLevelHandler(evt)
{    
    def level = evt.value.toFloat()
    level = level.toInteger()
    log.info "switchSetLevelHandler Event: ${level}"
    slaves?.setLevel(level)
}

def switchOffHandler(evt) {
    log.info "switchoffHandler Event: ${evt.value}"
    slaves?.off()
    slaves2?.off()
}

def switchOnHandler(evt) {
    log.info "switchOnHandler Event: ${evt.value}"
    def dimmerValue = masters.latestValue("level")
    slaves?.on()
    slaves2?.on()
}

(Sean Vreeland) #3

Tim, thanks for this, I’m somewhat of a noobie creating/integrating custom code within ST. . .how do I use this?


(Tim Slagle) #4

You need to go to the IDE and then go to the smart app section and then click create new smartapp in the top right. Then just put nonsense in for the required fields as this will over write everything anyways and hit create. After that paste the code into the box hit save… then publish>to me. And it will be in your app to install in the “my Apps” section of the smart installer.

you may need to sign up for an IDE account, but thats simple :smile:


(Sean Vreeland) #5

Awesome! Thank you Sir!


(Blake Westerdahl) #6

If it’s not a dimmer, there is already a SmartApp in the convenience section called “The Big Switch” that will do this as well. I use it for my Christmas lights: I have a switch that controls the lights on along my roof line and then I use the Big Switch to also turn on an outdoor module for my yard display.


(Sean Vreeland) #7

Great, so that takes care of the app. . .but a switch like this work?


(Blake Westerdahl) #8

I don’t personally have one so I can’t say with 100% certainty. The one you linked to may be okay. It’s a zone controller so it is designed to directly control other z-wave devices.

Be careful as there is a nearly identical scene controller version referenced in this thread:

This one does not work with SmartThings


(Tim Slagle) #9

you’ll have to get a leviton zwave or ge/jasco dimmer. take a look at the smartthings store to see what im talking about.

I recomend the leviton ones. :smile:


(Sean Vreeland) #10

Yeah, I already have a couple of those. But, i was trying to get a couple of the dimmers in one switch.


(tduffy) #11

Unfortunately, these don’t work (yet). I have three of them in my house, and right I’m having to keep running an old Vera Lite box to use them.

There is a lot of demand for them on the forums though, so hopefully they are on the ST plan for some point in the future. :smile: