Jump to content

Question on ISY Programming - Random Lights when Security System is Armed


Joe

Recommended Posts

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?

Link to comment

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')
Link to comment

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.

Link to comment

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?

Link to comment

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

Link to comment

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?

Link to comment

Thanks to the suggestion from TrojanHorse all is working now :mrgreen: . 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.

Link to comment

Looks good.   Here's a few suggestions for next steps:

  1. 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.
  2. 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.
  3. 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.
  4. 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)
Link to comment

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...