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 622 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

      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

      KristjanESPERANTOK S 2 Replies Last reply Reply Quote 0
      • KristjanESPERANTOK Offline
        KristjanESPERANTO Module Developer @Klinge
        last edited by

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

        1 Reply Last reply Reply Quote 0
        • S Offline
          sdetweil @Klinge
          last edited by

          @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 Reply Quote 1
          • K Offline
            Klinge @sdetweil
            last edited by Klinge

            @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 htilburgsH 2 Replies Last reply Reply Quote 0
            • S Offline
              sdetweil @Klinge
              last edited by sdetweil

              @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

                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
                • htilburgsH Offline
                  htilburgs @Klinge
                  last edited by

                  @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 Reply Quote 1
                  • K Offline
                    Klinge @htilburgs
                    last edited by Klinge

                    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 Reply Quote 1
                    • K Klinge has marked this topic as solved on
                    • G Offline
                      gonzonia @Klinge
                      last edited by

                      @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
                      • First post
                        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