Hello,
I heard it was possible to attach metadata to external events when triggering them. I think this is how we are supposed to use the Corporate rule : “Set Smart Wall monitor using layout to show the devices from metadata starting in position 1”
The devices “from metadata” is the part that interests me.
So far, I have been using this to trigger events:
EnvironmentManager.Instance.SendMessage(new VideoOS.Platform.Messaging.Message(MessageId.Control.TriggerCommand), item.FQID);
What do I use to add several items/cameras to the mix?
Thanks.
Change the trigger event like this -
EnvironmentManager.Instance.SendMessage(
new VideoOS.Platform.Messaging.Message(
VideoOS.Platform.Messaging.MessageId.Control.TriggerCommand,
form.SelectedItem.FQID),
item.FQID);
(where form.SelectedItem.FQID is the camera to be considered the source)
I took this command from the ConfigAccessViaSDK sample, and you could run the sample as a test to see how it works.
You should be able to use a group (configured in the server on those XProtect that support camerra groups) instead, the sample does not support this and I have never actually tried it.
What you cannot do is to use a list of cameras, having discussed this in the SDK team based on this question we will put it on the wish list for future enhancement work.
Is this standalone? (As opposed to a plugin).
Hi Bo, nice to hear from you. Any chance this can be upgraded from “wish list” to “will be in next version” ? Does this mean that there is no way to use the SmartWall rule with “deviceS from metadata”? I did not invent the “s” already present in that rule, how do I use it?
Hi again, so I tried what you said and it works. I now have the camera I want as source and it does appear in the SmartWall. In my opinion, the easiest way for the devs to implement the feature I want would be adding support for AnalyticsEvent to the TriggerCommand.
E.G.
EventHeader eventHeader = new EventHeader
{
ID = Guid.NewGuid(),
Class = "Operationel",
Type = "Community Toolbox",
Timestamp = DateTime.Now - TimeSpan.FromHours(1),
Message = "Alarm - Logic Function",
Name = "Alarm - Logic Function",
Source = new EventSource { FQID = i.FQID, Name = i.Name },
CustomTag = "Hello World"
};
AnalyticsEvent eventData = new AnalyticsEvent
{
EventHeader = eventHeader,
Description = "Source: " + i.Name + "\n\n" + "HELLO" + "\n\n"
};
eventData.ReferenceList = new ReferenceList();
eventData.ReferenceList.Add(new Reference() { FQID = ev.Items[1].FQID }); // Ensure that camera will be presented in the preview
eventData.ReferenceList.Add(new Reference() { FQID = ev.Items[2].FQID }); // Ensure that camera will be presented in the preview
EnvironmentManager.Instance.SendMessage(new VideoOS.Platform.Messaging.Message(MessageId.Control.TriggerCommand, eventData), i.FQID);
I remember having a chat with an engineer pretty high up a while back. I don’t remember his name but he told me that adding several cams to external event was already possible. Can you double check please?
Thanks.
Found it, it was Anders I think. From case MSC200007 (that I have not had any feedback from yet actually) I think you should also look at my latest case, it’s in line with MSC200007 and this thread → MSC225223