Read the statement by Michael Teeuw here.
Motion Detector
-
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-vl2Additionally, 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
motiondetectormodule? Mine is as follows on a Raspberry Pi 2:- With
motiondetectorenabled, there is always anelectronprocess with ~100% cpu - With
motiondetectordisabled, I observed one or twoelectronprocesses 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 devand 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
~/MagicMirrorand 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 devIf 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.shto start the magic mirror process. Editing this file and appendingDEVshould give you the web browser console with log. -
Hi and thanks to everybody making this module work!
@cpramhofer Did your solution solve the issue that the monitor did not switch on again after a longer period of time?
-
@done Wait, does it work for you? Because it’s not working for me and this is the last thing I need before my mirror is done.
-
@bhepler Sorry, I haven’t tried yet. :)
I installed the cam and the module yesterday and motion detection worked.
But I experienced the same issue this morning. Wake up problem is not solved. -
@done propably everything is working for you guys and you can just see the screensaver, be sure to disable the screensaver
-
Hi @strawberry-3.141
Thanks for your answer
I disabled the screensaver by editing (found here
Is that what you had in mind?sudo nano /home/pi/.config/lxsession/LXDE-pi/autostart
@lxpanel --profile LXDE-pi
@pcmanfm --desktop --profile LXDE-pi
#@xscreensaver -no-splash@xset s off
@xset -dpms
@xset s noblank
@unclutterStrange that my camera driver was not working today.
I had to activate the cam in the pi config again.In the morning the cam led was on but when I tried to wake up the monitor the led just turned off.
I use a v1.3 cam on a rpi3.
-
@done Personally I don’t have a mirror myself, but I heard from other users in this forum they had problems with the screensaver when they tried to wake up the mirror using my voice module. They could see the mirror got brighter, but the screen was still black because of the screensaver. I would connect a mouse or keyboard and do some action to see if there is a screensaver active.
-
@strawberry-3.141 Ok, I’ll give it a try. Tomorrow morning, I will test again. Thx!
-
hello! as understood there are 2 topics ongoing here "PIR module of @cowboysdude " and "motiondetector of @alexyak ". I will not ask which is the best module, you both did a great job, thx!
don’t take it bad but i just wanted to have opinions and feedback on which one is running currently without any, less issues please? (i am starting my mirror and don’t want to be too much demanding on the forum if not working - wise ;-))@cowboysdude : i have already implemented Paviro’s module to test and i wanted to know if i should remove it before installing your one?
Thx in advance for your relpies and have a good day/eve :)
-
@bibi said in Motion Detector:
hello! as understood there are 2 topics ongoing here "PIR module of @cowboysdude " and "motiondetector of @alexyak ". I will not ask which is the best module, you both did a great job, thx!
don’t take it bad but i just wanted to have opinions and feedback on which one is running currently without any, less issues please? (i am starting my mirror and don’t want to be too much demanding on the forum if not working - wise ;-))@cowboysdude : i have already implemented Paviro’s module to test and i wanted to know if i should remove it before installing your one?
Thx in advance for your relpies and have a good day/eve :)
Honestly I will you this… I liked the motion sensor BUT @ianperrin worked out a module scheduler that I liked much better! I can turn modules off and on at specific times and turn it all off when I"m not home only to have it back on again when I arrive home.
All-in-all it really depends on your needs. NOTHING is without issues of some kind. I just really disliked the PIR sensor sticking out …
I hoped this help you in some way.
OH but of course @strawberry-3-141 also made a voice module that you can just tell the mirror to turn off too :) The usb mike is about the same price as a pir sensor!!! It’s REALLY awesome!!!
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login