I am using iRule on my iPad to create a universal remote for my home theatre system. I've got everything working but I would like to control my Apple TV 2 via TCP/IP and not IR. The capability is obviously there since Apple's Remote program does this but I cannot find the codes/commands that are used to control the device. There must be a hex or ascii string for each button on the remote plus the long presses. I've searched the net far and wide looking for this but can't find the codes.

Has anyone else tried to do this? Does anyone know how to send commands to the Apple TV 2 via IP?

Is it possible, for someone smarter than me, to sniff the traffic from an iPad using Apple's remote software to see the commands as they are sent?

Please help.