Alarm Entry Delay with Announcement


#1

I’m new to webCoRe and I’m having trouble with the piston I created to delay alarm from going off and announcing the countdown on my sonos speaker.

When the door opens with alarm set, I want the siren to delay sounding for 45 seconds and I want my sonos speaker to say the alarm is counting down.

Either the siren delays but no announcement from speaker or if I move the speaker action above the siren delay then the siren sounds when door opens but the announcement is also coming through the speaker.


#2

Try the SHM delay app. it’s all worked out for you using virtual contact sensors.


#3

Click on the WITH statement with the wait 45 seconds command, then the gear cog at the bottom to expand settings. Change your Task Cancellation Policy to “never cancel tasks”.

After any wait (longer than 3 seconds I think, usually) the IF condition is evaluated again. Since your “contact sensor changes to open” will evaluate false, all pending tasks are cancelled. By changing your task cancellation policy, your piston will continue to run regardless of how the IF condition re-evaluates.

You can also get rid of the nested IF’s at line 33 and 35. Just pull your “if SHM status changes…” all the way outside your first IF statement (in other words, drag it down to line ~50). The way it’s written now, that IF condition will only be evaluated if your first IF condition evaluates true.


#4

Thanks Ryan. I tried that but am stuck in steps 8 and 9…particularly I can’t figure out where to go for “Global Settings”.


#5

Thanks for your reply michicago. I updated per your suggestion but for some reason the alarm now goes off instantly upon entry…no delay.


#6

Can you post your modified piston and logs? I don’t see any reason it should skip the 45 second wait in the piston you posted.


#7

Here is an image of the piston. I remade it but similar issue. Alarm sounds immediately and announcement plays. After I disarm, the siren stops and then about 40 seconds later the announcement plays over the speaker again. I didn’t have to log set so I don’t have that example. I can set the log and test again if you’d still like to see the log.
Thanks for your help.


#8

Here is an example of the log…


#9

Try putting the Wait 40 seconds under Music Player 1 and see if that fixes it. I wouldn’t expect the two events to run asynchronous but that sounds like what’s happening.


#10

What do you mean you can’t find “global settings”? its right there in the app. The instructions are actually really detailed for version 2.0 of the app. I would say that you should try it again rather than try this all on your own. I don’t see in this sketch how your are going to not sound the alarm immediately if the contact sensor #7 is monitored by SHM. You would have to create another virtual contact sensor that would be monitored by SHM and then open that after the delay period that you stated. Then the alarm would go off separately than the announcement you are playing.
Also, in your sketch, the only thing you’re doing with Switch 1 is waiting? Why not just leave that set to “Location” instead of assigning it to Switch 1?
But unless you create virtual devices you’re never going to get this to work this way.