Autostart OpenHome Media Player at Boot time on Raspberry PI

The OpenHome .org Player for Raspberry PI is easy to download and install from http://openhome.org/pages/use/downloads/pi.html

The player is normally started from the command line using

openhome-player

The OpenHome Media Player can be made to start with the operating system at boot time after the network has started.

Using the following commands.

Create/edit the oh.service file using:

sudo nano /etc/systemd/system/oh.service

Add the following to oh.service file

[Unit]
Description=OpenHome Player
Wants=network-online.target
After=network.target network-online.target

[Service]
User=pi
ExecStart=-/usr/bin/openhome-player
Restart=on-failure

[Install]
WantedBy=multi-user.target
Alias=openhomeplayer.service

Initialise the service using

sudo systemctl daemon-reload

Start service with

sudo systemctl start oh.service

Enable the service to start after a  reboot

sudo systemctl enable oh.service

Thanks to the OpenHome forum post for this information here: http://forum.openhome.org/archive/index.php?thread-1443-4.html