Jump to content

Difference: Manual vs Programmed Query


justin.cool

Recommended Posts

Programmed Query vs a Manual Query

 

Another fundamental question that I have been unable to figure out…….and would therefore appreciate some guidance here.

 

There seems to be a difference between a Manual Query, done through the admin console, vs a programmed query, done by an ISY-99 program at regular intervals.

 

Let me explain:

 

I have a bathroom light on a 30 minute timer (kids never seem to turn it off).

However, it is on a troublesome circuit with lots of noisy devices, including my daughters cell phone chargers, laptop chargers, and multiple other small transformer powered devices. As a result, the timer program does not always detect the light being turned on and thus the timer will not initiate and be automatically turned off.

 

I have been through filtering attempts, but there are just too many kid driven variables here to make it worthwhile. Thus I wrote a simple query program, right from the ISY-99 users guide, that queries the light every 5 minutes.

 

I tested the concept by manually executing a query when the light was ON but the timer program status was FALSE, ie the timer was not running. When the manual query ran, the timer program kicked off and waited the programmed 30 minutes and then turned off the light as desired.

 

However, under the same conditions,

• The light was ON

• Timer program status was FALSE

 

I had the query program running, and the timer program status did NOT become TRUE, and thus did not kick off. In addition, it appeared that the ISY-99 was running a query by the dialog box / timer box and “system busy†for a split second.

 

See programs below. What am I missing?

 

Query Program

 

If

From 12:05:000 AM

For 24 hours

 

Then

Repeat Every 15 seconds

Set “Upstairs Bthroom Sink Lites†Query

Set “Office Test KPL 15.62.7A†On

 

Else

- No Actions

 

 

 

Timer Program

 

If

Status “Upstrs Bathroom Remote Swlinc†is On

Or “Upstrs Bthroom Sink Lites†is On

 

Then

Wait 30 minutes and 10 seconds

Set Scene “Upstrs Sink Lites†Off

 

Else

- No Actions

 

 

 

1. Note that the very short query interval of 15 seconds was done for my testing so I didn’t have to wait minutes for the query to take place.

2. The Office Test KPL is a test KPL next to my computer and was there for debug purposes. And it was turned ON every 15 seconds so I knew the program was executing.

Link to comment
I had the query program running, and the timer program status did NOT become TRUE, and thus did not kick off

 

I understand manual and programmed queries to yield the same results.

 

Did you happen to notice whether the status of your light was changed? Programs based on status only evaluated if the status CHANGES. If your light status already showed "on", and the programmed query resulted in "on", then there was no change in the status, and the program conditions would not evaluate.

 

I am unsure about whether device status is more or less reliable than reciept of device control signals, but you may give "control" a try as a condition of your program, rather than "status". Perhaps you will find it more reliable.

 

Also, while I share your suspicion of the various power supplies being a problem, I feel compelled to ask what are your bathroom lights? CFL? Low voltage? LED? Is it possible that the lights, themselves are contributing to the communication problems?

Link to comment

Oberkc,

 

Thanks for your quick response. Let me answer your questions a bit out of order:

 

1. CFLs. No CFL's, incandescent only. Have isolated most of the problem to the iHome docking stations my teens have. When I put the iHomes on filters, the communication is a lot more reliable, not perfect but better. However, the constant rearranging my daughters do makes this impractical.

 

As for your question here:

 

Did you happen to notice whether the status of your light was changed? Programs based on status only evaluated if the status CHANGES. If your light status already showed "on", and the programmed query resulted in "on", then there was no change in the status, and the program conditions would not evaluate.

 

Here are the steps, (with STATUS vs CONTROL in the program IF statement)

 

Scenario 1

• Turn light ON via ISY and timer kicks in as expected

• STOP the timer program via the Program Summary window – Status of the program remains TRUE

• Run the ELSE statement via the Program Summary window – Status of the program goes to FALSE

• Perform a manual Query (note light is still ON)

• The timer program kicks in as expected, status goes to TRUE and turns light off at end of timer period

 

 

Scenario 2:

• Turn light ON via ISY and timer kicks in as expected

• STOP the timer program via the Program Summary window – Status of the program remains TRUE

• Run the ELSE statement via the Program Summary window – Status of the program goes to FALSE

• Enable the Query program. (Note, the light is still ON).

• Run the IF statement of the Query program via the Program Summary window.

• Every 15 seconds a query is executed, as well as the Test KPL button A turned on. (Part of my debug in the program).

• The timer program does NOT kick in, status remains FALSE.

 

Thus, the difference here is the results I get at the last step of each scenario.

 

As for using Control, instead of Status. That may be more reliable, and will try that going forward, but the difference above is still vexing, or indicates that I really don’t understand what is going on. More likely the latter.

Link to comment
As for using Control, instead of Status. That may be more reliable, and will try that going forward, but the difference above is still vexing, or indicates that I really don’t understand what is going on. More likely the latter.

 

Very likely the latter for both of us.

 

Regarding scenerio 1, last bullet....I am actually surprised that the timer program kicks in. Since the light was already on, running a query would yield these results, with no change in status detected, and no program evaluation conducted. The only explanation that I can think of is that the ISY thinks the light started as off. Did you check the ISY-assumed status for the light prior to performing the manual query?

 

Understand that it is possible for a light to be physically on, but the ISY think it off (and vice versa). I am still unclear whether you checked ISY status for these devices. My suggestion is to confirm ISY status for both light and swlinc prior to running these two experiments again.

Link to comment

Oberkc,

 

As suggested:

 

Part 2 – With more double checking at each step

 

Here are the steps, (with STATUS vs CONTROL in the program IF statement)

 

Scenario 1

• Timer program status = FALSE

• Check that is light is off, verify that ISY status is OFF.

• Turn light ON via ISY.

• Verify that light is ON.

• ISY status for light is ON

• Timer program status is TRUE, Timer has kicked in as expected. (“Running Thenâ€)

• STOP the timer program via the Program Summary window – Status of the program remains TRUE

• Run the ELSE statement of the timer program via the Program Summary window – Status of the program goes to FALSE

• Verify that the light is ON

• ISY status for the light is ON

• Perform a manual Query (right click on mouse in admin console window)

• ISY status for light is ON

• The timer program kicks in as expected, status of timer program = TRUE

• Verify that the light is ON

 

 

 

Scenario 2:

• Timer program status = FALSE

• Check that is light is off, verify that ISY status is OFF.

• Turn light ON via ISY.

• Verify that light is ON.

• ISY status for light is ON

• Timer program status is TRUE, Timer has kicked in as expected. (“Running Thenâ€)

• STOP the timer program via the Program Summary window – Status of the program remains TRUE

• Run the ELSE statement of the timer program via the Program Summary window – Status of the program goes to FALSE

• Verify that the light is ON

• ISY status for the light is ON

• Enable the Query program.

• Save Changes in the program details window

• ISY Status of light = ON

• Verify light is ON

• Timer program status = FALSE

• Run the IF statement of the Query program via the Program Summary window.

• Every 15 seconds a query is executed, as well as the Test KPL button A turned on. (Part of my debug in the program).

• The timer program does NOT kick in, status remains FALSE.

• Verify again ISY status of light = ON

• Light is actually ON

Link to comment

Couple of points here:

 

Is the outlet in question a GFCI or standard outlet? (I ask because all the bathroom fixtures must be protected by a GFCI, but they may be standard outlets that are wired downstream of a GFCI.) If the outlets creating problems are standard, the best way to handle filters here is to semi-permanently affix a filter to the top socket of the outlet such that it covers both sockets, seal off the pass-through outlet, then plug in a power strip and mount that to the adjacent wall. Spend a little extra to get a strip that orients the sockets next to each other instead of above and below and that offers a couple of widely-spaced sockets designed to accommodate wall wart power supplies. The kids should like it, it gives them added flexibility on plug use and a single on/off switch that doesn't require they be plugging and unplugging things when they head off to school.

 

Next, explain to them, in a loving and calm way, that their household privileges are not God-given and are subject to compliance with household rules about not unplugging filters or bypassing filters or doing other things that drive Dad crazy! :D

 

(If the outlet is a GFCI, you may want to explore changing the single-gang box to a double, then mounting a wire-in signal filter in the box and covering it with a blank wall plate. Then you could plug the power strip directly into the socket.)

Link to comment

fitzpatri8

 

1. The outlets in the bathroom are GFCI protected by one GFCI outlet.

 

2. This could very well be contributing to the problem. As for flitering, here is what i have done to date:

 

- All power stirps are pass through only, no surge suppressors or other stuff

- half a dozen X-10 Pro 5A plug in filter modules

- 3 20A wired in filters for dedicated branch circuits (AV equipment for example)

- 4 five amp universal block filters from leviton

- Minimized CFLs

 

3. It is not feasible to monitor or even track every new electronic device my daughters and wife bring into the house, much less where they plug them in. (However, I do applaud your "not a God-given right" approach). Thus, some amount of noise is just a fact of life. The impact has been isolated to this ONE branch circuit that has way too many outlets and lights on it, but will be a major rewire to fix. (It is on my list of things to do). I don't have a problem with that. However, all that said, I believe a Query type program is a reasonable way to mitigate the impact of the relatively low level of noise I am now experiencing. Thus, my question about the two query types that seem to be behaving differently.

 

As usually happens, it is probably something boneheaded that I am doing that is causing the issue. So, I stand ready for enlightenment by those far more experienced and intelligent than me.

Link to comment

Regarding part 2, scenario 1...

 

I continue to be a little surprised that the timer program kicks in after the manual query. The ISY status for the light was confirmed on prior to the manual query. Running the query returns an "on" statement (did you confirm the ISY light status AFTER the query?). This does NOT constitute a CHANGE in status, therefore, I would not expect any evaluation of the timer program to occur. Perhaps I don't understand the relationship between what you call "the light", the device "upstrs bathrrom remote swlinc", the device "Upstrs Bthroom sink lites", and the scene "Upstrs Sink Lites". I have been assuming that the two devices are part of the scene, and that "the light" is one of the two devices. I must conclude that I don't understand program triggers as much as I had thought.

 

BTW, I expect the timer program status, while interesting, to be irrelevant to your problems here.

 

The scenerio 2 is consistent with my prediction of how this program should behave. It does not surprise me that the timer program does not kick in after running the query program, since there appears to be no change in status.

 

The only thing that I can think of (regarding your programs) is that one of your two devices ("upstrs bathrrom remote swlinc", and "Upstrs Bthroom sink lites") is, somehow, changing status throught scenerio 1. I am curious which of these two devices actually controls "the light" and as to the relationship between this one and the other.

 

fitzpatri8 had a good suggestion regarding GFCI outlets. I believe I have read that these can interfere with powerline signals. Are your two insteon devices downstream of a GFCI outlet (many baths are wired this way)? If you are unsure, you can check by pushing the test button on the GFCI. If you insteon devices loose power, then they are downstream and limited by the outlet's ability to pass insteon signals.

 

I also don't know the exact devices in question here, but have you looked to see if there are dual-band replacements for these two? If so, I wonder aloud if this may alleviate much of your communication problems.

Link to comment

Round 3

 

I think I see what you may be poking at. Anyway, let me answer your questions first:

 

Relationships:

 

1. "Upstrs Bthroom sink lites": This is an Icon 2876SB Relay V.39

The bathroom lights are switched by this device

 

2. "upstrs bathroom remote swlinc": This is a 2476S Switchlinc relay with sense V.37. Note that Smarthome sent me this device because they were out of straight Switchlinc relays. I installed it per the directions which left the yellow wire open, and coupled one of the red wires with the line if I remember correctly. Thus I am not using the sensing capability at all. (Not sure if this could be the problem?)

 

This is a switch WITHOUT a load. It is used as a three way switch configuration where either relay #1 or #2 above can turn the bathroom lights on or off. Both of these relays are set up as Controllers in the scene, “Upstrs Sink Litesâ€. No other devices in the scene.

 

GFCI outlets

 

As for the GFCI outlets, I STAND CORRECTED, there are two GFCI outlets, with NO downstream protected devices for either (ie no devices wired up to be protected by these GFCI outlets). And since I clearly made a mistake above, I have verified that when these two are “poppedâ€, all other devices in this circuit have power EXCEPT the two outlets.

 

 

So now for the interesting part…..

 

In the scenarios above, I was turning on the light via the ISY-99, by turning ON one of the controllers, as opposed to the scene.

I noticed that when I did this, the light did indeed come ON, but the second switch, "upstrs bathroom remote swlinc", did NOT come ON. Therefore, one controller was ON while the other was OFF.

Just for my own sanity, I verifed that when I turned the light ON manually, (via the switch itself) both switches came ON, and both went OFF when I turned the light OFF. And the ISY reported this accurately.

Thus, Scenario 1 always had one controller ON, while the other was OFF.

That said, I reran scenario 1 several times, as below:

 

Scenario 1A

1. Timer program status = FALSE

2. Check that is light is off, verify that ISY status is OFF for both switches.

3. Turn ON the "Upstrs Bthroom sink lites" switch via ISY.

4. Verify that light is ON.

5. ISY status for "Upstrs Bthroom sink lites": is ON.

6. ISY status for "upstrs bathroom remote swlinc": is OFF.

7. Timer program status is TRUE, Timer has kicked in as expected. (“Running Thenâ€)

8. STOP the timer program via the Program Summary window – Status of the program remains TRUE

9. Run the ELSE statement of the timer program via the Program Summary window – Status of the program goes to FALSE

10. Verify that the light is ON

11. ISY status for "Upstrs Bthroom sink lites": is ON.

12. ISY status for "upstrs bathroom remote swlinc": is OFF.

13. Perform a manual Query of the switch: "Upstrs Bthroom sink lites": (right click on mouse in admin console window)

14. ISY status for "Upstrs Bthroom sink lites": is ON.

15. ISY status for "upstrs bathroom remote swlinc": is OFF.

16. The timer program kicks in as expected, status of timer program = TRUE

17. Verify that the light is ON

 

Scenario 1B

1. Timer program status = FALSE

2. Check that is light is off, verify that ISY status is OFF for both switches.

3. Turn ON the Scene "Upstrs sink lites" via ISY.

4. Verify that light is ON.

5. ISY status for "Upstrs Bthroom sink lites": is ON.

6. ISY status for "upstrs bathroom remote swlinc": is ON.

7. Timer program status is TRUE, Timer has kicked in as expected. (“Running Thenâ€)

8. STOP the timer program via the Program Summary window – Status of the program remains TRUE

9. Run the ELSE statement of the timer program via the Program Summary window – Status of the program goes to FALSE

10. Verify that the light is ON

11. ISY status for "Upstrs Bthroom sink lites": is ON.

12. ISY status for "upstrs bathroom remote swlinc": is ON.

13. Perform a manual Query of the Scene: "Upstrs sink lites": (right click on mouse in admin console window)

14. ISY status for "Upstrs Bthroom sink lites": is ON.

15. ISY status for "upstrs bathroom remote swlinc": is ON.

16. The timer program kicks in as expected, status of timer program = TRUE

17. Verify that the light is ON

 

Scenario 1C – Same as 1B except the Scene was Queried

1. Timer program status = FALSE

2. Check that is light is off, verify that ISY status is OFF for both switches.

3. Turn ON the Scene "Upstrs sink lites" via ISY.

4. Verify that light is ON.

5. ISY status for "Upstrs Bthroom sink lites": is ON.

6. ISY status for "upstrs bathroom remote swlinc": is ON.

7. Timer program status is TRUE, Timer has kicked in as expected. (“Running Thenâ€)

8. STOP the timer program via the Program Summary window – Status of the program remains TRUE

9. Run the ELSE statement of the timer program via the Program Summary window – Status of the program goes to FALSE

10. Verify that the light is ON

11. ISY status for "Upstrs Bthroom sink lites": is ON.

12. ISY status for "upstrs bathroom remote swlinc": is ON.

13. Perform a manual Query of the switch: "Upstrs Bthroom sink lites": (right click on mouse in admin console window)

14. ISY status for "Upstrs Bthroom sink lites": is ON.

15. ISY status for "upstrs bathroom remote swlinc": is ON.

16. The timer program kicks in as expected, status of timer program = TRUE

17. Verify that the light is ON

 

Scenario 1D – For thoroughness: Same as B except the other Switchlinc is Queried

1. Timer program status = FALSE

2. Check that is light is off, verify that ISY status is OFF for both switches.

3. Turn ON the Scene "Upstrs sink lites" via ISY.

4. Verify that light is ON.

5. ISY status for "Upstrs Bthroom sink lites": is ON.

6. ISY status for "upstrs bathroom remote swlinc": is ON.

7. Timer program status is TRUE, Timer has kicked in as expected. (“Running Thenâ€)

8. STOP the timer program via the Program Summary window – Status of the program remains TRUE

9. Run the ELSE statement of the timer program via the Program Summary window – Status of the program goes to FALSE

10. Verify that the light is ON

11. ISY status for "Upstrs Bthroom sink lites": is ON.

12. ISY status for "upstrs bathroom remote swlinc": is ON.

13. Perform a manual Query of the switch: "upstrs bathroom remote swlinc": (right click on mouse in admin console window)

14. ISY status for "Upstrs Bthroom sink lites": is ON.

15. ISY status for "upstrs bathroom remote swlinc": is ON.

16. The timer program kicks in as expected, status of timer program = TRUE

17. Verify that the light is ON

 

Now I have think about these results, as they do not track with the way the query is supposed to behave, as you have pointed out…….. My head is starting to hurt…..taking a break.

Link to comment
In the scenarios above, I was turning on the light via the ISY-99, by turning ON one of the controllers, as opposed to the scene.

I noticed that when I did this, the light did indeed come ON, but the second switch, "upstrs bathroom remote swlinc", did NOT come ON. Therefore, one controller was ON while the other was OFF.

This is as it should be. Turning a switch on via ISY does not affect any scene controlled by that switch. If you want the whole scene to come on, you must so specify.

 

I have read through your various scenarios and am not convinced that anything is misbehaving from a communication standpoint (though it still may be). I think it a real possibility that there are simply a lot of variations on the status as a trigger.

 

I still think you should try temporarily disabling the query program, and changing your timer program to:

 

If
Control “Upstrs Bathroom Remote Swlinc†is turned On
Or control “Upstrs Bthroom Sink Lites†is turned On

Then
Wait 30 minutes and 10 seconds
Set Scene “Upstrs Sink Lites†Off

Else
- No Actions 

 

This program is triggered only upon reciept of "on" commands, and triggered upon receipt of every "on" command, regardless of prior device status or prior scene status, or prior program status. See if this works. If so, get rid of the query program. You won't need it.

Link to comment

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...