UNSOLVED PIR sensor problem
I am trying to add a PIR sensor to the MM
i have wired it to a raspberry pi but having a problem executing the funciton control the lcd
getting an error, an idea
sudo chmod u+s /opt/vc/bin/tvservice && sudo chmod u+s /bin/chvt
chmod: cannot access ‘/opt/vc/bin/tvservice’: No such file or directory
@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
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/1instead of using the tvservice command (I run it in a script started by crontab at reboot).
/usr/bin/xrandr -display :0.0 --autobefore the vcgencmd command
- added user Pi to the gpio group:
sudo usermod -a -G gpio pi, and I
sudo vi /etc/environment
My mirror uses a DVI to HMI output, but using
XAUTHORITYas above solved the issues I had.
Btw, I use
/usr/bin/chvt 6 /usr/bin/chvt 7
/usr/bin/vcgencmd display_power 1command, but that was used prior to using Bullseye as well.