Adding Advanced Scripts To Hardware Line Triggers

Modified on Tue, 24 Sep at 12:39 PM

Requires Hardware Service 6

 

One of the many advanced features offered by the Broadcast Radio Hardware Service 6, is the ability to add complex (and simple) scripts that are executed by the service when a hardware line is triggered.

In order to take advantage of these, you will need to be familiar with basic scripting languages and simple software coding concepts such as conditional statements, variables etc.

The aim of this article is to introduce the tool set and get you started with one of the built in examples. Learning more about the script language and what it can allow you to do is beyond the scope of this article, but we hope that this simple introduction get you thinking about what is possible at your station.

 

Start by ensuring that you are running both Myriad Playout 6 and Hardware Service 6. Please note that even if you upgraded to Myriad 6, you will still have to manually upgrade to Hardware Service 6 as Myriad 6 is compatible with the previous version of the Hardware Service.

 

You can download both Myriad Playout 6 and Hardware Service 6 from here - https://www.broadcastradio.com/myriad-6-playout-support#Download 

Scroll down to the Releated Software section to find the Hardware Service download link.

 

 

Once installed and running, click on the Configuration button to access the HS6 configuration window.

Select the Hardware Device you want to use. In this example, we will select the Virtual Network Device 1.

 

Selecting a Hardware Device will show a list of hardware input/output lines. To the right of each is a Script column with an Edit button to allow you to edit the script associated with that hardware line being triggered.

 

The left hand side of the Script Editor window shows a tree-view list of available Script Objects as well as some pre-written Example Scripts.

The right hand pane shows the current Script that will be executed when this hardware line is triggered. 

You can freely type into the Script area or add snippets of code from the Script Objects or Examples on the left, by expanding the tree-view and double clicking on the node to add the code snippet.

 

 

In this example above, we have expanded the Script Language Examples folder and double clicked on DateTime.js which has added a simple script that checks to see if the time is between 6pm and 8pm and if it is, sets hardware line 27 on the selected device, to 'set'.

Remember, this script only runs when Hardware Line 1 on Virtual Network Device 1 is triggered, and could be used to trigger a Command in Myriad to play a specific jingle etc.

Uses for hardware scripts include:

  • Adding conditional states to hardware events (ie offer / accept for studio switching).
  • Altering external device control based on time, dates or other factors.
  • Triggering Myriad Commands to do things like play specific jingles based on scripted criteria.

The scripting language is based on a simplified version of Javascript so the syntax and structure will be familiar to anyone with Java expereince.

 

 

 

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article