Custom Component / Card: Plex meets Home Assistant

Hey that is a neat idea. Please open a feature request and I will take a look.

As for an ETA I am not sure, as I am currently pretty busy. If you want to try yourself PRs are welcomed. There is no python, only typescript.
High overview of what would needs to be done, in order:

1.) Figure correct API requests to plex to get all artists (figure also sorting etc to support it properly), all albums from artist and all songs from artist
2.) Add the options into libraries in UI configuration, along with support for proper sorting options if possible
3.) Modify the display code of tvshow/session/episodes to properly display artists/albums/songs

I added a feature request: https://github.com/JurajNyiri/PlexMeetsHomeAssistant/issues/43

I am extremely busy too, but I will look into the code, a lot is already there so maybe it is not that difficult :slight_smile:

3.0

New Features

Horizontal Scroll

You can now use horizontal scroll instead of having multiple rows. Option is available under View ConfigurationUse horizontal scroll.

Realtime play availability

Card now keeps track of available targets automatically. You no longer need to reload Home Assistant once you change the state of your target devices.

Enhancements for touch devices

Play button has now a dedicated button. Play button which was displayed on hover over poster no longer shows up on devices controlled by touch. Play button is still visible on episodes.

Customize everything

You can now change all the font sizes, poster and artwork sizes under new Style Configuration section.

1 Like

thank you very much.
how does horizontal scroll work in yaml.

1 Like

Some strange behaviour occurs. THe play does not work anymore :frowning: mediaplayer is available .any hint ?

We need more to debug your issue. What happens exactly. Is the play button visible? What is your config? Does it work in the old version? etc.

Hello, haven’t updated detailed instructions yet

useHorizontalScroll: 'Yes'

Value can be Yes or No. Or empty, or missing, in that case No will be chosen by default.

Just out of curiosity, why are you still using yaml to config the card? I think the UI is better in every way.

Thank you very much for your prompt reply. much appreciated.
No justifiable reason for still using yaml other than old habit. I need to give UI a try Im just apprehensive of having bits here and there and eventually forgetting where is what :smile:

I am using Plex for Kodi Addon. In Plex integration the media_player is well created but I cannot play items. Or is Plex for Kodi not supported?

3.1 has been released

New Features

Adds support for browsing and playing artists, albums and tracks.

2 Likes

Hello! About the music part, I am able to browse the library (artists / albuns / songs), but unable to play album or artist, only individual songs. The “play” button shows on artists and albunms, but does nothing. Is that how it works or am I missing something? (Testing with - cast | media_player.google_home_mini )
And since I am posting, and on a “begging” roll, any chance of a “random” switch for a music artist /album / playlist?
Thanks again for your card.

3.2 has been released

You can now use input_select and input_text entities in the card. Value of these cards will be automatically processed and checked for availability.

Some use cases:

  • You can now have input_select with all your media players. Simply select the media player you wish to use and it will be automatically picked up in the card.
  • You can now have automations with room presence. If you are in living room, put living room media player into input_text / input_select. Bedroom? Use bedroom automatically. Combined with Restricted views per user accounts, you can have this seamlessly working on unlimited number of devices.

You can still use all of these in multiples just like before. First available entity will always be chosen.

1 Like

I just tested with my google home mini and everything works, artist, album, song.

entity:
  - cast | media_player.bedroom_speaker

Make sure you are on the latest version of the card and Home Asssitant.

And since I am posting, and on a “begging” roll, any chance of a “random” switch for a music artist /album / playlist?

Please open Feature Request on GitHub.

1 Like

Oh and also, Play button needs to be orange (if you are referring to the button when artist is opened). If it is gray your entity is not available for casting.

I is orange, on the artist, on the album and on the track, but only on the track it does play. Artist and album simply do nothing… Missing something probably…

3.3 has been released

New Features

  • https://github.com/JurajNyiri/PlexMeetsHomeAssistant/issues/50 was implemented. It is now possible to choose display type. This allows you to display for example albums from chosen library instead of artists. Similarly, this allows you to show Seasons from TV Shows.
  • Sort fields for visual editor are now automatically populated from Plex. They are now available everywhere where plex allows to sort.
  • It is now possible to use folder display view for music libraries
  • Look&Feel for some items that are missing thumbnails and are opened

Fixes

  • Edge case where incorrect width was calculated in sidebar panel

Dear all,

I am trying to set up plex meets home assistant.
However, I always get the message there is a network issue.
Please find below my configuration.
Am I doing something wrong?
The IP address and port is identical to the ones of the Plex Integration in HA.
The Plex token is the same as the one used for the recently added media.

Many thanks for helping me out.

Kind regards,

Robin


type: custom:plex-meets-homeassistant
protocol: http
sort: titleSort:asc
displayType: ‘’
playTrailer: true
showExtras: true
showSearch: true
ip: 192.168.0.189
token: XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
port: ‘32401’
libraryName: TV Shows
entity:

  • media_player.living_room_tv
  • media_player.master_bedroom_tv

Hello,

make sure to use UI editor, it will help you with a lot.

If you are using home assistant on https, you need to use also plex on https.
Make sure to read readme.

You can also find out more about the error in console.log in developer tools(F12).

Dear JurajNyiri,

Many thanks for the feedback.
The issue existed in two parts:

  1. the SSL certificate had to be created for the PMS
  2. I had to open a firewall port in my NAS in order for my PMS to be able to be found.

I can confirm it now works as it should.

Many thanks for the great card.

One beer coming up.

Kind regards,

Robin

1 Like

You don’t need to open port …just proxy Plex via for example nginxproxy manager add-on :wink: