K O Posted October 30, 2013 Posted October 30, 2013 This is my first post here, but I've been using the ISY for a while now and have a question about an ISY program that misbehaves when the Query All program runs. I'm hoping someone with more knowledge can help. Basics of Programs I created a series of programs that uses the sun and the status of the all the downstairs lights to determine when it's been 'dark' in the downstairs part of the house for more than 15 minutes. Then when the garage door is opened, I look to see if it's been dark for more than 15 minutes and I turn on a bunch of lights that we would ordinarily turn on or need on when getting home. The reason I added the part about being dark for 15 minutes is that I don't want to turn off every light in the house while leaving, open the garage door to leave, and instantly have all the lights turn back on because technically it's dark and the garage door is open. I was trying to leave! Issue The first few days we had this program, it all worked great, but every morning my wife would go downstairs and find all the lights are on, even the stairs lights which are only really on while walking up and down the stairs. This went on for a couple days until I checked the logs and found out that apparently the Query All program that runs at 3am temporarily sets the garage door status to open, tricking my program into turning on the lights. Possible Solutions One way I thought to get around this would be to add a delay to make sure it's 'open' for more than a few seconds before triggering the lights, but I really would like the lights to turn on the instant the garage door opens. Another option is to simply remove the Query All program - I'm not sure what the implications of doing so, as I still don't know what purpose this program serves. A third option would be to set a blackout period in the program that's checking for the garage door to be open and if it's been dark for more than 15 minutes. This would work, but hopefully I never come home between 3:00 and 3:01 am. Also, as a developer by trade, this is just not the right way to do things. Now What? I'd love to know what is the recommended way to handle such a situation. I'd also love to know what purpose the Query All program actually serves. Any advice to rectify this issue would be appreciated. Program Code For Anyone Still Reading Here are the programs, for anyone curious or wanting to implement a similar idea. Also, for bonus points, you can tell me how to write these more efficiently! Downstairs Dark More Than 15 Minutes If Program 'Any Kitchen Lights On' is False And Program 'Any Living Room Lights On' is False And $Downstairs_Dark_More_Than_15_Minutes is 0 Then $Downstairs_Dark_More_Than_15_Minutes = 2 Wait 15 minutes Run Program 'Downstairs Dark More Than 15 Minutes Part 2' (If) Else - No Actions - (To add one, press 'Action') Downstairs Dark More Than 15 Minutes Part 2 If Program 'Any Kitchen Lights On' is False And Program 'Any Living Room Lights On' is False And $Downstairs_Dark_More_Than_15_Minutes is 2 And From Sunset - 30 minutes To Sunrise + 30 minutes (next day) Then $Downstairs_Dark_More_Than_15_Minutes = 1 Else - No Actions - (To add one, press 'Action') Downstairs Dark More Than 15 Minutes Part 3 If Program 'Any Kitchen Lights On' is True And Program 'Any Living Room Lights On' is True Then $Downstairs_Dark_More_Than_15_Minutes = 0 Else - No Actions - (To add one, press 'Action') Garage Door Open Night If Status 'Outside / Garage Door-Sensor' is On And $Downstairs_Dark_More_Than_15_Minutes is 1 Then Set Scene 'Home' On Else - No Actions - (To add one, press 'Action')
PurdueGuy Posted October 30, 2013 Posted October 30, 2013 I'm watching this with interest, as I have a similar setup. However, I do not have a "Query All" program. Never have had one. I found an older thread about someone else not having it, and they were surprised. In fact, Michel even mentioned the 3 AM query in response to a post of mine. I am wondering if I should add it? Background thread about program missing: viewtopic.php?f=27&t=9121 My thread in which Michel commented about it: viewtopic.php?f=26&t=11348#p95427
TJF1960 Posted October 30, 2013 Posted October 30, 2013 Welcome to the forum K O, The only program listed which the nightly query might affect would be program 4 with the garage door sensor. I seem to recall some issues with the iolinc sensors and a query, not sure if that might be the case here or not. I believe it had something to do with whether or not "Trigger Reverse" box was checked. If that is not it then I would next look to make sure the ISY does indeed receive the status updates or not from the iolinc. The nightly query is used to make sure the whole system is in sync, that the ISY is aware of all the correct status of all devices. If you have a rock solid installation with no comm. issues you could do without it, its up to you. Tim
K O Posted October 30, 2013 Author Posted October 30, 2013 The only program listed which the nightly query might affect would be program 4 with the garage door sensor. I seem to recall some issues with the iolinc sensors and a query, not sure if that might be the case here or not. I believe it had something to do with whether or not "Trigger Reverse" box was checked. If that is not it then I would next look to make sure the ISY does indeed receive the status updates or not from the iolinc. Tim, you are correct. It is the 4th program with the garage sensor that's being triggered. I am indeed using the trigger reverse feature of the IO Linc. The IO Linc is setup with the following options: Trigger Reverse, Momentary B, and 2.0 second hold time. Are you suggesting that the trigger reverse in combination with the Query All is what's momentary flagging the IO Linc to be 'open'? The nightly query is used to make sure the whole system is in sync, that the ISY is aware of all the correct status of all devices. If you have a rock solid installation with no comm. issues you could do without it, its up to you. I have a few InLineLinc Dimmers that are not the most reliable things in the world. Usually just tapping a switch in the same scene again fixes it, but I also like the idea of the system re-sync'ing them periodically!
TJF1960 Posted October 30, 2013 Posted October 30, 2013 Yes, here is a statement from LeeG : "Remember that a Query will change the Sensor state because Trigger Reverse is being used. This happens when the I/O Linc comm is working correctly. When Trigger Reverse is being used and Query does not change the Sensor state that indicates a comm problem." from this thread http://forum.universal-devices.com/viewtopic.php?f=27&t=12162&p=94396&hilit=+trigger+reverse+#p94396 You can also do a search of trigger reverse and will find a bunch of links. I have had great comm. for a couple of years now and I still have the nightly query, I figure whats it hurt! Tim
LeeG Posted October 30, 2013 Posted October 30, 2013 It is the use of Trigger Reverse that causes the problem you are seeing. Trigger Reverse reverses the commands the I/O Linc sends when the I/O Linc Sensor changes state. Normally the I/O Linc sends an On command when the Sensor turns On and an Off command when the Sensor turns Off. With Trigger Reverse the commands are reversed. The I/O Linc sends an On command when the Sensor turns Off and an Off command when the Sensor turns On. The use of Trigger Reverse has become common when Smarthome changed the magnetic switch from a combination NO/NC switch to NC only. The issue is Trigger Reverse DOES NOT affect the Query response. A Query always returns an On when the Sensor is On regardless of whether Trigger Reverse is in use. This means the 3AM Query All causes the Sensor state known to the ISY to change. The best solution is to change the magnetic switch from a NC to a NO switch (or go back to what the garage kit was shipped with in the past which is a combination NC/NO magnetic switch). Thanks Tim. Normally the forum lets me know when another post has been done ahead of mine. Missed it this time.
K O Posted October 30, 2013 Author Posted October 30, 2013 Thank you, Lee. That makes sense. I believe the kit I have is this one. I had assumed this was a programming issue, and was not anticipating having to buy a whole new kit. Is there a NO magnet switch you can recommend that would be compatible with my existing kit? And would I simply wire it into the NO port on the IO Linc instead of the NC port?
Brian H Posted October 30, 2013 Posted October 30, 2013 The magnetic switch is wired to the Sensor Input not to the relays NO or NC contacts. So a different magnetic switch would be the answer.
K O Posted October 30, 2013 Author Posted October 30, 2013 The magnetic switch is wired to the Sensor Input not to the relays NO or NC contacts.So a different magnetic switch would be the answer. Thanks, Brian. It has been a while since I setup the IO Linc, and that sort of thing is definitely not in my area of expertise. I do recall thinking the whole thing was backwards after I set it up, then learning about the 'trigger reverse' feature which got it to work correctly in my scene with a red KPL button so we don't accidentally leave the garage door open!
Brian H Posted October 30, 2013 Posted October 30, 2013 The kit use to come with this switch. It does both NC and NO. http://www.smarthome.com/7455B/SECO-LAR ... tch/p.aspx
LeeG Posted October 30, 2013 Posted October 30, 2013 Use the magnetic switch Brian identified in his past post. Use the Red and Black wires connected to the same I/O Linc points the current magnetic switch is connected to. Does not matter which wires (Red or Black) are connected to which I/O Linc magnetic switch connection points. Turn Off Trigger Reverse. No other changes should be necessary. The majority of folks think using a NC magnetic contact (current garage kit package) is the wrong switch.
K O Posted October 31, 2013 Author Posted October 31, 2013 Thank you for the advice. I will order the recommended magnet contact switch and wire it as a NO switch.
Recommended Posts