Skip to content

Commit

Permalink
Sylvania/Osram: Configure BR30, A19, A19 RGBW to report on/off
Browse files Browse the repository at this point in the history
  • Loading branch information
Qosmio authored and qosmio committed Dec 25, 2019
1 parent ed25216 commit 106e312
Showing 1 changed file with 30 additions and 1 deletion.
31 changes: 30 additions & 1 deletion devices.js
Original file line number Diff line number Diff line change
Expand Up @@ -6983,6 +6983,19 @@ const devices = [
fz.ignore_diagnostic_change,
fz.ignore_genscenes_change,
]),
configure: (ieeeAddr, shepherd, coordinator, callback) => {
const device = shepherd.find(ieeeAddr, 3);
const cfgOnOff = {direction: 0, attrId: 0, dataType: 16, minRepIntval: 3, maxRepIntval: 1000, repChange: 1};
const cfgLevel = {direction: 0, attrId: 0, dataType: 32, minRepIntval: 3, 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: ['LIGHTIFY A19 RGBW'],
Expand All @@ -6995,6 +7008,19 @@ const devices = [
tz.osram_set_transition,
]),
fromZigbee: generic.light_onoff_brightness_colortemp_colorxy.fromZigbee,
configure: (ieeeAddr, shepherd, coordinator, callback) => {
const device = shepherd.find(ieeeAddr, 3);
const cfgOnOff = {direction: 0, attrId: 0, dataType: 16, minRepIntval: 3, maxRepIntval: 1000, repChange: 1};
const cfgLevel = {direction: 0, attrId: 0, dataType: 32, minRepIntval: 3, 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: ['LIGHTIFY A19 ON/OFF/DIM', 'LIGHTIFY A19 ON/OFF/DIM 10 Year'],
Expand All @@ -7017,10 +7043,13 @@ const devices = [
]),
configure: (ieeeAddr, shepherd, coordinator, callback) => {
const device = shepherd.find(ieeeAddr, 1);
const cfgOnOff = {direction: 0, attrId: 0, dataType: 16, minRepIntval: 5, maxRepIntval: 300, repChange: 1};
const cfgOnOff = {direction: 0, attrId: 0, dataType: 16, minRepIntval: 3, maxRepIntval: 1000, repChange: 1};
const cfgLevel = {direction: 0, attrId: 0, dataType: 32, minRepIntval: 3, 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);
Expand Down

0 comments on commit 106e312

Please sign in to comment.