Read the statement by Michael Teeuw here.
Motion Detector
-
Update:
https://github.com/cowboysdude/Pir-Sensor
Monitor was only partially coming back on this should fix that.
-
my monitor won’t turn back on
when I run “npm start dev”, it shows “compare result=Infinity,Infinity;0,0” , seems like it can’t capture any movement
the camera module works outside MagicMirror
when I tried “sudo modprobe bcm2835-v4l2”, it says “modprobe: invalid option – ‘4’”
how can I fix this -
Hi @cowboysdude
thank you for your files and the explanation. what i don´t understand is how this all works together with the “Motion Detector” - i would prefere to use a camera instead of a PIR Sensor but as far as i see i have to install the pir.py file which is calling the on&off files and referring to the PIN with the connected PIR sensor.
is there a way to use the on&off files with the “Motion Detector” Module?
greets
Christoph -
Hi guys
as it looks that it isn´t an MM problem but an Pi Problem…another try:
sudo nano /etc/kbd/config
change the values to zero
BLANK_TIME=0
POWERDOWN_TIME=0good luck
-
@cpramhofer There is a module for camera control… cannot remember the name of it but look around here I KNOW there’s one here.
-
hi @cowboysdude,
i´m sorry - i thought we are all speaking about the camera based motion detection by @alexyak
https://github.com/alexyak/motiondetectorhave a nice sunday!
-
@cpramhofer No that’s ok… I think this thread is getting mixed between PIR sensor and camera… opps
-
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
-
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 anelectron
process with ~100% cpu - With
motiondetector
disabled, I observed one or twoelectron
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?
- With
-
@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.