Skip to main content
1 of 9
reggie
  • 1.1k
  • 4
  • 14
  • 30

Controlling motion's threshold automatically on my PI

I have motion installed on my pi, and wondered if it was possible to write a python script to change the detection sensitivity to different values for day and night?

The value i'm interested in is called threshold in the motion.conf file.

Would I:

A) edit the motion.conf file, save it and restart motion

B) send the Motion mmaltest a command somehow, maybe passing parameters and getting past the authentication automatically

c) control motion start via cron which iv'e seen here

0 9 * * * root /usr/bin/lwp-request http://localhost:8080/0/detection/start > /dev/null

so would this work for threshold threshold in the cron?

0 9 * * * root /usr/bin/lwp-request http://localhost::8080/0/config/set?threshold 1000
reggie
  • 1.1k
  • 4
  • 14
  • 30