Read the statement by Michael Teeuw here.
MMM-PIR-Sensor
-
Hello, I was hoping someone might be able to help. I had MMM-PIR-Sensor working on a previous magic mirror but have had to rebuild my RaspberryPi (sadly didn’t back up the SD card). I’m getting the following error after installing and have tried varies troubleshooting tips but no joy. Does anyone have any advice? I’ve tried rebuilding the module folder. Thanks in advance.
Here’s the log output:
rajdubal@raspberrypi:~/MagicMirror $ npm start
magicmirror@2.20.0 start
DISPLAY=“${DISPLAY:=:0}” ./node_modules/.bin/electron js/electron.js[19.09.2022 20:39.02.730] [LOG] Starting MagicMirror: v2.20.0
[19.09.2022 20:39.02.737] [LOG] Loading config …
[19.09.2022 20:39.02.742] [LOG] Loading module helpers …
[19.09.2022 20:39.02.745] [LOG] No helper found for module: alert.
[19.09.2022 20:39.02.763] [LOG] Initializing new module helper …
[19.09.2022 20:39.02.765] [LOG] Module helper loaded: updatenotification
[19.09.2022 20:39.02.766] [LOG] No helper found for module: clock.
[19.09.2022 20:39.02.992] [LOG] Initializing new module helper …
[19.09.2022 20:39.02.993] [LOG] Module helper loaded: calendar
[19.09.2022 20:39.03.020] [ERROR] WARNING! Could not load config file. Starting with default configuration. Error found: Error: The module ‘/home/rajdubal/MagicMirror/modules/MMM-PIR-Sensor/node_modules/epoll/build/Release/epoll.node’
was compiled against a different Node.js version using
NODE_MODULE_VERSION 93. This version of Node.js requires
NODE_MODULE_VERSION 106. Please try re-compiling or re-installing
the module (for instance, usingnpm rebuild
ornpm install
).
[19.09.2022 20:39.03.021] [LOG] Loading module helpers …
[19.09.2022 20:39.03.022] [LOG] No helper found for module: alert.
[19.09.2022 20:39.03.023] [LOG] Initializing new module helper …
[19.09.2022 20:39.03.024] [LOG] Module helper loaded: updatenotification
[19.09.2022 20:39.03.026] [LOG] No helper found for module: clock.
[19.09.2022 20:39.03.026] [LOG] Initializing new module helper …
[19.09.2022 20:39.03.028] [LOG] Module helper loaded: calendar
[19.09.2022 20:39.03.038] [ERROR] App threw an error during load
[19.09.2022 20:39.03.039] [ERROR] Error: The module ‘/home/rajdubal/MagicMirror/modules/MMM-PIR-Sensor/node_modules/epoll/build/Release/epoll.node’
was compiled against a different Node.js version using
NODE_MODULE_VERSION 93. This version of Node.js requires
NODE_MODULE_VERSION 106. Please try re-compiling or re-installing
the module (for instance, usingnpm rebuild
ornpm install
).
at process.func [as dlopen] (node:electron/js2c/asar_bundle:5:1812)
at Module._extensions…node (node:internal/modules/cjs/loader:1203:18)
at Object.func [as .node] (node:electron/js2c/asar_bundle:5:1812)
at Module.load (node:internal/modules/cjs/loader:988:32)
at Module._load (node:internal/modules/cjs/loader:829:12)
at c._load (node:electron/js2c/asar_bundle:5:13343)
at Module.require (node:internal/modules/cjs/loader:1012:19)
at require (node:internal/modules/cjs/helpers:102:18)
at bindings (/home/rajdubal/MagicMirror/modules/MMM-PIR-Sensor/node_modules/bindings/bindings.js:112:48)
at /home/rajdubal/MagicMirror/modules/MMM-PIR-Sensor/node_modules/epoll/epoll.js:7:31
[19.09.2022 20:39.03.041] [ERROR] Whoops! There was an uncaught exception…
[19.09.2022 20:39.03.046] [ERROR] Error: The module ‘/home/rajdubal/MagicMirror/modules/MMM-PIR-Sensor/node_modules/epoll/build/Release/epoll.node’
was compiled against a different Node.js version using
NODE_MODULE_VERSION 93. This version of Node.js requires
NODE_MODULE_VERSION 106. Please try re-compiling or re-installing
the module (for instance, usingnpm rebuild
ornpm install
).
at process.func [as dlopen] (node:electron/js2c/asar_bundle:5:1812)
at Module._extensions…node (node:internal/modules/cjs/loader:1203:18)
at Object.func [as .node] (node:electron/js2c/asar_bundle:5:1812)
at Module.load (node:internal/modules/cjs/loader:988:32)
at Module._load (node:internal/modules/cjs/loader:829:12)
at c._load (node:electron/js2c/asar_bundle:5:13343)
at Module.require (node:internal/modules/cjs/loader:1012:19)
at require (node:internal/modules/cjs/helpers:102:18)
at bindings (/home/rajdubal/MagicMirror/modules/MMM-PIR-Sensor/node_modules/bindings/bindings.js:112:48)
at /home/rajdubal/MagicMirror/modules/MMM-PIR-Sensor/node_modules/epoll/epoll.js:7:31 {
code: ‘ERR_DLOPEN_FAILED’
}
[19.09.2022 20:39.03.048] [ERROR] MagicMirror² will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
[19.09.2022 20:39.03.048] [ERROR] If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
[19.09.2022 20:39.03.305] [LOG] Launching application.
MESA-LOADER: failed to retrieve device information
MESA-LOADER: failed to retrieve device information
MESA-LOADER: failed to retrieve device information
MESA-LOADER: failed to open kms_swrast: /usr/lib/dri/kms_swrast_dri.so: cannot open shared object file: Permission denied (search paths /usr/lib/arm-linux-gnueabihf/dri:$${ORIGIN}/dri:/usr/lib/dri)
failed to load driver: kms_swrast
MESA-LOADER: failed to open swrast: /usr/lib/dri/swrast_dri.so: cannot open shared object file: Permission denied (search paths /usr/lib/arm-linux-gnueabihf/dri:$${ORIGIN}/dri:/usr/lib/dri)
failed to load swrast driver
^C/home/rajdubal/MagicMirror/node_modules/electron/dist/electron exited with signal SIGINT -
I’ve managed to solve this but the monitor is not turning off. I’ve read further and the module uses tvservice which isn’t support, so I presume that’s the issue.
@raspberrypi:~/MagicMirror $ sudo tvservice -o
tvservice is not supported when using the vc4-kms-v3d driver.
Similar features are available with standard linux tools
such as modetest from libdrm-tests.Does anyone have any work-arounds to get this working? I don’t recall this being an issue on my old MagicMirror. Sadly I’m not a coder so any advice would be great!
Thanks
-
MMM-PIR-Sensor is not maintained (GitHub repo has been archived) but you can use MMM-PIR-Sensor-Lite!
I assume your Raspberry Pi is running Bullseye (the latest Raspberry Pi OS)?
If yes, monitor’s management has changed since Buster but it should soon be supported in my module :grinning_face_with_big_eyes: It’s currently being tested…