Fortrezz strobe: runOnce with short delay?

I’m trying to setup an alarm strobe to flash for a few seconds. It seems that the timing is not reliable, which appears to be mentioned in the documentation.

Is there any way to move a scheduled callback to execute on the bridge? I searched but haven’t found any documentation on this possibility. Having the strobe flash up to a minute after the spoken alert has finished is lame.

If this is a zigbee or zwave device, both run on mesh networks (independent of SmartThings). By their nature, mesh networks do not guarantee sequencing or time of execution. They are intended for low cost, low energy devices, many of which sleep much of the time. Each device is allowed to choose from several alternate routes, assuming that many nodes may be temporarily unavailable, if only to have batteries changed. Each will automatically retry sending a failed message a few times. Events at least 3 minutes apart will likely happen in the intended order. Events less than 30 seconds apart are pretty unpredictable as far as sequence. In between, it just depends on the installation.

http://docs.smartthings.com/en/latest/smartapp-developers-guide/scheduling.html

In a mesh network, messages may bounce around for a bit before finally reaching the intended destination, even if that destination is the hub.

Consequently they are not intended for forced sequencing or guaranteed event time use cases.

You have 24 lights, they all come on at about the same time, but you can’t guarantee the order.

If you have to have forced sequencing, your best choice is a separate network using either a star or tree topology. Home WiFi is usually a star, so has the right network structure, but not great reliability. Ethernet is good, as is cellular. Homeplug is worth considering. There are some other options, including proprietary zigbee in a point to point network.

Anyway, the short answer is that if you are using a standard zwave or zigbee device, packet sequencing is not guaranteed. Again, nothing to do with SmartThings.

Thanks for the info. It is indeed a zwave strobe http://www.fortrezz.com/index.php/products/siren/itemlist/category/17-siren-strobe-alarm.

The alarm is powered by mains, and it states that it works as a signal repeater so it would be active at all times if I understand correctly.

It still seems weird that other devices don’t have timing problems. The hub and the strobe are ~10 feet apart in the same room. The strobe begins exactly when intended but the scheduled event doesn’t occur (according to the ST logs) for up to a minute or so. That, plus the documentation you linked, seems to suggest that it’s a scheduling issue with sending the strobe off command. I can also shut off the strobe instantly from the ST app on my phone.

Finally, I see the same behavior (very delayed stop command) within the SmartApp simulator.

It could also be a device issue, that particular strobe does have a parameter you can set to force a turn off delay (to prevent someone from opening a door, then quickly shutting it, and getting the strobe to turn off too quickly.

But I don’t know any more than that. Hopefully someone who has the device working can comment.

I took a look at the device in my IDE. It’s showing up as a SmartAlert Siren Device. There doesn’t appear to be a specific matching type for this brand. I’ll take a look at forking the SmartAlert device type and seeing if I can get that configuration parameter visible.

Is it the one listed on the “works with smart things” official list? If so, support@smartthings.com should be able to tell you what device type to use.

It actually is, and they’re in the SmartThings shop. I’ll give that a try.

I think I figured it out.

I found a (seemingly undocumented?) parameter for .on and .off to set a delay. I found that in the Smart Security app template. What I have now:

if(AlarmStrobe != null && AlarmStrobe.size() > 0)
{            
    AlarmStrobe?.strobe();            
    AlarmStrobe?.off(delay: StrobeTime * 1000);       	
}

The logs now indicate exactly 5 seconds between the ON and OFF commands. The strobe flashes ~once per second and I can only count 6 flashes before it stops.

Yes, all commands accept a delay option: http://docs.smartthings.com/en/latest/smartapp-developers-guide/devices.html#sending-commands

1 Like

This might solve a lot of timing problems

Hello I am looking to do just this, do you mind posting the smartapp?

the code sample I posted above shows triggering the strobe and then turning it off with a delay.