-
Notifications
You must be signed in to change notification settings - Fork 240
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
Conversation
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'
There was a problem hiding this 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([ |
There was a problem hiding this comment.
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"
There was a problem hiding this comment.
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?
}, | ||
{ | ||
"name": "Roger Hardiman", | ||
"email": "opensource@rjh.org.uk", | ||
"url": "http://www.rjh.org.uk" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Only two fixes from the CI left: https://travis-ci.org/agsh/onvif/builds/608839166#L229 |
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
Hi @agsh |
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! |
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.