MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord

    UNSOLVED PIR sensor problem

    Troubleshooting
    4
    6
    236
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      sultan.y last edited by

      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

      S 1 Reply Last reply Reply Quote 0
      • S
        sdetweil @sultan.y last edited by

        @sultan-y in raspios latest , bullseye, that function, tvservice, is no longer provided.,

        Sam

        Create a working config
        How to add modules

        1 Reply Last reply Reply Quote 0
        • S
          sultan.y last edited by

          is there a workaround?

          S G 2 Replies Last reply Reply Quote 0
          • S
            sdetweil @sultan.y last edited by

            @sultan-y there are other approaches to turn off monitor

            some of the newer pie modules support multiple ways

            Sam

            Create a working config
            How to add modules

            B 1 Reply Last reply Reply Quote 1
            • B
              bugsounet @sdetweil last edited by sdetweil

              @sdetweil said in PIR sensor problem:

              some of the newer pir modules support multiple ways

              I love this style 😉


              I am not a reference in this forum
              I am not a magician
              I'm just a developer

              Please DON'T ADS ANY of My Modules There !

              Follow new support of 4th party modules on https://forum.bugsounet.fr

              1 Reply Last reply Reply Quote 0
              • G
                gandalf20000 @sultan.y last edited by

                @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 and XAUTHORITY 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.

                1 Reply Last reply Reply Quote 0
                • 1 / 1
                • First post
                  Last post
                Enjoying MagicMirror? Please consider a donation!
                MagicMirror created by Michael Teeuw.
                Forum managed by Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
                This forum is using NodeBB as its core | Contributors
                Contact | Privacy Policy