Giter Site home page Giter Site logo

Comments (5)

faithoflifedev avatar faithoflifedev commented on August 14, 2024

Hello @wmhseir3, it looks like there is a timeout connecting to your device. The library attempts to connect to "http://$host/onvif/device_service" where in your case host is "192.168.1.101:8899". You can try connecting with another tool like telnet to confirm connectivity between your computer and your Onvif device.

from easy_onvif.

wmhseir3 avatar wmhseir3 commented on August 14, 2024

I managed to find another onvif nvt to look into the initialize issue and found another clue which might be new to the issue or related I am not sure. The captured exception screen is as followings:
easyonvif_getcapability_Exception
and the actual envelop received is as followings:
nvt_envelope
From my understandings, the system.dart is missing the "Extension" Jsonkey, or else, which can be the root cause of the exception.
Am I right on this?
I was then further realized that using those JsonSerializable related *.g.dart files which may be with object coding style preferences. However, it may cause troubles when facing a variety of brands of onvif nvts in the market responding with not expected envelops.

from easy_onvif.

faithoflifedev avatar faithoflifedev commented on August 14, 2024

Hi @wmhseir3,

This looks like a new issue. Without being able to see the Soap XML generated by your device, it's difficult for me to troubleshoot the issue. However, I have made an adjustment to the code and published a new version of the library. This version makes more of the "capabilities" response from the Onvif device optional. So if the device responds with a missing section, it won't error out. This may resolve your issue. If not, we'll look at figuring out the easiest way to get the Soap XML response for your device.

from easy_onvif.

wmhseir3 avatar wmhseir3 commented on August 14, 2024

Hi, here is the mentioned xml for the capabilities from the tested nvt
capabilities.txt
.

from easy_onvif.

faithoflifedev avatar faithoflifedev commented on August 14, 2024

Hi @wmhseir3 , try out the new version of the package that I just published - v0.0.8 - it turns out that the WDSL doc related to the code generating the error shows the following:
"SupportedVersions - unbounded; [OnvifVersion]"

Where unbound means that there could be one or more "SupportedVersions". The previous code assumed there was always "more" and tried to de-serialize a List but in the case that there was only one the error you provided was thrown.

The code now handles both cases.

from easy_onvif.

Related Issues (20)

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.