Scripting Timer and storing conditions, pulling information from Stream Monitor

Hi folks,
I want to build a script, that pulls the status from the Stream Monitor.

So first question, where to start with that?
I want to know is it enabled?
If it’s enabled, did it detect an input?

If it is enabled and it did not detect an input for more than one hour, I want to launch a script, that disables the stream monitor.

Additional Challange, I have 2 monitors running and I want to handle this for both of them.

Any help would be much appreciated.