I have a device that uses ONVIF to be added to the Recording Server in Xprotect Management. Currently, I manually create a couple of Generic Events in Xprotect Management related to the device.
I want these events to be added automatically when I add the device to the Recording Server.
Is it possible to add Generic Events in Xprotect Management via ONVIF protocol while registering the device in Management Client? If not, is the only solution to write a plugin driver for my device?
In general a device can add device events through the process of being added to the system.
Generic Events, User-Defined Events, Analytics Events cannot be added by a device in this way.
I wonder if not it is device events you want. To me it seems the logical choice to have an event that is part of the device and driver that can be added by the user on the camera properties in the Management Client, but on the other hand I do not know if you have a special use case scenario.
Where would the device events be defined in the firmware of the device itself? The device that Rohan and I are using does not have any configured events in the properties section of the device. Where do we define these device events in the firmware of the device itself? Is that through the ONVIF profile?
Also, for these device events, do they flow through the camera stream or can they be configured to flow through TCP so that there is no issue with the events when there is potential network downtime?
You mentioned "Generic Events, User-Defined Events, Analytics Events cannot be added by a device in this way. "
Does this mean, that even if one writes a driver for a device, it is still not possible to add Generic Events automatically during the process of adding the device to the system? Or is it possible to add Generic Events through the MIP SDK?
These events have another purpose it would be strange to have these in a device driver. I must maintain that device events are for devices and device driver.
The MIP SDK does provide methods to add events.
Generic events are very special and was created to be able to send strings via TCP that could be reacted to, I would recommend to first look at user-defined events or analytics events.
Thank you again @Bo Ellegård Andersen (Milestone Systems) for your reply and for sharing the link.
We stick to Generic Events since our hardware runs on Linux and uses protocol integration (TCP) to trigger events on the server. We want our driver to create those Generic Events during the installation process in the recording server.
Does the SDK provide methods to add all types of events? If yes, please guide us to the documentation on how to add different types of events (especially Generic Events) via MIP SDK.
For the device events, do they flow through the camera stream? is it possible to trigger device events using TCP connection?
Doing configuration of XProtect, setting up events, you can do if you develop an app or service to do so. As a starter please explore the Config API Client sample.
Your question is very general. As far as I understand you have ONVIF device (possibly ONVIF compliant device) the events of which you want to use in Milestone XProtect. For this you can use ONVIF driver to add this device. During the process of adding the device we request information from it what events it supports by using GetEventProperties (see ONVIF specification) request. And we receive as response GetEventPropertiesResponse with the list of events. Based on this list we create list of events that can be configured in Managment Client using the interface of ONVIF driver (event tab). You should configure which events you want to use, make rules for them or configure Alarm definitions. It can’t be more automatic than this. Then we subscribe to receive update when events change using CreatePullPointSubscription (see ONVIF specification). For the requests for the list of events and subscription to events we use HTTP/TCP. If you this is not enough for you and you want to make your own driver using MIP SDK you have to use the documentation to see what’s possible regarding events.
Our interpretation is that it is impossible (or at least not normal) to use ConfigurationAPI and change configuration using the MIP SDK for plug-in integration and do the configuration change during integration of the DLL plug-in. Can you confirm this?
In Milestone you can make plugins to the Smart Client, Management Client and Event Server. It is perfectly normal to develop plugins that does configuration and creates events configuration or similar.
What I understood (maybe mistakenly) is that you wanted to do configuration from a (camera?) device running on the ONVIF driver, that seemed odd to me. I guess the device can be al sorts of device so it could be feasible, even a good idea. Perhaps I should have asked further into the design you envision, I must admit that right now I do not have the insights to judge or advise on the design of your solution. You are welcome to elaborate on the use case and solution design if you want my advise.
On one thing I stand convinced, I will recommend using analytics events over generic events whenever possible.
The device we are working on has a couple of sensors (not a camera), however, it streams the status of the room to the XProtect VMS. Our device also triggers some events if some threshold in the room is passed and we use Generic Events for this.
Currently, our device is integrated into the VMS via ONVIF protocol and we are manually adding a couple of Generic Events and Rules to the VMS for each device.
We intend to write a driver (plug-in) for our device; as a result, we use the .dll file for the driver to integrate into VMS. We also want the .dll file to add the Generic Events and Rules automatically in the VMS (changing configuration!) during the integration process.
From what I see, we should write the .dll using both component integration and plugin integration libraries. Something like combining what the following two examples do:
It is correct that you cannot configure generic events or other configuration not directly related to the hardware (in XProtect) from a device driver plug-in. However, if you implement an Event Server, Smart Client or Management Client plug-in this can be done. An alternative would be to create an installer that does this during the installation. How to do it in an installer is beyond the purpose of this forum, but for the actual code to change the configuration you can be inspired by the samples Bo mentions above.
Thanks @Rie Kiuchi (Milestone Systems) for your answer.
We need to add some Generic Events and Rules to the Management server as part of adding our device via its driver plug-in.
Are you suggesting to have a separate installer with our device?
In this case, the customer has to once go through driver installation and add the device, and then separately use the installer to add the events. Can you think of a way to have the customer only add the driver to the milestone system and we can automatically add the desired generic events and rules to the Milestone Management system?
When you use the Add Hardware wizard to add a device it does not enable you to run any other configuration task like setting up generic events or rules.
You need to run a executable that uses the MIP SDK or APIs to configure stuff like that.
Looking at it the other way; if you have an executable (installer or otherwise) that setup generic events, configure rules and more, it could also “add a device”.
My suggestion is actually not to mix this. Let the addition of the ONVIF driver based device be done by the Add Hardware wizard. Let the configuration be done by a MIP SDK based app.
Here my recommendation is clear, do not put functionality in a driver that does anything but driver stuff.
Put configuration in a standalone app or service, or alternatively a Management Client plugin so that your configuration has a UI in the Management Client where also all other configuration is done..
Potentially you could make an app that -
puts/installs the driver dll in the right place
restarts the recording Server service
configures events etc.
(I have an idea this is what you were suggesting but I did not understand, I hope I am getting closer.)