-
Notifications
You must be signed in to change notification settings - Fork 146
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
on-camera motion detection with ONVIF #29
Comments
I've been experimenting with this. Good news: it's actually not so bad to hand-roll the SOAP/ONVIF bits I need in pure Rust. Bad news: common vendors don't speak ONVIF very well. Dahua is particularly bad. See this thread for a summary. |
My playground for experimentation with this is here: https://github.com/scottlamb/moonfire-playground I have toy code for Dahua and Hikvision's proprietary protocols. ONVIF PullMessages turned out to be kind of disappointing for my Dahua case as described in the thread linked in the previous comment. The Dahua supports the RTSP [edit later: Hikvision does support the RTSP stream! It's just a little finicky, as described on the wiki.] |
I'm really interested in something like this for Reolink cameras as well... fwestenberg/reolink_dev#7 (comment) suggests it's possible, but I've not had much luck as yet trying to talk ONVIF to the camera in python .. |
That screenshot looks promising. There are three ways to get ONVIF notifications:
I can't tell from skimming that thread which they're using. But I'm trying to get the RTSP method to work. There's a Rust onvif library here. You could try
After that, the RTSP stream URIs returned by |
* use the same nvr client as nvr-motion rather than a separate file. This meant updating reqwest version. I ended up using blocking reqwest for the multipart stuff to avoid rewriting it. This is kind of silly; I'm creating a dedicated thread from a runtime, then it's creating its own runtime. But doing a nicer conversion of multipart.rs to async may not be worth it. I'm not sure I'll need it for long because rtsp metadata streams are looking promising. So just do the minimum so I can run them side-by-side if desired. * update a couple things to newer version of my log crate * add a rtsp watcher stream. It doesn't actually interpret the stream and send signals yet. And it doesn't do any of the setup, which is a multi-step ONVIF procedure, as mentioned here: scottlamb/moonfire-nvr#29 (comment)
Realistically speaking any decent NVR must have motion detection. On-camera motion detection is one of the two paths forward. Marking
milestone-1.0?
accordingly.Needs the signals schema (#28). Additionally, needs to speak SOAP in some way:
I'd also considered using Hikvision's simple non-SOAP/ONVIF proprietary protocol, but then Dahua came out with the Starlight camera series, and I bought one...I've even got some code to watch Hikvision camera motion events but it's much less appealing to me now.
The text was updated successfully, but these errors were encountered: