ISY-99i Series INSTEON:Quick IR Tutorial: Difference between revisions

From Universal Devices, Inc. Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 17: Line 17:




====Sample Code====
====Sample ON/OFF Code====


This code will turn a light on using the IR code TV:1, assuming the light is currently off:
This code will turn a light on when pressing the IR code TV:1, assuming the light is currently off:


  If
  If
Line 32: Line 32:




This code will turn a light off using the same IR code TV:1, assuming the light is currently NOT off:
This code will turn a light off when pressing the same IR code TV:1, assuming the light is currently NOT off:


  If
  If
Line 39: Line 39:
  Then
  Then
         Set 'Light1' Off
         Set 'Light1' Off
Else
  - No Actions - (To add one, press 'Action')
Now, suppose you want a bit more control.  With the ISY-99i's IR capabilities, you can also trigger based on when a button is HELD, and then RELEASED.  By implementing these commands in a program, you can cause the ISY-99i to dim or brighten a light.
====Sample ON/OFF Code====
This code will brighten a light when holding the same IR code TV:1, assuming the light is currently off:
If
        IR 'TV : 1' is Held
    And Status  'Light1' is Off
Then
        Set 'Light1' Fade Up
Else
  - No Actions - (To add one, press 'Action')
This code will dim a light when holding the same IR code TV:1, assuming the light is currently NOT off:
If
        IR 'TV : 1' is Held
    And Status  'Basement1' > Off
Then
        Set 'Basement1' Fade Down
Else
  - No Actions - (To add one, press 'Action')
The above programs will START a fade up or fade down, but you also need the code below so the ISY-99i knows when to STOP:
If
        IR 'TV : 1' is Released
Then
        Set 'Light1' Fade Stop
  Else
  Else
   - No Actions - (To add one, press 'Action')
   - No Actions - (To add one, press 'Action')

Revision as of 02:15, 17 December 2007

Using IR in the ISY-99i

The first step to using IR with your new ISY-99i is to find a remote or remote code that is compatible. The ISY-99i is compatible with any RC5 compatible remote control. If you have a universal remote control, try setting it to a Philips television. Just about any Philips device should be RC5 compatible. For this example, I'm using an old Philips television remote.


In the ISY-99i interface, click on the CONFIGURATION tab. Within there, click on the IR sub-tab. This will bring you to the IR configuration page. Simply click on the ENTER LEARNING MODE button, point your remote at the front of the ISY-99i, and push a button. If a compatible key is pressed, the ISY-99i will add the IR code to its list.


This is also a good time to test the remote. If you simply press the button and release, the status should show as PRESS. If you press and hold the button, the status will show as HELD. If you press/hold the button then release the status will show as RELEASE.


Once you are done adding codes to the ISY-99i, go ahead and press the LEAVE LEARNING MODE button. If at any time you want to cancel the codes you have just added, simply click the RELOAD button at the bottom of the screen to return to the last saved configuration. If you'd like to wipe all saved IR codes and start from scratch, press the RESTORE DEFAULTS button. If you're happy with your currently displayed IR codes, press the SAVE button to save them to the ISY-99i.


Now that you've learned your IR codes, it's time to use them! Received IR commands can be used in any ISY-99i program, which opens up tons of possibilities. For this tutorial, we'll create a simple program that uses IR to turn a light ON or OFF, depending on its current state.


Sample ON/OFF Code

This code will turn a light on when pressing the IR code TV:1, assuming the light is currently off:

If
       IR 'TV : 1' is Pressed
   And Status  'Light1' is Off
Then
       Set 'Light1' On
Else
  - No Actions - (To add one, press 'Action')



This code will turn a light off when pressing the same IR code TV:1, assuming the light is currently NOT off:

If
       IR 'TV : 1' is Pressed
   And Status  'Light1' is not Off
Then
       Set 'Light1' Off
Else
  - No Actions - (To add one, press 'Action')


Now, suppose you want a bit more control. With the ISY-99i's IR capabilities, you can also trigger based on when a button is HELD, and then RELEASED. By implementing these commands in a program, you can cause the ISY-99i to dim or brighten a light.


Sample ON/OFF Code

This code will brighten a light when holding the same IR code TV:1, assuming the light is currently off:

If
       IR 'TV : 1' is Held
   And Status  'Light1' is Off

Then
       Set 'Light1' Fade Up

Else
  - No Actions - (To add one, press 'Action')


This code will dim a light when holding the same IR code TV:1, assuming the light is currently NOT off:

If
       IR 'TV : 1' is Held
   And Status  'Basement1' > Off

Then
       Set 'Basement1' Fade Down

Else
  - No Actions - (To add one, press 'Action')


The above programs will START a fade up or fade down, but you also need the code below so the ISY-99i knows when to STOP:

If
       IR 'TV : 1' is Released

Then
       Set 'Light1' Fade Stop

Else
  - No Actions - (To add one, press 'Action')