Closed anhthoai closed 2 years ago
Hi @anhthoai ,
The error you provided shows that the "getProfiles" method is not implemented on your device.
I've just published easy_onvif 1.0.0-dev.2, which does not use "getProfiles" as part of the initialization after connecting to the device. Let me know if this updated package works for your device.
Hi @anhthoai , I believe I have this resolved with v1.0.2
Hello, I test your library with this: `var onvif = Onvif(host: '192.168.1.11', username: 'admin', password: 'admin@123456'); await onvif.initialize(); var deviceInfo = await onvif.deviceManagement.getDeviceInformation(); print(deviceInfo.model);
var profiles = await onvif.media.getProfiles(); profiles.forEach((element) { print(element.name + ' ' + element.token); }); var profileToken = profiles[0].token; print(profileToken); `
But I get this error, could you please have a look? `C:/flutter/bin/cache/dart-sdk/bin/dart.exe --enable-asserts C:\development\easy_onvif\test\onvif_test.dart IPC-B122-PF28 Unhandled exception: Exception: Error code: {Code: {Value: {$: SOAP-ENV:Receiver}, Subcode: {Value: {$: ter:ActionNotSupported}}}, Reason: {Text: {@xml:lang: en, $: Optional Action Not Implemented}}, Detail: {}}
0 Soap.send (package:easy_onvif/src/soap.dart:29:11)