• 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 436.3k 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 @Natacha3
    last edited by Sep 17, 2017, 12:49 AM

    @Natacha3
    I also tested the motiondetector of alexyak, without success and therefore installed Motion, which works without problems. However, I understand, that the process to compile it for your self is not easy for a beginner.
    Are you aware of https://forum.magicmirror.builders/topic/988/motion-detection-with-raspicam-non-module-version
    The linked thread provides a precompiled version of Motion and some recommended settings.

    N 1 Reply Last reply Sep 21, 2017, 11:33 AM Reply Quote 0
    • N Offline
      Natacha3 @Hawking
      last edited by Sep 21, 2017, 11:33 AM

      @Hawking Thank you so much for your input !
      It works as a charm !

      1 Reply Last reply Reply Quote 0
      • T Offline
        trividar
        last edited by Dec 16, 2017, 11:41 AM

        Hello all,
        I updated my raspberry to stretch and now my MM disable the Monitor and the Monitor start immediate without motion. I got this massage:

        0_1513424415280_5f35abe7-d769-4bc5-97d7-d0294b8e3dc2.jpg

        Does someone know why this happen?
        Thanks a lot!

        1 Reply Last reply Reply Quote 0
        • T Offline
          trividar
          last edited by Dec 17, 2017, 2:15 PM

          No one an Idea?

          1 Reply Last reply Reply Quote 0
          • N Offline
            Natacha3
            last edited by Oct 29, 2018, 3:08 PM

            Hi all,

            I just come back on this topic because I followed the install process as described by hawking:

            @hawking said in Motion Detector:

            @Natacha3
            Are you aware of https://forum.magicmirror.builders/topic/988/motion-detection-with-raspicam-non-module-version
            The linked thread provides a precompiled version of Motion and some recommended settings.

            So I just open a command window and do the following command ./motion -c motion.conf
            then I open another window and I start the MagicMirror with npm start

            Everything works fine for a couple of hours then the Mirror stays dark

            I do a CTRL Q
            and in the motion window I get the following :

            [1] [NTC] [ALL] motion_loop: fps: 3.998576 idle 63.46% over 0.00%
            [1] [NTC] [EVT] event_newfile: File of type 2 saved to: /run/shm/lastsnap.jpg
            [1] [NTC] [ALL] motion_loop: fps: 3.998768 idle 61.99% over 0.00%
            [1] [NTC] [ALL] motion_loop: fps: 3.999344 idle 62.23% over 0.00%
            [1] [NTC] [EVT] event_newfile: File of type 2 saved to: /run/shm/lastsnap.jpg
            [1] [NTC] [ALL] motion_loop: fps: 3.998928 idle 62.18% over 0.00%
            [1] [NTC] [ALL] motion_loop: fps: 3.998960 idle 62.16% over 0.00%
            [1] [NTC] [EVT] event_newfile: File of type 2 saved to: /run/shm/lastsnap.jpg
            [1] [NTC] [ALL] motion_loop: fps: 3.999136 idle 62.54% over 0.00%
            [1] [NTC] [ALL] motion_loop: fps: 3.995844 idle 61.22% over 0.00%
            [1] [NTC] [EVT] event_newfile: File of type 2 saved to: /run/shm/lastsnap.jpg
            [1] [NTC] [ALL] motion_loop: fps: 3.997186 idle 61.51% over 0.00%
            [1] [NTC] [ALL] motion_loop: fps: 4.001200 idle 62.69% over 0.00%
            [1] [NTC] [EVT] event_newfile: File of type 2 saved to: /run/shm/lastsnap.jpg
            [1] [NTC] [ALL] motion_loop: fps: 3.999360 idle 60.96% over 0.00%
            [1] [NTC] [ALL] motion_loop: fps: 3.998641 idle 59.35% over 0.00%
            [1] [NTC] [EVT] event_newfile: File of type 2 saved to: /run/shm/lastsnap.jpg
            [1] [NTC] [ALL] motion_loop: fps: 3.999232 idle 59.59% over 0.00%
            [1] [NTC] [ALL] motion_loop: fps: 3.999088 idle 58.86% over 0.00%
            [0] [ERR] [ALL] main: Thread 1 - Watchdog timeout, trying to do a graceful restart
            [0] [ERR] [ALL] main: Thread 1 - Watchdog timeout, did NOT restart graceful,killing it!
            [0] [INF] [ALL] motion_cleanup: Calling vid_close() from motion_cleanup
            [0] [INF] [VID] vid_close: calling video source cleanup
            [0] [ALR] [VID] MMAL Camera cleanup

            So I can see that some detection occured properly and pictures have been saved in /run/shm/lastsnap.jpg
            (I checked, this function is deactivated but … anyway ! Only 1 pic is stored so it’s not a matter of folder flooded)

            The Watchdog timeout would be a possible lead but google does not help me so much as so many different issues are linked… :cry:

            I hope that you will forgive me if I asked a stupid question and what you will be rather indulgent not to turn me down !

            B 1 Reply Last reply Oct 31, 2018, 2:41 AM Reply Quote 0
            • B Offline
              bhepler Module Developer @Natacha3
              last edited by Oct 31, 2018, 2:41 AM

              @natacha3 - It’s been a really long time since I wrote that Motion post. But I’ll try to help. IIRC, the lastsnap.jpg is intended to be a capture of the last image that the Motion system grabbed. It will continually overwrite that file. You may (or maybe not) have disabled the “capture screenshots to folder” functionality and left the “save last image to folder” feature running. Or not. I’d have to see your motion.conf file to be sure.

              Motion never did close gracefully, to my knowledge. It seems that motion is definitely detecting motion of some form and writing to the lastsnap.jpg file. So that’s a plus. If you read the whole thread that @Hawking linked, you’ll see that I had problems with Motion crashing. When it crashes, it stops detecting properly and never runs the script to wake up the monitor.

              I suspect that if you check the lastsnap.jpg timestamp, you’ll see that it was created at some point between “works fine” and “won’t turn the monitor on”. That would be the last time that motion successfully wrote to the disk before the process crashed.

              Try starting Motion with pm2. I found that pm2 will detect when the Motion process crashes and restart it for you. That should keep the detection active.

              1 Reply Last reply Reply Quote 0
              • N Offline
                Natacha3
                last edited by Natacha3 Nov 4, 2018, 7:22 PM Nov 4, 2018, 7:22 PM

                @bhepler, you’re my hero !

                Thank you so much for your kind advice !
                Starting motion with pm2 solves the issue.
                I just did not dare to start also the magic mirror with it as I’ve read somewhere that they would start simultaneously and as a consequence everything would fail… I will try but later on !

                Thank you agin !
                Nat

                1 Reply Last reply Reply Quote 1
                • D Offline
                  dxfan227
                  last edited by Apr 25, 2019, 6:22 PM

                  trying to use a variant of this module…my camera works fine and the module works fine…bt after aout 10 min…the camera turns off ( still has power but stops recieveing video)

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