Skip to content

Conversation

@4ltfour
Copy link

@4ltfour 4ltfour commented May 10, 2025

This module isn't currently working on (in my case) raspberry pi 4.
When MM is started this error message is shown:

[2025-05-10 09:03:49.013] [LOG] MMM-Buttons: RPi model Raspberry Pi 4 Model B Rev 1.5
[2025-05-10 09:03:49.022] [ERROR] Whoops! There was an uncaught exception...
[2025-05-10 09:03:49.043] [ERROR] Error: EINVAL: invalid argument, write
at Object.writeFileSync (node:fs:2426:20)
at exportGpio (/home/user/MagicMirror/modules/MMM-Buttons/node_modules/onoff/onoff.js:18:8)
at new Gpio (/home/user/MagicMirror/modules/MMM-Buttons/node_modules/onoff/onoff.js:172:36)
at Class.intializeButton (/home/user/MagicMirror/modules/MMM-Buttons/node_helper.js:89:19)
at Class.intializeButtons (/home/user/MagicMirror/modules/MMM-Buttons/node_helper.js:105:18)
at Class.socketNotificationReceived (/home/user/MagicMirror/modules/MMM-Buttons/node_helper.js:28:18)
at Socket. (/home/user/MagicMirror/js/node_helper.js:91:10)
at Socket.onevent (/home/user/MagicMirror/node_modules/socket.io/dist/socket.js:462:26)
at Socket._onpacket (/home/user/MagicMirror/node_modules/socket.io/dist/socket.js:430:22)
at /home/user/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'
}

Thanks to this stack overflow thread, I found that the pin offset for the Pi 5 is set, but not for every other Pi.

Added correct pin offset for other raspberry pis than the pi5.

Added correct pin offset for other raspberry pis than the pi5.
@4ltfour 4ltfour changed the title Update node_helper.js Corrected pin offset (for other raspis than the pi5) May 10, 2025
@4ltfour 4ltfour changed the title Corrected pin offset (for other raspis than the pi5) Corrected pin offset (for other raspis than pi5) May 10, 2025
@KristjanESPERANTO
Copy link

@MarcLandis Did you noticed this PR? 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants