Read the statement by Michael Teeuw here.
PIR sensor problem
-
@sultan-y in raspios latest , bullseye, that function, tvservice, is no longer provided.,
-
is there a workaround?
-
@sultan-y there are other approaches to turn off monitor
some of the newer pie modules support multiple ways
-
@sdetweil said in PIR sensor problem:
some of the newer pir modules support multiple ways
I love this style ;)
-
@sultan-y
To get the PIR sensor working with MM on the currently latest Raspberry PI OS Bullseye you can use/usr/bin/vcgencmd display_power 0/1
instead of using the tvservice command (I run it in a script started by crontab at reboot).I also
- added
/usr/bin/xrandr -display :0.0 --auto
before the vcgencmd command - added user Pi to the gpio group:
sudo usermod -a -G gpio pi
, and I - added
XAUTHORITY=/home/pi/.Xauthority
here:sudo vi /etc/environment
My mirror uses a DVI to HMI output, but using
xrandr
andXAUTHORITY
as above solved the issues I had.Btw, I use
/usr/bin/chvt 6 /usr/bin/chvt 7
after the
/usr/bin/vcgencmd display_power 1
command, but that was used prior to using Bullseye as well. - added