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-MusicOnDemand] - Play music from deezer with a browser in the background

    Scheduled Pinned Locked Moved Entertainment
    16 Posts 5 Posters 12.3k Views 5 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.
    • Cr4z33C Offline
      Cr4z33 @ptrk95
      last edited by

      @ptrk95 but then why should I need puppeteer if we have already Chromium installed in the Pi? :confused_face:

      P 1 Reply Last reply Reply Quote 0
      • P Offline
        ptrk95 Module Developer @Cr4z33
        last edited by

        @cr4z33 with puppeteer you can control the browser with Javascript. But it will install a version of chromium inside the puppeteer folder which you can delete to save space if you use the preinstalled chromium of raspbian :)

        Cr4z33C 1 Reply Last reply Reply Quote 0
        • Cr4z33C Offline
          Cr4z33 @ptrk95
          last edited by Cr4z33

          @ptrk95 OK thanks now MM is loading properly, but yout module keeps saying ‘Initializing…’ and nothing happens. :grimacing_face:

          This is the error in log:

          Error: Failed to launch chrome!
          
          
          TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
          
              at onClose (/home/pi/MagicMirror/modules/MMM-MusicOnDemand/node_modules/puppeteer/lib/Launcher.js:342:14)
              at ChildProcess.helper.addEventListener (/home/pi/MagicMirror/modules/MMM-MusicOnDemand/node_modules/puppeteer/lib/Launcher.js:332:60)
              at emitTwo (events.js:131:20)
              at ChildProcess.emit (events.js:214:7)
              at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
          
          P 1 Reply Last reply Reply Quote 0
          • P Offline
            ptrk95 Module Developer @Cr4z33
            last edited by

            @cr4z33 that’s most likely a versioning problem with puppeteer and chromium.
            I assume you already did:

            cd ~/MagicMirror/modules/MMM-MusicOnDemand
            npm install puppeteer@1.11.0
            

            Please check your chromium version. My version is the latest one: version 65.0.3325.181.
            If it’s not, try:

            sudo apt-get install chromium-browser
            

            And check that your chromium path in the config file is “/usr/bin/chromium-browser”, which I guess it is. Because on Raspberry Pi the browser of puppeteer isn’t working.

            If that’s also not launching your browser I honestly don’t know why :/

            In the latest build I added the option “showBrowser” in the config-file. If you set it to true, you are able to see the browser and what it is doing in the browser.

            Cr4z33C 2 Replies Last reply Reply Quote 0
            • Cr4z33C Offline
              Cr4z33 @ptrk95
              last edited by Cr4z33

              @ptrk95 did everything you said, browser version is the same, added that config line, but the module keeps sitting at the ‘Initializing…’ word.

              If I can’t do anything else maybe someone here is willing to contribute? :man_shrugging_medium_skin_tone:

              1 Reply Last reply Reply Quote 0
              • Cr4z33C Offline
                Cr4z33 @ptrk95
                last edited by Cr4z33

                @ptrk95 tried to give your module another try, but if I try using the (latest) default Chromium browser it keeps sitting at the ‘Logging into deezer’ text and if I try using Puppeteer I get this:

                Error: Failed to launch chrome!
                /home/pi/MagicMirror/modules/MMM-MusicOnDemand/node_modules/puppeteer/.local-chromium/linux-609904/chrome-linux/chrome: 18: /home/pi/MagicMirror/modules/MMM-MusicOnDemand/node_modules/puppeteer/.local-chromium/linux-609904/chrome-linux/chrome: ?Udmv~�����������: not found
                /home/pi/MagicMirror/modules/MMM-MusicOnDemand/node_modules/puppeteer/.local-chromium/linux-609904/chrome-linux/chrome: 1: /home/pi/MagicMirror/modules/MMM-MusicOnDemand/node_modules/puppeteer/.local-chromium/linux-609904/chrome-linux/chrome: �
                @8
                  @,*@@@hh���,+r,+r0r0r0r: not found
                /home/pi/MagicMirror/modules/MMM-MusicOnDemand/node_modules/puppeteer/.local-chromium/linux-609904/chrome-linux/chrome: 1: /home/pi/MagicMirror/modules/MMM-MusicOnDemand/node_modules/puppeteer/.local-chromium/linux-609904/chrome-linux/chrome: ELF: not found
                /home/pi/MagicMirror/modules/MMM-MusicOnDemand/node_modules/puppeteer/.local-chromium/linux-609904/chrome-linux/chrome: 19: /home/pi/MagicMirror/modules/MMM-MusicOnDemand/node_modules/puppeteer/.local-chromium/linux-609904/chrome-linux/chrome: Syntax error: ")" unexpected
                
                
                TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
                
                    at onClose (/home/pi/MagicMirror/modules/MMM-MusicOnDemand/node_modules/puppeteer/lib/Launcher.js:342:14)
                    at Interface.helper.addEventListener (/home/pi/MagicMirror/modules/MMM-MusicOnDemand/node_modules/puppeteer/lib/Launcher.js:331:50)
                    at emitNone (events.js:111:20)
                    at Interface.emit (events.js:208:7)
                    at Interface.close (readline.js:370:8)
                    at Socket.onend (readline.js:149:10)
                    at emitNone (events.js:111:20)
                    at Socket.emit (events.js:208:7)
                    at endReadableNT (_stream_readable.js:1056:12)
                    at _combinedTickCallback (internal/process/next_tick.js:138:11)
                
                1 Reply Last reply Reply Quote 0
                • ejay-ibmE Offline
                  ejay-ibm Project Sponsor Module Developer
                  last edited by

                  Fantastic !
                  I’m preparing as well a stand alone module to control spotify with the mk2 assistant as well . I should be able to release and share in a couple of days . I just need to fix one big bug and it will be OK .
                  Thanks for your module We will have all we need to control music with our mirror !
                  so cool

                  Ejay

                  F 1 Reply Last reply Reply Quote 0
                  • F Offline
                    F17MC @ejay-ibm
                    last edited by F17MC

                    @ejay-ibm said in [MMM-MusicOnDemand] - Play music from deezer with a browser in the background:

                    Fantastic !
                    I’m preparing as well a stand alone module to control spotify with the mk2 assistant as well . I should be able to release and share in a couple of days . I just need to fix one big bug and it will be OK .
                    Thanks for your module We will have all we need to control music with our mirror !
                    so cool

                    Ejay

                    Wow! That is fantastic!
                    I have a question. I’m living in Spain, and I’m using a Spotify account from other country.
                    All works fine, and I don’t need VPN to play my music.
                    Do you think that I could be able to use my Spotify account with your module?

                    Thanks!

                    Cr4z33C 1 Reply Last reply Reply Quote 0
                    • Cr4z33C Offline
                      Cr4z33 @F17MC
                      last edited by

                      @F17MC mate imho you should contact him in private chat.

                      This is a topic about a Deezer module and from another developer after all. :winking_face:

                      1 Reply Last reply Reply Quote 0
                      • D Offline
                        dodol45
                        last edited by

                        can’t stop music with MMM-assistantMk2, can’t input any command after music playing, anyone know how to solve it ?

                        1 Reply Last reply Reply Quote 0

                        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                        With your input, this post could be even better 💗

                        Register Login
                        • 1 / 1
                        • 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