Skip to content
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

Akri discovery handler unable to detect ip camera #659

Closed
ccloud622 opened this issue Sep 12, 2023 · 5 comments
Closed

Akri discovery handler unable to detect ip camera #659

ccloud622 opened this issue Sep 12, 2023 · 5 comments

Comments

@ccloud622
Copy link

Hi Team,

I am having issue with discovering one of the axis IP camera. The discovery handler doesn't read the device connected on the network. I wanted to ask what kind of request does it sends to camera. WS discovery is enabled for ip camera but RemoteDiscovery is set to False. It is a camera with authentication enabled on it. -please suggest what I am doing wrong .

I did tried to enable RemoteDiscovery through onvif but it is not allowing me to do so

[2023-09-12T10:36:36Z TRACE akri_onvif::discovery_impl::util] create_onvif_discovery_message - discovery message: "<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope\"><s:Header xmlns:w="http://schemas.xmlsoap.org/ws/2004/08/addressing\"><w:MessageID>uuid:a998c9bc-1e66-4720-8e17-e49d4a39243e</w:MessageID><w:To>urn:schemas-xmlsoap-org:ws:2005:04:discovery</w:To><w:Action>http://schemas.xmlsoap.org/ws/2005/04/discovery/Probe</w:Action></s:Header><s:Body xmlns:d="http://schemas.xmlsoap.org/ws/2005/04/discovery\"><d:Probe><d:Types>netwsdl:NetworkVideoTransmitter</d:Types></d:Probe></s:Body></s:Envelope>"
[2023-09-12T10:36:37Z TRACE akri_onvif::discovery_impl::util] simple_onvif_discover - recv_from error ... continue collecting responses Kind(TimedOut)
[2023-09-12T10:36:37Z TRACE akri_onvif::discovery_impl::util] simple_onvif_discover - uris discovered by udp broadcast []
[2023-09-12T10:36:37Z TRACE akri_onvif::discovery_impl::util] simple_onvif_discover - uris after filtering by scopes {}
[2023-09-12T10:36:37Z INFO akri_onvif::discovery_impl::util] simple_onvif_discover - devices: {}

@kate-goldenring
Copy link
Contributor

@ccloud do your cameras require authentication? If so, you can configure kubernetes secrets to ensure the cameras can be authenticated during discovery (to determine properties for filtering): https://docs.akri.sh/architecture/agent-in-depth#passing-additional-properties-to-discovery-handlers.

@johnsonshih I can't remember, but do we have plans for enabling discovery without authentication (using a different identifier for cameras than ones that need auth)?

@ccloud622
Copy link
Author

Hi Kate,

We did tried to create secrets and added into the discovery properties of the configuration but it is still not discovering the devices attached to the network. Our camera shows remote discovery as disabled, but wsdiscovery is enabled for it.

Is there a way to get detail logging of the soap request to check if authentication is getting picked up or not and if there is a way we can bypass discovery handler (if we have the IP address of the camera) so that the broker can be created through it.

@johnsonshih
Copy link
Contributor

From the onvif discovery handler trace, it looks like the camera doesn't respond to the WS Discovery Probe message. https://github.com/project-akri/akri/blob/main/discovery-handlers/onvif/src/discovery_impl.rs#L737
Please make sure the camera is reachable from the cluster and is discoverable.

Once your camera is discoverable, please uses Akri v0.12.9 and remove ip and mac address filters in Akri Configuration discoveryDetails. The Onvif discovery handler in v0.12.9 had changed to discover authentication enabled Onvif cameras as long as the ip and mac addresses are not used (it requires credential to get camera's ip and mac address). The Onvif discovery handler exposes camera's uuid to broker. The broker needs credential to access the camera, it can use the uuid as a hint to decide what credential to use.
you can check the doc for the secret usage: https://docs.akri.sh/discovery-handlers/onvif#discovery-handler-discovery-properties-settings

the demo contains end-to-end flow for discovering/accessing authentication enabled Onvif cameras: https://docs.akri.sh/demos/onvif-authentication-access

@lilustga
Copy link

lilustga commented Dec 5, 2023

@ccloud622 do you feel like the issue is resolved?

@kate-goldenring
Copy link
Contributor

@ccloud622 we are closing this issue and marking it as resolved, but please reopen it if your issue is persisting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

4 participants