Monitor my Cameras

Hi,

I’m trying to build a monitoring solution for my cameras.

So far, all the available examples and APIs I’ve found are based on subscriptions and incoming events. However, I’m looking for a way to retrieve the current status of a camera directly, rather than relying only on event notifications.

For example, is there an API or endpoint that can provide the current state of a camera, such as:

  • Whether the camera is currently connected and streaming

  • Whether video data is actively being received

  • Current stream health/status

  • Whether the recording server is receiving bytes/data from the camera

Is there a recommended approach for obtaining the real-time operational status of cameras?

Thank you.

Recording Server Status SOAP API – still a good choice if you want the current device status directly. The samples are using subscriptions but the GetCurrentDeviceStatus is a direct option.

Other options currently uses the Recording Server Status SOAP API behind the scenes-

  • Events and State WebSocket API
  • MIP SDK approach as shown by the StatusViewer sample

Metrics like “receiving bytes from the camera” or a detailed stream health value are not exposed as one simple camera-status field in the public APIs.

Thank you, Bo, for your answer.

I tried calling the SOAP GetCurrentDeviceStatus method and all returned fields were None.

I have two XProtect servers:

  • 2025 R2GetCurrentDeviceStatus works as expected and returns valid data.

  • 2024 R1 – the same method returns None for all fields.

The challenge is that no exception or error is thrown, so it is difficult to determine where the failure occurs.

To troubleshoot, I inspected the SOAP service methods, their parameters, and return types. My process is:

  1. Obtain a Bearer Token for the REST API.

  2. Retrieve the camera IDs using rest/v1/cameras.

  3. Obtain an XToken using the SOAP Login method.

  4. Connect to RecordingStatusService/RecordingStatusService2.asmx?wsdl.

  5. Call service.GetCurrentDeviceStatus(...).

The response I receive on the 2024 R1 server looks like this:

{
    'CameraDeviceStatusArray': None,
    ...
}

All other status-related fields are also returned as None.

Since the same code, authentication flow, and camera retrieval process work correctly against the 2025 R2 server, I am trying to understand what could cause the 2024 R1 server to return empty status objects without generating any error.

Has anyone encountered this behavior before, or is there a known dependency, configuration, service, or version-specific limitation that could explain it?

I did a quick test using the StatusDemoConsole sample, and I can successfully call GetCurrentDeviceStatus against both 2026 R1 and 2024 R1 test servers.

There are a few differences compared to your implementation:

  • The sample uses the MIP SDK to retrieve camera IDs

  • It uses a generated proxy class from the WSDL (instead of calling the WSDL directly)

That said, it would be very useful if you could run this sample against your 2024 R1 setup to compare behavior.

What to try:

  1. Update the login code in Program.cs (lines 35–47) to match your environment.

  2. Before line 162, add:

    Status status = client.GetCurrentDeviceStatus(
    loginSettings.Token,subscribeTheseDeviceIds.ToArray());
    
  3. Set a breakpoint immediately after this line and inspect the status variable.

-

Debugging in your code: I would first compare the array of camera IDs between your two setups: Same format?

My suspicion is that the issue is introduced somewhere in the sequence of steps, so identifying where the behavior starts to differ will help narrow it down.

Hi,

Thanks again for your help.

I cloned the repository and ran the code in my environment. I was able to get it running successfully, and it displayed events (and I believe also status-related information).

However, I noticed something that confused me:

The status variable appears grayed out in Visual Studio, as if it is never used. To investigate, I added a breakpoint around line 160 (before line 162) and tried to inspect/log the value of status. When I did that, the value was null.

I also noticed that similar code appears again around line 176, and Visual Studio shows the warning:

Unnecessary assignment of value to ‘status’

Could you help me understand whether this is expected behavior, or if I might be missing something in the way the status object is populated and used?

Thanks!

Im only getting Started True/False Recording False/True

This step is important. “Set a breakpoint immediately after this line and inspect the status variable.”

My intention was that you will not run the rest of the program, you will only in the development environment inspect whether status is holding good data or is empty the same way you have observed in your code. Note that whether the rest of the sample program runs might not be a good indicator for us, we are concerned what GetCurrentDeviceStatus returns in the test servers you have. If this test works we should focus on your code implementation, if it fails (has empty status) we should focus on a deeper issue in the servers or the MIP SDK.

I did it! thank you very very much!