Battery Operated 3 Toggle Switch for wallmount or table top use (SmartenIT ZBWS3B), Long Install FAQ

dth_remotes

(bakdeniz) #101

Hi there. I’ve used this guide to pair a IKEA Trådfri 5 button remote control. Unfortunately without luck.

ST can recognize the remote as a THING as it should. I managed to complete all steps in the guide (with ST v2 hub).

Anyone tried something similar or have a clue about what could go wrong?


#102

Two completely different devices. It probably needs a custom device handler just for that device. Start a new thread with that device name in the title and I’m sure there will be people who will be glad to help you with it.


(bakdeniz) #103

Thanks. I will do :slight_smile:


(Joel) #104

i’ve got this device type working with one of these switches - however doe sit work with two? I’ve set up a second and done the virtual switch to actual switch but only my original switch works.


(DavidK) #105

Does anyone know if this device reports battery?

I have one that I have been using for a long time and have not replaced the battery.

The device type does not have battery status.

Does anyone know if the physical device reports battery status?


(Eric) #106

annoying, isn’t it. $50 bucks for a device that does not report status. The only convenient way I have to monitor, is the walk-test and/or smart-app “Simple Device Viewer”


(Joel) #107

No batrery status on mine

It seems no one is running more than one of these.


(Joel) #108

have been mucking around more and cannot get a second one going - which seems odd. any advice would be appreciated.


#109

joel,

I received 2 of these switches yesterday. Both are set up and activating 3 sets of different lights. I set each one up using the exact steps outlined by JDRoberts except for their names and the fact that SmartThings found the device as a “Thing” in the initial add/search app window (on Android). I set them up one right after the other.

One runs 3 lights in my kitchen activating 3210-L’s and the other activates 3 Cree connected bulbs in my office. They act as 2 completely independent 3 button switches.

Thanks to everyone on the forum especially those taking the time to write custom handlers and these types of walk-thrus, and who take the time to troubleshoot all the devices we get to play with. You make this community an amazing place and we couldn’t do it without you.

Sean


(Gilbert Chan) #110

I made some modifications from some shared code from the minimote.

/**
 *  3 button ZigBee switch ZBWS3  
 *
 *  Copyright 2014 John.Rucker@Solar-Current.com
 *
 *  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.
 *
 */
metadata {
    definition (name: "3 Button Controller (ZBWS3) with num of buttons", namespace: "thegilbertchan", author: "Gilbert Chan") {
        capability "Button"
        capability "Configuration"
                
        attribute "button2","ENUM",["released","pressed"]
        attribute "button3","ENUM",["released","pressed"]        

        fingerprint endpointId: "03", profileId: "0104", deviceId: "0000", deviceVersion: "00", inClusters: "03 0000 0003 0007", outClusters: "01 0006"
    
    }

    // simulator metadata
    simulator {
    }

    // UI tile definitions
    tiles {
        
        standardTile("button1", "device.button", width: 1, height: 1) {
            state("released", label:'${name}', icon:"st.button.button.released", backgroundColor:"#ffa81e")
            state("pressed", label:'${name}', icon:"st.button.button.pressed", backgroundColor:"#79b821")
        }
        
        standardTile("button2", "device.button2", width: 1, height: 1) {
            state("released", label:'${name}', icon:"st.button.button.released", backgroundColor:"#ffa81e")
            state("pressed", label:'${name}', icon:"st.button.button.pressed", backgroundColor:"#79b821")
        }        

        standardTile("button3", "device.button3", width: 1, height: 1) {
            state("released", label:'${name}', icon:"st.button.button.released", backgroundColor:"#ffa81e")
            state("pressed", label:'${name}', icon:"st.button.button.pressed", backgroundColor:"#79b821")
        }
        
    main (["button3", "button2", "button1"])
    details (["button3", "button2", "button1"])
    }
}

// Parse incoming device messages to generate events
def parse(String description) {
    log.debug "Parse description $description"
    def name = null
    def value = null              
    if (description?.startsWith("catchall: 0104 0006 01")) {
        name = "1"
        def currentST = device.currentState("button")?.value
        log.info "Button 1 pushed, current state = $currentST"

        if (currentST == "pressed"){
            log.trace "Changed to released"
            value = "released"
        } 
        else {
            log.trace "Changed to pressed"
            value = "pressed"
        }           
            
    } else if (description?.startsWith("catchall: 0104 0006 02")) {
        name = "2"
        def currentST = device.currentState("button2")?.value
        log.info "Button 2 pushed, current state = $currentST"        
        if (currentST == "pressed"){
            log.trace "Changed to released"
            value = "released"
        } 
        else {
            log.trace "Changed to pressed"
            value = "pressed"
        }   

    } else if (description?.startsWith("catchall: 0104 0006 03")) {
        name = "3"
        def currentST = device.currentState("button3")?.value
        log.info "Button 3 pushed, current state = $currentST"        
        if (currentST == "pressed"){
            log.trace "Changed to released"
            value = "released"
        } 
        else {
            log.trace "Changed to pressed"
            value = "pressed"
        }   
    } 
    def result = createEvent(name: "button", value: "pushed", data: [buttonNumber: name], descriptionText: "$device.displayName button $name was pushed", isStateChange: true)
    log.debug "Parse returned ${result?.descriptionText}"




    return result
}


def parseDescriptionAsMap(description) {
    (description - "read attr - ").split(",").inject([:]) { map, param ->
        def nameAndValue = param.split(":")
        map += [(nameAndValue[0].trim()):nameAndValue[1].trim()]
    }
}

private getFPoint(String FPointHex){                   // Parsh out hex string from Value: 4089999a
    Long i = Long.parseLong(FPointHex, 16)         // Convert Hex String to Long
    Float f = Float.intBitsToFloat(i.intValue())   // Convert IEEE 754 Single-Precison floating point
    log.debug "converted floating point value: ${f}"
    def result = f

    return result
}


// Commands to device

def configure() { 
    log.debug "Binding SEP 0x01 DEP 0x01 Cluster 0x0006 On/Off cluster to hub"         
        def configCmds = [

        "zdo bind 0x${device.deviceNetworkId} 0x01 0x01 0x0006 {${device.zigbeeId}} {}", "delay 500",
        "zdo bind 0x${device.deviceNetworkId} 0x02 0x01 0x0006 {${device.zigbeeId}} {}", "delay 500",        
        "zdo bind 0x${device.deviceNetworkId} 0x03 0x01 0x0006 {${device.zigbeeId}} {}", "delay 1500",        
        ]
    log.info "Sending ZigBee Bind commands to 3 Button Switch"
    return configCmds
    }
def installed() {
    initialize()
    createChildDevices()
}

def updated() {
    initialize()
    if (!childDevices) {
        createChildDevices()
    }
    else if (device.label != state.oldLabel) {
        childDevices.each {
            def segs = it.deviceNetworkId.split("/")
            def newLabel = "${device.displayName} button ${segs[-1]}"
            it.setLabel(newLabel)
        }
        state.oldLabel = device.label
    }
}


def initialize() {
    sendEvent(name: "numberOfButtons", value: 3)
    sendEvent(name: "DeviceWatch-Enroll", value: JsonOutput.toJson([protocol: "zigbee", scheme:"untracked"]), displayed: false)
}

private void createChildDevices() {
    state.oldLabel = device.label
    for (i in 1..4) {
        addChildDevice("Child Button", "${device.deviceNetworkId}/${i}", null,
                [completedSetup: true, label: "${device.displayName} button ${i}",
                 isComponent: true, componentName: "button$i", componentLabel: "Button $i"])
    }
}

(Ron ) #111

Hi JD, I was following your instructions to make this device work, but my dashboard, or page display when Im logged onto my hub doesnt have a link titled “my device types”. (instruction step # 14). am I doing something wrong? Thanks for your info!!


#112

See the custom code FAQ: the terms have changed multiple times over the years:

They are now called “device handlers.” :sunglasses:


(Ron ) #113

when I click on my device handlers, it says I have none. I can only see the custom handler if I follow location and then click on the various devices and handlers there. I can see the custom handler there but there is no options that I can see anything that says device to test with.


(Ron ) #114


(Ron ) #115

JD, I think I figured it out, it is now listed under the simulation button. thank you again for posting these instructions and your patience with us “newbies”!!


(Bob) #116

Will this work with the new SmartThings hub, ver 3?


(Eric) #117

it’s a custom device handler, not by samsung, so probably never.


(Bob) #118

So does that mean the custom device handler does Not work with the latest SmartThings hub?


#119

At the Moment YES.


#120

It should work with the new hub, but not with the new app. You would have to install the classic app to make it work.

A lot of people are using both apps for just this reason. But you do run the risk that once the classic app goes away, the device might no longer work. :disappointed_relieved: