How can I control my Aximmetry scene from an external app / web page?

 

You can control Aximmetry via HTTP commands sent with the POST method.

For this you have to start the Composer as administrator and with the /server command line switch.
In the Startup Configuration you'll find a new Network Settings page. There you can select the port you want to control Aximmetry through.

In most cases you can leave it on default.

The commands must be sent to the URL:
http://ip_of_the_Aximmetry_machine:Composer_HTTP_port/AximmetryComposer
for e.g.
http://localhost:21463/AximmetryComposer

The commands themselves are presented in XML format. The most important command is ComposerSetPinValueAction with which you set the value of any pins of any modules within your compound. It look like this:

<action type="ComposerSetPinValueAction" Module="module_path" Pin="pin_name" Value="pin_value" />

For e.g. suppose you want to change between several texts to display on the screen in a compound like this:

To select the text number 7 you have to send the following:

<action type="ComposerSetPinValueAction" Module="Root\Switch Text" Pin="Selected" Value="7" />

In practice it is easier to expose all your pins you want to control on the Root level, so that you don't have to deal with module paths, for e.g.:

In this case you can use the following command instead:

<action type="ComposerSetPinValueAction" Module="Root" Pin="TextNo" Value="7" />

Of course you can choose to set the text itself directly:

<action type="ComposerSetPinValueAction" Module="Root" Pin="Display Text" Value="The text I want to display" />

You can also address control board buttons directly. For that you can use the ComposerCtrBoardPressButtonAction command:

<action type="ComposerCtrBoardPressButtonAction" Module="panel_path" Button="button_name" />

It simulates pressing a button on the panel.
For e.g. suppose you want to switch camera within the standard VirtualCam control board.


panel_path is very similar to module_path, but beside of compound names it can also refer to control board names.
In this case we have the VirtualCam_A-B_Preview_3-Cam compound, within that we need the CAMERAS control board, and within that the SELECT CAMERA panel.
For e.g. we want to "press" the CAM 2 button. All of that have to be written like this:

<action type="ComposerCtrBoardPressButtonAction" Module="Root\VirtualCam_A-B_Preview_3-Cam\CAMERAS\SELECT CAMERA" Button="CAM 2" />

If you have a logical ON/OFF button, pressing it will always toggle the between ON and OFF. But you might want to explicitly specify which state it should be in. For this purpose there is another command named ComposerCtrBoardSetButtonAction.

<action type="ComposerCtrBoardPressButtonAction" Module="panel_path" Button="button_name State="True/False" />

For e.g. let's turn the streaming on on the same control board:


<action type="ComposerCtrBoardSetButtonAction" Module="Root\VirtualCam_A-B_Preview_3-Cam\CAMERAS\STREAMING" Button="#On" State="True" />

(In this case the button contains an icon, but that is achieved by using the special name #On, and this is the name you have to specify for the command.)

   Aximmetry

 
Profile Image
rmilne
  -  

Where is the XML being ready from? Is there a folder where you put a bunch of XML files you can call? Or do you put these commands into the URL?

When I visit the URL on my machine I get:

This XML file does not appear to have any style information associated with it. The document tree is shown below.

<response Code="1" Message="Request can not be empty"/>

 
Profile Image
Zoltan@Aximmetry
  -  

Hi,

The HTTP request has to be sent using the POST method. The XML string of the action has to be passed in the data part of the POST (not in the URL). You do not need files.

 
Profile Image
rmilne
  -  

Hi,

Thanks for your response. Yes I have figured out how to trigger Aximmetry from CMD using the XML POST method. I'd like something like Companion Bit focus to trigger individual buttons. But their "Generic HTTP" instance doesn't seem to work. Can you or anyone suggest some kind of platform to be able to remotely trigger this using the XML POST method. Thanks! 

 
Profile Image
Giacomo
  -  

Hi,
is it possible to change with 1 single send, multiple parameters (pins)?
If so, is there any online documentation?
Thanks

 
Profile Image
Eifert@Aximmetry
  -  

Hi Giacomo,

Yes, you can only change one pin with one send.

Can you elaborate on why do you want to change more pins with one send?

Warmest regards

 
Profile Image
Eifert@Aximmetry
  -  

Hi all,

The latest version Aximmetry (2021.4.0) added group action feature to the HTTP interface that allows sending multiple actions in a single HTTP request. You can find more information about it here: https://aximmetry.com/learn/tutorials/control-methods/external-control-of-aximmetry-via-http/#grouping-commands

Edit:
As of Aximmetry version 2021.4.1 you no longer need to add the "/server" to the Composer.exe.
The control simply can be enabled/disabled from Preferences / HTTP Control.
More on it here: https://aximmetry.com/learn/tutorials/control-methods/external-control-of-aximmetry-via-http/

Warmest regards,

 
Profile Image
kentnek
  -  

Hi Eifert,

Our Unreal Project has two levels, and we trigger the level transition on the controlling machine via HTTP control. The trigger is relayed to remote renderers as expected. Occasionally, a renderer crashes, and after repairing it loads the very first level instead of the current one. Unless we can retrigger the level transition on that machine, we can’t continue using that camera angle.

In your original post’s screenshots, there’s an option to set the port exposed by renderers. Is it still possible in later versions to send commands only to a renderer, without affecting other machines?

Thanks!

 
Profile Image
Eifert@Aximmetry
  -  

Hi Kentnek,

Yes, it is possible to do so. You don't even need a command line switch.
Just set different ports in Edit->Preferences - HTTP Control:

However, you don't even need different HTTP ports. You could solve this problem in the Flow Editor with some extra logic.
You could use an integer instead of a trigger. This way you can make a trigger when the integer changes:

Note, when your render machine restarts, it starts up with your controller machine's values, so you don't even need to send the HTTP command again in the above case, it will most likely load the second map on its own.

Also, it is possible to have triggers that apply to specific machines. You can get your machine's ID from the System Params's Engine pin:

On every machine, in a multi-machine setup, the Engine pin will give you a different ID number.

Warmest regards,