The '''Simple VDR Protocol (SVDRP)''' allows simple commands to be sent to VDR over a plain TCP connection on port 2001. E.g. to send a message that gets displayed on TV.

+

The '''Simple VDR Protocol (SVDRP)''' allows simple commands to be sent to VDR over a plain TCP connection on port 6419 (before vdr 1.7.15 port 2001 was used). E.g. to send a message that gets displayed on TV.

It is possible to write a simple shell script to dump any text on the TV screen, for instance on an incoming phone call or when an email arrives:

It is possible to write a simple shell script to dump any text on the TV screen, for instance on an incoming phone call or when an email arrives:

Line 6:

Line 6:

#!/bin/sh

#!/bin/sh

−

netcat -w 10 <HOSTNAME> 2001 <<eof

+

netcat -w 10 <HOSTNAME> 6419 <<eof

mesg $1

mesg $1

quit

quit

Line 16:

Line 16:

A direct command can also be achieved without creating a script:

A direct command can also be achieved without creating a script:

<pre>

<pre>

−

echo mesg 'Hello World!' | nc localhost 2001

+

echo mesg 'Hello World!' | nc localhost 6419

</pre>

</pre>

As an alternative you may use the special TCP redirection of GNU Bash:

As an alternative you may use the special TCP redirection of GNU Bash:

<pre>

<pre>

−

echo mesg 'Hello World!' >/dev/tcp/HOSTNAME/2001

+

echo mesg 'Hello World!' >/dev/tcp/HOSTNAME/6419

</pre>

</pre>

−

There is a special perl script included in most Debian style VDR packages you can use:

Latest revision as of 18:47, 18 August 2011

Contents

Introduction

The Simple VDR Protocol (SVDRP) allows simple commands to be sent to VDR over a plain TCP connection on port 6419 (before vdr 1.7.15 port 2001 was used). E.g. to send a message that gets displayed on TV.

It is possible to write a simple shell script to dump any text on the TV screen, for instance on an incoming phone call or when an email arrives:

#!/bin/sh
netcat -w 10 <HOSTNAME> 6419 <<eof
mesg $1
quit
eof

<HOSTNAME> has to be replaced with the hostname of the computer VDR is running on. (ie. localhost) The script takes the text to be displayed as a parameter. Netcat also exists for Windows. Depending on your netcat version the command may be nc as compared to netcat.

A direct command can also be achieved without creating a script:

echo mesg 'Hello World!' | nc localhost 6419

As an alternative you may use the special TCP redirection of GNU Bash:

echo mesg 'Hello World!' >/dev/tcp/HOSTNAME/6419

There is a special perl script included in VDR sources you can use:

svdrpsend <COMMAND> [<PARAMETER>]

To send svdrp commands to plugins, you use similar syntax:

svdrpsend plug <PLUGIN_NAME> <COMMAND> [<PARAMETER>]

By default only localhost is allowed to connect to VDR. To alter this one has to change the file svdrphosts.conf in the configuration directory /etc/vdr of VDR. The build up of this file is really simple.

IP-Adresse[/Netmask]

Just enter line by line the allowed host IPs, or whole networks. For networks you need the network mask (e.g. /24). For examples see the sample svdrphosts.conf that comes with VDR.

Description

Switch channel up, down or to the given channel number, name or id. Without option (or after successfully switching to the channel) it returns the current channel number and name.

CLRE

Clear the entire EPG list.

DELC

<number>

Delete channel.

DELR

<number>

Delete the recording with the given number. Before a recording can be deleted, an LSTR command must have been executed in order to retrieve the recording numbers. The numbers don't change during subsequent DELR commands.CAUTION: THERE IS NO CONFIRMATION PROMPT WHEN DELETING A RECORDING - BE SURE YOU KNOW WHAT YOU ARE DOING!

DELT

<number>

Delete timer.

GRAB

<filename> [ jpeg | pnm [ <quality> [ <sizex> <sizey> ] ] ]

Grab the current frame and save it to the given file. Images can be stored as JPEG (default) or PNM, at the given quality (default is 'maximum', only applies to JPEG) and size (default is full screen).

HELP

[ <topic> ]

The HELP command gives help info.

HITK

[ <key> ]

Hit the given remote control key. Without option a list of all valid key names is given.

LSTC

[ <number> | <name> ]

List channels. Without option, all channels are listed. Otherwise only the given channel is listed. If a name is given, all channels containing the given string as part of their name are listed.

LSTE

[ <channel> ] [ now | next | at ]

List EPG data. Without any parameters all data of all channels is listed. If a channel is given (either by number of by channel ID), only data for that channel is listed. now, next, or at <time> restricts the returned data to present events, following events, or events at the given time (which must be in time_t form).

LSTR

[ <number> ]

List recordings. Without option, all recordings are listed. Otherwise the summary for the given recording is listed.

LSTT

[ <number> ]

List timers. Without option, all timers are listed. Otherwise only the given timer is listed.

MESG

[ <message> ]

Displays the given message on the OSD. If message is omitted, the currently pending message (if any) will be returned. The message will be displayed for a few seconds as soon as the OSD has become idle. If a new MESG command is entered while the previous message has not yet been displayed, the old message will be overwritten.

MODC

<number> <settings>

Modify a channel. Settings must be in the same format as returned by the LSTC command.

MODT

<number> on | off | <settings>

Modify a timer. Settings must be in the same format as returned by the LSTT command. The special keywords 'on' and 'off' can be used to easily activate or deactivate a timer.

MOVC

<number> <to>

Move a channel to a new position.

MOVT

<number> <to>

Move a timer to a new position.

NEWC

<settings>

Create a new channel. Settings must be in the same format as returned by the LSTC command.

NEWT

<settings>

Create a new timer. Settings must be in the same format as returned by the LSTT command. It is an error if a timer with the same channel day, start and stop time already exists.

NEXT

[ abs | rel ]

Show the next timer event. If no option is given, the output will be in human readable form. With option 'abs' the absolute time of the next event will be given as the number of seconds since the epoch (time_t format), while with option 'rel' the relative time will be given as the number of seconds from now until the event. If the absolute time given is smaller than the current time, or if the relative time is less than zero, this means that the timer is currently recording and has started at the given time. The first value in the resulting line is the number of the timer.

PUTE

Put data into the EPG list. The data entered has to strictly follow the format defined in vdr(5) for the 'epg.data' file. A '.' on a line by itself terminates the input and starts processing of the data (all entered data is buffered until the terminating '.' is seen).

SCAN

Forces an EPG scan. If this is a single DVB device system, the scan will be done on the primary device unless it is currently recording.

STAT

disk

Return information about disk usage (total, free, percent).

UPDT

<settings>

Updates a timer. Settings must be in the same format as returned by the LSTT command. If a timer with the same channel, day, start and stop time does not yet exists, it will be created.

VOLU

[ <number> | + | - | mute ]

Set the audio volume to the given number (which is limited to the range 0...255). If the special options '+' or '-' are given, the volume will be turned up or down, respectively. The option 'mute' will toggle the audio muting. If no option is given, the current audio volume level will be returned.