MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord
    1. Home
    2. sharmmoh1983
    3. Topics
    MagicMirror² v2.20.0 is available! For more information about this release, check out this topic.
    S
    • Profile
    • Following 0
    • Followers 0
    • Topics 6
    • Posts 24
    • Best 0
    • Controversial 0
    • Groups 0

    Topics created by sharmmoh1983

    • S

      Communication from node helper to module: Taking too long
      Development • • sharmmoh1983

      7
      0
      Votes
      7
      Posts
      1845
      Views

      S

      I am calling :

      Node_helper:

      self.sendSocketNotification(‘SONUS’, sonus);

      Module:

      socketNotificationReceived: function (notification, payload) {
      receivedNotification(this,notification,payload);
      }

      It is taking seven seconds from Node helper to Module

    • S

      UpdateDom not working
      Development • • sharmmoh1983

      22
      0
      Votes
      22
      Posts
      6823
      Views

      S

      @j-e-f-f It is kind of working now… I will test it thoroughly for two days and will revert in case of any issue

      @j-e-f-f @Sean thank a lot for your prompt replies and efforts

    • S

      Application stops running and causes RPI3 reboot
      Hardware • • sharmmoh1983

      4
      0
      Votes
      4
      Posts
      1148
      Views

      J

      @sharmmoh1983 There could be any number of things going on. You have an exercise in trying to narrow down the cause ahead of you.

      As a test, disable MagicMirror from auto-starting, and just let your Pi run. If the restart still happens, then I’d say you either have a physical problem with the Raspberry Pi (again, check to ensure you’re using a good power supply - minimum 2.5 amps for the Pi 3 – when in doubt, order the official one), or maybe you have something else installed that is causing the issue.

      If the restart is not observed without MM running, I might start with just the default config and run that for a while to see if the issue persists. If it doesn’t, then one of the modules you are using is likely the culprit, and you can try adding them back one by one until you see the problem again. Also be sure to check logs (pm2 logs mm) to see if anything was captured before the Pi restarted.

    • S

      Cannot create complex Json structure in module
      Development • • sharmmoh1983

      1
      0
      Votes
      1
      Posts
      783
      Views

      S

      I am trying to create complex json object in module

      const commands = { 'hello': function () { console.log('You will obey'); }, '(give me) :flavor ice cream': function (flavor) { console.log('Fetching some ' + flavor + ' ice ceam for you sr') }, 'turn (the)(lights) :state (the)(lights)': function (state) { console.log('Turning the lights', (state == 'on') ? state : 'off') } }

      But commands are turning out be some other objects than the correct JSON message to be passed in following method

      annyang.addCommands(commands);

      But same is happening correctly in node_helper

    • S

      Pass module object to node helper
      Development • • sharmmoh1983

      3
      0
      Votes
      3
      Posts
      1460
      Views

      S

      I don’t want to pass config but the complete module object (this). Which is not working?
      How to do that?

    • S

      Mirror installation failing
      Troubleshooting • • sharmmoh1983

      2
      0
      Votes
      2
      Posts
      1349
      Views

      S

      info it worked if it ends with ok
      1 verbose cli [ ‘/opt/nodejs/bin/node’, ‘/usr/local/bin/npm’, ‘start’ ]
      2 info using npm@3.10.8
      3 info using node@v6.9.1
      4 verbose run-script [ ‘prestart’, ‘start’, ‘poststart’ ]
      5 info lifecycle magicmirror@2.1.2~prestart: magicmirror@2.1.2
      6 silly lifecycle magicmirror@2.1.2~prestart: no script for prestart, continuing
      7 info lifecycle magicmirror@2.1.2~start: magicmirror@2.1.2
      8 verbose lifecycle magicmirror@2.1.2~start: unsafe-perm in lifecycle true
      9 verbose lifecycle magicmirror@2.1.2~start: PATH: /opt/nodejs/lib/node_modules/npm/bin/node-gyp-bin:/home/pi/MagicMirror/node_modules/.bin:/opt/nodejs/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/b$
      10 verbose lifecycle magicmirror@2.1.2~start: CWD: /home/pi/MagicMirror
      11 silly lifecycle magicmirror@2.1.2~start: Args: [ ‘-c’, ‘sh run-start.sh’ ]
      12 silly lifecycle magicmirror@2.1.2~start: Returned: code: 1 signal: null
      13 info lifecycle magicmirror@2.1.2~start: Failed to exec start script
      14 verbose stack Error: magicmirror@2.1.2 start: sh run-start.sh
      14 verbose stack Exit status 1
      14 verbose stack at EventEmitter. (/opt/nodejs/lib/node_modules/npm/lib/utils/lifecycle.js:255:16)
      14 verbose stack at emitTwo (events.js:106:13)
      14 verbose stack at EventEmitter.emit (events.js:191:7)
      14 verbose stack at ChildProcess. (/opt/nodejs/lib/node_modules/npm/lib/utils/spawn.js:40:14)
      14 verbose stack at emitTwo (events.js:106:13)
      14 verbose stack at ChildProcess.emit (events.js:191:7)
      14 verbose stack at maybeClose (internal/child_process.js:877:16)
      14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
      15 verbose pkgid magicmirror@2.1.2
      16 verbose cwd /home/pi/MagicMirror
      17 error Linux 4.4.50-v7+
      18 error argv “/opt/nodejs/bin/node” “/usr/local/bin/npm” “start”
      19 error node v6.9.1
      20 error npm v3.10.8
      21 error code ELIFECYCLE
      22 error magicmirror@2.1.2 start: sh run-start.sh
      22 error Exit status 1
      23 error Failed at the magicmirror@2.1.2 start script ‘sh run-start.sh’.

      @sharmmoh1983 said in Mirror installation failing:

      npm start failing on raspberry pi
      node -v
      v6.9.1

    • 1 / 1