Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Events and ServerMockup #127

Merged
merged 14 commits into from
Nov 12, 2019
Merged

Improve Events and ServerMockup #127

merged 14 commits into from
Nov 12, 2019

Conversation

RogerHardiman
Copy link
Collaborator

@RogerHardiman RogerHardiman commented Nov 7, 2019

Events..... Changes to make events work with Axis cameras and with NAT.

There is a new file called example6.js which I am using to connect to 4 different cameras and to the serverMockup and can receive events from all of them.

The Axis events are not documented properly in the ONVIF Spec and I had to use ODM and Wireshark. They need to include a tag and a tag in the Pull Request.

ServerMockup.... made changes so discovery works properly and ODM now detects it. Added a few other XML stubs. The purpose was to get ODM to receive events from the ServerMockup so I could verify how ODM received events.

RogerHardiman and others added 10 commits November 6, 2019 11:07
Some changes to all testing of the serverMockup outside of the npm test environment.

Fix discovery so the server can be discovered by ONVIF Device Manager (UUID format is UUID:aaa-bbb-ccc and not URN:UUID:aaa-bbb-ccc
Fix reply header Should be application/soap+xml
Fix namespace parsing (Subscribe messages do not have an ONVIF namespace)
Add dummy XML for more GetZeroConfiguration and GetNetworkInterfaces

Add startServerMockup.js which is used to start the ServerMockup as a standalone application

I started these changes to I could test Events through the serverMockup
These changes allow ONVIF Device Manager to discover the server, connect to it and recover the device name/firmware
Windows does not like coffee -c test/*.coffee
It does work if you just pass in the containing folder
So switch to using coffee -c ./test
Many thanks to the answer on the coffeescript pages for the workaround
Mentioned briefly in the ONVIF spec. Thanks go to ODM and Wireshark
for the working example.
The hostname and port were changed.
The host and href were not updated properly.

Was detected when rewriting PullPoint URLs
Node reports 32bit and 64bit Node as 'win32'
Copy link
Owner

@agsh agsh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@@ -36,14 +41,37 @@ new Cam({

// Use Nimbe's flow to execute ONVIF commands in sequence
flow.series([
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can use promises here since engine version in package.json is "node": ">=6.0"

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea. All my other examples use nimble so I will have a go with promises on all of them. Could we merge without example6 and leave the example in my branch?

Comment on lines +32 to +36
},
{
"name": "Roger Hardiman",
"email": "opensource@rjh.org.uk",
"url": "http://www.rjh.org.uk"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@agsh
Copy link
Owner

agsh commented Nov 10, 2019

Only two fixes from the CI left: https://travis-ci.org/agsh/onvif/builds/608839166#L229

@RogerHardiman
Copy link
Collaborator Author

lint changes have now been committed to my branch

Windows graps port 3702 and you have to use a Microsoft API to listen for
broadcast messages
@RogerHardiman
Copy link
Collaborator Author

Hi @agsh
The Travis CI builds are terminating again.
It may have been stuck as I added an extra UDP socket into serverMockup.coffee
To make the code cleaner I have implemented a close() in serverMockup and test called 'zzzterminate.coffee' so it is the last test executed (alphabetical order) and it closes the serverMockup.

@agsh
Copy link
Owner

agsh commented Nov 12, 2019

Hi @agsh
The Travis CI builds are terminating again.
It may have been stuck as I added an extra UDP socket into serverMockup.coffee
To make the code cleaner I have implemented a close() in serverMockup and test called 'zzzterminate.coffee' so it is the last test executed (alphabetical order) and it closes the serverMockup.

Yes, I thought about this a year ago here: https://github.com/agsh/onvif/blob/v1/test/serverMockup.js when try to rewrite tests in js. But I never completed the job.

I think, you can merge this branch into the master. Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants