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

    Leobaillard

    @Leobaillard

    2
    Reputation
    603
    Profile views
    6
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    Leobaillard Unfollow Follow

    Best posts made by Leobaillard

    • RE: sendSocketNotification from node_helper to Module

      Thanks! Key sent ;)

      posted in Development
      L
      Leobaillard
    • RE: sendSocketNotification from node_helper to Module

      Waow! I was completely off track! It now works perfectly. Thanks a lot!

      posted in Development
      L
      Leobaillard

    Latest posts made by Leobaillard

    • RE: access filesystem

      As it turns out, I didn’t read enough: I had to use the node_helper to access the filesystem. Sorry for digging out the thread.

      posted in Development
      L
      Leobaillard
    • RE: access filesystem

      Hi,

      I have the same problem. Someone has an idea?

      posted in Development
      L
      Leobaillard
    • Error: ENOENT: no such file or directory, open 'package.json'

      Hi!

      I’ve tried to install a new MagicMirror on a brand new Rpi3 with Raspbian Pixel using the automatic script bash -c "$(curl -sL https://raw.githubusercontent.com/MichMich/MagicMirror/master/installers/raspberry.sh)".

      I had an error when pm2 was trying to be installed, saying that it couldn’t find the specified OS when doing: sudo su -c "env PATH=$PATH:/usr/bin pm2 startup linux -u pi --hp /home/pi". No worries there, I re-ran it with the right option and it worked. The problem is that when I start the mirror with: pm2 start MagicMirror, I get this error over and over again in the logs:

      0|MagicMir | Error: ENOENT: no such file or directory, open 'package.json'
      0|MagicMir |     at Error (native)
      0|MagicMir |     at Object.fs.openSync (fs.js:641:18)
      0|MagicMir |     at Object.fs.readFileSync (fs.js:509:33)
      0|MagicMir |     at Object. (/home/pi/MagicMirror/js/app.js:15:32)
      0|MagicMir |     at Module._compile (module.js:570:32)
      0|MagicMir |     at Object.Module._extensions..js (module.js:579:10)
      0|MagicMir |     at Module.load (module.js:487:32)
      0|MagicMir |     at tryModuleLoad (module.js:446:12)
      0|MagicMir |     at Function.Module._load (module.js:438:3)
      0|MagicMir |     at Module.require (module.js:497:17)
      

      I checked, in the mm.sh starting the script, there is the right cd. Also, when I manually start the mirror with: DISPLAY=:0 npm start, it works fine.

      Any ideas?

      posted in Troubleshooting
      L
      Leobaillard
    • RE: sendSocketNotification from node_helper to Module

      Waow! I was completely off track! It now works perfectly. Thanks a lot!

      posted in Development
      L
      Leobaillard
    • RE: sendSocketNotification from node_helper to Module

      Thanks! Key sent ;)

      posted in Development
      L
      Leobaillard
    • sendSocketNotification from node_helper to Module

      Hi!

      I’m creating a new topic rather than dig up this old one:
      Re: Unable to sendSocketNotification from node_helper to Module

      I’m experiencing the same symptoms. I created a module based on yo-less’s MMM-nextbike (https://github.com/yo-less/MMM-nextbike) to pull bike sharing station information from JCDecaux. I basically took his code and adapted the fetching functions.

      The actual fetching works as can be seen in the logs when I dump the fetched object, so that doesn’t seem to be the issue. Once the stations are pulled, I send a socket notification to the module from the node_helper to notify that the data is ready to be displayed.

      The problem is that this notification never reaches the module. The console.log call supposed to display an incoming notification is never fired.

      I suspect that it might be a dumb error on my part, but I can’t figure it out… Here is my code:

      • https://gitlab.leoserveur.org/leobaillard/MMM-JCD-Bikes/blob/master/MMM-JCD-Bikes.js
      • https://gitlab.leoserveur.org/leobaillard/MMM-JCD-Bikes/blob/master/node_helper.js

      Here is a sample configuration:

                      {
                              module: 'MMM-JCD-Bikes',
                              position: 'top_left',
                              config: {
                                      title: 'Stations Velo\'v',
                                      apiKey: '<>',
                                      contract: 'Lyon',
                                      stations: [3003,3087,3085,3099,6035,6036,6037,6041,6042,6043],
                              }
                      },
      

      For the API key, you can generate one here: https://developer.jcdecaux.com/#/signup or I can PM you mine.

      Thanks in advance!

      posted in Development
      L
      Leobaillard