Support RTCGQ11LM. #4

This commit is contained in:
Koen Kanters committed 2018-04-21 09:14:18 +02:00
1 parent bc3fca9d68
commit 79d405afe9
3 files changed
+29 -9

No files matched your search

+22 -3
View File
@@ -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;
+7
View File
@@ -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',
-6
View File
@@ -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',