git clone https://@opensourceprojects.eu/git/p/upcmd/code upcmd-code



File Date Author Commit
AVTransport-Play.xml 2016-05-24 Jean-Francois Dockes Jean-Francois Dockes [4e780a] init
AVTransport-Seek.xml 2018-03-10 Jean-Francois Dockes Jean-Francois Dockes [911de3] add avtransport-seek
AVTransport-Stop.xml 2016-05-24 Jean-Francois Dockes Jean-Francois Dockes [4e780a] init
OHPlaylist-DeleteAll.xml 2018-12-14 Jean-Francois Dockes Jean-Francois Dockes [36e528] Added xml fragments for Playlist clear and insert
OHPlaylist-Insert.xml 2018-12-14 Jean-Francois Dockes Jean-Francois Dockes [36e528] Added xml fragments for Playlist clear and insert
OHPlaylist-Next.xml 2016-05-25 Jean-Francois Dockes Jean-Francois Dockes [b772af] added some OH Playlist ops, more comments
OHPlaylist-Pause.xml 2016-05-25 Jean-Francois Dockes Jean-Francois Dockes [b772af] added some OH Playlist ops, more comments
OHPlaylist-Play.xml 2016-05-25 Jean-Francois Dockes Jean-Francois Dockes [b772af] added some OH Playlist ops, more comments
OHPlaylist-Previous.xml 2016-05-25 Jean-Francois Dockes Jean-Francois Dockes [b772af] added some OH Playlist ops, more comments
OHPlaylist-Stop.xml 2016-05-25 Jean-Francois Dockes Jean-Francois Dockes [b772af] added some OH Playlist ops, more comments
OHProduct-SetSourceIndexByName.xml 2016-05-24 Jean-Francois Dockes Jean-Francois Dockes [0d5573] set host:port on command line
OHProduct-SourceXml.xml 2016-05-24 Jean-Francois Dockes Jean-Francois Dockes [4e780a] init
OHRadio-Play.xml 2016-05-24 Jean-Francois Dockes Jean-Francois Dockes [0d5573] set host:port on command line
OHRadio-SetId.xml 2016-05-24 Jean-Francois Dockes Jean-Francois Dockes [0d5573] set host:port on command line
OHVolume-SetVolume.xml 2016-05-24 Jean-Francois Dockes Jean-Francois Dockes [4e780a] init
OHVolume-VolumeDec.xml 2016-05-24 Jean-Francois Dockes Jean-Francois Dockes [4e780a] init
OHVolume-VolumeInc.xml 2016-05-24 Jean-Francois Dockes Jean-Francois Dockes [4e780a] init
README.md 2019-01-16 Jean-Francois Dockes Jean-Francois Dockes [dd270b] doc
upcmd.sh 2019-01-16 Jean-Francois Dockes Jean-Francois Dockes [dd270b] doc

Read Me

upcmd

NOTE: does not work any more with upmpdcli 1.4 because the ctl URL has
changed and now includes a basically random element which is impossible to
find out without discovery (ssdp). This was always a fragile experiment,
and now it's obsolete :)

A script to control upmpdcli from the command line.

Uses auxiliary XML files to define the commands.

The way the script works is simple: the XML files contain the SOAP
data which is sent by an UPnP call to invoke an action. If there are
parameters for the action, the script sets their values in the data
('sed' call) before doing the actual POST. The Service and Action
names are encoded in the XML file names so that you don't have to
type them multiple times (and can use tab completion when trying
stuff on the command line).

When passing parameters through the script, you should alternate
parameter names and values on the command line. Example uses:

upcmd.sh myhost:49152 AVTransport-Play.xml

upcmd.sh myhost:49152 OHVolume-SetVolume.xml Value 30

'Value' in the second example is the parameter name (or more
concretly, the initial contents of the area which will be
substituted by sed). It could also be something like 'NewPlayMode' or
whatever the action XML file specifies.

The script is not going to replace a real control point, but it may
be useful for automating stuff. Also, it's not really expected to be
used as a bare script but more probably as a building block for a
higher level script with simpler invocation.

Very few of this is actually specific to upmpdcli, other renderers
could probably be used with very little changes. upmpdcli-specific
elements are noted by comments in the script file.

LIMITATIONS:
- Does not work for parameter values containing whitespace (for now)
- Does not perform discovery: you need to determine the host or IP
address of the renderer and the port it is running on (49152 by
default for upmpdcli), and pass them on the command line.