aLf Posted November 3, 2007 Posted November 3, 2007 Mark: Maybe you can pick this one up? I need to know the code you wrote for the immediate off call for any switch, i.e., I have ISY query a KPL button for status, if OFF=AWAY, if ON=HOME. I need to write a program that will turn every switch off if it gets turned on, if KPL button is OFF. I've though about grouping and ALL-OFF, but som e devices (Xmas light, security etc) have to still be available. I'm OK with writing each one, but had hoped that each individual switch could be addrerssed in one program. Not only will this save a little more energy, but also will be a good security code in that if someone came in and turned on a switch that immediately went out might freak them out thinking someone was home. Your code examples are great and I look forward to this solution and many more of your handy tid-bits. Thanks aLf. Quote
Mark Sanctuary Posted November 3, 2007 Posted November 3, 2007 I have to run some errands for a few hours so when I get back I will write it up for you. Quote
Mark Sanctuary Posted November 4, 2007 Posted November 4, 2007 One program would be nice but I think you might want to do individual programs because the problem you have here is parallel in nature. Make a folder and create all the programs inside it, then you can have only one place to enter the home/away check. Home Folder If Status 'Home Button' is Off Then Allow the programs in this folder to run. Then I would build programs for each device that would turn them back off immediately after someone turned them on. Immediate Off Program If Status 'Kitchen Main' is not Off Then Set 'Kitchen Main' Off Else - No Actions - (To add one, press 'Action') Since programming does not have a space issue on the ISY memory this is the best way I can think of without more complex code. Simple is easier and better I think. Quote
Sub-Routine Posted November 5, 2007 Posted November 5, 2007 Might I suggest you use scenes for the all off? Depending on the switch which was turned on control all the lights near it. Some switches might control more than one scene. And if I may suggest a twist on your immediate off. How about using a FastOn with one (or more scenes) as soon as a device is activated? That would give you good illumination for the cameras Wait some time and then turn the lights out. Rand Quote
Mark Sanctuary Posted November 6, 2007 Posted November 6, 2007 Thanks Rand good ideas! You know there is always more than one way to skin a cat. 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.