Sending Commands to a JNIOR to Execute Macros
When macros have been set up on the JNIOR, the next step is to configure a device so that it can send commands to Cinema application on the JNIOR to execute those macros. This post will explain the command format for sending to the Cinema application on the JNIOR. This walkthrough assumes you’ve already created and loaded macros onto the JNIOR, so if you haven’t, here is a post on how to create and load macros onto a JNIOR. It also assumes you’ve loaded the Cinema application on the JNIOR. If not done yet, here is a post on how to install the Cinema application on the JNIOR.
Checking the Cinema Application’s Network Settings
To set up another device to send to the JNIOR’s Cinema application, we first need to make sure that the Cinema application is listening on either a TCP port to receive an Ethernet command or on a serial port to receive a serial command from the device sending to it. A separate post exists that goes into more detail on how to set up the connections to the Cinema application on the JNIOR. While that post goes over the TCP/Serial configuration, you also need to check the termination string Cinema needs at the end of each command. By default, Cinema’s termination string it uses is a carriage return and a line feed, which is represented as ‘\r\n’. This is its default for both receiving commands AND sending commands to other devices. In the JNIOR registry, under AppData/Cinema/CinemaServerClient or AppData/Cinema/CinemaPreshowClient are the keys for IncomingTerminationString and OutgoingTerminationString, where these default values are set. These define what termination strings need to be attached at the end of each command. Make sure what is defined here is what you use for your commands being sent to the JNIOR to execute macros.
Formatting a Command to Send to the Cinema Application
Once the JNIOR is properly listening for a command, we need to create the command we will send to the JNIOR. To start, all commands sent to the Cinema application to execute macros need to start with the word ‘run’. Next would be the name of the macro you are trying to execute, as defined in the macro file you already created and loaded onto the JNIOR. Lastly, you need to append the termination string that Cinema is expecting at the end of your commands.
Let’s say, for example, one of the macros we created and loaded on the JNIOR was called ‘House Lights On’. Also stated previously, the default termination string Cinema uses to receive commands is ‘\r\n’. The command then needed to execute the macro ‘House Lights On’ would be the following:
run House Lights On\r\n
If this command were sent to the TCP or serial port of a JNIOR that the Cinema application is listening on, it would execute its ‘House Lights On’ macro.
NOTE: When creating a device configuration in a Cinema Server that will send to the Cinema application, you may need to reboot your Cinema Server for its configuration to take effect.