Load all alarms from Milestone with protocol communication

Hello everyone!

I’m trying to develop a simple Java application to load all alarms from Milestone. I was looking for the AlarmList sample, but it’s not working giving me an error with the service. I’m using the version 2020.

Someone can suggest me what is the best solution for that?

Can you please tell me which error you got? Please describe what you did and what you observed.

When I try the sample login It retrieves this error:

Please see Introduction to MIP SDK 2019 R2. It said,

Breaking change: As of 2019 R2 the Central/AlarmService API has been removed from the Event Server for security reasons. Protocol integrations should instead use the secure Central/AlarmService2 API. Please refer to the Alarm List sample for an example of how to utilize this interface.

For more information, please see this -

https://doc.developer.milestonesys.com/html/index.html?base=gettingstarted/mip2019r2_intro.html&tree=tree_search.html?search=alarmservice

Yes, I saw that, but I can’t find where I can change this url to connect AlarmService2

This might be helpful for you -

https://doc.developer.milestonesys.com/html/index.html?base=reference/protocols/alarmcommand.html&tree=tree_3.html

Yes, I can see the wsdl, but where I can change the sample connection url?

This means, I want to test the sample but I need to change the AlarmService to AlarmService2. How can I do that?

Please see following instruction, I hope it might be helpful. You will be able to see the same instructions on the top of AlarmCommand.cs file in AlarmList sample.

NOTE: If you use old version MIP SDK, you might see “alarmservice” instead of “alarmservice2” in the file but it is no longer available. In that case, please update your SDK to the newest, we always recommand to use the newest MIP SDK.

Now it’s giving me this error, but credentials are correct.

Because of the default – better start. The sample will login with your Windows credentials so please make sure your user is part of a role in XProtect. Use the Management Client to check this, as a start test with your user in the Administrators role.

If you look at private void SetAuthentication() method in MainWindow.xaml.cs, you will be able to change the login user for the sample.

Thank you Rie. I can log in now. This sample works with dll’s correct? It’s possible do make a standalone application?

Hi Raul,

AlarmList sample does not use any MIP SDK dlls. It of course use some common .NET dlls for communication and such, but all XProtect specific is done in the sample itself.

It does use the ServerCommandWrapper dll, but that is part of the sample and including all code, so if you want you can easily move the code from the ServerCommandWrapper and into the AlarmList application instead. We have just put it there so that it can be shared between the samples.

Thank you guys for your help me. I can understand now how it works. Nice job! Have a great day. Best regards!