songchenwen / plexdlnaplayer

There is no built in way to cast Plex music to DLNA speakers. This project will be the bridge.
https://hub.docker.com/r/songchenwen/plexdlnaplayer
GNU General Public License v3.0
35 stars 11 forks source link

Not playing chosen source through UPnP endpoint #7

Open pjv opened 2 years ago

pjv commented 2 years ago

This is completely awesome. Thank you so much for getting this rolling @songchenwen.

I have a PMS with a bunch of music and I also have a raspberry pi running moOde which (among many other fabulous things) advertises itself as a UPnP player connected to my hifi gear.

I put up plexdlnaplayer via docker (on the same ubuntu host where my PMS server is running) and it all seems to work. I brought the container up and all looked good. I went to the “Bind Device” page where it saw the moOde UPnP endpoint. I went to plex.tv/link and bound the device.

Next I went into both a plex web client and plexamp and both listed the moOde UPnP player as a device to cast to.

In both cases, if I try to stream a track, it doesn’t play through moOde. However, the play/pause button on the plex / plexamp client DOES control playback on moOde. Rather than playing the selected plex track, initiating play or pause via Plex will cause whatever was previously in the queue in moOde to play / pause.

This seems soooooo close to a solution I’ve been thinking about for a while now to let me have my preferred UI (plexamp) for all my PMS-hosted music, but play it bit-perfect through my little pi streamer.

I can python. Anyone who’s already dug into the code here have any ideas where I can look to start trying to figure out why plex is able to control the player but not successfully queue up any music?

I’ll take down the docker container and put up a venv on the host so I can hack on the code.

songchenwen commented 2 years ago

I can guess this is related to the SetAVTransportURI action of your DLNA device. Maybe it needs different parameters or something. But someone will need to have access to your device to know how this works.

pjv commented 2 years ago

@songchenwen Thank you, I will look at that action and see what I can find out about it as soon as I can get a working development environment for plexdlnaplayer working. While my docker install using your image from dockerhub works correctly and sees my devices and lets me set up the binding to the DLNA device via plex.tv, when I cloned the repo, installed the python requirements, and ran it from the command line (python3 main.py), the device binding page has no devices available.

I’m currently overloaded with other projects and haven’t had a chance to dig into why the repo-based install is having trouble in my environment.