Extra motion options between a specific time period each day

292 views
Skip to first unread message

Markus Bjerre

unread,
Apr 29, 2023, 8:03:14 AM4/29/23
to motioneye
Hi!
I'm curious to know if it's possible to add time based options in the Extra Motion Options field.
For example, I want the exposure of mmalcam_control_params to be set to "sport" during the day, and "night" during the night.
Can't find any documentations on this.


StarbaseSSD

unread,
Apr 29, 2023, 8:17:38 AM4/29/23
to motioneye
No, but we've done other things using cron to swap between 2 (or more) camera config files on a regular basis.
It involves creating the camerax.conf files (in your case camera1.conf.sport and camera1.conf.night and have the crontab switch them as needed.
There are examples in the github in motioneye that shows how to do it. You can do it in motioneyeOS as well. I wrote them a long time ago, in a galaxy far far away....

Markus Bjerre

unread,
Apr 29, 2023, 3:44:05 PM4/29/23
to motioneye
but that would mean you need to restart your motioneye right?

StarbaseSSD

unread,
Apr 29, 2023, 3:52:11 PM4/29/23
to motioneye
No, just the motioneye service which causes a re-read of the camera files. The system doesn't sense motion for about 2-3 seconds. For the most part, that is usually acceptable compared to the time needed for a re-boot...

Markus Bjerre

unread,
Apr 29, 2023, 3:52:40 PM4/29/23
to motioneye
I took a look at what request are being sent when clicking "on save" and it seems to be a POST towards config/[insert_number_here]/set
The key extra_options has the following values set:

[
  [
    "mmalcam_control_params",
    "-awb greyworld -ex night"
  ]
]

Could we not just have a crob job which sends a request at a specific time towards the config file, this way we don't interrupt the current recording if any?

StarbaseSSD

unread,
Apr 29, 2023, 3:54:45 PM4/29/23
to motioneye
Feel free. We tested many ways over the year(s) and our method works...

Markus Bjerre

unread,
Apr 29, 2023, 3:55:50 PM4/29/23
to motioneye
Yea thanks I'm gonna check, found this https://blog.ligos.net/2016-04-18/Day-Night-Cycle-For-MotionEye.html

Could that be what you're referring to?
Also, does it make any difference if I run it on motioneyeos?
Reply all
Reply to author
Forward
0 new messages