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.

    MMM-Pir or MMM-PIR-Sensor

    Scheduled Pinned Locked Moved Solved Troubleshooting
    27 Posts 6 Posters 8.0k 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.
    • mumblebajM Offline
      mumblebaj Module Developer @svenpisa
      last edited by

      @svenpisa said in MMM-Pir or MMM-PIR-Sensor:

      But when I wanted to install wiring-pi I got stuck at the following step:

      That is just a usage step. You can ignore that. If you ran the npm install wiring-pi then you should be all set.

      Check out my modules at: https://github.com/mumblebaj?tab=repositories
      Check my blog-post: https://mumblebaj.xyz/

      1 Reply Last reply Reply Quote 0
      • S Offline
        svenpisa
        last edited by

        Hi Sam, I have now taken the instructions from you
        https://pimylifeup.com/raspberry-pi-motion-sensor/ and have gone through them step by step.

        I am using pin 15 (Gripo22)

        I then edited the motion_sensor.py and entered pir_sensor = 15.
        I simply ignored the piezo =7 entry as I only want to connect the PIR. So I really only entered pir_sensor = 15.

        I have now entered the following in Config.js

        		{
        			module: 'MMM-Pir',
        			position: 'top_left',
        			config: {
        				debug: false,
        				delay: 1 * 60 * 1000,
        				turnOffDisplay: true,
        				mode: 1,
        				ecoMode: true,
        				displayCounter: true,
        				displayBar: true,
        				displayStyle: "SemiCircle",
        				displayLastPresence: true,
        				lastPresenceTimeFormat: "LL H:mm",
        				mode6_gpio: 22,
        				mode6_clearGpioValue: true,
        				pir_gpio: 22,
        				pir_reverseValue: false,
        				xrandrForceRotation: "normal",
        				wrandrForceRotation: "normal"
        			}
        		},
        

        But I don’t have the feeling that the PIR is really reacting to my movements. I can stand in front of it or tap it with my finger, but the screen doesn’t wake up.
        But strangely enough, the screen does wake up from time to time, which I don’t think is due to the PIR.

        where is my mistake or am I using the following entry incorrectly? What is the purpose of the two entries?

        				mode6_gpio: 22,
        				mode6_clearGpioValue: true,
        				pir_gpio: 22,
        				pir_reverseValue: false,
        

        ab099d81-9a1b-4071-a274-25f977e44361-image.png

        As you can see the countdown runs down and goes back to full time but I have no idea why. I don’t think it’s because of the PIR… I can fiddle with it as much as I like… The time doesn’t change

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

          @svenpisa that is why I wanted you to run the python script outside of MagicMirror to confirm the PIR sensor is working correctly, detecting presence

          if it doesn’t work without MagicMirror it won’t work WITH MagicMirror either.

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          1 Reply Last reply Reply Quote 0
          • S Offline
            svenpisa
            last edited by

            @sdetweil

            62e173cd-c4e4-4b8a-81ca-b777a8b9d593-image.png

            I don’t understand that. I have done it exactly according to the tutorial and via

            sudo python motion_sensor.py
            

            to test the Pir. I could not recognize a new line immediately after a movement, but a line is generated every 5 seconds.
            Since the tutorial says that the sensor waits 5 seconds until it queries again, I would have thought that it would work since the 1 is specified.

            But now an entry is created directly every 5 seconds

            I am open to all modules and settings to get the PIR up and running. If only I knew how to do it…

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

              @svenpisa I don’t know exactly the problem…

              the 5 second thing is in the code, not the PIR

              it sounds like the pin number you are using is wrong, or the code is expecting no heat to be 0 and heat to be 1 ( pull up)

              there are three different pin numbering orders and they are all different. sequential on the pi, and two others I can never remember.

              until you get the python script showing motion/no motion, it cannot work under MagicMirror

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              1 Reply Last reply Reply Quote 0
              • S Offline
                svenpisa
                last edited by

                Just for fun, I have now entered a different GPIO pin in sensor.py and started sudo python motion_sensor.py. Nothing happens here. So I have already selected the correct pin. But as you say, it’s probably the script.
                How can I uninstall the motion sensor again? Simply delete the folder or is there a clean way?
                I guess I’ll have to look for another solution, won’t I?

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

                  @svenpisa yes, just delete the folder

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

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

                    @svenpisa

                    see these

                    https://forums.raspberrypi.com/viewtopic.php?t=328633

                    https://projects.raspberrypi.org/en/projects/physical-computing/11

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    1 Reply Last reply Reply Quote 0
                    • A Offline
                      Andrei.Leahu
                      last edited by

                      I have the same problem. The Module is not working, I tried so many parameter changes. Besides that I tried to read the values of the PIR with a python script and is working. To power on/off the monitor via console is working too. I don’t know what to try else

                      S 1 Reply Last reply Reply Quote 0
                      • S Offline
                        sdetweil @Andrei.Leahu
                        last edited by

                        @Andrei-Leahu can you show the info from npm start.
                        Right after
                        starting application

                        Sam

                        How to add modules

                        learning how to use browser developers window for css changes

                        A 1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 3
                        • 1 / 3
                        • 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