Reading RDM with e:script

RDM (Remote Device Management) is a remote management protocol on top of DMX and allows bidirectional communication with fixtures. You can read system values and status, and depending on the type of fixture you can set DMX addresses and other parameters. The Programmer of the Lighting Application Suite has a complete implementation of ANSI E1.20, Remote Device Management on board. With the coming LAS 6.1 you can read RDM values in fixtures and use them as Autotext (similar to time, astronomical times, system parameters) in the Action Pad.

You can also use the RDM API in the Programmer in e:script, which allows very flexible and custom-specific functions. Here is an example script how the RDM API can be used to check fixture temperatures.

// --------------------------------
// checkTemperature script comment
// --------------------------------

int sensorId = 7; // id of temperature sensor
int temperatureMax = 80000; 
              // commonly given in m°C so 80000 is 80°C
string deviceId;
int li = CreateRdmDeviceList();
int deviceCount = GetRdmDeviceCount(li);

// iterate all rdm devices
int i;
for (i = 0; i < deviceCount; i++)
{
     deviceId = GetRdmDeviceId(li, i);
     printf("deviceId = %s\n", deviceId);
     checkTemperature(deviceId);
}
DestroyRdmDeviceList(li);

// checks if temperature value from sensor 
// is within allowed range
function checkTemperature(string deviceId)
{
     int t = GetRdmSensorValue(deviceId, sensorId);
     printf(" %s %d\n", deviceId, t);
     if (t > temperatureMax)
     {
          // do something if temperature too high
          alert("Warning: temperature of device %s is > %d!\n", 
                                   deviceId, temperatureMax);
     }
}

Getting DMX engines online

The DMX engines Butler S2 or Butler XT2 sometimes seem to cause trouble when trying to connect them to the LAS (Lighting Application Suite) server. In nearly all cases the connection between Butler and server is not correct, IP addresses are duplicated or wrong cable used. For this reason here a more detailed description.

Use the right cables and switches

System diagram

System diagram

Do not connect server and engine with an Ethernet cable directly. Use an Ethernet switch in any case, like shown in this picture. The Ethernet switch may have DHCP enabled or not, as nobody sends DHCP requests, it does not matter.

Even an Ethernet cross cable will not work in any case, in general avoid cross cables as they may cause damages, e. g. in networks with Power-over-Ethernet. Be sure not to use any cross cable at all, they are devil’s work.

RJ45 pairing

RJ45 pairing

You can recognize a cross cable when laying the two plugs together. A cross cable reverses the pinning on the two sites, the standard RJ45 cable does not, like in this picture. This is a general RJ45 CAT5 Ethernet cable without crossing. The red wires are on the same side, the pinning is identical on both sides.

Connect all Butlers over this switch to the server running the Programmer or Patchelor.

Do not mix networks

Programmer - Appl Options

Programmer – Appl Options

Use a separated, closed network segment for your lighting control. Do not use enterprise or open networks. The best way is to use a dedicated Ethernet card in the server, a switch and the Butlers. Be sure to assign the right network card in the Programmer in the Application Options, if there are more than one in the server.

Use the network IP range 192.168.123.*, assign a unique IP address to the server network interface, like 192.168.123.10 or similar, this is done with the Windows Control Panel in the network section. Be sure that the server IP address is really unique and does not conflict with any UMTS USB/WLAN sticks or WLAN adapters. Build a clear address structure in your network, this makes it easier to separate address ranges, like

  • 192.168.123.1 = do not use, reserved for factory state engines!
  • 192.168.123.10 – 192.168.123.20 = servers
  • 192.168.123.100 – 192.168.123.199 = engines
  • 192.168.123.200 – 192.168.123.255 = any other network devices

The hidden enemy

Be sure that all firewalls are switched off. As the e:net system is a closed network, no firewall is necessary, neither in hardware nor in software. Firewalls in Windows 7 get switched off via the Control Panel.

Set proper IP addresses

When arriving from the factory, the Butlers have an assigned IP address 192.168.123.1, always. To connect more than one Butler be sure to have only one of them connected to the network, otherwise more than one system will try to communicate over 192.168.123.1, which will not work. Never connect more than one factory-state Butler to the network.

Programmer - Network

Programmer – Network

If all is well, the Butler should become visible in the Network tab of the Programmer now. If this happens, the Butler is recognized and the network seams to work properly.

Now assign a unique and new IP address to this engine, to do so, click on the device in the network tab line, here “Butler XT2” and the device configuration dialogue opens. In this dialogue a new IP address can be given to the Butler.

Device configuration

Device configuration

Enter a new IP address for this engine, click OK and the new configuration will be transferred to the Butler. Now you may connect the next Butler to the network and continue to set up all addresses.

Be sure that every engine has a unique IP address, also the server!

Even better with the Butler XT2

Butler XT2 standalone config

Butler XT2 standalone config

The Butler XT2 has a build-in webserver, connect a PC with a webbrowser instead of a server with the Programmer. Or use a WLAN router to be connected with the Butler XT2 and access the Butler XT2 with PC or mobile devices with a webbrowser.

 

 

 

butler_xt2_webconfig_mainStart the web browser and enter the IP address of the Butler XT2 in the address field of the browser, in factory state 192.168.123.1 (if the Butler was configured differently before and you do not know the IP address, perform a Reset to factory settings).

Butler XT2 password

Butler XT2 password

You can now see the current settings and  parameters.To change the configuration, click the upper Configure button and enter the password.
The default password is “ecue”, it can be changed during configuration.

Set the parameters and click Submit to save the changes. This makes the basic configuration of several Butler XT2s much easier.

Code examples from the Advanced System Manual

LASM

LASM

The e:script coding examples from the Advanced System Manual für the Lighting Application Suite cannot be copied via Copy/Paste from a PDF file. PDF files are coded in UTF-8 code format, while the macro editor of the Programmer only understands ASCII. For this reason we have made the files available as standard text files with a .cpp extension here:

www.traxontechnologies.com | Downloads | e:cue Software | Support Files

Programmer > e:script Macro Editor > keyboard shortcuts

For an internal training, I was writing down a few keyboard shortcuts for the Macro Editor.
I wondered if there are more and remembered that the Scintilla engine was used. Searching the web led me to http://www.scintilla.org/SciTEDoc.html#Keyboard which shows all possible keyboard shortcuts.

Here’s a list of those available and useful in the Macro Editor – enjoy   ; )

Magnify text size. Ctrl+Keypad+
Reduce text size. Ctrl+Keypad-
Restore text size to normal. Ctrl+Keypad/
Indent block. Tab
Dedent block. Shift+Tab
Delete to start of word. Ctrl+BackSpace
Delete to end of word. Ctrl+Delete
Delete to start of line. Ctrl+Shift+BackSpace
Delete to end of line. Ctrl+Shift+Delete
Go to start of document. Ctrl+Home
Extend selection to start of document. Ctrl+Shift+Home
Go to end of document. Ctrl+End
Extend selection to end of document. Ctrl+Shift+End
Scroll up. Ctrl+Up
Scroll down. Ctrl+Down
Line cut. Ctrl+L
Line copy. Ctrl+Shift+T
Line delete. Ctrl+Shift+L
Line transpose with previous. Ctrl+T
Selection duplicate. Ctrl+D
Previous word. Shift extends selection. Ctrl+Left
Next word. Shift extends selection. Ctrl+Right

Autumn Update 2012

Three major product updates happened for October 2012.

Mobile Action Pad

Mobile Action Pad

The Lighting Application Suite 6.0 is released. New features are the Color Picker for Action Pad, Emotion FX DMX Output and the Dynamic Scrolltext for Live FX. More to read in the e:cue website.

With the Butler XT2 firmware version 2.0 you now can control the engine with Action Pad in standalone mode. Either with a Flash-enabled PC web browser or with …

The Mobile Action Pad for iOS and Android. Supports the new styles in the Action Pad and the Color Picker. Read more

 

Configuring a Butler XT cluster

Get the Flash Player to see this content.

Watch the fullsize video in WMV or in FLV

Programmer HTTP remote control

Via the HTTP server in the LAS you can access functions in the Programmer from a remote system. First, you have to configure and start the HTTP server in the Application options. When the configuration is finished, the HTTP server is ready for access. As there is no webpage in the server home path, you cannot see anything. But you can already trigger actions in the Programmer using a web browser. This is done through special tags inside the URL.

The basic syntax of an HTTP request is

http://ServerAddress/xmlget?RequestType=Request

or

http://ServerAddress/get?RequestType=Request

where ServerAddress is the IP Address or domain name of the HTTP server, RequestType is the type of request you want to send and Request is the request itself. As you can see, the only difference between the lines is the use of get and xmlget respectively. This affects the style of the results that the Programmer sends back to the browser after a request. Using get, the result is in plain text. With xmlget, the result will be sent in XML, with the following layout:

<?xml version=”1.0” encoding=”utf-8” standalone=”yes”?>
<xml_ecue version=”1.0”>
<request value=”…” tag_id=”…”/>
<result value=”1” error=”0” message=”OK”/>
<result_list>
<result_entry value=”the first entry” />
</result_list>
</xml_ecue>

XML-Tag Description

  • <?xml … standard XML header
  • ƒƒ<xml_ecue> protocol version number for e:cue HTML
  • ƒƒ<request> the request like it arrived at the Programmer
  • ƒƒ<result> ‘value’ – an integer value for the result, ‘error’ – nonzero value if an error  occurred, ‘message’ – error description in plain text
  • ƒƒ <result_list> holds a list of <result_entry> – tags
  • ƒƒ <result_entry> holds an attribute ‘value’ with results

Using get requires less result decoding effort but has a worse error handling. With xmlget,
in contrast, decoding is not as simple but you can see more easily what went wrong in case an error occurred. Empty spaces and various special chars are not allowed inside an HTTP request. You will have to transcode the request string to conform with the HTTP protocol. The JavaScript command XmlHttpRequest automatically transcodes forbidden characters into the correct format. You should use this command when you build your own website for remote access.

HTTP Request Types

The CallMacro request will execute a macro in the programmer. The macro must exist inside the show.

http://ServerAddress/xmlget?CallMacro=Name

You can also pass up to five numeric parameters, separated with commas. Examples:

http://ServerAddress/xmlget?CallMacro=MyMacro or http://ServerAddress/get?CallMacro=MyMacro,2,4,6

The ExecCommand request will execute a single line e:cript command in the  Programmer:

http://ServerAddress/xmlget?ExecCommand=CommandString
http://ServerAddress/get?ExecCommand=CommandString

In CommandString you can add any valid e:script command (or command sequence) like you would use inside the Programmer. You can also define global variables. Examples:

http://ServerAddress/xmlget?ExecCommand=StartCueList(QL(1));
http://ServerAddress/get?ExecCommand=if (undefined(_x)) int _x;_x=10;
http://ServerAddress/xmlget?ExecCommand=printf(“%d\n”,_x);

The AutoText request sends e:cue autotext to the Programmer. The Programmer sends back decoded autotext to the web browser as a result.

http://ServerAddress/xmlget?AutoText=AutoTextString
http://ServerAddress/get?AutoText=AutoTextString

Example:

http://ServerAddress/xmlget?AutoText=<cuelist 1 status>

Using the HTTP requests by typing them directly into the browser’s address bar is too complicated for real practical applications. It is of course possible to embed the requests into a website. This is what it’s all about: create your own website with your own control elements and put it online using the Programmer’s integrated HTTP server. You can also refresh any status displays or control elements without having to reload the entire page. This is typically realized using the AJAX web development techniques.

KiNET configuration

KiNet is a protocol used by Color Kinetics to control their LED fixtures and power supplies. It is a lightweight Ethernet-based protocol and uses UDP on port 6038. Be sure that no
hardware or software firewall blocks this port. As said for e:net a separate network segment should be used, at least a separate segment for all fixture communication.

There are two protocol generations over time, KiNET v1 and KiNET v2. KiNET v1 is also called DMXOUT and v2 is PORTOUT. The various products of Color Kinetics support one or both protocol versions. To use KiNET components there are two steps necessary: configuration of the KiNET power supplies including the control functions, and setup of the Programmer for KiNET communication.

For the first step you have to use Color Kinetics programs, these programs are available
from the Philips/Color Kinetics homepage. Note: as I dont have CK products at hand, this is a kind of dry run.

  • Visit www.colorkinetics.com and follow Support, then Downloads from the main and left navigation.
  • Download the Light System Composer, unzip it and start the installer. The LCS installer places a folder on your desktop, this contains links to several tools, one is the  Management Tool, this program is used to configure the KiNET power supplies.
  • Use Light View | Discover Interfaces to allocate the power supplies, assign a unique IP address.
KiNET Manager

KiNET Manager

The next step is to configure the Programmer. The KiNET devices are used with a special
driver available in the Device Manager. So in Programmer, open the Device Manager, select Add Driverand add a driver for DMX Output, use the KiNET DMX-Node and click Add.

After the driver was added the configuration dialog for the KiNET node opens automatically.

KiNET DMX device

KiNET DMX device

  • Assign a unique name for the device.
  • Enter the assigned IP address, the output universe in Programmer.
  • Select the correct KiNET protocol version, see the following table for the protocol versions supported by the CK devices.
  • DMX Start Channel allows a DMX address shift if any other DMX addresses are placed before the target fixture. ChromASIC is autoadressing mode, usually not used.

Click OK to enable the driver as DMX output device.

Product KiNET v1 (DMXOUT) KiNET v2 (PORTOUT)
PDS-150e Yes No
PDS-500e Yes No
PDS-60 24V Ethernet Yes No
PDS-60 24V DMX/Ethernet Yes Yes
PDS-60ca 12V Ethernet Yes No
PDS-60ca 7.5V Ethernet Yes No
PDS-60ca 7.5V DMX/Ethernet Yes Yes
PDS-70mr 24V Ethernet Yes No
sPDS-60ca 24V DMX/Ethernet Yes Yes
sPDS-480ca (7.5V, 12V, 24V) No Yes
Data Enabler Ethernet Yes No
Data Enabler EO/iColor Accent Powercore No Yes

Control the Programmer with MS Powerpoint

PPT2Programmer

PPT2Programmer

No joke, it is possible to control the Programmer via Microsoft Powerpoint. This works via the web server interface in the Programmer and the HTTP methods in Powerpoint. Do it like this:

  • ƒIn Powerpoint options | Popular enable the Developer Ribbon.
  • Place an object in your presentation, e. g. a square like a button.
  • Right-click the object, select Hyperlink.
  • In the Action Settings dialog, select Run macro and define a macro name,
    e. g. StartShow1.
  • In the Ribbon, select Macro in the PP Ribbon, create a macro, here StartShow1, go to Edit mode and enter this code:
    Sub StartShow1()
    Set objHTTP = CreateObject(“MSXML2.ServerXMLHTTP”)

    URL = “http://192.168.123.123/xmlget?ExecCommand=StartCuelist(QL(1));”       objHTTP.Open “POST”, URL, False

    objHTTP.setRequestHeader “User-Agent”, “Mozilla/4.0 (compatible;MSIE6.0;Windows NT 5.0)”

    objHTTP.send (“”)

    End Sub

Click Ok, close macro view. ƒƒ Dont forget to enable the Webserver in the Programmer!

Defining triggers for Butler S2/XT2 and ETH2DALI standalone

Butler XT setup online/standalone

Butler XT setup online/standalone

For the e:cue Butler XT the definition of Triggers and Actions was quite clear. There were separated tabs for online and standalone mode, for Triggers and Actions. You could assign different Triggers and connected Actions for standalone mode and for online mode.

Butler XT2 setup

Butler XT2 setup

This has changed for the Butler S2/XT2 and the ETH2DALI. The configuration of the Butler S2/XT2’s Actions and Triggers in the Device Manager makes no difference between online and standalone mode. You will define all properties in one single dialog, as you can see on the left. No tabs, only one selection is possible. Define all Triggers and Actions here. When later exporting the show to the Butler XT2 and running a Quick Update, all Triggers not supported in standalone mode are not transferred to the Butler XT2, they are ignored. This seems a little bit confusing. The idea behind is to allow a simpler configuration and to harmonize the standalone and online configuration.

Triggers supported in standalone mode

ETH2DALI Butler XT2 Butler S2
Initialization Parameter context ignored
Cuelists Only stop/end supported
Hourly Seconds are ignored, only hour/minute
Label Fully supported
Periodic Fully supported
Sunrise Fully supported
DALI Event Fully supported

Conditions supported in standalone mode

Valid From/To is supported in standalone mode. Since LAS V7.0 this is Condition > Date.
All other Conditions in Trigger Rules (since LAS V7.0) are not supported in standalone mode.

Supported Actions in standalone mode

ETH2DALI Butler XT2 Butler S2
DALI Fully supported (except Ramp Intensity > Toggle Ramp Up Down)
Cuelists Supported except parameter Choose
Mutual Exclude Group Fully supported
Set Intensity Fully supported
Ramp Intensity Start Fully supported
Ramp Intensity Stop Fully supported
Reset All Fully supported
Step Intensity Fully supported
Stop all cuelists Fully supported
Trigger Label Fully supported
Hibernate Fully supported
Freeze Fully supported

Other restrictions in standalone mode

For Butler XT2 and ETH2DALI, a total of 99 cuelists can be exported and not more than 100 trigger rules will be evaluated in standalone mode.

ETH2DALI specific

The Butlers do not, but the ETH2DALI supports the following Actions additionally in cues and as cuelist “Release Action”:

  • DALI
  • Send Labeled Event
  • Toggle Trigger Label (useful to realize “toggle on/off” for a Ballast or Group with PBCs)
  • Driver Command (to switch the ETH2DALI relays)

See the LAS System Manual, Chapter »Managing devices«, »Configuring a Butler XT2« for details.