Read the statement by Michael Teeuw here.
MMM-PIR-Sensor tuning
-
@shgmongohh Does you sensor have these turn knobs, to adjust distance and time delay? Like here? Lets hope it does, all you need to do then, is turn them until the delay + distance work fine.
-
@Jopyth
Yes, it has the knobs. But I want a programm which logged the time, when the monitor starts or shut down.
I unfortunatly cann´t programm it, because I don´t have the knowledge.Sebastian
-
@shgmongohh And you want this, to adjust delay and distance accordingly? I have used a simple python program for that, maybe I can find it again.
Edit: Never mind, but if you just want to know, when the sensor goes off or on this tutorial might help.
-
@Jopyth
I will try it.
I want to know if for example the monitor stays off during the night. I have the feeling, that he sometimes turns on when nobody is around. Thats the reason I want to trigger the on/off time.
When I have the times I can also adjust the minutes he stays on with the knob.Sebastian.
-
Can anybody tell me, how to write a python programm to trigger the on / off time of the monitor? My monitor starts during the night. I want to now how often he starts.
Sebastian
-
@shgmongohh I have forked the original
MMM-Pir-Sensor
repo and made some mods to debug my own sensor last week.https://github.com/jc21/MMM-PIR-Sensor
If you add
debug: true
to the config of my forked code, you’ll get console info about when the sensor detects motion and when it doesn’t. Also note, I’ve renamed thesensorPIN
config item tosensorGpio
to more accurately indicate the numeric determination.[MMM-PIR] [2016-10-04 09:31:07] Watching on GPIO #25 ... [MMM-PIR] [2016-10-04 09:34:15] Motion no longer detected [MMM-PIR] [2016-10-04 09:34:15] Turning Screen OFF in 30 seconds [MMM-PIR] [2016-10-04 09:34:18] Motion detected [MMM-PIR] [2016-10-04 09:34:18] Not turning monitor ON, its already ON
-
@jc21
Thanks alot for your help. I was on vacation and will try it now.Sebastian
-
@jc21 said in MMM-PIR-Sensor tuning:
debug: true
One stupid question, how is the debug info started?
-
As @jc21 suggested, add the line
debug: true
to the module’s config section, and restart MM, then look at the console log. -
@KirAsh4 said in MMM-PIR-Sensor tuning:
I have add the line to the config section. My question is, how can I look at the console log, when I have start the mm new.
Have I go to a special folder, have I to put something in the consule?pi@raspberrypi:~ $ pm2 stop mm [PM2] Applying action stopProcessId on app [mm](ids: 0) [PM2] [mm](0) ✓ ┌──────────┬────┬──────┬─────┬─────────┬─────────┬────────┬────────┬──────────┐ │ App name │ id │ mode │ pid │ status │ restart │ uptime │ memory │ watching │ ├──────────┼────┼──────┼─────┼─────────┼─────────┼────────┼────────┼──────────┤ │ mm │ 0 │ fork │ 0 │ stopped │ 0 │ 0 │ 0 B │ disabled │ └──────────┴────┴──────┴─────┴─────────┴─────────┴────────┴────────┴──────────┘ Use `pm2 show <id|name>` to get more details about an app pi@raspberrypi:~ $ pm2 start mm [PM2] Applying action restartProcessId on app [mm](ids: 0) [PM2] [mm](0) ✓ [PM2] Process successfully started ┌──────────┬────┬──────┬──────┬────────┬─────────┬────────┬────────────┬──────── ──┐ │ App name │ id │ mode │ pid │ status │ restart │ uptime │ memory │ watchin g │ ├──────────┼────┼──────┼──────┼────────┼─────────┼────────┼────────────┼──────── ──┤ │ mm │ 0 │ fork │ 1246 │ online │ 0 │ 0s │ 2.262 MB │ disable d │ └──────────┴────┴──────┴──────┴────────┴─────────┴────────┴────────────┴──────── ──┘ Use `pm2 show <id|name>` to get more details about an app pi@raspberrypi:~ $
So, what next?
Sebastian