MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    1. Home
    2. rkorell
    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 0
    • Topics 22
    • Posts 346
    • Groups 0

    Posts

    Recent Best Controversial
    • RE: Need "correct" version of node-libgpiod ....

      @sdetweil yes, indeed …

      posted in Troubleshooting
      R
      rkorell
    • RE: Need "correct" version of node-libgpiod ....

      @sdetweil Dear Sam,
      just FYI: I’ve just identified that my main problem is NOT the version mismatch but a major change in node-libgpiod’s handling of GPIO-ressources.
      This was the main reason for mal-function of PIR sensor detection. “Version” was a side effect, not root-cause.
      I’m nearly done with this and it seems that it will work as intended…

      Thanks again for your support!

      Regards,
      Ralf

      posted in Troubleshooting
      R
      rkorell
    • RE: Need "correct" version of node-libgpiod ....

      @sdetweil OK; thanks.
      I will stop to handle these mismatches.
      Will try to get the MM-Module runnable .
      Console/terminal runs with node may not be necessary …
      Thanks anyway for your kind support!
      Ralf

      posted in Troubleshooting
      R
      rkorell
    • RE: Need "correct" version of node-libgpiod ....

      @sdetweil Dear Sam,
      thanks again for this long explanation!

      My versions (if I interpret correctly) doesn’t mismatch :-(

      0|MagicMir | ### SYSTEM:   manufacturer: ; model: ; virtual: false
      0|MagicMir | ### OS:       platform: linux; distro: Debian GNU/Linux; release: 12; arch: arm64; kernel: 6.12.20+rpt-rpi-2712
      0|MagicMir | ### VERSIONS: electron: 32.2.7; used node: 20.18.1; installed node: 20.18.1; npm: 10.8.2; pm2: 5.4.3
      0|MagicMir | ### OTHER:    timeZone: Europe/Berlin; ELECTRON_ENABLE_GPU: undefined 
      

      So I’m not sure at all, what to do.

      pi@MagicMirrorPi5:~ $ n list
      node/20.18.1
      
      

      Does show up exact this version, as well.
      Where are my problems from ???
      Thanks a LOT for any idea!

      Ralf

      posted in Troubleshooting
      R
      rkorell
    • RE: Need "correct" version of node-libgpiod ....

      @sdetweil
      Dear Sam, OK, thanks for this.
      Not fully understood…

      How can I

      1. figure out, how my mirror is started? (looooong ago I‘ve used your install script and (if I remember correctly) I‘ve answered „yes“ to „do you want automatically start your mirror at system startup“ - or something similar. - Never took care about, what is done - it worked (and still works)…)
      2. double check the above „VERSIONS“ - message - is this message in logfile?
      3. can I get „keeping the node versions synched“?

      Thanks for further advise!
      Warmest regards,
      Ralf

      posted in Troubleshooting
      R
      rkorell
    • RE: Need "correct" version of node-libgpiod ....

      @sdetweil said

      you should know if you run
      node serveronly, then the bytecode has to match the nodejs standalone engine version

      OK, thanks.
      It seems that rebuild have corrected the error for the module.
      When I try to run a node-command in the shell (terminal) then I get an similar error message as above.
      Is this caused by your explanation part above?
      Different versions needed for either terminal or inside mirror?
      Can you tell me HOW the magic mirror is started (when I have used your install script)?

      Is there a way to test something which had to run in the mirror (like the module) on commandline?

      To illustrate what I mean:
      I have a very short test-script test-gpiod.js

      // test-gpiod.js , Aug 2025, Dr. Ralf Korell
      const { Chip } = require("node-libgpiod");
      try {
        const chip = new Chip(0);
        console.log("Chip label:", chip.getChipLabel());
      } catch (err) {
        console.error("Error loading chip:", err);
      }
      

      which I try to run with

      node test-gpiod.js
      

      But this produces error message:

      /home/pi/MagicMirror/modules/MMM-PresenceScreenControl/node_modules/bindings/bindings.js:121
      throw e;
      ^
      
      Error: The module '/home/pi/MagicMirror/modules/MMM-PresenceScreenControl/node_modules/node-libgpiod/build/Release/node-libgpiod.node'
      was compiled against a different Node.js version using
      NODE_MODULE_VERSION 128. This version of Node.js requires
      NODE_MODULE_VERSION 115. Please try re-compiling or re-installing
      the module (for instance, using `npm rebuild` or `npm install`).
      at Module._extensions..node (node:internal/modules/cjs/loader:1586:18)
      at Module.load (node:internal/modules/cjs/loader:1288:32)
      at Module._load (node:internal/modules/cjs/loader:1104:12)
      at Module.require (node:internal/modules/cjs/loader:1311:19)
      at require (node:internal/modules/helpers:179:18)
      at bindings (/home/pi/MagicMirror/modules/MMM-PresenceScreenControl/node_modules/bindings/bindings.js:112:48)
      at Object.<anonymous> (/home/pi/MagicMirror/modules/MMM-PresenceScreenControl/node_modules/node-libgpiod/lib/misc.js:1:37)
      at Module._compile (node:internal/modules/cjs/loader:1469:14)
      at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
      at Module.load (node:internal/modules/cjs/loader:1288:32) {
      code: 'ERR_DLOPEN_FAILED'
      }
      
      Node.js v20.18.1
      

      Thanks for any help!
      Warmest regards,
      Ralf

      posted in Troubleshooting
      R
      rkorell
    • RE: Need "correct" version of node-libgpiod ....

      @sdetweil Dear Sam,
      thanks for this information.
      Can you please enlighten me?
      I can read what you wrote and I got a light idea - but didn’t understand …

      I definitely have used your install script.
      what is @electron and
      what correlation is between node-libgpiod and @electron ? and what will this

      ../../node_modules/.bin/electron-rebuild
      

      do?

      Sorry for these questions - I would like to understand, what happens.

      If this is “neccessary” I will try to automate this for others with a postinstall script.
      Thanks for your effort!
      warmest regards,
      Ralf

      posted in Troubleshooting
      R
      rkorell
    • Need "correct" version of node-libgpiod ....

      Dear Gurus!
      May one of you got an idea…
      I’m on my way (looooonnnnggggg planned) to re-implement bugsounet’s MMM-Pir, and I am nearly done…
      My last hurdle seems to be the way he has handled the PIR sensor itself. I am not aware if the second way (python script) ever had worked but I stuck with the implementation of the GPIO handler with node-libgpiod.
      This works fine in my environment as-is without any problems.
      Needed dependeny is node-libgpiod.
      I’ve installed this with

      npm install node-libgpiod
      

      In my own - brand new - module folder - Ran without any error.
      But when mirror is restarted I found an error in logfile, stating that there is a version mismatch…

      0|MagicMir | [2025-08-06 21:13:55.302] [ERROR] 2025-08-06T21:13:55 <error> [MMM-Pir] [LIB] [PIR] [GPIOD] Error: The module '/home/pi/MagicMirror/modules/MMM-PresenceScreenControl/node_modules/node-libgpiod/build/Release/node-libgpiod.node'
      0|MagicMir | was compiled against a different Node.js version using
      0|MagicMir | NODE_MODULE_VERSION 115. This version of Node.js requires
      0|MagicMir | NODE_MODULE_VERSION 128. Please try re-compiling or re-installing
      0|MagicMir | the module (for instance, using `npm rebuild` or `npm install`). (/home/pi/MagicMirror/modules/MMM-PresenceScreenControl/pirLib.js:163 PIR.gpiodDetect) 
      

      My Node Version is:

      pi@MagicMirrorPi5:~ $ node -v
      v20.18.1
      

      Information of Mirror:

      pm2 info MagicMirror
       Describing process with id 0 - name MagicMirror 
      ┌───────────────────┬──────────────────────────────────────────┐
      │ status            │ online                                   │
      │ name              │ MagicMirror                              │
      │ namespace         │ default                                  │
      │ version           │ 2.31.0-develop                           │
      │ restarts          │ 40                                       │
      │ uptime            │ 59s                                      │
      │ script path       │ /home/pi/MagicMirror/installers/mm.sh    │
      │ script args       │ N/A                                      │
      │ error log path    │ /home/pi/.pm2/logs/MagicMirror-error.log │
      │ out log path      │ /home/pi/.pm2/logs/MagicMirror-out.log   │
      │ pid path          │ /home/pi/.pm2/pids/MagicMirror-0.pid     │
      │ interpreter       │ bash                                     │
      │ interpreter args  │ N/A                                      │
      │ script id         │ 0                                        │
      │ exec cwd          │ /home/pi                                 │
      │ exec mode         │ fork_mode                                │
      │ node.js version   │ N/A                                      │
      │ node env          │ N/A                                      │
      │ watch & reload    │ ✔                                        │
      │ unstable restarts │ 0                                        │
      │ created at        │ 2025-08-06T19:42:31.312Z                 │
      └───────────────────┴──────────────────────────────────────────┘
       Divergent env variables from local env 
      ┌────────────────┬─────────────────────────────────────┐
      │ SSH_CONNECTION │ 172.23.56.21 53109 172.23.56.157 22 │
      │ TERM           │ xterm                               │
      │ SHLVL          │ 2                                   │
      │ XDG_SESSION_ID │ 4                                   │
      │ SSH_CLIENT     │ 172.23.56.21 53109 22               │
      │ OLDPWD         │ /home/pi/MagicMirror/splashscreen   │
      └────────────────┴─────────────────────────────────────┘
      
      

      An “idea” is that there is a mismatch between node version in my terminal and node version used by mirror.
      Mirror gave me no information about it’s version…

      Maybe I’m completely on a wrong way…
      Can somebody please guide me?

      Thanks a LOT!

      Warmest regards,
      Ralf

      posted in Troubleshooting
      R
      rkorell
    • RE: Cannot access mirror

      @sdetweil …

      ps -ef | ssh
      usage: ssh [-46AaCfGgKkMNnqsTtVvXxYy] [-B bind_interface]
                 [-b bind_address] [-c cipher_spec] [-D [bind_address:]port]
                 [-E log_file] [-e escape_char] [-F configfile] [-I pkcs11]
                 [-i identity_file] [-J [user@]host[:port]] [-L address]
                 [-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port]
                 [-Q query_option] [-R address] [-S ctl_path] [-W host:port]
                 [-w local_tun[:remote_tun]] destination [command [argument ...]]
      

      …
      I guess you’ve meant a kind of grep …
      From my (very basic) understanding your command tries to pipe process list to ssh …

      BTW: confirmed. Switching the power supply eliminates failure…
      I’m connected whol day long …

      Warmest regards,
      Ralf

      posted in Troubleshooting
      R
      rkorell
    • RE: Cannot access mirror

      @sdetweil ,

      ps -ef | grep ssh
      

      edit: fixed command above

      doesn’t work…
      As you can read from this statement: I’m now able to connect and this is remotely …
      It SEEMS I’ve identified the root cause (I’m not that sure but connection is stable longer than the last times. I’s pretty slow but doesn’t disconnect nearly immediatly).

      I’v just a little bit disassebled and connected another power supply …

      This currently fixes issues …
      Be curious how long this lasts…
      But because ssh as well as VNC were disconnected - insufficient power was the most probable explanation
      (despite I doesn’t have ANY clue why this happens! The power supply is 6months old and I cannot imagine any reason why “insufficient” power causes this behaviour: only disrupt “ingoing” requests…

      • If anybody have an idea - highly welcome!!!)
      posted in Troubleshooting
      R
      rkorell
    • 1
    • 2
    • 3
    • 4
    • 5
    • 34
    • 35
    • 2 / 35