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"
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
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 {""}
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.