Controlling Panasonic DMP-BDTx10 Blu-Ray Players in Indigo

Posted on
Sat May 21, 2011 2:06 am
nsheldon offline
Posts: 1885
Joined: Aug 09, 2010
Location: CA

Controlling Panasonic DMP-BDTx10 Blu-Ray Players in Indigo

I recently purchased one of the new 2011 model Panasonic DMP-BDT210 Blu-ray players for my home theater setup. The DMP-BDT110, ...210, and ...310 3D Blu-ray players can all be controlled using a free iPhone/iPod touch/iPad app Panasonic makes available in the App Store. The app controls the player over your home network. Since the DMP-BDT210 can be controlled over the LAN with an iPhone, I figured it'd be possible for anything on the network (including Indigo Pro) to control the player, if it sent the right commands. So I used my iPhone, a cheap 10Base-T hub connected to my home network, and Wireshark running on my Mac to do some packet sniffing and see exactly how the iPhone and Blu-ray player communicated. It turns out the communication is pretty basic and can be emulated using the "curl" command-line tool, thus easily executable using the "do shell script" AppleScript verb.

Use the following AppleScript within an Execute AppleScript action (or within a 'tell application "IndigoServer"' block in external scripts) to send remote control commands to a Panasonic DMP-BDTx10 Blu-ray player on your network. You'll have to find out the IP address of the player (I suggest creating a static assignment for the player with your router, if it supports doing so, to ensure the player always receives commands).

Code: Select all
set theCommand to "POWER" -- set to any of the commands listed below.
set theIP to "192.168.1.20" -- set to your player's IP address.

-- send the command to the player.
do shell script "curl -A MEI-LAN-REMOTE-CALL -d cCMD_RC_" & theCommand & ".x=100 -d cCMD_RC_" & theCommand & ".y=100 http://" & theIP & "/WAN/dvdr/dvdr_ctrl.cgi"


Replace the POWER command in the above code with any of the following commands to have the player respond to them just as if you had pressed those buttons or activated those options in the iPhone remote app or IR remote.

Code: Select all
iPhone App Controller View:
Remote
Control
Button/
App Button:        Command:
==========================
POWER:  POWER
OPEN/CLOSE:  OP_CL
1 (@.):  D1
2 (ABC):  D2
3 (DEF):  D3
4 (GHI):  D4
5 (JKL):  D5
6 (MNO):  D6
7 (PQRS):  D7
8 (TUV):  D8
9 (WXYZ):  D9
0 (-,):  D0
* (CANCEL):  CLEAR
# ([_]):  SHARP
SKYPE:  SKYPE
3D:  3D
AUDIO:  AUDIOSEL
NETFLIX:     NETFLIX
SEARCH < <:  REV
SEARCH > >:  CUE
PLAY >:  PLAYBACK
SKIP < <:  SKIPREV
SKIP > >:  SKIPFWD
PAUSE ||:  PAUSE
STOP:  STOP
STATUS:  DSPSEL
EXIT:  EXIT
POP-UP MENU (TOP MENU):  TITLE
VIERA CAST:  V_CAST
HOME:  MLTNAV
UP:  UP
DOWN:  DOWN
LEFT <||:  LEFT
RIGHT ||>:  RIGHT
OK:  SELECT
SUBMENU:  MENU
RETURN:  RETURN
RED:  RED
GREEN:  GREEN
BLUE:  BLUE
YELLOW:  YELLOW

Playback View (buttons not in other views):
PIP:  P_IN_P
OSD:  OSDONOFF

Shuttle(BD) View (buttons not in other views):
(swipe in CW circle):  SHFWD2
(swipe in CCW circle):  SHREV2


You can also query the playback status of the player (play/pause/stop and elapsed time of current title in seconds) with the following AppleScript.

Code: Select all
set theIP to "192.168.1.20" -- set to your player's IP address.

-- send the command to the player and get the response.
set playerResponse to do shell script "curl -A MEI-LAN-REMOTE-CALL -d cCMD_PST.x=100 -d cCMD_PST.y=100 http://" & theIP & "/WAN/dvdr/dvdr_ctrl.cgi"
-- status data is in line 2 of the response.
set playerResponse to paragraph 2 of playerResponse
-- playback status is defined in character 1.
--    0 = stop
--    1 = play
--    2 = pause
set playerStatus to character 1 of playerResponse
-- playback elapsed time (in seconds) is the second comma-separated item in the response.
set AppleScript's text item delimiters to ","
set playerTime to text item 2 of playerResponse
set AppleScript's text item delimiters to {""}


It takes the player 1 to 2 seconds to respond to this status request, so it's not something you'd want to send more than, say, every 10 seconds.

The AppleScript variables "playerStatus" and "playerTime" in the above code can be assigned to Indigo variables using the 'set value of variable "Indigo_Variable_Name" to playerStatus' or 'set value of variable "Indigo_Variable_Name" to playerTime' statements within an Execute AppleScript action or within a 'tell application "IndigoServer"' block in an external script.

Posted on
Sat May 21, 2011 6:32 am
jay (support) offline
Site Admin
User avatar
Posts: 14156
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Controlling Panasonic DMP-BDTx10 Blu-Ray Players in Indi

Excellent - sounds like a great idea for an Indigo 5 plugin if you're so inclined. I've added it to the wish list and I can add your username to the "Who's Doing It" column if you like (hint hint)... ;)

See the Technical Docs section of the documentation page for details on building plugins.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Sun May 22, 2011 12:49 pm
nsheldon offline
Posts: 1885
Joined: Aug 09, 2010
Location: CA

Re: Controlling Panasonic DMP-BDTx10 Blu-Ray Players in Indi

Hi Jay.

Thanks! I agree, it does sound like a good idea for an Indigo 5 plugin and a fun project to work on. However, I'd better not commit to doing something that I'll likely not have enough time to follow-through on. I may try my hand at creating a plugin for this at a later time, though. <sarcasm>All I need to do</sarcasm> first is learn some Python, read all the plugin developer info, download Indigo 5 and install it, and update my extensive Indigo 4 AppleScript attachments and background tasks to work with Indigo 5. :-D

I'm glad to see Indigo 5 beta 1 out now, by the way. Nice work!

Posted on
Sun May 22, 2011 1:41 pm
jay (support) offline
Site Admin
User avatar
Posts: 14156
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Controlling Panasonic DMP-BDTx10 Blu-Ray Players in Indi

Just FYI - AppleScript support hasn't changed in Indigo 5 so your existing scripts should only need to be moved after installing Indigo 5.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Sun May 22, 2011 10:54 pm
nsheldon offline
Posts: 1885
Joined: Aug 09, 2010
Location: CA

Re: Controlling Panasonic DMP-BDTx10 Blu-Ray Players in Indi

Ahh! Good to know. That should make things much quicker. Thanks for the info.

Nathan

Posted on
Tue Dec 31, 2013 5:15 am
mat offline
Posts: 572
Joined: Nov 25, 2010
Location: Cambridgeshire - UK

Re: Controlling Panasonic DMP-BDTx10 Blu-Ray Players in Indi

Hi,

I like this idea, and would like to use similar to control my Vt50 tv. Any idea how to get the full url of the tv as your path is obviously for the dvd please?

I did find the codes for the panasonic tv's somewhere online so will try those.

Cheers


Mat

mini 10.11.6

Posted on
Wed Jan 01, 2014 12:28 pm
nsheldon offline
Posts: 1885
Joined: Aug 09, 2010
Location: CA

Re: Controlling Panasonic DMP-BDTx10 Blu-Ray Players in Indi

Hi Mat.

When I originally got my Panasonic TC-P65VT30, I did some packet sniffing while the iOS app communicated with the TV and found that it used an obnoxiously complex SOAP communication protocol (XML over HTTP basically) that was completely different from their Blu-ray player control mechanism. So rather than attempt to reverse-engineer their SOAP commands and formatting, I decided to use a serial cable (since the VT30 has a serial port for control and included the commands with the instruction manual for the TV). I don't know if the VT50 has this, but it may be an easier solution. My original (and rather old at this point) thread on this can be found here. Looks like you commented on that thread too before you got your VT50. I still haven't written any plugin for the TV as my original implementation, while somewhat complex, has been working okay so far.

Posted on
Wed Jan 01, 2014 1:17 pm
mat offline
Posts: 572
Joined: Nov 25, 2010
Location: Cambridgeshire - UK

Re: Controlling Panasonic DMP-BDTx10 Blu-Ray Players in Indi

Thanks Nathan, have read the earlier thread recently, and am coming to the same conclusion that the protocol is complex. not sure if I have a serial port on the vt50, but will check now, as that appears to be the most simplest way forward - I have a sneaky suspicion that the serial port isn't on my model though.

Thanks for the time.


Regards

Mat

mini 10.11.6

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest