tcster Posted June 8, 2008 Posted June 8, 2008 OK, I've look around a bit, but haven't been able to find what I'm looing for. I have a set of drapes powered by a drape motor and an ApplianceLinc. The problem is that you turn the ApplianceLinc on for 45 sec or so, and then back off in order to open or close. That way power is no longer being supplied. I have to KPLs that each have a button to operate the drapes. I also have a timer program. The timer program works great EXCEPT when the drapes have been opened or closed manually (by the KPL buttons). What I'd like to accomplish is a "Status", if you will, of whether the drapes are in an open or closed state. That way my timer program can ask if the drapes are already closed and leave them alone, as opposed to opening them again. Or vice versa. Any thoughts on how I could accomplish this? Thanks, Tracy
IndyMike Posted June 8, 2008 Posted June 8, 2008 tcster, From your description, its sounds like you are using the KPL's to directly control the appliancelinc. Could you instead use the KPL's to trigger a "Drape Controller" program in the ISY? The status of this program could then be used to indicate the position of your drapes. IM
clark21236 Posted June 8, 2008 Posted June 8, 2008 tcster, If you could give a little bit more info on how your drape motor works, maybe I can take what IndyMike has said and head you off in a direction that might work. If the drapes were half way open, and you were to apply power to the appliancelinc for, let's say 2 minutes. What would happen? Would they continue to open fully, then start to close? Or is there some sort of switch that stops them once they have gone the full direction one way? And once that happens, the next time power is applied they go the other way? In the industry I am in, some people use something called incremental control. It is 2 motors stacked together to open and close something. It's a cheap way to perform analog control. The control doesn't really know exactly where to device is, it just calculates it by time. It knows it takes 90 seconds to open or close what ever you are controlling. The things we use work from 0-100%. So controls calculate where a device should be, and if you tell it to go full open, or full closed, it will drive the amount of time it thinks it needs to go to open of close the device, and then it adds about 10% extra time. Depending on how you tell us these drape motors work, maybe this is something that we could use to make your situation work. You wouldn't have status, but you could program the system to control the drapes and take this into account.
tcster Posted June 8, 2008 Author Posted June 8, 2008 Well, I think I have it figured out. I rebuilt my Drape Scene to include the two KPL buttons as controllers. I then created to programs: Drape Open: If Status 'DRKL Drape Switch' is On Or Status 'MKL Drape Switch' is On Then Set 'Drape AL' On Wait 19 seconds Set 'Drape AL' Off Else - No Actions - (To add one, press 'Action') and Drape Close: If Status 'DRKL Drape Switch' is Off Or Status 'MKL Drape Switch' is Off Then Set 'Drape AL' On Wait 19 seconds Set 'Drape AL' Off Else - No Actions - (To add one, press 'Action') After that I created the following conditional for morning timer: If Time is Sunrise + 5 hours And Program 'Drapes Open' is True Then Run Program 'Drapes Close' (Then Path) Else - No Actions - (To add one, press 'Action') That way if the Drapes Open program is true the Drapes Close program will be called, otherwise they will be left alone. Does that seem correct? I'll have to do some more testing to verify everything. Thanks Mike!
IndyMike Posted June 8, 2008 Posted June 8, 2008 tcster, Nicely done. I don't see any problems with what you've posted (although testing is always in order). One additional comment - It appears that your KPL buttons are set to "toggle Mode". If that's the case you could synchronize the buttons so they both indicate the status of your drapes (my apologies if you have already done this). In order to accomplish this - 1) Change your "status" conditions to "control conditions". If 'DRKL Drape Switch' is Switched On Or 'MKL Drape Switch' Switched On This will prevent a scene of program from activating your program (it can only be activated from the KPL's). 2) Create a Scene "KPL drapes" with both of your KPL's as controllers Scene KPL Drapes DRKL as control MFL as control With the above, pressing one of your KPL buttons will activate the associated button on the "other" KPL and will trigger your program. Let us know how things progress, IM
tcster Posted June 9, 2008 Author Posted June 9, 2008 Clark: The drape motor is pretty simple (Smarthome #3142). When power is applied, the motor turns in one direction until the stop is reached. When power is reapplied, the motor turns in the other direction until the stop is reached. For my particular drapes, it takes about 13 seconds to fully open or close. The instructions did say the power should be shut off after the stop has been reached. Hence the need to "shut off" the AppLinc after 19 seconds. Mike: 1st: The two KPL buttons are/were linked as you sugessted. 2nd: Testing proved to me that I couldn't rely on one program or another being true or false when I thought it should be. That cause the drapes to be constantly opening and closing. So, I reworked the programs so that the "status" was determined by the switches current position (on/open or off/closed). So far this seems to be working, but I haven't tested it fully yet. Once I have some better results I'll post the code in case anyone else is interested, or has a better suggestion. Thanks!
IndyMike Posted June 10, 2008 Posted June 10, 2008 Tracy, If your KPL's are linking you could change your condition to: If Status 'DRKL Drape Switch' is On AND Status 'MKL Drape Switch' is On Then Set 'Drape AL' On Wait 19 seconds Set 'Drape AL' Off If you've already changed to the "if Control DRKL Switched on, I'd leave things as is. Since Control functions can only be initiated at the switch (manual press) is would stop other scenes and programs from inadvertently activating your blinds. Thanks for the update. Please do post your code when you're satisfied with the operation. I'm sure you're not the only one automating drapes. IM 1st: The two KPL buttons are/were linked as you sugessted. 2nd: Testing proved to me that I couldn't rely on one program or another being true or false when I thought it should be. That cause the drapes to be constantly opening and closing. So, I reworked the programs so that the "status" was determined by the switches current position (on/open or off/closed). So far this seems to be working, but I haven't tested it fully yet. Once I have some better results I'll post the code in case anyone else is interested, or has a better suggestion. Thanks!
clark21236 Posted June 14, 2008 Posted June 14, 2008 Tracy, did you get this to work to your satisfaction? Or do you still have problems with it? If you still have problems with it, can you explain a little bit more about what switches you are using to control your drape motor. It looks like you are using the switches from a keypadlinc. Are these keypadlincs in different locations? Or, maybe a better way to ask this, are they different keypadlincs?
tcster Posted June 17, 2008 Author Posted June 17, 2008 Let me start by saying thanks to those that have assisted me. Let me also state that my first stumbling block was that I was having the buttons on two different KPLs show me the status of the AppLinc that powered the drapes. The problem with that is that if the drapes were opened or closed "manually", the timed program would then return them to the opposite position. Instead, I changed that, so that the buttons were lit when the drapes are open, and dark when the drapes are closed. That way I can have programs run, but only based on the status of the KPL buttons. So: The "Scene" contains 1 button on each of 2 KPLs. This way iw one is pushed, the other will show the same status. Then there are two programs: Drapes Open: If Status 'DRKL Drape Switch' is On Or Status 'MKL Drape Switch' is On Then Set 'Drape AL' On Wait 19 seconds Set 'Drape AL' Off Else - No Actions - (To add one, press 'Action') and: Drapes Close If Status 'DRKL Drape Switch' is Off Or Status 'MKL Drape Switch' is Off Then Set 'Drape AL' On Wait 19 seconds Set 'Drape AL' Off Else - No Actions - (To add one, press 'Action') These two programs respond to the buttons being pressed. If I understand IndyMike correctly, I could substitute 'Status' cor 'Control'. After that, I have the programs that control the timed opening and closing of the drapes. Since it's summer here, I have the following: Morning Drapes If Time is Sunrise + 6 hours And Status 'DRKL Drape Switch' is On Then Set Scene 'Drape Controller' Off Else - No Actions - (To add one, press 'Action') Evening Drapes If Time is Sunset + 15 minutes And Status 'DRKL Drape Switch' is Off Then Set Scene 'Drape Controller' On Else - No Actions - (To add one, press 'Action') This keeps the sun from glaring into the living room during the afternoon. Come winter I'll reverse the programs. The nice part is that if the drapes are "manually" opened in the afternoon, they stay opened during the Evening Drapes program whereas before they would go to the opposite state, i.e. closed. I've probably confused everyone at this point, but I'll end by saying that it seems to be working much better than it was before.
Sub-Routine Posted June 18, 2008 Posted June 18, 2008 I thought you were already using scenes. Interesting reading, thank you for posting. You have very good ideas. Rand
Recommended Posts