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
