Read the statement by Michael Teeuw here.
Motion Detector
-
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.
-
@bhepler you’re right. putting a delay should help with the CPU usage.
-
Thanks, @alexyak. Any idea about how to get around the issue with the new security surrounding webcams?
-
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.
-
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 viapm2 restart 0
) or browse to your mirror’s address via a web browser and enter developere mode. -
i don’t have a mm.sh script. Where should it be located?
-
@DirkS Aha. You probably haven’t set it up yet. No worries. You normally start your mirror by going into
~/MagicMirror
and enteringnpm start
, right? Just append the dev switch and you should see both the mirror UI and the browser console on your mirror:npm start dev
If you’re starting your mirror via SSH, prepend the command to send the output to the mirror’s display:
DISPLAY=:0 npm start dev
-
The mirror is starting at reboot. So maybe there is a script, i installed it a few month ago, i don’t remember :D
If i’m testing new settings i use pm2 restart mm for example. npm i’m just using to install new modules.
-
@DirkS Interesting. Following the instructions I found via the GitHub MagicMirror repository, the pm2 should be using
/home/pi/mm.sh
to start the magic mirror process. Editing this file and appendingDEV
should give you the web browser console with log.