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 - put your mirror to sleep if not used

    Scheduled Pinned Locked Moved Troubleshooting
    126 Posts 37 Posters 235.7k Views 20 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.
    • paviroP Offline
      paviro @Bangee
      last edited by paviro

      @Bangee Sure in the node_helper.js find the comment Detected movement and add console.log() so that it looks like the following:

      gpio.wiringPiISR(this.config.sensorPIN, gpio.INT_EDGE_BOTH, function(delta) {
              console.log(gpio.digitalRead(self.config.sensorPIN))
              ....
      }
      

      We're all stories in the end. Just make it a good one, eh?

      – The Doctor

      BangeeB 1 Reply Last reply Reply Quote 0
      • J Offline
        jrleeman @paviro
        last edited by

        @paviro I dug out a junk-box PIR sensor. Everything is installed and no white-screen problems, but this sensor only puts out an “on” signal for about a second after motion is detected. Any way to make the mirror stay awake for some time (say 2-5 minutes) with that timer being reset on any motion signal? Then if nobody is in front of the mirror for awhile it goes off. Currently mine flickers off and on, not the ideal behavior.

        paviroP 1 Reply Last reply Reply Quote 0
        • paviroP Offline
          paviro @jrleeman
          last edited by

          @jrleeman you should be able to change that by modifying the PIR-Sensor mine has the possibility to exactly adjust that :)

          We're all stories in the end. Just make it a good one, eh?

          – The Doctor

          J 1 Reply Last reply Reply Quote 0
          • MichMichM Offline
            MichMich
            last edited by

            For the record: node 6.1.0 is supported.

            paviroP 1 Reply Last reply Reply Quote 0
            • paviroP Offline
              paviro @MichMich
              last edited by

              @MichMich is it? Not sure I think one dependencies of THIS plugin does not support it, yet :/

              We're all stories in the end. Just make it a good one, eh?

              – The Doctor

              MichMichM 1 Reply Last reply Reply Quote 0
              • MichMichM Offline
                MichMich @paviro
                last edited by

                @paviro ah sorry. Throught you were talking about mm2 in general.

                1 Reply Last reply Reply Quote 0
                • BangeeB Offline
                  Bangee Module Developer @paviro
                  last edited by

                  @paviro i’ve added the console.log as you described, but there is no log output in firebug. where can I check this log elsewhere?

                  paviroP 1 Reply Last reply Reply Quote 0
                  • paviroP Offline
                    paviro @Bangee
                    last edited by

                    @Bangee it is node output! You have to check the log of the backend :)

                    We're all stories in the end. Just make it a good one, eh?

                    – The Doctor

                    BangeeB 1 Reply Last reply Reply Quote 0
                    • BangeeB Offline
                      Bangee Module Developer @paviro
                      last edited by

                      @paviro sorry, i’m still a node noob… how can I check this? ;-)

                      paviroP 1 Reply Last reply Reply Quote 0
                      • paviroP Offline
                        paviro @Bangee
                        last edited by

                        @Bangee how do you start your mirror?

                        We're all stories in the end. Just make it a good one, eh?

                        – The Doctor

                        BangeeB 1 Reply Last reply Reply Quote 0
                        • BangeeB Offline
                          Bangee Module Developer @paviro
                          last edited by

                          @paviro

                          pm2 start mm
                          
                          paviroP 1 Reply Last reply Reply Quote 0
                          • paviroP Offline
                            paviro @Bangee
                            last edited by paviro

                            @Bangee in that case read the wiki ;)

                            We're all stories in the end. Just make it a good one, eh?

                            – The Doctor

                            1 Reply Last reply Reply Quote 0
                            • BangeeB Offline
                              Bangee Module Developer
                              last edited by paviro

                              Funny…

                              pi@raspberrypi:~ $ tail -f /home/pi/.pm2/logs/mm-out-0.log
                              GIPO Status:1
                              GIPO Status:0
                              GIPO Status:1
                              GIPO Status:0
                              GIPO Status:1
                              GIPO Status:0
                              GIPO Status:1
                              GIPO Status:0
                              GIPO Status:1
                              GIPO Status:0
                              
                              1 Reply Last reply Reply Quote 0
                              • J Offline
                                jrleeman @paviro
                                last edited by

                                @paviro The sensor I’ve got doesn’t have any adjustments on it. I suppose I can make little timed latch in hardware to add on, but it could be nice to do in software too.

                                paviroP 1 Reply Last reply Reply Quote 0
                                • paviroP Offline
                                  paviro @jrleeman
                                  last edited by paviro

                                  @jrleeman feel free to send a pull request! :) the sensor I use cost 3€ do I don’t really see a reason to do it in software of the sensors are that cheap :smiley:

                                  We're all stories in the end. Just make it a good one, eh?

                                  – The Doctor

                                  J 1 Reply Last reply Reply Quote 0
                                  • J Offline
                                    jrleeman @paviro
                                    last edited by

                                    @paviro Fair enough. I’ll see which I find easier, code or hardware. :smiley:

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

                                      @paviro
                                      Thanks for making this module. I am experiencing the same issue as @incubik as my screen turns white when I start the MM. My PIR sensor works as I tested it on the R Pi and with some LEDs and my breadboard. I have reinstalled the MM and this module but I can’t seem to get it working. I have also no idea what causes this. Do you have any thought on this?
                                      Thanks

                                      paviroP 1 Reply Last reply Reply Quote 0
                                      • paviroP Offline
                                        paviro @sjuulbosmans
                                        last edited by

                                        @sjuulbosmans white and black screens are mostly caused by wrong configuration. Check your web inspector!

                                        We're all stories in the end. Just make it a good one, eh?

                                        – The Doctor

                                        1 Reply Last reply Reply Quote 0
                                        • I Offline
                                          incubik
                                          last edited by

                                          I’ve tried to check the web inspector but when the screen is white… problems ahead —> The web inspector doesn’t pop up.

                                          I’ve tried this without installing the PIR Sensor module and the web inspector works but again when the screen is in “white mode” doesn’t.

                                          Any thoughts?

                                          paviroP 1 Reply Last reply Reply Quote 0
                                          • paviroP Offline
                                            paviro @incubik
                                            last edited by

                                            @incubik try the serveronly mode (see the wiki) :)

                                            We're all stories in the end. Just make it a good one, eh?

                                            – The Doctor

                                            1 Reply Last reply Reply Quote 0

                                            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                            With your input, this post could be even better 💗

                                            Register Login
                                            • 1
                                            • 2
                                            • 3
                                            • 4
                                            • 5
                                            • 6
                                            • 7
                                            • 2 / 7
                                            • 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