Skip to content

Commit

Permalink
Airam Led OP A60 ZB 9W/827 E27 improvement & Airam Remote information (
Browse files Browse the repository at this point in the history
…Koenkk#196)

* Airam Led OP A60 ZB 9W/827 E27 improvement & Airam Remote information

* Update fromZigbee.js

* Update devices.js

* Update devices.js
  • Loading branch information
Kryzek authored and Koenkk committed Jan 6, 2019
1 parent 9188208 commit 40d298f
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
9 changes: 9 additions & 0 deletions converters/fromZigbee.js
Original file line number Diff line number Diff line change
Expand Up @@ -1134,6 +1134,15 @@ const converters = {
};
},
},
light_brightness_report: {
cid: 'genLevelCtrl',
type: 'attReport',
convert: (model, msg, publish, options) => {
return {
brightness: msg.data.data['currentLevel'],
};
},
},
smartsense_multi: {
cid: 'ssIasZone',
type: 'attReport',
Expand Down
24 changes: 23 additions & 1 deletion devices.js
Original file line number Diff line number Diff line change
Expand Up @@ -2107,8 +2107,30 @@ const devices = [
vendor: 'Airam',
description: 'LED OP A60 ZB 9W/827 E27',
supports: generic.light_onoff_brightness.supports,
fromZigbee: generic.light_onoff_brightness.fromZigbee,
fromZigbee: [fz.light_state, fz.light_brightness_report, fz.light_brightness, fz.light_state],
toZigbee: generic.light_onoff_brightness.toZigbee,
configure: (ieeeAddr, shepherd, coordinator, callback) => {
const device = shepherd.find(ieeeAddr, 1);
const cfgOnOff = {direction: 0, attrId: 0, dataType: 16, minRepIntval: 0, maxRepIntval: 1000, repChange: 0};
const cfgLevel = {direction: 0, attrId: 0, dataType: 32, minRepIntval: 0, maxRepIntval: 1000, repChange: 1};
const actions = [
(cb) => device.bind('genOnOff', coordinator, cb),
(cb) => device.foundation('genOnOff', 'configReport', [cfgOnOff], foundationCfg, cb),
(cb) => device.bind('genLevelCtrl', coordinator, cb),
(cb) => device.foundation('genLevelCtrl', 'configReport', [cfgLevel], foundationCfg, cb),
];

execute(device, actions, callback);
},
},
{
zigbeeModel: ['ZBT-Remote-EU-DIMV1A2'],
model: 'AIRAM-CTR.U',
vendor: 'Airam',
description: 'CTR.U remote (can only be used to control the Airam 4713407 bulb)',
supports: 'on/off',
fromZigbee: [],
toZigbee: [],
},

// Smart Home Pty
Expand Down

0 comments on commit 40d298f

Please sign in to comment.