wswartz Posted April 29, 2012 Posted April 29, 2012 Wondering if someone can help me out with this set of programs? Goal: At night, do a scene change on a light. If the light is already on, have it follow the change. This is what I came up with so far: DiningEvening: If From 12:00:00AM To Sunrise (same day) Then In Scene 'House / Main Floor / Dining / Dining.SD.Light' Set 'House / Main Floor / Dining / Dining.SD.Light' 20% (On Level) In Scene 'House / Main Floor / Dining / Dining.SD.Light' Set 'House / Main Floor / Dining / Dining.SD.Light' 6.5 Sec (Ramp Rate) Run Program 'Dining.ChangeScene' (If) Else - No Actions - (To add one, press 'Action') Dining.ChangeScene: If Status 'House / Main Floor / Dining / Dining.SD.Light' is not Off Then Set 'House / Main Floor / Dining / Dining.SD.Light' On Else - No Actions - (To add one, press 'Action') So this actually works; at midnight, the system adjusts the scene, runs "Dining.ChangeScene", and the lights follow the scene change. However, it has a nasty side effect. If you try to change the level at the switch, "Dining.ChangeScene" kicks in and puts the light right back to the scene On level (20%). Anyone think of a way to do this that would allow for the local switch to readjust the level at will? Thanks, Bill
Nuttycomputer Posted April 29, 2012 Posted April 29, 2012 Disable the Dining.ChangeScene program. That will stop it from running the IF statement automatically.
wswartz Posted April 29, 2012 Author Posted April 29, 2012 Thanks, this works. I wasn't aware a program could call another program that was disabled. I can think of a bunch of other uses for this. Appreciate the tip. BS
wswartz Posted April 29, 2012 Author Posted April 29, 2012 Sorry, need open this back up; still not working the way I want. So the program "DiningEvening" sets the local on level and ramp rate properly. However, when "Dining.SceneChange executes it's "Then", the On command takes the light to 100%. Using the local switch, or the "On" command from the ISY interface for this light works properly. Is there a difference between "On" from the ISY interface or local switch, and "On" from a program? Is there something I can send from a program that will do what I want? BS
Nuttycomputer Posted April 29, 2012 Posted April 29, 2012 Sorry, need open this back up; still not working the way I want. So the program "DiningEvening" sets the local on level and ramp rate properly. However, when "Dining.SceneChange executes it's "Then", the On command takes the light to 100%. Using the local switch, or the "On" command from the ISY interface for this light works properly. Is there a difference between "On" from the ISY interface or local switch, and "On" from a program? Is there something I can send from a program that will do what I want? BS LeeG might be able to chime in as I'm not in a position to really test this locally for another little while here. However, if your goal is to simply bring the light down to 20% if it is already on when the program runs then instead of Dining.SceneChange issuing an on command you can have it set the level to 20%. The ramp rate was already set so it should be nice and gentle transition still. On a side note there is a difference between issuing an on command to a scene or via a controller. Different controllers of a scene can have different on levels and rates. The scene itself can also have a seperate on level and rate. Is it possible your program is issuing the command to the scene instead of the designated controller?
oberkc Posted April 29, 2012 Posted April 29, 2012 Is there a difference between "On" from the ISY interface or local switch, and "On" from a program? I suspect the problem you are experiencing is due to the insteon feature that enables different ramp rates and levels to be established for the local (switch) setting or when called up as part of a scene. I suspect that if you select the local switch from the admin panel, the "on" level remains 100%, but if you select the scene that includes the switch, the ramp rates and levels for that same switch are different. Your program changes ramp rates and levels for the scene, but leave unchanged the ramp rates and levels for the local device. Unfortunately, when you control the switch manually, the local ramp rates and levels apply, not the scene settings. You could change the local ramp rates and on levels in the program. Unfortunately, I cannot offer the exact language (not at my ISY and don't have it memorized). If another does not offer a suggestion soon, I will get back here when I am near my computer.
LeeG Posted April 29, 2012 Posted April 29, 2012 wswartz The Admin Console On button issues an On command to the defined Local On Level, the Program issues a On command to 100% On. The suggestion by Nuttycomputer to change the Set On in the Program to Set 20% is the answer. The first Program is changing the Local On Level and Local Ramp Rate as evidenced by the paddle turning on to 20%.
Recommended Posts