Xbmcmodule API v1.2

23
Documentation XBMC Module API Touchpanelcontrol Ltd. www . touchpanelcontrol . com Version 1.2 XBMC Module API v1.2 Touch Panel Control Ltd.

Transcript of Xbmcmodule API v1.2

Page 1: Xbmcmodule API v1.2

Documentation

XBMC Module API

Touchpanelcontrol Ltd.www.touchpanelcontrol.com

Version 1.2

XBMC Module API v1.2 Touch Panel Control Ltd.

Page 2: Xbmcmodule API v1.2

Introduction

This document describes the API and configuration settings for use with the XBMC Module.

Accessing the API

Requesting Data● The module uses the SEND_COMMAND keyword to the declared virtual device ● All commands are formatted to: COMMAND_NAME=param1;param2;paramN● Commands are not case sensitive

An example of sending a command to the module follows: send_command 33001:1:1,"'SET_PLAYLIST_UID=1;A0FGTH5R88'"

Response Format● The module returns a STRING event for data requests● Return data is in the following format: COMMAND_NAME>data1;data2;dataN● After responding with all relevant lines of data the command sends its status in the form:

COMMAND_NAME=STATUS (where STATUS can be OK or FAILED)● If the command exits with the status FAILED, it will return with the following line describing the error

in the format: COMMAND_NAME=Error description Examples of return strings from the module follow: Return Data

:: String From [33001:1:1]-[GET_SHARES>1;D:\media\movies;movies]

Where the data is equal to ‘GET_SHARES>1;D:\media\movies;movies’

or...

Status Return

String From [33001:1:1]-[SHOW_SECTION=OK]

Where the data is equal to ‘SHOW_SECTION=OK’

Quick Reference

XBMC Module API v1.2 Touch Panel Control Ltd.

Page 3: Xbmcmodule API v1.2

API commands The following table is a quick reference to each of the commands available; more detail and examples can be located later in the document.

Command Parameters Description

HELP N/A Sends a list of available API commands to the Feedback Device and outputs data to Diagnostics.

VERSION N/A Returns the Version of the Module

SET_DEBUG_ON N/A All API output will be sent to Diagnostics as well as the Feedback Device

SET_DEBUG_OFF N/A Stop API output being sent to Diagnostics. Feedback will still be sent to the Feedback Device.

SET_POPUP_ONPAGE <1 or 0> Activates all popup commands to be sent to the module main page. Helps to prevent popups appearing on pages in custom designs.

SET_LICENSE_KEY <license key> Activates the license for the module. This command uses the LICENSE KEY key (NOT the TOKEN).

SET_IP_LICENSE_KEY N/A Activates the license for the module using the internet and the license registered to the Netlinx controller.

SET_IP_LICENSE_TOKEN <token> Activates the license for the module using the internet with a TOKEN (NOT the LICENSE KEY).

GET_LICENSE_KEY N/A Queries the internet for the key that is registered to the Netlinx Controller.

GET_HOSTS N/A Shows all saved connection profile settings.

SET_HOST <server index>;<server name>;

<host>;<port>;<login>;

<password>

Sets a host with parameters in the server index position.

SET_CONNECT <server index>;<tp index>

Connects to a host and applies a change to associated touch panels.

SET_HOST_CLEAR <server index> Clears the hosts connection parameters.

REFRESH <server index> Refresh the data with the host.

GET_CONNECTION_PARAMETERS

N/A Returns the connection parameters of the current connection.

XBMC Module API v1.2 Touch Panel Control Ltd.

Page 4: Xbmcmodule API v1.2

SHOW_SECTION <section name>;

<tp index>

Forces the touch panel to display the content section that was sent through.

GET_PLAYLISTS <server index>;<playlist type>;<index from>;

<count>

Returns the playlists available within the specified host for either music or video.

GET_SHARES <server index>;<share type>;<index from>;

<count>

Returns the shares available within the specified hosts for either music or video.

GET_FILES <server index>;<folder path>;<index from>;

<count>

Returns the files and folders available in the chosen path on the selected host.

PLAY_FILE <server index>;<file type>;

<folder path>

Plays a file from a direct file path for music or video.

GET_LIBRARY_ITEM <server index>;<library type>;

<library subtype>;

<id1>;<id2>;<id3>;<id4>;<id5>;

<index from>;<count>

Returns the list of available items within the library on the selected host.

PLAY_LIBRARY_ITEM <server index>;<library type>;

<id1>;<id2>;<id3>;<id4>;<id5>

Plays the library item on the selected host.

SCAN_AUDIO <server index> Requests the music library to scan.

SCAN_VIDEO <server index> Requests the video library to scan.

PLAYPAUSE <server index> Toggles between play and pause on the selected host.

STOP <server index> Stops the content playing on the current host.

PREV <server index> Selects the previous track.

NEXT <server index> Selects the next track.

PIPE <ascii-decimal> Provides the ability to character map the pipe character “|” with an alternate character.Default: PIPE=124

XBMC Module API v1.2 Touch Panel Control Ltd.

Page 5: Xbmcmodule API v1.2

GET_PLAYSTATE <server index> Returns current play status

XBMC Module API v1.2 Touch Panel Control Ltd.

Page 6: Xbmcmodule API v1.2

Command List

Overview

This section is to show each command in full detail with examples of how to use the command and expected responses back from the XBMC Module.

“HELP” Returns a list of available commands to the feedback device, as well as the Diagnostics window when enabled. This will show all commands that the module supports. Syntax:send_command <VDEV>, "'HELP'" Variables:None Examples:send_command dvXBMC_Feedback, "'HELP'" Returns:COMMAND[=Param1;Param2] Eg.

:: String From [33001:1:1]-[List of commands:]

:: String From [33001:1:1]-[SET_DEBUG_ON]

:: String From [33001:1:1]-[SET_DEBUG_OFF]

:: String From [33001:1:1]-[SET_POPUP_ONPAGE=<0 or 1>]

:: String From [33001:1:1]-[GET_LICENSE_KEY]

… continued

XBMC Module API v1.2 Touch Panel Control Ltd.

Page 7: Xbmcmodule API v1.2

“VERSION” Returns the version of the module installed in the controller. Syntax:send_command <VDEV>, "'VERSION'" Variables:None Examples:send_command dvXBMC_Feedback, "'VERSION'" Returns:VERSION><MODULE NAME>;<VERSION> Eg.

:: String From [33001:1:1]-[VERSION>XBMC;3353]

“SET_DEBUG_ON” The SET_DEBUG_ON command enables all feedback that is sent to the virtual device to be sent to the diagnostics window. Syntax:send_command <VDEV>, "'SET_DEBUG_ON'" Variables:None Examples:send_command dvXBMC_Feedback, "'SET_DEBUG_ON'" Returns:COMMAND=<STATUS> Eg.

:: String From [33001:1:1]-[SET_DEBUG_ON=OK]

XBMC Module API v1.2 Touch Panel Control Ltd.

Page 8: Xbmcmodule API v1.2

“SET_DEBUG_OFF” The SET_DEBUG_OFF command disables feedback to the diagnostic window which is set previously on by the SET_DEBUG_ON commands. Feedback is still sent to the virtual device. Syntax:send_command <VDEV>, "'SET_DEBUG_OFF'" Variables:None Examples:send_command dvXBMC_Feedback, "'SET_DEBUG_OFF'" Returns:COMMAND=<STATUS> Eg.

:: String From [33001:1:1]-[SET_DEBUG_OFF=OK]

“SET_POPUP_ONPAGE” The purpose of this command is to give more flexibility to the programmer in how the module should handle popups. By enabling the command, all popups will be associated to the “mm_xbmc_main_page” page, this way popups will not interrupt other pages within a custom design. Alternatively if you are creating your own template, you can turn the feature OFF to allow the module to show the popups at any point. Other reasons for disabling the popups on the page is when you are not using a PAGE for the design and just popups. Syntax:send_command <VDEV>, "'SET_POPUP_ONPAGE=<value>'" Variables:<value> = 1 = ON, 0 = OFF

Examples:send_command dvXBMC_Feedback, "'SET_POPUP_ONPAGE =1'"

Returns:COMMAND=<STATUS>COMMAND><VALUE> Eg.

:: String From [33001:1:1]-[SET_POPUP_ONPAGE=OK]

:: String From [33001:1:1]-[SET_POPUP_ONPAGE>1]

XBMC Module API v1.2 Touch Panel Control Ltd.

Page 9: Xbmcmodule API v1.2

“SET_LICENSE_KEY”

To activate the module for Full use, there is a page within the TP4 file to enter a license key. The SET_LICENSE_KEY command acts in the same way and licenses the module. If you are not using the default TP4 file or have your own customized version then use this command when the module is started for the first time.

Syntax:send_command <VDEV>, "'SET_LICENSE_KEY=<license key>'"

Variables:<license key> = Key received when registering a control system serial number against the token that was purchased. When required, the license key can be reviewed via your account login at www.touchpanelcontrol.com. The license key is NOT the same as a TOKEN, and is generated when a token and NI serial number are paired

Examples:send_command dvXBMC_Feedback, "'SET_LICENSE_KEY =aabbccddeeffgghh'"

Returns:COMMAND=<STATUS> Eg.

:: String From [33001:1:1]-[SET_LICENSE_KEY=OK]

“SET_IP_LICENSE_KEY” This command uses the internet to apply the license to the Netlinx controller. If you have applied a serial number to the account via the www.touchpanelcontrol.com login interface, then you can use this command to license the product without knowing the license key or token. It is recommended if you are running a trial that you enter this command in the online event for the virtual device, so that when a token purchased and registered online for the system serial number, the module will be updated and licensed after a reboot of the system. Syntax:send_command <VDEV>, "'SET_IP_LICENSE_KEY'"

Variables:None

Examples:send_command dvXBMC_Feedback, "'SET_IP_LICENSE_KEY '"

Returns:COMMAND=<STATUS> Eg.

:: String From [33001:1:1]-[SET_IP_LICENSE_KEY=OK]

XBMC Module API v1.2 Touch Panel Control Ltd.

Page 10: Xbmcmodule API v1.2

“SET_IP_LICENSE_TOKEN” This command uses the internet to register the module with a token. If you have a token and would like to assign a license to the device this command will generate a license key for the Netlinx controller and assign the controller to your account.

Syntax:send_command <VDEV>, "'SET_IP_LICENSE_TOKEN=<token>'"

Variables:<token> = MM-X-XXXX-XXXX, issued when purchased online at touchpanelcontrol.com

Examples:send_command dvXBMC_Feedback, "'SET_IP_LICENSE_TOKEN =MM-0-ABCD-1234'" Returns:COMMAND=<STATUS> Eg.

:: String From [33001:1:1]-[SET_IP_LICENSE_TOKEN=OK]

“GET_LICENSE_KEY” This command is used to retrieve the license key for the module. This can be helpful for your own records, if you have registered the module with SET_IP_LICENSE_TOKEN or if you are using a controller that has been setup with another account where you cannot see the license key.

Syntax:send_command <VDEV>, "'GET_LICENSE_KEY'"

Variables:None

Examples:send_command dvXBMC_Feedback, "'GET_LICENSE_KEY'"

Returns:COMMAND><VALUE>COMMAND=<STATUS> Eg.

:: String From [33001:1:1]-[GET_LICENSE_KEY>aabbccddeeffgghh]

:: String From [33001:1:1]-[GET_LICENSE_KEY=OK]

XBMC Module API v1.2 Touch Panel Control Ltd.

Page 11: Xbmcmodule API v1.2

“GET_HOSTS” Each connection the module makes to an XBMC application is called a Host. Depending on how many hosts you have defined in the module, depends on how many you can connect to with the module.This command will return each hosts name and other parameters. Syntax:send_command <VDEV>, "'GET_HOSTS'"

Variables:None

Examples:send_command dvXBMC_Feedback, "'GET_HOSTS'"

Returns:COMMAND><INDEX>;<NAME>;<IP>;<PORT>;<USERNAME>;<PASSWORD>;<STATUS>COMMAND=<STATUS> Eg.

::String From

[33001:1:1]-[GET_HOSTS>1;Theatre;192.168.10.22;80;xbmc;pass;online]

:: String From [33001:1:1]-[GET_HOSTS=OK]

“SET_HOST” Each connection the module makes to an XBMC application is called a Host. Depending on how many hosts you have defined in the module, depends on how many you can connect to with the module. Syntax:send_command <VDEV>, "'SET_HOSTS=<server index>;<server name>;<host>;<port>;<login>;<password>'"

Variables:<server index> = index between 1 and 5. Maximum 5 servers – required<server name> = server name – required<host> = host name or IP address of XBMC Player – required<port> = port number, usually 80 – required<login> = user login, leave blank if empty<password> = user password, leave blank if empty

Examples:send_command dvXBMC_Feedback, "' SET_HOST=1;My server;192.168.0.2;8080;user;secret'"send_command dvXBMC_Feedback, "' SET_HOST=2;New server;192.168.0.2;80;;'" Returns:COMMAND=<STATUS> Eg.

:: String From [33001:1:1]-[SET_HOST=OK]

XBMC Module API v1.2 Touch Panel Control Ltd.

Page 12: Xbmcmodule API v1.2

“SET_CONNECT” Connects the touch panel to the indexed host. This is useful when forcing a connection to a host. Syntax:send_command <VDEV>, "'SET_CONNECT=<server index>;<tp index>'" Variables:<server index> = index between 1 and 5. Maximum 5 servers – required<tp index> = touch panel to connect Examples:send_command dvXBMC_Feedback, "' SET_CONNECT=1;2'" Returns:COMMAND=<STATUS> Eg.

:: String From [33001:1:1]-[SET_CONNECT=OK]

“SET_HOST_CLEAR” Clears the host data and parameters for the indexed host. Syntax:send_command <VDEV>, "'SET_HOST_CLEAR=<server index>'"

Variables:<server index> = index between 1 and 5. Maximum 5 servers – required

Examples:send_command dvXBMC_Feedback, "' SET_HOST_CLEAR=3'"

Returns:COMMAND=<STATUS> Eg.

:: String From [33001:1:1]-[SET_HOST_CLEAR=OK]

XBMC Module API v1.2 Touch Panel Control Ltd.

Page 13: Xbmcmodule API v1.2

“REFRESH” Refreshes the data with the host. Syntax:send_command <VDEV>, "'REFRESH=<server index>'"

Variables:<server index> = index between 1 and 5. Maximum 5 servers – required

Examples:send_command dvXBMC_Feedback, "'REFRESH=3'"

Returns:COMMAND=<STATUS> Eg.

:: String From [33001:1:1]-[REFRESH=OK]

“GET_CONNECTION_PARAMETERS” Returns the current server name; host, port, login and password connection parameters on the indexed host. Syntax:send_command <VDEV>, "'GET_CONNECTION_PARAMETERS=<server index>'"

Variables:<server index> = index between 1 and 5. Maximum 5 servers – required Examples:send_command dvXBMC_Feedback, "'GET_CONNECTION_PARAMETERS=1'"

Returns:COMMAND>Number:<INDEX>COMMAND>Name:<NAME>COMMAND>Host:<IP>COMMAND>Port:<PORT>COMMAND>Username:<USERNAME>COMMAND>Password:<PASSWORD>COMMAND>Status:<CONNECTION>COMMAND=<STATUS> Eg.

:: String From [33001:1:1]-[GET_CONNECTION_PARAMETERS>Number:1]

:: String From [33001:1:1]-[GET_CONNECTION_PARAMETERS>Name:My server]

:: String From [33001:1:1]-[GET_CONNECTION_PARAMETERS>Host:192.168.0.82]

:: String From [33001:1:1]-[GET_CONNECTION_PARAMETERS>Port:8080]

:: String From [33001:1:1]-[GET_CONNECTION_PARAMETERS>Username:xbmc]

:: String From [33001:1:1]-[GET_CONNECTION_PARAMETERS>Password:xbmc]

:: String From [33001:1:1]-[GET_CONNECTION_PARAMETERS>Status:online]

:: String From [33001:1:1]-[GET_CONNECTION_PARAMETERS=OK]

:: String From [33001:1:1]-[REFRESH=OK]

“SHOW_SECTION”

Forces the touch panel to display the content section that was sent through. The sections can be any of the

XBMC Module API v1.2 Touch Panel Control Ltd.

Page 14: Xbmcmodule API v1.2

following, but require the XBMC Host to be connected.( tvshows | movies | music | pictures | remote | setup | nowplaying ) Syntax:send_command <VDEV>, "'SHOW_SECTION=<section name>;<tp index>'"

Variables:<section name> - name of the section ie. ( tvshows | movies | music | pictures | remote | setup | nowplaying )<tp index> - index of the touch panel in touch panel array Examples:send_command <VDEV>, "'SHOW_SECTION=music;2'"send_command <VDEV>, "'SHOW_SECTION=pictures;4'" Returns:COMMAND=<STATUS> Eg.

:: String From [33001:1:1]-[SHOW_SECTION=OK]

“GET_PLAYLISTS”

Returns the list of available playlists of the chosen type on the selected host. The playlist type is that of Music or Video. Syntax:send_command <VDEV>, "' GET_PLAYLISTS=<server index>;<playlist type>;<index from>;<count>'"

Variables:<server index> = index between 1 and 5. Maximum 5 servers<playlist type> = type of the playlist (music|video)<index from> = index of the first playlist or "+" to see from the first<count> = amount of playlists or "+" to see all

Examples:send_command <VDEV>, "'GET_PLAYLISTS=1;music;1;5'"send_command <VDEV>, "' GET_PLAYLISTS=1;video;+;+'"

Returns:COMMAND><INDEX>;<PATH>;<NAME>COMMAND=<STATUS> Eg.

:: String From [33001:1:1]-[GET_PLAYLISTS>1;special://profile/playlists/

video/nice.m3u;nice.m3u]

:: String From [33001:1:1]-[GET_PLAYLISTS>2;special://profile/playlists/

video/stallone.m3u;stallone.m3u]

:: String From [33001:1:1]-[GET_PLAYLISTS>3;special://profile/playlists/

video/clips.m3u;clips.m3u]

:: String From [33001:1:1]-[GET_PLAYLISTS=OK]

“GET_SHARES”

Returns the shares available within the specified host for either music or video. Syntax:send_command <VDEV>, "' GET_SHARES=<server index>;<share type>;<index from>;<count>'"

XBMC Module API v1.2 Touch Panel Control Ltd.

Page 15: Xbmcmodule API v1.2

Variables:<server index> = index between 1 and 5. Maximum 5 servers<share type> = type of the share (music|video)<index from> = index of the first share or "+" to see from the first<count> = amount of shares or "+" to see all

Examples:send_command <VDEV>, "'GET_SHARES=2;music;1;5'"send_command <VDEV>, "'GET_SHARES=3;video;+;+'"

Returns:COMMAND><INDEX>;<PATH>;<NAME>COMMAND=<STATUS> Eg.

:: String From [33001:1:1]-[GET_SHARES>1;D:\media\movies;movies]

:: String From [33001:1:1]-[GET_SHARES>2;D:\media\tvshows;tvshows]

:: String From [33001:1:1]-[GET_SHARES>3;D:\media\Movie Share;Move Share]

:: String From [33001:1:1]-[GET_SHARES=OK]

“GET_FILES”

Returns the list of available files or folders in the chosen path on the selected server. Syntax:send_command <VDEV>, "'GET_FILES=<server index>;<folder path>;<index from>;<count>'"

Variables:<server index> = index between 1 and 5. Maximum 5 servers<folder path> = path to return available files or folders<index from> = index of the first file or folder or "+" to see from the first<count> = amount of files or folders or "+" to see all

Examples:send_command <VDEV>, "'GET_FILES=1;D:\\;1;5'"send_command <VDEV>, "'GET_FILES=2;C:\\Music\\mediasongs\\;+;+'"

Returns:COMMAND><INDEX>;<PATH>;<NAME>COMMAND=<STATUS> Eg.

:: String From

[33001:1:1]-[GET_FILES>1;C:\Music\mediasongs\Just_can't fight this

feeling.mp3;Just_can't fight this feeling.mp3]

:: String From

[33001:1:1]-[GET_FILES>2;C:\Music\mediasongs\aerospace.mp3;aerospace.mp3]

:: String From

[33001:1:1]-[GET_FILES>3;C:\Music\mediasongs\fun.mp3;fun.mp3]

:: String From

[33001:1:1]-[GET_FILES>4;C:\Music\mediasongs\blueberry.mp3;blueberry.mp3]

:: String From

[33001:1:1]-[GET_FILES>5;C:\Music\mediasongs\drifter.mp3;drifter.mp3]

:: String From

[33001:1:1]-[GET_FILES=OK]

XBMC Module API v1.2 Touch Panel Control Ltd.

Page 16: Xbmcmodule API v1.2

“PLAY_FILES”

Plays a file directly from the path or folder specified. Syntax:send_command <VDEV>, "'PLAY_FILE=<server index>;<file type>;<folder path>'" Variables:<server index> = index between 1 and 5. Maximum 5 servers<file type> = type of file or folder (music|video)<folder path> = path to play from

Examples:send_command <VDEV>, "'PLAY_FILE=1;video;D:\\George.mp3'"send_command <VDEV>, "'PLAY_FILE=1;music;C:\\Music\\mediasongs\\'" Returns:COMMAND=<STATUS> Eg.

:: String From [33001:1:1]-[PLAY_FILE=OK]

XBMC Module API v1.2 Touch Panel Control Ltd.

Page 17: Xbmcmodule API v1.2

“GET_LIBRARY_ITEMS”

Returns the list of available items in the library and its identifications on the selected host. Syntax:send_command <VDEV>, "'GET_LIBRARY_ITEMS=<server index>;<library type>;<library subtype>;<id1>;<id2>;<id3>;<id4>;<id5>;<index from>;<count>'"

Variables:<server index> = index between 1 and 5. Maximum 5 servers<library type> = type of the library (music|movies|tvshows)<library subtype> = subtype of the library depends from library type

● music: genres, artists, albums, songs● movies: genres, actors, movies● tvshows: genres, actors, tvshows, seasons, episodes

<id1>,<id2>,<id3>,<id4>,<id5> = identifications of the library subtypes depends on library type

● music: idGenre, idArtist, idAlbum, idSong● movies: idGenre, idActor, idMovie● tvshows: idGenre, idActor, idShow, idSeason, idEpisode

<index from> = index of the first library item or "+" to see from the first<count> = amount of library items or "+" to see all

Examples:send_command <VDEV>, "' GET_LIBRARY_ITEMS=3;music;genres;+;+;+;+;+;1;2'" (first 2 music genres)send_command <VDEV>, "'GET_LIBRARY_ITEMS=3;tvshows;episodes;+;+;4;+;+;+;+'" (episodes of the tvshow with id=4)send_command <VDEV>, "' GET_LIBRARY_ITEMS=1;movies;movies;+;44;+;+;+;+;20'" (movies of the actor with id=44 maximum 20)

Returns:COMMAND><INDEX>;<PATH>;<NAME>COMMAND=<STATUS> Eg.

:: String From [33001:1:1]-[GET_LIBRARY_ITEMS>1;2;Superman IV]

:: String From [33001:1:1]-[GET_LIBRARY_ITEMS>2;8;The Matrix]

:: String From [33001:1:1]-[GET_FILES=OK]

XBMC Module API v1.2 Touch Panel Control Ltd.

Page 18: Xbmcmodule API v1.2

“PLAY_LIBRARY_ITEM”

Plays a library item within the library on the indexed host.. Syntax:send_command <VDEV>, "'PLAY_LIBRARY_ITEM=<server index>;<library type>;<id1>;<id2>;<id3>;<id4>;<id5>'"

Variables:<server index> = index between 1 and 5. Maximum 5 servers<library type> = type of the library (music|movies|tvshows)<id1>,<id2>,<id3>,<id4>,<id5> = identificators of the library subtypes depends from library type

● music: idGenre, idArtist, idArtist, idSong● movies: idGenre, idActor, idMovie (required to play)● tvshows: idGenre, idActor, idShow, idSeason, idEpisode (required to play)

Examples:send_command <VDEV>, "'PLAY_LIBRARY_ITEM=2;music;+;+;+;+;+'" (play all music)send_command <VDEV>, "'PLAY_LIBRARY_ITEM=2;tvshows;+;+;4;2;3'" (play episode with id=3 from season with id=2 from tvshow with id=4)send_command <VDEV>, "'PLAY_LIBRARY_ITEM=2;movies;+;+;123;+;+'" (play movie with id=123)

Returns:COMMAND=<STATUS> Eg.

:: String From [33001:1:1]-[PLAY_LIBRARY_ITEM=OK]

“SCAN_AUDIO”

Requests the Audio library preforms a scan of its content. Syntax:send_command <VDEV>, "'SCAN_AUDIO=<server index>'"

Variables:<server index> = index between 1 and 5. Maximum 5 servers

Examples:send_command <VDEV>, "'SCAN_AUDIO=2'"

Returns:COMMAND=<STATUS> Eg.

:: String From [33001:1:1]-[SCAN_AUDIO=OK]

.

XBMC Module API v1.2 Touch Panel Control Ltd.

Page 19: Xbmcmodule API v1.2

“SCAN_VIDEO”

Requests the Video library preforms a scan of its content. Syntax:send_command <VDEV>, "'SCAN_VIDEO=<server index>'"

Variables:<server index> = index between 1 and 5. Maximum 5 servers

Examples:send_command <VDEV>, "'SCAN_VIDEO=3'"

Returns:COMMAND=<STATUS> Eg.

:: String From [33001:1:1]-[SCAN_AUDIO=OK]

“PLAYPAUSE”

The PLAYPAUSE command simply toggles between the Play state and Pause state of the library the command is sent to.

Syntax:send_command <VDEV>, "'PLAYPAUSE=<server index>'"

Variables:<server index> = index between 1 and 5. Maximum 5 servers

Examples:send_command dvXBMC_Feedback, "'PLAYPAUSE=2'"

Returns:COMMAND=<STATUS> Eg.

:: String From [33001:1:1]-[PLAYPAUSE=OK]

“STOP”

The STOP command is a discrete command to tell the library to Stop. This resets the track to the beginning.

Syntax:send_command <VDEV>, "'STOP=<server index>'"

Variables:<server index> = index between 1 and 5. Maximum 5 servers

Examples:send_command dvXBMC_Feedback, "'STOP=4'"

Returns:COMMAND=<STATUS>

XBMC Module API v1.2 Touch Panel Control Ltd.

Page 20: Xbmcmodule API v1.2

Eg.

:: String From [33001:1:1]-[STOP=OK]

“PREV”

The PREV command sends the previous track control to the library.

Syntax:send_command <VDEV>, "'PREV=<server index>'"

Variables:<server index> = index between 1 and 5. Maximum 5 servers

Examples:send_command dvXBMC_Feedback, "'PREV=1'"

Returns:COMMAND=<STATUS> Eg.

:: String From [33001:1:1]-[PREV=OK]

“NEXT” The NEXT command sends the next track control to the library.

Syntax:send_command <VDEV>, "'NEXT=<server index>'"

Variables:<server index> = index between 1 and 5. Maximum 5 servers

Examples:send_command dvXBMC_Feedback, "'NEXT=1'"

Returns:COMMAND=<STATUS> Eg.

:: String From [33001:1:1]-[NEXT=OK]

XBMC Module API v1.2 Touch Panel Control Ltd.

Page 21: Xbmcmodule API v1.2

“PIPE” The PIPE command is used specifically to replace the pipe character (‘|’ = decimal 124), with an alternate character. PIPE characters may be issued to G4 touch panel interfaces as part of a UI update command and, by default, pipe characters insert a line separator within the AMX G4 UI. This may present an undesirable effect based on unknown external content that could include pipe characters e.g. radio station text. Therefore, the ability to substitute pipe characters has been implemented to mitigate the potential problem. Syntax:send_command <VDEV>, “‘PIPE=<ascii-decimal>’” Variables:<ascii-decimal> = an ascii-decimal value (0-127). Default is 124 Examples:send_command dvXBMC_Feedback, “PIPE=58” Returns:COMMAND><STATUS>Eg.

:: String From [31001:1:1]-[PIPE>OK]

“GET_PLAYERSTATE” Returns currently playing attributes: - play status (plays/stop/pause) - play container (music/video) - playing track - slideshow status Syntax:send_command <VDEV>, “‘GET_PLAYSTATE=<server index>’” Variables:<server index> = index between 1 and 5. Maximum 5 servers Examples:send_command dvXBMC_Feedback, “‘GET_PLAYSTATE=1’” Returns:COMMAND><STATUS>Eg.

:: String From [33001:1:1]-[GET_PLAYERSTATE>PlayingStatus:playing]

:: String From [33001:1:1]-[GET_PLAYERSTATE>PlayingType:video]

:: String From [33001:1:1]-[GET_PLAYERSTATE>Filename:c:\video\movie.mp4]

:: String From [33001:1:1]-[GET_PLAYERSTATE>Slideshow:off]

:: String From [33001:1:1]-[GET_PLAYERSTATE=OK]

XBMC Module API v1.2 Touch Panel Control Ltd.

Page 22: Xbmcmodule API v1.2

Remotes/Keypads

Channel Codes The Module provides the capability of using remotes and keypads within the module without flooding the devices with commands from the Netlinx controller. This is handy when a system is installed with simple device control such as Novara™ keypads, or if simple control is required from Modero R4™ handheld devices. You can declare the remotes/keypads within the module located in the DEFINE_DEVICE and DEFINE_VARIABLE sections.

The table listed below indicates each channel code and the role of the channel code for use with the remotes/keypads devices.

Channel Code R4 Key Action

9 Power Activate shutdown menu

10 0 Shuffle

11 1 Play DVD

12 2 -

13 3 OSD

14 4 Eject/Load

15 5 -

16 6 GUI/Visual

17 7 Subtitles

18 8 Update Library

19 9 -

21 Enter -

22 CH+ Next track

23 CH- Prev track

24 VOL+ Volume up

25 VOL- Volume down

26 Mute Toggle Mute

44 Menu Remote control menu

45 Up Remote control up

46 Down Remote control down

47 Left Remote control left

XBMC Module API v1.2 Touch Panel Control Ltd.

Page 23: Xbmcmodule API v1.2

48 Right Remote control right

49 Select Remote control select

50 Exit Remote control exit

101 Info Back

105 Guide Home

196 Input Repeat

235 Last Play/Pause

XBMC Module API v1.2 Touch Panel Control Ltd.