MagicMirror Forum

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

    UNSOLVED PIR-Sensor - not detecting 2nd "motion" - MM stays dark

    Troubleshooting
    3
    7
    412
    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
      Kastore last edited by Kastore

      Hello everyone,

      i just updated my MM to 2.17 and also my modules. Everything works fine (finally) except the MMM-PIR-Sensor module. ( https://github.com/paviro/MMM-PIR-Sensor )

      The module did detect my first motion turned on and after the set amount of time (60s) turned the screen off. The issue is, that after moving again the module does deactivate the PowerSaving anymore…
      HOWEVER after some time of the MM running it did detect the motion again… Now the opossite issue happens: It is not turning “off” anymore after the 60s…

      Anyone got an idea on what to do?
      .

      Code in use:

      {
      module: 'MMM-PIR-Sensor',
      config: {
      sensorPIN: 17,
      powerSaving: true,
      powerSavingDelay: 60,
      },
      
      D Fozi 2 Replies Last reply Reply Quote 0
      • D
        DeeZett @Kastore last edited by DeeZett

        Hi @kastore,
        I use this Python script mentioned here 2.2 Using PIR-Script for 2 years and this method works very well.

        Regards,
        Dee.

        1 Reply Last reply Reply Quote 0
        • Fozi
          Fozi Project Sponsor @Kastore last edited by

          @kastore Check following things:

          1. the attribute in you config is spelled
          sensorPIN
          

          It should be

          sensorPin
          
          1. Check the correct wiring on the GPIO. You have to use the BCM notation. In you config you assign pin 17. In BCM notation it is the 6th pin from top on the left row.

          If you took pin #17, then it is the 3.3V pin. It is 9th pin from top on the left row. this won’t work.

          HowTo: Replace PIR Sensor with a RCWL-0516 Microwave Sensor

          K 1 Reply Last reply Reply Quote 0
          • K
            Kastore @Fozi last edited by

            @fozi
            After two days of the programm running it SEEMS that the program is using “minutes” instead of “seconds” for the power off…

            Because it does work now for some reason but the “turn off” is masively delayed

            Fozi 1 Reply Last reply Reply Quote 0
            • Fozi
              Fozi Project Sponsor @Kastore last edited by

              @kastore I am very confident that the module is using seconds, not minutes, to determine the powerSavingDelay. This is what I recognize from the code in node_helper.js. As the module is still not working as expected, there is still something going on.

              My proposal is to delete the module and re-install it from scratch AND follow the 5 points as described in the installation description on Github. Click.

              Further, try to use a different pin than 17.
              Here is how I wired my PIR-sensor and my config:

              MM_PIR_sensor_wireing.png

              {
              			module: "MMM-PIR-Sensor",
              			disabled: false,
              			//position: "top_bar",
              			config: {
              				sensorPin: 4,
              				powerSavingDelay: 90, // (seconds) how long the monitor will be turned on
              				//supportCEC: true,
              				//presenceIndicator: "fa-bullseye",
              				//presenceIndicatorColor: "red",
              
              			}
              		},
              

              Another posibility is that the WiFi module on the RPi is causing interferences, which lead to the problem you have. A ferrite bead over the sensor wires or a low pass filter can help. It is not uncommon that the WiFi module can be the culprit.

              In the last days there was a disussion about false positives with the PIR sensor. Maybe you check that thread, too.

              HowTo: Replace PIR Sensor with a RCWL-0516 Microwave Sensor

              K 2 Replies Last reply Reply Quote 0
              • K
                Kastore @Fozi last edited by Kastore

                This post is deleted!
                1 Reply Last reply Reply Quote 0
                • K
                  Kastore @Fozi last edited by

                  @fozi

                  So I reinstalled the whole module and tried to get it back to work. I swapped to the GPIO_4 but unfortunately the Sensor is now not responding at all 😕

                  Plugin it back to GPIO_17 it instantly works .

                  HOWEVER - the config is still on 4 but it is accepting the pin 17…

                  So there is something wrong but i am inclinded to “leave it as be” … it kinda works as i want, alltough i cant “control” it as intended by the module

                  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