Tag Archive: devices

Some devices in a cinema’s ecosystem use HTTP Requests for communication. The JNIOR’s Cinema application can send GET and POST Requests to these devices by defining them in the Macro and Device files. This post will go over how to declare a HTTP Device in Cinema and send commands to it. If this is your first time creating Macro and Device files for the Cinema application, please check out this post first that goes over creating Macro and Device files in general. 

To start, you’ll want to open the JNIOR Support Tool and navigate to the Device Tab. You’ll start by going to the bottom left of the Support Tool and select ‘Add’. This will add a new device configuration to the Device Tab. Here you are then going to declare an HTTP Request device that will represent the device you are going to send HTTP Requests to. For this example I’m going to name it HTTP_Example (The name can’t have any spaces). The device type should be HTTP Request, the IP should be the whatever your device’s IP is set to (I used IP 10.0.0.201 for this example), and the port number should be 80. Once all this is set you should have the following device configuration:

Once you have this, you’ll save this device configuration on your computer (it should automatically open to a directory for you to save it in, but if you change the location make sure you remember where you save it), and then you’ll publish it to the JNIOR you want your HTTP device to receive commands from. Once you do that, you’ll then navigate to the Macro Tab.

On the Macro Tab, the first thing you must do is link your Device file with the Macro file you are going to create, so you can reference the Device you just declared in your Macros. This can be done by selecting the ‘Link Devices’ button at the top of the Macro Tab, and then selecting the Device file wherever you saved it on your computer. You’ll then need to create macros that will execute our actions. Macros can be added to the Macro View by clicking the ‘Add’ button at the bottom left of the Macro Tab. In this example I create two, one for doing a GET called HTTP Get, and one for doing a POST called HTTP Post. Once you have your macros, you’ll then need to create the actions the macros will execute to send to your HTTP device. You’ll add actions using the ‘Add’ button at the bottom of the Macro Tab under the Action View. In this example I name them after the HTTP Requests they are going to perform, one being GET, and one being POST. For these actions, you then set the Device for the actions to the HTTP_Example device you created from your Device file. For the GET action, it should be GET, and for the POST action it should be POST. Lastly for the actions, you enter the commands you need to send to your HTTP device in the Data field. Now that you have your macros and the actions you need them to perform, you just need to add the actions to your macros. To do this, select one of your macros so that it is highlighted, then do the same for the action you want to add to it. Once they both are highlighted, hit the arrow in-between the Macro View and Action View, and it should add the action to the macro. Do this for the other macro and your configuration should look like this:

Now save and publish this Macro file to the JNIOR that should be sending to your HTTP Device. Now when these macros are executed on your JNIOR, they should send the commands you defined to your HTTP device!

When creating a device in the Support Tool to send macros to, there is a predefined list of devices you can select from. If the device you are trying to send to isn’t listed, you can still send to it. The Doremi is one of these devices, and Cinema has preset commands implemented to send to it. This post should explain how to use these preset commands to communicate with it via Ethernet.

Note: This functionality requires that you have Cinema 6.0 or greater. Also, if you are unfamiliar with creating macro and device files, check out this post first to better understand how. 

To communicate with any device that doesn’t exist in the predefined device list, you need to choose the Raw Ethernet device from that list. This is placeholder that you can use to define whatever Ethernet device you are trying to connect to. In order to use the preset command for the Doremi, all you need to do is name the device “doremidcp”, and assign the IP of the Doremi and its Port number. Unless you changed the Doremi’s default port number, it should be 11730. With this the Doremi Device file should be good to save and publish.

Next you’ll want to link the device file in the Macro tab of the Support Tool, add and name a macro to the macro view, and then add and name an action to the action view. The Doremi has hex commands which it uses to let other devices send it commands. Cinema has been updated to convert 5 of these hex commands as preset strings for the Doremi commands: Play, Pause, Eject, Shutdown, and Reboot. In order to create an action in the action view for sending one of these Doremi commands, you’ll select the Doremi Device you created as the device in the action, choose the send action, and for the data being sent you’ll enter ‘command:’ followed by the command you want to send. For example, if you want to send the Play command to the Doremi, you’ll enter ‘command:play’. After that you simply add the action to the macro and publish it to the JNIOR. 

Note: As mentioned previously these preset commands were made from hex commands that the Doremi uses. There are other commands the Doremi can receive using hex, but these presets were made for the more commonly used ones.

With that, you should have a macro that sends to your Doremi via Ethernet! If you need other commands or additional assistance, reach out to our support team and we’ll help you further.

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 255.255.255.255 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.

One of the actions you can perform in Tasker is the HTTP request action. This action allows you to post information to a specific URL. This post will show you an example of this.

You’ll start by going to the Tasker Web Page, and once you are there you’ll want to create new workspace, and then add a task to it. 

Once you’ve created and named a task for the workspace, you’ll want to add the HTTP request action to the Task. You’ll do this by clicking the add action button, and then selecting the HTTP request action in the Add Action Dialog box.


After you have added the HTTP request action to your Task, you’ll now want to enter the URL you wish to request from which will include the data that we are requesting. For this example, we are going to request a macro from the Cinema application. Here is a link to a post for installing the Cinema application if you don’t have it. This example assumes you’ve created a macro in the support tool called ‘pulse_output_1’, but the URL can include the name of any macro you have. Also the URL we are about to enter will use the IP address of 10.0.0.131, but this value should be of YOUR JNIOR’s IP address when doing a URL request to Cinema or the IP of whatever device you would be doing a HTTP request to. Lastly, the URL will include 8090 because that is the port Cinema listens on for macros. With this in mind, we’ll set the URL field to http://10.0.0.131:8090/macro?name=pulse_output_1.

You can then execute this task and Cinema will activate the macro included in the URL, which based off its name would have pulsed output 1 showing you have successfully sent a HTTP request!

A username:password@ can be provided prior to the IP Address for those HTTP requests the require login.

Note: This functionality will require at least Tasker version 3.9

There are times when we want to log a temperature.  To do this we need to select a time interval between samples.  This interval can either be too short or too long.  Very rarely can we get the perfect interval.  A short interval leads to redundant data where the temperature doesn’t change often and several samples log the same temperature in a row.  A long interval can hide valid temperature changes.

So we ask ourselves, what do we really want?  The answer is usually that we want to know when the temperature changes.  Using the setup below, we can achieve the desired functionality. 

Configuration

The following image shows how we can set up a Task with Variables and Logic to only Log when the temperature changes.  The global variables make sure the current temperature values that are used in the logic are used when making the log entry.

Tasker Logging workspace

This screenshot shows how to configure the Logger to use the global variables.

Loggers in Tasker

This screenshot shows configuring the schedule to call the Task with a short interval.  The logic within the Task is responsible for making sure the log entries only occur when there is a valid temperature change.

Scheduled Log Tasks in Tasker

Result

Here is the result of a the functioning configuration over the past 15 minutes.  You’ll notice that the temperature changes, but it tends to bounce back and forth between two or three values.  We can handle that in another article!

Logged Temperature values

As long as the device you are sending to can create TCP or serial connections, the JNIOR should be able to send commands to it. If you are starting from scratch with a JNIOR, you’ll need to download the JNIOR Support Tool and the Cinema update project. The JNIOR Support Tool allows you to install update projects on JNIORs, and the Cinema update project installs the Cinema application, which is what listens for commands to activate JNIOR macros.

Name Version Release Date Size MD5
JNIOR Support Tool v7.15 Nov 20 2023 10.4 MB e735c5be348b91d84e41f518e3fafe42
Cinema.jar - Update Project v6.9 Jan 03 2024 545.1 KB 0a2c670e461116768b75288e652c5253

To update your JNIOR with an update project, here is a link to a post on our site that shows how to install Cinema.

Once the Cinema update project has been published to your JNIOR, we’ll now need to create a device in the support tool to send to. In the support tool, you’ll go to the device tab and select add. You can select the device and rename it. After that you’ll now configure the settings of the device so we can send macros to it. To start you’ll select your device type, and if you see the device you want to send to there you’ll select it. If not you’ll select Raw Ethernet for a TCP connection or Raw Serial for a serial connection. You’ll then set the rest of the device configuration according to the device’s TCP or serial settings.

Once you finish setting the device information, you’ll then want to save the device file by clicking the Save As button. After that you’ll then publish the file to the JNIOR you are using by clicking the Publish to JNIOR button.

After you’ve done that, we’ll now create the macro that will be sent to the device that will contain the text command. Going back to the support tool, you’ll go to the macro tab.

The first thing we’ll want to do here is click the “Link Devices” button at the top. Here we’ll select the device file we just created, so we can reference it in our action for the macro we are going to create.

After completing that, at the bottom left corner of the macro view and you’ll select add/macro. A new macro should populate the macro view, and you can then click on it and rename it. I’m going to name it ExampleMacro.

Once you’ve done that you’ll now go to the action view and select the add button there. A new action should appear in the action view. You can rename this if you’d like, and then we’ll want to select the device we previously created in the Support Tool to send to. Lastly, in the data field you’ll want to enter the text command you wish to send to the device. If you are using a Raw Serial/Raw Ethernet device, make sure you include the termination string at the end of your text command for the device you are sending to.

Once that is finished, make sure you add the action we created to the macro we created. You do this by selecting the macro, then the action, followed by the arrow between the macro and action view.

Lastly, like we did with the device file, we’ll save this using the Save As button, followed by publishing it to the correct JNIOR using the Publish to JNIOR button.

Macro tab for JNIOR Support Tool

Now the JNIOR has a macro created that will send the text command to your specified device!

One of the useful things about Tasker, is that it can include communicating with other devices within its tasks. This is possible by including a networks action, but before those actions can be used devices need to be added to a Tasker application. This post will explain how to create devices to be used in actions for tasks.

To start, we’ll begin by going to the devices tab of the Tasker application.

Device tab in Tasker

Here we can select the “Add Device” button which brings up a dialog box to add a device to the current workspace. 

Device dialog box in Tasker

In this dialog, two things need to be defined to create the device. This first value needed is the name of the device. The second value needed is the device type, which can either be an Ethernet or SNMP Device. Depending which Device type you choose changes the what information you can configure for the device after creating it.

Creating an Ethernet Device

If the Ethernet Device type was selected, the configurable option for the created device should look like this:

Ethernet Device example in Tasker

Two values of the Ethernet Device need configured in order to use it in a Task action, the IP Address and the TCP Port values. These need to be set to the IP Address and TCP Port values on the device, so that when they are used in actions, the JNIOR can properly communicate with the device. Another post has an example of using a TCP Send with an Ethernet Device.

Creating an SNMP Device

If the SNMP Device type was selected, the configurable option for the created device should look like this:

SNMP Device example in Tasker

Three values of the SNMP Device need configured in order to use it in a  Task action which are, the IP Address, the UDP Port, and the Community Name. These are needed for the JNIOR to connect to the SNMP Device and you obtain them from the SNMP Device. A different post shows how to use a SNMP Device with an SNMP Trap.

With this, you should have created devices in Tasker that can be implemented in actions.

This feature is available in Tasker v3.1 and later.

The SNMP application offers built-in Traps when the digital inputs and relay outputs change. Tasker takes this further allowing you to send a SNMP Trap as a part of a Task. The value of the Trap can be custom and dynamic based on the message building rules of Tasker. An example of using a custom SNMP message in Tasker is below.

The first thing we need to do is make sure that SNMP is running. The feature covered in this post is available in SNMP v2.6 and greater. Once we know that SNMP is running we can Create or Open a Tasker Workspace.

To send a SNMP Trap we will need to add the SNMP Trap action to a Task. You can create a new Task for this action or add it to an already existing Task. The action will ask for the SNMP OID (Object Identifier), the message to send and the device to send the Trap to. The device to receive the Trap can be the built-in Trap Host that is defined in the SNMP application or a new one can be defined in the Devices Tab.

Upon selecting the SNMP Trap action you will be presented with the following

Send SNMP Trap empty

Here is what it will look like after entering some information

Send SNMP Trap example

Without defining a SNMP Device, the Trap will be sent to the Trap Host that is defined in the SNMP application. You can optionally define a new Trap Host by clicking + Add Device in the Devices Tab.

Tasker Add Device Action

You will be presented with a Dialog asking for a Device Name and the Device Type. Enter any name and select SNMP Device from the Device Type drop down.

Tasker Create New Device dialog

Now you can enter the Trap Host information as shown here.

Device tab in Tasker

Now back in our Task Action we will see this Device as an option.

SNMP Trap Action with Device in Tasker

Save the Workspace in the File menu and your Custom Trap will be able to be sent!

Advanced Usage

You can send a dynamic message. A dynamic message is one that has different data based on our message building rules. Here we will send the current temperature.

SNMP Trap Action Example

A defined Signal could also be used here instead of temp[1].f and a Trigger could be used to cause the Trap to get sent as described in the using signals and triggers post.

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.

Analog Presets is an application that lets you control and automate expansion modules such as 4-20ma Module, the 10v Module, or the 3 channel LED module. To get started, you’ll want to download the Analog Presets application, which you can download below.

Name Version Release Date Size MD5
Analog Presets v2.6 Dec 14 2021 334.1 KB d9eeeded688fe9c875402948f562f9b1

After updating your JNIOR with the application, you’ll want to go to the URL containing the IP of your JNIOR with /analogpresets after it to access the application on your JNIOR. Here you can add levels containing different commands you want to create for your modules. You can name the command, what you want it to do, how long it should last, and if you want other commands to start once it starts or finishes. You can also use these as macros by defining a port number and termination string on the general tab.

To send a macro to the Analog Presets application, first we’ll need to configure it. Here is an example using the 3 Channel LED Dimmer. We’ll start by adding a new level at the bottom middle of the first tab in Analog Presets, and giving it a name. (For this example we named ours MacroTest) Once that is added, we’ll want to go to setting level and add the brightness of each output we want set. For this example, since the 3 Channel LED Dimmer has 3 outputs, we’ll set each of them to 100 by typing in the field 100,100,100. We’ll also want to go the 3 Channel LED Output Channel field and type 1,2,3 to represent the channels we want to set the brightness of. If in the setting level field we set the brightness to 50,75,100, and the 3 Channel LED Output Channel was still 1,2,3, then channel 1’s brightness would 50, 2’s would be 75, and 3’s would be 100. For this example though, we’ll set them all to 100. If you have the 3 Channel LED Dimmer plugged into your JNIOR and the 3 Channel LED Output Channel field is still grayed out, then reboot your JNIOR and it then should be configurable.

We’ll then click on the General tab of the Analog Presets application. Here we can set the TCP port that the macro will send to. (In this example we have 9700) Make sure the Termination string is \r\n.

After that you’ll need the cinema application. You’ll download the Cinema.jar application and using the update tab in the support tool load it onto your JNIOR. Once its on your JNIOR, we’ll want to go to the support tool and create a device in the device tab. We need to do this so that the macro will know what information to send. At the bottom of the Device tab, click add Device. From there, we’ll want to name our device (You can name it anything), set the device type to RAW ETHERNET, set the IP Address to the JNIOR you are using, and the port number to the one you set above in the Analog Presets application. (Mine for this example is 9700).

Once you have set this up, you’ll want to click “publish to JNIOR” and it will prompt you to save the device configuration as a file. Once this is done, select the JNIOR you are using as the one to publish to. Once its published, you’ll then go to the Macro tab. The first thing we’ll do here is click “link devices”, and select the device file we previously created. After this we will go to the Action view and add a new action. Here you’ll name your action (It can have any name), the device we’ll set the to the one we previously created, the action should be send, and the data should be formatted as follows:

Trigger “Name of level from analog presets application”\r\n.

Once this is done, we will then add a Macro in the Macro view. First we name the macro and then we can add the action to this macro, by selecting the Macro we created, the action we created, and then clicking <- button.

Once you have done this, you’ll want to click “publish to JNIOR” like we did previously for the device tab, and create a macro file. Once that is created select the JNIOR you are using as the one to publish to. Now to test this, we’ll want to go to the tools tab of the support tool and click command line.

Once the command line is open, we need to configure the command line to create the right connection, at the bottom of the command line we’ll set the values to our IP and then the TcpPort value in our JNIOR’s Registry. You’d find this by opening the JNIOR’s web page in beacon, and then after going to the registry tab look for the path: AppData/Cinema/CinemaServerClient/TcpPort

Make sure that the value is not -1 like it is above. If it is, change that registry key. (An example value to change it to is 5000). Once you find this value, set it as the port number next to the IP address at the bottom your command line. The IP address should be the one your JNIOR has.

Also, go the options drop down list and check each option.

Now all you should have to do is click the connect button at the bottom right and type:

run “Name of macro from support tool”\r\n

This will run the macro you wanted to send to the 3 Channel LED Dimmer!

The iBoot device from dataprobe is a Web Enabled Power Switch. We can command the devices by issuing HTTP Requests. To do this we will add an iBoot device to the Devices file and add “Power On” and “Power Off” actions to the Macro file. We then associate the actions with macros. We might want separate macros for power on, power off and power cycle.

To create the iBoot device in the devices file go to the Devices tab in the JNIOR Support Tool. Then in the lower left click ‘Add’. Then fill out the information as follows. This device can be added to an existing devices file or a new one. We are going to use the HTTP Request device type.

Then click over to the Macro tab and click on Link Devices. This will link the devices file so that the configured devices are available to create macro actions.

Now click ‘Add’ below the Macro Action View. You can rename the action. Click in the Device column for the new Action and scroll to the bottom to select your linked device. Select the iBoot device. Now click on Action and select “GET”. In the data field enter the resource portion of the URL””. It should look like this… Remember to enter the username and password if needed.

You can now add the action to any macro by selecting both the macro you wish to add it to and the new iBoot action.s Then use the <- button between the two views like this…

We can command the Nagra myCinema player to start playing its content. To do this we will add a myCinema device to the Devices file and a “Play” action to the Macro file. We then associate the “Play” Action with a macro. It’s that easy!

To create the myCinema device in the devices file go to the Devices tab in the JNIOR Support Tool. Then in the lower left click ‘Add’. Then fill out the information as follows. This device can be added to an existing devices file or a new one. We are going to use a RAW ETHERNET device so that we can send any command we want. The command is a simple text string.

Then click over to the Macro tab and click on Link Devices. This will link the devices file so that the configured devices are available to create macro actions. Now click ‘Add’ below the Macro Action View. You can rename the action. Click in the Device column for the new Action and scroll to the bottom to select your linked device. Select the myCinema device. Now click on Action and select Send. In the data field enter “play”. It should look like this…

You can now add the action to any macro by selecting both the macro you wish to add it to and the new myCinema action. Then use the <- button between the two views like this…

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