yardman 49 Posted November 12, 2007 Posted November 12, 2007 Hello all: I just wanted to get your ideas on the following: - I want to write a program that monitors many different Insteon devices in my basement. As long as at least one of them is on, I want that reflected as a "backlight on" on a KPL in my kitchen. If all of the basement devices are off, then I want the Kitchen KPL button backlight to also be off. I have my own ideas, but I don't want to miss anything. So your input would be appreciated. Thanks you. Quote
Michel Kohanim Posted November 13, 2007 Posted November 13, 2007 Hello Frank, I am not going to feign mastery of programs (I leave that for Chris) but, just in case you have not read the documents in our forum, I have to let you know that your Kitchen KPL button has to be in a scene for your programs to be able to activate its backlight. So, the first step is to make a scene called Basement Status and put your desired Kitchen KPL button in there. With kind regards, Michel Hello all: I just wanted to get your ideas on the following: - I want to write a program that monitors many different Insteon devices in my basement. As long as at least one of them is on, I want that reflected as a "backlight on" on a KPL in my kitchen. If all of the basement devices are off, then I want the Kitchen KPL button backlight to also be off. I have my own ideas, but I don't want to miss anything. So your input would be appreciated. Thanks you. Quote
yardman 49 Posted November 13, 2007 Author Posted November 13, 2007 Hello Michel: Thanks, Michel. Yes, I know that that button has to be in a scene, a "one-button scene". So what I want to do is to write a program that monitors the status of all my basement lights, then only turns that "one button scene" off when all of my basement lights are off (and on when at least one of the basement lights are on). This should be an easy program to write. But I just wanted to make certain that I didn't encounter any "gotchas". I figured that Mark or MikeB or others may have ideas. Best wishes, Quote
MikeB Posted November 13, 2007 Posted November 13, 2007 I currently have a couple buttons that I use for "1st floor off" and "2nd floor off". They're simply KPL buttons in non-toggle off mode that are controllers of all my switches. I'd love to have some kind of indication that a light was left on, but I believe I'd need to take the button out of non-toggle mode to get that. I don't really like the idea of accidentally pushing a single button and turning all the lights/vents on. Maybe if I had some extra buttons available on my KPL I could make one button an indicator like you're suggesting, but use a 2nd button in non-toggle mode off to actually turn the lights off. What are your plans? Quote
yardman 49 Posted November 13, 2007 Author Posted November 13, 2007 Hello Mike: Thanks for the reply. Let me give more detail on what I've currently got set up. KPL G in my kitchen is linked through a scene to all of the switch devices in the basement. They are all set as responders only. With a single push (in toggle mode) of the Kitchen G all of the basement lights come on. Also included are the basement KPL and all of the Togglelinc dimmers and relays that are part of the n-way circuits down there so that the status reflect properly. The KPL G is only set as a responder to just one of the basement groups (scenes), that is the basement stairway group. So if the basement stairway lights go off, the Kitchen KPL G goes off. As most of the time the stairway lights are always on when the basement is occupied (even if in some other scenes they are called out as dimmed) that gives me a partially reliable status of the basement. I can't make KPL G a responder to all of the lights for the following reason: the moment that one of the lights gets turned off from down in the basement, the KPL G backlight will also go off, and we wouldn't know that there really are lights still on in the basement. Of course, this then creates the opposite problem: if the lights are all off in the basement, and someone from down there turns on any of the lights, the kitchen KPL G does not have the backlight go on. Of course, this is the typical "scene" quandry. Nothing new here. So, I'm going to write a program that just monitors the status of all of the downstairs lights, and the Kitchen KPL G will repond to the status of the basement light. I already have a group (scene) created that only has KPL G in it, and I use that successfully in other programs. I'll let you know what I work out. Best wishes, Quote
MikeB Posted November 13, 2007 Posted November 13, 2007 Thanks. I'm very interested in how you make out. If I get some time over the next few days, I may experiment here as well. Like I mentioned, in my master bedroom I have a KPL button that is a controller of the scene '1st floor off' that contains all of my 1st floor lights & vents. They are all responders of this scene. The KPL button is set to non-toggle off so that I can simply press it before going to bed, and have everything downstairs turn off. Works great, but there's no real indication that something is actually on down there. It would be nice to have that indication. An indicator light seems easy enough, I think... just make a program that says 'if light1 is on or light2 is on or light3 is on..." then scene "indicator1" is on. Else, it is off. But, how do you make that same button control that group of lights? If I had room in my KPL, I'd just keep 2 KPL buttons. I'd keep my current '1st floor off' and make a '1st floor status' KPL button right above it that acts as an indicator. Or is there a better way that I'm missing? Quote
yardman 49 Posted November 14, 2007 Author Posted November 14, 2007 Hello Mike and everyone: Ok, I was able to get the desired functionality to work. Here is what I did: I had to write two programs. They are as follows: ******************************************* program name: TURN KITCHEN KPL G ON If Status 'Kitch KPL G - Lower Level' is Off And ( Status 'Bsmt Entry Dimmer - 2G' > Off Or Status 'Bsmt Game Dimmer - 3G' > Off Or Status 'Bsmt Sconce Relay - 3G' is On Or Status 'Bsmt KPL A - Soffit Dimmer' > Off Or Status 'Bsmt Family Dimmer - 3G' > Off Or Status 'Bsmt Stairway Dimmer' > Off ) Then Wait 1 second Set Scene 'Kitchen KPL G Group' On Else - No Actions - (To add one, press 'Action') ********************************************* program name: TURN KITCHEN KPL G OFF If Status 'Kitch KPL G - Lower Level' is On And ( Status 'Bsmt Entry Dimmer - 2G' is Off And Status 'Bsmt Game Dimmer - 3G' is Off And Status 'Bsmt Sconce Relay - 3G' is Off And Status 'Bsmt KPL A - Soffit Dimmer' is Off And Status 'Bsmt Family Dimmer - 3G' is Off And Status 'Bsmt Stairway Dimmer' is Off ) Then Wait 1 second Set Scene 'Kitchen KPL G Group' Off Else - No Actions - (To add one, press 'Action') ******************************************** Possibly there is a more elegant way to do this, so if anyone can think of one, please feel free to share. "Kitchen KPL G Group" is a scene that consists of just the "Kitch KPL G - Lower Level" button. So the " Kitch KPL G - Lower Level" button status, in conjuction with the basement switch statuses, will cause the "Kitch KPL G - Lower Level" backlight to either go on or off as appropriate to the true status of the basement lights. I found that I had to put a 1 second delay for the "Kitchen KPL G Group" status change in these programs. Otherwise, KPL button G (which is both the initiator and recipient of the program) was getting bombarded with traffic while the lights were turning on, which eventually caused the KPL to lock up. I then had to go back an resolve some conflicts with other status changes that I have programmed into the ISY. But after fixing these, this seems to work well. I wonder if this would work for you , MikeB. I haven't tried it with buttons in non-toggle mode, though. Best wishes Quote
MikeB Posted November 16, 2007 Posted November 16, 2007 OK - here we go... I've been playing with this a bit today, and haven't had much luck. Like I said, to turn entire floors off at night I simply have a KeypadLinc Secondary linked as a controller to a scene containing the entire floor. This button is set to non-toggle mode off, so at night we simply press "1ST FLOOR OFF" and the entire first floor turns off. Since the button is a non-toggle off, you can't accidentally turn on an entire floor. Exactly what I want, with one limitation - we don't really know if there's anything actually left on. 1ST TRY: First I created a scene called 1stFloorStatus. I added the button KPLH as a responder of that scene. I then tried creating a group called 1stFloorAll. I added all my 1st floor lights to this group, and also added KPLH as a controller. I set this button to non-toggle OFF. I tested it's operation - the backlight is always off, and when I press the button it turns everything on the 1st floor off. Exactly what I want for control, but still no status. I then created a program that said basically if any of the lights on the 1st floor had a status of ON, turn the 1stFloorStatus ON, else turn it OFF. This worked - if any of the lights were on, the KPLH button's backlight turned on. If I turned all the lights off, the backlight went off. However, if any lights (and backlight) are on, and I press the KPLH button, it sends an ON command to all the lights - which I don't want. I only want to be able to turn the lights OFF from KPLH. 2ND TRY: I again created the scene 1stFloorStatus containing KPLH, and created scene calle 1stFloorAll contraining all my 1st floor lights. However, this time, I didn't add KPLH to that scene. Instead, I created a program that said if KPLH control is turned OFF, then turn off 1stFloorAll. I also kept the program that turned 1stFloorStatus on or off based on the status of the lights. KPLH's backlight turns on and off depending on the status of the 1st floor lights - however, pressing the button to turn KPLH OFF doesn't do anything. I have a feeling this is because KPLH does not send a signal to the PLM when it is turned off. Is this correct? Any other suggestions? Quote
MikeB Posted November 16, 2007 Posted November 16, 2007 OK, correction - my 2nd try is now working. I realized the ISY wasn't getting status updates from my KPL unless I did a query. I removed and re-added the device, and now it's working. So, here's what I've done, using my office as an example: Created a scene called "OfficeStatusLight" which contains the KPL secondary button "OfficeKeypadH". This button will be used to turn off my office lights. Its backlight will be on if any of my office lights are on. I also created a scene called "OfficeAll" which contains all of my office lights as responders. I created a program called "OfficeStatusProgram", which runs the following: If Status 'Office1' is On Or Status 'Office2' is On Or Status 'OfficeCounter' is On Then Set Scene 'OfficeStatusLight' On Else Set Scene 'OfficeStatusLight' Off This allows me to see the status of my office lights. If any are left on, my "OfficeKeypadH" button will be lit up. However, I still don't have control. All I want is to be able to turn all the office lights OFF. I DON'T want the ability to turn them all on. So, I created the following program: If Control 'OfficeKeypadH' is switched Off Then Set Scene 'OfficeAll' Off Else - No Actions - (To add one, press 'Action') This allows me to turn all of my office lights off simply by pressing my "OfficeKeypadH" button to turn it off. The only thing I didn't like about this is that if my office lights are off (which means the OfficeKeypadH is off), someone could accidentally press the keypad button to turn the backlight on, making it look like an office light was left on. To avoid this, I created the following "fix" program: If Control 'OfficeKeypadH' is switched On Then Set Scene 'OfficeStatusLight' Off Else - No Actions - (To add one, press 'Action') This will "correct" someone accidentally pressing that button, by immediately turning it back off. This seems to be working well for me (at least in my initial testing). Anyone have any comments on how I might do this more efficiently? Am I missing something? Also, if I wanted to have a single Keypad LED indicate if ANY light in my house was left on, I would have to create a huge program - with 60+ IF statements as conditions. Is this a problem for the ISY-26? Thanks guys... Quote
MikeB Posted November 16, 2007 Posted November 16, 2007 One more question... Why isn't this ELSE statement in my first program working?: Else Set Scene 'OfficeStatusLight' Off With this ELSE statement, I would think that if someone accidentally pressed my KPL status light to turn it ON, and all my office lights were OFF, that the status light would turn itself back off. It doesn't seem to work like I would think, which is why I had to create my 'fix' program. Can someone clue me in? Quote
Chris Jahn Posted November 16, 2007 Posted November 16, 2007 Mike, These programs look like a good way to do this. Also, if I wanted to have a single Keypad LED indicate if ANY light in my house was left on, I would have to create a huge program - with 60+ IF statements as conditions. Is this a problem for the ISY-26? This is not a problem for the ISY-26, you can have any number of conditions. Why isn't this ELSE statement in my first program working?: The ELSE isn't running because the actual status of those lights hasn't changed, and thus the program won't run. You could change your fix program as follows, so that if someone does fast on, brighten etc. with Keypad H it will still turn off the backlight: If Program 'OfficeStatusProgram' is False And Status 'OfficeKeypadH' is not Off Then Set Scene 'OfficeStatusLight' Off Else - No Actions - (To add one, press 'Action') Quote
MikeB Posted November 17, 2007 Posted November 17, 2007 Awesome, thanks! Should I remove that ELSE command then? It seems like it's useless. Quote
Chris Jahn Posted November 17, 2007 Posted November 17, 2007 Yes, the original ELSE command can be removed if you use the fix program I posted. Quote
MikeB Posted November 18, 2007 Posted November 18, 2007 OK, I went ahead and reprogrammed all my 1st/2nd floor off buttons per my posts above, and it seems to be working great! Only downside is there is a 1 second or so delay from when I press the 'off' button to when the lights shut off (because that button press is executing a program on the ISY, whereas before it was directly linked to the appropriate lights). The obvious upside is that I now have an LED that tells me when a light was left on, which is real nice. I did make a couple changes: 1 - In my IF conditions to check the status of my lights, instead of listing EVERY light I only listed the load controlling ones. So, if light1 and light2 were switches in a virtual 3-way circuit, the program would only check to see if light1 was on. Also, I only check the switches themselves - not any lamp modules, which are only on if a linked switch is on anyway. Even though Chris said the ISY could handle tons of conditions, I'd rather make my programs as simple as possible. 2 - In my example above, my condition checked to see if my lights were ON. This is fine in my office, where my switches are all relays. However, in my final programs, I checked to see if the switches were NOT OFF instead to account for any dimmed lights. Here are my final 1st floor programs. For my 1st floor, I created 2 "fix" programs because I have 2 separate keypad buttons that need to show the status and control: FLOOR 1 STATUS UPDATE If Status 'Bathroom1stLaundry1' is not Off Or Status 'Bathroom1stMirror1' is not Off Or Status 'Bathroom1stVent1' is not Off Or Status 'FoyerMain1' is not Off Or Status 'KitchenBar1' is not Off Or Status 'KitchenMain1' is not Off Or Status 'KitchenSink1' is not Off Or Status 'KitchenTable1' is not Off Or Status 'LivingRoomControls1A' is not Off Or Status 'LivingRoomMain1' is not Off Or Status 'PlayRoomMain1' is not Off Then Set Scene 'Floor1StatusLight' On Else - No Actions - (To add one, press 'Action') FLOOR 1 CONTROL If Control 'FoyerControls1G' is switched Off Or Control 'MasterBedControls1G' is switched Off Then Set Scene 'Floor1Off' Off Else - No Actions - (To add one, press 'Action') FLOOR 2 STATUS FIX 1 If Program 'Floor 1 Status Update' is False And Status 'FoyerControls1G' is not Off Then Set Scene 'Floor1StatusLight' Off Else - No Actions - (To add one, press 'Action') FLOOR 1 STATUS FIX 2 If Program 'Floor 1 Status Update' is False And Status 'MasterBedControls1G' is not Off Then Set Scene 'Floor1StatusLight' Off Else - No Actions - (To add one, press 'Action') Quote
yardman 49 Posted November 21, 2007 Author Posted November 21, 2007 I did make a couple changes: 1 - In my IF conditions to check the status of my lights, instead of listing EVERY light I only listed the load controlling ones. So, if light1 and light2 were switches in a virtual 3-way circuit, the program would only check to see if light1 was on. Also, I only check the switches themselves - not any lamp modules, which are only on if a linked switch is on anyway. Even though Chris said the ISY could handle tons of conditions, I'd rather make my programs as simple as possible. 2 - In my example above, my condition checked to see if my lights were ON. This is fine in my office, where my switches are all relays. However, in my final programs, I checked to see if the switches were NOT OFF instead to account for any dimmed lights. Hello Mike: I really like to way you optimized your programs. I had also come to the same conclusions: For point #2, that is exactly what I did for my program, for the same reason: if a light is dimmed, it really is not "on", but neither is it off. So I used ">OFF", rather than ON. And for point #1, I took the same approach: only the load controlling devices need be included foir monitoring. The moment they get turned on by another controller, then their status gets read back to the ISY as ">OFF" (or "ON" for a Togglelinc) and thus the program runs anyway since it sees that the load device has switched on. Best wishes Quote
Chuck Posted November 26, 2007 Posted November 26, 2007 I'm glad I'm not the only one working on this... I have an 'ALL OFF' button E on a KPL I use for 2 purposes: 1) To turn off everything when pressed (the LED status is then on). 2) Monitor the status of all loads and be a status indicator of whether or not all devices are actually off. For part 1: If Control 'Living Room - ALL OFF' is switched On Or Control 'Office Ceiling Light (load)' is switched Fast Off Or Control 'Office - Living Room Lamp' is switched Fast Off Then Set Scene 'ALL OFF (program-activated)' Fast Off Else - No Actions - (To add one, press 'Action') Where Scene 'ALL OFF (program-activated)' contains all devices and KPL buttons. This has been working fine. For part 2: If Status 'Basement Playroom Lights (loa' is Off And Status 'Dining Room - DECK' is Off And Status 'Dining Room - LIGHT (load)' is Off And Status 'Dining Room - YARD' is Off And Status 'Dining Room Ceiling Fan (load' is Off And Status 'Kitchen Ceiling Lights (load)' is Off And Status 'Kitchen Sink Light (load)' < 40% And Status 'Living Room Ceiling (load)' is Off And Status 'Living Room Lamp (load)' is Off And Status 'Office Ceiling Light (load)' is Off Then Wait 2 seconds Set Scene 'ALL OFF LED' On Else Wait 2 seconds Set Scene 'ALL OFF LED' Off The problem: it works about 75% of the time. It sometimes fails when another scene is activated (which turns on some lights and therefore should turn off the 'ALL OFF' LED. Other times the LED won't turn on even though all lights are off and their status is correct on the ISY GUI. I have experimented with "Wait" delays of 1, 2 and 3 seconds and 2 seems to be the most reliable. I wish there was a written "best way" of accomplishing this. I would love for this to work reliably! Any suggestions would be greatly appreatiated. Thanks! Chuck Quote
Michel Kohanim Posted November 26, 2007 Posted November 26, 2007 Hi Chuck, Without knowing what's in your All Off scene, it would be pretty difficult to figure out what's causing the issues. As far as delays: If your programs are based on the status of devices in a scene which then try to do something to the same scene, then the best delay would be 500 m.s. times the number of devices in the scene (the amount of time it takes for the group cleanup). If you wish, please let me know what you have in your All Off scene and then we go from there. With kind regards, Michel I'm glad I'm not the only one working on this...I have an 'ALL OFF' button E on a KPL I use for 2 purposes: 1) To turn off everything when pressed (the LED status is then on). 2) Monitor the status of all loads and be a status indicator of whether or not all devices are actually off. For part 1: If Control 'Living Room - ALL OFF' is switched On Or Control 'Office Ceiling Light (load)' is switched Fast Off Or Control 'Office - Living Room Lamp' is switched Fast Off Then Set Scene 'ALL OFF (program-activated)' Fast Off Else - No Actions - (To add one, press 'Action') Where Scene 'ALL OFF (program-activated)' contains all devices and KPL buttons. This has been working fine. For part 2: If Status 'Basement Playroom Lights (loa' is Off And Status 'Dining Room - DECK' is Off And Status 'Dining Room - LIGHT (load)' is Off And Status 'Dining Room - YARD' is Off And Status 'Dining Room Ceiling Fan (load' is Off And Status 'Kitchen Ceiling Lights (load)' is Off And Status 'Kitchen Sink Light (load)' And Status 'Living Room Ceiling (load)' is Off And Status 'Living Room Lamp (load)' is Off And Status 'Office Ceiling Light (load)' is Off Then Wait 2 seconds Set Scene 'ALL OFF LED' On Else Wait 2 seconds Set Scene 'ALL OFF LED' Off The problem: it works about 75% of the time. It sometimes fails when another scene is activated (which turns on some lights and therefore should turn off the 'ALL OFF' LED. Other times the LED won't turn on even though all lights are off and their status is correct on the ISY GUI. I have experimented with "Wait" delays of 1, 2 and 3 seconds and 2 seems to be the most reliable. I wish there was a written "best way" of accomplishing this. I would love for this to work reliably! Any suggestions would be greatly appreatiated. Thanks! Chuck Quote
Chuck Posted November 27, 2007 Posted November 27, 2007 Michel, The devices in the ALL OFF scene include: (1) SwitchLinc Relay Timer v.63 (1) In-LineLinc Relay v.2A (1) 2476DH SwitchLinc Dimmer v.28 (4) SwitchLinc Dimmers v.27 (2) KeypadLinc Dimmers v.29 with (1) load-button and ( sub-buttons (2) LampLincs v.28 All are responders. Hope this helps. Thanks, Chuck Quote
Chuck Posted November 27, 2007 Posted November 27, 2007 Sorry - I forgot to diable smilies: Michel, The devices in the ALL OFF scene include: (1) SwitchLinc Relay Timer v.63 (1) In-LineLinc Relay v.2A (1) 2476DH SwitchLinc Dimmer v.28 (4) SwitchLinc Dimmers v.27 (2) KeypadLinc Dimmers v.29 with (1) load-button and ( sub-buttons (2) LampLincs v.28 All are responders. Hope this helps. Thanks, Chuck Quote
IndyMike Posted November 27, 2007 Posted November 27, 2007 Chuck, You and I are doing very similar things (right down to using Keypad E for alloff/allon). While I don't see anything wrong with your "alloff LED trigger", I'm using inverted logic (or's) and things appear to be working (actually this is shameless plagiarism of an example from MikeB - thanks Mike) . The following is how your trigger would look with the logic inverted. ifStatus 'Basement Playroom Lights (loa' > Offor Status 'Dining Room - DECK' > Offor Status 'Dining Room - LIGHT (load)' > Offor Status 'Dining Room - YARD' > Offor Status 'Dining Room Ceiling Fan (load' > Offor Status 'Kitchen Ceiling Lights (load)' > Offor Status 'Kitchen Sink Light (load)' > 40%or Status 'Living Room Ceiling (load)' > Offor Status 'Living Room Lamp (load)' > Offor Status 'Office Ceiling Light (load)' > Off ThenWait 2 secondsSet Scene 'ALL OFF LED' off ElseWait 2 secondsSet Scene 'ALL OFF LED' on Quote
Michel Kohanim Posted November 27, 2007 Posted November 27, 2007 IndyMike, YES! Thank you so very much. In effect: Chuck's program requires everything to be off and there might actually be a device at 10% which makes the program not run. Chuck, Would you please try IndyMike's suggestion and let me know how it turns out. With kind regards, Michel Quote
Chuck Posted December 1, 2007 Posted December 1, 2007 Tried it, but this does not solve the problem. I just checked the Adminstrative Console and it states my Dining Room Light (load) KeypadLinc Dimmer (2486D) is ON (it's not and the device itself indicates it is 100% off). Quote
Chuck Posted December 1, 2007 Posted December 1, 2007 Also... I just pressed the 'Light Off' button (the bottom button in a 6-button configuration) and this did correct the status in the Administrative Console and the 'ALL OFF' button on the other KeypadLinc turned on (as it should). The 'Light Off' button was already lit before I pressed it. Why would the status be wrong in the Admin Console? Quote
MikeB Posted December 1, 2007 Posted December 1, 2007 Some kind of communication issue. Test it a bunch of times - "on, off, on, off"... see if you can get it to go out of sync. 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.