Create Events and Alarms Via XML

We are trying to add the events in that i have facing the some challenges to assign a single event to multiple cameras or source, Can you help me to achieve my requirement . In below code i want to add the multiple source.

00000000-0000-0000-0000-000000000000

$timestamp$

MyType

Access Control

TagFromXML

192.168.0.18

Analytics event description.

Event location 1

Rectangle

A person

true

<Color>

 <A>255</A>

 <R>255</R>

 <G>255</G>

 <B>0</B>

</Color>

<PointList>

 <Point>

  <X>0.3</X>

  <Y>0.3</Y>

 </Point>

 <Point>

  <X>0.6</X>

  <Y>0.3</Y>

 </Point>

 <Point>

  <X>0.6</X>

  <Y>0.6</Y>

 </Point>

 <Point>

  <X>0.3</X>

  <Y>0.6</Y>

 </Point>

 <Point>

  <X>0.3</X>

  <Y>0.3</Y>

 </Point>

</PointList>

My Smart Video

An event can have only one source. This is by design. However an alarm can have related cameras and you might be able to use this.

I found an older question-answer in the forum: https://developer.milestonesys.com/s/question/0D53X0000D7zTmGSQU/is-there-any-way-to-have-a-multi-camera-alarm

Ok Thanks,

I have some doubts regarding XML tags and would appreciate your clarification. Specifically, I am curious about the

in XML. Is it possible to define and add my own custom tags within an XML. If so, could you please provide an example of how this would work?

Additionally, I noticed a tag called Vendor in XML documents. Could you kindly elaborate on the usage and purpose of this tag? How is it typically used to represent vendor-related information in events and alarms

Thank you in advance for your assistance.

The Analytics Event Trigger via XML sample does include these Vendor and CustomTag fields.

https://doc.developer.milestonesys.com/html/index.html?base=samples/protocolsamples/triggeranalyticseventxml/readme.html&tree=tree_3.html

If you run the sample I suggest one way of “seeing” the info is using the Alarm Preview plugin sample.

https://doc.developer.milestonesys.com/html/index.html?base=samples/pluginsamples/alarmpreview/readme.html&tree=tree_1.html

The intent of both is to leave space for you as a developer to include data which will make sense and give value for you and your integrations.

There is little but not much extra info:

https://doc.developer.milestonesys.com/html/index.html?base=miphelp/class_video_o_s_1_1_platform_1_1_data_1_1_vendor.html&tree=tree_search.html?search=vendor

https://doc.developer.milestonesys.com/html/index.html?base=miphelp/class_video_o_s_1_1_platform_1_1_data_1_1_event_header.html&tree=tree_search.html?search=vendor

Maybe this will be of use:

https://download.milestonesys.com/MIPSDK/Samples/AnalyticsEvents_Alarms_inSmartClient.pdf

Thanks for the information,

Also I am trying to add the Camera Snapshot in Alarms using XML

as mentioned in below code

<?xml version="1.0" encoding="utf-8"?>
                            <AnalyticsEvent xmlns:i="[http://www.w3.org/2001/XMLSchema-instance](http://www.w3.org/2001/XMLSchema-instance)" xmlns="urn:milestone-systems">

                       <EventHeader>

                        <ID>f0360268-066f-4ca7-a3c6-819e504e3c34</ID>

                        <Timestamp>2025-01-07T18:23:31+05:30</Timestamp>

                        <Type>Valid Card</Type>

                        <Message>Access Control</Message>

                        <CustomTag>TagFromXML</CustomTag>

                        <Source>

                         <Name>192.168.1.189</Name>

                        </Source>

                       </EventHeader>

                       <Description>Access Control

                       </Description>

                       <Location>Main Door</Location>

                      <SnapshotList>

                      <Snapshot>

                      <TimeOffset>0</TimeOffset>

                      <Width>500</Width>.

                      <Height>500</Height>

                      <HasOverlay>false</HasOverlay>

                      <FQID>

                     <ObjectId> cb1239fc-c17a-4bf9-bc84-b231fdb1e748</ObjectId>

                     <ParentId>9483f751-ca91-4f93-b951-65bb1a7db9e2</ParentId>

                     <Kind>5135ba21-f1dc-4321-806a-6ce2017343c0</Kind>

                      </FQID>

                      </Snapshot>

                       </SnapshotList>

                       <ObjectList>

                        <Object>

                         <Name>Rectangle</Name>

                         <Value>ValueA</Value>

                         <AlarmTrigger>true</AlarmTrigger>

                        </Object>

                       </ObjectList>

                      </AnalyticsEvent>

but not getting validate can you help me to correct the code.

A snapshot is an image, so when you give a FQID it will not work.

On giving an image in the XML please see this old thread.. https://developer.milestonesys.com/s/question/0D50O00004UZCxHSAX/sending-an-alarm-images-to-milestone-alarm-manager

If your intention was something else, adding another kind of information, let me know what you want to add.

In your given reference link is for bind the image from database it works properly in my code but I want the image snapshot of that camera where is my event is occurs for that particular time.

Could you kindly provide some guidance or suggestions on how to achieve this?

I think a lot of the design of XProtect is about the idea of not doing snapshots but instead opening the image by navigating to the time. The Alarm holds the camera id and the exact time. The Smart Client (SC) already will show the camera footage for the camera doing playback in the Alarm Preview!

If you do not use the SC but your own application you can using the information about camera and time ask for video from that time.

If you want to save an snapshot image please only do so because you have an image that is “more” that the camera image, in that case you provide the image and can send it as XML as outlined by the forum thread I linked.