agsh / onvif

ONVIF node.js implementation
https://onvif.pages.dev
MIT License
707 stars 240 forks source link

pull events from cams on an NVR #279

Open AdyRock opened 1 year ago

AdyRock commented 1 year ago

I am trying to setup motion events for cameras attached to an NVR. Each camera is a separate profile on the same IP address. I can get the static image URL from the required camera by passing in the token for the profile. I presume I will need to do something similar when creating the pullPoint so it either adds and id to the URL or maybe setup a filter.

I have searched Google for days looking for tips but I can't find anything.

Any suggestions would be be gratefully received.

agsh commented 1 year ago

@AdyRock Hi! I've never worked with cameras through NVR. This case needs a lot of investigation and ONVIF specification study (https://github.com/onvif/specs). Because current subscription works with cameras only and I don't know what happens in the NVR hub. @RogerHardiman, can you help?

AdyRock commented 1 year ago

Thanks for looking into this. I can't find anything in the specification. I have also reached out to Reolink support to see if they can help but I am not confident they will get back to me.

RogerHardiman commented 1 year ago

You cannot subscribe to an event on an ONVIF Profile basis. You have to subscribe to a 'Topic'. There may be a 'Topic' for each channel on your NVR. But I expect there will be one Topic and then the payload you get in the event will include something to identify the NVR channel.

AdyRock commented 1 year ago

I will investigate the topic per channel thought further. I also expect that a channel identifier in the event payload but sadly there is nothing. Also, the NVR only generates event front the camera on channel 0. Thanks for your input as at least I know I'm not missing something simple 🙂