Comments (3)
Hello @TheDizzyEgg,
Do you have some sample code for the onvif operations you are doing?
from easy_onvif.
This is the most basic example:
void main(List arguments) async {
Onvif testOnvif = await Onvif.connect(host: '192.168.0.40', username: 'admin', password: 'password');
print('Hello world: ${dart_onvif.calculate()}!');
}
Throws the following errors:
‼️ 15:41:44.174242 ERROR UI Loggy - Onvif - ERROR: DioError [DioErrorType.response]: Http status error [500] ‼️ 15:41:44.207244 ERROR UI Loggy - Onvif - ERROR: DioError [DioErrorType.response]: Http status error [400] Unhandled exception: Exception: Error code: {Code: {Value: {$: SOAP-ENV:Sender}, Subcode: {Value: {$: ter:NotAuthorized}}}, Reason: {Text: {@xml:lang: en, $: Sender not authorized}}, Detail: {Text: {$: The action requested requires authorization and the sender is not authorized}}} #0 Soap.send (package:easy_onvif/src/soap.dart:43:11) <asynchronous suspension> #1 Soap.retrieveEnvelope (package:easy_onvif/src/soap.dart:59:26) <asynchronous suspension> #2 DeviceManagement.getCapabilities (package:easy_onvif/src/device_management.dart:32:22) <asynchronous suspension> #3 Onvif.initialize (package:easy_onvif/src/onvif_base.dart:124:28) <asynchronous suspension> #4 Onvif.connect (package:easy_onvif/src/onvif_base.dart:87:5) <asynchronous suspension> #5 main (file:///C:/Users/dizzy.egg/Dart/dart_onvif/bin/dart_onvif.dart:6:21) <asynchronous suspension>
from easy_onvif.
Sorry @TheDizzyEgg , the sample you've given doesn't make sense. Try something like:
void main(List<String> arguments) async {
// get connection information from the config.yaml file
final config = loadYaml(File('example/config.yaml').readAsStringSync());
// configure device connection
final onvif = await Onvif.connect(
host: config['host'],
username: config['username'],
password: config['password'],
logOptions: const LogOptions(
LogLevel.all,
stackTraceLevel: LogLevel.error,
),
printer: const PrettyPrinter(
showColors: true,
));
// get device info
var deviceInfo = await onvif.deviceManagement.getDeviceInformation();
print('Manufacturer: ${deviceInfo.manufacturer}');
print('Model: ${deviceInfo.model}');
}
from easy_onvif.
Related Issues (20)
- [2.1.0-dev11] error during onvif.getProfiles() device media1 HOT 2
- [2.1.0-dev11] error during onvif.getStreamUri() device media1 HOT 2
- [2.1.0-dev.14] onvif.mediaSupportLevel HOT 2
- Flutter example application cannot run successfully HOT 2
- RTSP port in the getStreamUri response not correct HOT 3
- camera recording HOT 2
- Is it possible to check if Onvif connect failed? HOT 2
- Onvif Imaging Profile HOT 3
- MulticastProbe with Auth HOT 3
- onvif discovery crash in windows HOT 6
- using CLI for testing causes a crash on onvif probe list-devices HOT 1
- Unable to get preset HOT 26
- new specifications support--thermal interface HOT 2
- How send audio stream to camera ? HOT 3
- Couldn't connect with Ezviz H8c camera HOT 3
- BUG: get-capabilities method is breaking for some cameras HOT 4
- BUG: Camera movement command is not working for some cameras HOT 16
- DioException [receive timeout]: The request HOT 10
- getStreamUri doesn't connect to sub stream of Onvif camera HOT 5
- Actions that require authentication no longer work HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from easy_onvif.