"My Home Automation Projects"

Interfaces - xPL

Please also read the Disclaimer

MediaNet - Interface Modules - xPL

Purpose: To provide Control/Status via xPL Protocol

LOADER.xml

<loader>
    <instance>
      <protocol module="XPL" enabled="y" />
          set enabled="n" to disable
      <hub enabled="y" />
          specifiy whether a hub should be loaded
      <status power="y" volume="y" mute="y" random="y" repeat="y" playlist="y" />
          specify which additional status info should be tagged to the end of each status message
    </instance>
</loader>

The xPL module self configures itself, adjusting device names automatically if devices are renamed in clients.xml

As the device name can contain any character and be any length the xPL module takes up to the first 16 characters (0 to 9 and a to z) to create the xPL Instance

Supported Schemas

XPLMEDIA-SERVER.SERVER

This device is MediaNet itself, and supports:

MEDIA.BASIC

    command=scan
    source=<source name>
    type=<scan type>

This is the xpl method for running the scanners associated with sources and other modules

Source= is the title of the module from Loader.xml

Type= is the scan or purge title in the modules own LOADER.xml


XPLMEDIA-CLIENT.*

These are the clients. The device instance is generated from upto the first 16 valid characters of the device
as it is named in clients.xml

MediaNet devices are named sequentially Unit0, Unit1 etc If you change the name in clients.xml then
the xPL module will automatically update itself to the new names (only edit clients.xml when service is stopped)

TTS.BASIC

    XPL-CMND

    SPEECH=
    (VOICE=)
    (VOLUME=)
    (SPEED=)
    (SCALE=)

TTS is used to generate text-to-speech (requires seperate application)
TTS is the only Medianet supported schema that accepts "*" as the target


OSD.BASIC

    XPL-CMND

    COMMAND=clear/write/exclusive/release
    TEXT=
    (ROW=)
    (COLUMN=)
    (DELAY=)

OSD is used to display text on a devices display


REMOTE.BASIC

    XPL-CMND

    KEYS=<comma seperated ir and/or functions as per keymap.xml>

Used to emulate the devices remote control

Note: the xPL module queries the keymap.xml of the device, based on the current context of the device
and always passes the IR code, which the device then looks up again
to use keys that are not mapped to an ir code, you must edit keymap.xml and enter dummy IR values


MEDIA.REQUEST

    XPL-CMND

    COMMAND=STATUS

This returns the last status message (status=next messages are ignored by this function)
and the current values of the items enabled in LOADER.xml


MEDIA.BASIC

    XPL-CMND

    COMMAND=PLAY/STOP/NEXT/PREVIOUS/CLEAR/REBOOT

    COMMAND=PAUSE/MUTE/RANDOM/POWER
    (STATE=ON/OFF)

    COMMAND=REPEAT
    (STATE=OFF/ONE/ALL)

    COMMAND=VOLUME
    (LEVEL=+n/-n or >n/<n or n, n = 0 to 100)

    COMMAND=BALANCE
    (LEVEL=+n/-n or >n/<n or n, n = 0 to 15)

    COMMAND=ANNOUNCE (requires seperate application)
    SPEECH=
    (VOICE=)
    (VOLUME=)
    (SPEED=)
    (SCALE=)

The following examples queue music from a source
The message structure is dependent on the source module

    COMMAND=QUEUE
    SOURCE=<source name, e.g. BROWSE>
    FOLDER=<first part of path e.g. C:>
    ......
    FOLDER=<last part of path e.g. My Album>
    FILE=<filename e.g. a track.mp3>
    No filename means queue whole folder and sub-folders
    File=. means queue whole folder, but not sub-folders

    COMMAND=QUEUE
    SOURCE=<source name, e.g. MUSIC>
    (GENRE=<genre name>)
    (ARTIST=<artist name>)
    (ALBUM=<album name>)
    (TRACK=<track name>)

    COMMAND=QUEUE
    SOURCE=<source name, e.g. PLAYLISTS>
    PLAYLIST=<playlist name>

    COMMAND=QUEUE
    SOURCE=<source name, e.g. QUERIES>
    (GROUP=<query xml name, if more than 1 exists>)
    QUERY=<query name>
    (PLAYER=<player name>)

    COMMAND=QUEUE
    SOURCE=<source name, e.g. SHOUTCASTS>
    (GROUP=<streams xml name, if more than 1 exists)
    SHOUTCAST=<shoutcast name>


    XPL-TRIG

    COMMAND=REBOOT/PLAY/STOP/NEXT/PREVIOUS/CLEAR

    COMMAND=POWER/MUTE/RANDOM
    STATE=OFF/ON

    COMMAND=REPEAT
    STATE=ONE/ALL/OFF

    COMMAND=VOLUME/BALANCE
    LEVEL=n


    XPL-STAT

    STATUS=POWER ON

    STATUS=POWER OFF

    STATUS=STOPPED

    STATUS=PLAYING
    TYPE=STREAM
    STREAM=<name of stream>

    STATUS=PLAYING/NEXT
    TYPE=<file extension e.g. MP3, FLAC, OGG, WMV, WAV>
    ARTIST=<artist name>
    ALBUM=<album name>
    TRACK=<track name>

All of these XPL-STAT messages are also tagged with the following
optional information which is enabled via LOADER.xml

    POWER=ON/OFF

    MUTE=ON/OFF

    RANDOM=ON/OFF

    REPEAT=ONE/ALL/OFF

    PLAYED=n
    QUEUED=n
    STREAMING=YES/NO

REMOTE.BASIC

    XPL-TRIG

    ZONE=<zone specified by Zone config item>
    DEVICE=<instance name>
    KEYS=<keyname or ir code as appropriate for device>
    POWER=on / off