Ecp Command Syntax; About Paths; Script File Formats; An Example Ecp Script - Roku HD1000 Manual

External control protocol
Hide thumbs Also See for HD1000:
Table of Contents

Advertisement

ECP command syntax

The syntax for ecp is as follows:
ecp <app identifier> <command> [optional arguments]
For example:
ecp photoApp IMAGEDIR "/tmp/Volumes/CompactFlash"
ecp photoApp DISPLAY _ IMAGE "/tmp/Volumes/CompactFlash/myphoto. jpg"
ecp photoApp QUIT

About Paths

The various media sources available to the HD1000 appear in /mnt where flash0 is the built-
in storage, flash1 is Compact Flash, flash2 is SD/MMC, flash3 is Memory Stick and flash4 is
SmartMedia. Mounted network shares can be found in /mnt/smb/.
For your convenience, all currently-mounted media sources can be found with better names
in /tmp/Volumes . For readability, this is how media sources these scripts below will refer to
media sources, with a few exceptions.

Script File Formats

Scripts are simply text files. However, the format of the files is slightly different than that to
which most Windows users may be used. Scripts must be saved with unix-style line endings. If
you use Linux to edit your script files, the format will be correct. However, if you use Windows
or MacOS to edit your script files, the format of the files may be incorrect, resulting in the
HD1000 being unable to execute the files. There are text-editors available for Windows that
are able to save text files with Unix-style line endings. Among these is "TextPad". There is a
command-line utility called "dos2unix" that will convert files from Windows line endings to
Unix line endings.

An example ECP script

The following brief example script is a trivial playlist, using the faceless music player to provide
background music for a four-image slideshow. A longer, more complex example appears in
the Appendix of this document, and is available for download from the Roku web site.
#!/bin/sh
# Launch the Photo app in "playlist" mode.
# Be sure to launch in background (with &), or the
# script will not continue past this line!
photo –p &
# Wait a bit to make sure Photo has launched.
Roku External Control Protocol for the HD1000
© 2003 Roku, LLC
2

Advertisement

Table of Contents
loading

Table of Contents