Executing batch file or script via soft trigger
AnsweredHi all!
How can I execute a batch file or script via a soft trigger in NX?
I'm wanting to have the option of triggering power cycles for individual ports on Unifi network switches via the NX client interface.
I have successfully created the script and it is working the way I want it to. I just want to be able to execute via a soft trigger.
-
Hello Tuli Dem,
You could place your script on an external HTTP server and configure the "Do HTTP request" action with parameters for the "Soft Trigger" event.
In this way, clicking a Soft Trigger icon will cause an HTTP request to be sent to your script on an external server, which in turn will trigger power cycle
-
Hi,
You could install any HTTP server, which supports your script execution, on the NX server. If IIS is your choice, that's fine.
At the moment, there is no possibility to execute a script inside the NX server process.
However, I could offer you a workaround.
You could create an analytics plugin, which won't do any video processing and analysis, but instead will listen for commands sent via HTTP on a certain TCP port.
Your "Do HTTP request" will send commands to the plugin via HTTP, the plugin will run a script, which in turn will trigger power cycles.
You can start with sample_analytics_plugin of the Metadata SDK.
Here is the manual.
Please sign in to leave a comment.
Comments
3 comments