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?
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.
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.
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.
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.