Author Archives: Bruce

Sending messages to Growl on a remote Mac (for Irssi integration)

Growl, IRC, and Irssi

Growl, for those who don’t know, is a handy utility for Mac OS-X that lets applications unobtrusively display notifications on the screen.  Many applications have buil-in support for popping messages up via Growl.  One handy use is when an IRC or IM application receives a message for you but the application is minimized.  You wouldn’t see the message if the app is minimized, but with Growl the application can pop up a message on the screen.

Irssi is a highly customizable IRC client – it calls itself “the client of the future”.  One of the many features of Irssi is that you can customize it with perl scripts, and you can find literally hundreds of perl scripts for Irssi with very little effort.

As a professional systems administrator I need to have remote access to the systems I manage, as well as the ability to communicate with my fellow admins.  We run an IRC server that lets us chat with each other whether in the office or remotely.  I could run an IRC client on my Mac at work but the problem with that is accessing it remotely.  Interacting with the desktop remotely is painfully slow, and a text-based IRC client like Irssi in conjunction with a utility like screen lets me keep my client logged into IRC and allows me to access it from virtually anywhere at any time.  Most of us also opt to run our IRC clients on a shell server rather than our own desktop systems since the servers are more easily accessible, and less likely to go down due to hardware problems, power failures, etc.

So on my Mac at work I run Irssi in a screen session on a linux server.  The problem is that I can miss important messages if I don’t keep an eye on the Irssi session, and as any sysadmin will tell you it’s very easy to get distracted.

I have found a few solutions that hook a remote Irssi session into Growl on your Mac desktop, but none of them had quite the features that I wanted.  So I ended up writing my own, in part to learn a little about Growl & Irssi, and in part to give me those features I desired.  Everything I’ve written can be downloaded from the link below, and it’s all covered by the GPL so feel free to use and modify it as long as you adhere to the GPL.

Features

There were three primary features I was interested in.  The first was that the client and server communicate via TCP so that I could use port forwarding in SSH to ensure a secure connection between Irssi and Growl.  The second was that if I didn’t want to rely on an SSH tunnel that the datastream could be optionally encrypted to ensure a secure connection.   Encryption is performed using  Blowfish, and to enable it you just specify an encryption key in the configuration file. If you don’t want to use encryption just comment out the encryption key.

The third feature is that the Irssi integration allow me to specify arbitrary text that would trigger Growl popups.  I want Growl to notify me if somebody mentions certain key words or phrases in IRC.  My Growl module allows you to easily add and remove arbitrary strings that will trigger Growl popups so that I can add and change them as desired.

Another feature not related to Irssi that I decided would be handy was to extend it so that I could easily add it to any other environments where I might want remote Growl messages.  To that extent I wrote a command line utility that also lets you send Growl messages, and it supports the same features as the Irssi module.

The scripts should be extremely easy for anybody with minimal perl experience to install.  They do require a number of perl modules, such as the Mac::Growl module that interfaces with Growl, as well as Crypt::CBCeasy for Blowfish encryption and a few others.  See the README file for a complete list of all the modules.

Usage

The README file has complete instructions, but in a nutshell:

  1. Install the appropriate perl modules on both the client and the server
  2. Create the file ~/.growl-server on your Mac with the desired options (see the comments in the included sample)
  3. Run growl-server.pl on your Mac
  4. Place growl.pl in your ~/.irssi/scripts directory on the system where you run Irssi
  5. Edit growl.pl and modify any of the documented options to match those in ~/.growl-server
  6. Load the growl script into Irssi

Optionally, or if you just want to use the command line utility to send Growl messages:

  1. Create the file ~/.send-growl on the system that will be sending Growl messages
  2. Copy send-growl.pl to the system
  3. Run send-growl.pl (use -? or –help to see command line options)

Download remote-growl-0.01.tar.gz here.

DMX-512 Primer (an end-users perspective)

There are a number of good DMX-512 resources available on the internet, but many of the primers focus mostly on the technical aspects of the protocol and less on practical usage.  What follows is information on DMX-512 from more of a practical users perspective.  For more resources see my DMX-512 Resources page.  If you have other questions you’d like to see addressed here please e-mail me (click on “About” at the top of the page) or post a comment.

What exactly is DMX?
DMX is actually shorthand.  The full standard is DMX512-A, which is typically referred to as just DMX-512 or DMX.  It was originally designed as a standard for lighting consoles to communicate with dimmers used in theatrical lighting.  Up until the early 1990’s most lighting systems used proprietary protocols between consoles and dimmers, so it was difficult to have a console from one company communicate with dimmers from another.  As DMX512 gained popularity it was quickly adapted by manufacturers of special effects, moving lights, etc. as a means to also control those devices.

DMX is a serial digital protocol.  If you’ve used computers for a long time and are familiar with modems then the concept is very similar.  Your lighting console will send one control signal down the DMX cable, followed by the second one, followed by the third one, and so on until all the data has been sent.  Once all the data has been sent the console simply repeats itself and starts sending out the first control signal again.  This happens quite rapidly – the default rate for DMX is 250 Kbaud or 250 thousand bits of data per second.

Why “512”?
The 512 in DMX512-A corresponds to the number of control signals the protocol supports. A single DMX cable can carry 512 individual signals, so if you have a lighting console connected to a dimmer pack via a DMX cable then that cable can control a maximum of 512 dimmers.  It is possible to split a DMX cable (more on this below), but each split would carry the exact same 512 channels of data as the source cable.

So a single DMX cable (or a cable split to run to multiple devices) would be capable of controlling any one of the following:

  • 512 individual lighting dimmers
  • 32 intelligent lights that require 16 channels each
  • 256 dimmers, each of which has a light plugged into it and an individually controlled color scroller attached to the light
  • Any combination of the above in which the total number of channels required is less than or equal to 512

The number 512 is easily represented in binary (512 = 2^9 = 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 = hex 200, etc).  As such it provides an easy protocol for devices like lighting consoles (which are essentially just glorified computers) to work with them.

What exactly is a DMX channel?
A channel is simply one of the 512 control signals in the DMX512-A protocol.  As it is a digital protocol, each channel is represented by 8 bits.  Those 8 bits represent a value between 0 and 2^8 or 256.  Most lighting consoles will abstract those values to a range between 0 and 100%.  Newer and more feature-rich consoles will provide an option to let you view and work with DMX channels in either decimal (0-100%) or hexidecimal (0-255) depending on your needs.

So to summarize everything from above, DMX-512 is a protocol running at 250 Kbaud that transmits up to 512 8-bit values repetitively.  (If you only use 100 channels then only those 100 8-bit values are transmitted.)

What is a DMX universe?
A single DMX universe, at the most basic level, is just a single DMX cable that carries 512 channels of data.  More specifically, a DMX universe is a single DMX network.  If a single DMX cable is run out of a lighting console and then split (see below) into multiple other cables, then all those cables make up a single DMX universe.  They all carry the exact same DMX data.

Many lighting consoles have the ability to control multiple DMX universes.  If a lighting console supports two or more universes then you will find two or more DMX connectors on the back of the console.  They will be labeled something like “DMX universe 1”, “DMX universe 2”, etc. or “DMX 1-512”, “DMX 513-1024”, etc.

So exactly how many devices can DMX control?
This actually depends on the lighting console you have.  If the console only supports a single DMX universe then it can control a maximum of 512 independent single channel devices.  If you want to control 16 channel devices then a single universe can control only 32 devices (512/16 = 32).  Obviously if your lighting console supports multiple universes then the number of devices you can control increases.

If you only have a single universe it still doesn’t mean you can control only 512 devices.  Suppose you have a setup where you have ten different Red/Green/Blue LED lights.  Each light takes 3 channels, one for the intensity of each color.  If you want to control those 10 lights independently then you would need 30 channels.   However suppose you wanted all ten of those devices to always work exactly the same (perhaps they’re all providing a uniform wash on a stage).  If that’s the case then you can set all ten of those lights to the same DMX address, and they will all respond identically.  In this setup you only end up using 3 channels instead of 30.

You can have a virtually unlimited number of devices that are all set to respond to the DMX channel if desired.  This isn’t always desired, but in certain cases it can be very useful.  It’s not uncommon to see multiple color scrollers set to the same DMX channel if they’re used for color washes.  So between consoles that support multiple universes and setting multiple devices to the same DMX channel you can control a virtually unlimited number of devices.

DMX cables & connectors
The DMX protocol physically requires 3 individual wires within a DMX cable.  These are identified as:

  • Data common
  • Data +
  • Data –

The Data + and Data – are simply complements of each other, so if the Data + line has a voltage of +1 volt when compared to the common then the Data – line will have a voltage of -1 volt.  If you look at the DMX512-A specification or other websites that discuss DMX you will find references to a second pair of Data + and Data – lines that are considered optional.  These are considered optional as they are not actually used in typical DMX environments.  Some devices may make use of them, but if they do then it’s not in any standardized way.

The specification for DMX is very specific with respects to the connectors and cables that should be used.  Unfortunately many liberties have been taken over the years that has muddled the waters as far as both cables and connectors go. The DMX specification stipulates that 5-pin XLR connectors be used, and the vast majority of professional lighting consoles, dimmers, etc. all use 5-pin XLR connectors despite the fact that only 3 pins are used.  Among other things, the use of 5-pin connectors helps to prevent you from accidentally plugging a lighting console or dimmer pack into a 3-pin audio XLR cable.  If that audio cable is connected to an audio mixer that provides a phantom power supply of 48 volts (used by microphones) then you could burn out part of your console, dimmers, etc.

The DMX specification also stipulates that cable that adheres to the RS485 standard be used.  Cable designed to this specification can carry digital signals over long distances in electrically noisy environments. Standard shielded microphone cable is not RS485 rated so it should not be used.  Some examples of RS485 cable include Belden 9841, Belden 9842, and Alpha 5274 among others.  A quick Google search for those will find plenty of sources for them.

Unfortunately (or fortunately depending on your perspective) some manufacturers of intelligent lighting effects realized early on that despite not being approved by the DMX512-A specification, that regular microphone cable can actually carry a DMX signal for short (50 feet or so) runs.  They also realized that traveling disk jockeys already likely have lots of microphone cable so to cater to their needs they started developing and selling DMX controlled party lights using 3-pin XLR connections.  Today you can find lots of 3-pin intelligent lights from a wide range of companies like American DJ, Chauvet Lighting, and even Martin and many others.

Because of the prevalence of lighting gear that require 3-pin XLR connections it’s a good idea for any lighting designer to have at least a few 3-pin to 5-pin adapters.  You can make them yourselves – just connect pin 1 to pin 1, 2 to 2, and 3 to 3, leaving pins 4 and 5 on the 5-pin side unused.

Splitting DMX cables
Simply making a ‘Y’ connector out of three XLR connectors is a BIG no-no.  Depending on the quality of the cable you use and the length of each leg of the “Y” you will likely have some of the DMX signal reflect back down to the junction and out the other leg, resulting in what can best be described as schizophrenia by your DMX devices.  They will start behaving in extremely unpredictable ways due to the “leak” of the signal from one leg to the other.

If you need to split a DMX signal (and it’s a very common need) the right way to do it is with a device known as an optical splitter.  This is a device that you plug a single DMX cable into and it may have 2, 4, or many more DMX outputs that each mirror the signal on the input line.  Each of the outputs is electrically isolated from the others using optical isolators which prevent reflections from one leg impacting any of the other legs.  Examples of DMX optical splitters can be found here, here, and here among others.

One nice feature of some DMX splitters is that they  support both 3-pin and 5-pin XLR connectors, meaning that they can be used not only as splitters but converters as well.

Terminating DMX cable runs
The same signal reflections described above when splitting a DMX cable using a “Y” connector can happen on a single un-split run of DMX cable if it is long enough.  To prevent this from happening it is good practice to always attach a DMX terminator to the end of each DMX run.  A DMX terminator is simply just an XLR connector with a resistor attached between pins 2 and 3.  You can make your own DMX terminators very easily or even add an LED or two in order to make a useful DMX tester.

You may quickly find that sometimes termination doesn’t seem to be important, especially with shorter cable runs.  But if you see even the slightest odd behavior in your devices then it is strongly suggested that you add a terminator and also make sure your DMX cables are of the right type and not damaged in any way.  Lots of problems can be traced to dirty DMX signaling caused by a lack of termination and/or faulty cables.

Some devices will have DMX termination built into them.  Check the devices manual to see if it does, and if so how to enable or disable it as needed.  Usually this is just a switch you can turn on or off as needed.  If a device does provide built-in termination then make sure it’s disabled unless you need it (the device is the last one in a DMX chain).

DMX Addressing
Any device that uses DMX must have a way to specify the DMX channel(es) that it will respond to.  This is typically referred to as the “starting address”, and for simpler devices like color scrollers it is usually set by a series of rocker switches or dial switches.  Rocker switches are used to add together the binary values 1, 2, 4, 8, 16, etc. into the desired value.  Dial switches let you pick the values 0-9 to specify a three digit value.  More sophisticated devices like robotic lights will typically have a control panel with menu options that let you set the channel with a few button presses.

In all these cases what you are setting is just the first address that the device will respond to.  If a device only uses one address then it’s easy enough to keep track of.  If a device requires more than one address, such as a four channel portable dimmer pack, then the address you specify plus three more would be used by that device.  So if you specify channel 132 for a four channel dimmer pack then 132 controls the first dimmer, 133 controls the second, 134 the third, and 135 the fourth.  The “fancier” the device the more channels it is likely to use, and a different number of channels may be used depending on how you program the device.  A robotic light may use 16 channels in one mode but 20 in another.  It is critical that you keep track of how many DMX channels each device you have uses and make sure you don’t accidentally overlap channels.  If you overlap channels across two devices you’ll likely get very unpredictable results.

It is possible, and perfectly reasonable, to assign the same DMX address to multiple devices.  Suppose you have 6 fixtures that provide a wash across your stage and each of those fixtures has a color scroller attached to it.  If you know for certain that you’ll always want those 6 fixtures to use the same colors at the same time then you can set all those scrollers to the same DMX address and they will all scroll in unison.  However if you want to wash half of your stage in red and half in blue then you might need to assign three scrollers to one channel and three to another.  If you need to independently control all of them then you’d need to assign them six different channels.

Working with color scrollers and other common devices
Color scrollers are one type of device that DMX is well suited for and fairly easily to understand.  A typical color scroller uses a single DMX channel to adjust the positioning of a scroll of gels in front of a stage light.  Depending on the type of scroller it may have 8, 16, or some other number of colors in the gel scroll.   A DMX value of 0 will display the first color in the gel scroll, and a value of 100% or 255 (2^8) will display the last color in the gel scroll.  By adjusting the DMX value you can “dial in” any color on the scroll.

[Note: There are vendors who sell different types of scrollers that use two scrolls of gel to create a wide mix of colors.  If you are just getting started in working with scrollers make sure you know what you’re using.]

A DMX cable by itself is incapable of providing the power required to operate a color scroller.  Some scrollers, mostly older ones, plug directly into an AC line, which means that you would need to run both power distribution and DMX to each scroller you use.  This, needless to say, is a real pain.  Most modern scrollers as well as many other devices (DMX irises, moving mirrors, etc.) now get their power from a standardized power supply.  A Power Supply Unit, or PSU, takes both an AC line input and a DMX input, and combines them into a single output on a 4-pin XLR cable.  Different sized PSU’s can power a different number of devices.  Make sure you don’t overload a PSU with too many devices.  Using 4-pin cable you can daisy-chain a number of devices like scrollers, mirrors, and irises together.  On more than one occasion I have created a “poor mans” intelligent light by attaching a scroller, iris, and moving mirror to a Source 4 fixture, and having to daisy chain only a single cable among those devices makes it that much easier to manage.

The 4-pin cable that runs from a PSU to scrollers and other devices is a very special type of cable, so don’t go making your own unless you’re absolutely certain you know what you are doing.  Two of the pins provide power and two provide the DMX signal, using the negative power lead as a common.  The two power leads are 14 AWG and the DMX leads are 22 AWG, with slightly different characteristics to a standard DMX cable.  So be very careful if you are going to make your own cables.

Important: As mentioned above, some vendors sell different types of scrollers that work in slightly different ways than conventional scrollers.  These scrollers, and other devices, also make use of 4-pin XLR cables to connect power and data from a PSU to the device.  However these PSU’s are incompatible with the PSU’s used by conventional scrollers despite appearing to function identically and using the same 4-pin cables.  The Wybron CXI scroller is one example of a scroller that uses a custom power supply.

8-bit and 16-bit Addressing
If you ever work with devices like robotic lights or moving mirrors you will have to understand the difference between 8-bit and 16-bit addressing.  As mentioned earlier, each DMX channel provides 8 bits of data, or a value between 0 and 255.  But suppose you have a robotic light or a mirror that can pan around an entire 360 degree circle.  Mapping the range of 0-255 to 360 degrees means that for each value you would have to move the fixture more than 1.4 degrees.  For a very short throw that may not seem like very much, but if you want that light to have a 25 foot throw then each of the 255 steps would correspond to 8 inches of movement.  Not many lighting designers would approve of that!

In order to provide better control over actions like panning and tilting intelligent lights, moving mirrors, etc. they typically combine two DMX addresses together for each parameter (pan and tilt).  By combining two DMX addresses together you jump from 8-bit (0-255) to 16-bit (0-65,535) resolution, which gives you much more control over the positioning of the fixture.

Some devices like the Rosco I-Cue mirror let you specify if you want the pan and tilt parameters to use 1 channel (8-bit) or 2 channels (16-bit), so depending on how you configure the device it may use 2 or 4 channels.

DIY Portable Fake Fire Effect

Flame lights like the Le Maitre “Le Flame” and the Chavuet “Bob” are pretty decent flame effects, but there’s one small problem with them, and that’s that they have to be plugged into a power source.  A couple years ago I helped a theater put together a portable fire effect since their show called for an actor to carry around a metal trash can that he would eventually “burn” some paper in.  Unfortunately I didn’t take any photos of what we put together, but I’ll run down it here since it’s relatively straightforward.

The key to a good portable fire effect is having a decent power source.  Most modern theaters likely have one readily available, and if the theater doesn’t then you’re bound to find that you or a friend already has one.  Here’s a hint:

dewalt-12v-cordless-drill

The battery pack from most cordless tools should provide you with an excellent power source.  The reason you want to use a battery pack like this is because you need a compact power source that provides enough current to power both a fan and multiple halogen lights.  Since these batteries provide enough current to provide decent torque for drilling, sawing, etc. then it’ll also power a fan & lights without any problems.  On top of the battery pack you’ll want a few other things:

  • One or two 12 or 24 volt (depending on your power source) MR-16 halogen bulbs, either clear or red/orange.
  • A 12-volt fan.  You can cannibalize one from an old PC or buy one from a local computer supply store.
  • A piece of very light white fabric, preferably silk.  If you don’t have any readily available you can buy replacement silk for commercial fire effects for about $10.  Google will provide you with plenty of sources.
  • Some wire, a small switch, and a couple alligator clips.
  • Whatever you want to mount the fire effect in (a small trash can, etc. or even just a small framework that can be easily moved).

Simply mount the fan in the trashcan about two inches below the lip. Make sure it’s mounted so the airflow is upwards, out of the trash can.  You’ll also want to mount a couple of fins on opposing corners of the fan in such a way that they partially disrupt the airflow of the fan.  If you don’t do this then when you turn on the fan the silk will simply stand straight up in the column of air coming from the fan and won’t look like a natural flame at all.

Once you have the fan mounted I suggest you hook it up to the battery and test the silk. If you bought a replacement silk for a commercial flame effect then it likely has magnets glued to its base that you’re supposed to use to attach it to the flame effect.  If you used pieces of metal for your fan fins then you should be able to attach the silk directly to them.  You may need to cut the silk to fit your needs, and also spend some time adjusting the fins to ensure the silk flutters sufficiently to look like a realistic flame.

Mount the MR-16 lights on opposing sides, angled inward to a point towards the silk.  If you have white bulbs then you’ll probably also want to attach some colored  gel to the lights.  Wire the bulbs and fan in parallel, routing them through a switch.  Mount the switch somewhere around the lip of the trashcan where it can be easily flipped by an actor without being seen.  Use alligator clips to connect the appropriate leads from the fan/lights and the switch to the battery and you should be all set.

One word of warning: The 12-volt MR-16 halogen bulbs can get hot very quickly.  Make sure they’re properly insulated and also make sure anybody handling the flame when in use is aware that they’ll heat up.

DIY Fake Fireplace Effect

I recently was asked to put together a fake fire effect for a small community theater. They wanted a fireplace full of burning embers, not a full flame effect that can be done with flame lights.  To create this effect you basically need two things: a light source that flickers like a flame and something translucent that looks like burning embers that will flicker in the light.

I initially did some searching for fire glass to see if there were any readily available products to simulate burning embers, but didn’t have any luck finding anything that looked realistic enough.  Eventually I came up with the idea of trying to make my own, and with a little more research I came across a handy tutorial that demonstrates how to make fake ice cubes out of plastic.  I ended up using that as a template for making my own fake burning embers, expanding on the concept by including colored plastic in my fake ice cubes.  Here’s a quick tutorial:

Go to your local hobby shop and purchase some clear plastic beads.  Kyle, the guy behind the ice cube tutorial bought his at WalMart.  I found mine at AC Moore, a craft store chain with stores all along the East Coast.

Beads

Get some sheets of lighting gel, preferably a few different shades of orange/red.  If you don’t have a ready supply of gel then you can order some on-line from places like Production Advantage.  Depending on how much you need to make you might not need entire sheets of gel so you might want to see if you can get one or more companies to send you a sample swatch book for free.

You’ll want to shred the gel(s) into small pieces in order to mix it up with the plastic beads.  I ran a few small sheets of orange & red gels through my paper shredder:

DSC_0008

Make some forms out of aluminum foil in various shapes (you don’t want all your embers to be 100% identical).  I used things like batteries, a flashlight, and small cardboard boxes as forms, wrapping aluminum foil around them.  Then fill the form up with a mix of plastic beads and strips of the shredded gel.  Don’t overdo it with the gel, at least at first.  You probably want to experiment a bit to figure out the right mix:

DSC_0019

Fill up the form with more plastic beads, then place it in an oven at 400 degrees for approx. 20 minutes.  You should keep an eye on it to make sure the form doesn’t leak and the beads are melting.  If the beads aren’t fully melted after 20 minutes just leave them in the oven longer and consider turning up the heat slightly.  The gel strips have a much higher melting point (after all, they have to sit directly in front of 1000 watt stage lights for long periods of time) so don’t be surprised if they don’t melt like the beads to.  The color should still spread out throughout the mold as the beads melt.

Once the beads have melted take the mold out of the oven and give it plenty of time to cool.  Remove the foil and you should end up with a translucent block of plastic:

DSC_0023

If you’re not happy with your first attempts then don’t fret.  You can always break up the plastic blocks using a hammer and then melt them down again in new forms.  Add more beads and/or pieces of gel to get them to look more like what you want.

The next important aspect of making a good fake fire is making a good flickering light effect.  If you’re doing this in a theater and you have a good quality DMX-based lighting system you might be able to program an effect to simulate this, but that’s a lot of work and can be a hassle if it has to be added to multiple cues.  After hunting around a bit I found a product called FauxFlame which is an electrical device you wire to an incandescent light to make it flicker randomly.  I bought a couple of these to add to my inventory of lighting toys and wired them into a couple electrical boxes so I can plug any light into them that I want.

The theater had an existing hearth with a few lights mounted inside it.  I installed a couple regular household incandescent bulbs wrapped in orange/yellow gels in the hearth, then put a dozen or so plastic embers on top, along with some fake fireplace logs that were bought from a local hardware store.  The lights were plugged into a FauxFlame and the result is quite impressive.  Here are a few photos and a link to a video showing the effect in action.  The set isn’t complete yet, so pardon the appearance of the fireplace.

IMG_0163

IMG_0158

IMG_0157

IMG_0156

And here’s a video of the fireplace in action:

New Hampshire, Take 2

This last weekend Heather and I took another trip up to the Bretton Woods area of New Hampshire.  Despite a very rainy Saturday and a 24 hour power outage we managed to have a great time.  We stayed at the Mount Washington Resort, and they have a generator that powers almost everything except the actual guest rooms, so when you weren’t in your room it seemed like there was no power failure.

This time around we took the cog railway up Mt. Washington, unfortunately when there was 3 inches of ice at the summit, along with light rain and winds of 30-50 MPH.  So we just stayed in the train car at the summit.  But we still had fun.  We also did the Bretton Woods canopy tour again, and finished up the weekend with a stop at Lake Winnipesaukee and a hike up Mount Major.

Pictures from the trip are here, and videos from the canopy tour have been uploaded to Youtube.  Here are a couple of them: