• 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.

mpd/mpc titel display on MM

Scheduled Pinned Locked Moved Unsolved Troubleshooting
6 Posts 2 Posters 3.4k Views 3 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.
  • C Offline
    co8
    last edited by Aug 27, 2016, 8:23 AM

    Hey there,

    I am using mpd mpc player with my Mirror and I am looking for a way to display the current titel within the mirror.
    Any ideas how I could manage that?

    Right now I am using a playlist and 3 buttons prev, next and play/stop with a python script. The title would be stdout on the terminal. Somehow I have to redirect it to the mirror/website.

    I am not really good with javascript or programming in general, just a bit basics that’s it. If you need mor info let me know.

    BR
    co8

    1 Reply Last reply Reply Quote 0
    • S Offline
      strawberry 3.141 Project Sponsor Module Developer
      last edited by Aug 27, 2016, 8:32 AM

      you could run the python script as a childprocess in the node_helper and then listen on stdout, when you receive data you could send a socket notification to your module and then display it on the mirror

      Please create a github issue if you need help, so I can keep track

      1 Reply Last reply Reply Quote 0
      • C Offline
        co8
        last edited by Aug 27, 2016, 8:53 AM

        Hi strawberry,

        Thank you for your input. When I said, I am not really good with javascript or programming, I meant my knowledge is down to zero.

        To run a childprocess in node_helper I found this blog,
        http://krasimirtsonev.com/blog/article/Nodejs-managing-child-processes-starting-stopping-exec-spawn

        Does this goes in the right direction?

        1 Reply Last reply Reply Quote 0
        • S Offline
          strawberry 3.141 Project Sponsor Module Developer
          last edited by strawberry 3.141 Aug 27, 2016, 9:12 AM Aug 27, 2016, 9:07 AM

          thats exactly what i meant but you would go for spawn not exec

          just post your progress and questions, the others and I will help you creating your module

          Please create a github issue if you need help, so I can keep track

          1 Reply Last reply Reply Quote 0
          • C Offline
            co8
            last edited by Aug 27, 2016, 9:21 AM

            Thanks.
            I will definitely read into this.
            Also found this for better understanding http://www.hacksparrow.com/difference-between-spawn-and-exec-of-node-js-child_process.html

            1 Reply Last reply Reply Quote 0
            • S Offline
              strawberry 3.141 Project Sponsor Module Developer
              last edited by Aug 27, 2016, 9:27 AM

              maybe the module of paviro can give you a kickstart https://github.com/paviro/MMM-Facial-Recognition/blob/master/node_helper.js

              he’s using pyshell, you can use this as well

              Please create a github issue if you need help, so I can keep track

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              1 / 1
              • First post
                1/6
                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