open layout from3rd party
Answeredwe are interesting in open a layout or camera, in NX client, from 3rd party.
what is the best way to do it?
-
Your 3rd party app can start NX client via command line with --layout-name="Some layout name" argument. Opening specific camera isn't supported, but I'm guessing you can work around this by creating 1 layout per camera for your integration to work.
You can find full list of command line arguments in this article.
-
According to my understanding, the CLI command open the NX client with a new Layout
By default, NX client reopens all layout tabs from previous session. When you start client from CLI you can specify which layout to open with --layout-name parameter.
We are talking about replacing layout in existing NX client...
Layout is just an object in the system with its own parameters, it is stored in mediaserver's database. You can use API methods:
/ec2/saveLayout
/ec2/getLayouts
/ec2/removeLayout
to modify layouts from your external system. Check full api reference at https://<server ip>:7001/static/api.xml
As for GUI part, you'll need to pass layout name with --layout-name argument.
-
Dani Ingber - If the client is currently open and you want to use a 3rd party device / software to send an API call to open a specific layout you can use the CreateEvent API call to generate an HTTP Generic Event and set a rule in the Rules Engine to use the Open Layout action.
It's not fully programmatically done as it requires you to set up a Rule in the Rules Engine via the Nx Desktop, but it could be a potential solution.Here's a short video walkthrough.
Please sign in to leave a comment.
Comments
4 comments