I have a headless Plexamp setup on a raspberry pi, and it’s pretty sweet! I have no trouble switching to that player in Plexamp and playing songs remotely.
I have another user on my network and in my Plex home that can’t see the raspberry pi at all when she hits the “cast” button in Plexamp. I believe that this should work, and I’d love some help debugging.
My repro steps:
I opened Plexamp, used my account to list all players (a couple of Chromecast devices, some Sonos devices, and the headless Plexamp - my screen looked like this) and played something on the headless Plexamp.
Then, I switched to user H and listed all players (only showed the Chromecast devices - my screen looked like this). No headless Plexamp!
These logs are on the same device, though, so the connection path would be the same. I successfully connected to the headless Plexamp using my account and then failed to see the headless Plexamp using User H’s account.
I’m able to reproduce this both on Android and on iPad.
The logs I posted above are all from the same device (in this case, a Google Pixel). I was logged in as the owner/main user, played something on the headless Pi. Then, I switched to the other user on the same device and couldn’t see the headless Pi. In that ~minute, the IP address and everything else were the same - just the logged-in user changed.
For the owner/main user, it can use plex.tv hints to find the players; shared users rely on network discovery.
This is interesting - I didn’t realize it was the case. The pi is indeed reachable directly - I can hit https://<IP address>:32500 from the phone’s browser. How does network discovery work? Are there certain ports or IP ranges that it’s looking for?
Sure, that’s fine, but once you switch users, it has to use network discovery to find the Pi. What is the IP address of the Pi? I’m sure it’s reachable directly, but broadcast packets have to be able to reach it.
AHA! Victory! I’m all set. For posterity and future web searches, I’ll document my discoveries below.
I confirmed that it’s not an issue with my network (e.g. router dropping packets) by spinning up a Plexamp instance on my desktop and connecting to and playing from it just fine. I also used nc -u -l -v -p 32412 (receiver) and echo "'M-SEARCH * HTTP/1.1" | nc -u -b 192.168.1.255 32412 (sender) to test multicast directly.
My network interfaces on the raspberry pi are a little weird - I have both a USB WiFi adapter and I’m plugged in to the Ethernet jack on the back of my Sonos. The latter provides stability, and the former provides speed. I was thinking that either my interface was too old to reliably do multicast (apparently an issue with some devices) and/or the Sonos was interfering with UDP. I isolated those questions by plugging directly into my router instead and still reproduced the issue. These didn’t end up being a problem after all.
What ended up being the culprit is that I’d configured my network interfaces to use static IP addresses with a netmask of 255.255.255.255 (or /32 in CIDR-speak), meaning that the raspberry pi thought it was the only device on the network and wouldn’t receive UDP broadcasts. Fixing the netmasks to 255.255.255.0 (or /24) resolved the issue!
Thank you so much, Elan, for helping me get to the bottom of this. I wouldn’t know how best to improve the documentation to make this more self-evident, as it’s such a specific case, but the insight that home users rely on UDP discovery was key. Thank you!