edgexfoundry / device-onvif-camera

Owner: Device WG
Apache License 2.0
29 stars 37 forks source link

The Hikvision NVR device (model: IDS-7816NX) has enabled Onvif, but the device-onvif-camera cannot be automatically discovered. #412

Closed watjt closed 7 months ago

watjt commented 7 months ago

🐞 Bug Report

Affected Services [REQUIRED]

The issue is located in: device-onvif-camera ### Is this a regression? Yes, the previous version in which this bug was not present was: .... The Hikvision NVR device (model: IDS-7816NX) has enabled Onvif, but the device-onvif-camera cannot be automatically discovered. It works fine when using the ONVIF Device Manager tool. ![hikvision-nvr-onvif](https://github.com/edgexfoundry/device-onvif-camera/assets/38395110/31deec0b-61f6-49c3-a896-e3673246b616) ![onvif-device-manager](https://github.com/edgexfoundry/device-onvif-camera/assets/38395110/62f0411e-b8cb-4e3d-b74f-34fb11898e89) ### Description and Minimal Reproduction [**REQUIRED**] ## πŸ”₯ Exception or Error



level=DEBUG ts=2023-11-22T02:28:54.190349036Z app=device-onvif-camera source=onvifdiscovery.go:213 msg="172.23.142.26:3702: Response 1 of 1: <?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<soap:Envelope xmlns:soap=\"http://www.w3.org/2003/05/soap-envelope\" xmlns:wsa=\"http://schemas.xmlsoap.org/ws/2004/08/addressing\" xmlns:wsd=\"http://schemas.xmlsoap.org/ws/2005/04/discovery\" xmlns:dn=\"http://www.onvif.org/ver10/network/wsdl\" xmlns:tds=\"http://www.onvif.org/ver10/device/wsdl\" >\n\nhttp://schemas.xmlsoap.org/ws/2005/04/discovery/ProbeMatches</wsa:Action>\nuuid:b7df1a5e-8921-11ee-8228-4d52f5bae128</wsa:MessageID>\nuuid:a1a836b3-5246-432c-9ccc-dc6071e25345</wsa:RelatesTo>\nhttp://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:To>\n<wsd:AppSequence InstanceId=\"1700648840\" MessageNumber=\"70\"/>\n</soap:Header>\n\n\n\n\nurn:uuid:484a3534-3234-3337-3238-240f9b30ea59</wsa:Address>\n</wsa:EndpointReference>\ndn:NetworkVideoTransmitter tds:Device</wsd:Types>\nonvif://www.onvif.org/type/video_encoder onvif://www.onvif.org/type/ptz onvif://www.onvif.org/type/audio_encoder onvif://www.onvif.org/hardware/iDS-7816NX-Z2%2FX onvif://www.onvif.org/Profile/Streaming onvif://www.onvif.org/Profile/G onvif://www.onvif.org/location/country/china onvif://www.onvif.org/name/DeepinMind onvif://www.onvif.org/type/Network%20Video%20Storage </wsd:Scopes>\nhttp://172.23.142.26:80/onvif/device_service</wsd:XAddrs>\n10</wsd:MetadataVersion>\n</wsd:ProbeMatch>\n</wsd:ProbeMatches>\n</soap:Body>\n</soap:Envelope>\n" Onvif WS-Discovery: Find Xaddr: 172.23.142.26:80 EndpointRefAddress: 484a3534-3234-3337-3238-240f9b30ea59 level=DEBUG ts=2023-11-22T02:28:54.198195292Z app=device-onvif-camera source=onvifdiscovery.go:110 msg="No MAC Address match was found for EndpointRefAddress 484a3534-3234-3337-3238-240f9b30ea59" level=WARN ts=2023-11-22T02:28:54.198259849Z app=device-onvif-camera source=credentials.go:105 msg="Device 484a3534-3234-3337-3238-240f9b30ea59 is missing MAC Address, using default secret name" level=WARN ts=2023-11-22T02:28:54.206230834Z app=device-onvif-camera source=onvifdiscovery.go:115 msg="failed to create onvif client for the camera 484a3534-3234-3337-3238-240f9b30ea59, failed to initialize Onvif device client -> camera is not available at 172.23.142.26:80 or it does not support ONVIF services" level=WARN ts=2023-11-22T02:28:54.206275879Z app=device-onvif-camera source=discover.go:158 msg="issue converting probe result to discovered device: failed to create onvif client for the camera 484a3534-3234-3337-3238-240f9b30ea59"

🌍 Your Environment

Deployment Environment: 3.1.0 EdgeX Version [REQUIRED]:

Anything else relevant?

cloudxxx8 commented 7 months ago

you marked this as a regression bug does this feature work in the older version of device-onvif-camera?

watjt commented 7 months ago

you marked this as a regression bug does this feature work in the older version of device-onvif-camera?

I resolved this issue by modifying the version of https://github.com/IOTechSystems/onvif to v1.1.1.