Joe Posted March 19, 2017 Posted March 19, 2017 I am a new ISY programmer... I'm trying to write an ISY994i program to turn lights on at random when my Elk M1 Gold is armed in away mode and it is dark outside (my carport light turns on when it's dark outside). Here is the program I wrote for one of the lights (living room ceiling fan light). I have it set for 5 minutes only for testing purposes. If Elk Area 'A1' 'Armed State' is Armed Away And Status 'Outside Lights / CarportLt' is On Then Wait 5 minutes (Random) In Scene 'Scenes / ScLivRmFan / ScLivRmFanLtOn' Set 'Fans / CeilFanLights / LivRmFanLight' 100% (On Level) Wait 5 minutes (Random) In Scene 'Scenes / ScLivRmFan / ScLivRmFanLtOn' Set 'Fans / CeilFanLights / LivRmFanLight' 0% (On Level) Else - No Actions - (To add one, press 'Action') My problem is this program doesn't work. Nothing at all happens. Can anyone provide any insight into why this program doesn't work?
Scottmichaelj Posted March 19, 2017 Posted March 19, 2017 (edited) I am a new ISY programmer... I'm trying to write an ISY994i program to turn lights on at random when my Elk M1 Gold is armed in away mode and it is dark outside (my carport light turns on when it's dark outside). Here is the program I wrote for one of the lights (living room ceiling fan light). I have it set for 5 minutes only for testing purposes. If Elk Area 'A1' 'Armed State' is Armed Away And Status 'Outside Lights / CarportLt' is On Then Wait 5 minutes (Random) In Scene 'Scenes / ScLivRmFan / ScLivRmFanLtOn' Set 'Fans / CeilFanLights / LivRmFanLight' 100% (On Level) Wait 5 minutes (Random) In Scene 'Scenes / ScLivRmFan / ScLivRmFanLtOn' Set 'Fans / CeilFanLights / LivRmFanLight' 0% (On Level) Else - No Actions - (To add one, press 'Action') My problem is this program doesn't work. Nothing at all happens. Can anyone provide any insight into why this program doesn't work? Why not do if its Sunset and Elk is armed away then run your scene? Also try "CONTROL" - Maybe you have a communication error and its not picking up the status of carport light being turned on? Have you verified? EDIT: If Elk Area 'HOME' 'Armed State' is Armed Away And Time is Sunset Then Set Scene 'All Outside Lighting' On Else - No Actions - (To add one, press 'Action') Edited March 19, 2017 by Scottmichaelj
Joe Posted March 19, 2017 Author Posted March 19, 2017 (edited) Sorry. I guess I wasn't clear in my original post. I am trying to turn on inside lights at random intervals and for random durations whenever my Elk M1 Gold security system is armed in away mode and it is dark outside. The program I included in my original post was the program to do just this for my living room ceiling fan light. (I have the same program for other interior lights.) These programs determine that it is dark outside by looking at the state of my carport light. If the carport light is on then it is dark outside because my carport light turns on automatically at sunset via a different program. The problem I am having is that the programs I have to turn on the inside lights at random intervals and for random durations aren't working (noting at all happens) and it isn't clear to me why. Edited March 19, 2017 by joe
Joe Posted March 19, 2017 Author Posted March 19, 2017 Okay, I eliminated the part about checking that the status of the carport light is on (to eliminate the concern that the system wasn't able to properly determine the status of the carport light). The resulting program is below: If Elk Area 'A1' 'Armed State' is Armed Away Then Wait 5 minutes (Random) In Scene 'Scenes / ScLivRmFan / ScLivRmFanLtOn' Set 'Fans / CeilFanLights / LivRmFanLight' 100% (On Level) Wait 5 minutes (Random) In Scene 'Scenes / ScLivRmFan / ScLivRmFanLtOn' Set 'Fans / CeilFanLights / LivRmFanLight' 0% (On Level) Else - No Actions - (To add one, press 'Action') It still doesn't work after arming the system in away mode. Any ideas about what I am doing wrong?
oberkc Posted March 19, 2017 Posted March 19, 2017 (edited) Is it possible that your program is disabled? Is your program in any folder? Could the folder be disabled? Edited March 19, 2017 by oberkc
TrojanHorse Posted March 19, 2017 Posted March 19, 2017 Okay, I eliminated the part about checking that the status of the carport light is on (to eliminate the concern that the system wasn't able to properly determine the status of the carport light). The resulting program is below: If Elk Area 'A1' 'Armed State' is Armed Away Then Wait 5 minutes (Random) In Scene 'Scenes / ScLivRmFan / ScLivRmFanLtOn' Set 'Fans / CeilFanLights / LivRmFanLight' 100% (On Level) Wait 5 minutes (Random) In Scene 'Scenes / ScLivRmFan / ScLivRmFanLtOn' Set 'Fans / CeilFanLights / LivRmFanLight' 0% (On Level) Else - No Actions - (To add one, press 'Action') It still doesn't work after arming the system in away mode. Any ideas about what I am doing wrong? Joe, It appears you've selected "adjust scene" rather than "Insteon" when constructing your then statement. The syntax should say "set scene" rather than "in scene". Changing this should at least get the basic program to run and turn the scene on. As I understand, "adjust scene" is typically used to change how a scene reacts when turned on by a control switch. For example, maybe you want a switch to respond to a tap by turning lights on dim at night and 100% in the morning. Sent from my iPhone using Tapatalk 4
oberkc Posted March 19, 2017 Posted March 19, 2017 Trojanhorse most likely found the root cause of your problem. I should have asked upon what evidence you judged the program not working. Sometimes, a program can work perfectly, but just not doing what you expect.
Joe Posted March 19, 2017 Author Posted March 19, 2017 Thanks for the replies guys. I'll give TrojanHorse's idea a shot when I get back to the house later today. Silly computers - they keep doing what I tell them to do not what I want them to do. When will someone fix that?
Joe Posted March 20, 2017 Author Posted March 20, 2017 (edited) Thanks to the suggestion from TrojanHorse all is working now . Here is the program in its final form for one of my lights: If Elk Area 'A1' 'Armed State' is Armed Away And From Sunset To Sunrise (next day) Then Repeat Every 0 seconds Set Scene 'Scenes / ScBr1Fan / ScBR1FanLtOn' Fast Off Wait 1 hour (Random) Set Scene 'Scenes / ScBr1Fan / ScBR1FanLtOn' Fast On Wait 1 hour (Random) Else - No Actions - (To add one, press 'Action') This sample is for the ceiling fan lights in bed room 1. I have this same program for several other lights in my home. These programs will randomly turn lights on and off during the time period from sunset to sunrise if the security system is armed in 'away' mode. The longest any one light will be on is 1 hour and the longest any one light will be off is 1 hour. These programs will repeat as long as the system is armed 'away' and it is between sunset and sunrise. I created 1 additional program (not shown) that will turn all lights off after sunrise if the system is still armed. I tested these programs this evening by changing the triggering event from arming the security system to turning my kitchen ceiling fan motor on to high. For the test I also changed the random durations from 1 hour to 20 seconds. All worked as expected. Thanks for the help figuring this out. Edited March 20, 2017 by joe
KeviNH Posted March 20, 2017 Posted March 20, 2017 Looks good. Here's a few suggestions for next steps: I made a folder called "Simulate Occupancy" and added "Elk Area 'A1' 'Armed State' is Armed Away" as the folder condition, then I put a variety of programs in the folder, each with a different Schedule. That way I can fine-tune the activating condition (maybe I want a variable that prevents the lights from going on and off) by just changing it one place, on the Folder. If you're only switching lights and don't want any of these programs running while it is light outside, add schedule to the folder condition starting 1 hour before sunset, and ending 1 hour after sunrise. For any device or Scene you add to the "Then" actions, Consider adding corresponding "Off" action to the Else clause. This ensures that when the program ends everything that was turned on gets turned off, even if the program is terminated in the middle of execution. Your program sets the maximum On duration at 1 hour, and a minimum on duration of 0 seconds. If you want to ensure that each light is always on for at least 5 minutes, do this: Wait 5 minutes Wait 55 minutes(Random) 3
Joe Posted March 20, 2017 Author Posted March 20, 2017 Great suggestions KeviNH. Thanks! Sent from my iPhone using Tapatalk
Recommended Posts