Using Luup code in a scene

Can someone point me to an example that.

Checks to see if Vista is Armed and if not try to arm it.

If it does not arm eg. (garage door open), I would like to try several more times at an interval so my vista will sound out a few times and alert me.

I currently have no output devices to trigger as my budget is done for awhile. That would make it too easy.

thanks

You should be able to tell BEFORE it’s armed if there will be a problem.
You should be in a DISARMED and READY state before trying to arm.
If not you have a zone violation.

Yes, I could have probably included more information.

I want to run this routine on a timer and my Vista will now make a single chime if it does not arm due to the garage door being up. I want it to try a few times so that the single chirp X5 better gets my attention.

cheers