Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help request for new device Xiaomi Aqara E1 door & window contact sensor #9274

Closed
sabamimi opened this issue Oct 22, 2021 · 224 comments
Closed
Labels
new device support New device support request

Comments

@sabamimi
Copy link

sabamimi commented Oct 22, 2021

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 .....

@sabamimi sabamimi added the new device support New device support request label Oct 22, 2021
@sabamimi
Copy link
Author

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}

@hexenmeister
Copy link

The same here. Only link quality will be sent. :(

@pprzybyl
Copy link

pprzybyl commented Oct 23, 2021

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.
dresden-elektronik/deconz-rest-plugin#5403

@sabamimi
Copy link
Author

Yes, I forgot to mention that I am getting only the Link Quality.
( like hexenmeister)

@Armageddit
Copy link

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 ;)

@sabamimi
Copy link
Author

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" :-)

@Armageddit
Copy link

Armageddit commented Oct 24, 2021

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

@sabamimi
Copy link
Author

unfortunately, nothing moves in the log when I open / close

@Armageddit
Copy link

is the log set to debug?

@sabamimi
Copy link
Author

Yes

@Armageddit
Copy link

and if u push the litle button?
or repair?

@sabamimi
Copy link
Author

I did delete the device and re-pair after using your file + restart MQTT

@sabamimi
Copy link
Author

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

@Armageddit
Copy link

make sure you keep the small strokes together

@sabamimi
Copy link
Author

no difference

@sabamimi
Copy link
Author

sabamimi commented Oct 24, 2021

did you look at the chinese URL ?

image

@Armageddit
Copy link

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

@sabamimi
Copy link
Author

sabamimi commented Oct 24, 2021

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....

@Armageddit
Copy link

Armageddit commented Oct 24, 2021

i am trying to find the file for the old version:MCCGQ11LM

and hope we can copy and paste :D

@alfakenzo
Copy link

hi guys, take a look here dresden-elektronik/deconz-rest-plugin#5403 (comment)

@sabamimi
Copy link
Author

Thanks alfakenzo,

Unfortunately I don't know how this information can be translated in MQTT context (beyond my league...)

@hexenmeister
Copy link

i am trying to find the file for the old version:MCCGQ11LM

and hope we can copy and paste :D

That’s the first thing I tried. Unfortunately it does not work. Would be too easy. : D
Here are definitions for all supported Xiaomi devices: https://github.com/Koenkk/zigbee-herdsman-converters/blob/master/devices/xiaomi.js

@sabamimi
Copy link
Author

@hexenmeister ,

I did use this file when I tried to reuse the existing definition for MCCGQ12LM (see my first post)

@hexenmeister
Copy link

@sabamimi
I know :)
That was an answer for @Armageddit

@sabamimi
Copy link
Author

oops , sorry.

@Armageddit
Copy link

Ah...
we need an other log file!
zigbee-herdsman log
There must be the value of the sensor we need to translate or interpret
Pls post the log by open and close

I hope it comes soon someone who knows the way around and solves our problem

@hexenmeister
Copy link

@Armageddit

As far as I know, there is no extra log for this.
The problem seems to be that without additional configuration, the sensor does not send anything at all (except lqi).

@sabamimi
Copy link
Author

I did find a file named
/opt/zigbee2mqtt/node_modules/zigbee-herdsman-converters/node_modules/zigbee-herdsman/node_modules/nwsapi/dist/lint.log
.....but it is empty

@hexenmeister
Copy link

@sabamimi
I think this has nothing to do with our problem.
https://en.wikipedia.org/wiki/Lint_(software)

@ricdays
Copy link

ricdays commented Dec 6, 2021

MCCGQ14LM is not working using a CC2531 with:

  • Zigbee2MQTT v1.22.1-dev commit: e5321d3
  • Coordinator type zStack12
  • Coordinator revision 20211116

Still no luck here... null data showing up, the device doesn't seem to send any updates.

image

@fjcerdan27
Copy link

MCCGQ14LM is not working using a CC2652R with:

  • Zigbee2MQTT 1.22.0-dev commit: 1069ec2
  • Coordinator type zStack3x0
  • Coordinator revision 20211114

image

@ricdays
Copy link

ricdays commented Dec 6, 2021

Also tried flashing the zigbee 3 firmware in the CC2531 and still no luck getting anything out of these MCCGQ14LM.

@fjcerdan27
Copy link

MCCGQ14LM is not working using a CC2652R with:

  • Zigbee2MQTT 1.22.0-dev commit: 1069ec2
  • Coordinator type zStack3x0
  • Coordinator revision 20211114

image

I just upgraded to Zigbee2MQTT version1.22.1-dev commit: bc8274b and it works.

image

Regards

@ricdays
Copy link

ricdays commented Dec 6, 2021

image

I have updated to the latest dev version, as well to a zStack30x, still not working.
So, at this point, I think the only thing that differs from @fjcerdan27 is the coordinator model and firmware.

@Koenkk
Copy link
Owner

Koenkk commented Dec 6, 2021

After upgrading the fw on your coordinator you will also need to repair the device, I will update the instructions on https://www.zigbee2mqtt.io/devices/MCCGQ14LM.html#adapter-firmware

Koenkk added a commit to Koenkk/zigbee2mqtt.io that referenced this issue Dec 6, 2021
@ricdays
Copy link

ricdays commented Dec 6, 2021

So, in the devices list, I have clicked in the "Remove Device" button, enabled the "Force Remove" option.
Then, I initiated the re-pairing by holding the device button for a few seconds.
The device announces itself and paired successfully. This is what I see in the console:

Zigbee2MQTT:debug 2021-12-06 19:27:34: Device '0x54ef44100027d922' announced itself
Zigbee2MQTT:info  2021-12-06 19:27:34: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0x54ef44100027d922","ieee_address":"0x54ef44100027d922"},"type":"device_announce"}'
Zigbee2MQTT:info  2021-12-06 19:27:34: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"announce","meta":{"friendly_name":"0x54ef44100027d922"},"type":"device_announced"}'
Zigbee2MQTT:debug 2021-12-06 19:27:36: Retrieving state of '0x54ef44100027d922' after reconnect
Zigbee2MQTT:debug 2021-12-06 19:27:36: Received Zigbee message from '0x54ef44100027d922', type 'attributeReport', cluster 'genBasic', data '{"appVersion":4,"modelId":"lumi.magnet.acn001"}' from endpoint 1 with groupID 0
Zigbee2MQTT:info  2021-12-06 19:27:36: MQTT publish: topic 'zigbee2mqtt/0x54ef44100027d922', payload '{"battery":null,"contact":null,"last_seen":"2021-12-06T19:27:36.720Z","linkquality":128,"voltage":null}'

Then, it doesn't send any extra data.
If I click the button once, this is what I get:

Zigbee2MQTT:debug 2021-12-06 19:28:40: Received Zigbee message from '0x54ef44100027d922', type 'attributeReport', cluster 'genBasic', data '{"modelId":"lumi.magnet.acn001"}' from endpoint 1 with groupID 0
Zigbee2MQTT:info  2021-12-06 19:28:40: MQTT publish: topic 'zigbee2mqtt/0x54ef44100027d922', payload '{"battery":null,"contact":null,"last_seen":"2021-12-06T19:28:40.959Z","linkquality":105,"voltage":null}'

Device data still shows up as "null".
Is there a step I am missing?

@oberlon
Copy link

oberlon commented Dec 6, 2021

@ricdays Did you updated your coordinator firmware on your USB stick? Last image shows a firmware reversion 20190425. This will not work . Install 20211114 from dev tree.
https://github.com/Koenkk/Z-Stack-firmware/tree/develop/coordinator/Z-Stack_3.x.0/bin
For my sticks I use cc2538-bsl.py to update the firmware.

@ricdays
Copy link

ricdays commented Dec 6, 2021

@oberlon my stick is a CC2531, so I don't see it listed in the Z-Stack_3.x.0.
I'm assuming I shouldn't try to flash a firmware build for another model into mine. Or maybe I'm wrong in that assumption? :) (please tell me I am)

@ricdays
Copy link

ricdays commented Dec 6, 2021

Update! Finally got it all working after a re-pair and with this configuration:

  • Zigbee2MQTT version: 1.22.1-dev commit: bc8274b
  • Coordinator type: zStack12
  • Coordinator revision: 20211116

@Whastie
Copy link

Whastie commented Dec 7, 2021

Hi,
image

for a new coordinator version this router version is still valid CC1352P2_CC2652P_other_router_20210128.hex ??

thanks!

@jiphex
Copy link

jiphex commented Dec 7, 2021

I can confirm that I got these sensors working fine with the following configuration using an Electrollama ZZH! (CC2652R) stick:

  • Zigbee2MQTT version: 1.22.1-dev commit: b4af832
  • Coordinator type: zStack3x0
  • Coordinator revision: 20211114 (from the develop branch of the firmware repo)

I also experienced the issue that @romedtino experienced on two of the sensors, where they get stuck in pairing mode. I managed to fix them with the procedure they mentioned.

@booyahh420
Copy link

I also confirm that the E1 door & window contact sensor is now working well with the the Dec update and 20211114 revision.
I use the CC2562P.

Screenshot 2021-12-08 172457
Screenshot 2021-12-08 172534

@onedr0p
Copy link

onedr0p commented Dec 8, 2021

The E1 for sensor is working great for me so far, I did have to repair the sensor twice for it to pick up battery and voltage though. I had to do that to all 6 that I installed in my home.

@balu-
Copy link

balu- commented Dec 9, 2021

Has anyone hints how to flash a SONOFF Zigbee 3.0 USB Dongle Plus using a raspberry pi?
I found the official flashing instructions from sonoff:
https://sonoff.tech/wp-content/uploads/2021/09/Zigbee-3.0-USB-dongle-plus-firmware-flashing-1-1.docx
But they mainly use a Windows Tool ("Flash Programmer2 serial port flashing firmware")

@Zamboca
Copy link

Zamboca commented Dec 10, 2021

Hi
Please bare with me I'm really a newbie when it comes to zigbee and z2m. I am currently running z2m 1.22.1-1 on HA using a raspberry pi and got a conbee II dongle plugged into it. I got 3 Aqara window and door sensors from Amazon and they work flawlessly but not the 1 I got from Ali express which is E1 Xiaomi MCCGQ14LM. My Conbee II device is running Version : 2.12.06 / 8/19/2021 Firmware: 26660700. The first time I tried to bind the MCCGQ14LM was to the Aqara M2 Hub. In the aqara app I was given the prompt to update the firmware on the sensor to 0.0.0_0005, I did it. i then moved to Conbee II to add the E1 sensor, and now im only getting link quality from that sensor and nothing else.
What am I missing here ?
My Conbee II needs an update ? if so where can I get the firmware file
I shouldn't have updated my sensor ?

1Capture
2Capture

Your help is greatly appreciated.

Thanks

Update: i updated my conbee2 stick with the suggested firmware listed on the zigbee2mqtt page, and the sensor is working now. Thank you

@bym007
Copy link

bym007 commented Dec 15, 2021

Quick question on this. I have 2x CC2652R sticks, one acting as a coordinator, and one as a router.
Do I need to update the firmware on both sticks or just the coordinator ?

EDIT: After updating the coordinator firmware (left router as is), my door sensor is now discovered, however, sensor status is not exposed correctly. It mostly remained as NULL, and after playing with reset button multiple times, it says closed, and does not update, when magnet is separated. Is there something else I need to do ?

@WouterJN
Copy link

WouterJN commented Dec 17, 2021

For me it it still nog working with the latest zigbee2mqtt version in combination with a CC1352P-2. What can I try?

It is discovered but all exposes are N/A.
Screenshot 2021-12-17 at 14 39 16

@Zamboca
Copy link

Zamboca commented Dec 17, 2021

@WouterJN your coordinator seems to be running an old firmware you will beed to upgrade that and repair your e1 sensor. Check this page out https://www.zigbee2mqtt.io/devices/MCCGQ14LM.html
Your coordinator should be on version 20211114.

I hope this helps

@WouterJN
Copy link

@WouterJN your coordinator seems to be running an old firmware you will beed to upgrade that and repair your e1 sensor. Check this page out https://www.zigbee2mqtt.io/devices/MCCGQ14LM.html Your coordinator should be on version 20211114.

I hope this helps

I think there is no 20211114 version for the CC1352P-2 coordinator I think :-/

@HeinzRuetschi
Copy link

Finely it worked and zigbee2mqtt recognised the Aqara MCCGQ14LM sensor
https://www.zigbee2mqtt.io/devices/MCCGQ14LM.html

Updating the Electrolama zig-a-zig-ah! CC2652R coordinator with revision 20211114
https://github.com/Koenkk/Z-Stack-firmware/blob/7c5a6da0c41855d42b5e6506e5e3b496be097ba3/coordinator/Z-Stack_3.x.0/bin/CC2652R_coordinator_20211114.zip and

Updating zigbee2mqtt to version 1.22.1 according to
https://www.zigbee2mqtt.io/guide/installation/01_linux.html#optional-running-as-a-daemon-with-systemctl.

After deleting and re-joining the network the Aqara E1 door & window contact sensor MCCGQ14LM was then properly recognised by zigbee2mqtt, see the enclosed state:
{
"battery": 67,
"battery_low": false,
"contact": true,
"linkquality": 153,
"state": "ON",
"tamper": false,
"temperature": 25,
"voltage": 2943
}
I hope this is of some help and safes some time.

@WouterJN
Copy link

@WouterJN your coordinator seems to be running an old firmware you will beed to upgrade that and repair your e1 sensor. Check this page out https://www.zigbee2mqtt.io/devices/MCCGQ14LM.html Your coordinator should be on version 20211114.
I hope this helps

I think there is no 20211114 version for the CC1352P-2 coordinator I think :-/

My mistake, I found the correct firmware on Github. It is working now :-)

@h1nnak
Copy link

h1nnak commented Dec 21, 2021

Hey folks,

With the following hardware (ZigBee CC2652P2 Raspberry Pi Module from shop.codm.de), zigbee2mqtt recognized the Aqara MCCGQ14LM sensor and is completely working now. https://www.zigbee2mqtt.io/devices/MCCGQ14LM.html

What i do:
Updating zigbee2mqtt to latest version.
Flashing my Hardware with the JelmerT python-tool: https://github.com/JelmerT/cc2538-bsl
I used the following instruction from Electrolama: https://electrolama.com/radio-docs/flash-cc-bsl/#linux
The following firmware was flashed: https://github.com/Koenkk/Z-Stack-firmware/raw/develop/coordinator/Z-Stack_3.x.0/bin/CC1352P2_CC2652P_launchpad_coordinator_20211217.zip

flash example: python3 cc2538-bsl.py -p /dev/ttyAMA0 -evw CC1352P2_CC2652P_launchpad_coordinator_20211217.hex

kontakt-sensor

@vdifortuna
Copy link

is there going to be an update this month for this coordinator?

https://github.com/Koenkk/Z-Stack-firmware/tree/master/coordinator/Z-Stack_3.x.0/bin

@Oleg-Sob
Copy link

@schoeyuk10
Copy link

Hi all,
I have a conbee 2 plugged into my pi 4 and my conbee needs updating.
Does anyone have an idiots guide to flashing the firmware ?
I'm scared of killing it lol.
I only have a macbook, so if there is a way to flash it using a mac that would be great.
Thanks in advance,
Lee

@serje73
Copy link

serje73 commented Dec 24, 2021

Hi all!
Any success news about CC2531 coordinator and these Aqara devices?

@Koenkk
Copy link
Owner

Koenkk commented Dec 24, 2021

Given the amount of duplicate questions I will lock this thread.

To get these devices working:

Repository owner locked as off-topic and limited conversation to collaborators Dec 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
new device support New device support request
Projects
None yet
Development

No branches or pull requests