Interstacks:  End-User "Scripting" for Hardware

Peter Lucas
MAYA Design Group
2100 Wharton Street, Suite 702
Pittsburgh, PA15203USA
412-488-2900
lucas@maya.com

More and more consumer and commercial products contain at least one microprocessor. A modern home may have an elaborate security system, an entertainment center, various corded and cordless communication devices, electronic lighting and heating controls, and many other electronic and electromechanical devices.Similarly, in a multimedia classroom, museum exhibit, or conference room, there may be a need to control lighting, motorized window drapes, multiple VCRs, video projectors, and sound systems.

As a result of this proliferation of everyday devices that contain microprocessors, there is a growing need to control and partially automate the use of these devices in a way that is simple, consistent, and convenient for the user.

The work described in this demonstration represents an effort to empower even non-technical users to integrate bits of specialized hardware in order to automate and control the flow of information among electronic devices. The Interstacks project began with the questions: How could the notions of component architectures and end-user scripting be reinterpreted in the domain of hardware devices?How can we empower users to string together bits of specialized hardware without having to worry about such things as fan outs and despiking capacitors?

Interstacks is composed of a series of modules that can be plugged together in any combination and number.Plugged directly into each other rather than into a common backplane, the modules make a bus capable of passing data and multimedia information among the modules in arbitrary combinations.Such a collection of interconnected modules is known as a "stack."

Modules can be used in many different configurations, ranging from only one or two sitting on a desktop or attached to a controlling device, up to a large number of modules mounted on a wall or an equipment rack.The "scripting" interface to Interstacks is implemented as a PC application that implements a highly intuitive direct-manipulation environment.This environment combines a visual programming scheme with a simple, declarative scripting language.

I will demonstrate how we can plug together a set of Interstacks modules and use this development environment to "script" complex sets of behaviors among a diverse set of external devices.

Getting Started

We begin by plugging together a physical stack of modules that includes a base module connected to a PC.The computer interprets from the base module which modules are in the stack and then renders them graphically on the interface.These rendered modules are directly manipulable, and we can establish message paths from module to module simply by dragging virtual "wires" among them.Arithmetic and logical operations can be implemented by using simple "script" modules, which are logically identical to proxy modules, but are implemented in software and have no physical module behind them.

The X-10 Module

If we drag the X-10 module from the stack and double click, it opens to reveal two controls -one for "lights on" and another for "lights off." Further, each has a message input terminal that we'll use later to connect them to other modules using virtual "wires."For now, we'll press the lights on button to turn the light on (lamp goes on) and press the lights off button to turn the light off (lamp goes out).

Interoperation of Disparate Devices

The main goal of this demonstration, however, is to show how easily Interstacks allows disparate devices to interoperate.

I select an IR receiver module, open it, and point a random remote control at it.It detects what kind of remote control it is, and renders the button from that remote on the screen.This IR has two input terminals and one output terminal.The input terminals enable and disable the IR, and the output terminal generates messages whenever a button on the remote control is pressed.

We're going to take the output of the IR receiver and connect it to the "lights on" input terminal.Now, when I press any button on the remote, the light goes on.

We have not yet created a way to turn the lights off.To remedy that, we will take two copies of scripting modules, which act as filters.The first one outputs the message when it receives a message whose value is number 1; the second outputs a message when it receives a message whose value is 2.I connect the output of the IR receiver to both of those filters so that any message goes to both, and each one ignores everything except the message that it's programmed to respond to.I take the output of number 1 and connect it to the lights on the input of the X-10 module, and I connect the output of number 2 so that the output goes to the lights off terminal of the input module.

Now when I press 2, the light goes off, and when I press 1, the light goes on.

Next, I'm going to drag a new module, which is the telephone module.The telephone module has multiple inputs and outputs.For instance, it can make the phone ring.This is the first example of an audio module.Interstacks has 16 channels of audio and four channels of video.

It also has several outputs.One detects "on hook" and one "off hook."What's interesting for this demo is that the telephone module has a keypad that is a DTMF keypad.Through Interstacks, we have made IR and DTMF logically identical.To prove this, I'll take the DTMF output and connect it to the input of the same two filters that are filtering the digits coming from the IR receiver, and the very same filters will filter the digits coming from the telephone receiver.

Now, if I pick up the telephone and press the number 1 on the keypad, the light will go on (light goes on).If I press the number 2 on the keypad, the light will go off (light goes off).What we have done is connect IR and DTMF, which are worlds apart technologically. Interstacks makes them logically identical to the scripter.

There is also an Interstacks module that contains an audio amplifier capable of taking audio signals from one of the 16 audio channels and driving an external speaker.We can use this in conjunction with our telephone module.Take another filter so the input digit 3 coming from the telephone only, and not the IR, will turn on the audio amplifier and make the "on hook" message turn off the amplifier.Now we can pick up the phone, and press 3 to enable the audio amplifier.We have created a paging system.When I hang up the phone, the "off hook" message disables the amplifier.

In addition to output keypads, there can also be input keypads.The home-security panel has two keypads, one for the front door and one for the back.There is an Interstacks module that emulates the electronics of those keypads. If I want all of the DTMF digits to go to the security panel, I simply fan out or wire the output of the telephone keypad to the input of the security device.I'll do the same with the IR.Now I can use either my remote control or my telephone to arm the security system.However, to eliminate possible interference with pressing the keys to the security pad, I'm going to change the filters for the lighting control to require a * prefix.

A Complex Integrated System

The final example shows an integrated system that uses the telephone module and the IR module to control both the lights and a home theater.To control the home theater, there's an editing protocol that lets us have full control over a SONY VCR or camcorder via a hardwired connection.Press "play" to cue the tape, and press "pause" to pause it.I have filters that implement the basic VCR controls, and I have both the telephone and IR connected to filters that are implementing controls such as "rewind," "stop," "play," and "fast-forward."

In addition, I'm going to connect the "off hook" message from the telephone and put that both on "pause" and "lights on," and take "on hook" and put that on both "play" and "lights off."If the phone rings, the tape stops, and the lights go on.When I hang up, the lights go off, and the tape continues.

What we have demonstrated with Interstacks is the reinterpretation of component architecture and end-user scripting in the domain of hardware devices