MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    1. Home
    2. raywo
    3. Posts
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.
    R
    Offline
    • Profile
    • Following 0
    • Followers 3
    • Topics 4
    • Posts 49
    • Groups 1

    Posts

    Recent Best Controversial
    • RE: [MMM-NowPlayingOnSpotify] – Display the currently on Spotify playing song

      @philreis This is unfortunately not possible. The waySpotify works is that no song is actually ever stopped but it is paused. That is why the API can’t differentiate between stopped or paused songs. The only way to force the display to show nothing is by quitting the Spotify client.

      posted in Entertainment
      R
      raywo
    • RE: p5.js and Magic Mirror

      @leejaeuk You should create a GitHub repository for your code so that someone can have a look at it.

      posted in General Discussion
      R
      raywo
    • RE: [MMM-NowPlayingOnSpotify] – Display the currently on Spotify playing song

      @schlachtkreuzer6 You need to enter both your secret ID and client secret in the input boxes and then click “Authorize my app!”. After that the message in Step 3 should disappear and show you exactly what you need to copy in your config.js.

      You need to make sure that you put the shown callback url in the app’s setting on Spotify.

      posted in Entertainment
      R
      raywo
    • RE: p5.js and Magic Mirror

      @leejaeuk The getScript function is responsible for making p5.js available to your code. Thats why it reads like

      getScripts: function() {
          return [
            "https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.6.0/p5.js"
          ];
        },
      

      Keep in mind that p5.js runs in the client. That’s why you need it in your module’s js file.

      The easiest way to incorporate your sound frequency code would be to insert it in the makeSketch function.

      makeSketch: function(conf) {
        return function(pFive) {
          YOUR CODE HERE
        }
      }
      

      Your code will have a setup and a draw function. These need to be prefixed with pFive. Just look at my code to get the idea.

      posted in General Discussion
      R
      raywo
    • RE: [MMM-NowPlayingOnSpotify] – Display the currently on Spotify playing song

      @tidus5 Controlling volume and playback should be feasible. But changing the playlist? That would require an interface and a lot of interaction. That kind of defeats the purpose of a MagicMirror.

      Actually I don’t know whether I will work on this control features but feel free to fork the project and add as much as you want.

      posted in Entertainment
      R
      raywo
    • RE: p5.js and Magic Mirror

      @leejaeuk Have look at my GameOfLife Module. It uses p5.js.

      posted in General Discussion
      R
      raywo
    • RE: [MMM-NowPlayingOnSpotify] – Display the currently on Spotify playing song

      @goprojojo The width of the cover art is determined by the width of the column you placed the module in. It is set to 100%. You can change it by adjusting the width property of the .NPOS_albumCover class in css/styles.css.

      posted in Entertainment
      R
      raywo
    • RE: [MMM-NowPlayingOnSpotify] – Display the currently on Spotify playing song

      @tidus5 what should that version do?

      posted in Entertainment
      R
      raywo
    • RE: [MMM-NowPlayingOnSpotify] – Display the currently on Spotify playing song

      @BananaBro glad to hear that it is working now.

      posted in Entertainment
      R
      raywo
    • RE: [MMM-NowPlayingOnSpotify] – Display the currently on Spotify playing song

      @BananaBro sounds weird. Do you have a free or a premium account?

      posted in Entertainment
      R
      raywo
    • RE: MMM-PublicTransportHafas – Public transport information for all stations known to Deutsche Bahn

      @gekberlin It is possible that no real-time data are shown in my module. But as far as I remember there is a module MMM-PublicTransportBerlin which should give you better information.
      If you don’t mind doing a bit of hacking you can alter my source code. Go to line 5 in HafasFetcher.js And change the part after the equal sign to require('hafas-client/p/vbb'). That way you are using the VBB specific queries which may or may not include real-time data.

      posted in Transport
      R
      raywo
    • RE: [MMM-NowPlayingOnSpotify] – Display the currently on Spotify playing song

      @marcnlx Awesome idea! Maybe you can add a screenshot.

      posted in Entertainment
      R
      raywo
    • RE: Spotify

      I’ve created a module which displays what you are currently listening to on Spotify.

      More details on the the module’s own thread. Please use this thread also if you have comments or questions.

      posted in Development
      R
      raywo
    • [MMM-NowPlayingOnSpotify] – Display the currently on Spotify playing song

      Here’s another module I created. It displays the song you are currently listening to on Spotify. It doesn’t matter whether you play the song on your desktop or on your smart phone. Also you don’t need any third party app to connect to Spotify. All you need is included in the module.

      You can find it on GitHub. A detailed description how to get it working is included.

      A song is playing and showCoverArt is set to false. A song is playing and showCoverArt is set to true.

      Feel free to tell me what you think.

      posted in Entertainment
      R
      raywo
    • RE: MMM-PublicTransportHafas – Public transport information for all stations known to Deutsche Bahn

      For all those of you who like this module, it would be nothing without the data from the hafas-client. Please consider supporting the author on his Patreon page.

      posted in Transport
      R
      raywo
    • RE: MM docker container problem with mac and linux

      @bastilimbach Good addition to the docs. Thank you!
      Maybe you should remove "192.168.2.1/120", "192.168.2.110" as it applies only to my configuration. Or you should explain it better.

      posted in Troubleshooting
      R
      raywo
    • RE: [MMM-FlightsAbove] Problem receiving and seing JSON from node_helper

      @E3V3A console.log() is a standard Javascript function it works anywhere. Log.info() and so on are functions from the MagicMirror’s module system. So they will only work in the module file.

      node_helper.js is executed in the server context. Any console output is therefore on the server’s log.

      The module file is executed in the client context (the browser). So console output from the module file is logged in the browser console.

      posted in Development
      R
      raywo
    • RE: [MMM-FlightsAbove] Problem receiving and seing JSON from node_helper

      @E3V3A This function works just fine:

      radarPing: function () {
            radar(53.05959, 12.52388, 51.98161, 14.29552)
              .then((flights) => {
                this.sendSocketNotification("NEW_DATA", flights); //self?
                console.log("New radar data: ");
                console.log(flights);
              })
              .catch(function (error) {
                //console.log("ERROR:")
                console.log(error);
              });
          },
      

      It receives data, prints them on the mirror’s log and sends it to the module. The module is receiving the data and logs them to the browser’s console. And your table is populated too.

      posted in Development
      R
      raywo
    • RE: [MMM-FlightsAbove] Problem receiving and seing JSON from node_helper

      @yawns That is not correct. console.log() works fine in your module. But the output is not shown on the log of your mirror but on the browser’s log. You need to open the developer tools in your browser to see it.

      posted in Development
      R
      raywo
    • RE: [MMM-FlightsAbove] Problem receiving and seing JSON from node_helper

      @E3V3A Actually the API doesn’t return json. It returns an array of Javascript objects. You can very easy iterate over the array and access any properties of the objects in the array with dot syntax.

      const radar = require("flightradar24-client/lib/radar");
      
      radar(53, 13, 52, 14)
        .then((flights) => {
          flights.forEach((flight) => {
            console.log("id: " + flight.id + ", origin: " + flight.origin);
          })
        })
        .catch((err) => {
          console.error(err);
          process.exit(1);
        });
      
      posted in Development
      R
      raywo
    • 1 / 1