Controlling Pixera Via QSYS and API

Post Reply
system24seven
Posts: 3
Joined: Tue Jan 28, 2020 9:00 am
Location: Melbourne AU
Contact:

Fri Mar 06, 2020 12:19 am

Hi All, 

Had some projects going on the other day, and I needed to do a proof of concept for controlling a Pixera server from QSYS. 
This method only supports single directional control, so you cant get information back from Pixera.
There are other options if you need bi-directional communication, but this method is the easiest and does not require a scripting license. 
Quick howto if you need simple control:

Set up Pixera on the same network as the QSYS core you will be using as well as the QSYS Designer computer you will be using. 
In Pixera Settings, under the API tab:
  Select the correct Network Adapter.
  On one of the "API Access" sections ( I normally use "API Access 2" so that you can easily use 1 for HTTP for testing) select the "JSON/TCP(dl)" as the Protocol.
  Assign a port, defaults to 1412 on 1.4.5. 
  Save the project, restart Pixera. 

Open up your QSYS Designer.
 From the "Schematic Elements" section, add a "Command Buttons' element from the "Control Components" sub-section.
 Select the Command Buttons Element you added. 
 In the "Properties" Pane, select "TCP" in the "Type" dropdown. 
 Save the Design.
 Hit "F6" to Emulate the design. 
 Double Click the Command Buttons Element you added earlier.
 In the dialog that appeared, you should see a green box saying "OK"
 Under that, enter the IP of the Pixera Network adapter you set the API up to listen on. 
 Set the port to match the API port (1412 default)
 If you click away from the entry box, the "Status" should now read "OK-OK"
 At this point, QSYS now has access to Pixera via the API port. 

In the rows under the IP settings in this dialog, you have command buttons and a corresponding command. 
Copy the following:
 

Code: Select all

{"jsonrpc":"2.0", "id":9, "method":"Pixera.Compound.startFirstTimeline"}0xPX

Paste it into the first text box. 
Click out of the text box, it should stop having a red border. 
If you click the grey box to the left of the text box, Pixera should start playing the First timeline. 

At this stage, you can now add any command from the Pixera API into the text boxes, and they will be executed. 
You MUST append the "0xPX" to the end of every command. 
As there is no output from this, you cannot use the command buttons to Query information from Pixera. 

As this is mainly install based, you can manually get object and timeline IDs in a static reference way. 
With the HTTP/TCP API set up, you should be able to get to:

Code: Select all

http://<your ip here>:1400/api_test/index.html


You can use this API test area to test JSON Commands to gain information about your show file from and API perspective. 
For Example: 
If you were to enter the following into the API Test:
 

Code: Select all

{"jsonrpc":"2.0", "id":17, "method":"Pixera.Screens.getScreenWithName", "params":{"name":"1234"}}

It would return with the numeric handle ID of the screen with the name "1234". 
You can copy this number out of the response, and use it to address that screen with other commands. 

For example the following command:
 

Code: Select all

{"jsonrpc":"2.0", "id":22, "method":"Pixera.Screens.Screen.setPosition", "params":{"handle":1152049151979667, "xPos":1.0, "yPos":1.0, "zPos":1.0}}
This command will move the screen with handle "1152049151979667" (copied from the previous command response) to the listed location. 
Add the suffix "0xPX" and enter it into the QSYS designer dialog, and you have a command that moves a screen in Pixera


Common Command strings:

Start First Timeline:

Code: Select all

{"jsonrpc":"2.0", "id":9, "method":"Pixera.Compound.startFirstTimeline"}0xPX

Stop First Timeline:

Code: Select all

{"jsonrpc":"2.0", "id":11, "method":"Pixera.Compound.stopFirstTimeline"}0xPX


Pause First Timeline:

Code: Select all

{"jsonrpc":"2.0", "id":10, "method":"Pixera.Compound.pauseFirstTimeline"}0xPX




 






 
 
Oliver Kilian
Posts: 36
Joined: Wed Mar 29, 2017 9:51 am
Location: Frankfurt
Contact:

Mon Mar 09, 2020 9:04 am

This is amazing!
Thanks so much for sharing.
Please keep us posted how the projects are doing and pasrhaps you have a picture for us.

Thanks again for that great post
Oliver
AV Stumpfl, Wings Sales
HQ Wallern
Post Reply