SwannOne Key Fob Support (updated 2019 DTH in post #51)

Hi @ritchierich. I’ve seen those threads and this weekend I’ve tried again to rejoin the SwannOne Key Fob but it lost connection to the Hub after an hour. I also thought that after the Hub and ZigBee stack updates it would have a chance to work but it did not.
Currently I’m still using the ZigBee Insecure Join mode and I’m not planning to change it to the Secure Join mode until I’m sure witch devices will stop working. Anyway, my understanding is that the Secure mode will make it harder for the Key Fob to rejoin the network. Sorry :wink:

Darn! I returned my SwannOne key fob while I had a chance but was hoping to purchase it again if changes were made to better support it. Thank you for confirming the issue still persists. That is a huge bummer.

Is there any news on this 6 months later? I am looking for a FOB and am not interested in IRIS and I am having trouble obtaining the Securifi FOB.

Aeon has two zwave fobs that work fine with smartthings and are on the official compatibility list. They are available in both the US and the EU frequencies. They just cost more than the zigbee ones. Shop around, as prices vary a lot.

https://www.smartthings.com/compatible-products

I returned mine since I never got it to work, I will defer to @RudiP and @NHENRY to see if theirs are working now.

Just a quick update to this old thread as suggested by @JDRoberts in my original thread Using remote button to turn on/off switches and set mode (Swann One Key Fob Remote Control SWO-KEF1PA, and ST Hub V3)

I’ve recently acquired the Swann One Key Fob SWO-KEF1PA, and I’m using ST Hub V3. I made a slight modification to the DTH so the “add a routine” and the smartlighting app in Automation would let me pick which button is pressed.

Here is the updated code.

/**
 *  Swann One Key Fob
 *
 *  v:1.00 - 12/31/2015 - Initial Configuraton
 *   v:1.01 - 03/11/2019 - Added numberofButtons reporting
 *
 *  Copyright 2015 Rudimar Prunzel
 *
 *  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: "Swann One Key Fob", namespace: "RudiP", author: "Rudimar Prunzel") {
		capability "Button"
		capability "Configuration"

        fingerprint profileId: "0104", deviceId: "0401", inClusters: "0000,0003,0500", outClusters: "0003,0501"
    }

    tiles {
	    standardTile("button", "device.button", width: 2, height: 2) {
		    state "default", label: "", icon: "st.unknown.zwave.remote-controller", backgroundColor: "#ffffff"
        }
    }
    main (["button"])
    details (["button"])
}

def parse(String description) {	       	            
    if (description?.startsWith('enroll request')) {        
        List cmds = enrollResponse()
        log.debug "enroll response: ${cmds}"
        def result = cmds?.collect { new physicalgraph.device.HubAction(it) }
        return result    
    } else if (description?.startsWith('catchall:')) {
        def msg = zigbee.parse(description)
        log.debug msg
        buttonPush(msg.data[0])
    } else {
        log.debug "parse description: $description"
    }    
}

def buttonPush(button){
    //Button Numbering vs positioning is slightly counterintuitive
    //Bottom Left Button (Unlock) = 0 and goes counterclockwise
    //Securifi Numbering - 0 = Unlock, 1 = * (only used to join), 2 = Home, 3 = Lock
    //For ST App Purposes 1=Lock, 2=Home, 3=Unlock , 4 = * (only used to join)
    def name = null
    if (button == 0) {
        //Home - ST Button 1
        name = "1"
        def currentST = device.currentState("button")?.value
        log.debug "Home button Pushed"           
    } else if (button == 3) {
    	//Away - ST Button 2
        name = "2"
        def currentST = device.currentState("button2")?.value
        log.debug "Away button Pushed"        
    } else if (button == 2) {
        //Night - ST Button 3
        name = "3"
     	def currentST = device.currentState("button3")?.value
        log.debug "Night button Pushed"         
    } else {
        //Panic - ST Button 4
        name = "4"
     	def currentST = device.currentState("button4")?.value
        log.debug "Panic button Pushed"         
    
    }

    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 enrollResponse() {
    log.debug "Sending enroll response"
    [            
    "raw 0x500 {01 23 00 00 00}", "delay 200",
    "send 0x${device.deviceNetworkId} ${endpointId} 1"        
    ]
}


def configure(){
    log.debug "Config Called"
    def configCmds = [
    "zcl global write 0x500 0x10 0xf0 {${device.zigbeeId}}", "delay 200",
    "send 0x${device.deviceNetworkId} ${endpointId} 1", "delay 1500",
    "zdo bind 0x${device.deviceNetworkId} ${endpointId} 0x01 0x0501 {${device.zigbeeId}} {}", "delay 500",
    "zdo bind 0x${device.deviceNetworkId} ${endpointId} 1 1 {${device.zigbeeId}} {}"
    ]
    return configCmds
}

def installed() {
initialize()
}

def updated() {
initialize()
}

def initialize() {
sendEvent(name: "numberOfButtons", value: 4)
}
2 Likes

Hi folks, given that a lot of time has passed, I’m curious as to whether anyone has the fob working well and consistently with STv3 hub? @thejq, it seems that you might given your most recent post, but would love to hear for sure :slight_smile:

@crixyd Yeah, works fine, no disconnects at all.

Brilliant! Thanks for the fast reply @thejq!

Had some isues with my key fob but disabled Secure Join.
People that actually have it working have Secure Join enabled or disabled?

Hi,
I have a problem with my key fob, not being fully recognized by my v3 app.
I fact, only one button shows up in settings (see picture).
What can I do?
Please help me out, I’d be so

grateful!

You are using the wrong App. You have to use the SmartThings Classic App.

Thank you so much for your response!
But, as a matter of fact, the image that I get from the classic app is similar…

No buttons at all to choose from.

What am I doing wrong?

You’re doing fine. It’s supposed to show nothing, since there’s no icon for it. If you click the “gear” icon, you can update icon to whatever you want, even your own picture. If you select the “Recently” tab, and quickly double-press one of the buttons, you should see the activity. If so, you are good to go.

Obviously I’m doing something wrong. That’s because, as you can see in the screenshot, I cannot change the icon the way you described I could (something I can indeed do with other devices).
And then, in the “recents” tab, I can see each “button pressed” event. But how can I set these buttons to control my Home Monitor status?

Maybe with button controller smart app? There’s also no choice for that there…

Once again, thank you very much for your support, I appreciate it very much.

Ok, I think I didn’t upload the code to change the icon, it’s for cosmetics only. But it’s the new device type handler.

/**
 *  Swann One Key Fob
 *
 *  v:1.00 - 12/31/2015 - Initial Configuraton
 *  v:1.01 - 03/11/2019 - James added numberofButtons reporting
 *  v:1.02 - 03/11/2019 - James added icon change function
 *
 *  Copyright 2015 Rudimar Prunzel
 *
 *  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: "Swann One Key Fob", namespace: "RudiP", author: "Rudimar Prunzel") {
		capability "Button"
		capability "Configuration"

        fingerprint profileId: "0104", deviceId: "0401", inClusters: "0000,0003,0500", outClusters: "0003,0501"
    }

    tiles {
	    standardTile("button", "device.button", width: 2, height: 2, canChangeIcon: true, canChangeBackground: true) {
		    state "default", label: "", icon: "st.unknown.zwave.remote-controller", backgroundColor: "#ffffff"
        }
    }
    main (["button"])
    details (["button"])
}

def parse(String description) {	       	            
    if (description?.startsWith('enroll request')) {        
        List cmds = enrollResponse()
        log.debug "enroll response: ${cmds}"
        def result = cmds?.collect { new physicalgraph.device.HubAction(it) }
        return result    
    } else if (description?.startsWith('catchall:')) {
        def msg = zigbee.parse(description)
        log.debug msg
        buttonPush(msg.data[0])
    } else {
        log.debug "parse description: $description"
    }    
}

def buttonPush(button){
    //Button Numbering vs positioning is slightly counterintuitive
    //Bottom Left Button (Unlock) = 0 and goes counterclockwise
    //Securifi Numbering - 0 = Unlock, 1 = * (only used to join), 2 = Home, 3 = Lock
    //For ST App Purposes 1=Lock, 2=Home, 3=Unlock , 4 = * (only used to join)
    def name = null
    if (button == 0) {
        //Home - ST Button 1
        name = "1"
        def currentST = device.currentState("button")?.value
        log.debug "Home button Pushed"           
    } else if (button == 3) {
    	//Away - ST Button 2
        name = "2"
        def currentST = device.currentState("button2")?.value
        log.debug "Away button Pushed"        
    } else if (button == 2) {
        //Night - ST Button 3
        name = "3"
     	def currentST = device.currentState("button3")?.value
        log.debug "Night button Pushed"         
    } else {
        //Panic - ST Button 4
        name = "4"
     	def currentST = device.currentState("button4")?.value
        log.debug "Panic button Pushed"         
    
    }

    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 enrollResponse() {
    log.debug "Sending enroll response"
    [            
    "raw 0x500 {01 23 00 00 00}", "delay 200",
    "send 0x${device.deviceNetworkId} ${endpointId} 1"        
    ]
}


def configure(){
    log.debug "Config Called"
    def configCmds = [
    "zcl global write 0x500 0x10 0xf0 {${device.zigbeeId}}", "delay 200",
    "send 0x${device.deviceNetworkId} ${endpointId} 1", "delay 1500",
    "zdo bind 0x${device.deviceNetworkId} ${endpointId} 0x01 0x0501 {${device.zigbeeId}} {}", "delay 500",
    "zdo bind 0x${device.deviceNetworkId} ${endpointId} 1 1 {${device.zigbeeId}} {}"
    ]
    return configCmds
}

def installed() {
initialize()
}

def updated() {
initialize()
}

def initialize() {
sendEvent(name: "numberOfButtons", value: 4)
}

Yes, you can use Button Controller smart app, or create a Routine under automation. I’m not sure where you got stuck.

Unfortunately, there’s no ‘‘Routines’’ choice under ‘‘Automations’’ anymore, even in the Classic App… So I guess it’s the SmartApp only.

Thank you very much for the updated DH, now it works for the icon too!

Now, what I’m trying to do is to set arm(away)/arm(stay)/disarm to my Smartthings hub by pressing each of the key fob buttons.

As you can see i my previous post, there’s no choice for such thing at all!

Am I missing something?

Once again, thank you for your time!

It’s called “Modes” in your choices (under Sonos).

Apparently not… So frustrated with this matter…

Any other way, please?

Screenshot_20191223_214206_com.smartthings.android.jpg

Hey, thanks for writing this DTH.

I can see which buttons are being pressed when viewing the live logging, but I cannot get either the Classic App or WebCore to do anything upon the button being pressed.

I really don’t know enough about it, but I did once have a 2 button Xiaomi switch where only 1 button would ever work, I read something about endpoints, but again, something I don’t know anything about.

Has anyone else had the same issue and know how to solve this?

Many thanks.

K.