Read the statement by Michael Teeuw here.
Module error after updating - MMM-Pir: Pir Error detected: EINVAL: invalid argument, write
-
Hi,
I’m running on a Raspberry Pi 4…
jazz@magicmirror:~ $ cat /sys/firmware/devicetree/base/model;echo Raspberry Pi 4 Model B Rev 1.5Please note that my account is a member of the gpio group…
jazz@magicmirror:~ $ groups jazz adm dialout cdrom sudo audio video plugdev games users input render netdev lpadmin gpio i2c spiI’ve had a magic mirror up for several months now. Due to the recent reports of problems being discovered with OpenSSH, I decided to do a full system update (that is, I did a ‘sudo apt update’ followed by a ‘sudo apt full-upgrade’) of the system. Note that i’m running raspbian 12…
jazz@magicmirror:~ $ cat /etc/os-release|grep -e NAME -e VERSION PRETTY_NAME="Raspbian GNU/Linux 12 (bookworm)" NAME="Raspbian GNU/Linux" VERSION_ID="12" VERSION="12 (bookworm)" VERSION_CODENAME=bookwormI then updated the magic mirror software (‘git pull && npm run install-mm’). I then updated my modules, including MMM-Pir (https://github.com/bugsounet/MMM-Pir) via ‘npm run update’ and ‘npm run rebuild’. Everything proceeded as expected, but afterwards when I restarted, I was presented with an error in the notifications section of the magic mirror display saying “MMM-Pir: Pir Error detected: EINVAL: invalid argument, write”.
Note that i’ve made no changes to the wiring of the PIR sensor or to the module configuration, which looks like…
{ module: 'MMM-Pir', position: 'top_left', config: { debug: false, delay: 2 * 60 * 1000, mode: 10, displayCounter: false, displayBar: false, displayStyle: "Text", displayLastPresence: true, lastPresenceTimeFormat: "LL H:mm", pir_mode: 0, pir_gpio: 17, pir_reverseValue: false, mode6_gpio: 20, mode6_clearGpioValue: true, xrandrForceRotation: "normal", wrandrForceRotation: "normal", wrandrForceMode: "1920x1080", touchMode: 0 } }Note that if I do a ‘pm2 logs magic-mirror’, here are some of the last entries in /home/jazz/.pm2/logs/magic-mirror-error.log…
0|magic-mi | [4347:0702/141938.410247:ERROR:gbm_wrapper.cc(74)] Failed to get fd for plane.: No such file or directory (2) 0|magic-mi | [4347:0702/141938.410629:ERROR:gbm_wrapper.cc(257)] Failed to export buffer to dma_buf: No such file or directory (2) 0|magic-mi | [2024-07-02 14:19:40.939] [ERROR] [MMM-Pir] [LIB] [PIR] Error: EINVAL: invalid argument, write 0|magic-mi | /home/jazz/MagicMirror/node_modules/electron/dist/electron exited with signal SIGINTAnyone have any ideas on how to resolve the issue? I’ve tried changing the module ‘mode’ values to 9 and 2, but 10 seems to be the right value for my raspberry pi.
Regards,
Jazz
-
@Jazz said in Module error after updating - MMM-Pir: Pir Error detected: EINVAL: invalid argument, write:
pir_mode: 0,
Sorry, I have forget to update ReadMe for this error
Generally happen with x64 system (Rpi 4 and Rpi 5)Available pir_mode: pir_mode: 0 - use onoff library (For Raspberry Pi 3b+ and 4) pir_mode: 1 - use python script with RPI.GPIO library (For Raspberry Pi 3b+ and 4) pir_mode: 2 - use python script with gpiozero library (For Raspberry Pi 5, not tested on other Raspberry Pi)So, Can you try
pir_mode: 1,orpir_mode: 2, -
@bugsounet Changing pir_ mode from 0 to 1 has fixed the problem :)
Thanks for your help.
Regards,
Jazz
-
J Jazz has marked this topic as solved on
-
-
Hi everyone,
I just can’t get it to work guys. Please help.
GPIO setup:
VIN - Pin2
OUT - Pin6
GND - Pin11Configuration:
module: ‘MMM-Pir’,
position: ‘top_left’,
config: {
debug: false,
delay: 1 * 30 * 1000,
mode: 1,
displayCounter: true,
displayBar: true,
displayStyle: “SemiCircle”,
displayLastPresence: true,
lastPresenceTimeFormat: “LL H:mm”,
xrandrForceRotation: “normal”,
wrandrForceRotation: “normal”,
touchMode: 2,
pir_gpio: 17,
pir_mode: 1,I have been playing around with all variations and have tested 3 sensors. Not sure what I’m missing.
Thank you for your support! -
@Laca44 does it work outside
MagicMirror?there are python scripts to test operation.
google search
python pir sensor test -
@sdetweil said in Module error after updating - MMM-Pir: Pir Error detected: EINVAL: invalid argument, write:
python pir sensor test
I’m a newbie and this helped a lot! Thank you! -
@Laca44 were you able to solve the problem?
-
@sdetweil Yes it helped in resolving the issue. I still need to understand what troubleshooting actually helped.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login