Keypad Subscribe Question

What is the driver for this?

Standard HE Centralite Keypad

Then how is it "simulated" ?

On Devices: Add Virtual Device, select Centralite Keypad
So it's virtual not simulated, my apologies for using wrong terminology, but it's not a pyhsical device.

Doing this does not get you a functioning "simulated" device. The driver is only going to process commands coming from a real keypad. It's parse method is looking for Zigbee messages, which you cannot send it. So you don't know what events it would send.

Drivers for virtual devices all have names like Virtual Dimmer...

I'm aware the virtual device is non functional. What I don't understand is why my app is posted with securityKeypad when tapping on a device status such as Disarmed from
subscribe (thekeypad, allEventHandler)

but not

subscribe (thekeypad, "securityKeypad", securityKeypadHandler)

when the events are "securityKeypad".

Do you have both subscribes in the same code, as shown above?

You clearly are getting securityKeypad events, as shown by your logs.

I tried a three iterations
both
subscribe (thekeypad, allEventHandler) only
subscribe (thekeypad, "securityKeypad", securityKeypadHandler) only

never posts on the subscribe (thekeypad, "securityKeypad", securityKeypadHandler) but does show that event in the event log when tapping "Disarm" on the device page

Show the app status page. Have you tried your app with a real keypad?

I have most devices moved to HE, except for keypads, repeater and siren that are waiting for the forthcoming update with Entry Delay/ Exit Delay support. Using hybrid system with ST and HE, Hublink, and Other Hub app. When that update is released, one keypad (Iris V2) moves to HE for evaluation.

Not sure what is meant by "app status page", but maybe it's this?

Click on the gear icon just to left of the app name on Apps page.

@bravenel @chuck.schwer

Is this still the correct syntax?
I've tried this with a couple of devices and it will only work using the attribute

e.g subscribe(myDev, "attribute", handler)

Using it without the attribute gets no subscription

Yes, you need the attribute. It can be general, like "switch" for all switch events, or specific, like "switch.on".

1 Like

Thanks Bruce

Is there any other way to subscribe to all of a devices attribute?

Sorry to resurrect an old thread but I am doing something wrong and for the life of me I can't figure out what. I'm trying to subscribe to all device events, I boiled it down to this very simple app:

preferences {
    page(name: "pageConfig")
}

def installed() {
    log.debug "Installed"
}

def updated() {
    log.debug "Updated"
    unsubscribe()
	subscribe(myDevices,eventHandler)
}


def pageConfig() {
    dynamicPage(name: "pageConfig", title: "Test App", nextPage: null, install: true, uninstall: true, refreshInterval:0) {		
	section() {
		input "myDevices", "capability.*", title: "Select Devices", submitOnChange: true, hideWhenEmpty: false, required: true, multiple: true
	}
    section({label title: "Enter a name for this app", required: false})
}
}


def eventHandler(event){
    log.debug "${event.device}  ${event.deviceId} ${event.name} ${event.value}"
}

But after installing and updating the app, there are no device subscriptions.

What am I doing wrong in subscribe to get it to work correctly?I can't figure this one out for the life of me. If I define an attribute, everything works perfectly. But I know I shouldn't have to define an attribute in order to subscribe to everything. Thanks!

Not sure. Try

myDevices.each { subscribe(it, eventHandler) }

I'll look around and see if there is another way to do it.

Nope...that didn't end up with any subscriptions either. I tried doing it like this:

def updated() {
    log.debug "Updated"
    unsubscribe()
    myDevices.each{
        subscribe(it, eventHandler)
    }
}

image

Just to try it out, I tried defining a capability to filter the device list for, that didn't work either. It seems the only way is to subscribe to specific attributes. Not a huge deal, just makes my job a lot harder on the front end. That's all. I assume that if I subscribe to a specific attribute for a device that doesn't have it, that's not a problem, right? Because, even if I have a device list of contact and motion sensors, this does work:

def updated() {
    log.debug "Updated"
    unsubscribe()
    subscribe(myDevices,"contact",eventHandler)
    subscribe(myDevices,"motion",eventHandler)
}

Gives me this:

image

Now, it will never get a contact event from Office Motion 2 but I assume that won't hurt anything, right? If not, then I really won't have to do too much extra on the front end.