Open crazystick opened 9 months ago
Hey there @j-stienstra, @ctalkington, mind taking a look at this issue as it has been labeled with an integration (jellyfin
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
jellyfin documentation jellyfin source (message by IssueLinks)
@crazystick On your Jellyfin server do you have DLNA "Play To" enabled?
It's the top checkbox under "Settings". I have a misbehaving Toshiba TV which was showing up as 200 separate DLNA cast targets. Turning that off has stopped it from happening, with the downside I can't use the DLNA Cast feature.
@tim-hitchins-ekkosense I tried your suggestion but it doesn't seem to have improved matters. I removed and readded the integration which got rid of most of the entities, but they are still going up.
the common issue is that devices are created based on the reporting that the session device supports persistent identifier. The client applications report this to the server but they usually use some method on the client device as the identifier and its expected to be persistent.
However, client devices can regenerate identifier to improve privacy that can cause the identifier to be less persistent than thought. Think of it like resetting Google advertising IDs on Android devices.
for chromecast, it's deriving deviceId by base64 the name of receiver or first sender ID or time. This likely leads to the growing list of devices.
so it's actually not creating persistent identifier and properly reports SupportsPersistentIdentifier: false
so you see the media players still because its generating new playback session ids
However, in your diagnostics, most your chromecast seem to report SupportsPersistentIdentifier: true
which is intriguing
I'm wondering if we should just ignore sessions where the deviceid starts with "chromecast" as it seems like these are transient sessions and keeping them around as entities wouldn't have any benefit
I don't think this issue is only related to Chromecast devices. also to iPhone apps (Finamp and the regular app) and the LG Smart TV app.
For the record, there is only one actual iPhone and LG Smart TV device.
Entities (x watching sensor I kept out of the screenshot):
Devices:
In the past, I've deleted these duplicate media_player entities several times but they are coming back
I get basically the same issue. I play a video file using Jellyfin Andriod app and cast to Chromecast . I pause playback, disconnect chromecast & close jellyfin. New entries show up. I currently have 196.
Edit: Is it possible to mass delete entries?
I’m having the same issue with multiple devices appearing several times, not limited to chromecast devices only either.
I'm the OP from https://github.com/home-assistant/core/issues/105000 ( <- nice number )
Just to confirm this is still an issue, but in my case, there are only duplicate Apple TV Swiftfin entries, no duplicates for my phone nor desktops, but then again, I don't remember when is the last time I actually played something on a player other than my TV, so there's that.
I'm having a similar issue but it's hard to tell how much of it is actually that in jellyfin itself each user account on each device and in the case of phones each client app (like if you use both the jellyfin app and finamp app like I do) all show up as separate entities. So maybe before fixing this more details about the media session should be displayed such as the user account and the client app the session represents. That would be a helpful feature in its own right in addition to being useful in debugging this issue.
I'm curious why every app or player that interacts with Jellyfin generates a media player entity in Home Assistant in the first place. Generating 245 different media players is either funny or annoying, depending on your perspective, but what problem does generating even one solve?
Probably if users are watching on their TV / Phone / Desktop, each one of those is a "separate media player", but tbh I don't remember when I last watched something other than on my TV.
So to recap, if we're seeing this on both AppleTV Swiftfin and other Jellyfin players, phones/desktops, wouldn't it make more sense to implement the fix in the integration here?
Something along the lines of: If the player name is the same, even if the ID changed, don't create a new entity?
I just went through the process of deleting 30 media players (again).
The problem
Jellyfin creates a new Chromecast device/entity every time you play something using the native Jellyfin app on Android.
This seems to be the same as issue #105000 but since I don't use AppleTV I don't know what Swiftfin is so not sure what the resolution might be.
What version of Home Assistant Core has the issue?
core-2023.11.1
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant Container
Integration causing the issue
Jellyfin
Link to integration documentation on our website
No response
Diagnostics information
config_entry-jellyfin-787b9eb6dd7dfe73d109348717be4c1b.json.txt
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response