mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2024-11-16 18:39:09 -07:00
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
This commit is contained in:
parent
9f16f99424
commit
c6011c0911
@ -6,46 +6,10 @@
|
||||
const Ziee = require('ziee');
|
||||
const Zive = require('zive');
|
||||
const cieClusters = new Ziee();
|
||||
// Direction-Value 1: input, 2: output, 3: input/output
|
||||
|
||||
cieClusters.init('genBasic', 'dir', {value: 1}); // Server Side(Input)
|
||||
cieClusters.init('ssIasAce', 'dir', {value: 1}); // Server Side(Input)
|
||||
// IasZone Cluster-Init Direction
|
||||
cieClusters.init('ssIasZone', 'dir', {value: 2}); // Client Side(Output)
|
||||
cieClusters.init('ssIasWd', 'dir', {value: 2}); // Client Side(Output)
|
||||
cieClusters.init('genIdentify', 'dir', {value: 3}); // Server and Client Side(Input/Output)
|
||||
|
||||
// Init Attributes Access Control
|
||||
cieClusters.init('genBasic', 'acls', {
|
||||
zclVersion: 'R',
|
||||
hwVersion: 'R',
|
||||
manufacturerName: 'R',
|
||||
modelId: 'R',
|
||||
dateCode: 'R',
|
||||
powerSource: 'R',
|
||||
locationDesc: 'RW',
|
||||
physicalEnv: 'RW',
|
||||
deviceEnabled: 'RW',
|
||||
});
|
||||
|
||||
cieClusters.init('genIdentify', 'acls', {
|
||||
identifyTime: 'RW',
|
||||
});
|
||||
|
||||
// Init Attributes Value
|
||||
cieClusters.init('genBasic', 'attrs', {
|
||||
zclVersion: 1,
|
||||
hwVersion: 1,
|
||||
manufacturerName: 'sivann inc.',
|
||||
modelId: 'hiver0001',
|
||||
dateCode: '20170407',
|
||||
powerSource: 1,
|
||||
locationDesc: ' ',
|
||||
physicalEnv: 0,
|
||||
deviceEnabled: 1,
|
||||
});
|
||||
|
||||
cieClusters.init('genIdentify', 'attrs', {
|
||||
identifyTime: 0,
|
||||
});
|
||||
|
||||
// Init Command Response Handler
|
||||
cieClusters.init('ssIasZone', 'cmdRsps', {
|
||||
@ -53,5 +17,7 @@ cieClusters.init('ssIasZone', 'cmdRsps', {
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user