brianp6621 Posted June 28, 2015 Posted June 28, 2015 (edited) Ok, so now that my insteon network is working I'm trying to add IR control. I have the ISY responding to IR and I wrote my first basic program but here is my issue. I want to create a single toggle button (meaning a single IR code) to turn the lights on if off and off if on. I thought it would be as simple as If button1 pressed and lights ON turn OFF, else turn ON. This mostly works however it seems that when the lights turn off, they then also immediately turn back on because according to the ISY IR page, the IR button is still in the PRESSED state. So basically a press, isn't a momentary press, but is like setting a last variable state as pressed. The only way around this I can think of is to use the double press state for OFF. Is this what others do? Edit.. And looking at that more, I will have to create 2 programs as I can't add another if to the else and I also can't set the IR control code state to something other than PRESSED (another thought I had). Edit2.. So a double press doesn't seem to work either as a double press is a temporary state and it quickly reverts to the pressed state and therefore reactivates the TURN ON program. So 2 programs for each light just to toggle them on and off depending on their state? That seems clunky. Am I missing something? Edited June 28, 2015 by brianp6621
oberkc Posted June 29, 2015 Posted June 29, 2015 I would like to think it would be as simple as your original thought. I have not seen multiple IR codes registered from a single remote button press...for me it is just one press, one code.
brianp6621 Posted June 29, 2015 Author Posted June 29, 2015 (edited) I would like to think it would be as simple as your original thought. I have not seen multiple IR codes registered from a single remote button press...for me it is just one press, one code. it isn't multiple codes, the remote is only sending one code with each press. However I have to create 2 programs. 1 for on and 1 for off. So the remote button does work as a toggle but it takes 2 programs to do it. I found another thread that came to the same conclusion. http://forum.universal-devices.com/topic/5587-toggle-with-one-harmony-button/ Edited June 29, 2015 by brianp6621
brianp6621 Posted June 29, 2015 Author Posted June 29, 2015 (edited) Use control, not state. What does control do vs status? I've read numerous wiki's and articles on it and I still don't get it and how it would help me in this instance. I also experimented but couldn't get it working. Care to walk me through it? Edited June 29, 2015 by brianp6621
stusviews Posted June 29, 2015 Posted June 29, 2015 Control requires a manual "change of state." Sense detects any "change of state" even if the change is caused by a scene. Post your program(s). Right click on the program name, select Copy to Clipboard, paste into your reply. Also describe any scene(s) that the responder is a member of.
brianp6621 Posted June 29, 2015 Author Posted June 29, 2015 Here is the On macro Patio Lights On - [iD 0005][Parent 0001]If IR 'IR_002' is Pressed And Status 'Patio Lights' is Off Then Set Scene 'Exterior / Patio Lights' On Else - No Actions - (To add one, press 'Action') Patio lights is an outdoor on/off module. It belongs to 2 scenes, the one in the program above, and another that contains both it and 1 other outdoor on/off module. I have a corresponding off program as well as one that turns it on/off in conjunction with the other outdoor light. Everything works like I want now, I'm just surprised I need 2 programs to create a power toggle with a single IR code.
LeeG Posted June 29, 2015 Posted June 29, 2015 The reason for needing two Programs is the fact that the light being tested in the If section changes Status by the Then clause. The change in light Status from Off to On causes Program to be triggered again. The If now evaluates to False which drives the Else clause which changes light Status again when a single Program. When two programs the Program is triggered again and the If is False which drives the Else. However, with two Programs the Else does not do anything so the light remains On. The IR code was Pressed once so the IR code does not cause another Program trigger. It is the change in light Status that causes the retrigger.
brianp6621 Posted June 29, 2015 Author Posted June 29, 2015 Right. I get that now. So I really do need 2 programs and there isn't another way to accomplish it.
Recommended Posts