Custom Component / Card: Plex meets Home Assistant

Plex meets Home Assistant

Use Home Assistant to browse your movie / tv shows library, pick a movie and play on your device with a single click.

See github repo for instructions on installation and setup.

Planned features:

  • Integration which keeps updating data for the card :white_check_mark:
  • Huge refactor once POC is ready :white_check_mark:
  • Proper design :white_check_mark:
  • Realtime search :white_check_mark:
  • TV Shows with seasons/episode additional views :white_check_mark:
  • Ability to add a script to run BEFORE and AFTER executing play action on the device
  • Custom conditions for every entity that has to be met, otherwise its considered unavailable (Is tv on? Or is a person in living room? no? then play on second entity, which is bedroom tv and there are people there!)
  • Optimized scroll which adds data as you scroll
  • Sorting
  • Filters
  • Option to search globally disregarding default filters

Want to help out or discuss? Join Discord https://discord.gg/jqqz9jQXWx**

Video of the card: https://youtu.be/88e7lZUFD28

5 Likes

Can you click the movie to launch the movie in Plex?

I found my answer. This looks great! Can you integrate it into hacs?

Does it work with any media source? I have Apple TV integrated into home assistant

Eventually yes I will integrate it. There is a lot of development left to do.

Right now it works with any adb supported device with plex installed.

Will you support also Kodi? I’m using plexkodiconnect would be awesome

That is my use case too! I use both.

It should be even more simpler to do with kodi, just launch it via ADB (if not launched) and use its API. I guess that will be the second thing supported :slight_smile:
For Plex I failed to find any information regarding android intents so it was tricky to figure out a correct command.

All of our TVs are either RokuTV or just dumb TVs with a Roku device connected via HDMI. Any plans in that direction?

I know 0 information about Roku, but PRs or some working examples how to launch it there (ideally without plex running at start) are welcomed.

1 Like

Using kodi on raspberry no android :frowning: will there be a way to use this integration anyway?

Yeah if you are using Libreelec you have kodi running nonstop probably, so no need to launch it.

I might also add script support later on for some special cases.

dunno f i got u right … it is running for kodi on raspberry ? yes my raspberryis 24/7 :slight_smile:

Updated design!

Added option libraryName, you need to set it to your library name in Plex. So you can have one tab/card for one library (for example Movies), and another one for another one (for example TV Shows).

1 Like

I guess I’ll have to wait for more integrations. Please keep updating


whats this mean?

< developer frustration rant>

This is an early version. Yes, instructions are not great. Yes, it’s not user friendly. If you are not willing to use google for such basic stuff as figuring out how to add resources for cards in hass (looking at you @david1 ) and are going to be passive aggressive about it on Discord, you might as well not bother at all with this integration.

< /developer frustration rant>

I hope this guy was an exception to the rule, most users of my integrations are cool. Be cool.

If you are cool with using google and are stuck on something non-trivial or have discovered a bug, you are of course very welcomed on discord!

2 Likes

I can access the js script when i go to /local/content-card-example.js but i still dont see any images, i ran the python script successfully, but get a red image…,

lovelace:
  mode: yaml

  resources:
    type: module
    url: /local/content-card-example.js



    title: Home Assistant
views:
  - icon: 'hass:home-assistant'
    title: Home
    cards:
      - type: 'custom:content-card-example'
        plexToken: mytoken
        plexIP: 192.168.1.115
        plexPort: 32400
        entity_id: media_player.living_room

any help would be appreciative

I see you successfully used Google.

The error message you are probably seeing is “You need to define a libraryName”. Instructions in the main post for that were not updated yet as its being updated very often and intended for experienced users or developers.

Go actually read the error message in “red image” and define key libraryName. As an example, if your library is named Movies, make it Movies.
Or go read my post right above yours, its being said right there.

PS: You are banned from discord, hopefully you will be more civil here :wink:

1 Like

I got the movies to show up, but no thumbnails

can i put in a feature request?

Thumbnails should be supported. They should be loading up from your plex server. What do you see in network tab?

Also when you load up plex in your browser, in network tab you should see urls containing “/photo/:/transcode” what are those? (Make sure to remove your token from url)

Edit: Are you using https home assistant? If that is the case it will not work, it needs to be both http. That is something that needs to be improved in the future.

No https,

http://192.168.1.115:32400/photo/:/transcode?width=138&height=206&minSize=1&upscale=1&url=/library/metadata/7810/thumb/1598153888%3FX-Plex-Token%3DRbdSQWgKZ_3NqxzZnRwk&X-Plex-Token=RbdSQWgKZ_3NqxzZnRwk, when i change the token to mine, im able to see the thumbnail… (but its only the one)
that isnt my token, i just redid the tmp.py and made sure mine was correct, same with home assistant card

Whooops! That is my token! :smiley: Working on a fix.

2 Likes