andyf0 Posted May 9, 2011 Posted May 9, 2011 I'm still a little confused as to whether to test for Status or Control on a device. Is there a rule of thumb like Control for Controllers and Status for Responders? For example I want to test for Low Bat on the Motion Sensor. It's in red indicating it's a controller so what is the best method to test for? Can someone explain the difference? Thanks.
LeeG Posted May 9, 2011 Posted May 9, 2011 andyf0 If Control is testing for a particular command received from a device. If Status is testing for the state of the device. If Control devicea is On And Control deviceb is On makes no sense as there cannot be two commands received at the same time. If Status devicea is On And Status deviceb is On is True when devicea and deviceb are On at the same time. It will trigger a Program Then when the Status of either changes to On and the other device is already On. A motion sensor operating in On Only mode could not trigger a Program with a Status On as the Sensor node is always On (Off command not sent by motion sensor). A Program triggered with Control On will trigger each time the On command is received . If the On paddle is pressed multiple times the Program with Control On will trigger on each On command. A Program triggered with Status On will trigger only once as multiple On commands change the Status to On only once. A Responder only device does not send commands so Control is not applicable. Some devices such as a ControLinc have no Current State (Status) information after a reboot until a button is pressed. The ControLinc has no Responder function so it has no state information to retrieve with a Query. There is no simple rule that I know of. Control and Status are checking for different situations. Which is used depends on what the Program is trying to accomplish, what it is looking for. When a particular command is sent or a particular status exists. For Low Bat either a Control On or Status On should work. I feel certain this subject will generate lots of ideas and opinions. Lee
andyf0 Posted May 9, 2011 Author Posted May 9, 2011 That is very helpfull. I need some time to digest. Edit: Ah! I need to be thinking in terms of change of state vs. Command received.
mink Posted May 12, 2011 Posted May 12, 2011 So say I want to have a KPL light indicate the state of a group of programs by either being OFF, ON or FLASHING, and I have a KPL Button switching between these three states with single presses, it would be better to have the button be set say as NON-TOGGLE ON and the states switched with an IF CONTROL ON statement? If the button was in TOGGLE mode, some of the presses might send an OFF command which would not be picked up by the IF CONTROL statement? For example, if the Button Press was to increment a counter variable, a toggle mode for the button would mean the effect of a button press would be ambiguous. Perhaps I'm beginning to get this (or not) TIA
oberkc Posted May 12, 2011 Posted May 12, 2011 So say I want to have a KPL light indicate the state of a group of programs by either being OFF, ON or FLASHING, and I have a KPL Button switching between these three states with single presses, it would be better to have the button be set say as NON-TOGGLE ON and the states switched with an IF CONTROL ON statement? I don't believe that there is an inherent flashing mode for keypads. Perhaps this could be simulated with programs (wait statements, on, off, repeat, etc...). Given this, it sounds to me as if setting the keypad to non-toggle mode and triggering a program would be a viable option. Perhaps the program could increment a variable between 1 > 2 > 3 > 1 >..... to keep track of your three states. I suspect you could also do the same thing using program status, rather than variables, to keep track of which state your system is in.
LeeG Posted May 12, 2011 Posted May 12, 2011 mink The If Control is switched On can be Anded with If Control is switched Off to pick up either command. Putting the KPL button into non-toggle mode is another option. Flashing a KPL button is okay for a few seconds. I do not recommend that for an extended period of time. The constant powerline traffic to turn the KPL button On and Off could interfere with other Insteon traffic. Lee
oberkc Posted May 12, 2011 Posted May 12, 2011 The If Control is switched On can be Anded with If Control is switched Off to pick up either command. Did you mean "or" rather than "and"?
mink Posted May 12, 2011 Posted May 12, 2011 oberkc Yes, there is no flashing mode, I was thinking of sending KPL light on, then off commands via timing loop. A flash mode for the KPL would be nice (Smarthome are you listening?). I would do it exactly as you say, by incrementing a variable to store and control state. LeeG You answered my question well. Two IF CONTROL statement would work if I needed the toggle function. I had wondered about the traffic issue, but don't recall seeing an answer. Would sending an on/off every 20 seconds to a button as a warning that, say, the irrigation system was not responding put too much load on the system? Thanks to both of you for excellent answers. cheers
LeeG Posted May 12, 2011 Posted May 12, 2011 mink I don't think that would cause a problem, particularly when it is an execption situation. There id always a potential conflict between async traffic from automation and human interaction with a button/paddle. I was thinking flashing On/Off at 1-2 second rate. The beauty of all this is if it turns out to be a problem in the real world the timing is easy to change with the ISY. Lee
oberkc Posted May 12, 2011 Posted May 12, 2011 Mink, I don't know if you have unused keypad buttons to play around with, but if insteon traffic turns out to be a problem, you could always use three keypad buttons to display status, instead of one. My instincts tell me to put the three in a mutually exclusive relationship, and illuminate only the one that represents the current state. My personal preference is to avoid indefinitely repeating insteon signals for the reasons already stated. At one or two second intervals, the chance for signal collisions seems high to me.
mink Posted May 12, 2011 Posted May 12, 2011 oberkc yes, separate buttons would be nice, but I'm likely to end up with over 9 irrigation zones, spread over two 7 button kpl which also have to control some lights. I would like to give a button to each zone that would provide manual coontrol and be on if zone is running (but not use flash for that). Also it would be less confusing to my wife to have a flash as a status indicator for the button assigned as a master controller, rather than simply on. I was not planning on every few seconds, but more like once every 10, and only for an exception state. thanks
oberkc Posted May 12, 2011 Posted May 12, 2011 I am not sure what the "exeption state" is, but perhaps a compromise would be a button for each zone, on and off. Then another, single, button for a global exception state. Put a little color slide behind it to have it stand out. Still, the only value to this is the avoidance of insteon traffic and any affect that may have, if any, on other insteon commands. For me, I try to minimize insteon traffic, but that may be more phobia than anything else. Of course, if you try it one way and if don't like it, you can always change it! Have fun! Thanks for all the ideas that I should try someday.
Recommended Posts