Giter Site home page Giter Site logo

faithoflifedev / easy_onvif Goto Github PK

View Code? Open in Web Editor NEW
27.0 3.0 17.0 1.44 MB

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.

License: MIT License

Dart 95.38% Kotlin 0.02% Ruby 0.17% Swift 0.09% Objective-C 0.01% CMake 1.29% C++ 2.87% C 0.18%

easy_onvif's Issues

[2.1.0-dev11] error during onvif.getProfiles() device media1

Hi,

i am getting: type 'Null' is not a subtype of type 'Map<String, dynamic>' in type cast

I've debugged the code and the problem is given by the Multicast field which is an empty map (ie. { ..., multicast:{}, ...}).

The exception fire in the generated code:

video_encoder_configuration.g.dart

      multiCast: json['Multicast'] == null
          ? null
          : MulticastConfiguration.fromJson(
              json['Multicast'] as Map<String, dynamic>),

The problem is also present in the stable release
Can you make it nullable? Thank you

Unable to get preset

Version:

Flutter 3.13.6 • channel stable • https://github.com/flutter/flutter.git
Framework • revision ead455963c (9 weeks ago) • 2023-09-26 18:28:17 -0700
Engine • revision a794cf2681
Tools • Dart 3.1.3 • DevTools 2.25.0

Dependencies:

  easy_onvif: ^2.1.3+3
  loggy: ^2.0.3

Reproduceable Code:

import 'dart:developer';

import 'package:easy_onvif/onvif.dart';
import 'package:flutter/material.dart';
import 'package:loggy/loggy.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      title: 'Flutter Demo',
      home: MyHomePage(),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({Key? key}) : super(key: key);

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  final OnVIFService onvifService = OnVIFService();

  @override
  void initState() {
    init();
    super.initState();
  }

  init() async {
    await onvifService.connect(ip: "10.201.1.6");
    onvifService.getToken().then((value) {
      onvifService.getPresets();
    });
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Onvif Test'),
        centerTitle: true,
      ),
      body: Container(),
    );
  }
}

class OnVIFService {
  late final Onvif onvif;
  String? token;

  Future<void> connect({required String ip}) async {
    onvif = await Onvif.connect(
        host: ip,
        username: 'admin',
        password: '123456',
        logOptions: const LogOptions(
          LogLevel.debug,
          stackTraceLevel: LogLevel.error,
        ),
        printer: const PrettyPrinter(
          showColors: true,
        ));

    log('OnVIFService: connected to $ip');
  }

  Future<void> getToken() async {
    final profiles = await onvif.media.getProfiles();
    final profile = profiles.last;
    token = profile.token;

    log('OnVIFService: got token $token');
  }

  Future<String> getSnapshot() async {
    final snapshot = await onvif.media.getSnapshotUri(token!);
    log('OnVIFService: got snapshot $snapshot');
    return snapshot;
  }

  Future<void> getPresets() async {
    final presets = await onvif.ptz.getPresets(token!, limit: 10);
    log('OnVIFService: got presets $presets');
  }
}

Error Log:

Performing hot restart...
Syncing files to device SM A135F...
Restarted application in 3,081ms.
I/flutter (22608): 👻 18:02:56.505226 INFO     UI Loggy - Onvif - initializing ...
I/flutter (22608): 🐛 18:02:56.556251 DEBUG    UI Loggy - DeviceManagement - getSystemDateAndTime
I/flutter (22608): 🐛 18:02:57.882572 DEBUG    UI Loggy - LoggingInterceptors - URI: http://10.201.1.6/onvif/device_service
I/flutter (22608): 🐛 18:02:57.883507 DEBUG    UI Loggy - LoggingInterceptors - REQUEST:
I/flutter (22608): <?xml version="1.0" encoding="UTF-8"?><s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing"><s:Header/><s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><GetSystemDateAndTime xmlns="http://www.onvif.org/ver10/device/wsdl"/></s:Body></s:Envelope>
I/flutter (22608): 🐛 18:02:58.465847 DEBUG    UI Loggy - LoggingInterceptors - RESPONSE:
I/flutter (22608): <?xml version="1.0" encoding="UTF-8"?>
I/flutter (22608): <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsdd="http://schemas.xmlsoap.org/ws/2005/04/discovery" xmlns:chan="http://schemas.microsoft.com/ws/2005/02/duplex" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:xmime="http://www.w3.org/2005/05/xmlmime" xmlns:xop="http://www.w3.org/2004/08/xop/include" xmlns:wsrfbf="http://docs.oasis-open.org/wsrf/bf-2" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:wstop="http://docs.oasis-open.org/wsn/t-1" xmlns:wsrfr="http://docs.oasis-open.org/wsrf/r-2" xmlns:tan="http://www.onvif.org/ver20/analytics/wsdl" xmlns:tdn="http://www.onvif.org/ver10/network/wsdl" xmlns:tds="http://www.onvif.or
I/flutter (22608): 🐛 18:02:58.918573 DEBUG    UI Loggy - DeviceManagement - getServices
I/flutter (22608): 🐛 18:02:58.998275 DEBUG    UI Loggy - LoggingInterceptors - URI: http://10.201.1.6/onvif/device_service
I/flutter (22608): 🐛 18:02:58.999242 DEBUG    UI Loggy - LoggingInterceptors - REQUEST:
I/flutter (22608): <?xml version="1.0" encoding="UTF-8"?><s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing"><s:Header><Security xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" s:mustUnderstand="1"><UsernameToken><Username>admin</Username><Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">o8RXJ33+JIE3Pks/EleFA8ltqeU=</Password><Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">oH2fgyza5Y5/tofPXxF5pw==</Nonce><Created xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2018-01-01T02:55:58.016049Z</Created></UsernameToken></Security></s:Header><s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.
I/flutter (22608): 🐛 18:02:59.045113 DEBUG    UI Loggy - LoggingInterceptors - RESPONSE:
I/flutter (22608): <?xml version="1.0" encoding="UTF-8"?>
I/flutter (22608): <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsdd="http://schemas.xmlsoap.org/ws/2005/04/discovery" xmlns:chan="http://schemas.microsoft.com/ws/2005/02/duplex" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:xmime="http://www.w3.org/2005/05/xmlmime" xmlns:xop="http://www.w3.org/2004/08/xop/include" xmlns:wsrfbf="http://docs.oasis-open.org/wsrf/bf-2" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:wstop="http://docs.oasis-open.org/wsn/t-1" xmlns:wsrfr="http://docs.oasis-open.org/wsrf/r-2" xmlns:tan="http://www.onvif.org/ver20/analytics/wsdl" xmlns:tdn="http://www.onvif.org/ver10/network/wsdl" xmlns:tds="http://www.onvif.or
I/flutter (22608): 👻 18:02:59.154024 INFO     UI Loggy - Onvif - initialization complete
[log] OnVIFService: connected to 10.201.1.6
I/flutter (22608): 🐛 18:02:59.163917 DEBUG    UI Loggy - Media2 - getProfiles
I/flutter (22608): 🐛 18:02:59.177832 DEBUG    UI Loggy - LoggingInterceptors - URI: http://10.201.1.6/Media2
I/flutter (22608): 🐛 18:02:59.178787 DEBUG    UI Loggy - LoggingInterceptors - REQUEST:
I/flutter (22608): <?xml version="1.0" encoding="UTF-8"?><s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing"><s:Header><Security xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" s:mustUnderstand="1"><UsernameToken><Username>admin</Username><Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">vnevNkx/gfmeGnFqpHpImil97Ds=</Password><Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">VHWQZEHefc7a6VH3/CcfsQ==</Nonce><Created xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2018-01-01T02:55:58.251876Z</Created></UsernameToken></Security></s:Header><s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.
I/flutter (22608): 🐛 18:02:59.227557 DEBUG    UI Loggy - LoggingInterceptors - RESPONSE:
I/flutter (22608): <?xml version="1.0" encoding="UTF-8"?>
I/flutter (22608): <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsdd="http://schemas.xmlsoap.org/ws/2005/04/discovery" xmlns:chan="http://schemas.microsoft.com/ws/2005/02/duplex" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:xmime="http://www.w3.org/2005/05/xmlmime" xmlns:xop="http://www.w3.org/2004/08/xop/include" xmlns:wsrfbf="http://docs.oasis-open.org/wsrf/bf-2" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:wstop="http://docs.oasis-open.org/wsn/t-1" xmlns:wsrfr="http://docs.oasis-open.org/wsrf/r-2" xmlns:tan="http://www.onvif.org/ver20/analytics/wsdl" xmlns:tdn="http://www.onvif.org/ver10/network/wsdl" xmlns:tds="http://www.onvif.or
I/flutter (22608): 🐛 18:02:59.354876 DEBUG    UI Loggy - Ptz - getPresets
[log] OnVIFService: got token SubStream
I/flutter (22608): 🐛 18:02:59.365670 DEBUG    UI Loggy - LoggingInterceptors - URI: http://10.201.1.6/PTZ
I/flutter (22608): 🐛 18:02:59.366529 DEBUG    UI Loggy - LoggingInterceptors - REQUEST:
I/flutter (22608): <?xml version="1.0" encoding="UTF-8"?><s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing"><s:Header><Security xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" s:mustUnderstand="1"><UsernameToken><Username>admin</Username><Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">fXWUDhafJl0s01KRVP4IiS+BUaM=</Password><Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">xsKkeq+kQNXw4SmSE+0Y+w==</Nonce><Created xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2018-01-01T02:55:58.443815Z</Created></UsernameToken></Security></s:Header><s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.
I/flutter (22608): ‼️ 18:02:59.406946 ERROR    UI Loggy - LoggingInterceptors - ERROR:
I/flutter (22608): DioException [bad response]: This exception was thrown because the response has a status code of 400 and RequestOptions.validateStatus was configured to throw for this status code.
I/flutter (22608): The status code of 400 has the following meaning: "Client error - the request contains bad syntax or cannot be fulfilled"
I/flutter (22608): Read more about status codes at https://developer.mozilla.org/en-US/docs/Web/HTTP/Status
I/flutter (22608): In order to resolve this exception you typically have either to verify and fix your request code or you have to fix the server code.
I/flutter (22608): 
I/flutter (22608): #0      Loggy.log (package:loggy/src/loggy.dart:225:33)
I/flutter (22608): #1      Loggy.error (package:loggy/src/loggy.dart:269:7)
I/flutter (22608): #2      LoggingInterceptors.onError (package:easy_onvif/src/util/logging_interceptors.dart:28:11)
I/flutter (22608): #3      DioMixin.fetch.errorInterceptorWrapper.<anonymous closure>.handleError (package:dio/src/dio_mixin.dart:429:22)
I/flutter (22608): #4      new Future.<anonymous closure> (dart:async/future.dart:256:37)
I/flutter (22608): #5      Timer._createTimer.<anonymous closure> (dart:async-patch/timer_patch.dart:18:15)
I/flutter (22608): #6      _Timer._runTimers (dart:isolate-patch/timer_impl.dart:398:19)
I/flutter (22608): #7      _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:429:5)
I/flutter (22608): #8      _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:189:12)
I/flutter (22608): ‼️ 18:02:59.411994 ERROR    UI Loggy - Transport - ERROR RESPONSE:
I/flutter (22608): <?xml version="1.0" encoding="UTF-8"?>
I/flutter (22608): <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsdd="http://schemas.xmlsoap.org/ws/2005/04/discovery" xmlns:chan="http://schemas.microsoft.com/ws/2005/02/duplex" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:xmime="http://www.w3.org/2005/05/xmlmime" xmlns:xop="http://www.w3.org/2004/08/xop/include" xmlns:wsrfbf="http://docs.oasis-open.org/wsrf/bf-2" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:wstop="http://docs.oasis-open.org/wsn/t-1" xmlns:wsrfr="http://docs.oasis-open.org/wsrf/r-2" xmlns:tan="http://www.onvif.org/ver20/analytics/wsdl" xmlns:tdn="http://www.onvif.org/ver10/network/wsdl" xmlns:tds="http://www.onvif.org/ve
I/flutter (22608): #0      Loggy.log (package:loggy/src/loggy.dart:225:33)
I/flutter (22608): #1      Loggy.error (package:loggy/src/loggy.dart:269:7)
I/flutter (22608): #2      Transport.sendRequest (package:easy_onvif/src/soap/transport.dart:39:17)
I/flutter (22608): <asynchronous suspension>
I/flutter (22608): #3      Ptz.getPresets (package:easy_onvif/src/ptz.dart:204:22)
I/flutter (22608): <asynchronous suspension>
I/flutter (22608): #4      OnVIFService.getPresets (package:longshot_playground/main.dart:93:21)
I/flutter (22608): <asynchronous suspension>
E/flutter (22608): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Exception: Error code: {"Code":{"Value":"SOAP-ENV:Sender","Subcode":{"Value":{"$":"wsa:ActionNotSupported"}}},"Reason":{"lang":"en","note":"The [action] cannot be processed at the receiver."},"Node":null,"Role":null,"Detail":null}
E/flutter (22608): #0      Transport.sendRequest (package:easy_onvif/src/soap/transport.dart:46:13)
E/flutter (22608): <asynchronous suspension>
E/flutter (22608): #1      Ptz.getPresets (package:easy_onvif/src/ptz.dart:204:22)
E/flutter (22608): <asynchronous suspension>
E/flutter (22608): #2      OnVIFService.getPresets (package:longshot_playground/main.dart:93:21)
E/flutter (22608): <asynchronous suspension>
E/flutter (22608): 

Camera Model: Link

IP IR SPEED DEOM CAMERA
5.0 MEGA PIXEL
MODEL-IP-MU50-36S/MC-B

continuousMove - how to use?

Hello,

I'm trying to use cointinuousMove like absoluteMove or relativeMove but in that case I have error called "Null check operator used on a null value".

For example when I'm using absoluteMove:

await insertO.ptz.absoluteMove(
      profs[0].token,
      PtzPosition(
          panTilt: PanTilt(
              x: (status.position.panTilt!.x <= -0.97) ? status.position.panTilt!.x +
                  (status.position.panTilt!.x * -1) : status.position
                  .panTilt!.x - 0.035,
              y: status.position.panTilt!.y
          )
      )
  );

or

int step = 50;
await insertO.ptz.moveLeft(profs[0].token, step);

then that is working, but it is step moveing, not continuous.

But when I'm trying:

await insertO.ptz.continuousMove(
      profs[0].token,
      PtzPosition(
          panTilt: PanTilt(
              x: (status.position.panTilt!.x <= -0.97) ? status.position.panTilt!.x +
                  (status.position.panTilt!.x * -1) : status.position
                  .panTilt!.x - 0.035,
              y: status.position.panTilt!.y
          )
      )
  );

or:

int step = 25;
await insertO.ptz.continuousMove(
      profs[0].token,
      PtzPosition(
          panTilt: PanTilt.fromInt(x: 0 - step, y: 0),
      )
  );

Then I have error from log:

[log] {"Position":{"PanTilt":{"@x":-0.195,"@y":0.727778,"@space":"http://www.onvif.org/ver10/tptz/PanTiltSpaces/PositionGenericSpace"},"Zoom":{"@x":0.0,"@space":"http://www.onvif.org/ver10/tptz/ZoomSpaces/PositionGenericSpace"}},"Error":"NO error","UtcTime":"2022-08-11T01:48:01.000Z"}
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Null check operator used on a null value
#0      SoapRequest.continuousMove.<anonymous closure>.<anonymous closure>.<anonymous closure> (package:easy_onvif/src/soap.dart:557:47)
#1      XmlBuilder._insert (package:xml/src/xml/builder.dart:310:12)
#2      XmlBuilder.element (package:xml/src/xml/builder.dart:177:9)
#3      SoapRequest.continuousMove.<anonymous closure>.<anonymous closure> (package:easy_onvif/src/soap.dart:555:17)
#4      XmlBuilder._insert (package:xml/src/xml/builder.dart:310:12)
#5      XmlBuilder.element (package:xml/src/xml/builder.dart:177:9)
#6      SoapRequest.continuousMove.<anonymous closure> (package:easy_onvif/src/soap.dart:546:15)
#7      XmlBuilder._insert (package:xml/src/xml/builder.dart:310:12)
#8      XmlBuilder.element (package:xml/src/xml/builder.dart:177:9)
#9      SoapRequest.continuousMove (package:easy_onvif/src/soap.dart:538:13)
#10     Ptz.continuousMove (package:easy_onvif/src/ptz.dart:50:25)
#11     onvifMoveLeft (package:radio_camview/onvif_manager.dart:52:21)
<asynchronous suspension>

I'm really basic in programming with Dart and Flutter, so I will be really thankful if you will help me with that problem.

[2.1.0-dev11] error during onvif.getStreamUri() device media1

Hi,

I am getting this error during getStreamUri: {"Code":{"Value":"SOAP-ENV:Sender","Subcode":null},"Reason":{"lang":"en","note":"Validation constraint violation: data type mismatch in element 'Stream'"},"Node":null,"Role":null,"Detail":null}

This is the soap request before my changes

<s:Envelope
	xmlns:s="http://www.w3.org/2003/05/soap-envelope"
	xmlns:a="http://www.w3.org/2005/08/addressing">
	<s:Header>
		<Security
			xmlns:s="http://www.w3.org/2003/05/soap-envelope"
			xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" s:mustUnderstand="1">
			<UsernameToken>
				<Username>replaced</Username>
				<Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">replaced</Password>
				<Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">replaced</Nonce>
				<Created
					xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2023-03-16T22:12:30.225470Z
				</Created>
			</UsernameToken>
		</Security>
	</s:Header>
	<s:Body
		xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
		xmlns:xsd="http://www.w3.org/2001/XMLSchema">
		<GetStreamUri
			xmlns="http://www.onvif.org/ver10/media/wsdl">
			<StreamSetup
				xmlns="http://www.onvif.org/ver10/media/wsdl">
				<Stream
					xmlns="http://www.onvif.org/ver10/media/wsdl">RTP-Unicast
				</Stream>
				<Transport
					xmlns="http://www.onvif.org/ver10/media/wsdl">
					<Protocol
						xmlns="http://www.onvif.org/ver10/media/wsdl">RTSP
					</Protocol>
				</Transport>
			</StreamSetup>
			<ProfileToken>Profile_token3</ProfileToken>
		</GetStreamUri>
	</s:Body>
</s:Envelope>

I don't know if it is always correct, but I've solved the problem as follow (based on "ONVIF Appicaltion Programmer's Guide" - B.4.1.2 ):

soap/media1.dart

  /// XML for the [getStreamUri], requires a [profileToken]
  static XmlDocumentFragment getStreamUri(String profileToken,
      {required StreamSetup streamSetup}) {
    Transport.builder.element('GetStreamUri', nest: () {
      Transport.builder.namespace(Xmlns.trt);

      Transport.builder.element('StreamSetup', nest: () {
        Transport.builder.namespace(Xmlns.trt);
        Transport.builder.element('Stream', nest: () {
          Transport.builder.namespace(Xmlns.tt);
          Transport.builder.text(streamSetup.stream);
        });
        Transport.builder.element('Transport', nest: () {
          Transport.builder.namespace(Xmlns.tt);
          Transport.builder.element('Protocol', nest: () {
            Transport.builder.namespace(Xmlns.tt);
            Transport.builder.text(streamSetup.transport.protocol);
          });
        });
      });

      Transport.builder.element('ProfileToken', nest: () {
        Transport.builder.text(profileToken);
      });
    });

Unhandled Exception: type 'Null' is not a subtype of type 'Map<String, dynamic>' in type cast on calling Onvif.connect

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: type 'Null' is not a subtype of type 'Map<String, dynamic>' in type cast
#0 _$SystemDateAndTimeFromJson (package:easy_onvif/src/model/system_date_and_time.g.dart:12:32)
#1 new SystemDateAndTime.fromJson (package:easy_onvif/src/model/system_date_and_time.dart:46:7)
#2 _$GetSystemDateAndTimeResponseFromJson (package:easy_onvif/src/model/system_date_time_response.g.dart:12:25)
#3 new GetSystemDateAndTimeResponse.fromJson (package:easy_onvif/src/model/system_date_time_response.dart:18:7)
#4 _$BodyFromJson (package:easy_onvif/src/model/body.g.dart:43:42)
#5 new Body.fromJson (package:easy_onvif/src/model/body.dart:214:55)
#6 _$EnvelopeFromJson (package:easy_onvif/src/model/envelope.g.dart:10:18)
#7 new Envelope.fromJson (package:easy_onvif/src/model/envelope.dart:20:7)
#8 new Envelope.fromXml (package:easy_onvif/src/model/envelope.dart:23:16)
#9 Soap.retrieveEnvelope (package:easy_onvif/src/soap.dart:67:21)

#10 DeviceManagement.getSystemDateAndTime (package:easy_onvif/src/device_management.dart:150:22)

#11 Onvif.initialize (package:easy_onvif/src/onvif_base.dart:96:22)

#12 Onvif.connect (package:easy_onvif/src/onvif_base.dart:87:5)

#13 _MyHomePageState._incrementCounter (package:onvif_test/main.dart:52:19)

HttpException: Invalid response line

hi, I tried the 0.0.9 with the following exception when making the ptz operation with one valid profileToken.

E/flutter (28604): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: Exception: DioError [DioErrorType.other]: HttpException: Invalid response line, uri = http://192.168.1.103:2020/onvif/service
E/flutter (28604): #0 DioMixin.assureDioError (package:dio/src/dio_mixin.dart:819:20)
E/flutter (28604): #1 DioMixin._dispatchRequest (package:dio/src/dio_mixin.dart:678:13)
E/flutter (28604):
E/flutter (28604): #2 DioMixin.fetch.. (package:dio/src/dio_mixin.dart)
E/flutter (28604):
E/flutter (28604):
E/flutter (28604): #0 Soap.send (package:easy_onvif/src/soap.dart:34:7)
E/flutter (28604):
E/flutter (28604): #1 Soap.retrieveEnvlope (package:easy_onvif/src/soap.dart:43:26)
E/flutter (28604):
E/flutter (28604): #2 Ptz.continuousMove (package:easy_onvif/src/ptz.dart:30:5)
E/flutter (28604):
E/flutter (28604): #3 Ptz._zoom (package:easy_onvif/src/ptz.dart:192:5)
E/flutter (28604):
E/flutter (28604): #4 Ptz.zoomIn (package:easy_onvif/src/ptz.dart:203:5)

I do not have the response for you this time as it's null as with the error.
However, I attached the my debug screen capture for you to refer to which might be better than nothing.
ptz_error_screen

br,
William

Unhandled Exception: type 'Null' is not a subtype of type 'Map<String, dynamic>' in type cast

hi , it's me again. i tried the v0.08 and it did pass the onvif.initialize(); but failed as in the deviceInfo = await onvif.deviceManagement.getDeviceInformation();, the logcat shows the following:
E/flutter (25410): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: type 'Null' is not a subtype of type 'Map<String, dynamic>' in type cast
E/flutter (25410): #0 _$HeaderFromJson (package:easy_onvif/model/header.g.dart:10:48)
E/flutter (25410): #1 new Header.fromJson (package:easy_onvif/model/header.dart:36:57)
E/flutter (25410): #2 _$EnvelopeFromJson (package:easy_onvif/model/envelope.g.dart:13:20)
E/flutter (25410): #3 new Envelope.fromJson (package:easy_onvif/model/envelope.dart:19:7)
E/flutter (25410): #4 Soap.retrieveEnvlope (package:easy_onvif/src/soap.dart:47:31)
E/flutter (25410):
E/flutter (25410): #5 DeviceManagement.getDeviceInformation (package:easy_onvif/src/deviceManagement.dart:57:22)

and here is the soap response from the nvt for your information:
getDeviceInformation.txt

Couldn't connect with Ezviz H8c camera

Can any one tell me how to connect with Ezviz H8c camera?
I had write this method to connect with the camera

Future<void> connect({required String ip}) async {
    try {
      onvif = await Onvif.connect(
        host: ip,
        username: 'admin', // Replace with your username
        password: 'saem@123', // Replace with your password
      );

      log('💚 ✅🎄🍀🌲🐍 OnVIFService: connected to $ip');

      await getToken(); // Fetch token after successful connection
    } catch (error) {
      log('💚 ✅🎄🍀🌲🐍 OnVIFService: connection error: $error');
    }
  }

here I called the method like this

  onLongPress: () async {
          await onvifService
              .connect(ip: '192.168.0.103:8000')
              .then((value) => onvifService.moveLeft());
        },
        child: const Text("PTZ"));

What do I need to do for ptz control?

camera recording

Can the plugin provide methods to control the camera for recording, such as starting and ending recording? And also add the feature to get stream address of playback video?

[2.1.0-dev.14] onvif.mediaSupportLevel

Hi, I noticed that there is a mediaSupportLevel property in the Onvif class. In my case this property is always set to none.

I added this check in initialize():

...
if(media1!=null && media2!=null){
  mediaSupportLevel=MediaSupportLevel.both;
}else if(media2!=null && media1==null){
  mediaSupportLevel=MediaSupportLevel.two;
}else if(media2==null && media1!=null){
  mediaSupportLevel=MediaSupportLevel.one;
}
...

Do you think it can be useful or are there better ways to know the supported media profile?

For example, at the moment i'm using that property to check the media supported level and after to call the correct getSnapshotUri method. In that case I'don't have a MixedProfile instance (profileToken is a String saved locally).

    if(onvif.mediaSupportLevel==MediaSupportLevel.both || onvif.mediaSupportLevel==MediaSupportLevel.two){
      snapshotUri= await onvif.media.getSnapshotUri(profileToken);
    }else{
      snapshotUri= await onvif.media.media1.getSnapshotUri(profileToken).then((value) => value.uri);
    }

Thanks in advance

getProfiles error

I have a problem with flutter sdk: '>=2.18.0 <3.0.0` on MacOS 12.5.1 when i try to connect to a camera and i call getProfiles:

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: type 'Null' is not a subtype of type 'Map<String, dynamic>' in type cast #0 _$VideoEncoderConfigurationFromJson (package:easy_onvif/model/video_encoder_configuration.g.dart:15:53) #1 new VideoEncoderConfiguration.fromJson (package:easy_onvif/model/video_encoder_configuration.dart:76:7) #2 _$ProfileFromJson (package:easy_onvif/model/profile.g.dart:23:39) #3 new Profile.fromJson (package:easy_onvif/model/profile.dart:65:7) #4 _$GetProfilesResponseFromJson.<anonymous closure> (package:easy_onvif/model/profiles_response.g.dart:12:31) #5 MappedListIterable.elementAt (dart:_internal/iterable.dart:413:31) #6 ListIterator.moveNext (dart:_internal/iterable.dart:342:26) #7 new _GrowableList._ofEfficientLengthIterable (dart:core-patch/growable_array.dart:189:27) #8 new _GrowableList.of (dart:core-patch/growable_array.dart:150:28) #9 new List.of (dart:core-patch/array_patch.dart:51:28) #10 ListIterable.toList (dart:_internal/iterable.dart:213:44) #11 _$GetProfilesResponseFromJson (package:easy_onvif/model/profiles_response.g.dart:13:12) #12 new GetProfilesResponse.fromJson (package:easy_onvif/model/profiles_response.dart:22:7) #13 _$BodyFromJson (package:easy_onvif/model/body.g.dart:76:33) #14 new Body.fromJson (package:easy_onvif/model/body.dart:201:55) #15 _$EnvelopeFromJson (package:easy_onvif/model/envelope.g.dart:10:18) #16 new Envelope.fromJson (package:easy_onvif/model/envelope.dart:20:7) #17 new Envelope.fromXml (package:easy_onvif/model/envelope.dart:23:16) #18 Soap.retrieveEnvelope (package:easy_onvif/src/soap.dart:67:21) <asynchronous suspension> #19 Media.getProfiles (package:easy_onvif/src/media.dart:45:22)

Package is not building (dependency problem)

Debug

Because every version of flutter from sdk depends on collection 1.16.0 and xml >=6.2.0 depends on collection ^1.17.0, flutter from sdk is incompatible with xml >=6.2.0.
And because easy_onvif >=2.0.13+11 depends on xml ^6.2.2, flutter from sdk is incompatible with easy_onvif >=2.0.13+11.
So, because cow depends on both flutter from sdk and easy_onvif ^2.0.13+13, version solving failed.
pub get failed (1; So, because cow depends on both flutter from sdk and easy_onvif ^2.0.13+13, version solving failed.)

Flutter version

Flutter 3.3.9 • channel stable • https://github.com/flutter/flutter.git
Framework • revision b8f7f1f986 (7 days ago) • 2022-11-23 06:43:51 +0900
Engine • revision 8f2221fbef
Tools • Dart 2.18.5 • DevTools 2.15.0

HttpException: Invalid response line

hi, I tried the 0.0.13 with my physical nvt calling the onvif.ptz.moveLeft(profileToken). This will lead to the following exceptions:
E/flutter (20637): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: Exception: DioError [DioErrorType.other]: HttpException: Invalid response line, uri = http://192.168.1.103:2020/onvif/service
E/flutter (20637): #0 DioMixin.assureDioError (package:dio/src/dio_mixin.dart:821:20)
E/flutter (20637): #1 DioMixin._dispatchRequest (package:dio/src/dio_mixin.dart:678:13)
E/flutter (20637):
E/flutter (20637): #2 DioMixin.fetch.. (package:dio/src/dio_mixin.dart)
E/flutter (20637):
E/flutter (20637):
E/flutter (20637): #0 Soap.send (package:easy_onvif/src/soap.dart:34:7)
E/flutter (20637):
E/flutter (20637): #1 Soap.retrieveEnvlope (package:easy_onvif/src/soap.dart:43:26)
E/flutter (20637):
E/flutter (20637): #2 Ptz.continuousMove (package:easy_onvif/src/ptz.dart:30:5)
E/flutter (20637):
E/flutter (20637): #3 Ptz._move (package:easy_onvif/src/ptz.dart:103:5)
E/flutter (20637):
E/flutter (20637): #4 Ptz.moveLeft (package:easy_onvif/src/ptz.dart:120:5)

My sample codes are as followings:
var onvif = Onvif(
// host: '192.168.1.102:8000',
host: '192.168.1.103:2020',
username: '',
password: '');
//initiate connection
await onvif.initialize();
//get device info
var deviceInfo = await onvif.deviceManagement.getDeviceInformation();
var profileToken = 'profile_1';
await onvif.ptz.moveLeft(profileToken);

please help to look into this issue next. The onvif server is only for your convenience to tackle the issue which is also applicable with my physical nvt too.

Example not work on Android

Tried to build with android. But, fail

No application found for TargetPlatform.android_arm64.
Is your project missing an android\AndroidManifest.xml?
Consider running "flutter create ." to create one.

getPresets() failed

Hello,

After call:

var presets = await insertO.ptz.getPresets(profs[0].token, limit: 15);

I'm getting error:

flutter: ‼️ 14:14:47.675264 ERROR    UI Loggy - Onvif - ERROR:
DioError [DioErrorType.response]: Http status error [500]
[ERROR:flutter/lib/ui/ui_dart_state.cc(198)] Unhandled Exception: Exception: Error code: {Code: {Value: {$: env:Receiver}, Subcode: {Value: {$: ter:ActionNotSupported}, Subcode: {Value: {$: ter:InvalidOperation}}}}, Reason: {Text: {@xml:lang: en, $: Optional Action Not Implemented}}}
#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      Ptz.getPresets (package:easy_onvif/src/ptz.dart:173:22)
<asynchronous suspension>

DioError Connection closed while receiving data

스크린샷 2023-01-03 오전 11 16 29

always thank you about wonderful package

I've used this package very well
but since last week onvif.media.getProfile doesn't work suddenly

initialize, onvif.connect, everything worked well execpt get profile
what should i do?

Thank you in advance

  • also is there any workaround to get profile token from cctv hardward directly?

using CLI for testing causes a crash on onvif probe list-devices

Im testing this lib for implementation and plugged in a brand new amcrest camera to my network and I am getting the following error running the probe command from the terminal.

onvif probe list-devices Unhandled exception: type 'Null' is not a subtype of type 'List<dynamic>' in type cast #0 ProbeMatch._listFromJson (package:easy_onvif/src/model/probe/probe_match.dart:123:20) #1 _$ProbeMatchFromJson (package:easy_onvif/src/model/probe/probe_match.g.dart:13:26) #2 new ProbeMatch.fromJson (package:easy_onvif/src/model/probe/probe_match.dart:61:7) #3 ProbeMatches._unbound (package:easy_onvif/src/model/probe/probe_matches.dart:31:24) #4 _$ProbeMatchesFromJson (package:easy_onvif/src/model/probe/probe_matches.g.dart:10:34) #5 new ProbeMatches.fromJson (package:easy_onvif/src/model/probe/probe_matches.dart:17:7) #6 MulticastProbe.probe.<anonymous closure> (package:easy_onvif/src/multicast_probe.dart:124:32) #7 _RootZone.runUnaryGuarded (dart:async/zone.dart:1594:10) #8 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339:11) #9 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7) #10 _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:784:19) #11 _StreamController._add (dart:async/stream_controller.dart:658:7) #12 _StreamController.add (dart:async/stream_controller.dart:606:5) #13 new _RawDatagramSocket.<anonymous closure> (dart:io-patch/socket_patch.dart:2535:33) #14 _NativeSocket.issueReadEvent.issue (dart:io-patch/socket_patch.dart:1379:14) #15 _microtaskLoop (dart:async/schedule_microtask.dart:40:21) #16 _startMicrotaskLoop (dart:async/schedule_microtask.dart:49:5) #17 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:123:13) #18 _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:190:5)

DioException [receive timeout]: The request

After making request for rtspUri with the profile token, these are error response i got:
Error fetching stream URI: Exception: DioException [receive timeout]: The request took longer than 0:00:10.000000 to receive data. It was aborted. To get rid of this exception, try raising the RequestOptions.receiveTimeout above the duration of 0:00:10.000000 or improve the response time of the server.
I/flutter ( 5161): Error fetching stream URI: Exception: DioException [unknown]: null
I/flutter ( 5161): Error: HttpException: Connection closed before full header was received, uri =

Can't get token

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) <asynchronous suspension> #1 Soap.retrieveEnvlope (package:easy_onvif/src/soap.dart:42:26) <asynchronous suspension> #2 Media.getProfiles (package:easy_onvif/src/media.dart:35:22) <asynchronous suspension> #3 main (file:///C:/development/easy_onvif/test/onvif_test.dart:15:18) <asynchronous suspension>

BUG: get-capabilities method is breaking for some cameras

Error:
type 'List<dynamic>' is not a subtype of type 'Map<String, dynamic>' in type cast

Error Log:

PS C:\Users\Admin\Documents\GitHub\Longshot-Flutter-App> onvif device-management get-capabilities --log-level all
👻 03:12:00.437214 INFO     UI Loggy - Onvif - initializing ...
🐛 03:12:00.446215 DEBUG    UI Loggy - DeviceManagement - getSystemDateAndTime
🐛 03:12:00.491216 DEBUG    UI Loggy - LoggingInterceptors - URI: http://10.201.1.12/onvif/device_service
🐛 03:12:00.491216 DEBUG    UI Loggy - LoggingInterceptors - REQUEST:
<?xml version="1.0" encoding="UTF-8"?><s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing">
<s:Header/><s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><GetSystemDateAndTime xmlns="
http://www.onvif.org/ver10/device/wsdl"/></s:Body></s:Envelope>
🐛 03:12:00.616230 DEBUG    UI Loggy - LoggingInterceptors - RESPONSE:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding" xmlns:xsi="htt
p://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" x
mlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xml
ns:xenc="http://www.w3.org/2001/04/xmlenc#" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-
200401-wss-wssecurity-secext-1.0.xsd" xmlns:xmime="http://tempuri.org/xmime.xsd" xmlns:xmime5="http://www.w3.org/2005/05/xmlmime" xmlns:xmime4="htt
p://www.w3.org/2004/11/xmlmime" xmlns:xop="http://www.w3.org/2004/08/xop/include" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:tds="http://ww
w.onvif.org/ver10/device/wsdl" xmlns:tmd="http://www.onvif.org/ver10/deviceIO/wsdl" xmlns:trt="http://www.onvif.org/ver10/media/wsdl" xmlns:tr2="ht
tp://www.onvif.org/ver20/media/wsdl" xmlns:trp="http://www.onvif.org/ver10/replay/wsdl" xmlns:tse="http://www.onvif.org/ver10/search/wsdl" xmlns:tp
tz="http://www.onvif.org/ver20/ptz/wsdl" xmlns:tptz1="http://www.onvif.org/ver10/ptz/wsdl" xmlns:timg="http://www.onvif.org/ver20/imaging/wsdl" xml
ns:timg1="http://www.onvif.org/ver10/imaging/wsdl" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:tan="http://www.onvif.org/ver20/analyti
cs/wsdl" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:extXsd="http://www.onvifext.org/ver10/extFunctions/wsdl" xmlns:tns1="http://www.onvi
f.org/ver10/topics" xmlns:ter="http://www.onvif.org/ver10/error" xmlns:tanae="http://www.onvif.org/ver20/analytics/wsdl/AnalyticsEngineBinding" xml
ns:tanre="http://www.onvif.org/ver20/analytics/wsdl/RuleEngineBinding">
        <SOAP-ENV:Body>
                <tds:GetSystemDateAndTimeResponse>
                        <tds:SystemDateAndTime>
                                <tt:DateTimeType>NTP</tt:DateTimeType>
                                <tt:DaylightSavings>false</tt:DaylightSavings>
                                <tt:TimeZone>
                                        <tt:TZ>CST+06:00</tt:TZ>
                                </tt:TimeZone>
                                <tt:UTCDateTime>
                                        <tt:Time>
                                                <tt:Hour>8</tt:Hour>
                                                <tt:Minute>35</tt:Minute>
                                                <tt:Second>21</tt:Second>
                                        </tt:Time>
                                        <tt:Date>
                                                <tt:Year>2024</tt:Year>
                                                <tt:Month>1</tt:Month>
                                                <tt:Day>8</tt:Day>
                                        </tt:Date>
                                </tt:UTCDateTime>
                                <tt:LocalDateTime>
                                        <tt:Time>
                                                <tt:Hour>2</tt:Hour>
                                                <tt:Minute>35</tt:Minute>
                                                <tt:Second>21</tt:Second>
                                        </tt:Time>
                                        <tt:Date>
                                                <tt:Year>2024</tt:Year>
                                                <tt:Month>1</tt:Month>
                                                <tt:Day>8</tt:Day>
                                        </tt:Date>
                                </tt:LocalDateTime>
                        </tds:SystemDateAndTime>
                </tds:GetSystemDateAndTimeResponse>
        </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

🐛 03:12:00.728234 DEBUG    UI Loggy - DeviceManagement - getServices
🐛 03:12:00.750238 DEBUG    UI Loggy - LoggingInterceptors - URI: http://10.201.1.12/onvif/device_service
🐛 03:12:00.751241 DEBUG    UI Loggy - LoggingInterceptors - REQUEST:
<?xml version="1.0" encoding="UTF-8"?><s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing">
<s:Header><Security xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-sec
ext-1.0.xsd" s:mustUnderstand="1"><UsernameToken><Username>admin</Username><Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-
username-token-profile-1.0#PasswordDigest">uUny1a0VNAh6rVRj1/LzhRtORr0=</Password><Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis
-200401-wss-soap-message-security-1.0#Base64Binary">b8kjGzOKvAGQZH5sI+qDbQ==</Nonce><Created xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-20
0401-wss-wssecurity-utility-1.0.xsd">2024-01-08T08:35:21.003999Z</Created></UsernameToken></Security></s:Header><s:Body xmlns:xsi="http://www.w3.or
g/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><GetServices xmlns="http://www.onvif.org/ver10/device/wsdl"><IncludeCapabil
ity>true</IncludeCapability></GetServices></s:Body></s:Envelope>
🐛 03:12:00.764238 DEBUG    UI Loggy - LoggingInterceptors - RESPONSE:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding" xmlns:xsi="htt
p://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" x
mlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xml
ns:xenc="http://www.w3.org/2001/04/xmlenc#" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-
200401-wss-wssecurity-secext-1.0.xsd" xmlns:xmime="http://tempuri.org/xmime.xsd" xmlns:xmime5="http://www.w3.org/2005/05/xmlmime" xmlns:xmime4="htt
p://www.w3.org/2004/11/xmlmime" xmlns:xop="http://www.w3.org/2004/08/xop/include" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:tds="http://ww
w.onvif.org/ver10/device/wsdl" xmlns:tmd="http://www.onvif.org/ver10/deviceIO/wsdl" xmlns:trt="http://www.onvif.org/ver10/media/wsdl" xmlns:tr2="ht
tp://www.onvif.org/ver20/media/wsdl" xmlns:trp="http://www.onvif.org/ver10/replay/wsdl" xmlns:tse="http://www.onvif.org/ver10/search/wsdl" xmlns:tp
tz="http://www.onvif.org/ver20/ptz/wsdl" xmlns:tptz1="http://www.onvif.org/ver10/ptz/wsdl" xmlns:timg="http://www.onvif.org/ver20/imaging/wsdl" xml
ns:timg1="http://www.onvif.org/ver10/imaging/wsdl" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:tan="http://www.onvif.org/ver20/analyti
cs/wsdl" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:extXsd="http://www.onvifext.org/ver10/extFunctions/wsdl" xmlns:tns1="http://www.onvi
f.org/ver10/topics" xmlns:ter="http://www.onvif.org/ver10/error" xmlns:tanae="http://www.onvif.org/ver20/analytics/wsdl/AnalyticsEngineBinding" xml
ns:tanre="http://www.onvif.org/ver20/analytics/wsdl/RuleEngineBinding">
        <SOAP-ENV:Body>
                <tds:GetServicesResponse>
                        <tds:Service>
                                <tds:Namespace>http://www.onvif.org/ver10/device/wsdl</tds:Namespace>
                                <tds:XAddr>http://10.201.1.12:80/onvif/device_service</tds:XAddr>
                                <tds:Capabilities>
                                        <tds:Capabilities>
                                                <tds:Network IPFilter="false" ZeroConfiguration="false" IPVersion6="false" DynDNS="false" Dot11Conf
iguration="false" Dot1XConfigurations="0" HostnameFromDHCP="true" NTP="1" DHCPv6="false"></tds:Network>
                                                <tds:Security TLS1.0="false" TLS1.1="false" TLS1.2="false" OnboardKeyGeneration="false" AccessPolic
yConfig="false" DefaultAccessPolicy="true" Dot1X="false" RemoteUserHandling="false" X.509Token="false" SAMLToken="false" KerberosToken="false" User
nameToken="false" HttpDigest="false" RELToken="false" SupportedEAPMethods="0" MaxUsers="10" MaxUserNameLength="32" MaxPasswordLength="16"></tds:Sec
urity>
                                                <tds:System DiscoveryResolve="false" DiscoveryBye="true" RemoteDiscovery="false" SystemBackup="fals
e" SystemLogging="true" FirmwareUpgrade="true" HttpFirmwareUpgrade="true" HttpSystemBackup="false" HttpSystemLogging="false" HttpSupportInformation
="false" StorageConfiguration="true" MaxStorageConfigurations="8"></tds:System>
                                                </tds:Capabilities>
                                        </tds:Capabilities>
                                <tds:Version>
                                        <tt:Major>17</tt:Major>
                                        <tt:Minor>6</tt:Minor>
                                </tds:Version>
                        </tds:Service>
                        <tds:Service>
                                <tds:Namespace>http://www.onvif.org/ver10/media/wsdl</tds:Namespace>
                                <tds:XAddr>http://10.201.1.12:80/onvif/Media</tds:XAddr>
                                <tds:Capabilities><trt:Capabilities SnapshotUri="true" Rotation="false" VideoSourceMode="false" OSD="true" EXICompr
ession="false"><trt:ProfileCapabilities MaximumNumberOfProfiles="2"></trt:ProfileCapabilities><trt:StreamingCapabilities RTPMulticast="false" RTP_T
CP="false" RTP_RTSP_TCP="true" NonAggregateControl="true"></trt:StreamingCapabilities></trt:Capabilities></tds:Capabilities><tds:Version>
                                        <tt:Major>17</tt:Major>
                                        <tt:Minor>6</tt:Minor>
                                </tds:Version>
                        </tds:Service>
                        <tds:Service>
                                <tds:Namespace>http://www.onvif.org/ver20/imaging/wsdl</tds:Namespace>
                                <tds:XAddr>http://10.201.1.12:80/onvif/Imaging</tds:XAddr>
                                <tds:Capabilities>
                                <timg:Capabilities ImageStabilization="false" Presets="false"></timg:Capabilities>
                                </tds:Capabilities>
                                <tds:Version>
                                        <tt:Major>17</tt:Major>
                                        <tt:Minor>6</tt:Minor>
                                </tds:Version>
                        </tds:Service>
                        <tds:Service><tds:Namespace>http://www.onvif.org/ver10/events/wsdl</tds:Namespace>
                                <tds:XAddr>http://10.201.1.12:80/onvif/Events</tds:XAddr>
                                <tds:Capabilities>
                                        <tev:Capabilities WSSubscriptionPolicySupport="true" WSPullPointSupport="true" WSPausableSubscriptionManage
rInterfaceSupport="false" MaxNotificationProducers="5" MaxPullPoints="5" PersistentNotificationStorage="false">
                                </tev:Capabilities>
                                        </tds:Capabilities>
                                <tds:Version>
                                        <tt:Major>17</tt:Major>
                                        <tt:Minor>6</tt:Minor>
                                </tds:Version>
                        </tds:Service>
                        <tds:Service>
                                <tds:Namespace>http://www.onvif.org/ver20/analytics/wsdl</tds:Namespace>
                                <tds:XAddr>http://10.201.1.12:80/onvif/Analytics</tds:XAddr>
                                <tds:Capabilities><tan:Capabilities RuleSupport="true" AnalyticsModuleSupport="true" CellBasedSceneDescriptionSuppo
rted="true"></tan:Capabilities></tds:Capabilities>
                                <tds:Version>
                                        <tt:Major>17</tt:Major>
                                        <tt:Minor>6</tt:Minor>
                                </tds:Version>
                                </tds:Service>
                        <tds:Service>
                                <tds:Namespace>http://www.onvif.org/ver20/media/wsdl</tds:Namespace>
                                <tds:XAddr>http://10.201.1.12:80/onvif/Media20</tds:XAddr>
                                <tds:Capabilities>
<tr2:Capabilities SnapshotUri="true" Rotation="false" VideoSourceMode="false" OSD="true" Mask="true">
<tr2:ProfileCapabilities MaximumNumberOfProfiles="10" ConfigurationsSupported="VideoSource AudioSource VideoEncoder AudioEncoder AudioOutput AudioD
ecoder PTZ"></tr2:ProfileCapabilities>
<tr2:StreamingCapabilities RTSPStreaming="true" RTPMulticast="false" RTP_RTSP_TCP="true" NonAggregateControl="false"></tr2:StreamingCapabilities>  
</tr2:Capabilities>
</tds:Capabilities>
<tds:Version>
                                        <tt:Major>17</tt:Major>
                                        <tt:Minor>6</tt:Minor>
                                </tds:Version>
                        </tds:Service>
                        <tds:Service>
                                <tds:Namespace>http://www.onvif.org/ver20/ptz/wsdl</tds:Namespace>
                                <tds:XAddr>http://10.201.1.12:80/onvif/ptz_service</tds:XAddr>
                                <tds:Capabilities>
                                        <tptz:Capabilities EFlip="false" Reverse="false" GetCompatibleConfigurations="false" MoveStatus="true" Stat
usPosition="true" />
                                </tds:Capabilities>
                                <tds:Version>
                                        <tt:Major>17</tt:Major>
                                        <tt:Minor>6</tt:Minor>
                                </tds:Version>
                        </tds:Service>
                </tds:GetServicesResponse>
        </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

👻 03:12:00.793242 INFO     UI Loggy - Onvif - initialization complete
🐛 03:12:00.794242 DEBUG    UI Loggy - DeviceManagement - getCapabilities
🐛 03:12:00.795243 DEBUG    UI Loggy - LoggingInterceptors - URI: http://10.201.1.12/onvif/device_service
🐛 03:12:00.795243 DEBUG    UI Loggy - LoggingInterceptors - REQUEST:
<?xml version="1.0" encoding="UTF-8"?><s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing">
<s:Header/><s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><GetCapabilities xmlns="http:
//www.onvif.org/ver10/device/wsdl"><Category>All</Category></GetCapabilities></s:Body></s:Envelope>
🐛 03:12:00.802240 DEBUG    UI Loggy - LoggingInterceptors - RESPONSE:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding" xmlns:xsi="htt
p://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" x
mlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xml
ns:xenc="http://www.w3.org/2001/04/xmlenc#" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-
200401-wss-wssecurity-secext-1.0.xsd" xmlns:xmime="http://tempuri.org/xmime.xsd" xmlns:xmime5="http://www.w3.org/2005/05/xmlmime" xmlns:xmime4="htt
p://www.w3.org/2004/11/xmlmime" xmlns:xop="http://www.w3.org/2004/08/xop/include" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:tds="http://ww
w.onvif.org/ver10/device/wsdl" xmlns:tmd="http://www.onvif.org/ver10/deviceIO/wsdl" xmlns:trt="http://www.onvif.org/ver10/media/wsdl" xmlns:tr2="ht
tp://www.onvif.org/ver20/media/wsdl" xmlns:trp="http://www.onvif.org/ver10/replay/wsdl" xmlns:tse="http://www.onvif.org/ver10/search/wsdl" xmlns:tp
tz="http://www.onvif.org/ver20/ptz/wsdl" xmlns:tptz1="http://www.onvif.org/ver10/ptz/wsdl" xmlns:timg="http://www.onvif.org/ver20/imaging/wsdl" xml
ns:timg1="http://www.onvif.org/ver10/imaging/wsdl" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:tan="http://www.onvif.org/ver20/analyti
cs/wsdl" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:extXsd="http://www.onvifext.org/ver10/extFunctions/wsdl" xmlns:tns1="http://www.onvi
f.org/ver10/topics" xmlns:ter="http://www.onvif.org/ver10/error" xmlns:tanae="http://www.onvif.org/ver20/analytics/wsdl/AnalyticsEngineBinding" xml
ns:tanre="http://www.onvif.org/ver20/analytics/wsdl/RuleEngineBinding">
        <SOAP-ENV:Body>
                <tds:GetCapabilitiesResponse>
                        <tds:Capabilities>
                                <tt:Analytics>
                                        <tt:XAddr>http://10.201.1.12:80/onvif/Analytics_service</tt:XAddr>
                                        <tt:RuleSupport>true</tt:RuleSupport>
                                        <tt:AnalyticsModuleSupport>true</tt:AnalyticsModuleSupport>
                                </tt:Analytics>
                                <tt:Device>
                                        <tt:XAddr>http://10.201.1.12:80/onvif/Device_service</tt:XAddr>
                                        <tt:Network>
                                                <tt:IPFilter>false</tt:IPFilter>
                                                <tt:ZeroConfiguration>false</tt:ZeroConfiguration>
                                                <tt:IPVersion6>false</tt:IPVersion6>
                                                <tt:DynDNS>false</tt:DynDNS>
                                        </tt:Network>
                                        <tt:System>
                                                <tt:DiscoveryResolve>false</tt:DiscoveryResolve>
                                                <tt:DiscoveryBye>true</tt:DiscoveryBye>
                                                <tt:RemoteDiscovery>false</tt:RemoteDiscovery>
                                                <tt:SystemBackup>false</tt:SystemBackup>
                                                <tt:SystemLogging>false</tt:SystemLogging>
                                                <tt:FirmwareUpgrade>true</tt:FirmwareUpgrade>
                                                <tt:SupportedVersions>
                                                        <tt:Major>2</tt:Major>
                                                        <tt:Minor>0</tt:Minor>
                                                </tt:SupportedVersions>
                                                <tt:SupportedVersions>
                                                        <tt:Major>2</tt:Major>
                                                        <tt:Minor>11</tt:Minor>
                                                </tt:SupportedVersions>
                                                <tt:SupportedVersions>
                                                        <tt:Major>2</tt:Major>
                                                        <tt:Minor>21</tt:Minor>
                                                </tt:SupportedVersions>
                                                <tt:SupportedVersions>
                                                        <tt:Major>2</tt:Major>
                                                        <tt:Minor>40</tt:Minor>
                                                </tt:SupportedVersions>
                                                <tt:SupportedVersions>
                                                        <tt:Major>2</tt:Major>
                                                        <tt:Minor>50</tt:Minor>
                                                </tt:SupportedVersions>
                                                <tt:SupportedVersions>
                                                        <tt:Major>2</tt:Major>
                                                        <tt:Minor>60</tt:Minor>
                                                </tt:SupportedVersions>
                                                <tt:SupportedVersions>
                                                        <tt:Major>16</tt:Major>
                                                        <tt:Minor>6</tt:Minor>
                                                </tt:SupportedVersions>
                                                <tt:SupportedVersions>
                                                        <tt:Major>16</tt:Major>
                                                        <tt:Minor>12</tt:Minor>
                                                </tt:SupportedVersions>
                                                <tt:SupportedVersions>
                                                        <tt:Major>17</tt:Major>
                                                        <tt:Minor>6</tt:Minor>
                                                </tt:SupportedVersions>
                                        </tt:System>
                                        <tt:IO>
                                                <tt:InputConnectors>1</tt:InputConnectors>
                                                <tt:RelayOutputs>1</tt:RelayOutputs>
                                        </tt:IO>
                                        <tt:Security>
                                                <tt:TLS1.1>false</tt:TLS1.1>
                                                <tt:TLS1.2>false</tt:TLS1.2>
                                                <tt:OnboardKeyGeneration>false</tt:OnboardKeyGeneration>
                                                <tt:AccessPolicyConfig>false</tt:AccessPolicyConfig>
                                                <tt:X.509Token>false</tt:X.509Token>
                                                <tt:SAMLToken>false</tt:SAMLToken>
                                                <tt:KerberosToken>false</tt:KerberosToken>
                                                <tt:RELToken>false</tt:RELToken>
                                                <tt:Extension>
                                                        <tt:TLS1.0>false</tt:TLS1.0>
                                                        <tt:Extension>
                                                                <tt:Dot1X>false</tt:Dot1X>
                                                                <tt:SupportedEAPMethod>0</tt:SupportedEAPMethod>
                                                                <tt:RemoteUserHandling>false</tt:RemoteUserHandling>
                                                        </tt:Extension>
                                                </tt:Extension>
                                        </tt:Security>
                                </tt:Device>
                                <tt:Events>
                                        <tt:XAddr>http://10.201.1.12:80/onvif/Events</tt:XAddr>
                                        <tt:WSSubscriptionPolicySupport>true</tt:WSSubscriptionPolicySupport>
                                        <tt:WSPullPointSupport>true</tt:WSPullPointSupport>
                                        <tt:WSPausableSubscriptionManagerInterfaceSupport>false</tt:WSPausableSubscriptionManagerInterfaceSupport> 
                                </tt:Events>
                                <tt:Imaging>
                                        <tt:XAddr>http://10.201.1.12:80/onvif/Imaging</tt:XAddr>
                                </tt:Imaging>
                                <tt:Media>
                                        <tt:XAddr>http://10.201.1.12:80/onvif/Media</tt:XAddr>
                                        <tt:StreamingCapabilities>
                                                <tt:RTPMulticast>false</tt:RTPMulticast>
                                                <tt:RTP_TCP>false</tt:RTP_TCP>
                                                <tt:RTP_RTSP_TCP>true</tt:RTP_RTSP_TCP>
                                        </tt:StreamingCapabilities>
                                </tt:Media>
                                <tt:Media>
Unhandled exception:
type 'List<dynamic>' is not a subtype of type 'Map<String, dynamic>' in type cast
#0      _$CapabilitiesFromJson (package:easy_onvif/src/model/device_management/capabilities.g.dart:26:54)
#1      new Capabilities.fromJson (package:easy_onvif/src/model/device_management/capabilities.dart:54:7)
#2      _$GetCapabilitiesResponseFromJson (package:easy_onvif/src/model/device_management/get_capabilities_response.g.dart:13:24)
#3      new GetCapabilitiesResponse.fromJson (package:easy_onvif/src/model/device_management/get_capabilities_response.dart:20:7)
#4      DeviceManagement.getCapabilities (package:easy_onvif/src/device_management.dart:92:36)
<asynchronous suspension>
#5      OnvifGetCapabilitiesDeviceManagementCommand.run (package:easy_onvif/src/cmd/onvif_device_management_command.dart:211:28)
<asynchronous suspension>
#6      CommandRunner.runCommand (package:args/command_runner.dart:212:13)
<asynchronous suspension>

onvif NVT initialize: Exception: DioError [DioErrorType.other]: SocketException

I am using one onvif nvt which is working with most nvt client software. However, when tried to use the sample codes as in the easy_onvif as followings (as in #1), the app yields the exception as in #2. My flutter doctor info are as in #3. I further step into the codes to debug the causes and found it roots from #4 routine. Can you please look into the the issue and advise how to clear it next. Thanks.
1.
_initialize() async {
var onvif = Onvif(
host: '192.168.1.101:8899',
username: 'admin',
password: 'password');
//initiate connection
await onvif.initialize();
//get device info
var deviceInfo = await onvif.deviceManagement.getDeviceInformation();
Fimber.i('$TAG _initialize: deviceInfo.model = ${deviceInfo.model}');
//get device profiles
var profs = await onvif.media.getProfiles();
profs.forEach((element) {
Fimber.i('$TAG _initialize: profs = $element.name, $element.token');
});
var profileToken = profs[0].token;
Fimber.i('$TAG _initialize: profileToken = $profileToken');
}
2.
E/flutter (27781): [ERROR:flutter/lib/ui/ui_dart_state.cc(199)] Unhandled Exception: Exception: DioError [DioErrorType.other]: SocketException: OS Error: Connection timed out, errno = 110, address = 192.168.1.101, port = 44088
E/flutter (27781): #0 DioMixin.assureDioError (package:dio/src/dio_mixin.dart:819:20)
E/flutter (27781): #1 DioMixin._dispatchRequest (package:dio/src/dio_mixin.dart:678:13)
E/flutter (27781):
E/flutter (27781): #2 DioMixin.fetch.. (package:dio/src/dio_mixin.dart)
E/flutter (27781):
E/flutter (27781):
E/flutter (27781): #0 Soap.send (package:easy_onvif/src/soap.dart:34:7)
E/flutter (27781):
E/flutter (27781): #1 Soap.retrieveEnvlope (package:easy_onvif/src/soap.dart:43:26)
E/flutter (27781):
E/flutter (27781): #2 DeviceManagement.getSystemDateAndTime (package:easy_onvif/src/deviceManagement.dart:145:22)
E/flutter (27781):
E/flutter (27781): #3 Onvif.initialize (package:easy_onvif/src/onvif.dart:33:22)
E/flutter (27781):
E/flutter (27781): #4 _MyHomePageState._initialize (package:testeasyonvif/main.dart:79:5)
E/flutter (27781):
3.
[√] Flutter (Channel stable, 2.2.3, on Microsoft Windows [Version 10.0.19042.1110], locale zh-TW)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.0-rc1)
• Platform android-30, build-tools 30.0.0-rc1
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
[√] Chrome - develop for the web
[√] Android Studio (version 4.1.0)
[√] Connected device (3 available)
4.
Future getSystemDateAndTime() async {
final envelope = await Soap.retrieveEnvlope(
uri, SoapRequest.envelope(null, SoapRequest.systemDateAndTime()));

Cannot connect on Windows

Although the Onvif device manager allows me to log in and view the camera, using the easy_onvif lib I can never connect, I always get back:

ERROR:flutter/runtime/dart_vm_initializer.cc(41) Unhandled Exception: Exception: Error code: Code: Value: SOAP-ENV:Sender, Subcode: Value: NotAuthorized, Reason: Sender not authorized, Detail: Text: The action requested requires authorization and the sender is not authorized

Although I'm calling connect with the correct IP, username and password (Onvif admin user).

Any ideas!?

Unhandled Exception: type 'Null' is not a subtype of type 'Map<String, dynamic>' in type cast

The 0.0.9 has further exception @var profs = await onvif.media.getProfiles(); line with the following logcats:
E/flutter (11010): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: type 'Null' is not a subtype of type 'Map<String, dynamic>' in type cast
E/flutter (11010): #0 _$CodeFromJson (package:easy_onvif/model/code.g.dart:11:37)
E/flutter (11010): #1 new Code.fromJson (package:easy_onvif/model/code.dart:17:55)
E/flutter (11010): #2 _$CodeFromJson (package:easy_onvif/model/code.g.dart:11:12)
E/flutter (11010): #3 new Code.fromJson (package:easy_onvif/model/code.dart:17:55)
E/flutter (11010): #4 _$FaultFromJson (package:easy_onvif/model/fault.g.dart:10:12)
E/flutter (11010): #5 new Fault.fromJson (package:easy_onvif/model/fault.dart:32:56)
E/flutter (11010): #6 _$BodyFromJson (package:easy_onvif/model/body.g.dart:12:19)
E/flutter (11010): #7 new Body.fromJson (package:easy_onvif/model/body.dart:121:55)
E/flutter (11010): #8 _$EnvelopeFromJson (package:easy_onvif/model/envelope.g.dart:10:18)
E/flutter (11010): #9 new Envelope.fromJson (package:easy_onvif/model/envelope.dart:19:7)
E/flutter (11010): #10 Soap.send (package:easy_onvif/src/soap.dart:27:35)
E/flutter (11010):
E/flutter (11010): #11 Soap.retrieveEnvlope (package:easy_onvif/src/soap.dart:43:26)
E/flutter (11010):
E/flutter (11010): #12 Media.getProfiles (package:easy_onvif/src/media.dart:35:22)

and here is the soap response when pasing it:
getProfiles.txt

Error during Onvif.connect

Hi @faithoflifedev , I am trying the new version. I'm getting this error during Onvif.connect.
Let me know if you need more attempts or information to understand the problem. Thank You!

👻 22:19:22.469037 INFO     UI Loggy - Onvif - initializing ...
🐛 22:19:22.471763 DEBUG    UI Loggy - DeviceManagement - getSystemDateAndTime
🐛 22:19:22.485712 DEBUG    UI Loggy - Onvif - URI: http://192.168.0.25/onvif/device_service
🐛 22:19:22.485808 DEBUG    UI Loggy - Onvif - REQUEST:
<?xml version="1.0" encoding="UTF-8"?><s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing"><s:Header/><s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><GetSystemDateAndTime xmlns="http://www.onvif.org/ver10/device/wsdl"/></s:Body></s:Envelope>
🐛 22:19:22.666638 DEBUG    UI Loggy - Onvif - RExSPONSE:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:chan="http://schemas.microsoft.com/ws/2005/02/duplex" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:c14n="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xenc="http://www.w3.org/2001/04/xmlenc#" xmlns:wsc="http://schemas.xmlsoap.org/ws/2005/02/sc" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:ns2="http://www.onvif.org/ver10/pacs" xmlns:xmime="http://tempuri.org/xmime.xsd" xmlns:xop="http://www.w3.org/2004/08/xop/include" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:wsrfbf="http://docs.oasis-open.org/wsrf/bf-2" xmlns:wstop="http://docs.oasis-open.org/wsn/t-1" xmlns:wsrfr="http://docs.oasis-open.org/wsrf/r-2" xmlns:ns1="http://www.onvif.org/ver10/accesscontrol/wsdl" xmlns:ns3="http://www.onvif.org/ver10/actionengine/wsdl" xmlns:tad="http://www.onvif.org/ver10/analyticsdevice/wsdl" xmlns:tds="http://www.onvif.org/ver10/device/wsdl" xmlns:timg="http://www.onvif.org/ver20/imaging/wsdl" xmlns:tptz="http://www.onvif.org/ver20/ptz/wsdl" xmlns:trc="http://www.onvif.org/ver10/recording/wsdl" xmlns:trt="http://www.onvif.org/ver10/media/wsdl" xmlns:trv="http://www.onvif.org/ver10/receiver/wsdl" xmlns:tse="http://www.onvif.org/ver10/search/wsdl" xmlns:vifsvr="http://www.onvif.org/ver10/events/wsdl/PullPointSubscriptionBinding" xmlns:vifsvr10="http://www.onvif.org/ver20/analytics/wsdl/AnalyticsEngineBinding" xmlns:vifsvr2="http://www.onvif.org/ver10/events/wsdl/EventBinding" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:vifsvr3="http://www.onvif.org/ver10/events/wsdl/SubscriptionManagerBinding" xmlns:vifsvr4="http://www.onvif.org/ver10/events/wsdl/NotificationProducerBinding" xmlns:vifsvr5="http://www.onvif.org/ver10/events/wsdl/NotificationConsumerBinding" xmlns:vifsvr6="http://www.onvif.org/ver10/events/wsdl/PullPointBinding" xmlns:vifsvr7="http://www.onvif.org/ver10/events/wsdl/CreatePullPointBinding" xmlns:vifsvr8="http://www.onvif.org/ver10/events/wsdl/PausableSubscriptionManagerBinding" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:vifsvr9="http://www.onvif.org/ver20/analytics/wsdl/RuleEngineBinding" xmlns:tan="http://www.onvif.org/ver20/analytics/wsdl" xmlns:ter="http://www.onvif.org/ver10/error" xmlns:tns1="http://www.onvif.org/ver10/topics"><SOAP-ENV:Header></SOAP-ENV:Header><SOAP-ENV:Body><tds:GetSystemDateAndTimeResponse><tds:SystemDateAndTime><tt:DateTimeType>NTP</tt:DateTimeType><tt:DaylightSavings>false</tt:DaylightSavings><tt:TimeZone><tt:TZ/></tt:TimeZone><tt:UTCDateTime><tt:Time><tt:Hour>21</tt:Hour><tt:Minute>19</tt:Minute><tt:Second>22</tt:Second></tt:Time><tt:Date><tt:Year>2023</tt:Year><tt:Month>3</tt:Month><tt:Day>9</tt:Day></tt:Date></tt:UTCDateTime><tt:LocalDateTime><tt:Time><tt:Hour>21</tt:Hour><tt:Minute>19</tt:Minute><tt:Second>22</tt:Second></tt:Time><tt:Date><tt:Year>2023</tt:Year><tt:Month>3</tt:Month><tt:Day>9</tt:Day></tt:Date></tt:LocalDateTime></tds:SystemDateAndTime></tds:GetSystemDateAndTimeResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>

🐛 22:19:23.313039 DEBUG    UI Loggy - DeviceManagement - getServices
🐛 22:19:23.313696 DEBUG    UI Loggy - Onvif - URI: http://192.168.0.25/onvif/device_service
🐛 22:19:23.313723 DEBUG    UI Loggy - Onvif - REQUEST:
<?xml version="1.0" encoding="UTF-8"?><s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing"><s:Header/><s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><GetServices xmlns="http://www.onvif.org/ver10/device/wsdl"><IncludeCapability>false</IncludeCapability></GetServices></s:Body></s:Envelope>
‼️ 22:19:23.467985 ERROR    UI Loggy - Onvif - ERROR:
DioError [unknown]: null
Error: HttpException: Connection closed while receiving data, uri = http://192.168.0.25/onvif/device_service
⚠️ 22:19:23.468439 WARNING  UI Loggy - Onvif - GetServices command not supported
🐛 22:19:23.468699 DEBUG    UI Loggy - DeviceManagement - getCapabilities
🐛 22:19:23.469359 DEBUG    UI Loggy - Onvif - URI: http://192.168.0.25/onvif/device_service
🐛 22:19:23.469393 DEBUG    UI Loggy - Onvif - REQUEST:
<?xml version="1.0" encoding="UTF-8"?><s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing"><s:Header/><s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><GetCapabilities xmlns="http://www.onvif.org/ver10/device/wsdl"><Category>All</Category></GetCapabilities></s:Body></s:Envelope>
‼️ 22:19:23.629413 ERROR    UI Loggy - Onvif - ERROR:
DioError [unknown]: null
Error: HttpException: Connection closed while receiving data, uri = http://192.168.0.25/onvif/device_service
Unhandled exception:
Exception: DioError [unknown]: null
Error: HttpException: Connection closed while receiving data, uri = http://192.168.0.25/onvif/device_service
#0      Transport.sendRequest (package:easy_onvif/src/soap/transport.dart:48:7)
<asynchronous suspension>
#1      DeviceManagement.getCapabilities (package:easy_onvif/src/device_management.dart:81:22)
<asynchronous suspension>
#2      Onvif.initialize (package:easy_onvif/src/onvif_base.dart:149:28)
<asynchronous suspension>
#3      Onvif.connect (package:easy_onvif/src/onvif_base.dart:92:5)
<asynchronous suspension>
#4      OnvifHelperCommand.initializeOnvif (package:easy_onvif/cmd/onvif_helper_command.dart:29:14)
<asynchronous suspension>
#5      OnvifGetDeviceInformationResponseDeviceManagementCommand.run (package:easy_onvif/cmd/onvif_device_management_command.dart:225:5)
<asynchronous suspension>
#6      CommandRunner.runCommand (package:args/command_runner.dart:212:13)
<asynchronous suspension>

[2.1.0-dev.10] question about onvif.media.getProfiles() /onvif.media.getStreamUri(...)

Hi @faithoflifedev ,

i have a question about how to migrate from stable version to the newest. Reading the new documentation I noticed:

// defaults to Media2, but will fallback to Media1 if Media2 is not supported
var profiles = await onvif.media.getProfiles();

// alternatively, make an explicit call to the Media2 operation
var profiles2 = await onvif.media.media2.getProfiles();

Reading this I expect that no matter what operations the device supports (Media1 or Media2), I'm able to fetch the profiles without needing to know if the device supports Media1 or Media2.

I've tried to call await onvif.media.getProfiles() and also onvif.media.getStreamUri(...) but in both cases I got the same exception: NotSupportedException (caused by the fact that the device in question have only media1).

Did I misinterpret the documentation?

Thank you in advance

PS. Sorry for my English.

Can't build apk on example

Hello. I can't run flutter build apk on example
Could you please guide me some?
"No file or variants found for asset: config.yaml"

HttpException: Connection closed while receiving data

final onvif = await Onvif.connect();
I use easy_onvif v1.0.6 to connect to a huawei camera IP.
Just by running these few lines of code to connect to the camera. It prompts me the below exception, any solution for this issue?

Exception has occurred.
_Exception (Exception: DioError [DioErrorType.other]: HttpException: Connection closed while receiving data, uri = http://192.168.0.99/onvif/device_service
Source stack:
#0 DioMixin.fetch (package:dio/src/dio_mixin.dart:488:35)
#1 DioMixin.request (package:dio/src/dio_mixin.dart:483:12)
#2 DioMixin.post (package:dio/src/dio_mixin.dart:97:12)
#3 Soap.send (package:easy_onvif/src/soap.dart:24:28)
#4 Soap.retrieveEnvlope (package:easy_onvif/src/soap.dart:50:37)
#5 DeviceManagement.getSystemDateAndTime (package:easy_onvif/src/device_management.dart:160:33)
#6 Onvif.initialize (package:easy_onvif/src/onvif_base.dart:60:46)
#7 Onvif.connect (package:easy_onvif/src/onvif_base.dart:40:17)
#8 _MyHomePageState.connectCamera (package:camera_huawei_test/main.dart:69:31)
#9 _MyHomePageState._incrementCounter (package:camera_huawei_test/main.dart:64:11)
#10 _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:1005:21)
#11 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:198:24)
#12 TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:613:11)
#13 BaseTapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:298:5)
#14 BaseTapGestureRecognizer.acceptGesture (package:flutter/src/gestures/tap.dart:269:7)
#15 GestureArenaManager.sweep (package:flutter/src/gestures/arena.dart:157:27)
#16 GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:449:20)
#17 GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:425:22)
#18 RendererBinding.dispatchEvent (package:flutter/src/rendering/binding.dart:329:11)
#19 GestureBinding._handlePointerEventImmediately (package:flutter/src/gestures/binding.dart:380:7)
#20 GestureBinding.handlePointerEvent (package:flutter/src/gestures/binding.dart:344:5)
#21 GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:302:7)
#22 GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:285:7)
#23 _rootRunUnary (dart:async/zone.dart:1442:13)
#24 _CustomZone.runUnary (dart:async/zone.dart:1335:19)
#25 _CustomZone.runUnaryGuarded (dart:async/zone.dart:1244:7)
#26 _invoke1 (dart:ui/hooks.dart:170:10)
#27 PlatformDispatcher._dispatchPointerDataPacket (dart:ui/platform_dispatcher.dart:331:7)
#28 _dispatchPointerDataPacket (dart:ui/hooks.dart:94:31)
)

Onvif.connect()

i have facing error in .connect() unable to solve it.

final onvif = await Onvif.connect(
host: config['host'],
username: config['username'],
password: config['password'],
logOptions: const LogOptions(
LogLevel.debug,
stackTraceLevel: LogLevel.error,
),
printer: const PrettyPrinter(
showColors: true,
));

in that .connect() method i have facing error in that there is not show me any suggestion or pacakage to add

RTSP port in the getStreamUri response not correct

The port 80 in the reponse when calling the method onvif.media.getStreamUri(profileToken) such as rtsp://ip:80/Streaming/Channels/1?transportmode=unicast&profile=Profile_1 seems not correct, it shoud be 554. Becaue the method onvif.deviceManagement.getNetworkProtocols() return {name:RTSP,enabled:true,port:554}.

ptz zoom not working

I've tested my camera zoom control by using other onvif app (Onvier)

스크린샷 2022-12-14 오전 10 05 12

but when i call zoomIn or zoom method it returns error

[my code]
await onvif.ptz.zoomIn(profs[0].token);

[error message]
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Exception: Error code: {Code: {Value: {$: SOAP-ENV:Sender}, Subcode: {Value: {$: ter:InvalidArgVal}, Subcode: {Value: {$: ter:PTZNotSupported}}}}, Reason: {Text: {@xml:lang: en}}}

MulticastProbe with Auth

Since a recent update Axis cameras require a digest authentication header to access onvif/device_service.

Since the library currently doesn't support it, Axis devices can no longer be detected using the probe.

A solution would be the option to supply a username / password when doing a MulticastProbe.

onvif.ptz.getStatus returns Unhandled Exception: NoSuchMethodError

I can get video streaming from rtsp
but i have problem controlling PTZ

log:

I/flutter (18523): �[3;38;5;244m🐛 10:03:34.873035 DEBUG UI Loggy - Ptz - getStatus
I/flutter (18523): �[3;38;5;244m🐛 10:03:34.876047 DEBUG UI Loggy - Onvif - URI: http://183.107.70.232/onvif/device_service
I/flutter (18523): �[3;38;5;244m🐛 10:03:34.876153 DEBUG UI Loggy - Onvif - REQUEST:
I/flutter (18523): <s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing"><s:Header>adminPASSWORDWMKHRoILuYjNlP2vxSE0uQ==2022-11-30T11:32:43.468033Z</s:Header><s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSc
D/EGL_emulation(18523): app_time_stats: avg=16.71ms min=7.03ms max=25.91ms count=60
I/flutter (18523): �[3;38;5;244m🐛 10:03:36.023021 DEBUG UI Loggy - Onvif - RESPONSE:
I/flutter (18523):
I/flutter (18523): <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:chan="http://schemas.microsoft.com/ws/2005/02/duplex" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:axt="http://www.onvif.org/ver20/analytics" xmlns:xmime="http://tempuri.org/xmime.xsd" xmlns:xop="http://www.w3.org/2004/08/xop/include" xmlns:pt="http://www.onvif.org/ver10/pacs" xmlns:trt2="http://www.onvif.org/ver20/analytics/radiometry" xmlns:fc="http://www.onvif.org/ver20/analytics/humanface" xmlns:bd="http://www.onvif.org/ver20/analytics/humanbody" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:wsrfbf="http://docs.oasis-open.org/wsrf/bf-2" xmlns:wstop="http://docs.oasis-open.org/wsn/t-

error Log:
E/flutter (18523): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: NoSuchMethodError: The method '[]' was called on null.
E/flutter (18523): Receiver: null
E/flutter (18523): Tried calling:
E/flutter (18523): #0 Object.noSuchMethod (dart:core-patch/object_patch.dart:38:5)
E/flutter (18523): #1 OnvifUtil.mappedToString
E/flutter (18523): #2 _$PtzStatusFromJson
E/flutter (18523): #3 new PtzStatus.fromJson
E/flutter (18523): #4 _$GetStatusResponseFromJson
E/flutter (18523): #5 new GetStatusResponse.fromJson
E/flutter (18523): #6 _$BodyFromJson
E/flutter (18523): #7 new Body.fromJson
E/flutter (18523): #8 _$EnvelopeFromJson
E/flutter (18523): #9 new Envelope.fromJson
E/flutter (18523): #10 new Envelope.fromXml
E/flutter (18523): #11 Soap.retrieveEnvelope
E/flutter (18523):
E/flutter (18523): #12 Ptz.getStatus
E/flutter (18523):
E/flutter (18523): #13 DashBoardController.initializeOnvif
E/flutter (18523):

last error code image
스크린샷 2022-11-30 오전 11 38 57

[GetProfiles] DioError [DioErrorType.other]: HttpException: Connection closed before full header was received.

I use easy_onvif v0.0.15 to connect to a camera IP.
Getting the camera's information is successful but getting profiles is not.
Could you provide me with some solution for this issue? thanks
I receive some answers: requestData is too large. Could you provide me with some solution for reducing requestData size? thanks

Exception: DioError [DioErrorType.other]: HttpException: Connection closed before full header was received, uri = [http://14.241.168.136/onvif/media_service]()
        Source stack:
#0      DioMixin.fetch
package:dio/src/dio_mixin.dart:479
#1      DioMixin.request
package:dio/src/dio_mixin.dart:474
#2      DioMixin.post
package:dio/src/dio_mixin.dart:97
#3      Soap.send
package:camera_control/…/src/soap.dart:18
#4      Soap.retrieveEnvlope
package:camera_control/…/src/soap.dart:52
#5      Media.getProfiles
package:camera_control/…/src/media.dart:41
#6      _MyHomePageState._initialize
package:camera_control/main.dart:94

Onvif Imaging Profile

Hello,

I was wondering whether there are any plans to add support for the Onvif Imaging Profile at some point? The library has been extremely useful but the imaging profile is the only feature missing for my use case.

Alternatively are there any suggestions for adding in the support myself?

Thanks for any help.

Example is not working

Hello, when I build example, I see this error, could you please update example?
Because every version of flutter from sdk depends on collection 1.16.0 and xml >=6.2.0 depends on collection ^1.17.0, flutter from sdk is incompatible with xml >=6.2.0.
And because every version of easy_onvif from path depends on xml ^6.2.0, flutter from sdk is incompatible with easy_onvif from path.
So, because flutter_model depends on both easy_onvif from path and flutter from sdk, version solving failed.

getStreamUri doesn't connect to sub stream of Onvif camera

Hi there!
I'm having difficulty in connecting to the substream of Onvif device. Such that it throws Dio exception while making the request which it makes difficult to debug as it comes from the package itself. Kindly look into this issue pls.
Thank you for your feedback

BUG: Camera movement command is not working for some cameras

This is continuation of fix for #53.

Here is the log:

PS C:\Users\Admin\Documents\GitHub\Longshot-Flutter-App> onvif ptz move --profile-token MainStream --x 100 --y 200 --log-level all
👻 06:10:37.042531 INFO     UI Loggy - Onvif - initializing ...
🐛 06:10:37.050532 DEBUG    UI Loggy - DeviceManagement - getSystemDateAndTime
🐛 06:10:37.098536 DEBUG    UI Loggy - LoggingInterceptors - URI: http://10.201.1.11/onvif/device_service
🐛 06:10:37.098536 DEBUG    UI Loggy - LoggingInterceptors - REQUEST:
<?xml version="1.0" encoding="UTF-8"?><s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing">
<s:Header/><s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><GetSystemDateAndTime xmlns="
http://www.onvif.org/ver10/device/wsdl"/></s:Body></s:Envelope>
🐛 06:10:37.229547 DEBUG    UI Loggy - LoggingInterceptors - RESPONSE:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding" xmlns:xsi="htt
p://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" x
mlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xml
ns:xenc="http://www.w3.org/2001/04/xmlenc#" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-
200401-wss-wssecurity-secext-1.0.xsd" xmlns:xmime="http://tempuri.org/xmime.xsd" xmlns:xmime5="http://www.w3.org/2005/05/xmlmime" xmlns:xmime4="htt
p://www.w3.org/2004/11/xmlmime" xmlns:xop="http://www.w3.org/2004/08/xop/include" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:tds="http://ww
w.onvif.org/ver10/device/wsdl" xmlns:tmd="http://www.onvif.org/ver10/deviceIO/wsdl" xmlns:trt="http://www.onvif.org/ver10/media/wsdl" xmlns:tr2="ht
tp://www.onvif.org/ver20/media/wsdl" xmlns:trp="http://www.onvif.org/ver10/replay/wsdl" xmlns:tse="http://www.onvif.org/ver10/search/wsdl" xmlns:tp
tz="http://www.onvif.org/ver20/ptz/wsdl" xmlns:tptz1="http://www.onvif.org/ver10/ptz/wsdl" xmlns:timg="http://www.onvif.org/ver20/imaging/wsdl" xml
ns:timg1="http://www.onvif.org/ver10/imaging/wsdl" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:tan="http://www.onvif.org/ver20/analyti
cs/wsdl" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:extXsd="http://www.onvifext.org/ver10/extFunctions/wsdl" xmlns:tns1="http://www.onvi
f.org/ver10/topics" xmlns:ter="http://www.onvif.org/ver10/error" xmlns:tanae="http://www.onvif.org/ver20/analytics/wsdl/AnalyticsEngineBinding" xml
ns:tanre="http://www.onvif.org/ver20/analytics/wsdl/RuleEngineBinding">
        <SOAP-ENV:Body>
                <tds:GetSystemDateAndTimeResponse>
                        <tds:SystemDateAndTime>
                                <tt:DateTimeType>NTP</tt:DateTimeType>
                                <tt:DaylightSavings>false</tt:DaylightSavings>
                                <tt:TimeZone>
                                        <tt:TZ>CST-08:00</tt:TZ>
                                </tt:TimeZone>
                                <tt:UTCDateTime>
                                        <tt:Time>
                                                <tt:Hour>20</tt:Hour>
                                                <tt:Minute>22</tt:Minute>
                                                <tt:Second>8</tt:Second>
                                        </tt:Time>
                                        <tt:Date>
                                                <tt:Year>2024</tt:Year>
                                                <tt:Month>1</tt:Month>
                                                <tt:Day>8</tt:Day>
                                        </tt:Date>
                                </tt:UTCDateTime>
                                <tt:LocalDateTime>
                                        <tt:Time>
                                                <tt:Hour>4</tt:Hour>
                                                <tt:Minute>22</tt:Minute>
                                                <tt:Second>8</tt:Second>
                                        </tt:Time>
                                        <tt:Date>
                                                <tt:Year>2024</tt:Year>
                                                <tt:Month>1</tt:Month>
                                                <tt:Day>9</tt:Day>
                                        </tt:Date>
                                </tt:LocalDateTime>
                        </tds:SystemDateAndTime>
                </tds:GetSystemDateAndTimeResponse>
        </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

🐛 06:10:37.328553 DEBUG    UI Loggy - DeviceManagement - getServices
🐛 06:10:37.344554 DEBUG    UI Loggy - LoggingInterceptors - URI: http://10.201.1.11/onvif/device_service
🐛 06:10:37.344554 DEBUG    UI Loggy - LoggingInterceptors - REQUEST:
<?xml version="1.0" encoding="UTF-8"?><s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing">
<s:Header><Security xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-sec
ext-1.0.xsd" s:mustUnderstand="1"><UsernameToken><Username>admin</Username><Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-
username-token-profile-1.0#PasswordDigest">mxNoGP0cnIgYSg7ZoB9bO2kRwBs=</Password><Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis
-200401-wss-soap-message-security-1.0#Base64Binary">O6zOeDzXPCT1cAOujz3ZNQ==</Nonce><Created xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-20
0401-wss-wssecurity-utility-1.0.xsd">2024-01-08T20:22:08.004Z</Created></UsernameToken></Security></s:Header><s:Body xmlns:xsi="http://www.w3.org/2
001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><GetServices xmlns="http://www.onvif.org/ver10/device/wsdl"><IncludeCapability
>true</IncludeCapability></GetServices></s:Body></s:Envelope>
🐛 06:10:37.353555 DEBUG    UI Loggy - LoggingInterceptors - RESPONSE:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding" xmlns:xsi="htt
p://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" x
mlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xml
ns:xenc="http://www.w3.org/2001/04/xmlenc#" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-
200401-wss-wssecurity-secext-1.0.xsd" xmlns:xmime="http://tempuri.org/xmime.xsd" xmlns:xmime5="http://www.w3.org/2005/05/xmlmime" xmlns:xmime4="htt
p://www.w3.org/2004/11/xmlmime" xmlns:xop="http://www.w3.org/2004/08/xop/include" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:tds="http://ww
w.onvif.org/ver10/device/wsdl" xmlns:tmd="http://www.onvif.org/ver10/deviceIO/wsdl" xmlns:trt="http://www.onvif.org/ver10/media/wsdl" xmlns:tr2="ht
tp://www.onvif.org/ver20/media/wsdl" xmlns:trp="http://www.onvif.org/ver10/replay/wsdl" xmlns:tse="http://www.onvif.org/ver10/search/wsdl" xmlns:tp
tz="http://www.onvif.org/ver20/ptz/wsdl" xmlns:tptz1="http://www.onvif.org/ver10/ptz/wsdl" xmlns:timg="http://www.onvif.org/ver20/imaging/wsdl" xml
ns:timg1="http://www.onvif.org/ver10/imaging/wsdl" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:tan="http://www.onvif.org/ver20/analyti
cs/wsdl" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:extXsd="http://www.onvifext.org/ver10/extFunctions/wsdl" xmlns:tns1="http://www.onvi
f.org/ver10/topics" xmlns:ter="http://www.onvif.org/ver10/error" xmlns:tanae="http://www.onvif.org/ver20/analytics/wsdl/AnalyticsEngineBinding" xml
ns:tanre="http://www.onvif.org/ver20/analytics/wsdl/RuleEngineBinding">
        <SOAP-ENV:Body>
                <tds:GetServicesResponse>
                        <tds:Service>
                                <tds:Namespace>http://www.onvif.org/ver10/device/wsdl</tds:Namespace>
                                <tds:XAddr>http://10.201.1.11:80/onvif/device_service</tds:XAddr>
                                <tds:Capabilities>
                                        <tds:Capabilities>
                                                <tds:Network IPFilter="false" ZeroConfiguration="false" IPVersion6="false" DynDNS="false" Dot11Conf
iguration="false" Dot1XConfigurations="0" HostnameFromDHCP="true" NTP="1" DHCPv6="false"></tds:Network>
                                                <tds:Security TLS1.0="false" TLS1.1="false" TLS1.2="false" OnboardKeyGeneration="false" AccessPolic
yConfig="false" DefaultAccessPolicy="true" Dot1X="false" RemoteUserHandling="false" X.509Token="false" SAMLToken="false" KerberosToken="false" User
nameToken="false" HttpDigest="false" RELToken="false" SupportedEAPMethods="0" MaxUsers="10" MaxUserNameLength="32" MaxPasswordLength="16"></tds:Sec
urity>
                                                <tds:System DiscoveryResolve="false" DiscoveryBye="true" RemoteDiscovery="false" SystemBackup="fals
e" SystemLogging="true" FirmwareUpgrade="true" HttpFirmwareUpgrade="true" HttpSystemBackup="false" HttpSystemLogging="false" HttpSupportInformation
="false" StorageConfiguration="true" MaxStorageConfigurations="8"></tds:System>
                                                </tds:Capabilities>
                                        </tds:Capabilities>
                                <tds:Version>
                                        <tt:Major>17</tt:Major>
                                        <tt:Minor>6</tt:Minor>
                                </tds:Version>
                        </tds:Service>
                        <tds:Service>
                                <tds:Namespace>http://www.onvif.org/ver10/media/wsdl</tds:Namespace>
                                <tds:XAddr>http://10.201.1.11:80/onvif/Media</tds:XAddr>
                                <tds:Capabilities><trt:Capabilities SnapshotUri="true" Rotation="false" VideoSourceMode="false" OSD="true" EXICompr
ession="false"><trt:ProfileCapabilities MaximumNumberOfProfiles="2"></trt:ProfileCapabilities><trt:StreamingCapabilities RTPMulticast="false" RTP_T
CP="false" RTP_RTSP_TCP="true" NonAggregateControl="true"></trt:StreamingCapabilities></trt:Capabilities></tds:Capabilities><tds:Version>
                                        <tt:Major>17</tt:Major>
                                        <tt:Minor>6</tt:Minor>
                                </tds:Version>
                        </tds:Service>
                        <tds:Service>
                                <tds:Namespace>http://www.onvif.org/ver20/imaging/wsdl</tds:Namespace>
                                <tds:XAddr>http://10.201.1.11:80/onvif/Imaging</tds:XAddr>
                                <tds:Capabilities>
                                <timg:Capabilities ImageStabilization="false" Presets="false"></timg:Capabilities>
                                </tds:Capabilities>
                                <tds:Version>
                                        <tt:Major>17</tt:Major>
                                        <tt:Minor>6</tt:Minor>
                                </tds:Version>
                        </tds:Service>
                        <tds:Service><tds:Namespace>http://www.onvif.org/ver10/events/wsdl</tds:Namespace>
                                <tds:XAddr>http://10.201.1.11:80/onvif/Events</tds:XAddr>
                                <tds:Capabilities>
                                        <tev:Capabilities WSSubscriptionPolicySupport="true" WSPullPointSupport="true" WSPausableSubscriptionManage
rInterfaceSupport="false" MaxNotificationProducers="5" MaxPullPoints="5" PersistentNotificationStorage="false">
                                </tev:Capabilities>
                                        </tds:Capabilities>
                                <tds:Version>
                                        <tt:Major>17</tt:Major>
                                        <tt:Minor>6</tt:Minor>
                                </tds:Version>
                        </tds:Service>
                        <tds:Service>
                                <tds:Namespace>http://www.onvif.org/ver20/analytics/wsdl</tds:Namespace>
                                <tds:XAddr>http://10.201.1.11:80/onvif/Analytics</tds:XAddr>
                                <tds:Capabilities><tan:Capabilities RuleSupport="true" AnalyticsModuleSupport="true" CellBasedSceneDescriptionSuppo
rted="true"></tan:Capabilities></tds:Capabilities>
                                <tds:Version>
                                        <tt:Major>17</tt:Major>
                                        <tt:Minor>6</tt:Minor>
                                </tds:Version>
                                </tds:Service>
                        <tds:Service>
                                <tds:Namespace>http://www.onvif.org/ver20/media/wsdl</tds:Namespace>
                                <tds:XAddr>http://10.201.1.11:80/onvif/Media20</tds:XAddr>
                                <tds:Capabilities>
<tr2:Capabilities SnapshotUri="true" Rotation="false" VideoSourceMode="false" OSD="true" Mask="true">
<tr2:ProfileCapabilities MaximumNumberOfProfiles="10" ConfigurationsSupported="VideoSource AudioSource VideoEncoder AudioEncoder AudioOutput AudioD
ecoder PTZ"></tr2:ProfileCapabilities>
<tr2:StreamingCapabilities RTSPStreaming="true" RTPMulticast="false" RTP_RTSP_TCP="true" NonAggregateControl="false"></tr2:StreamingCapabilities>  
</tr2:Capabilities>
</tds:Capabilities>
<tds:Version>
                                        <tt:Major>17</tt:Major>
                                        <tt:Minor>6</tt:Minor>
                                </tds:Version>
                        </tds:Service>
                        <tds:Service>
                                <tds:Namespace>http://www.onvif.org/ver20/ptz/wsdl</tds:Namespace>
                                <tds:XAddr>http://10.201.1.11:80/onvif/ptz_service</tds:XAddr>
                                <tds:Capabilities>
                                        <tptz:Capabilities EFlip="false" Reverse="false" GetCompatibleConfigurations="false" MoveStatus="true" Stat
usPosition="true" />
                                </tds:Capabilities>
                                <tds:Version>
                                        <tt:Major>17</tt:Major>
                                        <tt:Minor>6</tt:Minor>
                                </tds:Version>
                        </tds:Service>
                </tds:GetServicesResponse>
        </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

👻 06:10:37.373558 INFO     UI Loggy - Onvif - initialization complete
🐛 06:10:37.375558 DEBUG    UI Loggy - Ptz - move
🐛 06:10:37.376558 DEBUG    UI Loggy - Ptz - relativeMove
🐛 06:10:37.379557 DEBUG    UI Loggy - LoggingInterceptors - URI: http://10.201.1.11/onvif/ptz_service
🐛 06:10:37.379557 DEBUG    UI Loggy - LoggingInterceptors - REQUEST:
<?xml version="1.0" encoding="UTF-8"?><s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing">
<s:Header><Security xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-sec
ext-1.0.xsd" s:mustUnderstand="1"><UsernameToken><Username>admin</Username><Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-
username-token-profile-1.0#PasswordDigest">CbF2x1sx8c7SaemRaHDViSC3VnU=</Password><Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis
-200401-wss-soap-message-security-1.0#Base64Binary">uUCKmf1Vtjp1hScZ0xZwvA==</Nonce><Created xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-20
0401-wss-wssecurity-utility-1.0.xsd">2024-01-08T20:22:08.050005Z</Created></UsernameToken></Security></s:Header><s:Body xmlns:xsi="http://www.w3.or
g/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><RelativeMove xmlns="http://www.onvif.org/ver20/ptz/wsdl"><ProfileToken>Mai
nStream</ProfileToken><Translation><PanTilt xmlns="http://www.onvif.org/ver10/schema" x="100.0" y="200.0"/><Zoom xmlns="http://www.onvif.org/ver10/
schema" x="0"/></Translation></RelativeMove></s:Body></s:Envelope>
‼️ 06:10:37.402559 ERROR    UI Loggy - LoggingInterceptors - ERROR:
DioException [bad response]: This exception was thrown because the response has a status code of 400 and RequestOptions.validateStatus was configur
ed to throw for this status code.
The status code of 400 has the following meaning: "Client error - the request contains bad syntax or cannot be fulfilled"
Read more about status codes at https://developer.mozilla.org/en-US/docs/Web/HTTP/Status
In order to resolve this exception you typically have either to verify and fix your request code or you have to fix the server code.

‼️ 06:10:37.403558 ERROR    UI Loggy - Transport - ERROR RESPONSE:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding" xmlns:xsi="htt
p://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" x
mlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xml
ns:xenc="http://www.w3.org/2001/04/xmlenc#" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-
200401-wss-wssecurity-secext-1.0.xsd" xmlns:xmime="http://tempuri.org/xmime.xsd" xmlns:xmime5="http://www.w3.org/2005/05/xmlmime" xmlns:xmime4="htt
p://www.w3.org/2004/11/xmlmime" xmlns:xop="http://www.w3.org/2004/08/xop/include" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:tds="http://ww
w.onvif.org/ver10/device/wsdl" xmlns:tmd="http://www.onvif.org/ver10/deviceIO/wsdl" xmlns:trt="http://www.onvif.org/ver10/media/wsdl" xmlns:tr2="ht
tp://www.onvif.org/ver20/media/wsdl" xmlns:trp="http://www.onvif.org/ver10/replay/wsdl" xmlns:tse="http://www.onvif.org/ver10/search/wsdl" xmlns:tp
tz="http://www.onvif.org/ver20/ptz/wsdl" xmlns:tptz1="http://www.onvif.org/ver10/ptz/wsdl" xmlns:timg="http://www.onvif.org/ver20/imaging/wsdl" xml
ns:timg1="http://www.onvif.org/ver10/imaging/wsdl" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:tan="http://www.onvif.org/ver20/analyti
cs/wsdl" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:extXsd="http://www.onvifext.org/ver10/extFunctions/wsdl" xmlns:tns1="http://www.onvi
f.org/ver10/topics" xmlns:ter="http://www.onvif.org/ver10/error" xmlns:tanae="http://www.onvif.org/ver20/analytics/wsdl/AnalyticsEngineBinding" xml
ns:tanre="http://www.onvif.org/ver20/analytics/wsdl/RuleEngineBinding">
        <SOAP-ENV:Header></SOAP-ENV:Header><SOAP-ENV:Body>
                <SOAP-ENV:Fault>
                        <SOAP-ENV:Code>
                                <SOAP-ENV:Value>SOAP-ENV:Sender</SOAP-ENV:Value>
                                <SOAP-ENV:Subcode>
                                        <SOAP-ENV:Value>ter:NotAuthorized</SOAP-ENV:Value>
                                </SOAP-ENV:Subcode>
                        </SOAP-ENV:Code>
                        <SOAP-ENV:Reason>
                                <SOAP-ENV:Text xml:lang="en">The security token could not be authenticated or authorized</SOAP-ENV:Text>
                        </SOAP-ENV:Reason>
                </SOAP-ENV:Fault>
        </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

‼️ 06:10:37.413563 ERROR    UI Loggy - Ptz - Relative move failed
‼️ 06:10:37.413563 ERROR    UI Loggy - Ptz - Exception: Error code: {"Code":{"Value":"SOAP-ENV:Sender","Subcode":{"Value":{"$":"ter:NotAuthorized"}
}},"Reason":{"lang":"en","note":"The security token could not be authenticated or authorized"},"Node":null,"Role":null,"Detail":null}
‼️ 06:10:37.414561 ERROR    UI Loggy - Ptz - Attempting workaround with AbsoluteMove
🐛 06:10:37.414561 DEBUG    UI Loggy - Ptz - getStatus
🐛 06:10:37.416561 DEBUG    UI Loggy - LoggingInterceptors - URI: http://10.201.1.11/onvif/ptz_service
🐛 06:10:37.416561 DEBUG    UI Loggy - LoggingInterceptors - REQUEST:
<?xml version="1.0" encoding="UTF-8"?><s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing">
<s:Header><Security xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-sec
ext-1.0.xsd" s:mustUnderstand="1"><UsernameToken><Username>admin</Username><Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-
username-token-profile-1.0#PasswordDigest">cOGk0vkqqqrsLnR1InmmlW0OKxQ=</Password><Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis
-200401-wss-soap-message-security-1.0#Base64Binary">PPl3RuQJYAZ4S+eNtvAAwA==</Nonce><Created xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-20
0401-wss-wssecurity-utility-1.0.xsd">2024-01-08T20:22:08.088009Z</Created></UsernameToken></Security></s:Header><s:Body xmlns:xsi="http://www.w3.or
g/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><GetStatus xmlns="http://www.onvif.org/ver20/ptz/wsdl"><ProfileToken>MainSt
ream</ProfileToken></GetStatus></s:Body></s:Envelope>
‼️ 06:10:37.421561 ERROR    UI Loggy - LoggingInterceptors - ERROR:
DioException [bad response]: This exception was thrown because the response has a status code of 400 and RequestOptions.validateStatus was configur
ed to throw for this status code.
The status code of 400 has the following meaning: "Client error - the request contains bad syntax or cannot be fulfilled"
Read more about status codes at https://developer.mozilla.org/en-US/docs/Web/HTTP/Status
In order to resolve this exception you typically have either to verify and fix your request code or you have to fix the server code.

‼️ 06:10:37.422562 ERROR    UI Loggy - Transport - ERROR RESPONSE:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding" xmlns:xsi="htt
p://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" x
mlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xml
ns:xenc="http://www.w3.org/2001/04/xmlenc#" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-
200401-wss-wssecurity-secext-1.0.xsd" xmlns:xmime="http://tempuri.org/xmime.xsd" xmlns:xmime5="http://www.w3.org/2005/05/xmlmime" xmlns:xmime4="htt
p://www.w3.org/2004/11/xmlmime" xmlns:xop="http://www.w3.org/2004/08/xop/include" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:tds="http://ww
w.onvif.org/ver10/device/wsdl" xmlns:tmd="http://www.onvif.org/ver10/deviceIO/wsdl" xmlns:trt="http://www.onvif.org/ver10/media/wsdl" xmlns:tr2="ht
tp://www.onvif.org/ver20/media/wsdl" xmlns:trp="http://www.onvif.org/ver10/replay/wsdl" xmlns:tse="http://www.onvif.org/ver10/search/wsdl" xmlns:tp
tz="http://www.onvif.org/ver20/ptz/wsdl" xmlns:tptz1="http://www.onvif.org/ver10/ptz/wsdl" xmlns:timg="http://www.onvif.org/ver20/imaging/wsdl" xml
ns:timg1="http://www.onvif.org/ver10/imaging/wsdl" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:tan="http://www.onvif.org/ver20/analyti
cs/wsdl" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:extXsd="http://www.onvifext.org/ver10/extFunctions/wsdl" xmlns:tns1="http://www.onvi
f.org/ver10/topics" xmlns:ter="http://www.onvif.org/ver10/error" xmlns:tanae="http://www.onvif.org/ver20/analytics/wsdl/AnalyticsEngineBinding" xml
ns:tanre="http://www.onvif.org/ver20/analytics/wsdl/RuleEngineBinding">
        <SOAP-ENV:Header></SOAP-ENV:Header><SOAP-ENV:Body>
                <SOAP-ENV:Fault>
                        <SOAP-ENV:Code>
                                <SOAP-ENV:Value>SOAP-ENV:Sender</SOAP-ENV:Value>
                                <SOAP-ENV:Subcode>
                                        <SOAP-ENV:Value>ter:NotAuthorized</SOAP-ENV:Value>
                                </SOAP-ENV:Subcode>
                        </SOAP-ENV:Code>
                        <SOAP-ENV:Reason>
                                <SOAP-ENV:Text xml:lang="en">The security token could not be authenticated or authorized</SOAP-ENV:Text>
                        </SOAP-ENV:Reason>
                </SOAP-ENV:Fault>
        </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Unhandled exception:
Exception: Error code: {"Code":{"Value":"SOAP-ENV:Sender","Subcode":{"Value":{"$":"ter:NotAuthorized"}}},"Reason":{"lang":"en","note":"The security
 token could not be authenticated or authorized"},"Node":null,"Role":null,"Detail":null}
#0      Transport.sendRequest (package:easy_onvif/src/soap/transport.dart:46:13)
<asynchronous suspension>
#1      Ptz.getStatus (package:easy_onvif/src/ptz.dart:278:22)
<asynchronous suspension>
#2      Ptz.move (package:easy_onvif/src/ptz.dart:345:25)
<asynchronous suspension>
#3      OnvifMovePtzCommand.run (package:easy_onvif/src/cmd/onvif_ptz_command.dart:877:7)
<asynchronous suspension>
#4      CommandRunner.runCommand (package:args/command_runner.dart:212:13)
<asynchronous suspension>

onvif discovery crash in windows

hi, i use this code for device descovery:

  final multicastProbe = MulticastProbe();

  await multicastProbe.probe();

  for (var device in multicastProbe.onvifDevices) {
    print(
        '${device.name} ${device.location} ${device.hardware} ${device.xAddr}');
  }

but when i run it my program crashs with bellow error

Unhandled exception:
SocketException: Failed to create datagram socket (OS Error: The requested address is not valid in its context.
, errno = 10049), address = 239.255.255.250, port = 3702
#0      _NativeSocket.bindDatagram (dart:io-patch/socket_patch.dart:1049:7)
<asynchronous suspension>
#1      MulticastProbe.probe (package:easy_onvif/src/multicast_probe.dart:24:5)
<asynchronous suspension>
#2      main (file:///C:/projects/dart/onvif-test/bin/onvif.dart:17:3)
<asynchronous suspension>

Unhandled exception: type 'Null' is not a subtype of type 'String' calling Onvif.connect

Hi, i am using the ^2.0.13+17 version but when i try to call the method Onvif.connect i get this error:

Unhandled exception:
type 'Null' is not a subtype of type 'String'
#0 OnvifUtil.mappedToString (package:easy_onvif/src/util/util.dart:142:68)
#1 _$TimeZoneFromJson (package:easy_onvif/src/model/time_zone.g.dart:10:21)
#2 new TimeZone.fromJson (package:easy_onvif/src/model/time_zone.dart:18:7)
#3 _$SystemDateAndTimeFromJson (package:easy_onvif/src/model/system_date_and_time.g.dart:17:22)
#4 new SystemDateAndTime.fromJson (package:easy_onvif/src/model/system_date_and_time.dart:43:7)
#5 _$GetSystemDateAndTimeResponseFromJson (package:easy_onvif/src/model/system_date_time_response.g.dart:12:25)
#6 new GetSystemDateAndTimeResponse.fromJson (package:easy_onvif/src/model/system_date_time_response.dart:18:7)
#7 _$BodyFromJson (package:easy_onvif/src/model/body.g.dart:43:42)
#8 new Body.fromJson (package:easy_onvif/src/model/body.dart:214:55)
#9 _$EnvelopeFromJson (package:easy_onvif/src/model/envelope.g.dart:10:18)
#10 new Envelope.fromJson (package:easy_onvif/src/model/envelope.dart:20:7)
#11 new Envelope.fromXml (package:easy_onvif/src/model/envelope.dart:23:16)
#12 Soap.retrieveEnvelope (package:easy_onvif/src/soap.dart:67:21)

#13 DeviceManagement.getSystemDateAndTime (package:easy_onvif/src/device_management.dart:150:22)

#14 Onvif.initialize (package:easy_onvif/src/onvif_base.dart:96:22)

#15 Onvif.connect (package:easy_onvif/src/onvif_base.dart:87:5)

#16 OnvifHelperCommand.initializeOnvif (package:easy_onvif/cmd/onvif_helper_command.dart:28:14)

#17 OnvifGetDeviceInformationResponseDeviceManagementCommand.run (package:easy_onvif/cmd/onvif_device_management_command.dart:68:5)

#18 CommandRunner.runCommand (package:args/command_runner.dart:209:13)

I am attaching the whole log in the hope that it will be useful for solving the problem.

👻 23:37:45.306368 INFO UI Loggy - Onvif - initializing ...
🐛 23:37:45.309145 DEBUG UI Loggy - DeviceManagement - getSystemDateAndTime
🐛 23:37:45.323206 DEBUG UI Loggy - Onvif - URI: http://192.168.0.25/onvif/device_service
🐛 23:37:45.323269 DEBUG UI Loggy - Onvif - REQUEST:

🐛 23:37:45.577436 DEBUG UI Loggy - Onvif - RESPONSE:

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:chan="http://schemas.microsoft.com/ws/2005/02/duplex" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:c14n="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xenc="http://www.w3.org/2001/04/xmlenc#" xmlns:wsc="http://schemas.xmlsoap.org/ws/2005/02/sc" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:ns2="http://www.onvif.org/ver10/pacs" xmlns:xmime="http://tempuri.org/xmime.xsd" xmlns:xop="http://www.w3.org/2004/08/xop/include" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:wsrfbf="http://docs.oasis-open.org/wsrf/bf-2" xmlns:wstop="http://docs.oasis-open.org/wsn/t-1" xmlns:wsrfr="http://docs.oasis-open.org/wsrf/r-2" xmlns:ns1="http://www.onvif.org/ver10/accesscontrol/wsdl" xmlns:ns3="http://www.onvif.org/ver10/actionengine/wsdl" xmlns:tad="http://www.onvif.org/ver10/analyticsdevice/wsdl" xmlns:tds="http://www.onvif.org/ver10/device/wsdl" xmlns:timg="http://www.onvif.org/ver20/imaging/wsdl" xmlns:tptz="http://www.onvif.org/ver20/ptz/wsdl" xmlns:trc="http://www.onvif.org/ver10/recording/wsdl" xmlns:trt="http://www.onvif.org/ver10/media/wsdl" xmlns:trv="http://www.onvif.org/ver10/receiver/wsdl" xmlns:tse="http://www.onvif.org/ver10/search/wsdl" xmlns:vifsvr="http://www.onvif.org/ver10/events/wsdl/PullPointSubscriptionBinding" xmlns:vifsvr10="http://www.onvif.org/ver20/analytics/wsdl/AnalyticsEngineBinding" xmlns:vifsvr2="http://www.onvif.org/ver10/events/wsdl/EventBinding" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:vifsvr3="http://www.onvif.org/ver10/events/wsdl/SubscriptionManagerBinding" xmlns:vifsvr4="http://www.onvif.org/ver10/events/wsdl/NotificationProducerBinding" xmlns:vifsvr5="http://www.onvif.org/ver10/events/wsdl/NotificationConsumerBinding" xmlns:vifsvr6="http://www.onvif.org/ver10/events/wsdl/PullPointBinding" xmlns:vifsvr7="http://www.onvif.org/ver10/events/wsdl/CreatePullPointBinding" xmlns:vifsvr8="http://www.onvif.org/ver10/events/wsdl/PausableSubscriptionManagerBinding" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:vifsvr9="http://www.onvif.org/ver20/analytics/wsdl/RuleEngineBinding" xmlns:tan="http://www.onvif.org/ver20/analytics/wsdl" xmlns:ter="http://www.onvif.org/ver10/error" xmlns:tns1="http://www.onvif.org/ver10/topics">SOAP-ENV:Header</SOAP-ENV:Header>SOAP-ENV:Bodytds:GetSystemDateAndTimeResponsetds:SystemDateAndTimett:DateTimeTypeNTP</tt:DateTimeType>tt:DaylightSavingsfalse</tt:DaylightSavings>tt:TimeZonett:TZ/</tt:TimeZone>tt:UTCDateTimett:Timett:Hour22</tt:Hour>tt:Minute37</tt:Minute>tt:Second45</tt:Second></tt:Time>tt:Datett:Year2022</tt:Year>tt:Month12</tt:Month>tt:Day26</tt:Day></tt:Date></tt:UTCDateTime>tt:LocalDateTimett:Timett:Hour22</tt:Hour>tt:Minute37</tt:Minute>tt:Second45</tt:Second></tt:Time>tt:Datett:Year2022</tt:Year>tt:Month12</tt:Month>tt:Day26</tt:Day></tt:Date></tt:LocalDateTime></tds:SystemDateAndTime></tds:GetSystemDateAndTimeResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>

Any idea why I'm getting this? Thank you in advance

OnvifUtil.xmlToMap

i have the following bug and i could not found the correct what to solve
I try to get an information about NVR using this package

mac@alimac camera_playground % onvif  probe
Unhandled exception:
Exception
#0      OnvifUtil.xmlToMap (package:easy_onvif/src/util/util.dart:20:30)
#1      new Envelope.fromXml (package:easy_onvif/src/model/envelope.dart:23:35)
#2      MulticastProbe.probe.<anonymous closure> (package:easy_onvif/src/multicast_probe.dart:37:31)
#3      _RootZone.runUnaryGuarded (dart:async/zone.dart:1586:10)
#4      _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339:11)
#5      _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)
#6      _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:774:19)
#7      _StreamController._add (dart:async/stream_controller.dart:648:7)
#8      _StreamController.add (dart:async/stream_controller.dart:596:5)
#9      new _RawDatagramSocket.<anonymous closure> (dart:io-patch/socket_patch.dart:2413:33)
#10     _NativeSocket.issueReadEvent.issue (dart:io-patch/socket_patch.dart:1322:14)
#11     _microtaskLoop (dart:async/schedule_microtask.dart:40:21)
#12     _startMicrotaskLoop (dart:async/schedule_microtask.dart:49:5)
#13     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:122:13)
#14     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:193:5)
mac@alimac camera_playground % 

hi, thanks for your reply and 1.0.5. here are the same results with logs

hi, thanks for your reply and 1.0.5. here are the same results with logs
FYI.
i also attached the flutter doctor info hope they can help.

[√] Flutter (Channel stable, 3.0.0, on Microsoft Windows [版本
10.0.19042.1645], locale zh-TW)
[√] Android toolchain - develop for Android devices (Android SDK version
30.0.3)
[√] Chrome - develop for the web
[√] Android Studio (version 2020.3)
[√] Connected device (3 available)
[√] HTTP Host Availability

compileSdkVersion 31

Launching lib\main.dart on CPH1941 in debug mode...
Running Gradle task 'assembleDebug'...
√ Built build\app\outputs\flutter-apk\app-debug.apk.
W/FlutterActivityAndFragmentDelegate(28499): A splash screen was provided
to Flutter, but this is deprecated. See
flutter.dev/go/android-splash-migration for migration steps.
Debug service listening on ws://127.0.0.1:52884/ND883QZomr4=/ws
Syncing files to device CPH1941...
I/f.testeasyonvi(28499):
Thread[6,tid=28509,WaitingInMainSignalCatcherLoop,Thread*=0xb400007651c45000,peer=0x13500258,"Signal
Catcher"]: reacting to signal 3
I/f.testeasyonvi(28499):
I/f.testeasyonvi(28499): Wrote stack traces to tombstoned
I/flutter (28499): 2022-05-15T09:04:09.713293 I
_MyHomePageState._initialize: _MyHomePageState: _initialize:
I/flutter (28499): 2022-05-15T09:04:42.760269 I
_MyHomePageState._initialize: _MyHomePageState: _initialize:
deviceInfo.model = TL-IPC43AN-4
E/flutter (28499): [ERROR:flutter/lib/ui/ui_dart_state.cc(198)] Unhandled
Exception: Exception: DioError [DioErrorType.response]: Http status error
[400]
E/flutter (28499): Source stack:
E/flutter (28499): #0 DioMixin.fetch
(package:dio/src/dio_mixin.dart:488:35)
E/flutter (28499): #1 DioMixin.request
(package:dio/src/dio_mixin.dart:483:12)
E/flutter (28499): #2 DioMixin.post
(package:dio/src/dio_mixin.dart:97:12)
E/flutter (28499): #3 Soap.send
(package:easy_onvif/src/soap.dart:15:28)
E/flutter (28499): #4 Soap.retrieveEnvlope
(package:easy_onvif/src/soap.dart:41:37)
E/flutter (28499): #5 Ptz.relativeMove
(package:easy_onvif/src/ptz.dart:202:16)
E/flutter (28499): #6 Ptz.move (package:easy_onvif/src/ptz.dart:166:11)
E/flutter (28499): #7 Ptz.moveLeft
(package:easy_onvif/src/ptz.dart:179:11)
E/flutter (28499): #8 _MyHomePageState._initialize
(package:testeasyonvif/main.dart:88:21)
E/flutter (28499):
E/flutter (28499):
E/flutter (28499): #0 Soap.send (package:easy_onvif/src/soap.dart:32:7)
E/flutter (28499):
E/flutter (28499): #1 Soap.retrieveEnvlope
(package:easy_onvif/src/soap.dart:41:26)
E/flutter (28499):
E/flutter (28499): #2 Ptz.relativeMove
(package:easy_onvif/src/ptz.dart:202:5)
E/flutter (28499):
E/flutter (28499): #3 Ptz.move (package:easy_onvif/src/ptz.dart:166:5)
E/flutter (28499):
E/flutter (28499): #4 Ptz.moveLeft
(package:easy_onvif/src/ptz.dart:179:5)
E/flutter (28499):
E/flutter (28499): #5 _MyHomePageState._initialize
(package:testeasyonvif/main.dart:88:5)
E/flutter (28499):

C Davis @.***> 於 2022年5月15日 週日 上午12:26寫道:

@wmhseir3 https://github.com/wmhseir3
I've published v1.0.5 which among several other things backs out the
dependencies that required overrides.

Let me know if this version solves the issues.


Reply to this email directly, view it on GitHub
#8 (comment),
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ANFBGS6HL5KATGKTLFP54ETVJ7H2XANCNFSM5G7GH7WA
.
You are receiving this because you were mentioned.Message ID:
@.***>

Originally posted by @wmhseir3 in #8 (comment)

DioError [DioErrorType.other]: HttpException: Connection closed before full header was received

hi, I have recently obtained one onvif nvt which is working smoothly using the top download onvif app from Google play.
However, this new nvt can not even run the "await onvif.initialize();" The DioError messages captured are as followings. I am suspecting the Dio plugin may have compatibility issues as with easyonvif. As issue #3/4 and this issue are all related with it. Can you please change the Dio to else one which might help solving these issues?

E/flutter (13446): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: Exception: DioError [DioErrorType.other]: HttpException: Connection closed before full header was received, uri = http://192.168.1.106:8000/onvif/device_service
E/flutter (13446): #0 DioMixin.assureDioError (package:dio/src/dio_mixin.dart:819:20)
E/flutter (13446): #1 DioMixin._dispatchRequest (package:dio/src/dio_mixin.dart:678:13)
E/flutter (13446):
E/flutter (13446): #2 DioMixin.fetch.. (package:dio/src/dio_mixin.dart)
E/flutter (13446):
E/flutter (13446):
E/flutter (13446): #0 Soap.send (package:easy_onvif/src/soap.dart:34:7)
E/flutter (13446):
E/flutter (13446): #1 Soap.retrieveEnvlope (package:easy_onvif/src/soap.dart:43:26)
E/flutter (13446):
E/flutter (13446): #2 DeviceManagement.getSystemDateAndTime (package:easy_onvif/src/deviceManagement.dart:145:22)
E/flutter (13446):
E/flutter (13446): #3 Onvif.initialize (package:easy_onvif/src/onvif.dart:33:22)
E/flutter (13446):
E/flutter (13446): #4 _MyHomePageState._initialize (package:testeasyonvif/main.dart:79:5)

getpresets not working

presets = await onvif.ptz.getPresets(profs[0].token);

_Exception (Exception: Error code: {Code: {Value: {$: SOAP-ENV:Sender}}, Reason: {Text: {@xml:lang: en, $: Method 'GetPresets' not implemented: method name or namespace not recognized}}})

How send audio stream to camera ?

I wanna send audio to unv or any vendor camera support play sound in camera.
easy_onvif support this ?
if yes, how can i stream audio to camera using easy_onvif ?

ptz error

Everything seems to be working nicely until I hit line 61 of example.dart.

await onvif.ptz.moveLeft(profs[0].token);

Full log attached. PTZ is working with some other apps, so my camera at least somewhat implements the onvif ptz protocol... Thanks for any tips or advice!
ptz-error.txt

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.