From 657ee787d140b7d08fa5182db3855234e2da2c08 Mon Sep 17 00:00:00 2001 From: jonnycastaway Date: Wed, 20 Feb 2019 22:48:36 +0100 Subject: [PATCH 1/2] Update devices.js Added support for the new Philips Hue Outdoor Motion Sensor --- devices.js | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/devices.js b/devices.js index 810a4001e5476..ffabd67d7a3b0 100644 --- a/devices.js +++ b/devices.js @@ -860,7 +860,41 @@ const devices = [ execute(device, actions, callback); }, }, + { + zigbeeModel: ['SML002'], + model: '9290019758', + vendor: 'Philips', + description: 'Hue motion Outdoor sensor', + supports: 'occupancy, temperature, illuminance', + fromZigbee: [ + fz.hue_battery, fz.generic_occupancy, fz.generic_temperature, + fz.ignore_occupancy_change, fz.generic_illuminance, fz.ignore_illuminance_change, + fz.ignore_temperature_change, + ], + toZigbee: [tz.generic_occupancy_timeout], + ep: (device) => { + return { + '': 2, // default + 'ep1': 1, + 'ep2': 2, // e.g. for write to msOccupancySensing + }; + }, + configure: (ieeeAddr, shepherd, coordinator, callback) => { + const device = shepherd.find(ieeeAddr, 2); + const actions = [ + (cb) => device.bind('genPowerCfg', coordinator, cb), + (cb) => device.bind('msIlluminanceMeasurement', coordinator, cb), + (cb) => device.bind('msTemperatureMeasurement', coordinator, cb), + (cb) => device.bind('msOccupancySensing', coordinator, cb), + (cb) => device.report('genPowerCfg', 'batteryPercentageRemaining', 0, 1000, 0, cb), + (cb) => device.report('msOccupancySensing', 'occupancy', 0, 600, null, cb), + (cb) => device.report('msTemperatureMeasurement', 'measuredValue', 30, 600, 1, cb), + ]; + + execute(device, actions, callback); + }, + }, // Belkin { zigbeeModel: ['MZ100'], From 90350476a6eca1ddef312fb7dc24f186ee11b377 Mon Sep 17 00:00:00 2001 From: Koen Kanters Date: Thu, 21 Feb 2019 18:48:00 +0100 Subject: [PATCH 2/2] Update devices.js --- devices.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/devices.js b/devices.js index ffabd67d7a3b0..391554f5fea60 100644 --- a/devices.js +++ b/devices.js @@ -864,7 +864,7 @@ const devices = [ zigbeeModel: ['SML002'], model: '9290019758', vendor: 'Philips', - description: 'Hue motion Outdoor sensor', + description: 'Hue motion outdoor sensor', supports: 'occupancy, temperature, illuminance', fromZigbee: [ fz.hue_battery, fz.generic_occupancy, fz.generic_temperature, @@ -895,6 +895,7 @@ const devices = [ execute(device, actions, callback); }, }, + // Belkin { zigbeeModel: ['MZ100'],