MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    MMM-Sonos - Display what is currently playing on your Sonos network

    Scheduled Pinned Locked Moved Entertainment
    25 Posts 8 Posters 7.5k Views 9 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T Offline
      tbouron Module Developer @eliah
      last edited by

      Hi @eliah. Can you try the version on the branch fix/group-scan and tell me how it goes ?

      You would just need to go into the MMM-Sonos folder and do:

      git fetch && git checkout fix/group-scan
      

      Thanks :)

      E 1 Reply Last reply Reply Quote 0
      • J Offline
        Jas
        last edited by

        @tbouron Beautiful module. How can I get the album art and Rooms that are stopped to also show up? What other info can I display?

        Thanks

        T 1 Reply Last reply Reply Quote 0
        • T Offline
          tbouron Module Developer @Jas
          last edited by tbouron

          Hi @Jas and thanks!

          Both of these are not supported. The concept of the module was to have a Sonos now playing... module with minimalist design hence:

          • only vital information: title, artist, album (can be toggled), metadata: room, volume and track length (can be toggled)
          • no album artwork
          • show only rooms where music is playing, otherwise show nothing to avoid clutter

          It would not be too hard to do all the above, but I don’t plan to do it anytime soon because of the concept.

          J P 2 Replies Last reply Reply Quote 0
          • J Offline
            Jas @tbouron
            last edited by

            @tbouron Got it! Thank you for the quick response. Looks great!

            T 1 Reply Last reply Reply Quote 0
            • T Offline
              tbouron Module Developer @Jas
              last edited by

              @Jas No problem. Feel free to add an issue on GitHub. If enough people really want it and +1 the issue, I’ll consider doing it ;)

              1 Reply Last reply Reply Quote 0
              • E Offline
                eliah @tbouron
                last edited by

                @tbouron It looks like the issue is now fixed, no constant updates anymore! Thank you. :)
                Some more issues I noticed:

                1. Value for song length minutes has no leading zero, so when a song’s length is 2:04 it shows 2:4.
                2. If any of speakers are used directly by AirPlay, it shows (null) (null). Maybe it’s better to ignore AirPlay mode if no information is available for it?
                3. Not sure if it is a bug of a module or Sonos library behind it, but for some reason the group names are sometimes become incorrect. For example, if I start a playlist on three speakers in the same group, first it shows something like “Kitchen+2” (and that’s correct), but after some time it becomes just “Kitchen” (same 3 speakers are playing).
                  And additionally, if more than one speaker is playing in the same group, each of them can have its own volume. In this case the single volume indicator that your module outputs to the screen becomes useless.
                T 1 Reply Last reply Reply Quote 0
                • T Offline
                  tbouron Module Developer @eliah
                  last edited by tbouron

                  @eliah Awesome! Thanks for the feedback, I’ll cleanup and push the changes as soon as possible :)

                  Regarding the other issues:

                  Value for song length minutes has no leading zero, so when a song’s length is 2:04 it shows 2:4.

                  I already fixed that, it’s in a branch since Christmas but I was waiting for your feedback on the group scan issue to release it.

                  any of speakers are used directly by AirPlay, it shows (null) (null). Maybe it’s better to ignore AirPlay mode if no information is available for it?

                  I assume you are talking about the second line for artist and album right? I already have sort of partial fix for that (not displaying the album if null). I could do the same thing for the artist. When you are using airplay, is the first line displayed correctly? What does it say? I unfortunately cannot know if something comes through airplay or not, it’s all unified through the Sonos library.

                  Not sure if it is a bug of a module or Sonos library behind it, but for some reason the group names are sometimes become incorrect. For example, if I start a playlist on three speakers in the same group, first it shows something like “Kitchen+2” (and that’s correct), but after some time it becomes just “Kitchen” (same 3 speakers are playing).

                  That would be a bug in the underlying Sonos library. I just listening for events and display whatever comes from there.

                  And additionally, if more than one speaker is playing in the same group, each of them can have its own volume. In this case the single volume indicator that your module outputs to the screen becomes useless.

                  The Sonos library doesn’t give me this information unfortunately so that won’t be possible to do for now.

                  E 1 Reply Last reply Reply Quote 0
                  • E Offline
                    eliah @tbouron
                    last edited by

                    @tbouron said in MMM-Sonos - Display what is currently playing on your Sonos network:

                    I assume you are talking about the second line for artist and album right? I already have sort of partial fix for that (not displaying the album if null). I could do the same thing for the artist. When you are using airplay, is the first line displayed correctly? What does it say? I unfortunately cannot know if something comes through airplay or not, it’s all unified through the Sonos library.

                    I checked that more. And it looks if I share a song from iTunes via AirPlay, it provides all necessary information, so the data is correct. But if I use YouTube, then it is empty. Song name is just empty, and both singer and album names are displayed as (null).

                    That would be a bug in the underlying Sonos library. I just listening for events and display whatever comes from there.

                    That’s bad. :( As I can see, sometimes it just gets crazy. Shows me up instances of the same, when only one group plays. Looks like the library behind node-http-sonos-api required for another modules of the same type is more stable currently.

                    The Sonos library doesn’t give me this information unfortunately so that won’t be possible to do for now.

                    I believe it gives in fact. As I can see from Sonos module, its class SonosGroup contains Members. I believe it can be used to count number of members in the current group, and if there is more than one, not output the volume. Alternatively, I believe it should be possible to extract exact names of members from the Group to construct a more user-friendly custom name to use in metadata (i.e. not “Kitchen+2”, but “Kitchen, Corridor, Bathroom”).

                    T 1 Reply Last reply Reply Quote 0
                    • T Offline
                      tbouron Module Developer @eliah
                      last edited by tbouron

                      @eliah I’ll see what I can do. But in the meantime, feel free to open issues and/or PRs on the GitHub repo for potential fixes

                      1 Reply Last reply Reply Quote 0
                      • H Offline
                        hweigel
                        last edited by

                        @tbouron: first of all, very noice module, chapeau! Now the inevitable nag: is there any means of reducing the font size (especially the track)? Any hint/idea appreciated!

                        T 1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 3
                        • 1 / 3
                        • First post
                          Last post
                        Enjoying MagicMirror? Please consider a donation!
                        MagicMirror created by Michael Teeuw.
                        Forum managed by Sam, technical setup by Karsten.
                        This forum is using NodeBB as its core | Contributors
                        Contact | Privacy Policy