Ajbarrister Posted March 21, 2010 Share Posted March 21, 2010 Here is our set up and this is what we want to create, but have no idea how to do it except I think it has to be a Boolean Variable. If I am incorrect, please tell me a better way to accomplish this.We have little kids and in our kitchen is a sliding door that leads to a pool. If my wife runs upstairs or is somewhere in the house and one of the kids opens the slider we want an announcement to play continuously throughout the house alerting us that one of the kids has opened the slider. Once the slider is closed the announcement can stop. The slider has a GE recessed micro door sensor tied to a Card Access Sensor Bridge so it can tell if the slider is open or closed. Right next to the slider is a 6 button keypad. We want to be able to arm or disarm this door to play the announcement continuously if the door is armed and is opened. Of course we want the LED on the button designated for arming and disarming to be different colors if armed or disarmed. Can anyone show me how to program this? Link to comment Share on other sites More sharing options...
pharmdsmith Posted March 21, 2010 Share Posted March 21, 2010 I did a write up on this on c4central. However my announcement only plays once for each door opening. If you want it to continually repeat you will need your dealer to add a loop command. I'm pretty sure a loop is the only way to make the repetition happen. Link to comment Share on other sites More sharing options...
Ajbarrister Posted March 21, 2010 Author Share Posted March 21, 2010 I just found your write up, http://c4central.com/category/programming-tips-and-tricks/page/2/. Can anyone help with a loop command. I am running 1.7.4. Link to comment Share on other sites More sharing options...
Ajbarrister Posted March 21, 2010 Author Share Posted March 21, 2010 It works, IE Toggles on and off, but the LED on the 6 button is not following the togggle. I want it red when on and green when not. What am I doing wrong? Link to comment Share on other sites More sharing options...
ILoveC4 Posted March 21, 2010 Share Posted March 21, 2010 I haven't looked at your programming to tell about the LED (I'm posting from my cell phone), but I can tell you that you don't need or want a loop command. Create a short timer (6 or 7 seconds?). When the door opens, if the variable is true, play the announcement. When the announcement plays, reset the timer. When the timer expires, if the door is still open and variable is still true, play the announcement. When the door closes or the variable changes to false, stop your timer. There's your "loop". If the doors open and the variable is true, the announcement will continue to play. Does that make sense? Link to comment Share on other sites More sharing options...
pharmdsmith Posted March 21, 2010 Share Posted March 21, 2010 On you're 3rd screen add the off commandsSet led: 3 ON color to red.... Set led: 3 OFF color to red.......Set led: 3 ON color to lime....Set led: 3 OFF color to lime.......That works for me. Link to comment Share on other sites More sharing options...
pharmdsmith Posted March 21, 2010 Share Posted March 21, 2010 I haven't looked at your programming to tell about the LED (I'm posting from my cell phone), but I can tell you that you don't need or want a loop command. Create a short timer (6 or 7 seconds?). When the door opens, if the variable is true, play the announcement. When the announcement plays, reset the timer. When the timer expires, if the door is still open and variable is still true, play the announcement. When the door closes or the variable changes to false, stop your timer. There's your "loop". If the doors open and the variable is true, the announcement will continue to play. Does that make sense?Very nice, that will definately do the trick. Link to comment Share on other sites More sharing options...
Ajbarrister Posted March 21, 2010 Author Share Posted March 21, 2010 That worked Pharm!Dan, I think I know what you mean. Would it look like this:Door Opens1. Start Back Door Timer, 2. ? If Variable Back Door is True,3. Execute Announcement Back Door Open, 4. Reset Timer, 5. ? If Variable Back Door is True, 6. Start Back Door Timer,7. Execute Announcement Back Door Open, 8. Reset Timer, 9. ? If Variable Back Door is True.Is that right? Link to comment Share on other sites More sharing options...
pharmdsmith Posted March 21, 2010 Share Posted March 21, 2010 create a timer called back sliding door. Give it a 7 second interval. Under programming on the left side go to your back sliding door announcement and put in thisWhen announcement back sliding door executes->reset timer "back sliding door"Now under programming on the left side go to your back sliding door timer and select the "when timer back sliding door expires" option. Now put this in the middle?If back sliding door is open ? If back door variable is true ->execute announcement back sliding doorNow your announcement should keep playing until either you shut the door or hit the button you use to toggle your announement variable. I tried this out on mine(I have the vista20p for my sensors) and for some reason there is a much longer gap between the first and second announcement but then after that it repeats like a champ. Link to comment Share on other sites More sharing options...
Ajbarrister Posted March 21, 2010 Author Share Posted March 21, 2010 Thank you both for all the help! I will add that code tomorrow and try it out! Link to comment Share on other sites More sharing options...
ILoveC4 Posted March 21, 2010 Share Posted March 21, 2010 Thank you both for all the help! I will add that code tomorrow and try it out!It will work great. I have it in use in several instances at my house. I don't experience the delay pharmdsmith is, and I'm using the Card Access Sensor Bridge just like you are. Pharmsdmith explained it a little better than I did...thanks. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.