PlexAmp 4. 0 on NVidia Shield doesn't advertise as remote control target

[Chatting with Elan in back-channels (Reddit DMs) he suggested I make a post here.]

First and foremost, I know PlexAmp is not supported on AndroidTV but it can be sideloaded, and (almost) controlled with a Remote Control app like NVidia Remote or GoogleTV Remote.

With the introduction of PlexAmp 4.0 I was hoping that I could just control a sideloaded PlexAmp on the Shield with PlexAmp on my Pixel but it doesn’t want to appear as a Remote Control target.

As requested, here are PlexAmp’s (from the Shield) debug logs after a cold reboot of the device, followed by starting PlexAmp and attempting to find it in the drop down on PlexAmp on a mobile phone:

152374722233.zip (285.9 KB)

Better question would be… WHY is Plexamp not supported on Android TV/Shield?

1 Like

Well, I can try and field that - it’s a UI issue. PlexAmp was developed for finger navigation on a mobile device and has been retrofitted to work with a mouse on a desktop but AndroidTV has neither of those things, and the work to make its interface TV friendly is monumental.

But I’m hoping that with the headless Pi solution (PlexAmp running on a Raspberry Pi, remote controlled by a PlexAmp client on a mobile device) that’s in development that either: a) a similar headless app can be released for AndroidTV, or b) that the Android app is tweaked to allow it to run in a “psuedo-headless” mode on AndroidTV.

This thread here is hopefully a step towards that end.

1 Like

Exactly that.

Those don’t show anything weird, the expected:

Feb 19, 2022 11:26:01.188 [Javascript] INFO - Companion: Attempting to start HTTP Server on port 41863.

You can see if it’s reachable from the outside, and then also share debug logs from a Plexamp trying to reach it (after opening the cast dialog and hitting the refresh button).

It’s reachable. (Tested from both a laptop and my mobile phone, to ensure that the phone itself has a connection and it’s not some weird network segmentation issue).

It still doesn’t appear on the phone’s PlexAmp “Select Player” list. Attached are logs from the phone after bringing up the Cast Menu and hitting the refresh button.

Share Debug Logs.zip (117.4 KB)

This is what I’m seeing:

Feb 22, 2022 08:55:33.022 [Javascript] WARNING - DEVICE: Player connection http://192.168.1.155:32500 didn't work for SHIELD Android TV: HTTP status -7

But maybe that’s not the right player? If you look for Finding best connection in the logs, do you see the Android TV?

Ah no - that was me fiddling. That definitely isn’t the right player (it’s the standard Plex Android client, also running on the Shield - and why that connection didn’t work is a different question) but when I couldn’t see the PlexAmp instance, I tried to connect to that instead. I shouldn’t have as it’s obfuscated the logs and misdirected you somewhat - apologies.

In that case the issue points to the Android TV Plexamp not registering properly, I guess, since we don’t see the controller trying to hit it.

Maybe try toggling the remote control preference off and on and see if that makes any difference?

OK, I believe I’ve tried everything within my power to get to devices to see each other, including, as suggested, toggling the Remote Control preferences and rebooting various devices, restarting my server and things-suchlike. Neither my Pixel, nor my desktop PlexAmp see the Shield’s PlexAmp.

(Peculiarly, the PIxel doesn’t see the desktop either, although the desktop does see the Pixel - but I imagine this is a different issue, and I don’t want it to derail trying to get the Shield to work; I just mention it in-case it sets off a lightbulb in your head.)

I’m not too sure how much more we can do here. PlexAmp on the Shield seems to start it’s Remote Control server correctly (as demonstrated by the logs above, and by the fact that I can telnet to it when it’s on, but get Connection Refused when it’s off). I assume it registers its existence with my Plex Server and when another player opens the Cast menu, it polls the server for the list of registered RC targets and that’s what’s displayed. And thus, it would seem something is breaking at that point but how to narrow it down further eludes me.

Talking to the crowd:
I wonder if anyone else has bothered to sideload PlexAmp on their Shield, and if so, would they be prepared to test this for us - can you see the Shield’s PlexAmp as a Remote Control target in another PlexAmp connected to the same server? Further data points are required, I feel!

Do you have a running Plex server in the local network segment?
Some client types cannot open a network port to listen for Companion packets (the underlying OS doesn’t allow it). So they rely on the server to bounce/forward those packets.

Yes, all the devices are on the same network segment (including my Plex Server).

I had a further thought - is there a possibility that running the standard Plex client and PlexAmp on the same device may cause an issue - clashing of ports/resources/something?

While my desktop PlexAmp can see PlexAmp on my Pixel 4, it doesn’t see Plex for Android (despite the latter also being configured to advertise as a player).

And similarly (in that it only sees one player per device), my desktop PlexAmp can see Plex for Android (TV) on the Shield, but not PlexAmp.

It might be a coincidence, but again, raising it to see if it sets off flags!

EDIT: Further to this thought, I force-stopped both Plex and PlexAmp on my Phone and then started just Plex. It was seen. Then I started PlexAmp (too) and both were seen. This would imply there is some issue with registering two player targets on the same device - race condition, perhaps?

EDIT2: Sadly, no combination of force-stopping/starting Plex and PlexAmp on the Shield brought about PlexAmp’s visibility elsewhere on the network. So maybe this is a dead-end?

They might clash on UDP ports, but they’ll pick their own TCP ports which is what is needed for communication.

So, taking stock - where are we with this?

It appears the remote control server is started correctly on PlexAmp (sideloaded) on Android TV - it can be reached by telnet. (First question: Are there are any text commands that would confirm, through this interface, that it thinks it’s registered correctly?)

It doesn’t appear to register correctly with the server, in that no other PlexAmp client sees it as an available target. Are there any API commands I could issue to the server to get a list of registered Player targets, as the server sees them?

Might an Advanced Option to add a Player target manually be considered? Are there issues in doing that which I cannot immediately see?

Yes, something like http://x.x.x.x:yyyy/player/timeline/poll?commandID=1&wait=0&includeMetadata=1

We have some fixes and more logging coming in the next release which might be helpful.

Pulling up that XML from both my mobile and the Shield would seem to imply (to a layman at least) that the Shield is properly registered with the server (as in the protocol and address fields are populated and appear to be my server (as much as my understanding of how you guys do things over there is!)

Great. Well, right now as far as I understand it, it should work, but just isn’t appearing where it needs to so I look forward to seeing what you guys come up with to try and work out why!

And thanks for all your time on this. I know it’s a niche case.

Share Debug Logs (March 21).zip (593.0 KB)
Well, with PlexAmp 4.1, this is tantalizingly close! PlexAmp on the Shield is now visible to PlexAmp on my mobile phone, but the first time I click on it on the menu I get the red bar “Cannot connect to player”, and every subsequent time (until I restart PlexAmp on the mobile) nothing (appears to) happen(s).

I have restarted PlexAmp on both devices, and restarted the Remote Control service on the Shield, to retry things from further up the thread, but to no avail.

Logs from the mobile attached.

Looks like it’s timing out waiting for a response. Can haz corresponding logs from SHIELD?

Mar 21, 2022 15:25:50.946 [Javascript] WARNING - PLAYER: Error issuing request to player SHIELD Android TV: /player/timeline/poll?wait=0&includeMetadata=1&commandID=36&type=music, HTTP status -28, [object Object]

Logs attached.

While I have no doubt you have a good idea of what’s going on already, I can say that the “Cannot connect…” banner appears instantaneously after selecting the target, so if it is a timeout, somehow PlexAmp knows immediately that it’s failed/going to fail…

Share Debug Logs (PlexAmp, Mobile).zip (500.9 KB)
Logs (PlexAmp, Shield).zip (368.4 KB)
Plex Media Server Logs_2022-03-22_08-16-24.zip (6.1 MB)

The shield doesn’t seem to know what the IP address of the device is :thinking:

Mar 22, 2022 08:10:25.546 [Javascript] INFO - Companion: Registering device at .
Mar 22, 2022 08:11:08.585 [Javascript] INFO - Companion: Unregistering.
Mar 22, 2022 08:11:08.611 [Javascript] INFO - Companion: Registering device at .
Mar 22, 2022 08:11:08.722 [Javascript] INFO - Companion: Registering device at .

It’s supposed to say something like:

Mar 20, 2022 17:46:46.438 [Javascript] INFO - Companion: Registering device at 10.0.0.105:61855, 10.0.0.45:61855.

Not sure why that’s the case :thinking:

OK, that’s weird then. The Shield itself is definitely configured correctly, network-wise, and it works for everything else. If I check the settings, I see the correct (DHCP-issued) IP address and details, so I wonder why they’re not being passed on to PlexAmp…