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

Xiaomi RTCGQ11LM devices not updating after some time #185

Closed
cmille34 opened this issue Jul 7, 2018 · 72 comments
Closed

Xiaomi RTCGQ11LM devices not updating after some time #185

cmille34 opened this issue Jul 7, 2018 · 72 comments
Labels
stale Stale issues

Comments

@cmille34
Copy link

cmille34 commented Jul 7, 2018

I've been tinkering with this for a few weeks in an effort to get rid of using the Xiaomi gateway. I have everything working for the most part but after some restarts, I am noticing that Xiaomi RTCGQ11LM and MCCGQ11LM devices will intermittently stop updating sometimes. I thought it might be a range issue but one of the motion sensors that is only 25 feet away in the other room is not longer updating now and it had been working the most reliably for the past couple weeks.

If I bring the sensor close to the flashed CC2531 stick running in a docker container in my office here and re-pair it, it will likely work for a while but within a week after some reboots I expect it to stop reporting again. I have (3) different RTCQ11LM devices that are doing this now. I don't want to have to re-pair them every week if possible. Is there something I can do to help troubleshoot this? Below is a beginning of my latest log file to help provide a better picture of my setup. Currently I am using the builtin MQTT broker in Home Assistant.

2018-07-07T14:40:10.434Z - info: Starting zigbee2mqtt version 0.1.0 (commit #ae41b7b)
2018-07-07T14:40:10.441Z - info: Starting zigbee-shepherd
2018-07-07T14:40:10.906Z - info: zigbee-shepherd started
2018-07-07T14:40:10.910Z - info: Currently 19 devices are joined:
2018-07-07T14:40:10.911Z - info: attic (0x00158d000201c2ce): WSDCGQ01LM - Xiaomi MiJia temperature & humidity sensor (EndDevice)
2018-07-07T14:40:10.911Z - info: chrisoffice (0x00158d0001e7c471): WSDCGQ01LM - Xiaomi MiJia temperature & humidity sensor (EndDevice)
2018-07-07T14:40:10.911Z - info: ericaoffice (0x00158d0001fa510c): WSDCGQ01LM - Xiaomi MiJia temperature & humidity sensor (EndDevice)
2018-07-07T14:40:10.912Z - info: bathroomdoor (0x00158d00022c7c23): MCCGQ11LM - Xiaomi Aqara door & window contact sensor (EndDevice)
2018-07-07T14:40:10.912Z - info: downstairsbathroommotion (0x00158d00022788b9): RTCGQ01LM - Xiaomi MiJia human body movement sensor (EndDevice)
2018-07-07T14:40:10.912Z - info: laundryroommotion (0x00158d0002013370): RTCGQ11LM - Xiaomi Aqara human body movement and illuminance sensor (EndDevice)
2018-07-07T14:40:10.912Z - info: loftsensor (0x00158d000201c204): WSDCGQ01LM - Xiaomi MiJia temperature & humidity sensor (EndDevice)
2018-07-07T14:40:10.913Z - info: parentsbedroom (0x00158d000201a06b): WSDCGQ01LM - Xiaomi MiJia temperature & humidity sensor (EndDevice)
2018-07-07T14:40:10.913Z - info: stairwaybutton (0x00158d00016bdf39): WXKG01LM - Xiaomi MiJia wireless switch (EndDevice)
2018-07-07T14:40:10.913Z - info: laundryroomdoor (0x00158d0002019aa9): MCCGQ11LM - Xiaomi Aqara door & window contact sensor (EndDevice)
2018-07-07T14:40:10.913Z - info: chrisofficemotion (0x00158d000200cb1d): RTCGQ11LM - Xiaomi Aqara human body movement and illuminance sensor (EndDevice)
2018-07-07T14:40:10.914Z - info: kitchenmotion (0x00158d0001f9d541): RTCGQ11LM - Xiaomi Aqara human body movement and illuminance sensor (EndDevice)
2018-07-07T14:40:10.914Z - info: tybutton (0x00158d0001f3ae71): WXKG01LM - Xiaomi MiJia wireless switch (EndDevice)
2018-07-07T14:40:10.914Z - info: ericabutton (0x00158d0001f3ae74): WXKG01LM - Xiaomi MiJia wireless switch (EndDevice)
2018-07-07T14:40:10.915Z - info: waterheaterleaksensor (0x00158d0002112505): SJCGQ11LM - Xiaomi Aqara water leak sensor (EndDevice)
2018-07-07T14:40:10.915Z - info: frontdoor (0x00158d0001bf47fc): MCCGQ01LM - Xiaomi MiJia door & window contact sensor (EndDevice)
2018-07-07T14:40:10.915Z - info: parentscloset (0x00158d0001e5ce2d): RTCGQ11LM - Xiaomi Aqara human body movement and illuminance sensor (EndDevice)
2018-07-07T14:40:10.916Z - info: ericachair (0x00158d000201b8cd): MCCGQ11LM - Xiaomi Aqara door & window contact sensor (EndDevice)
2018-07-07T14:40:10.916Z - info: ericaofficemotion (0x00158d0001ff3f23): RTCGQ11LM - Xiaomi Aqara human body movement and illuminance sensor (EndDevice)
2018-07-07T14:40:10.917Z - info: Connecting to MQTT server at mqtt://192.168.1.104:1883
2018-07-07T14:40:10.972Z - info: zigbee-shepherd ready
2018-07-07T14:40:11.835Z - info: Connected to MQTT server
2018-07-07T14:40:11.837Z - info: MQTT publish, topic: 'zigbee2mqtt/bridge/state', payload: 'online'

Any help you can provide to help get to the bottom of this would be appreciated. I apologize if I left out any crucial information to help troubleshoot.

@cmille34
Copy link
Author

cmille34 commented Jul 7, 2018

In case it helps, I went ahead and just tried to repair one of the problem devices and this is what it shows in the log when I repair it:

2018-7-7 15:56:28 �[32mINFO�[39m Zigbee: allowing new devices to join.
spinlock: false []
device already in network
2018-7-7 15:56:43 �[32mINFO�[39m MQTT publish, topic: 'zigbee2mqtt/kitchenmotion', payload: '{"battery":"100.00","voltage":3045}'
2018-7-7 15:56:45 �[32mINFO�[39m MQTT publish, topic: 'zigbee2mqtt/kitchenmotion', payload: '{"battery":"100.00","voltage":3045,"illuminance":9}'
2018-7-7 15:56:45 �[32mINFO�[39m MQTT publish, topic: 'zigbee2mqtt/kitchenmotion', payload: '{"battery":"100.00","voltage":3045,"illuminance":9,"occupancy":true}'

After doing this it starts to report again. I hope I can just avoid having to do this over and over.

@Koenkk
Copy link
Owner

Koenkk commented Jul 7, 2018

Are you running the latest firmware from: https://github.com/Koenkk/Z-Stack-firmware/tree/master/coordinator/CC2531/bin?

@cmille34
Copy link
Author

cmille34 commented Jul 8, 2018

@Koenkk I don't know Im afraid. I bought it pre-flashed from someone on reddit. Is there a way I can check the version from the ubuntu host I have it plugged into?

@Koenkk
Copy link
Owner

Koenkk commented Jul 9, 2018

At the moment not, when did you order the stick?

@cmille34
Copy link
Author

cmille34 commented Jul 9, 2018

I ordered it on June 15th, so it would have been flashed sometime between June 1st and June 15th. I went ahead and ordered hardware to flash it again. should be here in a couple weeks from china. ill keep you posted if that helps. Thanks for all your time and efforts making thus great solution.

@Sonsi79
Copy link

Sonsi79 commented Jul 29, 2018

I have same problem with newest Version of your firmware and the RTCGQ11LM. After Restart zigbee2mqtt both of my 2 RTCGQ11LM Motion Sensor didn't update the state. I have to push the button one time or pair again.
All other Xiaomi devices working fine after restart but the RTCGQ11LM didn't.

Is there any workaround for this bug?

@Koenkk
Copy link
Owner

Koenkk commented Jul 31, 2018

@Sonsi79 can you check the battery of your 2 motion sensors.

I tried reproducing by (on zigbee2mqtt 0.1.2 and last CC2531 firmware).

  • Pair RTCGQ11LM
  • Reports motion and illuminance
  • Restart zigbee2mqtt
  • Still reports motion and illuminance

@Sonsi79
Copy link

Sonsi79 commented Jul 31, 2018

@Koenkk it seems you're right. It seems to work now.
I have installed zigbee2mqtt two days before, but i have 0.1.1. How to install the 0.1.2? Is it dev branch?

@Koenkk
Copy link
Owner

Koenkk commented Aug 1, 2018

@123trs
Copy link

123trs commented Aug 1, 2018

Same issue here. I have 5 RTCGQ11LM. 2 pices worked very well. But the other 3 ones lost the connection time for time. I use the problemematic 3 ones for 2 weeks now. The othes runs about for 10 weeks without problems. Is it possible, that there are different revisions on the market? But all looks equal.

I use the 0.1.1 version, and the latest firmware on the CC2531 stick.

@Koenkk
Copy link
Owner

Koenkk commented Aug 1, 2018

@123trs have you also tried replacing the batteries?

@cmille34
Copy link
Author

cmille34 commented Aug 1, 2018

For those of us having problems, is range an issue at all? How many devices do you have joined to your stick? All the devices in my home that are having the problems are fairly far away from my CC2531 stick, Its strange that they work for a while then stop working . I hope to have my programming hardware in the next few days so I can flash another CC2531 stick to act as a router upstairs to extend the range.

Currently i have 20 devices joined to my single CC2531 stick, I wonder if its getting swamped? I'm currently having problems with the following devices:

WSDCGQ11LM
RTCGQ11LM
MCCGQ11LM

If I rejoin them they will work for a couple days then just stop publishing their status. I was hoping just flashing to the latest firmware would be the fix but it sounds like it's more then that.

@123trs
Copy link

123trs commented Aug 1, 2018

@Koenkk : Yes, batteries brand new, good Varta

@123trs
Copy link

123trs commented Aug 1, 2018

@cmille34 : I dont think, the range is the problem. For test, I place one in 50cm range. It works for about 24h. After that, same problem. I paired 5 sensors of that.

@clockbrain
Copy link
Contributor

For those with this problem do you have permit_join set to true or false?

With permit_join set to false I was also having heaps of problems with devices not responding after some time and needing to reboot daily and reflash the firmware weekly. I even started from scratch with a new image on my Pi and installing zigbee2mqtt again but still had same problem.

I changed permit_join back to true and am finding the whole system is much more stable.

@123trs
Copy link

123trs commented Aug 2, 2018

"permit_join" ist set to "true" from the beginning. I never changed it.

@123trs
Copy link

123trs commented Aug 2, 2018

Again no responding from device 0x00158d000204aab1. New paired jesterday 16:30. Last response:

state | no_motion | 2018-08-02 07:19:27

@Sonsi79
Copy link

Sonsi79 commented Aug 2, 2018

My Setting was set to „false“ i have changed it and will try now. Thank for your hint.

@cmille34
Copy link
Author

cmille34 commented Aug 2, 2018

My setting was set to false. I was using the toggle switch in Home Assistant to allow things to join when I needed. Ill change it to allow join = true all the time and see if that makes a difference.

@cmille34
Copy link
Author

cmille34 commented Aug 4, 2018

I finally received my flashing hardware and additional 2531 boards. I flashed the router firmware onto a 2531 and joined it to my zigbee2mqtt docker instance and have it plugged in upstairs to eliminate any chance of range being an issue. I then went ahead and re-flashed my coordinator 2531 stick to the firmware here: https://github.com/Koenkk/Z-Stack-firmware/tree/master/coordinator/CC2531/bin to make sure I am on the latest.

I then went through the trouble of removing and re-pairing all 20 devices. I noticed one of the devices wasn't reporting afterwards so I tried to remove it again and re-pair it and it wouldn't go through the joining process at all. I looked at the logs and found:
"message":"request unsuccess: 17","stack":"Error: request unsuccess: 17
at /opt/zigbee2mqtt/node_modules/zigbee-shepherd/lib/components/zdo.js:46:21

I checked on Github here and saw the fix of reflashing the firmware again, so I went ahead and did that and now I can pair that one pesky Xiaomi temp sensor. An hour after flashing, most of the devices I paired prior to reflashing the stick aren't reporting though, only 3 of the 20 devices are. They all show up in the log at boot up of being pared but no updates are being received it seems.

When I flash firmware to the stick do I have to repair the devices everytime?
Is there anyway to force the Xiaomi sensors to check back in with the zigbee2mqtt or force the zigbee2mqtt to contact the sensors?

I really don't want to have to keep re-pairing these devices.

@Koenkk
Copy link
Owner

Koenkk commented Aug 5, 2018

When you flash the firmware you clear the memory of the stick so you need to repair all devices.

Could you first start with a smaller set of devices (e.g. 10) and check if you can get it working stable?

@cmille34
Copy link
Author

cmille34 commented Aug 5, 2018

@Koenkk OK, I will repair only 10 devices in different areas of the house and see how it works. How exactly should I do this to make it a clean set up?

1.) Should I delete all devices in my configuration.yaml manually?
2.) Should I delete my database.db and start fresh?
3.) Should I include a router 2531 stick in this batch of 10 devices?

@Koenkk
Copy link
Owner

Koenkk commented Aug 5, 2018

  1. Yes, clear the complete device section.
  2. Yes
  3. No (not yet)

@cmille34
Copy link
Author

cmille34 commented Aug 6, 2018

@Koenkk OK - thanks for the guidance. I've gone ahead and reflashed the stick 1 more time, deleted the database and cleared out the devices and repaired the 11 most important devices for me. If I run into any trouble of devices no longer reporting in the zigbee2mqtt log I will post back here.

Is the C2531 not a good stick? Is there a stick with more memory that handles many devices better?

@Koenkk
Copy link
Owner

Koenkk commented Aug 6, 2018

@cmille34 CC2531 has limited memory, but there are no other options :(

@kirovilya
Copy link
Contributor

kirovilya commented Aug 6, 2018

@cmille34 cc2531 has old chip with limited memory (8K). On TI forum recomended CC26x2 or CC2538 chip https://e2e.ti.com/support/wireless_connectivity/proprietary_2-4_ghz/f/964/t/633997

I try to find usb-dongle with this chip and found only this https://www.alibaba.com/product-detail/CC2538-CC2592-USB-Dongle-ZigBee-adapter_60426940995.html but I can not buy it for test :(

@ryanbeaton
Copy link

@kirovilya how about this one
http://s.aliexpress.com/iQNzUnIn

The U2ZB-3219 option

Sent with GitHawk

@kirovilya
Copy link
Contributor

@ryanbeaton I bought and wait this board https://www.aliexpress.com/item/CC2538-CC2592-zigbee-6-lowpan/32879578178.html

@yfaway
Copy link

yfaway commented Oct 14, 2018 via email

@yfaway
Copy link

yfaway commented Oct 18, 2018 via email

@yfaway
Copy link

yfaway commented Oct 18, 2018 via email

@Koenkk
Copy link
Owner

Koenkk commented Oct 18, 2018

@yfaway could you post your zigbee2mqtt startup log?

@yfaway
Copy link

yfaway commented Oct 19, 2018 via email

@Koenkk
Copy link
Owner

Koenkk commented Oct 19, 2018

Can you stop zigbee2mqtt, remove all entires of 0x00158d000200eb10 from the database.db start zigbee2mqtt and pair the sensor?

@yfaway
Copy link

yfaway commented Oct 19, 2018 via email

@tb205gti
Copy link

Funny I do have some of the same issue with the 0.1.8 version and the motion sensor. It works a few times, then it stops updating the state from the sensor.

reverting to 0.1.6 solves it, then everything is working again.

@enboig
Copy link

enboig commented Nov 11, 2018

I have the same error; when trying to rejoin I get:

nov 11 22:12:37 servidor7 npm[3930]: zigbee2mqtt:error 2018-11-11 22:12:37 Cannot get the Node Descriptor of the Device: 0x00158d000201358f (Error: Timed out after 10000 ms)

I cannot get it rejoined.
I am using 0.1.6

@Koenkk
Copy link
Owner

Koenkk commented Nov 12, 2018

@enboig make sure you correctly follow the pairing procedure from: https://github.com/Koenkk/zigbee2mqtt/wiki/Pairing-devices#xiaomi

@enboig
Copy link

enboig commented Nov 12, 2018

After upgrading to 0.1.8 (maybe not necessary) and deleting database.db I could join it. Does deleting database.db remove all the devices? is there a "less drastic" way to remove one device by id?

@Koenkk
Copy link
Owner

Koenkk commented Nov 12, 2018

@enboig you can also remove a single entry from it.

@enboig
Copy link

enboig commented Nov 12, 2018

The database is looks quite simple, to remove an entry I could use a cat & grep, is there a preferred way?

I have a motion sensor and two temperature sensors, yesterday:

  1. I removed my database.db
  2. Synced my motion sensor and checked it was working (didn't check the temperatures ones)
  3. At night my server crashed
  4. I booted it, and motion sensor is working, but temp senors are missing (don't know if they were working before the crash).
    This is related to removing database.db, or is another problem?

@lolorc
Copy link
Contributor

lolorc commented Nov 12, 2018

@ryanbeaton I bought and wait this board https://www.aliexpress.com/item/CC2538-CC2592-zigbee-6-lowpan/32879578178.html

Hi,

@kirovilya what are you using to program the cc2538 ? does it come with SBL ?
does it need something like XDS110/XDS100 to program it ?

@stale
Copy link

stale bot commented Jan 11, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Stale issues label Jan 11, 2019
@stale stale bot closed this as completed Jan 18, 2019
@djpollum
Copy link

djpollum commented Feb 5, 2019

I would like to add a comment to this topic.
I bought the equipment and installed it as described in the documentation. Then I bought a Xiaomi aqara Hub and motion sensors.
At first the installation went fine, but the motion sensor soon gave no updates after some time.
I thought this was a bug and tried to reinstall the motion sensor. All got soon very worse...
Nothing worked (Zigbee2mqtt saw no new devices) and I tried everything.

  • reinstalling Zigbee2mqtt v1.0
  • installing newest version of Zigbee2mqtt v1.1.1
  • reflashing CC2531 with old and new firmware (CC2531ZNP-Prod_20181024 and CC2531ZNP-Prod_20190109)
  • re-pairing 100x times (also 2 cm close to the CC2531)
  • reset button on the CC2531
  • etc.

Then I saw a line somewhere that the Xiaomi devices do not lose their connection with a paired coordinator / router. This was the solution which I was looking for.
I re-paired the Xiaomi motion sensor to the original Xiaomi Aqara Hub, so the sensor loses it's connection to the CC2531 in it's "memory".
After successful pairing with the original Hub I was able to re-pair the motion sensor to the CC2531 again !

I guess you can put this solution in your documentation also?

@Koenkk
Copy link
Owner

Koenkk commented Feb 6, 2019

@djpollum did you reflash without the Retain IEEE address checked?

@djpollum
Copy link

djpollum commented Feb 6, 2019

@djpollum did you reflash without the Retain IEEE address checked?

Yes @Koenkk , I did exactly the same as shown in the picture on https://koenkk.github.io/zigbee2mqtt/getting_started/flashing_the_cc2531.html.

@Koenkk
Copy link
Owner

Koenkk commented Feb 7, 2019

@djpollum at the time trying to pair the motion sensor to zigbee2mqtt, was the hub still running?

@djpollum
Copy link

djpollum commented Feb 7, 2019

@djpollum at the time trying to pair the motion sensor to zigbee2mqtt, was the hub still running?

@Koenkk no, I thought these would interfere with each other. So before pairing to zigbee2mqtt I removed the hub from the wall socket.

@Koenkk
Copy link
Owner

Koenkk commented Feb 7, 2019

@untitledlt
Copy link

I still have this issue after updating to latest CC2531_DEFAULT_20190608 and zigbee2mqtt@1.10.0.
After some time it just stops receiving from Xiaomi temperature sensors.

I found that I can short click pairing button on sensor without actually repairing and it starts to work again.

All 4 sensors disappear at random interval between few days or weeks.

@enboig
Copy link

enboig commented Apr 29, 2020

It happened to me to only one device. I changed the zigbee channel (repairing all de devices...) and since then (2 weeks ago) I haven't had a single problem. Zigbee appears to use the same band (but not the same channel scheme) than wifi. Now my wifi is at channel 1 and zigbee at 25.

@AlexCristescu
Copy link

AlexCristescu commented May 11, 2020

How do you change the channel? I seem to have the same issue, if I shake the sensor it starts reporting back for a few minutes, then goes back silent...

LE: I actually found out, it's in the configuration.yaml
LE2: I actually don't (yet) have an issue with the sensors, just that I did not read about them enough to see that they don't report continuously, only once an hour or for changes in temp/humidity. Will report back in a few days if I see any issues.

@enboig
Copy link

enboig commented May 11, 2020

https://www.zigbee2mqtt.io/information/configuration.html
https://support.metageek.com/hc/en-us/articles/203845040-ZigBee-and-WiFi-Coexistence
It would appear that 25 and 26 are the safest bet, I chose 25 and no problems since then. You can check wifi channels with some phone app.

@disaster123
Copy link

I still have this issue with a RTCGQ11LM - any news on this how to resolve it?

@MrTheBarbarian
Copy link

Hello!
I have the same problem. 6 of 8 sensors disappear after one day working. All other sensors and switches are working correctly. I have 41 devices and 8 of them are routes. All end devices are Aqara, but I have problems with RTCGQ11LM onley.
The firmware version of the my sensors is: 3000-0001, Firmware build date 20170627. Does somebody know if there is newer version of the firmware? If yes, do you have problems with newest version? I hesitate if is worth to try to update the firmware of the devices with original gateway, but I don't have it and I must buy it.
Also I considering to buy new different brand of motion sensor, like Sonoff.
How do you thinking?
Any advices are welcome!
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Stale issues
Projects
None yet
Development

No branches or pull requests