Panasonic Viera plasma: IP control...?!?

Well, now that you've confirmed it doesn't work, I googled "" (with quotation marks) and none of the results contained the word Panasonic. It appears that the commands I listed are used with an IP to IR gadget called RedEye from ThinkFlood. I now believe both of the user-submitted "Panasonic TV" devices in iRule are for commands to a RedEye that then transmits IR to the Panasonic TV. Oh well. Back to wireshark.

I spent a little more time with iRule and I didn't see any support for scripting.
Thanks for giving iRule a try! I tried to use Bluestacks and the Android SDK to run the Viera Remote app, but I ran into too many issues. The SDK emulator does not allow the use of wifi (a requirement for the app to work). The Bluestacks emulator is still in Beta and doesn't work at all with the Viera app. I'll try the ad hoc idea later tonight, but I'll be very surprised the TV connects to an ad hoc network.

You're looking at the right TV to buy picture wise, the problem is there are several AVS members who posted stuff about Canadian prices being much higher!?!? I have been very impressed with the picture quality, but can't say I would have paid much more than $1767 (shipping and tax included) for the 60" TV. The prices on the Panasonic plasmas apparently went up due to the Japanese tsunami. In fact, my favorite local place to haggle (HHGregg) isn't carrying any of the 2012 Panasonic's this year since they couldn't get a good price from Panasonic.
Viera app runs on both Bluestacks and the SDK but due to both being behind virtual firewalls and probably not receiving multicast messages it will not be able to connect to the TV. So the easiest way is probably to plug the laptop into the router that the TV is connected to and then connect to the laptop's wifi with the phone/tablet.
Hi etc6849,
I just registred to post here because I have also been searching for the IP control protocol for Panasonic TV's with no success, and I just recently managed to reverse engineer the protocol. Could perhaps save you a bit of work :)

I was using the iPhone VIERA remote and captured the packets it sent to the TV, and it is using SOAP (looks to be using some proprietary Panasonic extensions to the DLNA protocol, but I don't know much about that so I'm not sure)

This is an example of a request send for the MUTE key: is the IP of the television I am using, and the code for the key is NRC_MUTE-ONOFF

The application only seems to be capable of sending commands that the (normal) remote control can also send. Unfortunately this looks to mean that it is not possible for instance to switch to a specific input.
All key send actions begin with NRC_ followed by the command, and either -ON, -OFF, or -ONOFF at the end. ONOFF does the same as clicking the key would usually do. ON makes the key "stuck" until an OFF command is sent. For instance, if "NRC_VOLDOWN_ON" is sent, the volume will turn all the way down by itself.

I have created a PHP class for sending the commands. You probably can't use this, but it should clarify the syntax necessary. It also contains a list of commands that I captured from the iPhone application, as well as a few that I extracted from disassembling the application itself. Most of these didn't have any effect on my television, but a few of them did. This may mean that there are other commands that can be used but which we do not know about - since I have't been able to find any description of this protocol elsewhere though, it may be difficult to find them.

PHP class link:

The sending of remote control keys that I described above (the SOAP action) is called X_SendKey. There also exists a function called X_String which can send a string to the TV - this only does anything if you are in a place where text can be input, like the Youtube application.

Additionally the TV also supports a subset of the normal DNLA protocol which could be usefull for control - you are able to read the volume level and set it to a specific number, as well as mute the TV.

My TV is a TX-P46G30Y. It doesn't support the newest functions of the iPhone control app (web browser, cursor control, gamepad control) so I was not able to look at the syntax for those.

If you have any questions just ask - I'm pretty sure I haven't discovered everything there is to know about this protocol, but seeing as there doesn't appear to be any information out there regaring it I was hoping it might come in handy for you.
SOAP! I was way off!


From Dumb and Dumber:
Harry: What's her last name? I'll look it up.
Lloyd: You know, I don't really recall. Starts with an S! Let's see. Swim? Swammi? Slippy? Slappy? Swenson? Swanson?
Harry: Maybe it's on the briefcase.
Lloyd: Oh, yeah! It's right here.
[He reads the manufacturer's name, which is Samsonite]
Lloyd: Samsonite! I was way off! I knew it started with an S, though.
rokujuuyon, thanks for your help as this will save us a lot of time!

I have captured the following between my TV ( and my phone (

It appears the connection sharing idea was a good one, and now I can see what I think are all of the packets :)

I had to use Windows 7's "Network Bridge" function, sharing my laptop's onboard gigabit lan connection to my TV. The wireless card on my laptop was hooked up to my normal router and I used WireShark to sniff the traffic on the laptop's gigabit lan card. The packets look very similar to what I think your php script is doing.

Since this is starting to get above and beyond my technical experience, I'm hoping someone with more experience than me could line out a good approach to getting this working with Premise.

View attachment bridged networked connection
Yes - you're definitely capturing the same traffic as I did. Sorry to say I can probably not be at help with Premise as I've never used the application.
Were you ever able to figure out how to turn on the TV over the network? Supposedly, the 2012 models allow for this, but I couldn't get it to work...
No, my TV is a 2011 model so it would not support it either way. There is a command that switches it off, NRC_POWER-ONOFF. That might do the trick if the webserver is still running when the TV is off - otherwise a Wake-On-Lan request might work.
Hi I'm a noob when it comes to Javascript and now SOAP, possibly a dumb question but how do I send that SOAP example (having change the IP to match my TV) from my laptop to test it out

Also if of use, I have the apk file with res files etc
I don't think Premise's native system.URLDownload() will work in this case because, based on what I've seen in rokujuuyon's PHP Viera class, it requires a POST operation whereas URLDownload is a hard-coded GET.

You'll need to use a COM object like "MSXML2.XMLHTTP.3.0" because it allows you to specify a POST operation as well as the header's contents. If you search for XMLHTTP POST you'll get results with suitable examples.
Here's one on StackOverFlow:
Refer to the createRequest method in the PHP Viera class to get a better idea of what you need to duplicate.

BTW, you can do a fair bit as a vanilla VBScript file, to prove the concept, before diving in and making a Premise Module.

I have a hardware device that can send scripts via a IP socket to the TV, if that makes sense could I use the above in some way or am I at the bottom of a steep hill of learning ;)
Unfortunately, I have tried every combination of energy saving settings I can think of and the TV will not respond to a ping request when the TV is off. I'm not sure what benefit using ip control over IR will give if one cannot turn the TV on.
... a hardware device that can send scripts via a IP socket ..

Not knowing a darn thing about that 'hardware device' I'll have to reply with the punchline from a favorite joke (*):
"It might be fun to try!"


(*) From a very old edition of Mad Magazine (late 50's). It poked fun at audiophile magazines and contained a Letter to the Editor section where someone describes, in painstaking detail, a combination of high-end "Hi-Fi" components. His long-drawn description ends with a question: If he hooked it all up together, would it work? The Editor's brief response: It might be fun to try!