Skip to content

Commit

Permalink
Added support for Salus SP600 Smart Plug (#248)
Browse files Browse the repository at this point in the history
* Add support for Hive HALIGHTDIMWWB22 (Bayonet mount)

* Update devices.js

* Added support for Salus SP600 Smart Plug

* Salus SP600: Fix indentation

* Rename EDP_power to generic_power
  • Loading branch information
MarkAdamson authored and Koenkk committed Jan 28, 2019
1 parent 4cdac16 commit 76df7ed
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
2 changes: 1 addition & 1 deletion converters/fromZigbee.js
Original file line number Diff line number Diff line change
Expand Up @@ -982,7 +982,7 @@ const converters = {
return result;
},
},
EDP_power: {
generic_power: {
cid: 'seMetering',
type: 'attReport',
convert: (model, msg, publish, options) => {
Expand Down
26 changes: 24 additions & 2 deletions devices.js
Original file line number Diff line number Diff line change
Expand Up @@ -794,7 +794,7 @@ const devices = [
vendor: 'EDP',
description: 're:dy plug',
supports: 'on/off, power measurement',
fromZigbee: [fz.ignore_onoff_change, fz.EDP_power, fz.ignore_metering_change],
fromZigbee: [fz.ignore_onoff_change, fz.generic_power, fz.ignore_metering_change],
toZigbee: [tz.on_off],
configure: (ieeeAddr, shepherd, coordinator, callback) => {
const device = shepherd.find(ieeeAddr, 85);
Expand Down Expand Up @@ -1107,7 +1107,7 @@ const devices = [
description: 'Active plug',
supports: 'on/off, power measurement',
fromZigbee: [
fz.generic_state, fz.ignore_onoff_change, fz.EDP_power, fz.ignore_metering_change,
fz.generic_state, fz.ignore_onoff_change, fz.generic_power, fz.ignore_metering_change,
fz.generic_temperature, fz.ignore_temperature_change,
],
toZigbee: [tz.on_off],
Expand Down Expand Up @@ -2216,6 +2216,28 @@ const devices = [
description: 'Tint LED bulb GU10/E14/E27 350/470/806 lumen, dimmable, opal white',
extend: generic.light_onoff_brightness_colortemp,
},

// Salus
{
zigbeeModel: ['SP600'],
model: 'SP600',
vendor: 'Salus',
description: 'Smart plug',
supports: 'on/off, power measurement',
fromZigbee: [fz.generic_state, fz.ignore_onoff_change, fz.generic_power, fz.ignore_metering_change],
toZigbee: [tz.on_off],
configure: (ieeeAddr, shepherd, coordinator, callback) => {
const device = shepherd.find(ieeeAddr, 9);
const onOff = {direction: 0, attrId: 0, dataType: 16, minRepIntval: 0, maxRepIntval: 5, repChange: 0};
const actions = [
(cb) => device.foundation('genOnOff', 'configReport', [onOff], foundationCfg, cb),
(cb) => device.bind('genOnOff', coordinator, cb),
(cb) => device.report('seMetering', 'instantaneousDemand', 1, 5, 1, cb),
];

execute(device, actions, callback);
},
},
];

module.exports = devices.map((device) =>
Expand Down

0 comments on commit 76df7ed

Please sign in to comment.