RedEye #6: Testing IP Control Codes

Knowing what a device returns after a command is received (sent by redid), helps design a control strategy.

 

Create System Variable, myInput, for the Control Code

wpid311-media_1356216853995.png
  • Point your web browser at the RedEye.
  • Click Setup
  • Click the Room
  • Click Custom Variables

 

  1. Click Add New Variable
  2. For Name enter myInput
  3. Value can remain empty
  4. Click Save

Create a New Command

wpid312-media_1356217145146.png

Click Add New Command

Create a Command to send an IP Control Code

wpid313-media_1356217761551.png
  1. For Type select Other
  2. For Name enter Send IP Cmd
  3. Click Edit Script and go to the next step – Enter Script.
  4. When the next step is complete, click OK

Enter Script

wpid314-media_1356217903583.png

Replace line 5, as indicated above, with the following script .

local c = string.upper(Scripting.GetVariable("myInput"))
local b = Scripting.GetVariable("HTMLbody")
    b = [[<tr>
    <td style="border-style: none; text-align:left;">(user)</td>
      <td style="border-style: none; text-align:left;">]]
        .. c .. " -----" ..
      [[</td>
    </tr>]] .. b
Scripting.SetVariable("HTMLbody", b)
Scripting.SetVariable("HTMLmsg", [[<table style="font-size: 80%;">]] .. b .. [[</table>]])
Scripting.SendMessage(c.."\r")

 

Click Apply Changes
Complete step 4 of the previous step.

Edit Layout

wpid315-media_1356218229698.png
  1. Click Save Changes
  2. Click Layout > Edit

Make Room on Layout

wpid316-media_1356218385482.png
  1. Click on HTML field to highlight
  2. Click and drag to make room at the top

Add Text Field

wpid317-media_1356218502735.png
  1. Select Text Field
  2. Click Add Control
  3. Position new Text Field

Link Variable to Field

wpid318-media_1356218784414.png
  1. Click to highlight Text Field
  2. Click Text Field Values
  3. Select Text Variable, myInput

Add Button

wpid319-media_1356218971952.png
  1. Select Button
  2. Click Add Control
  3. Drag to reposition button

Set Button Action

wpid320-media_1356219135686.png
  1. Select button
  2. Click Actions / Toggles
  3. Select Type as Normal
  4. Select Action Type as Command
  5. Select VSX A/V Receiver (your device)
  6. Select Send IP Cmd
  7. Click green, Save Changes button

Test Changes

wpid321-media_1356302898862.png

Return to Devices page and click (Exit)
Select the device (VSX A/V Receiver)

  1. Enter a command
  2. Click outside of the text box (so the entered text is stored in the System Variable)
  3. Click Send IP Cmd

After a short delay, the sent command should display, followed by the response sent by the VSX.