• Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below
  • Forum
  • Website
  • GitHub
  • Status
  • Translation
  • Features
  • Team
  • Rules
  • Help
  • Feeds
User Links
  • Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below

    Useful Links Forum Website GitHub Status Translation Features Team Rules Help Feeds
    Jellyfin Forum Support Troubleshooting Cast To DLNA (Sonos) device name

     
    • 1 Vote(s) - 5 Average

    Cast To DLNA (Sonos) device name

    Shorten DLNA discovered full device name to speaker name
    PeteyMW
    Offline

    Junior Member

    Posts: 3
    Threads: 1
    Joined: 2024 May
    Reputation: 0
    Country:United Kingdom
    #1
    2024-05-29, 05:58 AM (This post was last modified: 2024-05-29, 06:00 AM by PeteyMW. Edited 1 time in total.)
    Hello,

    I'm trying to determine how to rename / shorten Sonos speaker names that appear under the 'Cast to device' button. For example, my 2 Sonos speakers appear as:

    '192.168.1.30 - Sonos Play:1 - RINCON_#MAC# @Kitchen'
    '192.168.1.31 - Sonos Play:1 - RINCON_#MAC# @Office'

    I wish to display these as simply the Sonos speaker name - the last word above: @Kitchen; @Office

    I've started to investigate whether this can be done via DLNA, CSS or webhooks plugin options, with no success.

    BTW, I attempted to enable DLNA debugging as per https://jellyfin.org/docs/general/networking/dlna/ ("Emby.Dlna": "Debug", "Emby.Dlna.Eventing": "Debug"; also tried 'Jellyfin...' in place of 'Emby...') but don't see any [DBG] info. I do see entries like:

    [INF] DLNA Session created for "192.168.1.30 - Sonos Play:1 - RINCON_#MAC# @Kitchen" - "Sonos Play:1"
    [INF] No matching device profile found. The default will need to be used.
    DeviceIdentification { FriendlyName: "192.168.1.31 - Sonos Play:1 - RINCON_#MAC' @Kitchen" ...


    I hope someone can advise - thank you.

    Cheers,
    Pete

    Dietpi system running Jellyfin v10.9.3
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,375
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #2
    2024-05-29, 03:14 PM
    Pretty sure the device is providing a name to Jellyfin. So I'm assuming you'd have to change the name with the Sonos app.
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    PeteyMW
    Offline

    Junior Member

    Posts: 3
    Threads: 1
    Joined: 2024 May
    Reputation: 0
    Country:United Kingdom
    #3
    2024-06-02, 08:26 AM
    Hello,

    Thanks for your reply.

    Unfortunately, although the speaker name can be changed via the Sonos app, it's JF's 'Cast to Devce / Play On' name [e.g. '192.168.1.30 - Sonos Play:1 - RINCON_#MAC' @Kitchen - DLNA'] I wish to change / shorten.
    Unable to do so via Sonos (https://en.community.sonos.com/controlle...ed-6789689), I was hoping to change how Jellyfin displays it.
    NB I see that Emby's DLNA plugin behaves similarly; their Sonos-specifc one does display speakers as required (e.g. '@Kitchen').

    I've tried several avenues but have just about given up!


    Aside: not related to this issue but to avoid 'No matching device profile found...' output in JF's log file for Sonos (S1) speakers, I created a ...jellyfin\plugins\configurations\dlna\user\sonos.xml:
    Starting with jellyfin\plugins\DLNA_2.0.0.0\profiles\default.xml,  added / amended the following:

    Code:
      <Name>Sonos</Name>
      <Identification>
      <deviceType>urn:schemas-upnp-org:device:ZonePlayer:1</deviceType>
      <manufacturer>Sonos, Inc.</manufacturer>
      <manufacturerURL>http://www.sonos.com</manufacturerURL>
      <modelNumber>S1</modelNumber>
      <modelDescription>Sonos Play:1</modelDescription>
      <modelName>Sonos Play:1</modelName>
      <modelURL>http://www.sonos.com/products/zoneplayers/S1</modelURL>
        <Headers>
        <HttpHeaderInfo name="User-Agent" value="Linux UPnP/1.0 Sonos/" match="Substring" />
        </Headers>
      </Identification>
      <SupportedMediaTypes>Audio</SupportedMediaTypes>
      <DirectPlayProfile container="mp3,wav,m4a,mp4,aac,flac,ogg,asf,wma" videoCodec="" type="Audio" />

    Notes:
    Identification info from http://<SonosSpeakerIP>:1400/xml/device_description.xml, with speaker-specific info rmoeved; 'HttpHeaderInfo' info from 'wget --server-response -qO /dev/null http://<SonosSpeakerIP>:1400/status'
    DirectPlayProfile containers taken from: https://docs.sonos.com/docs/supported-au...le-formats

    Cheers,
    Pete
    PeteyMW
    Offline

    Junior Member

    Posts: 3
    Threads: 1
    Joined: 2024 May
    Reputation: 0
    Country:United Kingdom
    #4
    2024-06-09, 06:05 AM
    For info,

    I resolved this by building Jellyfin.Plugin.Dlna.dll with a small tweak. In source code jellyfin-plugin-dlna\src\Jellyfin.Plugin.Dlna\PlayTo\PlayToManager.cs:

    Replaced:
    string deviceName = device.Properties.Name;

    With:
    string deviceName = device.Properties.Name.Substring(device.Properties.Name.LastIndexOf('@'));

    - my Sonos speakers now appear as their speaker name (e.g. previously presented as '192.168.1.30 - Sonos Play:1 - RINCON_#MAC# @Kitchen - DLNA', now simply '@Kitchen - DLNA').
    - other devices, without @ in their uPnP name, are unaffected.

    Cheers,
    Pete
    dwev
    Offline

    Junior Member

    Posts: 1
    Threads: 0
    Joined: 2024 Oct
    Reputation: 0
    Country:Denmark
    #5
    2024-10-04, 09:32 AM
    This would be a great improvement in the plugin itself - even if it's a checkbox to say "Shorten name" and have a regex split the string at the predictable RINCON_<MAC>.
    « Next Oldest | Next Newest »

    Users browsing this thread: 1 Guest(s)


    • View a Printable Version
    • Subscribe to this thread
    Forum Jump:

    Home · Team · Help · Contact
    © Designed by D&D - Powered by MyBB
    L


    Jellyfin

    The Free Software Media System

    Linear Mode
    Threaded Mode