David D Posted February 15, 2010 Posted February 15, 2010 I know this is probably a no brainer, but I thought I'd opt for the quick answer since writing a program the wrong way will result in lights going on or off at the wrong time and upsetting SWMBO (she who must be obeyed) (Yes, it's happened before...) I have a SwitchLinc next to the door that we go in and out of that is our "Arrive" and "Leave" switch. I also have a LampLinc that is set to come on at Sunset and off at Sunrise unless otherwise controlled. What I'd like, is for my "Leave" scene to dim down this LampLinc to a preset level (say 30%) IF it's after Sunset or off completely if before Sunset. Like I said, I know it's simple. I just want to get it right the first time so I don't mess things up and make my wife (and subsequently ME) uncomfortable! Quote
oberkc Posted February 16, 2010 Posted February 16, 2010 I would try this with two programs. The first would cover the period between sunrise and sunset: if from sunrise to sunset same day and control switch is set off then set lamp to off The second program would look something like: if from sunset to sunrise next day and control switch is set off then set lamp 30% Quote
AnthemAVM Posted February 16, 2010 Posted February 16, 2010 Oberc, Would you need to set one of those to on? Michael Quote
oberkc Posted February 16, 2010 Posted February 16, 2010 It is possible that I misunderstood, but the two requests I see are for 30% and off. Did I miss something? What I'd like, is for my "Leave" scene to dim down this LampLinc to a preset level (say 30%) IF it's after Sunset or off completely if before Sunset. Quote
David D Posted February 16, 2010 Author Posted February 16, 2010 I have two devices (the LampLinc in question and one exterior post light) that are in a "on at sunset, off at sunrise" program. Right now, when I turn off the SwitchLinc by the door ("Leave"), everything turns off except the post light. What I WANT to happen when "Leave" is activated is the lamp in the Kitchen (the LampLinc in question) to turn off if it's during daylight hours (between sunrise and sunset) and dim to 30% at night (between sunset and sunrise). This way, if we leave the house after sunset, we're not shutting off the kitchen lamp and coming home to a dark house. Quote
oberkc Posted February 16, 2010 Posted February 16, 2010 How is your exterior post light controlled? By the switchllinc? What does your switchlinc control directly, if anything? Perhaps I understand your question a little differently now. If your switch is off, you want your lamplinc to go off at sunrise and to 30% at sunset. You want this to happen continuously for as long as you switch remains off, not just at the moment your switch is turned off, based on the conditions at the time. If I understand correctly, there are a couple of ways that I would consider tackling this problem. One way would be to substitute status for control in my previously suggested two programs: if from sunrise to sunset same day and status of switch is off then set lamp to off The second program would look something like: if from sunset to sunrise next day and status of switch is off Alternatively, you may consider creating a program folder which is active when the status of the switch is off. In this folder, place a program: if from sunset to sunrise then set lamp to 30% else set lamp to off Of course, you will want to test these to confirm that they work as you intend. Quote
David D Posted February 16, 2010 Author Posted February 16, 2010 I have two programs for sunrise/sunset: If time is sunrise Then set 'Post Light' Off Then set 'Kitchen Lamp' Off If time is sunset Then set 'Post Light' On Then set 'Kitchen Lamp' On The Kitchen Lamp is plugged into the LampLinc. The Post Light is connected to a KeypadLinc. I want these programs to remain in effect. Basically, I want to add control such that if we leave the house anytime from 6:00 am to sunset, hitting the 'Leave' button will shut off the Kitchen Lamp (LampLinc). If it's sunset or afterwards and before 6:00 am, I want the Kitchen Lamp to dim to 30% when the 'Leave' button is activated. I apologize if I've made this confusing! Thank you for your patience! Quote
TJF1960 Posted February 16, 2010 Posted February 16, 2010 You could take your 2 programs and place them in a folder, set the condition of the folder to something like If "Leave is on" then the programs in this folder will run. Create a new folder with a condition like If "Leave is off" ...... Inside this folder have a program like If Status "Leave" is on and from Sunset to Sunrise (next day) Then Set "Kitchen Lamp" 30% Else Set "Kitchen Lamp" Off Tim Quote
David D Posted February 19, 2010 Author Posted February 19, 2010 Sorry for the late reply on this. I'm having a hard time getting my head wrapped around this, even with all of your suggestions. My ADHD flares up and when it does, I have a hard time sorting things like this out. Let me chew on this for a little while. If anyone has more suggestions, feel free to make them. Maybe something will "click" and I'll "get it". Quote
David D Posted February 21, 2010 Author Posted February 21, 2010 Ok, can I do it using a program like this? If Status 'Dining Rm Entrance' is Off and Time is after Sunset Then set 'Kitchen Lamp' to 30% Else set 'Kitchen Lamp' to Off I would also add other devices into the program that would get shut off regardless of sunrise/sunset. but that should be straightforward, I would think. Quote
oberkc Posted February 21, 2010 Posted February 21, 2010 Ok, can I do it using a program like this? If Status 'Dining Rm Entrance' is Off and Time is after Sunset Then set 'Kitchen Lamp' to 30% Else set 'Kitchen Lamp' to Off First, perhaps we have not been as clear as we should. One does not actually "write" programs. The ISY does this for you, based on conditions and schedules and actions you define. I believe you will have a problem with your program. It may not actually shut the lights off (it is always "after" sunset, whether a few minutes or 23 hours). I believe you should set the second condition to: "and time is between sunset and sunrise". Quote
David D Posted February 21, 2010 Author Posted February 21, 2010 Ok, can I do it using a program like this? If Status 'Dining Rm Entrance' is Off and Time is after Sunset Then set 'Kitchen Lamp' to 30% Else set 'Kitchen Lamp' to Off First, perhaps we have not been as clear as we should. One does not actually "write" programs. The ISY does this for you, based on conditions and schedules and actions you define. I believe you will have a problem with your program. It may not actually shut the lights off (it is always "after" sunset, whether a few minutes or 23 hours). I believe you should set the second condition to: "and time is between sunset and sunrise". Looking at the program options, I don't see the ability to enter "and time is between sunset and sunrise". It gives options for setting time is before or after sunrise or sunset, but not between. Do I need to enter two lines such as?: And time is after sunset and time is before sunrise Quote
oberkc Posted February 21, 2010 Posted February 21, 2010 I apologize for the confusion. It is actually "from". Under the program details tab, add to program: "schedule". In the little schedule window, choose the drop down arrow at "time is", and you can choose "from". This will give you beginning and end times. The actual condition will end up looking like: If From Sunset To Sunrise (next day) Then Else Quote
David D Posted February 21, 2010 Author Posted February 21, 2010 Ok, I've tried changing my program, but am having difficulty with getting it to work properly. How do I copy and paste my program here so you can see it? Quote
Sub-Routine Posted February 21, 2010 Posted February 21, 2010 Hi David, I think the simplest way is to use two programs. Away Nighttime If From Sunset To 6:00:00AM (next day) And Status 'Dining Rm Entrance' is Off Then Set 'Kitchen Lamp' 30% Else - No Actions - (To add one, press 'Action') Away Daytime If From 6:00:00AM To Sunset (same day) And Status 'Dining Rm Entrance' is Off Then Set 'Kitchen Lamp' Off Else - No Actions - (To add one, press 'Action') You may want to use Control instead of Status. Control will only trigger the program when you press the switch. To paste your programs here right click on the program and select 'Copy to Clipboard'. Paste it between Code tags. Rand Quote
David D Posted February 21, 2010 Author Posted February 21, 2010 OK, I think I've got it working. Still need to figure out how to add Button A from a KeypadLinc so I can activate the 'Arrive' and 'Leave' programs from another entrance, but here's what I have thus far: 'Leave (Daytime)' If Control 'Dining Rm Entrance' is switched Off And From Sunrise To Sunset (same day) Then Set Scene 'Master BR Main' Off Set 'Kitchen Lamp' Off Set Scene 'LR Lamps' Off Set 'Dining Rm Lamp' Off Else - No Actions - (To add one, press 'Action') Second program: 'Leave (Nighttime)' If Control 'Dining Rm Entrance' is switched Off And From Sunset To Sunrise (next day) Then Set Scene 'Master BR Main' Off Set Scene 'LR Lamps' Off Set 'Dining Rm Lamp' Off Set 'Kitchen Lamp' 50% Else - No Actions - (To add one, press 'Action') Quote
markens Posted February 21, 2010 Posted February 21, 2010 Still need to figure out how to add Button A from a KeypadLinc so I can activate the 'Arrive' and 'Leave' programs from another entrance That's pretty easy to add to what you have, something like this: 'Leave (Daytime)' If ( Control 'Dining Rm Entrance' is switched Off Or Control 'KPL Button A' is switched Off ) And From Sunrise To Sunset (same day) Then ... --Mark Quote
David D Posted February 21, 2010 Author Posted February 21, 2010 Ok, I've got things to where they work (almost). What is happening now is that after Sunset, if I turn off the Dining Rm Entrance ('Leave'), everything shuts off, including the Kitchen Lamp and the Post Light. What is supposed to happen is if it's after Sunset, all lights should shut off except for the Post Light and the Kitchen Lamp which should dim to 50%. What am I doing wrong? Leave (Daytime) If Control 'Dining Rm Entrance' is switched Off Or Control 'Living Rm Keypad Button A' is switched Off And From Sunrise To Sunset (same day) Then Set Scene 'Master BR Main' Off Set 'Kitchen Lamp' Off Set 'Living Room Keypad - Post Lig' Off Else - No Actions - (To add one, press 'Action') Leave (Nighttime) If Control 'Dining Rm Entrance' is switched Off Or Control 'Living Rm Keypad Button A' is switched Off And From Sunset To Sunrise (next day) Then Set Scene 'Master BR Main' Off Set 'Kitchen Lamp' 50% Else - No Actions - (To add one, press 'Action') Quote
markens Posted February 21, 2010 Posted February 21, 2010 Ok, I've got things to where they work (almost). The parentheses in my example are important, and are not present in your latest code. The underlying problem is that AND is higher precedence than OR, and so the logic is incorrect without the parens. As you write it, "Control 'Living Rm Keypad Button A'" is tested only during the time periods, but "Control 'Dining Rm Entrance'" is always effective. Your two programs battle it out on this event, and it's indeterminate who wins. Put the parens in and see if that fixes it. --Mark Quote
David D Posted February 22, 2010 Author Posted February 22, 2010 Thanks Mark! I added the parentheses and it works now. Thanks again! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.