• 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.

PIR Sensor ??

Scheduled Pinned Locked Moved Troubleshooting
28 Posts 5 Posters 5.4k 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.
  • M Offline
    MDLefevere
    last edited by Jul 21, 2021, 2:40 PM

    Hi everyone,

    I’ve recently started building a MagicMirror and so far i like it a lot.
    Yesterday i ordered a HC-SR501 PIR Sensor and tried to install it.

    This is were the problems started:

    I’ve tried some modules but couldn’t get it to work.
    I’ve connected my SR501 as followed:

    • PIN4 - 5V
    • PIN11 - Motion (GPIO17)
    • PIN6 - GRND

    Is there a 2021 tutorial that can direct me in the right direction?.

    Before anyone asks ;) . I’m trying for about 5 hours now and used the search box at the top :)

    S 1 Reply Last reply Jul 21, 2021, 2:46 PM Reply Quote 0
    • S Away
      sdetweil @MDLefevere
      last edited by Jul 21, 2021, 2:46 PM

      @mdlefevere does it work outside mm?

      lots of internet articles with python code to read pir and say something

      the modules generally run some python code under the covers

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      M 1 Reply Last reply Jul 21, 2021, 3:11 PM Reply Quote 0
      • M Offline
        MDLefevere @sdetweil
        last edited by Jul 21, 2021, 3:11 PM

        @sdetweil

        I’m not yet that good with Python, so some parts are a bit hard to understand.
        I’ve seen a couple of modules/posts over here and gave them a shot.

        One was working half. Screen turns of but no way to get it back on.
        This was: MMM-Pir-Sensor

        Just found a dutch how-to: here so i will give this a shot.

        S 1 Reply Last reply Jul 21, 2021, 3:13 PM Reply Quote 0
        • S Away
          sdetweil @MDLefevere
          last edited by Jul 21, 2021, 3:13 PM

          @mdlefevere said in PIR Sensor ??:

          One was working half. Screen turns of but no way to get it back on.
          This was: MMM-Pir-Sensor

          off is easy, PIR doesn’t report , so nobody there, by default, so turn off…

          make sure u have ssh enabled, so u can get in from your PC and turn display back on…

          put the sensor is not reporting, or the module config isn’t looking at the right GPIO pin .

          make it work outside MM… then it will be better

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          M 1 Reply Last reply Jul 21, 2021, 7:25 PM Reply Quote 0
          • M Offline
            MDLefevere @sdetweil
            last edited by Jul 21, 2021, 7:25 PM

            @sdetweil

            Alright i got i working with this guide.

            The only thing i’m now facing is, and i can’t understand this, that i get the message “Cable not connected” on my display.

            When i was using it in crontab with “vcgencmd display_power 0” (timebased) it put the monitor in sleep mode and the led’s of the monitor turned off.
            Now when using it in a .sh command the monitor stays on with this message.

            Do you have any idea?

            S 1 Reply Last reply Jul 21, 2021, 7:29 PM Reply Quote 0
            • S Away
              sdetweil @MDLefevere
              last edited by Jul 21, 2021, 7:29 PM

              @mdlefevere well, when u ran in cron, you ran as root

              in your script do you do

              sudo vcgencmd display_power 0
              

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              M 1 Reply Last reply Jul 21, 2021, 7:39 PM Reply Quote 0
              • M Offline
                MDLefevere @sdetweil
                last edited by Jul 21, 2021, 7:39 PM

                @sdetweil said in PIR Sensor ??:

                sudo vcgencmd display_power 0

                No i don’t
                But i tried it already and didn’t make a difference.

                Also if i sudo su and then use vcgencmd display_power 0 it’s not sleeping.

                S 1 Reply Last reply Jul 21, 2021, 7:41 PM Reply Quote 0
                • S Away
                  sdetweil @MDLefevere
                  last edited by Jul 21, 2021, 7:41 PM

                  @mdlefevere this is where I have trouble… all my displays behave as u describe…

                  turn off the hdml and then they holler about no input… , and 15 mins later power off (energy start complaince) …

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  M 1 Reply Last reply Jul 21, 2021, 8:26 PM Reply Quote 0
                  • M Offline
                    MDLefevere @sdetweil
                    last edited by Jul 21, 2021, 8:26 PM

                    @sdetweil

                    Hmm alright.
                    So do you have a “workaround”?. How do you handle this?. I just want the screen to be not on all day long when i’m just home for a couple of hours

                    S C 2 Replies Last reply Jul 21, 2021, 8:42 PM Reply Quote 0
                    • S Away
                      sdetweil @MDLefevere
                      last edited by Jul 21, 2021, 8:42 PM

                      @mdlefevere I use module hiding. never turn the display ‘off’

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

                      M 1 Reply Last reply Jul 21, 2021, 9:04 PM Reply Quote 0
                      • 1
                      • 2
                      • 3
                      • 1 / 3
                      1 / 3
                      • First post
                        1/28
                        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