-
Notifications
You must be signed in to change notification settings - Fork 338
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
Improve check_motion script #153
base: master
Are you sure you want to change the base?
Improve check_motion script #153
Conversation
…to a configurable URL with motion information.
Hey @airdrummingfool, are you able to create the device handler for ST yet? EDIT: Actually, I already have a device handler for a virtual motion detector, but I'm using RPi camera as the source, the latency is around 1 second. However for this check_motion script on Yi camera, the latency could be anywhere between 1s to 60s, which is too long. Do we know how Yi send motion alerts to its app? maybe we could intercept that process and send our custom POST in there... |
@gl-lamhnguyen Unfortunately, I haven't been able to figure out how the motion alerts are triggered and sent to the app. I have a very rough version of the device handler going, but it is not ready for public release yet and may not be for some time. Regarding latency: as far as latency of initial motion detection, it is only 1-20 seconds, and this can be improved by changing the |
Hey @airdrummingfool, are you currently using this Also, I'm not quite clear on this parameter |
I used to use it, but ended up getting a dedicated motion sensor because I was getting some false-positives from the Yi. Since then I have set up cloud access and have been able to turn down the sensitivity on the Yi, so it might work better now. Yes, a notification is fired every 20 seconds no matter whether motion was detected previously or not. I set up my device handler to act on the transition between states, e.g. from motion: false to motion: true. If multiple motion: trues come in a row, they can be ignored until a motion: false. This would prevent multiple alerts on one motion detection. However, if this doesn't work for you, it should be pretty easy to add a
|
really thank you for this code :D . Maybe did you know a way to send a request to an https url ? ( i've tryed wget, but wget doesn't understand https scheme ) . |
This improves the check_motion script in several ways:
-newer
flag to limit modification check to files modified since last check, and includes.mp4.tmp
files infind
call to increase accuracyarmed
property, which tells whether or not the process that check_motion relies on is running (if it's not running, check_motion will always returnfalse
for motion). This limitation exists in the current version of check_motion, but is not documented.