budget OEM cameras (e.g. OMNY)
return an empty <wsa:Address/> in the SubscriptionReference of a
CreatePullPointSubscription response. pkg/onvif/events.go then errors with
onvif: no subscription address in response and ONVIF motion never works. Falling
back to the event service endpoint URL (which accepts PullMessages directly) fixes
it:
addr := FindTagValue(b, "Address")
+ var resolved string
if addr == "" {
- return nil, errors.New("onvif: no subscription address in response")
+ // Empty <wsa:Address/> (some OEM firmware): fall back to the event
+ // service endpoint, which accepts PullMessages directly.
+ resolved = c.eventURL
+ } else {
+ resolved = c.resolveEventAddress(addr)
}
budget OEM cameras (e.g. OMNY)
return an empty
<wsa:Address/>in theSubscriptionReferenceof aCreatePullPointSubscriptionresponse.pkg/onvif/events.gothen errors withonvif: no subscription address in responseand ONVIF motion never works. Fallingback to the event service endpoint URL (which accepts
PullMessagesdirectly) fixesit: