iostream212 Posted December 4, 2011 Posted December 4, 2011 I have a few non-insteon motion sensors in my ELK setup and wanted to use them in my ISY scenes. The problem is that alarm motion sensors don't usually have a built in countdown timer or the ability to vary the sensing rate. In my case the sensors would violate every 5 seconds with constant movement. Needless to say I couldn't have an attached scene toggling on/off every few seconds, nor did I want to set a timer on the scene either. A timer on the scene could potentially turn the scene off while the area was still occupied. Here is my solution: Prerequisites Elk module, Elk system with attached motion sensors, ISY with Elk module appropriate firmware, an ISY scene to control. The first program determines if the area is occupied. If the motion zone is tripped set a variable to true, 1. Program name: Kitchen Motion Occupied If Elk Zone 'KITCHEN MOTION' is Violated Then $IsKitchenOccupied = 1 Else - No Actions - (To add one, press 'Action') Here is the program that starts the motion controlled sequence. Program name: Kitchen Motion Night If Elk Zone 'KITCHEN MOTION' is Violated and $IsDarkOutside = 1 Then Run Program 'Kitchen Motion Night WAIT' (Then Path) Else - No Actions - (To add one, press 'Action') Now that the motion sequence has been started from the previous program, we activate the scene and wait. Program name: Kitchen Motion Night WAIT If - No Conditions - (To add one, press 'Schedule' or 'Condition') Then Set Scene 'Kitchen Night' On Wait 5 minutes Run Program 'Kitchen Motion Occupied RESET' (If) Else - No Actions - (To add one, press 'Action') Here is the last program. If the very first program detected motion anytime during the execution of this sequence the variable is set to true, 1. Since this is true we reset the $IsKitchenOccupied variable to false, and rerun the WAIT program. If movement was not detected during the WAIT program the $IsKitchenOccupied variable would still be false, 0. The program would then run the else path and turn the scene off. Please note the WAIT program will run twice, at a minimum. So set your wait times appropriately. I set 5 minutes on my wait time, which means the scene would be on for 10 minutes if I triggered it and walked out of the area. Program name: Kitchen Motion Occupied RESET If $IsKitchenOccupied is 1 Then $IsKitchenOccupied = 0 Run Program 'Kitchen Motion Night WAIT' (Then Path) Else Set Scene 'Kitchen Night' Off I would welcome any feedback to condense this sequence if there is a better way to accomplish this. Thanks!
TJF1960 Posted December 5, 2011 Posted December 5, 2011 I don't have the Elk system but it looks like the DSCLink program works similarly. I use 3 programs to automatically turn lights on when entering a room using the alarm motion sensor. This Program will turn on the light if the light is currently off and there is motion detected and the manual off program is false. This allows you to turn the light off and exit the room without the light turning back on automatically. In the first second program, replace†$sDSC_Z24_Office_PIR is 1†with the elk motion when violated. The second program replace†$sDSC_Z24_Office_PIR is 0†with the elk motion when not violated. Program: Office Lite Auto On If Status 'Devices / Office Ceil Lite' is Off And $sDSC_Z24_Office_PIR is 1 (or Violated in the case of Elk) And Program 'Office Lite Man Off' is False Then Set 'Devices / Office Ceil Lite' On Else - No Actions - (To add one, press 'Action') This program watches the first program and for the last run time. Every time motion is detected the first program runs False (if the light is on). Once there is no further motion the last runtime will expire, in this example in 15 minutes. Any further motion detection will automatically restart this program. This program will self terminate if you manually turn the light off. Program: Office Lite Auto Off If Status 'Devices / Office Ceil Lite' is On And Time is Last Run Time for 'Alarm Z24 Office PIR' + 15 minutes And $sDSC_Z24_Office_PIR is 0 (or Not Violated in case of Elk) Then Set 'Devices / Office Ceil Lite' 1 (Beep Duration) Wait 15 seconds Set 'Devices / Office Ceil Lite' Off Else - No Actions - (To add one, press 'Action') This program watches for a manual turn off of the light which then turns true for 15 seconds allowing you to exit the room without tripping the Auto On program. Program: Office Lite Man Off If Control 'Devices / Office Ceil Lite' is switched Off And Control 'Devices / Office Ceil Lite' is not switched On Then Wait 15 seconds Run Program 'Office Lite Man Off' (Else Path) Else - No Actions - (To add one, press 'Action') I use these in all rooms of the house and they have been working very well. I have added a light sensor outdoors and use the light measurements in these programs as well to only turn on at certain levels of darkness. Hope you can find them useful. Tim
Recommended Posts