Jump to content
View in the app

A better way to browse. Learn more.

Universal Devices Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

IR and lights on/off

Featured Replies

Posted

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 by brianp6621

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.

Use control, not state.

  • Author

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 by brianp6621

  • Author

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 by brianp6621

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.

  • Author

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.

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.

  • Author

Right. I get that now. So I really do need 2 programs and there isn't another way to accomplish it.

Guest
This topic is now closed to further replies.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.