Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bypass Motion Detection? #3030

Open
matt0816 opened this issue May 4, 2024 · 2 comments
Open

bypass Motion Detection? #3030

matt0816 opened this issue May 4, 2024 · 2 comments

Comments

@matt0816
Copy link

matt0816 commented May 4, 2024

Hi,

I'm working on a traffic camera that should record footage from intersections within a defined time period, such as from 6 to 10 a.m. and from 3 to 7 p.m. I want the videos to be split into segments with a length of 900 seconds. I don't actually need motion detection, but I like the performance and user interface of MotionEye. I believe I've figured out that the "working schedule" only affects the "motion-triggered" recording mode. When I set up continuous recording and set a maximum movie length of 900 seconds, MotionEye only records one video of 900 seconds and then stops. As I've read in some other posts, this is a known issue?

For the given example, it would be nice if I could record the time period from 6 a.m. to 7 p.m. in "motion-triggered" recording mode and bypass the motion detection through some suitable options so that MotionEye always detects motion and the recording doesn't stop until the maximum length is reached, and then starts a new video. Is this possible?

It would be nice if someone could guide me in the right direction.

Thank you very much.

my Setup:
I am running motionEyeOS version: motionEyeOS 20200606
I am using the following board/model: Raspberry PI 3B
I am using the following type of camera: MMAL

@Marijn0
Copy link

Marijn0 commented May 4, 2024

I'm no expert but I use:
/usr/bin/curl "http://localhost:7999/1/config/set?emulate_motion=1"
to turn on a motion event and:
/usr/bin/curl "http://localhost:7999/1/config/set?emulate_motion=0" to end it. that is also mentioned here: motioneye-project/motioneye#229 (comment)

You could use a cron job to do this automatically:
crontab -e

0 6 * * * /usr/bin/curl "http://localhost:7999/1/config/set?emulate_motion=1"

0 10 * * * /usr/bin/curl "http://localhost:7999/1/config/set?emulate_motion=0"

0 13 * * * /usr/bin/curl "http://localhost:7999/1/config/set?emulate_motion=1"

0 19 * * * /usr/bin/curl "http://localhost:7999/1/config/set?emulate_motion=0"

And you may need to set the Working Schedule so that you don't record outside of these times.

@matt0816
Copy link
Author

matt0816 commented May 5, 2024

Thanks for the reply. This helps me, but I noticed two things:

  1. if I set the entry at 2:30 p.m. to 1, the recording starts even if the working schedule is set between 3 and 4 p.m.
  2. After reaching the maximum video length of 900 seconds, the motion detection is automatically set back to 0 and no further recording is started.

Okay, I'll ignore the second point for now, then the videos will be 4 hours long. But for ease of use by less experienced users, it would be great if the times after changing the working schedule or after clicking "Apply" could be written into the crontab using a separate script. To do this, I would have to find a way to start the script after clicking "Apply" and I would have to know where the working schedules are stored.

Does anyone here have an idea?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants