texecom-connect v0.1.7
texecom-connect
A set of unofficial APIs for working with Texecom Connect-capable security systems in Node.js.
Serial & Network connectivity are both supported for all Elite products supporting the Texecom Connect protocol.
Installation
Using yarn
:
yarn add texecom-connect
Using npm
:
npm install texecom-connect
Usage
Communications is separated into an abstraction layer - Transport
s, which are L1-L4 methods (I.e. Serial Port, TCP/IP...) for connecting to panels.
The first step is to create a transport:
const network = new NetworkTransport("10.10.1.1", 10001);
or for Serial:
const serial = new SerialTransport("/dev/ttyUSBSerial001");
Once a transport exists, a connection can be established using the desired protocol:
const panel = new Panel(serial);
await panel.logon("1234");
await panel.armAreas([1], AreaArmingType.FullArm);
Upon connection, unsolicited messages are automatically enabled. They can be subscribed to as an rxjs Observable:
panel.getMessages().subscribe(message => {
// Got a message from the panel
});
Interactive
texecom-connect
also includes a convenient command line REPL (Read-Evaluate-Print-Loop) interface. This is also useful for integration testing the library.
You can start the interactive mode with:
yarn start tcp://10.10.1.1:10001
You can view the help information for the REPL with:
yarn start --help
Developing & Contributing
- Fork & checkout the
master
branch andyarn install
. - Execute tests with
yarn test
. If possible, test against a working system. - Commit changes to a descriptively-named feature branch.
- Push your branch and create a pull request.
Disclaimers
This package is provided under the MIT license without warranty of any kind.
The package maintainer makes no guarantee as to the servicability/usability of the package for any given purpose.
The package is strictly unofficial and not approved, sanctioned or associated with Texecom Ltd. in any way.