diff --git a/lib/converters/zigbee2mqtt.js b/lib/converters/zigbee2mqtt.js index 7576334880..cce12ede08 100644 --- a/lib/converters/zigbee2mqtt.js +++ b/lib/converters/zigbee2mqtt.js @@ -26,7 +26,7 @@ const store = {} const parsers = [ { - devices: ['WXKG01LM', 'RTCGQ01LM', 'WSDCGQ01LM', 'MCCGQ01LM', 'WXKG11LM', 'MCCGQ11LM'], + devices: ['WXKG01LM', 'RTCGQ01LM', 'WSDCGQ01LM', 'MCCGQ01LM', 'WXKG11LM', 'MCCGQ11LM', 'RTCGQ11LM'], cid: 'genBasic', type: 'attReport', disablePublish: true, @@ -84,7 +84,7 @@ const parsers = [ convert: (msg) => {return {humidity: parseFloat(msg.data.data['measuredValue']) / 100.0}} }, { - devices: ['RTCGQ01LM'], + devices: ['RTCGQ01LM', 'RTCGQ11LM'], cid: 'msOccupancySensing', type: 'attReport', convert: (msg, publish) => { @@ -144,6 +144,13 @@ const parsers = [ } } }, + { + devices: ['RTCGQ11LM'], + cid: 'msIlluminanceMeasurement', + type: 'attReport', + convert: (msg) => {return {illuminance: msg.data.data['measuredValue']}} + }, + // Ignore parsers (these message dont need parsing). { @@ -153,11 +160,23 @@ const parsers = [ convert: () => null }, { - devices: ['WXKG11LM', 'MCCGQ11LM'], + devices: ['WXKG11LM', 'MCCGQ11LM', 'RTCGQ11LM'], cid: 'genBasic', type: 'devChange', convert: () => null }, + { + devices: ['RTCGQ11LM'], + cid: 'msIlluminanceMeasurement', + type: 'devChange', + convert: () => null + }, + { + devices: ['RTCGQ11LM'], + cid: 'msOccupancySensing', + type: 'devChange', + convert: () => null + }, ]; module.exports = parsers; diff --git a/lib/devices.js b/lib/devices.js index 9b6650f846..771db50e6f 100644 --- a/lib/devices.js +++ b/lib/devices.js @@ -80,6 +80,13 @@ const devices = { supports: 'occupancy', homeassistant: [homeassistant.binary_sensor_occupancy] }, + 'lumi.sensor_motion.aq2': { + model: 'RTCGQ11LM', + vendor: 'Xiaomi', + description: 'Aqara human body movement and illuminance sensor', + supports: 'occupancy and illuminance', + homeassistant: [homeassistant.binary_sensor_occupancy, homeassistant.sensor_illuminance] + }, 'lumi.sensor_magnet': { model: 'MCCGQ01LM', vendor: 'Xiaomi', diff --git a/support/docgen.js b/support/docgen.js index b3dfa53961..c40475262a 100644 --- a/support/docgen.js +++ b/support/docgen.js @@ -10,12 +10,6 @@ const plannedToSupport = [ supports: '-', vendor: 'Xiaomi', }, - { - model: 'RTCGQ11LM', - description: 'Aqara human body movement and illuminance sensor', - supports: '-', - vendor: 'Xiaomi', - }, { model: 'SJCGQ11LM', description: 'Aqara water leak sensor',