View unanswered posts | View active topics It is currently Tue May 21, 2013 7:01 am



Reply to topic  [ 5 posts ] 
 Controlling Panasonic DMP-BDTx10 Blu-Ray Players in Indigo 
Author Message

Joined: Aug 09, 2010
Posts: 762
Location: CA
Post 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.


Sat May 21, 2011 2:06 am
Profile WWW
Site Admin
User avatar

Joined: Mar 19, 2008
Posts: 6651
Location: Austin, Texas
Post 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)
Image


Sat May 21, 2011 6:32 am
Profile WWW

Joined: Aug 09, 2010
Posts: 762
Location: CA
Post 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!


Sun May 22, 2011 12:49 pm
Profile WWW
Site Admin
User avatar

Joined: Mar 19, 2008
Posts: 6651
Location: Austin, Texas
Post 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)
Image


Sun May 22, 2011 1:41 pm
Profile WWW

Joined: Aug 09, 2010
Posts: 762
Location: CA
Post 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


Sun May 22, 2011 10:54 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.   Template designed by STSoftware.