Issue making more than one tone device beep

I created a virtual open/close sensor device handler and then a smartapp to monitor actual contact sensors and trip the virtual sensor after 60 seconds. The purpose of this is to have smart home monitor wait 60 seconds before registering an intrusion as it is not listening to the door sensors, but the virtual delayed sensor.
I just bough two of the Iris keypads and have them working. The goal now is to have both keypads beep when the actual door sensors are open if the mode is not home. This gives an audible warning to disarm the alarm before the intrusion is detected.
The issue is that it will only “beep” the first tone device. I have tried it with the input set to multiple, and having two separate inputs. Once the first tone device is called the second will not beep.
Anyone have any suggestions?
Here is the code:

    name: "Delay entry for alarm",
    namespace: "wesgrimes",
    author: "Wes Grimes",
    description: "When a contact sensor opens, delay one minute and then open the virtual sensor",
    category: "Convenience",
    iconUrl: "",
    iconX2Url: ""

preferences {
	section("When the door opens..."){
		input "contacts", "capability.contactSensor", title: "Where?", multiple:true
        //input "contacts", "capability.switch", title: "Where?", multiple:true
    section("Trigger this sensor after 1 minute..."){
    	input "virtualContact", "capability.contactSensor", title: "Where?"
    section("Sound this tone..."){
    	input "tones1", "capability.tone", title: "Where?"
    section("Sound this tone..."){
    	input "tones2", "capability.tone", title: "Where?"

def installed()
	//subscribe(contacts, "switch", contactOpenHandler)
    subscribe(contacts, "contact", contactOpenHandler)
	//subscribe(contact1, "", contactOpenHandler)

def updated()
	//subscribe(contacts, "switch", contactOpenHandler)
    subscribe(contacts, "contact", contactOpenHandler)

def contactOpenHandler(evt) {
	if(evt.value == "open")
    	def curMode = location.currentMode
		log.debug "The current mode ID is: ${}"
    	log.debug "make tones1 beep"
    	log.debug "make tones2 beep"
        //tones.each {log.debug "Current switch value: ${it.currentSwitch"}
        //{ toneDevice ->
        //	log.debug "make toneDevice beep: ${}"
        ////	log.debug "Current tone value: ${it.currentTone}"
        //	toneDevice.beep()
		log.debug "contactOpenHandler evt.value:$evt.value: evt:$evt, settings:$settings"
		runIn(60, myHandlerMethod)
	//log.debug "$contacts was opened, sending push message to user"
	//sendPush("Your ${contact1.label ?:} was opened")

def myHandlerMethod() {
    log.debug "handler method called"
    //log.debug "handler method complete"

Make it possible to select both devices from the same input.

input "tones", "capability.tone", title: "Where?", multiple: true

That allows you to turn them both on at the same time.


I’m not sure if that will solve your problem, but it’s worth a shot.

Thanks Kevin, I wasn’t aware of the wildcard syntax on the collection like that.
I am afraid that it still didn’t work, but that is good to know about.

It’s strange because I can iterate through the collection and log the id properties of the objects, but it just ignores all .beep() calls after the first pass. Calling “tones*.beep()” only executes on the first member of the collection.

It feels like a bug in the framework, but I was hoping that someone could point out something that I am missing.

I now have three of the Iris keypads (they are on sale for $16), and have everything working with a 1 minute delay when in “Away” mode so that I can alert a warning tone from the keypads and delay the intrusion. Everything is working great, but I can only alert the tone from one keypad.


What devices are you trying to use the beep command with?

They are the Centralite 3405-L keypads that Lowe’s brands as IRIS Keypads.

The device handler is Mitch Pond’s code:

Here are the details of the device:
Iris 3405-L Keypad Device Garage Keypad
Name Iris 3405-L Keypad
Label Garage Keypad
Type Centralite Keypad
Version Published
Zigbee Id 000D6F000BBE19E9
Device Network Id 5A24
Hub Home Hub
Group Garage
Last Activity At 2017-01-15 7:20 AM CST
Date Created 2017-01-14 9:41 AM CST
Last Updated 2017-01-14 9:50 AM CST
endpointId: 01
manufacturer: CentraLite
model: 3405-L
Raw Description 01 0104 0401 00 09 0000 0001 0003 0020 0402 0500 0501 0B05 FC04 02 0019 0501
Current Version: 0x10025310
Target Version: 0x10025310
Last Updated: N/A
Last Checked: 2017-01-14 9:50 AM CST
Current States
temperature: 55
battery: 100
motion: inactive
tamper: clear
armMode: disarmed
lastUpdate: Sun, Jan 15 2017 @ 6:40 AM CST
Preferences (edit)
Name Type Value
beepLength number 10
motionTime number 10
tempOffset number 0
Events List Events
In Use By
User Lock Manager
Delayed Door Sensor (Delay entry for alarm)

I just did a work around by installing three instances of the SmartApp, setting each instance to only tone on one of the keypads.

This creates a bunch of extra events, but I can now alert on all keypads.

I actually alert on 2 of the keypads when in Away or Night with a 20 second beep setting on those keypads, and a 1 second beep on the 3rd keypad for Home mode to function as a door chime.

It’s a bit of a kludge fix, but it works…

You can’t even get a single temperature sensor for $16 and that comes with all those other features too so I just assumed it was one of their version 1 devices that didn’t work with ST.

I’m not sure why multiple instances of the SmartApp is necessary, but I’ve never tried beeping multiple zigbee devices at the same time. The doorbell turns the switch on and off quickly so maybe that has something to do with it, but at this point I’m randomly guessing.

I’m glad you were able to figure out a workaround.