Read the statement by Michael Teeuw here.
Again -- MMM-Navigate can't get installed.
-
@sdetweil
Thank you for your hint, ist somehow worked, but now I get this error, when starting:[2025-02-28 16:14:25.717] [LOG] MMM-Navigate, listen on GPIO PINs (BCM): 16,20,21 [2025-02-28 16:14:25.726] [ERROR] Whoops! There was an uncaught exception... [2025-02-28 16:14:25.748] [ERROR] Error: EINVAL: invalid argument, write at Object.writeFileSync (node:fs:2367:20) at exportGpio (/home/dietpi/MagicMirror/modules/MMM-Navigate/node_modules/onoff/onoff.js:18:8) at new Gpio (/home/dietpi/MagicMirror/modules/MMM-Navigate/node_modules/onoff/onoff.js:172:36) at Class.intializeRotary (/home/dietpi/MagicMirror/modules/MMM-Navigate/node_helper.js:36:15) at Class.socketNotificationReceived (/home/dietpi/MagicMirror/modules/MMM-Navigate/node_helper.js:110:10) at Socket.<anonymous> (/home/dietpi/MagicMirror/js/node_helper.js:91:10) at Socket.onevent (/home/dietpi/MagicMirror/node_modules/socket.io/dist/socket.js:462:26) at Socket._onpacket (/home/dietpi/MagicMirror/node_modules/socket.io/dist/socket.js:430:22) at /home/dietpi/MagicMirror/node_modules/socket.io/dist/client.js:214:24 at process.processTicksAndRejections (node:internal/process/task_queues:77:11) { errno: -22, code: 'EINVAL', syscall: 'write' }
-
@crowimu ok, now i dont know. if pi5 it would be new way for gpio
but pi2 i dont know, module author would gave to help
-
@crowimu
I‘m not using this module and I do not know which of GPIO‘s you are using for your rotary encoder -
In the module‘s description the author mentioned an eventually necessary modification for some of the PI‘s:On some Raspberry Pis it is neccesary to put the following line to /boot/config.txt for the GPIO where "rotary press (SW)" is connected: gpio=19=ip,pu Background: Sets your GPIO 19 as input (ip) and pull up (pu) Change the entry according to the GPIO pin you use.
Have you double checked this?
Your error-listing shows „invalid argument , write“ in some context to GPIO…
May there is a topic for further investigation….Good luck!
Regards,
Ralf -
@rkorell said in Again -- MMM-Navigate can't get installed.:
gpio=19=ip,pu
Thanks for your help, , but it did not solve the error.
I still get:[2025-02-28 22:27:10.007] [ERROR] Whoops! There was an uncaught exception... [2025-02-28 22:27:10.011] [ERROR] Error: EINVAL: invalid argument, write at Object.writeFileSync (node:fs:2427:20) at exportGpio (/home/dietpi/MagicMirror/modules/MMM-Navigate/node_modules/onoff/onoff.js:18:8) at new Gpio (/home/dietpi/MagicMirror/modules/MMM-Navigate/node_modules/onoff/onoff.js:172:36) at Class.intializeRotary (/home/dietpi/MagicMirror/modules/MMM-Navigate/node_helper.js:36:15) at Class.socketNotificationReceived (/home/dietpi/MagicMirror/modules/MMM-Navigate/node_helper.js:110:10) at Socket.<anonymous> (/home/dietpi/MagicMirror/js/node_helper.js:91:10) at Socket.onevent (/home/dietpi/MagicMirror/node_modules/socket.io/dist/socket.js:462:26) at Socket._onpacket (/home/dietpi/MagicMirror/node_modules/socket.io/dist/socket.js:430:22) at /home/dietpi/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' } [2025-02-28 22:27:10.012] [ERROR] MagicMirror² will not quit, but it might be a good idea to check why this happened. Maybe no internet connection? [2025-02-28 22:27:10.013] [ERROR] If you think this really is an issue, please open an issue on GitHub: https://github.com/MagicMirrorOrg/MagicMirror/issues
-
@crowimu and you rebooted?
-
@sdetweil Yes, sure. I assume there must have been a change in the GPIO handling, but have not figured out where. :(
-
@crowimu
Only thing that comes in my mind that you have either put cable on wrong GPIO or cable is broken.As per default you have either to use GPIOPins: [26,20,19]//rotary cw, rotary ccw, rotary press (BCM Numbering - marked yellow in the above picture) or (if occupied) enter the correct BCM (!) numbers in config of module.
If this is all correct, module should work.
-
@crowimu Last thought - after some googeling…
Axled (the author has a thread about his module.
In one of his posting he stated
“rotation and click (Button press) uses the same library (onOff).”.“node_modules/onoff/onoff” is part of your error-listing.
So I can imagine you need this onoff -library to read the GPIO-output.
Further research on this let me assume that onoff in some kind is associated to node.js (@sdetweil for sure knows more on this than me…).At least one onoff library in this context is this one - but I’m not sure if this is the right one.
May you give it a try…edit: I’ve just checked - on my own mirror there is NO onoff directory in “MagicMirror/node_modules/”
Good luck.
Ralf -
@crowimu Found in completely different context another hint to onoff - also related to GPIO (in concrete a GPIO related implemetation of a rotary decoder).
There was a suggestionnpm install --save onoff@6.0.0
I currently only „assume“ that @6.0.0 is the version - cause the cited post is from 2021 there could be a new version.
A quick google delivers this page and this one statednpm install onoff
Will do the trick…
Good luck.
Ralf -
@rkorell Thank you and all others for the hints, however up to now I did not manage to get the ‘onoff’ and the MMM-Navigate module workingon my system.
I have recompiled onoff, installed it globally, changed the node version.
Nothing helped yet :(I have started to create a simple module for my needs to control some fuctions with a rotary encoder,
https://github.com/crowimu/MMM-RotaryNav
It’s early stage, please wish me luck. :)