zigbee2mqtt/lib/zapp/cie.js
Oli c6011c0911 simplify the cies for ias (#1387)
* simplify the cies for ias

minimize the code for the cies for ias stuff to be as short as it need.
add some comments.

* fix eslint build error
2019-04-09 18:23:55 +02:00

24 lines
898 B
JavaScript

/**
* This is a fake cie app which makes it possible for some iAS devices to join the network.
* Based on: https://github.com/zigbeer/zapp-cie
*/
const Ziee = require('ziee');
const Zive = require('zive');
const cieClusters = new Ziee();
// Direction-Value 1: input, 2: output, 3: input/output
// IasZone Cluster-Init Direction
cieClusters.init('ssIasZone', 'dir', {value: 2}); // Client Side(Output)
// Init Command Response Handler
cieClusters.init('ssIasZone', 'cmdRsps', {
enrollReq: (zapp, argObj, cb) => {},
statusChangeNotification: (zapp, argObj, cb) => {},
});
// Create Zive with profId: 0x0104 (Decimal: 260 / HA), devId: 0x0400 (Decimal: 1024 / iasControlIndicatingEquipment)
// Check the Values by https://github.com/zigbeer/zcl-id/wiki#5-table-of-identifiers
const cieApp = new Zive({profId: 0x0104, devId: 0x0400, discCmds: []}, cieClusters);
module.exports = cieApp;