CASE/LASE: The Columbia Automation Scripting Environment

1.0

Introduction

There are many different home and building automation technologies in use today. Some have a large installed base but are aging, and as a result, others, such as low-power wireless networks, are emerging as competitors. These different technologies seldom interoperate, however, and few provide substantial services for real-time data viewing or device control online. Due to high cost of capital investment and lack of interoperability with newer designs, older automation technologies can become entrenched, slowing progress toward systems with improved reliability and efficiency, easier extensibility, and better accessibility and visibility to activities in the home or building. CASE is a software design which takes direct aim at these issues. CASE can interface with multiple automation networks in a building via network bridges and allow exchange of data and interaction between devices on these different networks. A common device model is presented in a JavaScript environment, abstracting away the original underlying automation network. CASE can accept commands for this common model from upstream software (such as a web server) to provide accessibility to building automation data and services online.

Install

CASE is available as binary RPMs for Linux x86 machines, and as a .tar.gz file for other systems.

RPM file installation

Install via RPM is a done as usual:

sudo rpm -i lase-1.0-1.i586.rpm

Tar file installation

Untar the file in a directory of your choosing. It will create a lase-1.0 subdirectory. Move to the lase-1.0 subdirectory and type:

./build.sh
sudo ./install.sh

Setting up automation bridges

Currently supported bridges include:

These bridges are both USB devices that enumerate as virtual COM ports. On one hand this is convenient because there are no drivers to download or install. On the other hand, you must tell CASE where to find these bridges on your system. When plugging the device in, you should be able to see what COM device file was added by typing:

dmesg | tail

This is likely to be /dev/ttyUSBX or /dev/ttyACMX where X is an integer from 0 to 127.

To tell CASE about the bridge, use the lase-bridge-cfg.pl utility. For example, for an Insteon bridge you might type something like:

lase-bridge-cfg.pl --add Insteon --device /dev/ttyUSB0

This will autodetect the bridge address, and setup CASE to automatically connect to it on startup.

Adding a ZigBee bridge would be similar:

lase-bridge-cfg.pl --add ZigBee --device /dev/ttyACM0 --args "channel=11;panId=0xCAFE;"

This will detect the ZigBee bridge on /dev/ttyACM0, tell CASE to connect to it on startup, and have it form a network on channel 11, with panId 0xCAFE.

If any bridge startup parameters change after you have added it, you can change them by invoking lase-bridge-cfg.pl in update mode. For example, if the Insteon bridge decides to enumerate at a different port, you could say:

lase-bridge-cfg.pl --update insteon0 --device /dev/ttyUSB4

Note:
With --add you specify a network type, but with --update you must specify a particular bridge device name.
See also:
sc_zigbeeBridge_formNetwork for more information about the frequency channel and panId parameters for the ZigBee network.

Running CASE

Running CASE is very simple. It can be invoked from a terminal as:

lased

with no command line arguments. It will then attempt to connect to any bridges that have been setup and listen on both the command line and on a local socket at:

/var/lib/lase/lase.sock

for JavaScript commands.


doxygen