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.

    Motion Detector

    Scheduled Pinned Locked Moved Utilities
    213 Posts 38 Posters 488.2k Views 39 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.
    • H Offline
      Hawking @strawberry 3.141
      last edited by

      @strawberry-3.141
      Thanks for your help. Unfortunately I don’t find any information about media access or how to activate it in the Midori browser…

      @mongo116
      I cant’ help you why the motiondetector does not turn off your screen (it also does not work in my case). However, how does the config.js with the additional time-out section that results in an error look like? At least in my case a section like

      {
                         module: 'motiondetector',
                         config: {
                                 timeout: 5*60*1000
                         }
                 },
      

      gave no complaints about errors in the config file (for a complete config-file see my post above).

      M 1 Reply Last reply Reply Quote 0
      • M Offline
        mongo116 Module Developer @Hawking
        last edited by

        @Hawking Thank you, that works. Monitor is still not turning off, but that’s one issue off the list :)

        1 Reply Last reply Reply Quote 0
        • M Offline
          mongo116 Module Developer
          last edited by

          Just to add to this, I have checked that the camera is working and motion is detected by testing with https://github.com/pageauc/motion-track. All appears to be working as expected. No motion is detected unless I move in front of the camera.

          strawberry 3.141S 1 Reply Last reply Reply Quote 0
          • strawberry 3.141S Offline
            strawberry 3.141 Project Sponsor Module Developer @mongo116
            last edited by

            @mongo116 maybe the value that gets returned is different than the value set in the module, so he always tries to activate the monitor?

            Please create a github issue if you need help, so I can keep track

            1 Reply Last reply Reply Quote 0
            • M Offline
              mongo116 Module Developer
              last edited by

              I’ve got the motion detection now working - had to add bcm2835-v4l2 to \etc\modules - restarted and screen now turns off after defined period and on when motion is detected. This is really great, and I’m nearly there - but… Now when the motiondetector is running, the RPi3 temp just goes up and up and up, until it eventually crashes/freezes and I have to pull the power as RPi is completely unresponsive. If I remove motiondetector from MagicMirror, temperature stays stable and no crashing. Is there something I can change in the config to sort out this performance issue?

              strawberry 3.141S 1 Reply Last reply Reply Quote 0
              • strawberry 3.141S Offline
                strawberry 3.141 Project Sponsor Module Developer @mongo116
                last edited by

                @mongo116 it looks like https://github.com/alexyak/motiondetector/blob/master/diff-cam-engine.js#L37 it creates 10 images per second and compares it to the previous which is probably the intensive part

                Please create a github issue if you need help, so I can keep track

                M 1 Reply Last reply Reply Quote 1
                • M Offline
                  mongo116 Module Developer @strawberry 3.141
                  last edited by

                  @strawberry-3.141 Thanks for that. I’ve amended this slightly so will keep an eye on it. Might also have a look at putting on some heatsinks to see if that helps.

                  One (hopefully!) final question. When the monitor is turned off, is there a way to ‘freeze’ the other modules, so they stop running for the duration that the monitor is off? This would hopefully help with performance, in that the other modules are no longer running.

                  strawberry 3.141S 1 Reply Last reply Reply Quote 0
                  • strawberry 3.141S Offline
                    strawberry 3.141 Project Sponsor Module Developer @mongo116
                    last edited by

                    @mongo116 every module has a suspend and resume function, but nearly none module that I’m aware of has implemented stopping intervals and fetching data in there. so calling those functions wouldn’t make a difference then just hiding it on the display.

                    Furthermore I doubt that it would really make a difference if you’re not using another cpu intensive task like voice recognition …

                    Please create a github issue if you need help, so I can keep track

                    1 Reply Last reply Reply Quote 0
                    • R Offline
                      reaper81
                      last edited by

                      sorry for my noob-Question but is there an setup or a explaination how to use the three .js files from alexeyak on github? normaly there is an readme-file.

                      M 1 Reply Last reply Reply Quote 0
                      • M Offline
                        mongo116 Module Developer @reaper81
                        last edited by

                        @reaper81 I had the following in my config.js:

                                      {
                                        module: 'motiondetector',
                                        config: {
                                        timeout: 5*60*1000
                                           }
                                       },
                        

                        You will need to ensure that the 3 files are located in the modules/motiondetector folder.

                        I ended up using a different method for motion detection though, as tvservice kept stopping working.

                        1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 17
                        • 18
                        • 19
                        • 20
                        • 21
                        • 22
                        • 19 / 22
                        • 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