DUNE IP CONTROL DOCUMENTATION
=============================
Introduction
------------
Dune IP Control feature can be used to send HTTP commands to Dune HD media
player which request the player to do various things, such as:
- Start playback of the given media content.
- Control the playback (pause, seek to a given position, etc).
- Report the current player status (current playback position, etc).
- Stop playback and switch to various player states (e.g. black screen,
standby).
When IP Control functionality is enabled, an HTTP server is running inside the player.
The HTTP server can be accessed via HTTP port 80.
Firmware and protocol versions
------------------------------
The first public firmware version which introduced IP Control version was
110127_2105_beta. In this firmware version, IP Control protocol version "1" was
used.
Below is the information about IP Control features available in protocol
version "1". For information about changes and additional features introduced
in further firmware updates, please look at the end of the document.
---------------------------------------------------------------------------
Features in protocol version "1"
================================
HTTP-request examples
---------------------
==== Start playback ====
http://10.0.0.1/cgi-bin/do?
cmd=start_file_playback&media_url=nfs://10.0.0.1:/VideoStorage:/SomeFolder/file.mkv
http://10.0.0.1/cgi-bin/do?
cmd=start_dvd_playback&media_url=smb://10.0.0.1/VideoStorage/SomeFolder/DVDFolder
http://10.0.0.1/cgi-bin/do?
cmd=start_dvd_playback&media_url=storage_name://MyHDD1/SomeFolder/dvd_image.iso
http://10.0.0.1/cgi-bin/do?
cmd=start_bluray_playback&media_url=nfs://10.0.0.1:/VideoStorage:/SomeFolder/BlurayFolder
http://10.0.0.1/cgi-bin/do?
cmd=start_bluray_playback&media_url=nfs://10.0.0.1:/VideoStorage:/SomeFolder/bluray_image.iso
http://10.0.0.1/cgi-bin/do?
cmd=start_bluray_playback&media_url=nfs://10.0.0.1:/VideoStorage:/SomeFolder/bluray_image.iso&start_index=3&auto_start=yes
http://10.0.0.1/cgi-bin/do?
cmd=start_file_playback&media_url=http://10.0.0.1/some_upnp_url_path
http://10.0.0.1/cgi-bin/do?
cmd=start_file_playback&media_url=http://www.someinternetradio.org/station1.mp3
http://10.0.0.1/cgi-bin/do?
cmd=start_file_playback&media_url=nfs://10.0.0.1:/VideoStorage:/SomeFolder/file.mkv&speed=0&position=0&black_screen=1&hide_osd=1&action_on_finish=restart_playback
http://10.0.0.1/cgi-bin/do?
cmd=start_dvd_playback&media_url=nfs://10.0.0.1:/VideoStorage:/SomeFolder/DVDFolder&speed=0&position=0&black_screen=1&hide_osd=1&action_on_finish=restart_playback
http://10.0.0.1/cgi-bin/do?
cmd=start_dvd_playback&media_url=nfs://10.0.0.1:/VideoStorage:/SomeFolder/dvd_image.iso&speed=0&position=0&black_screen=1&hide_osd=1&action_on_finish=restart_playback
Here:
- media_url: any media URL supported by Dune HD, see here for more
information:
http://files.dune-hd.com/sdk/doc/html/media_url.html
- speed: -1024/-512/-256/-128/-64/0/64/128/256/512/1024
(0 = paused, 64 = 1/4x, 256 = 1x, 1024 = 4x, -1024 = -4x).
- position: initial position (seconds).
- black_screen: 0|1 (1 means everything (video+OSD) is initially hidden by
"black screen" - can be reset to 0 later via set_playback_state command).
- hide_osd: 0|1 (1 means OSD is initially hidden - can be reset to 0 later
via set_playback_state command).
- action_on_finish: exit|restart_playback ("exit" means exit the playback
in the usual way, "restart_playback" means go to the initial playback
state).
- start_index=N, auto_start=yes|no|auto: parameters of
start_bluray_playback command. They have effect on startup of bluray-lite
playback.
NOTE: Not all parameters are supported for all file formats. For Blu-ray
playback, many parameters are not supported (in particular, black_screen
and hide_osd is not supported).
NOTE: The "media_url" parameter must be URL-escaped in the usual way, e.g.
whitespace character (' ') should be replaced with '%20%' string.
==== Control playback ====
http://10.0.0.1/cgi-bin/do?cmd=set_playback_state&speed=256&black_screen=0
http://10.0.0.1/cgi-bin/do?cmd=set_playback_state&position=1000
http://10.0.0.1/cgi-bin/do?cmd=set_playback_state&speed=0
http://10.0.0.1/cgi-bin/do?cmd=set_playback_state&skip_frames=-1
http://10.0.0.1/cgi-bin/do?cmd=set_playback_state&skip_frames=1
http://10.0.0.1/cgi-bin/do?cmd=set_playback_state&speed=256
http://10.0.0.1/cgi-bin/do?cmd=set_playback_state&speed=0&position=0&black_screen=1
http://10.0.0.1/cgi-bin/do?cmd=set_playback_state&hide_osd=0
Here:
- speed, position, black_screen, hide_osd: the same as in
"start_file_playback" command.
- skip_frames: -1|1 (can only be used when the playback is paused (speed =
0); allows to navigate to next/prev key frame; is supported for DVD and
MKV only).
http://10.0.0.1/cgi-bin/do?cmd=dvd_navigation&action=RIGHT
Here:
action: LEFT|RIGHT|UP|DOWN|ENTER
==== Stop playback / switch to various player states ====
http://10.0.0.1/cgi-bin/do?cmd=black_screen
Stop playback (if any), go to the global "black_screen" state.
http://10.0.0.1/cgi-bin/do?cmd=main_screen
Stop playback (if any), go to the main screen of the player's menu
http://10.0.0.1/cgi-bin/do?cmd=standby
Stop playback (if any), go to standby state.
==== Emulate a command from Remote Control ====
http://10.0.0.1/cgi-bin/do?cmd=ir_code&ir_code=F40BBF00
Here:
- ir_code: 4-byte NEC IR code supported by Dune (see
http://dune-hd.com/support/rc), with bytes written in the opposite order
(e.g. RC button "1" = 00 BF 0B F4 => F40BBF00).
==== Getting player status ====
http://10.0.0.1/cgi-bin/do?cmd=status
Do nothing, just return to the current player status.
Command execution timeouts
--------------------------
The client gets response either when the command execution completes, or on
timeout. The default timeout is 20 seconds. If timeout occurs, the
"timeout" status is returned to the client, and the command execution is
continued by the player; if needed the client can then poll the player with
the "status" command to wait for the player to change its state as the
result of this command. There is a special parameter "timeout", which
allows to specify any other timeout (seconds) (1 sec is minumum).
Example of "timeout" parameter usage:
http://10.0.0.1/cgi-bin/do?
cmd=start_file_playback&media_url=nfs://10.0.0.1:/VideoStorage:/SomeFolder/file.mkv&speed=0&black_screen=1&hide_osd=1&timeout=1
HTTP-response syntax
--------------------
Here:
- protocol_version: 1
- command_status: ok|failed|timeout
- player_state: file_playback|dvd_playback|bluray_playback|black_screen|standby|navigator
If command_status is "failed", the response also contains the
following parameters:
- error_kind: unknown_command|invalid_parameters|illegal_state|internal_error|operation_failed
- error_description: some text
If player_state is "file_playback" or "dvd_playback", the response
also contains the following parameters:
- playback_speed: -1024/-512/-256/-128/-64/0/64/128/256/512/1024
- playback_duration: duration in seconds (-1 or 0 if unknown)
- playback_position: position in seconds (-1 if unknown)
- playback_dvd_menu: 0|1 (1 means DVD-menu is currently shown)
- playback_is_buffering: 0|1 (1 means buffering is in progress)
Quick recommendations for using Dune as an embedded playback device
-------------------------------------------------------------------
- Set the setting "Setup / Misc / Power Management / Power on" to "Black
screen". => Dune will not show its menu by default on boot.
- To play a M2TS file, send the NFS URL pointing to the file to Dune using
"start_file_playback" HTTP command.
- To control the playback (pause, seek, etc), use "set_playback_state" HTTP
command.
- To stop the playback, use "black_screen" (or "standby") HTTP command.
- To implement any other things not explicitly supported by the HTTP
protocol, use "ir_code" HTTP comand to emulate RC button presses.
Sending sequences of IR codes to trigger various actions
--------------------------------------------------------
If some action has no dedicated IP Control command, in many cases it may be
possible to send a sequence of IR codes to trigger this action.
For example, "REPEAT" playback setting can be currently (as of 2020-09-15)
accessed only via "Playlist menu and can be toggled by the following
sequence of RCU key presses after playback start:
- AUDIO (to open the audiotracks menu)
- POP UP MENU (to exit from the audiotracks menu to the main playback menu)
- UP (to select "Playlist" item in the main playback menu)
- ENTER (to open the playlist menu)
- 7 (to toggle "REPEAT" function)
- POP UP MENU (to exit from the playlist menu to the main playback menu)
- POP UP MENU (to exit from the main playback menu)
Here is the sequence of IP control command which imitates these RCU key
presses:
- cmd=ir_code&ir_code=BB44BF00
- cmd=ir_code&ir_code=F807BF00
- cmd=ir_code&ir_code=EA15BF00
- cmd=ir_code&ir_code=EB14BF00
- cmd=ir_code&ir_code=EE11BF00
- cmd=ir_code&ir_code=EB14BF00
- cmd=ir_code&ir_code=F807BF00
- cmd=ir_code&ir_code=F807BF00
Here is an example of Linux shell script which sends these IP control
commands to Dune box (replace 10.0.0.1 the the actual Dune box IP address):
for i in BB44BF00 F807BF00 EA15BF00 EB14BF00 EE11BF00 F807BF00 F807BF00; do
curl "http://10.0.0.1/cgi-bin/do?cmd=ir_code&ir_code=$i"; sleep 0.1; done
Changes and new features, introduced in firmware updates
========================================================
Protocol "2" (starting with firmware version 111122_0159_beta)
--------------------------------------------------------------
- Improved reporting of current state during playback of IPTV streams.
- Added information about available audiotracks during playback.
- Added the possibility to configure the following playback parameters
(via "set_playback_state"):
- video_enabled
- video_zoom
- video_fullscreen
- video_x
- video_y
- video_width
- video_height
- volume
- mute
Protocol "3" (starting with firmware version 120531_2200_beta)
--------------------------------------------------------------
==== Start playback of playlist ====
http://10.0.0.1/cgi-bin/do?
cmd=start_playlist_playback&media_url=nfs://10.0.0.1:/VideoStorage:/SomeFolder/mymovies.m3u&start_index=2
http://10.0.0.1/cgi-bin/do?
cmd=start_playlist_playback&media_url=nfs://10.0.0.1:/VideoStorage:/StarWars&start_index=3
http://10.0.0.1/cgi-bin/do?
cmd=start_playlist_playback&media_url=nfs://10.0.0.1:/VideoStorage:/SomeFolder/mymovies.m3u&start_index=0&speed=0&position=0&black_screen=1&hide_osd=1
==== Start playback of media_url with media kind autodetect (file/DVD/BD) ====
http://10.0.0.1/cgi-bin/do?
cmd=launch_media_url&media_url=nfs://10.0.0.1:/VideoStorage:/SomeFolder/file.mkv
http://10.0.0.1/cgi-bin/do?
cmd=launch_media_url&media_url=smb://10.0.0.1/VideoStorage/SomeFolder/DVDFolder
http://10.0.0.1/cgi-bin/do?
cmd=launch_media_url&media_url=nfs://10.0.0.1:/VideoStorage:/SomeFolder/bluray_image.iso
==== Start FlashLite app ====
http://10.0.0.1/cgi-bin/do?
cmd=launch_media_url&media_url=swf://nfs://10.0.0.1:/MiscStorage:/FlashApps/airplane.swf:::flash_param1=value
NOTE: See http://dune-hd.com/support/flash for more details on SWF URL
syntax.
==== Start web browser with given URL ====
http://10.0.0.1/cgi-bin/do?
cmd=launch_media_url&media_url=www://http://google.com
http://10.0.0.1/cgi-bin/do?
cmd=launch_media_url&media_url=www://http://10.0.0.1/WebApps/my.html:::fullscreen=1&webapp_keys=1&zoom_level=100
NOTE: See http://dune-hd.com/support/misc/media_url.txt for more details on
WWW URL syntax.
==== Get/set current text editor state ====
http://10.0.0.1/cgi-bin/do?cmd=get_text
Returns the currently being edited text string as value of "text" param.
Returns "failed" command status if there is no active text editor.
http://10.0.0.1/cgi-bin/do?cmd=set_text&text=some_text_string
Replaces the currently edited text string with the given text string.
Returns "failed" command status if there is no active text editor.
Here:
- text: the text string to be assigned (UTF-8).
Protocol "4" (starting with firmware version 150218_0034)
---------------------------------------------------------
- Added new parameters to the current state report:
- teletext_available
- teletext_enabled
- teletext_mix_mode
- teletext_page_number
- Added the possibility to configure the following playback parameters
(via "set_playback_state"):
- teletext_enabled (0..1)
- teletext_mix_mode (0..1)
- teletext_page_number (100..899)
- dune_params are now allowed in start_bluray_playback, in m3u,
dune_folder.txt for Blu-ray lite.
- Added new operation:
- cmd=open_path&url=URL
==== Enable teletext ====
http://10.0.0.1/cgi-bin/do?
cmd=set_playback_state&teletext_enabled=1
==== Turn teletext to mix mode ====
http://10.0.0.1/cgi-bin/do?
cmd=set_playback_state&teletext_mix_mode=1
==== Enable teletext and open page 533 ====
http://10.0.0.1/cgi-bin/do?
cmd=set_playback_state&teletext_enabled=1&teletext_page_number=533
==== Open path in GUI (open given folder / choose given item) ===
The "open_path" command can be used to open the given folder, the given
menu section, or launch the given menu item.
Examples:
http://10.0.0.1/cgi-bin/do?
cmd=open_path&url=root://applications
http://10.0.0.1/cgi-bin/do?
cmd=open_path&url=root://applications/RadioTime
http://10.0.0.1/cgi-bin/do?
cmd=open_path&url=root://tv
http://10.0.0.1/cgi-bin/do?
cmd=open_path&url=root://setup
http://10.0.0.1/cgi-bin/do?
cmd=open_path&url=root://favorites
http://10.0.0.1/cgi-bin/do?
cmd=open_path&url=root://sources
http://10.0.0.1/cgi-bin/do?
cmd=open_path&url=root://sources/USB%20Storage
http://10.0.0.1/cgi-bin/do?
cmd=open_path&url=root://sources/USB%20Storage/Folder1
http://10.0.0.1/cgi-bin/do?
cmd=open_path&url=root://sources/Network%20Browser/Network%20Places/WORKGROUP
NOTE: The "url" parameter must be URL-escaped in the usual way, e.g.
whitespace character (' ') should be replaced with '%20%' string.
NOTE: Captions in URL are those shown on TV screen and may depend on the
used UI language.
==== Launch plugin ===
The "launch_media_url" command with "plugin_launcher://" media_url can be
used to launch the given plugin, the given entry point of the given plugin,
or execute the given action on the given plugin.
Example:
http://10.0.0.1/cgi-bin/do?
cmd=launch_media_url&media_url=plugin_launcher://{name=radiotime}
Syntax:
http://10.0.0.1/cgi-bin/do?
cmd=launch_media_url&media_url=plugin_launcher://{name=plugin_name}
http://10.0.0.1/cgi-bin/do?
cmd=launch_media_url&media_url=plugin_launcher://{name=plugin_name}{ep_media_url=plugin_entry_point_media_url}
http://10.0.0.1/cgi-bin/do?
cmd=launch_media_url&media_url=plugin_launcher://{name=plugin_name}{action_id=plugin_action_id}
Here:
- plugin_name -- the name of an installed plugin.
- ep_media_url -- media_url of an entry point in the plugin; useful if the
plugin has several entry points.
- action_id -- ID of an action in the plugin; useful to perform a given
action on the plugin; this action should be defined in the plugin
manifest.
More information about plugins:
http://files.dune-hd.com/sdk/doc/html/plugins.html
Examples of plugin names:
- radiotime
- dunestore
- kartina_tv_launcher
Names of all plugins currently installed on the box can be obtained this
way:
1. On a PC, install and open terminal emulator application; for example, PuTTY:
https://www.putty.org/
2. Enable telnet access to the box:
http://files.dune-hd.com/sdk/doc/html/dune_devel_info.html#telnet_access_to_stb
3. Perform the following command in telnet session to the box:
ls /tmp/plugins
Protocol "5" (starting with firmware version 181228_0252_r13)
-------------------------------------------------------------
Support for JSON responses:
All commands can now return responses in JSON format -- when
"result_syntax=json" parameter is specified.
The new command "ui_state" (see below) requires "result_syntax=json";
other commands support both old and new result format.
NOTE: If your client application needs to support older protocol
versions, it must still use the old result format when using old
commands.
The following new parameters are now available in player status:
General information about media player:
Additional information about currently played content:
If available: main caption for the currently played content
If available: additional caption for the currently played content
If available: picture (movie poster, music cover, TV channel llogo) for the currently played content
If available: information is the currently played content is video or audio
Volume control:
Now it works on Android models (playback_volume and playback_mute
parameters in player status, changing volume/mute status via
set_playback_state command).
Besides, not volume controls works even when there is no playback.
The following new commands are now available:
http://10.0.0.1/cgi-bin/do?
cmd=playback_action&action=...
Performs the given playback action. Contrary to sending IR code,
works properly even if TV UI is shown over playback (like
set_playback_state command works).
Supported action values:
stop
prev
next
NOTE: for other playback-related actions such as "pause/resume",
set_playback_state command can and should be used.
http://10.0.0.1/cgi-bin/do?
cmd=ui_state&result_syntax=json
Returns the information about the current TV UI screen.
http://10.0.0.1/cgi-bin/do?
cmd=ui_action_return[&count=-1|N]
Does the same as pressing RETURN in the TV UI.
-1 = go to main screen
N = go back N screens (default N = 1)
http://10.0.0.1/cgi-bin/do?
cmd=ui_action_enter&item_id=...
Does the same as selecting the item with the given ID on the current
TV UI screen and pressing ENTER.
http://10.0.0.1/cgi-bin/do?
cmd=ui_action_popup_menu&item_id=<...>
Does the same as selecting the item the given ID on the current TV UI
screen and pressing POP UP MENU.
http://10.0.0.1/cgi-bin/do?
cmd=get_file&path=...
Returns the content of the picture file with the given path.
For AAI files, automatically converts them to BMP.
The path should point to a file with one of the following extensions:
djpg jpg jpeg dpng png dbmp bmp gif aai