AZAutomation Posted July 6, 2011 Posted July 6, 2011 Hello Forum Group. I’m new to the Insteon/ISY-99i implementation, and didn’t realize how little I knew about if/then/else statements. I’ve been trying to configure a desired result for over three nights now, and have given up; hoping someone with better programming skills and experience can help me produce the results I’m looking for. I feel like a free-loader, but have no other choice than to ask. Hardware: ISY-99i Pro 2477D SwitchLinc Dual Band Dimmer 2420M Motion Sensor I used a helpful example from http://www.handymanhowto.com/2009/05/31 ... on-sensor/ and tried to incorporate the Scene to stop the program, but have had no success. My requirements for the porch light program are: 1. The porch lights will turn on for 10 minutes when motion is sensed from 30 minutes before sunset to 15 minutes after sunrise. 2. The motion sensor can be overridden by “double clicking†OFF, i.e. pressing the ToggleLinc switch OFF quickly two times, to keep the porch lights off indefinitely. This is useful when I want to look at the stars or for Halloween when the scene should be kept dark to view the decorations. 3. Manually turning the ToggleLinc switch ON will turn on the lights indefinitely and re-enable the motion sensor program. When the switch is manually turned OFF, the motion sensor program takes over again by default. 4. I want the program to NOT run if I have an active Scene enabled (30% lighting) – THIS IS THE PART I CAN’T GET WORKING * I’ve tried adding “Status 'Front Porch Light Switch' is not On 30%†to the folder properties and that didn’t work. I also tried adding “or / and Status 'Front Porch Light Switch' is not 30%†to the ‘Porch Motion Sensed†and that didn’t work either. I’m not sure where or how to incorporate a scene expectation to the program running so that the motion sensor rules don’t apply when I have my backyard scene (30%) active. In practice, the common scenarios are: • Lights are controlled by the motion sensor by default. • If I turn the switch ON, the lights stay ON until I turn them OFF. • If I want to keep the porch lights off for a time, I double click OFF the light switch. • When I come back inside, I flip the light switch ON/OFF once to re-enable the motion sensor. • If I have an active scene on (30%) the program will not run. The ISY-99i program code is kept in a Folder named ‘Front Porch Light’. Folder Conditions for 'Front Porch Light' Add conditions to limit when programs in this folder are allowed to run. If - No Conditions - (To add one, press 'Schedule' or 'Condition') Then Allow the programs in this folder to run. Comment: The programs in this folder are: 1) 'Porch Motion Sensed' 2) 'Porch Light On 10 Minutes' 3) 'Porch Light Switched On' 4) 'Porch Light Switched Fast Off' 5) ‘Porch Light Daily Reset’ =========== Program Content for 'Porch Motion Sensed' If From Sunset - 30 minutes To Sunrise + 15 minutes (next day) And Control 'Porch Motion Sensor' is switched On And ( Status 'Front Porch Light Switch' is not On And Program 'Porch Light On 10 Minutes' is False ) Then Run Program 'Porch Light On 10 Minutes' (Then Path) Else - No Actions - (To add one, press 'Action') =============== Program Content for 'Porch Light On 10 Minutes' If - No Conditions - (To add one, press 'Schedule' or 'Condition') Then Set 'Front Porch Light Switch' On Wait 10 minutes Set 'Front Porch Light Switch' Off Run Program 'Porch Light On 10 Minutes' (Else Path) Else - No Actions - (To add one, press 'Action') Comment: Turns the porch light on for 10 minutes. A program is used such that the 'Wait' isn't reinitialized by new events triggering If conditions. ================ Program Content for 'Porch Light Switched On' If Control 'Front Porch Light Switch' is switched On Then Stop program 'Porch Motion Sensed' Enable Program 'Porch Motion Sensed' Run Program 'Porch Light On 10 Minutes' (Else Path) Else - No Actions - (To add one, press 'Action') Comment: This program returns control to the motion sensor and reinitializes the conditional logic flags. Run Program (Else Path) to reset the motion on/off flag. =============== Program Content for 'Porch Light Switched Fast Off' If Control 'Front Porch Light Switch' is switched Fast Off Then Stop program 'Porch Motion Sensed' Disable Program 'Porch Motion Sensed' Run Program 'Porch Light On 10 Minutes' (Else Path) Else - No Actions - (To add one, press 'Action') Comment: Double tap (Fast Off) disables the motion sensor such that the porch light stays off until the switch is manually turned on again. Purpose of the 'Run Program ... (Else Path)' is to reset the motion on/off flag. Program Content for 'Porch Light Daily Reset' If Time is Sunrise + 30 minutes Then Set 'Front Porch Light Switch' Off Run Program 'Porch Light On 10 Minutes' (Else Path) Enable Program 'Porch Motion Sensed' Else - No Actions - (To add one, press 'Action') Comment: Turns off the porch lights 30 minutes after dawn and resets the program flags in case the lights were manually overridden and left on all night. Any advice is greatly appreciated . . .
oberkc Posted July 6, 2011 Posted July 6, 2011 3. Manually turning the ToggleLinc switch ON will turn on the lights indefinitely and re-enable the motion sensor program. This sounds like a conflicting requirement to me. Do you want them on indefinitely or do you want them to turn off 10 minutes after sensing motion?
AZAutomation Posted July 6, 2011 Author Posted July 6, 2011 3. Manually turning the ToggleLinc switch ON will turn on the lights indefinitely and re-enable the motion sensor program. This sounds like a conflicting requirement to me. Do you want them on indefinitely or do you want them to turn off 10 minutes after sensing motion? I have two objectives I want to work together. Objective 1: For security I want the lights to fast on when motion is detected (10 minutes, then turn off). Objective 2: I want to be able to use the lights as a scene or mood when in the back yard (30% power) without Objective 1 interfering over taking over. How can I get Objective 1 to stop when I have Objective 2 active?
LeeG Posted July 6, 2011 Posted July 6, 2011 Jsveom When the backyard Scene has run does the Admin Console show 'Front Porch Light Switch' at 30%? Was this line removed "Status 'Front Porch Light Switch' is not On", or changed to not 30%? Lee
AZAutomation Posted July 6, 2011 Author Posted July 6, 2011 Jsveom When the backyard Scene has run does the Admin Console show 'Front Porch Light Switch' at 30%? Lee I used the word backyard when I meant front porch. Yes, when I activate the front porch scene, the admin console shows the current state of 30%.
LeeG Posted July 6, 2011 Posted July 6, 2011 Jsveom There is another thread reporting that depending on where a particular statement is located in the If construct the Program is either reporting True or False simply due to a different position of the single statement. That If is very complex and may have no relation to this question. Try adding the check for not 30% near the top, after the time definitions and see if that works. If not post the Motion Program with the not 30% statement in place. Lee
AZAutomation Posted July 7, 2011 Author Posted July 7, 2011 Jsveom There is another thread reporting that depending on where a particular statement is located in the If construct the Program is either reporting True or False simply due to a different position of the single statement. That If is very complex and may have no relation to this question. Try adding the check for not 30% near the top, after the time definitions and see if that works. If not post the Motion Program with the not 30% statement in place. Lee Great advise, that worked. I added Status 'Front Porch Light Switch' is not 30% to the top of Front Porch Motion Sensed program and it solved the problem, thanks for your advice.
Recommended Posts