I’ve installed the Pi camera behind the mirror and it allows motion detection to turn on-off the monitor.
https://forum.magicmirror.builders/topic/988/motion-detection-with-raspicam-non-module-version
As suggested by Bhelper I start it with pm2 and the result is just … perfect!
Read the statement by Michael Teeuw here.
Posts
-
RE: PIR, radar or camera IR filter or not for controlling mm on/off
-
RE: What mirror choose in France
@natacha3
Pour ceux que ça intéresse finalement en lançant motion par pm2 même si ça plante, le redémarrage est assuré sans problème.
J’ai rien inventé: https://forum.magicmirror.builders/topic/490/motion-detector/212?page=22 -
RE: Motion Detector
@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 -
RE: What mirror choose in France
Alors là … je vais te suivre de très près !
Ce module m’intéresse beaucoup mais j’ai pris un peu peur pour la mise en oeuvre.
Moi aussi le côté sapin de Noel ne m’attire pas beaucoup.J’ai déjà la caméra du pi derrière le mirroir avec motion pour la détection de présence qui allume ou éteint la sortie vidéo mais si les essais sont concluants, je l’ai désactivée car l’appli plante après quelques heures de fonctionnement.
-
RE: Motion Detector
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 startEverything 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 cleanupSo 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 !
-
RE: What mirror choose in France
@adrien Le rendu est superbe et le cadre a l’air fin contrairement à ce qui se fait habituellement.
L’esthétique y gagne beaucoup !
En un mot: superbe ! Et merci pour le suivi et ton retour d’info concernant la qualité du miroir. :clap: -
RE: Motion Detector
@Hawking Thank you so much for your input !
It works as a charm ! -
RE: Motion Detection with RaspiCam, Non-Module version
@bhepler It works perfectly !
Thank you so much for sharing ! -
RE: Motion Detector
@mongo116 Thank you for your advice but I’m a complete ignorant and I must admit that I’ve been affraid by reading https://github.com/Motion-Project/motion/blob/master/motion_guide.html
As a total noob, I guess it’s a bit out of reach for me. (maybe after 3 or 4 decades I will play the easy side with that ! ) ;-)
-
RE: Motion Detector
@j.e.f.f Thank you again Jeff but … I use a Pi camera, not a PIR sensor ! ;-)
I’ve checked that the camera was operating normally (sorry again, I’m not able to recover the link but … at least i’ve seen the picture !