• 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 471.7k 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.
  • C Offline
    cowboysdude Module Developer @cpramhofer
    last edited by Sep 24, 2016, 1:47 AM

    @cpramhofer There is a module for camera control… cannot remember the name of it but look around here I KNOW there’s one here.

    1 Reply Last reply Reply Quote 0
    • C Offline
      cpramhofer
      last edited by Sep 25, 2016, 9:10 AM

      hi @cowboysdude,

      i´m sorry - i thought we are all speaking about the camera based motion detection by @alexyak
      https://github.com/alexyak/motiondetector

      have a nice sunday!

      C 1 Reply Last reply Sep 25, 2016, 1:32 PM Reply Quote 0
      • C Offline
        cowboysdude Module Developer @cpramhofer
        last edited by Sep 25, 2016, 1:32 PM

        @cpramhofer No that’s ok… I think this thread is getting mixed between PIR sensor and camera… opps

        1 Reply Last reply Reply Quote 0
        • B Offline
          bhepler Module Developer
          last edited by bhepler Oct 6, 2016, 2:31 PM Oct 6, 2016, 2:29 PM

          Greetings! I’m slowly working my way through this thread and trying to figure out what’s going on here.

          What works: configurable timeout for the motiondetector seems to work just fine. Turns the screen off. Interestingly, if I’m viewing the mirror via my desktop browser, refreshing the page will turn the monitor on.

          What doesn’t work: turning the screen on. Even after entering sudo modprobe bcm2835-vl2

          Additionally, I’m seeing this in the console with the developer tools enabled:
          getUserMedia() no longer works on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS. See https://goo.gl/rStTGz for more details.
          :8080/modules/motiondetector//webcamcapture.js:78 NavigatorUserMediaError

          1 Reply Last reply Reply Quote 0
          • P Offline
            paphko
            last edited by Oct 12, 2016, 7:17 PM

            I just tried this module but cpu load made me stop using it. Please tell me, how busy is your Raspberry with and without the motiondetector module? Mine is as follows on a Raspberry Pi 2:

            • With motiondetector enabled, there is always an electron process with ~100% cpu
            • With motiondetector disabled, I observed one or two electron processes with up to 15% cpu

            I used a dedicated motion daemon on my old version of the mirror to switch on the screen on motion and I think I will set it up again. IIRC, it used ~40% cpu on a (single-core) Raspberry Pi 1 B+. What is your opinion?

            B 1 Reply Last reply Oct 17, 2016, 12:49 PM Reply Quote 0
            • B Offline
              bhepler Module Developer @paphko
              last edited by Oct 17, 2016, 12:49 PM

              @paphko I just looked at my Pi 3 and I’m showing 40% usage with the motion detection module running (and failing). I suspect it’s the constant pic-compare-pic-compare loop that runs. It would be trivial to insert a wait in that loop to lower the CPU usage. Even a delay of 750 ms would probably help quite a bit.

              1 Reply Last reply Reply Quote 0
              • A Offline
                alexyak
                last edited by Oct 18, 2016, 2:44 AM

                @bhepler you’re right. putting a delay should help with the CPU usage.

                B 1 Reply Last reply Oct 18, 2016, 3:05 PM Reply Quote 0
                • B Offline
                  bhepler Module Developer @alexyak
                  last edited by Oct 18, 2016, 3:05 PM

                  Thanks, @alexyak. Any idea about how to get around the issue with the new security surrounding webcams?

                  1 Reply Last reply Reply Quote 0
                  • D Offline
                    DirkS
                    last edited by Oct 25, 2016, 3:41 PM

                    Hi, i had some issues with the PIR module where the screen doesn’t switch on anymore. Now with a original PI Camera i tried this module. Same issue, the screen doesn’t switch on but in this case no motion seems to be detected. (the PIR did detect)

                    with /opt/vc/bin/tvservice --preferred && sudo chvt 6 && sudo chvt 7 i can switch on the screen manually.
                    I followed every tip here in the thread. So i have no idea what is going on :(

                    mm-0 (out): monitor has been deactivated
                    mm-0 (out): monitor :state 0x12000a [HDMI CEA (16) RGB lim 16:9], 1920x1080 @ 60.00Hz, progressive
                    mm-0 (out):
                    
                    

                    That is the only thing i can see in the log.

                    1 Reply Last reply Reply Quote 0
                    • B Offline
                      bhepler Module Developer
                      last edited by Oct 25, 2016, 4:00 PM

                      Check the console log. I suspect you’ll see a security error preventing the browser from accessing the monitor. Either launch your mirror in dev mode (modify your mm.sh script to read DISPLAY=:0 npm start dev and then restart via pm2 restart 0) or browse to your mirror’s address via a web browser and enter developere mode.

                      1 Reply Last reply Reply Quote 0
                      • 1
                      • 2
                      • 7
                      • 8
                      • 9
                      • 10
                      • 11
                      • 21
                      • 22
                      • 9 / 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