Jellyfin integration

Tags: #<Tag:0x00007fc4174783e8>


A specific integration for Jellyfin (an Emby fork) is now available in HACS.

Beyond the basic functionalities that were already usable via the Emby integration, this one adds:

  • Config flow support (YAML not supported)
  • Media browser support (browse and launch a media on a Jellyfin device)
  • Media Source (browse and launch a media on a cast device, i.e. Chromecast)
  • Services:
    . trigger_scan : trigger a library scan
    . browse: Display a media card on a Jellyfin device (needs Jellyfin id)
    . delete: Delete a media (needs Jellyfin id)

It also optionally supports the upcoming-media-card lovelace card.

In cas you wonder, it also support a card of mine named YAMC I’m working on, which is the “upcoming” card on steroid, but not quite ready for prime, yet:



Oh wow, can’t believe I missed this. Going to try it right away. Thank you mister :wink:

Hmm, the media_player and sensor entities seem to report their state just fine, and the browse command works, but trying to browse and play media from either the Media Browser or Browse Media doesn’t seem to work. No error appears in either the Jellyfin or HA logs, and the websocket shows a play media service call being sent, so I’m not sure what’s up:

service: media_player.play_media
  entity_id: "media_player.jellyfin_google_tv_chromecast"
  media_content_id: "media-source://jellyfin/episode~~cf9365266c2a0862446f6ad33a08c4f3"
  media_content_type: "episode"

Should be fixed in latest version

Playing via the Browse Media button on a media player card now works as expected :slight_smile: Thanks!

Playing via the media browser goes further but still doesn’t work. Selecting an item for playback now causes the device to go into Chromecast mode, but then gets stuck on a generic Chromecast logo while producing a Home Assistant error. I think this is caused by direct play on the media player vs transcoding on the Chromecast, my server can’t handle transcoding. Here’s the error in case you’re interested, but I think this one’s on me:

2021-06-07 08:34:54 ERROR (Thread-14) [homeassistant.components.cast.media_player] Failed to cast media https://<public domain>/videos/c28856b0-d630-0b1a-2ec4-9be20bc3a496/stream.mp4?DeviceId=b5cdc2d9-4f74-41f6-ae59-b61a7550516f&MediaSourceId=c28856b0d6300b1a2ec49be20bc3a496&VideoCodec=h264,mpeg4,mpeg2video&AudioCodec=aac,mp3,opus,flac,vorbis&AudioStreamIndex=1&VideoBitrate=24360000&AudioBitrate=640000&PlaySessionId=0e7ecff5fbae4f169c6b2e9e570dda01&api_key=3a48c462fe1843a7abe8da1d58623aa7&SubtitleMethod=Encode&TranscodingMaxAudioChannels=6&RequireAvc=false&Tag=cfdcc4df8613439e626f15fe7766b359&TranscodeReasons=ContainerNotSupported,VideoCodecNotSupported,AudioCodecNotSupported. Please make sure the URL is: Reachable from the cast device and either a publicly resolvable hostname or an IP address

Also looking for some general advice, not quite relevant to the integration specifically but I’m wondering how others are dealing with it. I can use either my public domain or LAN IP to access my Jellyfin server, and both work to configure the integration. However, when using the LAN IP, the upcoming media card has the image URLs with HTTPS in place of HTTP, which isn’t configured so the images break (I think this is a browser thing and not possible to circumvent). Using the public domain fixes this, but it results in occasional buffering compared to the LAN IP since the WAN interface is obviously slower. I haven’t tried configuring SSL within Jellyfin yet since it’s currently set up through a reverse proxy and I believe double-SSL is gonna break stuff or otherwise be a huge headache.

I’m certainly doing something wrong but i have only one entity called sensor.jellyfin_jellyfin from this integration with lots of attributes.
Is it normal ?

You should have one media_player per active device, in addition of one sensor for the server:

not sure to understand, i should find a “media_player.jellyfin” ?

Yes. In this example, a “media_player.jellyfin_firefox”.
They become inactive in HA when inactive in Jellyfin

I have added the integration to HACS but I cannot figure out how to configure it and let home assistant know the address of my Jellyfin server. Does this need setup in configuration.yaml?

I’m trying to script a playlist to play through google home, but I can’t find the way.
Do I use the media_content_id: media-source / jellyfin / etc .... playlistname.xml or is there another line to write?.


After adding the HACS integration you have to add it like a regular home assistant integration.