1.0.4 • Published 8 years ago

npm-domintell-client v1.0.4

Weekly downloads
1
License
ISC
Repository
-
Last release
8 years ago

Domintell Client

This client is an adapter to the API provided by http://www.domintell.com/gb/products/ethernetinternet-communication-module-light-protocol

Bear in mind that this adapter is not complete and only implements a few modules such as dimmers (DIM), Shutters (TRV), .. Note that this software is only useful when having access to a DomIntell installation.

Getting started

login

A DETH02 or any other module that runs the 'light protocol' runs by default on port 17481. If this port is

const domi = di.connect('192.168.1.100');
// or specify a port: di.connect('192.168.1.100', 17482);
domi.login();

This client uses npm event emitters to communicate information that appears on the domintell bus to the client. On succesful login, a 'session_opened' event is emitted. Listen for this event as follows

domi.on('session_opened', () => {
  // do something 
});

APPINFO

The method appinfo returns information about all installed modules. Invoke 'APPINFO' after succesful login as follows:

domi.appinfo();

Next listen for module information. As Domintell does not return module information synchronously, but rather puts it asynchronously on the bus, it was decided to emit these descriptions through events.

domi.on('appinfo', (jsonFrame) => {
  console.log(JSON.stringify(jsonFrame));
  //prints : {"modType":"BIR","serialNumber":"518E-6","description":"LED television","room":"[House|First floor|Living room]"},
});

BIR

Modify the state of the two-pole relay. The example below toggles output 8 of the module with hex id '5812'. If the light was on, it will be switched off.

domi.bir('5812-8');
1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago