Jump to content

Programming Question - Repeats and Waits


Recommended Posts

Posted

It seems like there might be different ways to accomplish this, but what would be the simplest and cleanest?

I have a driveway motion detector, that when violated I want to sound a chime. I'd like the chime to repeat three times, with a two second wait between each time. I would also like to incorporate another longer wait of 10 minutes so that the chime isn't continuously sounding if there is still motion detected. For example, if a car pulls into the driveway I'd like to sound the 3x chime. But if someone gets out and is walking around the car or unloading the trunk, I'd like that to be ignored until the 10 minute timer expires.

Thank you in advance.

Posted

Wait would probably be easier. I'd use a variable $chime_active in this example

If motion sensed
and 
$chime_active = 0

then

$chime_active = 1 (allow the 10 minute wait to complete)
Set chime on (or however you make one chime)
wait 2 seconds
Set chime on
wait 2 seconds
Set chime on
wait 10 minutes
$chime_active = 0

  • Like 1
Posted (edited)

I am doing essentially that exact same thing.  It requires 2 programs so that it does not re-trigger and end the wait.  Doing it this way avoids using variables.  "All off" is the name of a scene that includes basically every light switch in my house.  I use it to turn everything off with a single button press, but it also works great to have all the switches in the house beep.  I also have a program that disables the program for an hour that I manually activate if I want to.

Driveway Entry - [ID 0173][Parent 0172]

If
   - No Conditions - (To add one, press 'Schedule' or 'Condition')
 
Then
        Disable Program 'Driveway Entry Trigger'
        Set 'All Off' Beep
        Set 'All Off' Beep
        Set 'All Off' Beep
        Wait  5 minutes 
        Enable Program 'Driveway Entry Trigger'
 
Else
   - No Actions - (To add one, press 'Action')
 
Action run by driveway trigger.  Seperated to allow for a 5 minute time out between entries.


Driveway Entry Trigger - [ID 00AA][Parent 0172]

If
        'Blue Iris / Front Entry' Triggered is True
 
Then
        Run Program 'Driveway Entry' (Then Path)
 
Else
   - No Actions - (To add one, press 'Action')
 

 

Edited by apostolakisl
  • Like 2
Posted

Thanks. I think this approach will work for me, just need to find the time this weekend to think it through and give it a test.

Posted

UPDATE - Thanks @paulbatesand @apostolakislfor your help. I went around in circles trying to get both of these solutions to work until I finally realized that my chime is defective. Even when triggered manually, it would only work sporadically. Back to the drawing board. 

Posted (edited)

You can try factory resetting it and restore device, assuming it's insteon and especially if it's been running for years

Edited by paulbates
Posted

Thanks. It's a brand new Z-Wave device. Good idea about the factory reset, but it's still not working.

When I first received it, I went through all the different sounds to see which ones I wanted to use. Now I can't even get it to play a single sound when triggered manually. I'm sending it back. 

  • Like 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...