For device "state", is "Responding" synonymous with "Recording"? Similarly, for server "state", is "Server Responding" synonymous with "Server Recording"?

I am utilizing the MessageCommunication.ProvideCurrentStateResponse (example code in the SDK ComponentSamples/StatusViewer) message service to check device status. Cameras and microphones respond with state of “Responding” or “Not Responding” and servers respond with “Server Responding” or “Server Not Responding”. In this specific case, is “Responding” synonymous with “Recording”? I actually need to verify that the cameras/microphones/servers are Recording. I spent a couple hours on the developer forums and could not find a reliable answer to this question.

First of all, “Responding” is:

Communication between a camera and Milestone Recording server is working. (No camera failure.)

"Recording"is:

Camera connected to Milestone Recording server is recording.

Recording is governed by Rules in Management Client. In default setting, recording is triggered by a motion detection rule. So status of “Recording” is often changing very frequently. Perhaps this is why ProvideCurrentStateResponse does not include the information.

There are some options that will enable you to see the status of Recording. I will only mention one, ask again if you want to know more options.

See the StatusViewer sample. It subscribes to NewEventsIndication and you will see messages for each camera “Recording”/“Not recording”. (“Recording”/“Not recording” messages is not supported in E-code.)

Understood. I am working with an “Always recording” system and need to periodically check the recording status as part of a “system health” check. Can you include the other ways to obtain recording status (cameras, microphones, server)? I’m looking for a way to initiate a query for this data (as opposed to an event when state is changed). Thank you.

I found VideoOS.Platform.SDK.StatusClient.StatusSession that looked like it might contain this information (I haven’t pursued this completely, yet), however, it appears to be a part of the Components SDK and requires server login? My code is running as a background plugin (i.e. MIP Integration Plugin) and I’m looking for a way to access this information without having to provide credentials - is there a way to get “Recording”/“Not Recording” from a background plugin?

Also, in Milestone Xprotect Management Client, there is System Dashboard → System Monitor → Recording servers (Details) which shows that table with real-time details for each camera. I would also like to inspect the real-time instantaneous state of recording - just like what this Recording Servers dashboard is showing.

The Recording state can be received from the Status Service SOAP Protocol.

I created a background plugin. I added a Web Service reference based on http://localhost:7563/recorderstatusservice/recorderstatusservice2.asmx?wsdl . I used this snippet of code..

private void CheckCameraRecording(Item cameraItem)
{
    VideoOS.Platform.Login.LoginSettings loginSettings = VideoOS.Platform.Login.LoginSettingsCache.GetLoginSettings(EnvironmentManager.Instance.CurrentSite);
    string url = cameraItem.FQID.ServerId.Uri.ToString() + "recorderstatusservice/recorderstatusservice2.asmx";
 
    var soapClient = new StatusService2.RecorderStatusService2();
    soapClient.Url = url;
 
    EnvironmentManager.Instance.Log(false, "BackgroundSE", "Asking for status", null);
    StatusService2.Status status = soapClient.GetCurrentDeviceStatus(loginSettings.Token, new List<Guid>() { cameraItem.FQID.ObjectId }.ToArray());
    var recordingStateArray = status.CameraDeviceStatusArray;
    var stateFlags = recordingStateArray.FirstOrDefault();
    bool rec= stateFlags.Recording;
    EnvironmentManager.Instance.Log(false, "BackgroundSE", "Camera " + cameraItem.Name , null);
    EnvironmentManager.Instance.Log(false, "BackgroundSE", " Recording status is " + rec.ToString(), null);
    soapClient = null;
}

In the Status Console, Status Session Console and System Status Client Console samples you will see other examples of how you can use this protocol.

Works great, thanks!

One additional question, hope it’s ok to ask here instead of starting a new topic: RecorderStatusService2.GetRecorderStatus(Token) returns an object of type AttachAndConnectionState with fields AttachState and ConnectionState. What is the meaning of each of these fields? I could not find any documentation in the MIP SDK, on this forum, or from doing a general web search. Thanks again for the help!

Attached state is always true (done during install).

Connected state is telling about recording server to management server connection state.