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.