bartbutenaers / node-red-contrib-onvif-nodes

Node Red nodes for communicating with OnVif compliant IP devices
Apache License 2.0
65 stars 25 forks source link

Onvif Events - issue regarding potential omission of data #37

Closed smallstepz closed 4 months ago

smallstepz commented 5 months ago

Hi, thank you for this awesome library! I'm using it very well!

Most of the data for the events occuring are coming in fine but it seems like there are some data being omitteed.

I'm currently looking into the camera as well but I just wanted to reach out if I can maybe get some hints here as well. When the event occurs there should be more than one data field that should be detected but only one is given.

When using the Onvif Device Manager I can see all the data coming in but for some reason I'm getting only one of the data field. Is it possible that this when the event is being requested it is only reading the last field of the data?

As shown in the image, the color is coming in but for instance the car brand (which should be provided as one of the data) is not being presented.

I hope I can get some opinions about these happenings.

Thank you!

flow

bartbutenaers commented 4 months ago

HI @smallstepz,

Sorry for the delay! I have very few free time lately... Fortunately my collegua @geoffreydemaagd has been so kind to investigate your issue. Hopefully his pull request will solve it. But this fix has NOT been tested yet, so I will need to ask your assistance for testing.

There are 2 different ways to install his fix:

Thanks! Bart

bartbutenaers commented 4 months ago

Hi @smallstepz, i would appreciate if you could give us some feedback whether our fix has solved your issue?

smallstepz commented 4 months ago

Hi @bartbutenaers

Thank you very much for the fix!

I appreciate your support!

Also I apologize about the late reply.

I wasn't able to test out the fixed version yet but I will test it this coming Monday and will leave the feedback.

Previously, I did make a small change (similar to the changes you have made by adding a list) in the source after cloning it and it worked.

I will clone the newer version, test it and let you know!

Again thank you for your support!

It's very appreciated!

bartbutenaers commented 4 months ago

@smallstepz Looking forward for your test results!

Previously, I did make a small change (similar to the changes you have made by adding a list) in the source after cloning it and it worked.

You can always share your code next time, via a pull request or simply inside the issue. Because now @geoffreydemaagd and myself had to figure out a solution, while you already had a working and tested fix...

I receive almost no pull requests for any of my nodes, which is kind of pity...

Thanks!

smallstepz commented 4 months ago

Hi @bartbutenaers

I have tested it out and found that it works fine with a small change!

  outputMsg.data.push = {
     name: camMessage.message.message.data.simpleItem[x].$.Name,
     value: camMessage.message.message.data.simpleItem[x].$.Value
  }

To this code:

  outputMsg.data.push({
     name: camMessage.message.message.data.simpleItem[x].$.Name,
     value: camMessage.message.message.data.simpleItem[x].$.Value
  })

I am always used to just using github so I haven't had any experiences with the pull request. But if I do come across any other issues I will send a pull request or let you know via the issue.

Again thank you and @geoffreydemaagd for the commitment.

What you have made and shared is very appreciated!

bartbutenaers commented 4 months ago

Hi @smallstepz, Thanks for testing and for the code update!! I have updated the master branch of this repo with your fix. Good luck with your project! Bart