• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
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 5.8k 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 Jan 2, 2020, 8:43 PM

    @eliah That’s interesting, it would suggest that the group IDs are not consistent (as groups are cached by IDs) which obviously shouldn’t happen. I’m also wondering if targeting a random device on every scan has any implications on this (but it shouldn’t, at least I cannot reproduce this on my own network)

    Would it possible for you to test a different version? I would like to see how it can be mitigated.

    1 Reply Last reply Reply Quote 0
    • E Offline
      eliah
      last edited by Jan 3, 2020, 5:41 PM

      sure, I can test if you have any ideas why it is happening.

      T 1 Reply Last reply Jan 5, 2020, 10:49 AM Reply Quote 0
      • T Offline
        tbouron Module Developer @eliah
        last edited by Jan 5, 2020, 10:49 AM

        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 Jan 8, 2020, 3:18 PM Reply Quote 0
        • J Offline
          Jas
          last edited by Jan 7, 2020, 2:54 PM

          @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 Jan 7, 2020, 3:08 PM Reply Quote 0
          • T Offline
            tbouron Module Developer @Jas
            last edited by tbouron Jan 7, 2020, 3:09 PM Jan 7, 2020, 3:08 PM

            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 Jan 7, 2020, 3:17 PM Reply Quote 0
            • J Offline
              Jas @tbouron
              last edited by Jan 7, 2020, 3:17 PM

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

              T 1 Reply Last reply Jan 7, 2020, 3:19 PM Reply Quote 0
              • T Offline
                tbouron Module Developer @Jas
                last edited by Jan 7, 2020, 3:19 PM

                @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 Jan 8, 2020, 3:18 PM

                  @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 Jan 8, 2020, 4:27 PM Reply Quote 0
                  • T Offline
                    tbouron Module Developer @eliah
                    last edited by tbouron Jan 8, 2020, 4:30 PM Jan 8, 2020, 4:27 PM

                    @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 Jan 11, 2020, 7:53 PM Reply Quote 0
                    • E Offline
                      eliah @tbouron
                      last edited by Jan 11, 2020, 7:53 PM

                      @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 Jan 11, 2020, 8:48 PM Reply Quote 0
                      • 1
                      • 2
                      • 3
                      • 1 / 3
                      1 / 3
                      • First post
                        9/25
                        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