Skip to content

Commit

Permalink
Support Iris contact sensor 3320-L (#159)
Browse files Browse the repository at this point in the history
* Add Iris 3326-L motion and temperature sensor

* Add support for Iris 3326-L motion/temp sensor

* Support for Iris contact sensor model 3320-L

* Support Iris contact sensor model 3320-L

* Update fromZigbee.js

* Update devices.js
  • Loading branch information
johnnyletrois authored and Koenkk committed Dec 4, 2018
1 parent c27335f commit e288189
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
7 changes: 7 additions & 0 deletions converters/fromZigbee.js
Original file line number Diff line number Diff line change
Expand Up @@ -951,6 +951,13 @@ const converters = {
return {power: msg.data.data['activePower'] / 10.0};
},
},
iris_3320L_contact: {
cid: 'ssIasZone',
type: 'statusChange',
convert: (model, msg, publish, options) => {
return {contact: msg.data.zoneStatus === 36};
},
},
nue_power_state: {
cid: 'genOnOff',
type: 'attReport',
Expand Down
17 changes: 17 additions & 0 deletions devices.js
Original file line number Diff line number Diff line change
Expand Up @@ -1537,6 +1537,23 @@ const devices = [
execute(device, actions, callback);
},
},
{
zigbeeModel: ['3320-L'],
model: '3320-L',
vendor: 'Iris',
description: 'Contact sensor',
supports: 'contact',
fromZigbee: [fz.iris_3320L_contact],
toZigbee: [],
configure: (ieeeAddr, shepherd, coordinator, callback) => {
const device = shepherd.find(ieeeAddr, 1);
const actions = [
(cb) => device.write('ssIasZone', 'iasCieAddr', coordinator.device.getIeeeAddr(), cb),
(cb) => device.functional('ssIasZone', 'enrollRsp', {enrollrspcode: 0, zoneid: 23}, cb),
];
execute(device, actions, callback, 1000);
},
},

// ksentry
{
Expand Down

0 comments on commit e288189

Please sign in to comment.