Hello,
I am working on an IoT Platform that is connecting to the XProtect system via the MIP REST API. The main purpose of the IoT Platform is to register devices and receive events from the devices. What I want to achieve is to duplicate the provisioning of the device and device event sending inside the XProtect system.
My question is, could I create a non-physical device in XProtecte and use it to send, for instane, Metadata events for it?
It would be very nice if you could give me example REST endpoints from which to read more about the scenario.
Thanks,
Encho
Hello @Bo Ellegård Andersen (Milestone Systems),
Sorry for my delayed answer.
I can confirm that the Analytics event is sent and received by the XProtect system. The way that I validate the received event is by querying the API for the events /API/rest/v1/events?include=data and checking whether the event I have sent is there - this works.
I have now another issue - I want to trigger an alarm for the given alanytics event I am sending. I am trying to create an alarm definition for my custom analytics event by calling the API /API/rest/v1/alarmDefinitions using the following JSON payload:
{
"displayName": "Test alarm",
"enabled": true,
"name": "Test alarm",
"description": "This alarm is triggered when there is an analytics event publishing for it",
"eventType": "cdcee15f-c43b-4ef2-9195-7ad961c127e5",
"sourceList": [
{
"type": "analyticsEvents",
"id": "5e236437-915b-4049-83f1-2a86b96ca15f"
}
],
"enableRule": 2,
"timeProfile": null,
"enableEventList": [
{
"type": "analyticsEvents",
"id": "5e236437-915b-4049-83f1-2a86b96ca15f"
}
],
"disableEventList": [],
"managementTimeoutTime": "00:10:00",
"managementTimeoutEventList": [],
"relatedCameraList": [],
"mapType": 0,
"owner": "admin",
"priority": "8188ff24-b5da-4c19-9ebf-c1d8fc2caa75",
"category": "00000000-0000-0000-0000-000000000000",
"triggerEventList": [],
"autoClose": false,
"assignableToAdmins": true
}
The “eventType” field is the GUID of my analytics event for which I am sending the events. The problem is that I do not know what to put in the “sourceList” and “enableEventList” fields because I do not have active sources like cameras or microphones which to act as source. I appriciate any help here.
Thanks,
Encho
As a first tip; please create an Alarm Definition in the Management Client and the read it, then you will have an example of valid values.
I believe there might be a conflict in what you aim to do. An Alarm must have a source and that source must be an item on the XProtect VMS. You cannot do without, so that is what you mean to do that is not possible. The item can be a camera, microphone or other device types, it can also be an item defined by your solution like seen in the Sensor Monitor sample. (https://doc.developer.milestonesys.com/html/index.html?base=samples/pluginsamples/sensormonitor/readme.html&tree=tree_1.html) As a workaround it can be the Management Server object.
Hello @Bo Ellegård Andersen (Milestone Systems)
I have tried to create Alarm definition in the Managemenr Client but is giving me an the following error:
My Event Server is running and I can see that from the system try icon and from the logs:
Log file is attached.
My installation is XProtect Essential+ if that has something to do with it.
The configuration for registered services is as follows:
How can I proceed from here?
Something more, can you tell me how to provide the Management Server as a source for the alarm definition?
Thanks!
XProtect Essential+ does not include support for Alarm Management.
https://developer.milestonesys.com/s/article/features-supported-by-XProtect-products-download-comparison-charts
You must develop against an XProtect VMS of another product version.
You can use an XProtect in trial mode for a limited time. You might be eligible for a test license if you sign up as a Milestone Partner. https://www.milestonesys.com/partners/become-a-partner/technology-partner/
I have missed that. I will figure out how to proceed with the installation of the system.
Meanwhile, could you tell me how to specifu the Management Server as the source for the Alarm Definition?
Thanks!
I must have remembered wrong, I am able to sent an AnalyticsEvent with source retrieved like this:
_item = EnvironmentManager.Instance.GetSiteItem(EnvironmentManager.Instance.MasterSite);
but I cannot then make an AlarmDefinition that excepts this as source. I think this disqualifies it as a valid workaround.