PlexDevices - Custom Media Player Component

TL;DR Be aware you are likely adding another massive tinker hole to your life!

Slightly off topic but…

Performance wise SPMC is the go for Shield rather than Kodi, it’s a Kodi fork for Android and specifically for the Shield. Check the wiki for audio settings etc so you get it working properly with pass through first off. You can install it alongside Kodi. It fixes a few of the audio issues and adds voice search. It’s still Kodi so you can use all the skins and plugins etc. It’s not up to Kodi Krypton 17 yet, it’s still Jarvis 16 so you can’t use Krypton only plugins. I’ve found Krypton to be very sluggish on the Android TV but still have both installed for testing. Skins wise I’d recommend staying light. I use Arctic Zephyr for lighter setups (Raspberry Pi, Mi Box), and Titan (Beta) for devices with a bit more oomph.

If you have a Plex server on your network already there is a Kodi plugin (official and unofficial) that will let you use Kodi/SPMC as a backend. Emby is worth looking into as well and also has a Kodi plugin. Either way you would probably be better off at least sticking a USB3 stick into the back of your shield and bumping that 16gb up to 128 if you are having space issues. I’m not sure if mounting a network drive to shield is fixed yet but last time I tried it wasn’t possible to get it to stick, that was pre Nougat.

My current setup is Media stored on a Synology (Xpenology HP-N40L), CPU is too slow so Plex and Emby servers are now running on PC, and various clients link to the servers for Metadata. Main viewing device is Shield, with Emby plugin in SPMC or Kodi. Plex and Emby are kept in sync via Trakt. I use Emby now for pretty much everything except syncing media to my local devices. My kids prefer plex. All allow for different user profiles to keep track of things or restrict content as needed.

Oh - I saw/heard this yesterday and thought of you… Rick & Morty - The Recipe For Concentrated Dark Matter

1 Like

Yes. Plex pushed this as the ultimate Plex server but neglected to explain where they were putting the metadata.

I’d go with the network option if I had a wired network but even my fast WiFi doesn’t have the bandwidth for 4k.

That’s why I bought the Shield in the first place, so that I could keep everything local.

I appreciate your advice and I will look into all of it. I just got Kodi installed and figured out how to get my first library in so I’ll do some testing and see what shakes out. Not having any prior experience with Kodi or SPMC, your tips are really helpful! Thanks again.

I run HA, so I’m used to tinker holes!! :laughing:

No 4k TVs here - Plus I’m lucky to maintain an ADSL 1 connection with any consistency. It was the reason I stopped using plex, when I was without internet access for a couple of weeks due to a cut cable I found myself unable to access my local media due to having a lifetime pass. The irony is that if I had been using the free version there would have been no problem.

I use an EoP adapter on my shield for a wired network. Wifi is good here but ethernet offers stability.

Another thing to mention - if you go to Storage settings on the shield you will be able to share the drive (include hidden folders) over the network which allows for easy backup, configs, file transfer etc.

storage/Android/data/org.xbmc.kodi/files/.kodi

storage/Android/data/com.semperpax.spmc16/files/.spmc

I’ve moved the data directory for Plex once to a separate drive using the symlink method and it worked fine, but that was many years ago on a windows machine. Yeah, 16 GB is going to be limiting as a server. I just finished reading through their page about the storage options for shield. There seem to be several caveats. It’s cool that the shield is capable, but storage is a different matter.

I’m finding Kodi to work extremely well and highly configurable. I still want to check out SPMC as Barry suggested as I do find some of it confusing on the Shield and the web interface doesn’t provide me access to things like adding libraries - unless I’m not doing right.

Hey, I’d love to discuss this further as I could use the knowledge and it may help others, but it’s diverting way off the thread topic - I take full responsibility for that, mind you! - and I am wondering if anyone would be interested in discussing this further in a separate thread. I’m thinking we could even discuss how Kodi/SPMC integrates with HA.

If this interests anyone, just like this post and I’ll start another thread and link it in here.

If not, please accept my apologies for straying off topic… Again. :blush:

1 Like

Agree with starting a new thread

1 Like

Yeah, I’m really sorry about that.

Ok back to topic.

I realised it doesn’t keep track of videos played from the watch later section. When someone is playing a video from the watch later section, the Plex client status remains idle. Is this a limitation from Plex or the component itself?

What do you see in Plex’s now playing web page? If you don’t see it there, then it’s a limitation.

No worries

Yeah. Nothing is showing there. I guess it’s up to Plex to support this.

I seem to be getting a lot of connection errors. PMS on the Shield is still up and running and available via web interface. IP/Port is standard and hasn’t changed since I installed the Shield; checked plex.conf and token matches.
Pi IP is specifically set up in network as “List of IP addresses and networks that are allowed without auth”. Even remote access is working correctly.

Just upgraded to the release candidate and will continue to monitor. Not seeing the errors at this point, but I just restarted.

Firstly, congrats on making this into the official Plex component.

Sorry. I checked again and the currently playing video from watch later is actually showing in the Plex Web’s Now Playing page.

By the way, I notice it is also showing which home user is playing the video. It will be great if you can include that into the component’s attribute as well. I plan to create an automation to limit my kid’s TV time. The only missing piece that stop me from doing that is the user in the attribute.

1 Like

Also let me know the behavior prior to upgrading to ha 0.41.

As for the user request, i agree with the use case and can easily add that. However, I don’t see a corresponding media_player component attribute for me to set. You would need to either show me the corresponding media_player attribute or update that component first.

Regarding the Watch Later content in Plex, it doesn’t show up in Plex Web > Status > Now Playing when I play it from Android client. However, it shows up when I play it in RasPlex. Maybe you can test it out in a RasPlex.

You mean you cannot find the user in the attribute?

The way ha works is every component has a parent component. My updated plex component is a child of the media_player component. The only properties I can set are those that belong to the media_player component. So while I can easily pull the connected username from the plex API, I don’t see a corresponding media_player property\attribute I can store the value in so it can be visible in ha, used in automations, etc

OK. I understand now. So does that mean it is up to the core developers to add a new property/attribute known as user to the media_player component?

What about the issue on the Watch Later’s videos? Can it be fixed?

My understanding is that you can add whatever attribute that you wish, or am I misunderstanding something?

What Im saying:

def device_state_attributes(self):
        attr = {}
        attr['Axis Device Id'] = self.axis_event.device_name
        return attr
2 Likes