DECEMBER 24TH, 2012
By GREG
While dealing with some RedEye quirks, I stumbled across iRule. It occurred to me that there have been some significant changes in the home A/V control landscape since I first install ThinkFlood’s RedEye a few years ago.
After a little Google research, I decided to give Roomie Remote a tryout. The required App is currently available only for iPhone/iPad (iOS 5) through the
. It costs $9.99 and allows for control of two Internet Protocol (IP) devices. To be really useful, the Home Theater Pack is required. This is an in-app purchase ($19.99) and allows for an unlimited number of rooms and IP controlled devices. So far, the cost is $29.98.
To control devices via Infrared (IR) two additional items are required: One software and one hardware. The software is again an in-app-purchase of the Infrared Control Pack for $9.99. The hardware is an iTach IR Adapter ($89.99-$99.99) which allows for IR control over IP. Depending on the installed A/V equipment, additional hardware may be required to connect everything to your local network. Since many of us have A/V equipment more than a couple years old, the IR setup is probably required. The cost is now up to $39.97 plus the iTach. About $150 with shipping.
There is one remaining in-app-purchase available: HD Guide Pack. With this pack installed, the single-day viewing guide is expanded to seven days.
It appears that Roomie may be a reasonable alternative to RedEye for iPhone/iPad users. Even with a total cost of nearly $160, it compares favorably with $199 for RedEye ($167.38 on Amazon, as of this writing). The look of Roomie on the iPad is a definite change from RedEye, and one for the better. At least that’s my initial impression.
DECEMBER 22ND, 2012
By GREG
Things learned about RedEye.
RedEye IP Stops Responding or Slows Down
If the Port Script is edited, there may be an error in the script. There is no way for RedEye to gracefully accommodate errors, which normally involve syntax.
To help avoid scripting errors, test your code in an IDE outside of RedEye.
If the IP address or Port number is changed and saved within RedEye’s Devices Edit Port Settings, click Edit Port Script and click Apply Changes. Even if no changes are made to the script, the link between the script and port must be re-established, apparently.
If you find the RedEye isn’t as snappy as expected, try resetting it.
From the RedEye Maintenance page
- Backup Data
- Factory Reset
- Restore Data
If this doesn’t seem to help…
Download the latest firmware update from ThinkFlood
From the RedEye Maintenance page
- Backup Data (if needed)
- Upgrade Software (using the downloaded update)
- Restore Data (after RedEye restarts)
If RedEye continues to act-up, search the ThinkFlood Forums for advice on reseting.
Lua Script Testing For RedEye
Finding IP Control Codes
Try searching google for your device and ip rs232 or custom install. Here’s a list for Pioneer, Pioneer AV Receivers
And specifically for the VSX-1121-K
Lua Block Comment Error
A block comment is fine …
--[[this is a
comment]]
… unless it contains an embedded [[...
--[[this is a
[[comment]]
... which totally whacks out RedEye.
RedEye Slider Values
Slider, Show value can't be set (won't stick) in web browser setup. Changes made using an IOS device do stick.
Custom Variables Are Stored as Strings
Using RedEye's
GetVariable()
always returns a string.
Convert it to a number before comparing to another number in an if statement. Example:
local c = tonumber(Scripting.GetVariable("IPmsgCount"))
iOS Stops updating Custom Variables
If iOS stops updating variables quit and re-launch on the iGadget.
Port Script Changes
To take effect, changes to the Port Script must be saved using the Save Changes (green) button on the Devices page.
RedEye Infinite Loops
Do not send device commands from within the PortListener. It can enter an infinite loop if the sent command returns a result (always for Pioneer VSX).
Infinite loops can be terminated by editing the PortListener script and saving it to the RedEye.
Multiple RedEye Device Entries for a Single Device
There can be a device (e.g. AV Receiver) that is setup in RedEye twice. Don't use the IP address and Port combination more than once.
DECEMBER 22ND, 2012
By GREG
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
- Point your web browser at the RedEye.
- Click Setup
- Click the Room
- Click Custom Variables
- Click Add New Variable
- For Name enter myInput
- Value can remain empty
- Click Save
Create a Command to send an IP Control Code
- For Type select Other
- For Name enter Send IP Cmd
- Click Edit Script and go to the next step – Enter Script.
- When the next step is complete, click OK
Enter Script
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
- Click Save Changes
- Click Layout > Edit
Make Room on Layout
- Click on HTML field to highlight
- Click and drag to make room at the top
Add Text Field
- Select Text Field
- Click Add Control
- Position new Text Field
Link Variable to Field
- Click to highlight Text Field
- Click Text Field Values
- Select Text Variable, myInput
Add Button
- Select Button
- Click Add Control
- Drag to reposition button
Set Button Action
- Select button
- Click Actions / Toggles
- Select Type as Normal
- Select Action Type as Command
- Select VSX A/V Receiver (your device)
- Select Send IP Cmd
- Click green, Save Changes button
Test Changes
Return to Devices page and click (Exit)
Select the device (VSX A/V Receiver)
- Enter a command
- Click outside of the text box (so the entered text is stored in the System Variable)
- Click Send IP Cmd
After a short delay, the sent command should display, followed by the response sent by the VSX.
DECEMBER 22ND, 2012
By GREG
After completing RedEye: Connect to Pioneer VSX via IP, the RedEye is already receiving messages from the VSX.
Unfortunately, the VSX sends messages that may be longer than expected. This makes using the received messages more complicated than might otherwise be expected.
The issue addressed here is how to display what the VSX is sending out. This will give a better idea as to how to proceed using using the received messages.
The technique outlined here is generic in that it can be used to monitor any IP port via RedEye.
Add Required Custom Variables
- Point your web browser at the RedEye.
- Click Setup
- Click the Room
- Click Custom Variables
- Click Add New Variable
- For Name enter IPmsgCount
- Value can remain empty
- Click Save
- Repeat for variable HTMLbody
- REpeat for variable HTMLmsg
Edit Port Script
From the RedEye Room, click Devices
Select your device.
Click Edit Port Script
Modify the script
Add the following functions to the Port Script as indicated:
function string:split(sep) -- split (parse) string --> table
local sep, fields = sep or ":", {}
local pattern = string.format("([^%s]+)", sep)
self:gsub(pattern, function(c) fields[#fields+1] = c end)
return fields
end
function buildHTML(ipMsg)
local c = tonumber(Scripting.GetVariable("IPmsgCount"))
local b = Scripting.GetVariable("HTMLbody")
if c > 90 then
c = 0
b = ""
end
c = c + 1
b = [[<tr>
<td style="border-style: none; text-align:left;">]]
.. c .. "/" .. #ipMsg ..
[[</td>
<td style="border-style: none; text-align:left;">]]
.. table.concat(ipMsg,"<br>") ..
[[</td>
</tr>]] .. b
Scripting.SetVariable("IPmsgCount", c)
Scripting.SetVariable("HTMLbody", b)
return
[[<table style="font-size: 80%;">]]
.. b ..
[[</table>]]
end
Click Apply Changes
Process Input
Add the following to the Port Script as indicated.
local t = inputData:split("\r\n") -- store message elements in table "t"
Scripting.SetVariable("HTMLmsg", buildHTML(t))
Click Apply Changes
Final Script
At this point, the Port Script will accumulate all messages received from the VSX and store it in the State Variable named HTMLmsg.
Building the html code in this way, isn’t very efficient. Using a table would no doubt improve the speed.
All that remains is to display the HTML.
Return to the VSX device page.
Click Layout Edit
Add HTML Control to the Layout
The default buttons won’t be use right now, so they may be deleted or moved down the layout to make room.
- Select HTML
- Click Add Control
Connect the HTML received message variable to the display control
- Click the HTML control in the Layout (indicated by the yellow #1 and blue line)
- Within the Device Remote Layout > HTML Values > HTML Content Variable, select the variable HTMLmsg
- Click Save Changes
- Return the the Devices page and click Save Changes
- Click (Exit) to return to the RedEye home screen
From the RedEye home page:
- Click Devices
- Click the device VSX A/V Receiver
The control pane should appears as shown above.
- The left column indicates: message number / number of distinct elements in this message
- The right column shows the list of messages.
When the number of received messages exceeds 90, the storage variable (HTMLbody) is cleared. See line 16 of the final script.
As shown in the screen shot, there are frequently multiple elements in any given message. This explains why control is unreliable when this fact is ignored.
DECEMBER 22ND, 2012
By GREG
Add the VSX
- Select the desired Manufacturer
- And Type
- Change the Port to Add New IP Port
- Enter your desired Display Name
- Click Find Codes
Select a Codeset
At the time of this tutorial, there was just a single codeset for the VSX. It doesn’t quite match the VSX-1121-K, but the commands can be edited later as needed.
If you device doesn’t have a codeset, save the device without.
- Click the Codeset desired
- Click Save This Device
IP Settings
- Ensure the Protocol is set to TCP
- Enter the IP address as the Host Name
- Enter the Port Number
- Click OK
Test the IP Connection: Mute Toggle
With your VSX reveiver turned on, test the IP control from RedEye.
- Click Mute On/OFF
- Click Save Changes
DECEMBER 18TH, 2012
By GREG
Over time, a device’s Internet Protocol (IP) address can change unless you establish a reserved address within your router. With a reserved IP address, RedEye can maintain a reliable communications link with the device (client).
Log onto the AirPort Extreme
Launch AirPort Utility 5.x.
- Select your router.
- Click Manual Setup
Navigate to the Internet options
View the current DHCP settings
Add a new DHCP Reservation
Click plus to add a DHCP Reservation.
Name your new device
- Enter a Description.
- Ensure that MAC Address is selected
- Click Continue.
Reserve the IP address
- Enter your client’s MAC Address.
- Enter your desired IPv4 Address.
- Click Done.
Update the AirPort Extreme
- Your newly added IP client will be in the DHCP Reservations list.
- Click Update. The router will go off-line for a minute or so while it saves your changes.
Done!
The router’s icon will disappear while being updated. Quit AirPort Utility.
DECEMBER 18TH, 2012
By GREG
Over time, a device’s Internet Protocol (IP) address can change unless you establish a reserved address within your router. With a reserved IP address, RedEye can maintain a reliable communications link with the device (client).
Before you continue, determine your device’s MAC address. That may be as simple as reading it from a printed label on the outside of the device. In the case of a Pioneer VSX receiver, use the VSX remote to navigate to the it’s setup menu.
Log onto the AirPort Extreme
Launch AirPort Utility 6.x.
- Click your router.
- Click Edit.
Navigate to the Network options
Add a new DHCP Reservation
Click plus to add a DHCP Reservation.
Reserve the IP address
- Enter a Description.
- Ensure that MAC Address is selected
- Enter your client’s MAC Address.
- Enter your desired IPv4 Address.
- Click Save.
Update the AirPort Extreme
- Your newly added IP client will be in the DHCP Reservations list.
- Click Update. The router will go off-line for a minute or so while it saves your changes.
DECEMBER 18TH, 2012
By GREG
For the VSX to be controlled externally via IP, you must turn on Network Standby and determine the port number and MAC address.
VSX Home Menu
- Press RECEIVER.
- Press HOME MENU.
VSX System Setup
Down-arrow to 4. System Setup
Press ENTER
VSX Network Setup
Down-arrow to d. Network Setup
Press ENTER
VSX Network Standby
Down-arrow to 2. Network Standby
Press ENTER
Activate Network Standby
Use right-arrow to turn on Network Standby
Press RETURN
VSX Port Number Setting
Down-arrow to 5. Port Number Setting
Press ENTER
VSX Port Number Setting – Determine the Port Number
Use default port (23) or add your own. In either case, record the value. Port values can be from 1 to 65535.
Down-arrow to OK
Press ENTER
When asked to accept and save changes:
Arrow to Yes
Press ENTER
Wait a minute or so for changes to be set.
Press RETURN twice, to return to the HOME MENU screen.
VSX Network information
Down-arrow to 5. Network Information
Press ENTER
Get MAC Address
Record the MAC Address.
Press HOME MENU to exit.
You’re done!