DSC IT-100 Serial Module API Library

Enables communication with a DSC Security System via the IT-100 serial integration module.

License

License

GroupId

GroupId

com.github.kmbulebu.dsc
ArtifactId

ArtifactId

dsc-it100-library
Last Version

Last Version

0.6
Release Date

Release Date

Type

Type

bundle
Description

Description

DSC IT-100 Serial Module API Library
Enables communication with a DSC Security System via the IT-100 serial integration module.
Project URL

Project URL

https://github.com/kmbulebu/dsc-it100-java
Source Code Management

Source Code Management

https://github.com/kmbulebu/dsc-it100-java

Download dsc-it100-library

Dependencies

compile (4)

Group / Artifact Type Version
com.netflix.rxjava : rxjava-core jar 0.17.1
org.apache.mina : mina-core jar 2.0.7
org.apache.mina : mina-transport-serial jar 2.0.7
org.apache.logging.log4j : log4j-api jar 2.0-rc1

runtime (2)

Group / Artifact Type Version
org.bidib.jbidib.org.qbang.rxtx : rxtxcomm Optional jar 2.2
org.apache.logging.log4j : log4j-core Optional jar 2.0-rc1

test (1)

Group / Artifact Type Version
junit : junit jar 4.11

Project Modules

There are no modules declared in this project.

Build Status

DSC IT-100 Java Library

Introduction

This library exposes all the capabilities of the DSC PowerSeries Integration Module as a Java API. With it, you should be able to automate security system tasks and receive notifications of events.

The library is very much a work in progress. It is built using Apache MINA, a library for implementing protocols. The first pass of the API is nearly complete, and usable as is. The most common IT-100 commands and messages are implemented. The less common ones still need implemented. Data is output using the RxJava functional reactive API.

Basic Usage

Typical Serial Setup and Basic Usage

// Configure IT-100 for Serial Port Access
IT100 it100 = new IT100(new ConfigurationBuilder().withSerialPort("/dev/ttyUSB0",19200).build());

// Begin listening to IT-100 commands through an rxjava Observable
Observable<ReadCommand> observable = it100.connect();

// Print all received commands to stdout
observable.subscribe(new Action1<ReadCommand>() {

    @Override
    public void call(ReadCommand command) {
        System.out.println(System.currentTimeMillis() + " " + command.toString());
    }
		
});

// Send a status request command
it100.send(new StatusRequestCommand());

Add status polling

// Periodically send status request commands to the IT-100. The IT-100 will reply with zone status, etc.
IT100 it100 = new IT100(new ConfigurationBuilder().withStatusPolling(300).withSerialPort("/dev/ttyUSB0",19200).build());

Connect over a TCP connection (with ser2net)

// Send a Status Request Command and wait for it to completely send.
IT100 it100 = new IT100(new ConfigurationBuilder().withRemoteSocket("raspberrypi", 2000).build());

Connect to an Envisalink 3 or 4

// Configure for Envisalink
// Hostname/IP: envisalink, Port: 4025, Password: user
IT100 it100 = new IT100(new ConfigurationBuilder().withRemoteSocket("envisalink", 4025).withEnvisalinkPassword("user").build());

Shutdown

// Close the connection and port.
it100.disconnect();

Filter out commands

// Print only Zone Openings
observable.filter(new Func1<ReadCommand, Boolean>() {

    @Override
    public Boolean call(ReadCommand command) {
        return command instanceof ZoneOpenCommand;
    }
	  
}).subscribe(new Action1<ReadCommand>() {

    @Override
    public void call(ReadCommand command) {
        System.out.println(System.currentTimeMillis() + " " + command.toString());
    }
	
});

// OR...
observable.ofType(ZoneOpenCommand.class).subscribe...

Use friendly labels

// Configure Labels
Labels labels = new Labels(it100.getReadObservable(), it100.getWriteObservable());

// Labels will request and collect a list of all Labels from the IT-100. This may take up to a few seconds to complete.

// Get the label for Zone 5
System.out.println(labels.getZoneLabel(5));

Maven

This library is available via Maven Central.

<dependency>
    <groupId>com.github.kmbulebu.dsc</groupId>
    <artifactId>dsc-it100-library</artifactId>
    <version>0.6</version>
</dependency>

Gradle

compile 'com.github.kmbulebu.dsc:dsc-it100-library:0.6'

Roadmap

  • Replace RxJava dependency with a reactive-streams specification or more likely the Java 9 Flow API.
  • Identify and implement remaining DSC commands.
  • Support EnvisaLink3 or newer.

Downstream Projects

  • v3rm0n wrote an awesome Virtual Keypad using the dsc-it100-java library, Kotlin, Spring Boot, Websockets, and Angular. GitHub: virtual-keypad

References

DSC IT-100 Product Page

DSC IT-100 Developer Guide, hosted at HomeSeer

RxJava and Observables

NickNack (Project for the automation of the Internet of Things)

Versions

Version
0.6
0.5
0.4
0.3