Can I know the status of the camera (recording/off) ?

I am using version 2023 R2 and need to know the camera status via my plugin, how can I do this?

thanks,

If you in your code uses an Image Viewer you can subscribe to VideoOS.Platform.Client.ImageViewerWpfControl.LiveStreamInformationReceived

https://doc.developer.milestonesys.com/html/index.html?base=miphelp/class_video_o_s_1_1_platform_1_1_client_1_1_image_viewer_wpf_control.html&tree=tree_search.html?search=imageviewerwpfcontrol

You can get an event from the Event Server when the status is changed as seen in the Status Viewer sample.

https://doc.developer.milestonesys.com/html/index.html?base=samples/componentsamples/statusviewer/readme.html&tree=tree_2.html

Note; at startup the state would be unknown until first status change.

You can use the Recording Server Status API as seen in the Status Console sample.

https://doc.developer.milestonesys.com/html/index.html?base=samples/componentsamples/statusdemoconsole/readme.html&tree=tree_2.html

-

https://doc.developer.milestonesys.com/html/index.html?base=samples/componentsamples/statussessionconsole/readme.html&tree=tree_2.html

https://doc.developer.milestonesys.com/html/index.html?base=samples/componentsamples/systemstatusclientconsole/readme.html&tree=tree_2.html

about your answer:

You can get an event from the Event Server when the status is changed as seen in the Status Viewer sample.

https://doc.developer.milestonesys.com/html/index.html?base=samples/componentsamples/statusviewer/readme.html&tree=tree_2.html

I see states are is “Enabled” , “Responding” , “Server Responding”, “Disabled” , “Not Responding” , “Server Not Responding”

How can I tell if the camera is recording?

I don’t use Image Viewer.

When I use the sample I do get ..

Motion Detected

Recording Started

Motion Stopped

Recording Stopped

But this requires that you have the default record on motion rule (or something similar), and that you have a camera feed where there are periods of motion and periods of no motion.

I guess I could have been more clear when stating “Note; at startup the state would be unknown until first status change.” I guess this is what happens, in your test camera you have either constant motion and constant recording or the opposite, but you do not have the events happening frequently.

If it isn’t sufficient for you to know the state after state change, in some setup scenarios the state change may never happen, then I must recommend the Status API approach.

What I’m missing is the status of the cameras at the beginning, for example if I started recording with camera X in the first session and then opened a second session I want to know that camera X is in the middle of recording.

In this case should I use the Status API?

Yes.

(State would be unknown until first status change when using NewEventsIndication from Event Server)

Ok, thanks.

VideoOS.Platform.SDK.Proxy.Status is unknow ,

You get an error trying the sample? If there is something not working for you please tell us more; tell about what you do, what you observe and your initial troubleshooting..

Ok, that was a problem in my code, sorry..

Is API status supported in 2023 R2 version?

I am getting error “The Item does not point to a server with a Status API Service” from this code:

image.pngthanks,

Yes it is. Try to troubleshoot / debug. Do you get a valid Item in the recordingServer variable?

Are you running the StatusSessionConsole sample? Unmodified sample? If you modified the sample, does the unmodified sample work for you?

(We are getting further and further away from the original question, maybe you can make a new question in this forum and then outline the basis of what you are doing..)

Example EventAndStateViewer could be suitable for me?

(to know state of camera)

Yes, careful if you move this standalone sample to plugin implementation.

It doesn’t fit the plugin application?

(I have a plugin application)

Yes, it does, but you cannot reference VideoOS.Platform.SDK and you shouldn’t have to.

Do you have such an example?

No, unfortunately we only have the EventAndStateViewer and no plugin sample doing the same.

We corresponded about this topic in another post as well, I’m a bit confused

There are some samples I checked, I would appreciate it if you could explain it to me

I have a plugin integration and I need to know the status of the camera in the plugin, every time the status changes (also the first time)

The examples we talked about:

EventAndStateViewer,

StatusViewer - (not suitable because there is no status the first time),

StatusSessionConsole - (only for standalone ?),

StatusDemoConsole -(only for standalone ?)

What is the best way?

So you cannot use VideoOS.Platform.SDK, but if you explore the source code for the EventAndStateViewer this is only used for login, and login is not necessary in a plugin because the user has logged in to Smart Client when the plugin in code runs. You can move the rest of the code to a plugin and it should work. I suggest you start with the plugin template see that run and then add code that you need from the EventAndStateViewer sample.

https://doc.developer.milestonesys.com/html/index.html?base=gettingstarted/plug-in_development.html&tree=tree_1.html

When it comes to the StatusSessionConsole StatusDemoConsole etc. these can also be moved, but it becomes a bit harder you need to use the SOAP service wsdl to reference.

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

VideoOS.Platform.SDK.Proxy.Status2 is a generated proxy which you cannot use, so generate you own, use the wsdl.

I am sorry, that there are no plugin samples for this, I hope the explanation is sufficient to get it working for you.

Now, VideoOS.Platform.SDK.Proxy.Status2 works! for me in my plugin. Why can’t I use it?