faithoflifedev / easy_onvif_workspace

This package works with a variety of ONVIF compatible devices allowing for IP Cameras and NVRs (network video recorders) to be integrated into Dart and Flutter applications.
33 stars 21 forks source link

onvif probe does not work with brands that use different onvif ports #33

Closed jonasbernardo closed 1 year ago

jonasbernardo commented 1 year ago

for example i bought a camera that uses onvif port 8899, i had to change to port 80 for onvif probe command of this package to work on the link below is a list of ports used for different brands https://www.camapp365.com/technical/rtsp-and-onvif-ports

faithoflifedev commented 1 year ago

Hi @jonasbernardo, from your description, I'm not clear on what the problem you're experiencing is.

For instance, if you run onvif probe and it returns an XAddrs for a device like http://192.168.1.54:85/onvif/device_service meaning the device is available on port 85 and usually the web interfase for that device can be reached in the browser with the url http://192.168.1.54:85.

Now if you want to connect to that device with further onvif cli commands you can first run:

onvif authorize

Where, when asked for host you would give http://192.168.1.54:85 (the host and port), then provide the username and password for the device.

Assuming all of the provided info is correct, you could then run additional cli command like:

onvif device-management get-device-information

Alternatively you can do the same thing with dart code:

final onvif = await Onvif.connect(
 host: 'http://192.168.1.54:85',
 username: [username],
 password: [password]);

var deviceInfo = await onvif.deviceManagement.getDeviceInformation();

print(deviceInfo);
faithoflifedev commented 1 year ago

I'm closing this since there's been no activity.