JurajNyiri / PlexMeetsHomeAssistant

Custom card which integrates plex into Home Assistant and makes it possible to launch movies or tv shows on TV with a simple click

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature Request: Stream music to Mopidy

datdamnzotz opened this issue · comments

commented

Question - Feature request
Is there a way to stream a Plex music library to a mopidy media player?
I'm using the mopidy integration here as various different room media players:
https://github.com/bushvin/hass-integrations#mopidy v1.4.6
This is talking to Mopidy 3.2.0 on various raspberry PI's.

I've tried different card configurations like:

Card Configuration

type: custom:plex-meets-homeassistant
protocol: https
sort: ''
playTrailer: false
showExtras: false
showSearch: true
ip: plex.local
token: <yup>
port: '443'
entity: media_player.mediaPI (or cast | media_player.mediaPI)
libraryName: Music

From the native mopidy media player, the DLNA Server picker coming from plex plays music just fine...
image
I would rather use this interface for the picker, because it rocks.

or is there a good way to format the media_content_id the mopidy integration uses as a pre/post script type of deal coming out of plexmeetshomeassistant.

Movies work fine to the TV.

Checks
Please check below if true:

[x] I am running Home Assistant on HTTP protocol
[x] I am running BOTH Home Assistant AND Plex on HTTPS protocol
[x] My Plex server is accessible through protocol, port and ip/hostname I have specified for the card.
[x] My Plex server is running on HTTPS and has a valid certificate.

Plex Version
Version 1.25.6.5577

Hello, new target player would need to be added.

Could you please share how do you play music from plex on mpd target via a service call?

commented

Currently it is through the mopidy add-on https://github.com/bushvin/hass-integrations#mopidy
It shows up in a media player card like so.

type: media-control
entity: media_player.livingroompi

image

Click the play button
I get the media browser, select DLNA
image

Drill down to the media, and hit the play button.
image

commented

That device shows up like this
image

commented

Playing looks like this
image

commented

Calling the service like so (sorry had to dig how to do this)

service: media_player.play_media
data:
  media_content_type: music
  media_content_id: http://192.168.1.7:8123/local/audio/justtesting.mp3  or what ever url.
target:
  entity_id: media_player.livingroompi

Plays the file on the device.