MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord
    MagicMirror² v2.25.0 is available! For more information about this release, check out this topic.

    MMM-Sonos not displaying

    Troubleshooting
    2
    4
    2172
    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.
    • jkindelspire
      jkindelspire last edited by

      I have set up the MMM-Sonos module by @Snille , following @cohron’s instructions in this post: MMM-Sonos - To show what your SONOS is playing..

      Also, I modified sonos-http-api.js as suggested in case this was a CORS issue.

      The issue I’m having is this: When Sonos is playing, the module will show itself, but will not retrieve the now playing info. All that appears is: “Loading music…”.

      I’m able to retrieve info when I look at http://192.168.1.xxx:5005/zones. The info looks like this:

      [{"uuid":"RINCON_949F3E7458A001400","coordinator":{"uuid":"RINCON_949F3E7458A001400","state":{"volume":16,"mute":false,"equalizer":{"bass":0,"treble":4,"loudness":true},"currentTrack":{"artist":"","title":"","album":"","albumArtUri":"","duration":0,"uri":"x-sonosapi-radio:ST%3a3884443120794727150?sid=236&flags=8300&sn=2","type":"radio","stationName":"Miles Davis Radio"},"nextTrack":{"artist":"","title":"","album":"","albumArtUri":"","duration":0,"uri":""},"trackNo":0,"elapsedTime":0,"elapsedTimeFormatted":"00:00:00","playbackState":"STOPPED","playMode":{"repeat":"none","shuffle":false,"crossfade":false}},"roomName":"Living Room","coordinator":"RINCON_949F3E7458A001400","groupState":{"volume":16,"mute":false}},"members":[{"uuid":"RINCON_949F3E7458A001400","state":{"volume":16,"mute":false,"equalizer":{"bass":0,"treble":4,"loudness":true},"currentTrack":{"artist":"","title":"","album":"","albumArtUri":"","duration":0,"uri":"x-sonosapi-radio:ST%3a3884443120794727150?sid=236&flags=8300&sn=2","type":"radio","stationName":"Miles Davis Radio"},"nextTrack":{"artist":"","title":"","album":"","albumArtUri":"","duration":0,"uri":""},"trackNo":0,"elapsedTime":0,"elapsedTimeFormatted":"00:00:00","playbackState":"STOPPED","playMode":{"repeat":"none","shuffle":false,"crossfade":false}},"roomName":"Living Room","coordinator":"RINCON_949F3E7458A001400","groupState":{"volume":16,"mute":false}}]},{"uuid":"RINCON_949F3EF6E88801400","coordinator":{"uuid":"RINCON_949F3EF6E88801400","state":{"volume":8,"mute":false,"equalizer":{"bass":-2,"treble":4,"loudness":true},"currentTrack":{"artist":"Ratatat","title":"One","album":"9 Beats","albumArtUri":"/getaa?s=1&u=x-sonos-http%3a_dklxfo-EJPlQepCmmlOPLag0OEDVysofgVDhWO_dbwFdUyzypA43A3qZswL_CkB.mp3%3fsid%3d151%26flags%3d8192%26sn%3d1","duration":162,"uri":"x-sonos-http:_dklxfo-EJPlQepCmmlOPLag0OEDVysofgVDhWO_dbwFdUyzypA43A3qZswL_CkB.mp3?sid=151&flags=8192&sn=1","type":"track","stationName":"","absoluteAlbumArtUri":"http://192.168.1.6:1400/getaa?s=1&u=x-sonos-http%3a_dklxfo-EJPlQepCmmlOPLag0OEDVysofgVDhWO_dbwFdUyzypA43A3qZswL_CkB.mp3%3fsid%3d151%26flags%3d8192%26sn%3d1"},"nextTrack":{"artist":"Ratatat","title":"Two","album":"9 Beats","albumArtUri":"/getaa?s=1&u=x-sonos-http%3a_dklxfo-EJN2rKe7xOc42oFmb88-Mp1hhk_TFXSosX6gpCzOdTGQYBAX9hQGy_mZ.mp3%3fsid%3d151%26flags%3d8192%26sn%3d1","duration":129,"uri":"x-sonos-http:_dklxfo-EJN2rKe7xOc42oFmb88-Mp1hhk_TFXSosX6gpCzOdTGQYBAX9hQGy_mZ.mp3?sid=151&flags=8192&sn=1","absoluteAlbumArtUri":"http://192.168.1.6:1400/getaa?s=1&u=x-sonos-http%3a_dklxfo-EJN2rKe7xOc42oFmb88-Mp1hhk_TFXSosX6gpCzOdTGQYBAX9hQGy_mZ.mp3%3fsid%3d151%26flags%3d8192%26sn%3d1"},"trackNo":1,"elapsedTime":38,"elapsedTimeFormatted":"00:00:38","playbackState":"PLAYING","playMode":{"repeat":"none","shuffle":false,"crossfade":false}},"roomName":"Kitchen","coordinator":"RINCON_949F3EF6E88801400","groupState":{"volume":8,"mute":false}},"members":[{"uuid":"RINCON_949F3EF6E88801400","state":{"volume":8,"mute":false,"equalizer":{"bass":-2,"treble":4,"loudness":true},"currentTrack":{"artist":"Ratatat","title":"One","album":"9 Beats","albumArtUri":"/getaa?s=1&u=x-sonos-http%3a_dklxfo-EJPlQepCmmlOPLag0OEDVysofgVDhWO_dbwFdUyzypA43A3qZswL_CkB.mp3%3fsid%3d151%26flags%3d8192%26sn%3d1","duration":162,"uri":"x-sonos-http:_dklxfo-EJPlQepCmmlOPLag0OEDVysofgVDhWO_dbwFdUyzypA43A3qZswL_CkB.mp3?sid=151&flags=8192&sn=1","type":"track","stationName":"","absoluteAlbumArtUri":"http://192.168.1.6:1400/getaa?s=1&u=x-sonos-http%3a_dklxfo-EJPlQepCmmlOPLag0OEDVysofgVDhWO_dbwFdUyzypA43A3qZswL_CkB.mp3%3fsid%3d151%26flags%3d8192%26sn%3d1"},"nextTrack":{"artist":"Ratatat","title":"Two","album":"9 Beats","albumArtUri":"/getaa?s=1&u=x-sonos-http%3a_dklxfo-EJN2rKe7xOc42oFmb88-Mp1hhk_TFXSosX6gpCzOdTGQYBAX9hQGy_mZ.mp3%3fsid%3d151%26flags%3d8192%26sn%3d1","duration":129,"uri":"x-sonos-http:_dklxfo-EJN2rKe7xOc42oFmb88-Mp1hhk_TFXSosX6gpCzOdTGQYBAX9hQGy_mZ.mp3?sid=151&flags=8192&sn=1","absoluteAlbumArtUri":"http://192.168.1.6:1400/getaa?s=1&u=x-sonos-http%3a_dklxfo-EJN2rKe7xOc42oFmb88-Mp1hhk_TFXSosX6gpCzOdTGQYBAX9hQGy_mZ.mp3%3fsid%3d151%26flags%3d8192%26sn%3d1"},"trackNo":1,"elapsedTime":38,"elapsedTimeFormatted":"00:00:38","playbackState":"PLAYING","playMode":{"repeat":"none","shuffle":false,"crossfade":false}},"roomName":"Kitchen","coordinator":"RINCON_949F3EF6E88801400","groupState":{"volume":8,"mute":false}}]}]
      
      

      How do I determine where the problem is? It seems like perhaps the module isn’t receiving the information it needs about the track being played. The state of my Sonos players is being transmitted, as the module will hide/unhide when the the state of a Sonos changes.

      Thanks for your input; I’m learning this as I go.

      1 Reply Last reply Reply Quote 0
      • A
        AgP42 Project Sponsor Module Developer last edited by

        Hello,

        maybe a stupid advice, but did you run the service ?

        How to Install Sonos-API

        To install the Sonos-API just clone the repository to your PI.

        git clone https://github.com/jishi/node-sonos-http-api.git

        Navigate to the new node-sonos-http-api folder and install the node dependencies.

        cd node-sonos-http-api && npm install --production

        Now you can run the service with:

        npm start

        and it has to be run each time your restart, so the advice of the dev is to create and auto start with pm2.

        good luck !

        jkindelspire 1 Reply Last reply Reply Quote 0
        • jkindelspire
          jkindelspire @AgP42 last edited by

          The service is running and I did create an auto start with pm2. It’s very strange to me, as I can even control my Sonos from my Chrome on my laptop with the commands for node-sonos-http-api (e.g, http://192.168.1.xxx:5005/pauseall).

          1 Reply Last reply Reply Quote 0
          • jkindelspire
            jkindelspire last edited by

            I’ve been messing with this off and on for the last few days. Perhaps I should clarify that I’m trying to get this working on a Pi Zero W. MM runs on the Pi Zero W just fine, but this module doesn’t. I installed MM and MMM-Sonos on a Pi 3b, and both work just fine. I’m wondering if this couldn’t be an issue with node being an older versionon the Zero W?

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            • First post
              Last post
            Enjoying MagicMirror? Please consider a donation!
            MagicMirror created by Michael Teeuw.
            Forum managed by Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
            This forum is using NodeBB as its core | Contributors
            Contact | Privacy Policy