Solved [PIR] [CORE] Error: EINVAL: invalid argument, write
-
I’ve made several attempts to fix this over the last week, but to no avail. Not sure if this is an issue with EXT-Screen or EXT-Pir. I ran a script outside of MM and confirmed that the PIR sensor is working properly. I’ve run the update, rebuild command, for both modules, but nothing seems to work.
Any help is greatly appreciated. Thanks again for all of your work with this!Error:
[ERROR] [PIR] [CORE] Error: EINVAL: invalid argument, writeSystem:
32-bit Bookworm running on Pi5 with X11
Linux ClientV5 6.1.0-rpi8-rpi-v8 #1 SMP PREEMPT Debian 1:6.1.73-1+rpt1 (2024-01-25) aarch64 GNU/Linux
Linux version 6.1.0-rpi8-rpi-v8 (debian-kernel@lists.debian.org) (gcc-12 (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) #1 SMP PREEMPT Debian 1:6.1.73-1+rpt1 (2024-01-25)Node v20.8.0
npm v10.1.0Config: { module: 'EXT-Screen', disabled: false, position: 'top_right', animateIn: "flipInX", animateOut: "flipOutX", config: { debug: false, animateBody: true, autoDimmer: true, delay: 2 * 100 * 1000, mode: 9, xrandrForceRotation: "normal", wrandrForceRotation: "normal", displayCounter: true, displayBar: true, displayStyle: "Text", displayLastPresence: false, lastPresenceTimeFormat: "LL H:mm", displayAvailability: true, detectorSleeping: true, gpio: 18, clearGpioValue: true, sound: false, touchMode: 0, ON: [], OFF: [] } }, { disabled: false, module: 'EXT-Pir', config: { debug: false, gpio: 18, reverseValue: false } },
-
Hi,
Unfortunately, I have already noticed this with pi5 users.
I can’t fix this problem because I don’t have a pi5It seems that the kernel does not initialize the GPIO driver on startup
-
Thank you for your quick response. Apologies in advance, as my knowledge of GPIO libraries and driver are pretty limited. I was messing around with this and successfully installed it on the PI5: RPPAL - Raspberry Pi Peripheral Access Library https://github.com/golemparts/rppal and specific to PI5 GPIO compatibility is https://github.com/golemparts/rppal/blob/master/examples/gpio_status.rs
I’m not sure if this is something that would work so that all of the code doesn’t have to be rewritten in the module for the different pinctrl and the different Pi5 libraries. I also realize that it’s not as simple as dropping a bunch of .rs files into the EXT-Pir folder.
If you’re interested in a PI5, I’d be happy to help with that! -
humm, I don’t think that it the better solution because it’s writed in
Rust
Let’s using native (and installed by default) tools likegpiozero
just tested with
pi5
and workspi@raspberrypi:~/MagicMirror/modules/EXT-Pir $ python test2.py detected No motion detected detected No motion detected detected No motion detected
-
I have the PIR Sensor working with this module <censured>
For PI5 you need to add the wlr-randr commands in the active and deactivate nodehelper -
I have the PIR Sensor working with this module <censured>
I’m working around about a new code for EXT-Pir there
For PI5 you need to add the wlr-randr commands in the active and deactivate nodehelper
It’s the job of
EXT-Screen
and it’s already codedIn all case
EXT-Pir
v1.5.0 works in my pi5
I will deploy it in master branch it very soon! -
Ah very nice, cool you got a PI5 now, hopefully there will be a fix for ext-detector too (removed my thread for crash on pi5 because I accidentally put private google calendars in log screenshot)
Just awesome work, love it more an more, will do another donation for sure -
@bugsounet Thank you very much for your solution! This works now.
-