• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

I am looking for a working PIR Modul/function

Scheduled Pinned Locked Moved Solved Troubleshooting
9 Posts 6 Posters 484 Views 5 Watching
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.
  • K Offline
    Klinge
    last edited by Klinge Feb 11, 2025, 2:58 PM Feb 11, 2025, 2:57 PM

    Hello,

    I am looking for a working PIR module / function to turn off/on my monitor.

    Every PIR module I have tried is either deprecated, abandoned or an error appears during installation.
    I have tried the following modules
    MMM-Pir
    MMM-PIR
    MMM-PIR-Sensor-Lite
    MMM-PIR-Sensor
    MMM-SimplePIR

    and this

    https://www.putorius.net/using-pir-sensor-for-motion-detection.html
    

    The one from putorius.net got me the furthest. But unfortunately the command to switch the monitor on/off works

    vcgencmd display_power 0 > /dev/null
    vcgencmd display_power 1 > /dev/null
    

    doesn´t work for me.

    I would be really grateful if you could recommend a working PIR module or maybe you have an advice to turn on/off my monitor instead of the both commands.

    Thank you very much.
    Klinge

    K S 2 Replies Last reply Feb 11, 2025, 3:10 PM Reply Quote 0
    • K Offline
      KristjanESPERANTO Module Developer @Klinge
      last edited by Feb 11, 2025, 3:10 PM

      @Klinge MMM-Universal-Pir seems to be the newest. Have you checked that?

      1 Reply Last reply Reply Quote 0
      • S Away
        sdetweil @Klinge
        last edited by Feb 11, 2025, 9:45 PM

        @Klinge see https://forum.magicmirror.builders/post/123892

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        K 1 Reply Last reply Feb 16, 2025, 10:37 AM Reply Quote 1
        • K Offline
          Klinge @sdetweil
          last edited by Klinge Feb 16, 2025, 10:38 AM Feb 16, 2025, 10:37 AM

          @sdetweil @KristjanESPERANTO Now I finally had time to look into this problem further.

          Thank you very much for your tips. The module works great.

          But… I have installed the monitor vertically. This means that the MMM has to be displayed rotated by 90 degrees. When I start the MMM, it is displayed as intended. But as soon as the monitor is switched off and on again by the module, the display is no longer rotated. In other words, the MMM is then displayed as if the monitor is installed horizontally.

          Incidentally, I set the rotated display via the Raspberry OS menu.

          Do any of you have a tip on how to keep the display vertical even after movement has been recognised?

          Many thanks in advance.

          S H 2 Replies Last reply Feb 16, 2025, 1:50 PM Reply Quote 0
          • S Away
            sdetweil @Klinge
            last edited by sdetweil Feb 16, 2025, 2:20 PM Feb 16, 2025, 1:50 PM

            @Klinge yes, the commands used will need to be told about the rotated screen. i don’t remember what those are

            if you are running the first release of bookworm with the wayland compositor

            wl-randr

            might be the command to sleep/wake up

            see wl-randr --help

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            1 Reply Last reply Reply Quote 0
            • M Offline
              myfingersarecold
              last edited by Feb 16, 2025, 7:55 PM

              what about SimplePIR doesnt work? did you add any issues to the github?

              i wrote it so interested to know what doesn’t work, since its currently running on my mirror.

              1 Reply Last reply Reply Quote 0
              • H Offline
                htilburgs @Klinge
                last edited by Feb 16, 2025, 9:01 PM

                @Klinge
                I had the same issue with MMM-Universal-Pir.
                The maker had made a comment ABOUT It in the readme, with the correct commands after mine e-mail.
                Read the readme and you are How to do.

                (still trying to learn JS, but not afraid to ask) ☺

                K 1 Reply Last reply Feb 17, 2025, 1:11 PM Reply Quote 1
                • K Offline
                  Klinge @htilburgs
                  last edited by Klinge Feb 17, 2025, 2:39 PM Feb 17, 2025, 1:11 PM

                  Thank you all for your tips.

                  Now I could realize it with the parameter

                  --transform 90
                  

                  My complete configuration is

                                            {
                                              module: "MMM-Universal-Pir",
                                              position: "top_right",
                                              config: {
                                                gpioCommand: "gpiomon -r -b gpiochip0 17",
                                                onCommand: "wlr-randr --output HDMI-A-1 --on --transform 90",
                                                offCommand: "wlr-randr --output HDMI-A-1 --off",
                                                deactivateDelay: 180 * 1000,
                                          }
                                            },
                  

                  and it works.

                  G 1 Reply Last reply Feb 17, 2025, 11:01 PM Reply Quote 1
                  • K Klinge has marked this topic as solved on Feb 17, 2025, 1:11 PM
                  • G Offline
                    gonzonia @Klinge
                    last edited by Feb 17, 2025, 11:01 PM

                    @Klinge If you find you need an alterantive- https://github.com/Tom-Hirschberger/MMM-GPIO-Notifications/blob/master/examples/HC-SR501/HC-SR501-GPIO4-README-EN.md

                    1 Reply Last reply Reply Quote 0
                    • 1 / 1
                    1 / 1
                    • First post
                      5/9
                      Last post
                    Enjoying MagicMirror? Please consider a donation!
                    MagicMirror created by Michael Teeuw.
                    Forum managed by Sam, technical setup by Karsten.
                    This forum is using NodeBB as its core | Contributors
                    Contact | Privacy Policy