Read the statement by Michael Teeuw here.
MMM-PIR Busy Issue
-
on boot, gpioinfo shows “GPIO21” unused input active-high. first start of npm run start:wayland works as intended.
After CTRL-Q, gpioinfo shows “GPIO21” “lg” input active-high [used pull-down]. Successive npm run start:wayland shows GPIO Busy error.
-
@siujd2001 in your config you have:
Pir: { mode: 1, gpio: 21 // gpio: 4 // <–connected to 4 }
Did you try with
mode: 0
?Mode 1 uses an external python script and since that’s an external executable, there’s always a chance that the script has locked up the GPIO so when you start MMM-Pir again, it tries to start a new version of the script.
-
Switching to mode:0 does now appear to work, in that there is no gpio error and ctrl-q and restarts don’t throw an error. So that’s great! Thank you.
Screen blanks but does not turn all the way off, so that’s still an issue.
-
@siujd2001 you hadn’t mentioned anything about screen.
I recently switched to using
start:wayland
also and found that in MMM-Pir, theddcutil
mode worked best. Screen control in general seems to vary on RPi depending on the monitor you have. -
Thank you. I will look at ddcutil mode next and update.