Tag Archive: macros

While the Cinema application has the functionality to send a UDP command to another JNIOR, did you know that it can do a UDP broadcast command also? This allows the JNIOR to send a UDP command to any JNIORs listening on that UDP port at the same time. This post will explain how to set this up. This post assumes you’ve already installed the Cinema application on your JNIOR. If you haven’t, here is a post that shows you how to install Cinema on your JNIOR.

Device File

First, to setup the broadcast you need to create a RAW UDP device in the support tool under the device tab. Here you can add a device from the ‘Add’ button at the bottom of the Device tab, and after naming it (I’ve named it ‘UDP_Broadcast’ for this example) you assign it as a RAW UDP device type. For the IP Address, it needs to be set to so when this device is sent to from a macro command, it will send to any device listening on the same UDP port. The UDP port will be whatever UDP port you want to broadcast on. Just make sure the devices you are broadcasting to are also listening on that same UDP port (This example uses port 5554).

Macro File

Once this device is setup, you’ll save the device file locally and publish it to the JNIOR that will be broadcasting the command. You’ll then move onto the Macro tab in the JNIOR support tool. The first thing to do here is to select the ‘Link Devices’ option and select the device file you just created. This allows you to reference the ‘UDP_Broadcast’ device you created in your macros. Here in the Macro tab, a macro can be made that sends a command out to JNIORs via the UDP_Broadcast device. You’ll select the ‘Add’ button at the bottom left of the Macro tab, and this will add a macro in the macro view. You’ll name the macro (I’ve named it ‘Hello’ for this example) and then you’ll add an action to this macro. You’ll select the ‘Add’ button at the bottom right of the Macro tab this time, and add an action to the action view. Here you’ll name the action (I’ve named it ‘Broadcast Hello’ for this example) and then you’ll set the action’s device to the ‘UDP_Broadcast’ device from the device file we created. After this you’ll select the ‘send’ action for the macro, and for the data you can enter the whatever data you want to broadcast to other devices (I’ve made the data ‘Hello’ for this example). Lastly, you’ll select the macro ‘Hello’ and the action ‘Broadcast Hello’ at the same time, and then select the ‘<-‘ button between the Macro and Action views. This will add the ‘Broadcast Hello’ action to the ‘Hello’ Macro. After this you’ll save the macro file locally and publish it to the JNIOR that will be broadcasting the command.

Setting Cinema UDP Port

Your JNIOR should now be setup so when the ‘Hello’ macro is activated, it will broadcast to any JNIOR listening on port 5554 the command ‘Hello’. If you are trying to broadcast to other JNIOR’s running Cinema, you can send UDP commands to their Cinema application directly. Just make sure you have Cinema’s UDP port setup for each JNIOR that should be listening for those UDP commands. You can do this by going to the registry of a JNIOR, and under AppData/Cinema/ you set the registry key UdpServerPortNumber to the UDP port Cinema should be listening on. After setting this registry key, make sure to reboot that JNIOR so the change takes effect.

When using Cinema to send/receive commands to JNIOR, you may want to better customize the actions your JNIOR can perform past just controlling the JNIOR’s I/O. Creating macros is a great way to get more functionality from sending/receiving commands to the JNIOR. This post will explain how to create and upload macros to your JNIOR.

To create macros you need to have the support tool downloaded, which you can get here. Once the support tool is downloaded, you’ll open it and go to the macro tab. In the macro tab is where you can create and upload macros to your JNIOR. To add a new macro, you’ll select the ‘add’ button at the bottom left of the update tab and select ‘macro’. With the new macro added, you can click on the new macro to edit its name.

After adding and naming the macro, you can then add actions to the macro. The actions are on the right side of the update tab and you can add new actions at the bottom of the action view, or edit existing ones by selecting them and editing the values in their columns. By selecting the macro and then the action you can select the arrow button between them to add the action to the macro.

Once you finish adding your macros and actions, you’ll then need to save and publish your macro file to your JNIOR by selecting the ‘publish to JNIOR’ button. This will prompt you to save your macro file. After you save, you can then select your JNIOR to publish to. With that you’ll have created and published your macro file to a JNIOR. Now when the JNIOR receives a command to execute a macro you created, it will go through and execute each action inside the macro in order.

You can use the scheduling in Cinema.jar to schedule macros daily, weekly or monthly. When Cinema.jar is installed and executed for the first time it will create 3 default keys. They will look like this in the registry. 

Below are examples for the logic you can implement in Cinema using these registries.


This logic expression will be checked whenever the JNIOR I/O changes. The I/O that can be monitored are the internal inputs and outputs on the JNIOR as well as any outputs on a 4 relay output expansion module.

OnIOChange, din1 and din2, run test

For the above example, each time either input 1 or 2 changes, the logic rule (din1 AND din2) will be evaluated and the macro (test) will execute if both inputs are ON.


This logic expression will be checked whenever the Preshow Client in Cinema.JAR receives a message. To specify the string/message that will cause the logic to be evaluated put it inside the parenthesis.

OnPreshowClient(start), din3 and din4, run preshow start

For the above example, each time the device connected to the JNIOR as the Preshow Client sends the string “start” to Cinema.JAR, the logic rule (din3 AND din4) will be evaluated and the macro (preshow start) will execute if both inputs are ON.


This logic expression will be checked whenever the Cinema Server Client in Cinema.JAR receives a message. To specify the string/message that will cause the logic to be evaluated put it inside the parenthesis.

OnCinemaServer(movie), din5 or din6, run movie start

For the above example, each time the device connected to the JNIOR as the Cinema Server Client sends the string “movie”, the logic (din5 OR din6) will be evaluated and the macro (movie start) will be run if either digital input is ON.


This logic expression will be evaluated whenever the named macro has been requested to run. This logic expression can be used as a ‘lock’ to make sure certain macros can only execute when a certain I/O state exists or cannot be executed when a certain I/O state exists. To specify the macro that is bound by this logic place its name inside the parenthesis.

OnMacro(flat start), din7

For the above example, if the macro “flat start” is triggered to run via any method, the logic (din7) will be checked. If (din7) is ON, the macro will be allowed to run. If (din7) is OFF, the macro will not be allowed to run. 

Below is an example registry using some of the examples above.

This post assumes you have the Cinema application installed on your JNIOR, and a macro created and published to your JNIOR. If you don’t know how to create a macro command for a JNIOR to send to external devices, here is a post on Sending Commands from a JNIOR to a Device with Cinema.

When you create macros for Cinema, there are many ways they can be triggered. One of these ways is by setting the macro names in the trigger registry for Cinema. To do this, the first thing we’ll want to do is go to the JNIOR Web UI by selecting the JNIOR in the beacon tab of the support tool. There you’ll right click it, and go to tools/open web page. Once on the JNIOR web page, you’ll go to the registry tab. On the registry tab, you’ll select AppData/Cinema/Triggers. Once there, you’ll go to any of the registry keys named either ‘Input#Macro’ or ‘Output#Macro’ and enter the name of the macro we created in the support tool. We named it ExampleMacro, but if you named it something different you’ll enter that name here. This should set the JNIOR so that when that I/O value on the JNIOR you picked goes ON, the macro will activate. 


When creating a macro using the JNIOR Support Tool, you may want data being sent in a command to contain quotes. This can be done, but its important to know how. When adding quotes, you can’t type them directly in because it will disrupt the csv format that macro files are saved as. To get around this, you type the hex value for quotes in the data field to implement them, which is \x22. So as an example if you had a macro named Play and you wanted to surround in quotes when adding it in the data field of a macro action, you would type \x22Play\x22 instead of “Play” in the data field of a macro action.

Macro tab of the JNIOR Support Tool

The Tasker application has been made to handle lots of different types of functionality. This post will go over an example that looks into different actions in Tasker such as a While Loop, If Statement, TCP Send and Set Variable action. It will also create devices in Tasker that would be sent to. The example should monitor output 1’s state, and when it turns on it will send string commands out to devices we declared. 

Actions In Example

The Set Variable Action

Tasker Set Variable Action

The Set Variable Action allows you to create a variable in the first value field of the action, and then assign it a value in the second value field.

The If Statement Action

An If Block Action creates a condition using a variable, that activates other actions when the condition is meet.

The While Loop Action

The While Loop Action makes actions within it reiterate until the conditional in the value field is met. 

The TCP Send Action

The TCP Send Action allows you to select a device created in the device tab, and send it the info you define. The device value created in the device tab uses an IP address and port number of the device. This is used to create the TCP connection you send on.

Device Example

Note: Values in this example will most likely differ from your. Information you enter here depends on what settings your Ethernet device listens on.

In this Example, before we create the Tasks, we need to create the devices that will receive commands we send, like shown above. To start, go to the device tab and click the “Add Device” button. Add as many devices you plan to send to. Each device you’ll enter its IP address, and TCP Port number.

After creating the devices to send macros to, you’ll start creating the task. It starts with the Set Variable action. This action is used to define the variable of the while loop to know when to end the Task. We set this variable to true so the while loop never stops until we set the variable to false. Once this value is defined, a while loop is added to the task. We’ll set this loop to check the conditional of the variable we created. After that, we add an if block and set the conditional of it.  This evaluates output 1 on the JNIOR, and if the output’s state is on, then if begins doing the actions inside the if block. When output 1 does go high, it sends the devices we created the string ‘test’ using TCP Send actions. It also sets the conditional for the while loop to false, so the task no longer loops, and ends.

With this, you should have a task that constantly monitors output 1 on the JNIOR. If output 1 goes high, it sends the string ‘test’ to all the defined devices.

You can use the Cinema application to execute DMX scripts. Those scripts can be on the same JNIOR or on another JNIOR. Both situations require making a TCP or Raw Ethernet connection to port 10000.

To execute a script once you will send go SCRIPTNAME\r\n

To execute a script a certain number of times you will send the same command but with a repeat parameter. For example, to execute 3 times we would send go SCRIPTNAME -r 3\r\n

To execute a script and have it repeat forever, until you abort it or reboot the JNIOR, you will send the -f parameter. For example, go SCRIPTNAME -f\r\n

Create a DMX device to use in the Macro

Create a Macro to call a DMX script with the Device we just created

Macro tab of the JNIOR Support Tool