Hi all,
After using my mirror for some some, I would like to add some custom features using the MMM-Buttons modules, forked / developed by @sdetweil
After downloading and installing the module, pressing a button does not trigger the desired actions.
Instead, some “beautiful” logs are coming after restarting my MagicMirror using pm2:
2025-06-08 00:52:32.659] [ERROR] Whoops! There was an uncaught exception...
[2025-06-08 00:52:32.667] [ERROR] Error: EINVAL: invalid argument, write
at Object.writeFileSync (node:fs:2426:20)
at exportGpio (/home/pi/MagicMirror/modules/MMM-Buttons/node_modules/onoff/onoff.js:18:8)
at new Gpio (/home/pi/MagicMirror/modules/MMM-Buttons/node_modules/onoff/onoff.js:172:36)
at Class.intializeButton (/home/pi/MagicMirror/modules/MMM-Buttons/node_helper.js:74:19)
at Class.intializeButtons (/home/pi/MagicMirror/modules/MMM-Buttons/node_helper.js:90:18)
at Class.socketNotificationReceived (/home/pi/MagicMirror/modules/MMM-Buttons/node_helper.js:26:18)
at Socket.<anonymous> (/home/pi/MagicMirror/js/node_helper.js:91:10)
at Socket.onevent (/home/pi/MagicMirror/node_modules/socket.io/dist/socket.js:462:26)
at Socket._onpacket (/home/pi/MagicMirror/node_modules/socket.io/dist/socket.js:430:22)
at /home/pi/MagicMirror/node_modules/socket.io/dist/client.js:214:24
at process.processTicksAndRejections (node:internal/process/task_queues:85:11) {
errno: -22,
code: 'EINVAL',
syscall: 'write'
}
I’m using the latest MagicMirror release.
Do you have any tips, where I can have a look?
Thanks :)