Help with new DH for Aust 3 Gang light switch - catchall included

@simic

Need help on creating virtual switch for switch#2 and switch#3?

I did use VS for devices running on SmartLife app in the past but bit confused to set one (VS) for switch on ST :slight_smile:

Thanks.

Sadly nope. No luck. Feeling rather frustrated.

The problem is this: since ST cant decipher the incoming turn off/on from the device (it can send to the device OK), it doesnt know which of the 3 switches has been turned on. When you create virtual switches (which are kept in sync with the 3 physical switches), ST will then turn the physical switches on/off, then off/on, then on/off, then off/on…because it is not receiving the on/off signal from the physical switch.

Basically, I dont think these switches will work with ST until we can decipher the on/off event from the physical switch…as they light up like a Christmas tree - this is ST trying to keep the actual light in sync with the virtual light.

The hope is that zigbee v3 will fix this. Not sure how these switches will get updated to v.3 though. I’ve reached out to Kevin (the retailed of 3asmarthome.com.au) and he was unable to help, although he did give it a good go.

Unfortunately, zigbee 3.0 will not fix this, as the issue is the way that smartthings has chosen to handle multi endpoint zigbee devices. They could use the same approach for zigbee 3.0, there’s no way to tell. The issue is in the smartthings abstraction layer which is up above the actual zigbee commands, So that’s where it has to be fixed.

Managed to bind the 3 physical switches with the custom DH to 3 virtual switches using a 3-Gang Wall Switch Binder by @simic

Hi folks, managed to get it all going for 2 gang switch, it will auto update smartthings as well, will post the device handler soon

2 Gang switch Handler that updates from the device here,

Let me know of any issues…

Wow, thanks for this. I can confirm that it also works for the 3 gang switch (only 2 of the switches obviously). I’ll get to work now on a 3 gang version of this. Appreciate your work in this.

I’ve got 2 of my 3 endpoints working with ST and therefore Google Home. Cant seem to get the first endpoint working. I’m using the smartapp that you linked earlier. The kudled and Hui smartapps dont seem to work with the new DH.

Great work… Typo in the following code.

tileAttribute (“device.switch”, key: “PRIMARY_CONTROL”) {

should be

tileAttribute (“device.switch1” key: “PRIMARY_CONTROL”) {

Now works as expected.

All I need to do now it to figure out how to create virtual switches so the switch1 and switch2 can be controlled individually… (so I can use with action tiles)

Thanks, I’ve got all 3 endpoints working with ST and Google Home. I used your DH and modified it for 3 end points. Then I created 3 virtual switches in IDE and linked them to the 3 endpoints using this smart app, which has the right codes in it for the physical light switch. It took a bit of fiddling around, but glad I finally got it working.

SmartApp
/**

  • HUI Wall Switch Binder original from Andy’s SmartApp - shamlessly borrowed by the netsheriff and modded.

  • This app allows you to bind 3 Virtual On/Off Tiles to the 3 switchable outlets.

  • Author: simic with mod by netsheriff

  • Date: 05/09/2017
    */
    // Automatically generated. Make future change here.
    definition(
    name: “George’s Wall Switch Binder 1.0 for 3 Gang Switch”,
    namespace: “”,
    author: “George Castanza”,
    description: “This app allows you to bind 3 Virtual On/Off Tiles to the 3 switchable outlets.”,
    category: “Convenience”,
    iconUrl: “https://s3.amazonaws.com/smartapp-icons/Convenience/Cat-Convenience.png”,
    iconX2Url: “https://s3.amazonaws.com/smartapp-icons/Convenience/Cat-Convenience%402x.png”)
    preferences {
    section(“Which HUI Wall Switch is used?”){
    input “strip”, “capability.Switch”
    }
    section(“Select a Virtual Switch to bind to Outlet 1”){
    input “switch1”, “capability.Switch”
    }
    section(“Select a Virtual Switch to bind to Outlet 2”){
    input “switch2”, “capability.Switch”
    }
    section(“Select a Virtual Switch to bind to Outlet 3”){
    input “switch3”, “capability.Switch”
    }
    }
    def installed() {
    log.debug “Installed with settings: ${settings}”
    subscribe(strip, “switch.on”, MainSwitchOnOneHandler)
    subscribe(strip, “switch.off”, MainSwitchOffOneHandler)
    subscribe(strip, “switch1.on”, MainSwitchOnOneHandler)
    subscribe(strip, “switch1.off”, MainSwitchOffOneHandler)
    subscribe(strip, “switch2.on”, MainSwitchOnTwoHandler)
    subscribe(strip, “switch2.off”, MainSwitchOffTwoHandler)
    subscribe(strip, “switch3.on”, MainSwitchOnThreeHandler)
    subscribe(strip, “switch3.off”, MainSwitchOffThreeHandler)

    subscribe(switch1, “switch.on”, switchOnOneHandler)
    subscribe(switch2, “switch.on”, switchOnTwoHandler)
    subscribe(switch3, “switch.on”, switchOnThreeHandler)
    subscribe(switch1, “switch.off”, switchOffOneHandler)
    subscribe(switch2, “switch.off”, switchOffTwoHandler)
    subscribe(switch3, “switch.off”, switchOffThreeHandler)
    }
    def updated(settings) {
    log.debug “Updated with settings: ${settings}”
    unsubscribe()
    subscribe(strip, “switch.on”, MainSwitchOnOneHandler)
    subscribe(strip, “switch.off”, MainSwitchOffOneHandler)

    subscribe(strip, “switch1.on”, MainSwitchOnOneHandler)
    subscribe(strip, “switch1.off”, MainSwitchOffOneHandler)

    subscribe(strip, “switch2.on”, MainSwitchOnTwoHandler)
    subscribe(strip, “switch2.off”, MainSwitchOffTwoHandler)

    subscribe(strip, “switch3.on”, MainSwitchOnThreeHandler)
    subscribe(strip, “switch3.off”, MainSwitchOffThreeHandler)

    subscribe(switch1, “switch.on”, switchOnOneHandler)
    subscribe(switch2, “switch.on”, switchOnTwoHandler)
    subscribe(switch3, “switch.on”, switchOnThreeHandler)

    subscribe(switch1, “switch.off”, switchOffOneHandler)
    subscribe(switch2, “switch.off”, switchOffTwoHandler)
    subscribe(switch3, “switch.off”, switchOffThreeHandler)
    }
    def MainSwitchOnOneHandler(evt) {
    log.debug “switch on”
    switch1.on()
    }
    def MainSwitchOffOneHandler(evt) {
    log.debug “switch off”
    switch1.off()
    }
    def MainSwitchOnTwoHandler(evt) {
    log.debug “switch on”
    switch2.on()
    }
    def MainSwitchOffTwoHandler(evt) {
    log.debug “switch off”
    switch2.off()
    }
    def MainSwitchOnThreeHandler(evt) {
    log.debug “switch on”
    switch3.on()
    }
    def MainSwitchOffThreeHandler(evt) {
    log.debug “switch off”
    switch3.off()
    }
    def switchOnOneHandler(evt) {
    log.debug “switch on1”
    strip.on()
    }
    def switchOnTwoHandler(evt) {
    log.debug “switch on2”
    strip.on2()
    }
    def switchOnThreeHandler(evt) {
    log.debug “switch on3”
    strip.on3()
    }
    def switchOffOneHandler(evt) {
    log.debug “switch off1”
    strip.off()
    }
    def switchOffTwoHandler(evt) {
    log.debug “switch off2”
    strip.off2()
    }
    def switchOffThreeHandler(evt) {
    log.debug “switch off3”
    strip.off3()
    }

Thanks for that, works fine when you add a 3rd gang for a 3 gang switch.

I wonder how much more bandwidth on the network it sucks by constantly monitoring the switch state rather than just reporting the switch state when it changes?

Seems to be the only work around at the moment until Samsung fix it to handle multi endpoints.

Hi All

Any chance someone could post the Dh and Smart App that they have working for this 3 Gang Switch.

I have attempted to do this form what I think is required but its not working for me. I suspect I have missed a step of pasted it incorrectly. Sadly I dont know enough to understand why/where the code is wrong.

Thanks in advance.

Mike

Install the Dh and smartapp. Then create 3 virtual switches in the IDE. Then link them to the three endpoints in the smartapp. Should be good to go.

Here is the DH

/**
*

  • Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except
  • in compliance with the License. You may obtain a copy of the License at:
  •  http://www.apache.org/licenses/LICENSE-2.0
    
  • Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
  • on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License
  • for the specific language governing permissions and limitations under the License.
  • Based on on original by Lazcad / RaveTam
  • 01/2017 corrected the temperature reading
  • 02/2017 added heartbeat to monitor connectivity health of outlet
  • 02/2017 added multiattribute tile
  • 03/2018 Marwan - Fixed status updates comming from device
    */

metadata {
definition (name: “ZigBee Gang 3 Switch - GeorgeCastanza V1”, namespace: “smartthings”, author: “smartthings”) {
capability “Actuator”
capability “Configuration”
capability “Refresh”
capability “Switch”

    capability "Temperature Measurement"
    
    attribute "lastCheckin", "string"
    attribute "switch0", "string"
    attribute "switch", "string"
	attribute "switch2", "string"
    attribute "switch3", "string"
    command "on0"
command "off0"
command "on"
command "off"
command "on2"
command "off2"
command "on3"
command "off3"
}

// simulator metadata
simulator {
    // status messages
    status "on": "on/off: 1"
    status "off": "on/off: 0"

    // reply messages
    reply "zcl on-off on": "on/off: 1"
    reply "zcl on-off off": "on/off: 0"
    
   
}

tiles(scale: 2) {
 multiAttributeTile(name:"switch0", type: "device.switch", width: 6, height: 4, canChangeIcon: true){
        tileAttribute ("device.switch", key: "PRIMARY_CONTROL") { 
            attributeState "on", label:'switch0', action:"off0", icon:"st.switches.light.on", backgroundColor:"#00a0dc", nextState:"turningOff"
            attributeState "off", label:'switch0', action:"on0", icon:"st.switches.light.off", backgroundColor:"#ffffff", nextState:"turningOn"
            attributeState "turningOn", label:'switch0', action:"off0", icon:"st.switches.light.on", backgroundColor:"#00a0dc", nextState:"turningOff"
            attributeState "turningOff", label:'switch0', action:"on0", icon:"st.switches.light.off", backgroundColor:"#ffffff", nextState:"turningOn"
        }
       	tileAttribute("device.lastCheckin", key: "SECONDARY_CONTROL") {
			attributeState("default", label:'Last Update: ${currentValue}',icon: "st.Health & Wellness.health9")
	   	}
    }
    multiAttributeTile(name:"switch", type: "device.switch", width: 6, height: 4, canChangeIcon: true){
        tileAttribute ("device.switch1", key: "PRIMARY_CONTROL") { 
            attributeState "on", label:'switch', action:"off", icon:"st.switches.light.on", backgroundColor:"#00a0dc", nextState:"turningOff"
            attributeState "off", label:'switch', action:"on", icon:"st.switches.light.off", backgroundColor:"#ffffff", nextState:"turningOn"
            attributeState "turningOn", label:'switch', action:"off", icon:"st.switches.light.on", backgroundColor:"#00a0dc", nextState:"turningOff"
            attributeState "turningOff", label:'switch', action:"on", icon:"st.switches.light.off", backgroundColor:"#ffffff", nextState:"turningOn"
        }
       	tileAttribute("device.lastCheckin", key: "SECONDARY_CONTROL") {
			attributeState("default", label:'Last Update: ${currentValue}',icon: "st.Health & Wellness.health9")
	   	}
    }
    
   
    multiAttributeTile(name:"switch2", type: "device.switch", width: 6, height: 4, canChangeIcon: true){
        tileAttribute ("device.switch2", key: "PRIMARY_CONTROL") { 
            attributeState "on", label:'switch2', action:"off2", icon:"st.switches.light.on", backgroundColor:"#00a0dc", nextState:"turningOff"
            attributeState "off", label:'switch2', action:"on2", icon:"st.switches.light.off", backgroundColor:"#ffffff", nextState:"turningOn"
            attributeState "turningOn", label:'switch2', action:"off2", icon:"st.switches.light.on", backgroundColor:"#00a0dc", nextState:"turningOff"
            attributeState "turningOff", label:'switch2', action:"on2", icon:"st.switches.light.off", backgroundColor:"#ffffff", nextState:"turningOn"
        }
       	tileAttribute("device.lastCheckin", key: "SECONDARY_CONTROL") {
			attributeState("default", label:'Last Update: ${currentValue}',icon: "st.Health & Wellness.health9")
	   	}
    }
    multiAttributeTile(name:"switch3", type: "device.switch", width: 6, height: 4, canChangeIcon: true){
        tileAttribute ("device.switch3", key: "PRIMARY_CONTROL") { 
            attributeState "on", label:'switch3', action:"off3", icon:"st.switches.light.on", backgroundColor:"#00a0dc", nextState:"turningOff"
            attributeState "off", label:'switch3', action:"on3", icon:"st.switches.light.off", backgroundColor:"#ffffff", nextState:"turningOn"
            attributeState "turningOn", label:'switch3', action:"off3", icon:"st.switches.light.on", backgroundColor:"#00a0dc", nextState:"turningOff"
            attributeState "turningOff", label:'switch3', action:"on3", icon:"st.switches.light.off", backgroundColor:"#ffffff", nextState:"turningOn"
        }
       	tileAttribute("device.lastCheckin", key: "SECONDARY_CONTROL") {
			attributeState("default", label:'Last Update: ${currentValue}',icon: "st.Health & Wellness.health9")
	   	}
    }


    standardTile("refresh", "device.refresh", inactiveLabel: false, decoration: "flat", width: 2, height: 2) {
        state "default", label:"", action:"refresh.refresh", icon:"st.secondary.refresh"
        }
   main(["switch0"])
    details(["switch","switch2","switch3","refresh"])
}

}

// Parse incoming device messages to generate events

def parse(String description) {
log.debug “Parsing ‘${description}’”

def value = zigbee.parse(description)?.text
log.debug “Parse: $value”
Map map = [:]

if (description?.startsWith(‘catchall:’)) {
map = parseCatchAllMessage(description)
}
else if (description?.startsWith(‘read attr -’)) {
map = parseReportAttributeMessage(description)
}
else if (description?.startsWith('on/off: ')){
log.debug “onoff”
def refreshCmds = zigbee.readAttribute(0x0006, 0x0000, [destEndpoint: 0x10]) +
zigbee.readAttribute(0x0006, 0x0000, [destEndpoint: 0x11]) +
zigbee.readAttribute(0x0006, 0x0000, [destEndpoint: 0x12])

return refreshCmds.collect { new physicalgraph.device.HubAction(it) }
//def resultMap = zigbee.getKnownDescription(description)
//log.debug “${resultMap}”

    //map = parseCustomMessage(description) 
}

log.debug "Parse returned $map"
//  send event for heartbeat    
def now = new Date()

sendEvent(name: "lastCheckin", value: now)

def results = map ? createEvent(map) : null
return results;

}

private Map parseCatchAllMessage(String description) {
Map resultMap = [:]
def cluster = zigbee.parse(description)
log.debug cluster

if (cluster.clusterId == 0x0006 && cluster.command == 0x01){
	if (cluster.sourceEndpoint == 0x10)
    {
    log.debug "Its Switch one"
	def onoff = cluster.data[-1]
    if (onoff == 1)
    	resultMap = createEvent(name: "switch", value: "on")
    else if (onoff == 0)
        resultMap = createEvent(name: "switch", value: "off")
        }
        else if (cluster.sourceEndpoint == 0x11)
        {
        log.debug "Its Switch two"
	def onoff = cluster.data[-1]
    if (onoff == 1)
    	resultMap = createEvent(name: "switch2", value: "on")
    else if (onoff == 0)
        resultMap = createEvent(name: "switch2", value: "off")
        }
         else if (cluster.sourceEndpoint == 0x12)
        {
        log.debug "Its Switch three"
	def onoff = cluster.data[-1]
    if (onoff == 1)
    	resultMap = createEvent(name: "switch3", value: "on")
    else if (onoff == 0)
        resultMap = createEvent(name: "switch3", value: "off")
        }
     }
    
return resultMap

}

private Map parseReportAttributeMessage(String description) {
Map descMap = (description - “read attr - “).split(”,”).inject([:]) { map, param ->
def nameAndValue = param.split(":")
map += [(nameAndValue[0].trim()):nameAndValue[1].trim()]
}
//log.debug “Desc Map: $descMap”

Map resultMap = [:]

if (descMap.cluster == "0001" && descMap.attrId == "0020") {
	resultMap = getBatteryResult(convertHexToInt(descMap.value / 2))
}

else if (descMap.cluster == "0008" && descMap.attrId == "0000") {
	resultMap = createEvent(name: "switch", value: "off")
} 
return resultMap

}

def off() {
log.debug “off()”
sendEvent(name: “switch”, value: “off”)
“st cmd 0x${device.deviceNetworkId} 0x10 0x0006 0x0 {}”
}

def on() {
log.debug “on()”
sendEvent(name: “switch”, value: “on”)
“st cmd 0x${device.deviceNetworkId} 0x10 0x0006 0x1 {}”
}
def off2() {
log.debug “off2()”
sendEvent(name: “switch2”, value: “off”)
“st cmd 0x${device.deviceNetworkId} 0x11 0x0006 0x0 {}”
}

def on2() {
log.debug “on2()”
sendEvent(name: “switch2”, value: “on”)
“st cmd 0x${device.deviceNetworkId} 0x11 0x0006 0x1 {}”
}

def off3() {
log.debug “off3()”
sendEvent(name: “switch3”, value: “off”)
“st cmd 0x${device.deviceNetworkId} 0x12 0x0006 0x0 {}”
}

def on3() {
log.debug “on3()”
sendEvent(name: “switch3”, value: “on”)
“st cmd 0x${device.deviceNetworkId} 0x12 0x0006 0x1 {}”
}

def off0() {
log.debug “off0()”
sendEvent(name: “switch0”, value: “off”)
“st cmd 0x${device.deviceNetworkId} 0xFF 0x0006 0x0 {}”
// “st cmd 0x${device.deviceNetworkId} 0x11 0x0006 0x0 {}”
}

def on0() {
log.debug “on0()”
sendEvent(name: “switch0”, value: “on”)
“st cmd 0x${device.deviceNetworkId} 0xFF 0x0006 0x1 {}”
// “st cmd 0x${device.deviceNetworkId} 0x11 0x0006 0x1 {}”
}
def refresh() {
log.debug “refreshing”
[
“st rattr 0x${device.deviceNetworkId} 0x10 0x0006 0x0”, “delay 1000”,
// “st rattr 0x${device.deviceNetworkId} 0x10 0x0006 0x0”, “delay 250”,

//   "st rattr 0x${device.deviceNetworkId} 0x10 0x0001 0x0", "delay 250",
//    "st rattr 0x${device.deviceNetworkId} 0x10 0x0000 0x0",
    "st rattr 0x${device.deviceNetworkId} 0x11 0x0006 0x0", "delay 1000",
      "st rattr 0x${device.deviceNetworkId} 0x12 0x0006 0x0", "delay 1000",

// “st rattr 0x${device.deviceNetworkId} 0x11 0x0006 0x0”, “delay 250”,

//    "st rattr 0x${device.deviceNetworkId} 0x11 0x0001 0x0", "delay 250",
//    "st rattr 0x${device.deviceNetworkId} 0x11 0x0000 0x0",
]

}

private Map parseCustomMessage(String description) {
def result
if (description?.startsWith('on/off: ')) {
if (description == ‘on/off: 0’)
result = createEvent(name: “switch”, value: “off”)
else if (description == ‘on/off: 1’)
result = createEvent(name: “switch”, value: “on”)
}

return result

}

private Integer convertHexToInt(hex) {
Integer.parseInt(hex,16)
}

def off1() {
log.debug “off()”
sendEvent(name: “switch2”, value: “off”)

"st cmd 0x${device.deviceNetworkId} 0x10 0x0006 0x0 {}" 

}

def on1() {
log.debug “on()”
sendEvent(name: “switch2”, value: “on”)

"st cmd 0x${device.deviceNetworkId} 0x10 0x0006 0x1 {}" 

}

end here

Here is the smartapp.

/**

  • HUI Wall Switch Binder original from Andy’s SmartApp - shamlessly borrowed by the netsheriff and modded.

  • This app allows you to bind 3 Virtual On/Off Tiles to the 3 switchable outlets.

  • Author: simic with mod by netsheriff

  • Date: 05/09/2017
    */
    // Automatically generated. Make future change here.
    definition(
    name: “George’s Wall Switch Binder 1.0 for 3 Gang Switch”,
    namespace: “”,
    author: “George Castanza”,
    description: “This app allows you to bind 3 Virtual On/Off Tiles to the 3 switchable outlets.”,
    category: “Convenience”,
    iconUrl: “https://s3.amazonaws.com/smartapp-icons/Convenience/Cat-Convenience.png”,
    iconX2Url: “https://s3.amazonaws.com/smartapp-icons/Convenience/Cat-Convenience%402x.png”)
    preferences {
    section(“Which HUI Wall Switch is used?”){
    input “strip”, “capability.Switch”
    }
    section(“Select a Virtual Switch to bind to Outlet 1”){
    input “switch1”, “capability.Switch”
    }
    section(“Select a Virtual Switch to bind to Outlet 2”){
    input “switch2”, “capability.Switch”
    }
    section(“Select a Virtual Switch to bind to Outlet 3”){
    input “switch3”, “capability.Switch”
    }
    }
    def installed() {
    log.debug “Installed with settings: ${settings}”
    subscribe(strip, “switch.on”, MainSwitchOnOneHandler)
    subscribe(strip, “switch.off”, MainSwitchOffOneHandler)
    subscribe(strip, “switch1.on”, MainSwitchOnOneHandler)
    subscribe(strip, “switch1.off”, MainSwitchOffOneHandler)
    subscribe(strip, “switch2.on”, MainSwitchOnTwoHandler)
    subscribe(strip, “switch2.off”, MainSwitchOffTwoHandler)
    subscribe(strip, “switch3.on”, MainSwitchOnThreeHandler)
    subscribe(strip, “switch3.off”, MainSwitchOffThreeHandler)

    subscribe(switch1, “switch.on”, switchOnOneHandler)
    subscribe(switch2, “switch.on”, switchOnTwoHandler)
    subscribe(switch3, “switch.on”, switchOnThreeHandler)
    subscribe(switch1, “switch.off”, switchOffOneHandler)
    subscribe(switch2, “switch.off”, switchOffTwoHandler)
    subscribe(switch3, “switch.off”, switchOffThreeHandler)
    }
    def updated(settings) {
    log.debug “Updated with settings: ${settings}”
    unsubscribe()
    subscribe(strip, “switch.on”, MainSwitchOnOneHandler)
    subscribe(strip, “switch.off”, MainSwitchOffOneHandler)

    subscribe(strip, “switch1.on”, MainSwitchOnOneHandler)
    subscribe(strip, “switch1.off”, MainSwitchOffOneHandler)

    subscribe(strip, “switch2.on”, MainSwitchOnTwoHandler)
    subscribe(strip, “switch2.off”, MainSwitchOffTwoHandler)

    subscribe(strip, “switch3.on”, MainSwitchOnThreeHandler)
    subscribe(strip, “switch3.off”, MainSwitchOffThreeHandler)

    subscribe(switch1, “switch.on”, switchOnOneHandler)
    subscribe(switch2, “switch.on”, switchOnTwoHandler)
    subscribe(switch3, “switch.on”, switchOnThreeHandler)

    subscribe(switch1, “switch.off”, switchOffOneHandler)
    subscribe(switch2, “switch.off”, switchOffTwoHandler)
    subscribe(switch3, “switch.off”, switchOffThreeHandler)
    }
    def MainSwitchOnOneHandler(evt) {
    log.debug “switch on”
    switch1.on()
    }
    def MainSwitchOffOneHandler(evt) {
    log.debug “switch off”
    switch1.off()
    }
    def MainSwitchOnTwoHandler(evt) {
    log.debug “switch on”
    switch2.on()
    }
    def MainSwitchOffTwoHandler(evt) {
    log.debug “switch off”
    switch2.off()
    }
    def MainSwitchOnThreeHandler(evt) {
    log.debug “switch on”
    switch3.on()
    }
    def MainSwitchOffThreeHandler(evt) {
    log.debug “switch off”
    switch3.off()
    }
    def switchOnOneHandler(evt) {
    log.debug “switch on1”
    strip.on()
    }
    def switchOnTwoHandler(evt) {
    log.debug “switch on2”
    strip.on2()
    }
    def switchOnThreeHandler(evt) {
    log.debug “switch on3”
    strip.on3()
    }
    def switchOffOneHandler(evt) {
    log.debug “switch off1”
    strip.off()
    }
    def switchOffTwoHandler(evt) {
    log.debug “switch off2”
    strip.off2()
    }
    def switchOffThreeHandler(evt) {
    log.debug “switch off3”
    strip.off3()
    }

3 Gang DH

Try this. It wont let me upload .txt files. Link will go dead in a few days.

Here is the SmartApp and DTH in GitHub
Makes it easier to cut and past into Smartthings.

I prettied up the DTH a bit, so now you know which switch is which and also when they are turning on and off. Works with Alex and GH.

There is a small error in the DTH in that Switch1 light bulb icon stays on even when the switch is off. No biggie and will fix that when I get around to it.

HUI Wall Switch Binder 1.1 for 3 Gang Switch

HUI ZigBee Wall Switch 3 Gang V.3.0

Thanks all for your assistance.

I have these two loaded without error.

I am still having a challenge I must be installing or configuring them wrong. Could I get some guidance on how I should be setting these up.

I have assumed that I use the “HUI Wall Switch Binder 1.1 for 3 Gang Switch” as a smart app? If this is correct I dont really know what i should do next.

Mike

Yeah, you need to add both as code save and publish you can also test with the simulator.

Just the DTH will make the switch in phone app work in conjunction with physical switch.

Install the smart app will allow you to control the switch with Alexa/GH/ smart tiles.

To do this you need to create 3 simulated switches. https://youtu.be/ro2CisLBLjI and look here

Once you have made 3 simulated switches with network IDs and named them what you want the Echo/GH to say you then go to the Marketplace, SmartApps, +My Apps and load my Hui switch binder. In my Binder App choose the actual Hui switch (that you linked to my DH) for the switch, then for the 3 virtual switches choose the 3 Simulated Switches you just made in the order you want them in the 3 gang switch. Assign a name to it. Discover devices with Echo/GH and you should see your 3 simulated switches come up. You dont need to use the actual switch for voice control only the simulated switches. You only use the actual switch within the Smartthings App to control the 3 gangs with your phone. Now you can voice activate these 3 simulated switches the same as you can a std single smart light bulb.

1 Like

@netsheriff

Awesome thank you so much that works perfectly. :grinning:

Mike

Glad it worked for you. Gives that Hui 3 gang switch a whole lot more value being able to be properly controlled in Smartthings. :smile:

You can if you want make a 4th simulated switch and in the “what devices do you want to control?” tab put the 3 simulated switches you made above and call it ‘upstairs lights’ or some such thing. Do a discover with Alexa/GH and then you will have a switch that can turn all 3 gangs on or off at once.