Read the statement by Michael Teeuw here.
Issues with MMM-PIR
-
@ingo916
Config{ module: 'MMM-Pir', position: 'top_left', config: { debug: false, delay: 2 * 60 * 1000, turnOffDisplay: true, mode: 10, ecoMode: true, displayCounter: false, //displayCounter: true, displayBar: false, //displayBar: true, displayStyle: "Circle", displayLastPresence: false, //displayLastPresence: true, lastPresenceTimeFormat: "LL H:mm", mode6_gpio: 20, mode6_clearGpioValue: true, pir_gpio: 22, //pir_gpio: 21, pir_reverseValue: false, xrandrForceRotation: "normal", wrandrForceRotation: "normal" } }, -
Thanks for your patience, this is what i get.
admin@garyspi:~ $ groups
admin adm dialout cdrom sudo audio video plugdev games users input render netdev lpadmin gpio i2c spi
admin@garyspi:~ $ -
your config looks good thus far, if you´re not getting it to run you can try my solution which is currently running like a charm
I installed it with MMM-Pir-Sensor-light and changed the code to use wayland,
to toggle the display on Pi5 this is working on a fresh OS installWAYLAND_DISPLAY=“wayland-1” wlr-randr --output HDMI-A-1 --off
WAYLAND_DISPLAY=“wayland-1” wlr-randr --output HDMI-A-1 --onpossible outputs HDMI-A-1 (the one right next to usb-c), HDMI-A-2
If you monitor turns back on by itself after ~10 secs add “vc4.force_hotplug=1”(1=hmdi1 / 2=hdmi2 / 3=both) to the end of your /boot/firmware/cmdline.txt without creating a new line
All I did was change the command in activate and deactivate display function in the node_helper.js and added the cmdline parameter (dont forget to reboot)
-
@eyesallin
I’m beginning to think that all this is Pi 5 related.
Also changing to mode 10 as previously stated screws with the weather modules which don’t load. Remove MMM-PIR from config and everything works fine.
It doesn’t help that I’m completely new to all this. -
@eyesallin yes it´s an “issue” with the pi5 as the os is now using wayland as graphical environment instead of x11 which was used forever, a lot of tools are written for it and now need to be updated to work with wayland. You will find a lot of scenarios where there is no updated tool or alternative for the pi5 atm. The switch was done end of 2023 so it´s very new.
-
@schris88
Thx for the info, I guess a lot of the modules require reworking for the Pi 5.
Unfortunately I do not have the ability, totally new to the Pi and programming. -
Is anyone able to get MMM-PIR successfully running on Bookworm? Feels like every option I’ve tried to turn my screen on and off after the PIR senses movement has been a struggle with no results. I’ve confirmed with tests that my sensor is working, but all the old ways to trigger the display on-off behaviour seem to not be running. I’m on a Pi4 running 12 with Wayland.
Unfortunately I can’t go back to 11 because 10 worked like a dream, and 11 for some reason i could never successfully troubleshoot would refuse to load a taskbar in. Hardware seems to be working fine again in 12…
I can post my config if it helps. Thanks for the hard work, bugsounet. :)
-
@ChanceTime bookworm on pi4 or 5 uses a different window manager, Wayland, and requires different commands
you can go back to xorg by using the raspi-config command
-
Hi
I have had MMM-Pir module running perfectly for months. When I updated my RPi 3B+ to the latest updates this week the module produce the same error message
Pir Error Detected: EINVAL: invalid argument, write
I have tried reinstalling the module but no luck.
Any help greatly appreciated
Thanks
-
@diccon which MMM-PIR?
-
Hi, check
pir_modefeature in readme readmeby default
pir_modeis on mode 0
With pi 4 and pi 5, you can haveEINVAL: invalid argument, writeerror
In this case
you have to use with pi 4:pir_mode: 1,
with pi 5pir_mode: 2, -
Hi
I am using Bugsounet’s version
Thanks for the help
-
@bugsounet thank you changing to pir_mode 1 fixed the problem. Just for awareness I am running on a RPi 3 B+ Rev 1.3 hence why I didn’t do this sooner.
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