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

Motion Detector

Scheduled Pinned Locked Moved Utilities
213 Posts 38 Posters 434.0k 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.
  • I Offline
    in_a_days
    last edited by Jan 7, 2017, 7:08 PM

    Well… so much for that theory lol. I just got the ENOMEM error from Motion Detector.

    0_1483816079700_error.jpg

    What ship would bear me ever back across so wide a Sea?

    1 Reply Last reply Reply Quote 0
    • D Offline
      danielis
      last edited by Jan 7, 2017, 8:52 PM

      I had the same issue.
      For me was the solution to increase the capture interval time from 100ms to 1000ms.
      With the default value of 100ms the overall systemload is to high and one of the two electron processes will use after some time around 85% of the memory. At that value the system slows down extremely and the memory swap process will take all cpu ressources while trying to free up physical memory.
      And then anything can happen … (white screen, unresponsive, ENOMEM exceptions, …)

      Go to motiondetector.js and search for this code part:

      DiffCamEngine.init(
      {
      video: video,
      motionCanvas: canvas,

      Add the following line to change the default capture interval time of 100ms to 1000ms:

      DiffCamEngine.init(
      {
      video: video,
      captureIntervalTime: 1000,
      motionCanvas: canvas,

      Observe the two electron processes and they will not reach memory values higher than 30%.

      J T I 3 Replies Last reply Jan 7, 2017, 9:37 PM Reply Quote 2
      • J Offline
        jdahli1 @danielis
        last edited by Jan 7, 2017, 9:37 PM

        @danielis Fingers crossed, this appears to be working! The mirror has turned on and off a dozen times now with no processor or RAM issues.

        1 Reply Last reply Reply Quote 0
        • T Offline
          trividar @danielis
          last edited by Jan 7, 2017, 11:54 PM

          @danielis woooow its working now since one hour!! thank you!!!

          1 Reply Last reply Reply Quote 1
          • I Offline
            in_a_days @danielis
            last edited by Jan 8, 2017, 12:05 AM

            Same here. Great work and many thanks @danielis!

            What ship would bear me ever back across so wide a Sea?

            1 Reply Last reply Reply Quote 0
            • S Offline
              slametps
              last edited by Jan 8, 2017, 5:41 PM

              Is this module work along with MMM-Facial-Recognition using the same camera?

              regards,

              Slamet PS

              1 Reply Last reply Reply Quote 0
              • D Offline
                danielis
                last edited by Jan 8, 2017, 6:02 PM

                Not working here. Only either one or the other.
                But paviro said he will include a motion detection to the facial recognition module at some time.
                I will try to do it also. Will report if I have success

                1 Reply Last reply Reply Quote 0
                • O Offline
                  oscarkindberg
                  last edited by Jan 8, 2017, 6:29 PM

                  Hi!

                  I’m trying to get this to work, have a USB cam attached to the RPI3 and installed the .js.
                  But when I add the code:

                  {
                  module: ’motiondetector’,
                  config:
                  }
                  }

                  Am I missing something? Because it only give me errors… :(

                  (new to this)

                  I 1 Reply Last reply Jan 8, 2017, 6:52 PM Reply Quote 0
                  • I Offline
                    in_a_days @oscarkindberg
                    last edited by Jan 8, 2017, 6:52 PM

                    @oscarkindberg Try this instead:

                                {
                                        module: 'motiondetector',
                                        config: {
                                                timeout: 300000 // time in milliseconds for to switch off the display after last movement is detected.
                                        }
                                },
                    

                    This is set for a 5 minute delay. Modify the timeout value if you want a longer or shorter delay before your screen turns off.

                    What ship would bear me ever back across so wide a Sea?

                    O 1 Reply Last reply Jan 8, 2017, 8:18 PM Reply Quote 0
                    • O Offline
                      oscarkindberg @in_a_days
                      last edited by Jan 8, 2017, 8:18 PM

                      @in_a_days Hit! Works now, BUT next issue.
                      After 5-6 min the screens goes white, can’t find anything in the code that would cause that.

                      D 1 Reply Last reply Jan 9, 2017, 5:28 AM Reply Quote 0
                      • 1
                      • 2
                      • 12
                      • 13
                      • 14
                      • 15
                      • 16
                      • 21
                      • 22
                      • 14 / 22
                      14 / 22
                      • First post
                        140/213
                        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