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

Fix motion detection status check #2987

Merged

Conversation

zagrim
Copy link
Collaborator

@zagrim zagrim commented May 27, 2024

This should fix motion detection check and make working schedule work as it did in the Python 2 releases.
Thanks for @Marijn0 for pointing out the flaw in the code.

I've not myself tested this, hopefully someone using working schedule can do that.

Fixes #2663

@zagrim zagrim requested a review from MichaIng May 27, 2024 04:37
@zagrim
Copy link
Collaborator Author

zagrim commented May 27, 2024

@MichaIng the vulnerability causing failing the safety check looks to me like something that should be ignored, right?

@Marijn0
Copy link

Marijn0 commented May 27, 2024

Works fine:

May 27 18:59:54 raspberrypi motion[1425]: [0:wu0] [INF] [ALL] webu_answer_ctrl: Connection from: 127.0.0.1
May 27 19:00:03 raspberrypi motion[1425]: [0:cn0] [DBG] [STR] webu_parseurl: Sent url: /1/detection/status
May 27 19:00:03 raspberrypi motion[1425]: [0:cn0] [DBG] [STR] webu_parseurl: Decoded url: /1/detection/status
May 27 19:00:03 raspberrypi motion[1425]: [0:cn0] [DBG] [STR] webu_parseurl: camid: >1< cmd1: >detection< cmd2: >status< parm1:>< val1:>< parm2:>< val2:><
May 27 19:00:03 raspberrypi meyectl[512]: DEBUG: motion detection is enabled for camera with id
May 27 19:00:03 raspberrypi meyectl[512]: DEBUG: must disable motion detection for camera with id 1 (during working schedule)
May 27 19:00:03 raspberrypi meyectl[512]: DEBUG: disabling motion detection for camera with id 1
May 27 19:00:03 raspberrypi motion[1425]: [0:wu0] [INF] [ALL] webu_answer_ctrl: Connection from: 127.0.0.1
May 27 19:00:03 raspberrypi motion[1425]: [0:cn0] [DBG] [STR] webu_parseurl: Sent url: /1/detection/pause
May 27 19:00:03 raspberrypi motion[1425]: [0:cn0] [DBG] [STR] webu_parseurl: Decoded url: /1/detection/pause
May 27 19:00:03 raspberrypi motion[1425]: [0:cn0] [DBG] [STR] webu_parseurl: camid: >1< cmd1: >detection< cmd2: >pause< parm1:>< val1:>< parm2:>< val2:><
May 27 19:00:03 raspberrypi motion[1425]: [0:wu0] [INF] [ALL] webu_answer_ctrl: Connection from: 127.0.0.1
May 27 19:00:03 raspberrypi meyectl[512]: DEBUG: successfully disabled motion detection for camera with id 1

@MichaIng
Copy link
Member

MichaIng commented May 28, 2024

Uh, indeed:

root@VM-Bookworm:~# curl http://127.0.0.1:7999/1/detection/status
Camera 1 Detection status ACTIVE

Many thanks 👍!

The failing check is addressed here: #2983

@MichaIng MichaIng force-pushed the fix-motion-detection-status-check branch from c5334dd to 71f9fdc Compare May 28, 2024 17:27
@MichaIng MichaIng linked an issue May 28, 2024 that may be closed by this pull request
@MichaIng MichaIng merged commit 9668ba5 into motioneye-project:dev May 28, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants