Can I setup Upmpdcli Docker as a render on top of Volumio and point to MPD which preinstalled under Volumio?
Hi Gio71,
Hope you are well. Can I setup Upmpdcli Docker as a render on top of Volumio and point to MPD which preinstalled under Volumio?
the reason is that I would like to used some volumio plugin Peppymeter which run on MPD.conf under preinstalled Mpd in Volumio OS.
But upmpdcli seem not update for volumio.... to used your docker will be much easier to maintain. but as renderer I need MPD from volumio to playback.
Best Regards, Nattaphoom Tewarun
Hello. Yes you should be able to do that. Of course it would be better if you disable the built-in upmpdcli. You will need to:
-
enable ssh on volumio (see here)
-
Login to your volumio box
-
install docker and docker-compose (or docker-compose-plugin):
The following might work, but it might be slightly different depending on the version of the underlying o.s.:
sudo apt-get update
sudo apt-get install docker.io docker-compose
sudo usermod -a -G docker $USER
newgrp docker
- check if mpd is reachable using localhost at port 6600, using:
MPD_HOST=localhost MPD_PORT=6600 mpc status
If you don't get an error, then mpd is configured as expected.
- create and enter a new directory, e.g.:
mkdir ~/upmpdcli
cd ~/upmpdcli
- Create new file there named docker-compose.yaml using the following content:
---
volumes:
upmpdcli-cache:
upmpdcli-confdir:
services:
upmpdcli:
image: giof71/upmpdcli
network_mode: host
environment:
- PUID=${UPMPDCLI_PUID:-}
- PGID=${UPMPDCLI_PGID:-}
- MPD_HOST=${MPD_HOST:-127.0.0.1}
- MPD_PORT=${MPD_PORT:-6600}
- FRIENDLY_NAME=${FRIENDLY_NAME:-Volumio}
- RENDERER_MODE=${RENDERER_MODE:-UPNPAV}
- CHECK_CONTENT_FORMAT=${CHECK_CONTENT_FORMAT:-yes}
volumes:
- upmpdcli-confdir:/uprcl/confdir
- upmpdcli-cache:/cache
restart: ${RESTART_MODE:-unless-stopped}
You can tune RENDERER_MODE to UPNPAV, OPENHOME or BOTH (which I do not recommend). Also of course you can change the FRIENDLY_NAME to suit your needs.
- Start the container using
cd ~/upmpdcli
docker-compose up -d
Please note that I didn't test this with the latest Volumio but I have done something similar in the past. If there are issues, I might easily try this tomorrow or in the weekend.
Let me know if this helps.
Hi Gio THank for update.
After following your instruction. I got an error below.
Running -$ -> docker-compose up -d
ERROR: Invalid interpolation format for "upmpdcli" option in service "services": "PUID=${UPMPDCLI_PUID:-}"
can you advise?
I just tried and it works... are you sure you did not add any characters? Anyway let's try something simpler, defaults were fine for those PUID and PGID variables and many others:
---
volumes:
upmpdcli-cache:
upmpdcli-confdir:
services:
upmpdcli:
image: giof71/upmpdcli
network_mode: host
environment:
- MPD_HOST=127.0.0.1
- MPD_PORT=6600
- FRIENDLY_NAME=Volumio
- RENDERER_MODE=UPNPAV
- CHECK_CONTENT_FORMAT=yes
volumes:
- upmpdcli-confdir:/uprcl/confdir
- upmpdcli-cache:/cache
restart: unless-stopped
Just created a gist. If the previous does not work, do this:
mkdir ~/upmpdcli -p
rm ~/upmpdcli/docker-compose.y*ml
cd ~/upmpdcli
wget https://gist.githubusercontent.com/GioF71/c57e4585b2ad7160c297d1ceae0a5861/raw/08dd81fb72c4d25853b3598ce71dc9555611a799/docker-compose.yaml -O docker-compose.yaml
docker-compose up -d
Let me know if this helps!
after replace docker-compose I got new error.
ERROR: The Compose file './docker-compose.yaml' is invalid because: Unsupported config option for services: 'upmpdcli' Unsupported config option for volumes: 'upmpdcli-confdir'
VOLUMIO 3.8 running on Debian Buster. Is that relate to Docker version 18.09.1 which might give unsupport config or not?
after replace docker-compose I got new error.
ERROR: The Compose file './docker-compose.yaml' is invalid because: Unsupported config option for services: 'upmpdcli' Unsupported config option for volumes: 'upmpdcli-confdir'
VOLUMIO 3.8 running on Debian Buster. Is that relate to Docker version 18.09.1 which might give unsupport config or not?
I'm not sure... at this point, let me try with the actual volumio box. I will come back to you with some results.
So if it's buster, maybe we need to specify version. If you want to try:
---
version: "3"
volumes:
upmpdcli-cache:
upmpdcli-confdir:
services:
upmpdcli:
image: giof71/upmpdcli
network_mode: host
environment:
- MPD_HOST=127.0.0.1
- MPD_PORT=6600
- FRIENDLY_NAME=Volumio
- RENDERER_MODE=UPNPAV
- CHECK_CONTENT_FORMAT=yes
volumes:
- upmpdcli-confdir:/uprcl/confdir
- upmpdcli-cache:/cache
restart: unless-stopped
anyway is your Volumio up-to-date? are they still based on on debian buster?
Yes lastest volumio still based on debian Buster... Yes it work now I indicate version "2".
Creating volume "upmpdcli_upmpdcli-cache" with default driver Creating volume "upmpdcli_upmpdcli-confdir" with default driver Creating upmpdcli_upmpdcli_1 ... done
but I can't see upnp renderer up running on my control point? or maybe it couldn't contact with MPD yet? What is a command to get upmpdcli Log in docker run?
Yes.... Try
docker-compose logs -f
I got this log. but without UPNP renderer active on my control point.
upmpdcli_1 | Upmpdcli 1.9.5 libupnpp 1.0.3 upmpdcli_1 | Current user id is [0] upmpdcli_1 | File /user/config/qobuz.txt not found. upmpdcli_1 | File /user/config/hra.txt not found. upmpdcli_1 | PORT_OFFSET not specified upmpdcli_1 | No additional radio list file.
Which control point are you using?
BubbleUPnp
Can you post the full logs?
docker-compose logs
just like this.
Attaching to upmpdcli_upmpdcli_1 upmpdcli_1 | Upmpdcli 1.9.5 libupnpp 1.0.3 upmpdcli_1 | Current user id is [0] upmpdcli_1 | File /user/config/qobuz.txt not found. upmpdcli_1 | File /user/config/hra.txt not found. upmpdcli_1 | PORT_OFFSET not specified upmpdcli_1 | No additional radio list file.
Hi GioF71,
Thank for help. I think this would not work. Docker 1.8 which installed in Debian Buster. Repo will not support Upmpdcli 1.9.5. I think hopeless to run new Upmpdcli version on Old OS with Old docker version.
THank a lot.
Best REgards, Nattaphoom
So I am trying volumio, it's quite weird, because it listens on both port 6600 and 6659. One I assume is a sort of emulator. Also Volumio enables both UPNP-AV and OpenHome, so in my following example I am doing the same. This might work, although not perfectly:
---
version: "2"
volumes:
upmpdcli-cache:
upmpdcli-confdir:
services:
upmpdcli:
image: giof71/upmpdcli
network_mode: host
environment:
- MPD_HOST=127.0.0.1
- MPD_PORT=6599
- FRIENDLY_NAME=Volumio
- RENDERER_MODE=BOTH
- CHECK_CONTENT_FORMAT=yes
volumes:
- upmpdcli-confdir:/uprcl/confdir
- upmpdcli-cache:/cache
restart: unless-stopped
Make sure that default upmpdcli is deactivated:
Make sure the phone where BubbleUPnP runs is connected to the same network as the device running Volumio.
Then if I may ask, why do you need an updated version of upmpdcli? Volumio only uses upmpdcli for the renderer functionality. If you want to create media servers, those can be run on any host of your network, not necessarily along with the actual players.
Just a small update... I tried to replicate upmpdcli configuration used by volumio in the docker container. It's kind of complicated because I can't really replace it completely AFAIK. If I disable the upnp renderer, the server listening on port 6599 goes away as well. So it's not a perfect replacement if you use port 6600 instead. It kind of works, but not all functions will works, like e.g. volume synchronization among the different players running inside Volumio.
So the best thing to do is probably to try and convince the volumio team to switch to an updated os. They will do this eventually because buster is really old. I assume the issue is guaranteeing fast in-place updates, but sometimes a re-flash might be necessary. The guys from Moode did that for major os upgrades.
If you just want media-server features in newer upmpdcli versions, remember that you can run upmpdcli with rendering mode disabled, even in the same device that runs volumio if that's what you want. Ideally being media servers, they should stay on some server which is running at all times. But that depends on your needs and preferences.