Help request for new device Xiaomi Aqara E1 door & window contact sensor
I tried to copy the existing MCCGQ12LM definition since MCCGQ14LM seems to be a new version of the MCCGQ12LM device the code i tried was:
const fz = require('zigbee-herdsman-converters/converters/fromZigbee'); const tz = require('zigbee-herdsman-converters/converters/toZigbee'); const exposes = require('zigbee-herdsman-converters/lib/exposes'); const reporting = require('zigbee-herdsman-converters/lib/reporting'); const extend = require('zigbee-herdsman-converters/lib/extend'); const e = exposes.presets; const ea = exposes.access;
const definition = { zigbeeModel: ['lumi.magnet.acn001'], model: 'MCCGQ14LM', vendor: 'Xiaomi', description: 'Aqara E1 door & window contact sensor', fromZigbee: [fz.ias_contact_alarm_1, fz.battery], toZigbee: [], meta: {battery: {voltageToPercentage: '3V_2100'}}, exposes: [e.contact(), e.battery()] }
module.exports = definition;
the result was
- no error during startup
- Device recognized correctly during pairing
- BUT no contact ON /OFF detected
later on I have found this chinese web page that seems to reflect the zigbee parameters of this device....but I don't know how to use this information ....
Information about the device + link
https://home.miot-spec.com/spec/lumi.magnet.acn001#srv-4
data/database.db entry of the device
.. (I am not really sure what is requested here
Thank you for help, guidance and "mercy" since this is my first attempt .....
After searching a little more, I have found the following in the database.db; {"id":19,"type":"EndDevice","ieeeAddr":"0x54ef44100027f9de","nwkAddr":18255,"manufId":4151,"manufName":"LUMI","powerSource":"Battery","modelId":"lumi.magnet.acn001","epList":[1],"endpoints":{"1":{"epId":1,"inClusterList":[],"outClusterList":[],"clusters":{"genBasic":{"attributes":{"appVersion":4,"modelId":"lumi.magnet.acn001"}}},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":4,"interviewCompleted":true,"meta":{},"lastSeen":1634898624897}
The same here. Only link quality will be sent. :(
The same issue here. Here is an topic from deconz, giving more details regarding this new sensor. But also didnt know how to use it. https://github.com/dresden-elektronik/deconz-rest-plugin/issues/5403?fbclid=IwAR0-lIWVo2Q9MWBabbYOGgUEJoKmlNbhUgNOLxBqt5vuhCVG7DLxICdo3L8
Yes, I forgot to mention that I am getting only the Link Quality. ( like hexenmeister)
Log
Zigbee2MQTT:warn 2021-10-24 18:14:40: Received message from unsupported device with Zigbee model 'lumi.magnet.acn001' and manufacturer name 'LUMI',
Zigbee2MQTT:warn 2021-10-24 18:14:40: Please see: https://www.zigbee2mqtt.io/how_tos/how_to_support_new_devices.html.
i think the file looks like:
MCCGQ14LM.js
const fz = require('zigbee-herdsman-converters/converters/fromZigbee');
const tz = require('zigbee-herdsman-converters/converters/toZigbee');
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const reporting = require('zigbee-herdsman-converters/lib/reporting');
const extend = require('zigbee-herdsman-converters/lib/extend');
const e = exposes.presets;
const ea = exposes.access;
const definition = {
zigbeeModel: ['lumi.magnet.acn001'],
model: 'MCCGQ14LM',
vendor: 'Xiaomi',
description: 'Aqara door & window contact sensor',
fromZigbee: [],
toZigbee: [],
exposes: [e.battery(), e.contact(), e.linkquality(), e.temperature(), e.voltage()],
};
module.exports = definition;
but i can't create in the directory to my Docker container (write protectet) i hope i can help and i get an update soon ;)
Log
Zigbee2MQTT:warn 2021-10-24 18:14:40: Received message from unsupported device with Zigbee model 'lumi.magnet.acn001' and manufacturer name 'LUMI', Zigbee2MQTT:warn 2021-10-24 18:14:40: Please see: https://www.zigbee2mqtt.io/how_tos/how_to_support_new_devices.html.i think the file looks like:
MCCGQ14LM.js
const fz = require('zigbee-herdsman-converters/converters/fromZigbee'); const tz = require('zigbee-herdsman-converters/converters/toZigbee'); const exposes = require('zigbee-herdsman-converters/lib/exposes'); const reporting = require('zigbee-herdsman-converters/lib/reporting'); const extend = require('zigbee-herdsman-converters/lib/extend'); const e = exposes.presets; const ea = exposes.access; const definition = { zigbeeModel: ['lumi.magnet.acn001'], model: 'MCCGQ14LM', vendor: 'Xiaomi', description: 'Aqara door & window contact sensor', fromZigbee: [], toZigbee: [], exposes: [e.battery(), e.contact(), e.linkquality(), e.temperature(), e.voltage()], }; module.exports = definition;but i can't create in the directory to my Docker container (write protectet) i hope i can help and i get an update soon ;)
I did try your file ...but no improvement ! device recognized but nothing in the log file when I "open the window" :-)
what says the debug log? when u open? or close?
now we are at point 3 -> https://www.zigbee2mqtt.io/how_tos/how_to_support_new_devices.html
unfortunately, nothing moves in the log when I open / close
is the log set to debug?
Yes
and if u push the litle button? or repair?
I did delete the device and re-pair after using your file + restart MQTT
If i single click (device is paired) i am getting the following:
Oct 24 21:12:31 nodered npm[23232]: Zigbee2MQTT:debug 2021-10-24 21:12:31: Received Zigbee message from '0x54ef44100027f9de', type 'attributeReport', cluster 'genBasic', data '{"modelId":"lumi.magnet.acn001"}' from endpoint 1 with groupID 0
make sure you keep the small strokes together
no difference
did you look at the chinese URL ?

when i hold them together i hear a soft click extremely quiet when pulling apart a louder click
its my first time adding last time some one was faster
we need a massage to translate
I can hear the same (very quiet) click, now that you mentioned it but only when pulling apart ....at least we know the device is working OK....
i am trying to find the file for the old version:MCCGQ11LM
and hope we can copy and paste :D
hi guys, take a look here https://github.com/dresden-elektronik/deconz-rest-plugin/issues/5403#issuecomment-950383030