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

Zigbee2MQTT can not reach devices after restart #1657

Closed
regnerus opened this issue Jun 21, 2019 · 9 comments
Closed

Zigbee2MQTT can not reach devices after restart #1657

regnerus opened this issue Jun 21, 2019 · 9 comments

Comments

@regnerus
Copy link

regnerus commented Jun 21, 2019

Bug Report

What happened

I am in the process of moving my home automation related services to an Intel NUC. When I copied the old configuration (including database.db) from my Raspberry Pi I got errors that devices could not be reached. I decided that repairing might be the best option. Repairing of devices works, however connection is lost again after restarting Zigbee2MQTT.

How to reproduce it (minimal and precise)

  1. Powered down all Zigbee Routers (including Tradfri bulbs)
  2. I start Zigbee2MQTT (currently using the Hassio Addon)
  3. Paired one Tradfri bulb
  4. I can control the bulb via MQTT/Home Assistant
  5. I restart Zigbee2MQTT again
  6. Connection to the bulb seems to be lost, not able to control it again.

Here is a pastebin of what happens after restarting the Zigbee2MQTT add-on: https://pastebin.com/bTxrKYCc

Edit: After waiting a while longer it also gives this error:
zigbee2mqtt:error 6/21/2019, 8:43:29 PM Zigbee publish to device '0x90fd9ffffe08dc9a', genOnOff - off - {} - {"manufSpec":0,"disDefaultRsp":0} - null failed with error Error: AF data request fails, status code: 205. No network route. Please confirm that the device has (re)joined the network.

Debug Info

I tried both the normal and edge version of the Hassio Zigbee2MQTT add-on aswell as the official Zigbee2MQTT docker container. Furthermore I tried different Z-Stack firmware for the CC2531 such as versions: 20190425, 20190619 (both Zigbee 1.2 HA) and 20190425 (Zigbee 3.0). Also tried different CC2531 sticks to check if it might be a hardware issue.

zigbee2mqtt version: 1.4
CC253X firmware version: 20190425

I also have quite a few Aqara sensors/buttons which I did not take down yet, however since these are all end devices they should not keep the previous network up right?

@Koenkk
Copy link
Owner

Koenkk commented Jun 23, 2019

Do you use an usb extension cable? Plugging it directly might cause interference.

@regnerus
Copy link
Author

Yes, I've read the page about improving network range and I tried both a short (30cm) and longer (2m) extension cable, also I've switched to Zigbee channel 25 which should interfere less with my 2.4 GHz wifi. Furthermore the NUC is in the same position where the Raspberry Pi was.

I also have two CC2530 routers but those also lose the connection after restarting Zigbee2MQTT.

@Koenkk
Copy link
Owner

Koenkk commented Jun 24, 2019

Can you try without using the reporting feature?

@regnerus
Copy link
Author

regnerus commented Jun 25, 2019

Unfortunately the same issue when I disable the reporting feature.

Here is a Pastebin of the initial pairing and controlling of the light: https://pastebin.com/1s6M15vZ

And here is a Pastebin of what happens after restarting the add-on, just only about a minute later and without changing anything else: https://pastebin.com/4qRhcsgg

I am aware that the logs also contain some messages received by MQTT for lights currently not on the network initiated by some automations.

Edit:

Note that the LQI is around 120, which should be reasonable for reconnection (?). Since I am doing these tests with a light in the same room as the CC2531 Coordinator, the bulb is only about a meter from the coordinator.

I also have Wireshark setup with a CC2531 stick running the sniffer firmware, could that be of any help with this issue?

@regnerus
Copy link
Author

regnerus commented Jun 26, 2019

I just tried setting up Zigbee2MQTT on my Raspberry Pi again. Replicated the steps of pairing the one bulb and then restarting Zigbee2MQTT. I left the CC2531 stick connected in the same position connected to the same extension cable and kept the same configuration.yaml file...

On the Pi it behaves exactly as you would expect, after the restart the light is reconnected.

Edit:
Just tried to install Zigbee2MQTT directly on the NUC instead of running it in a Docker container. Unfortunately the same issue as before... Do I have a cursed Intel NUC on my hands or is there an explanation for this issue? 😝

I am running Ubuntu 18.04.2 LTS on an Intel NUC6CAYH, here is a PCI list for good measure: https://pastebin.com/qpNwGvML.

@Koenkk
Copy link
Owner

Koenkk commented Jun 26, 2019

My whole home automation setup runs on a NUC6CAYH.

You might try and USB extension cable, as the housing of the NUC can give interference.

Please keep me up-to-date as information and a possible solution is highly valuable for me and other users.

@regnerus
Copy link
Author

Interesting...

I already tried USB extension cables of different lengths and types... I'm really not sure if interference is the problem because the coordinator is far away from the NUC.

Right now I switched to a Pi which only runs Zigbee2MQTT which works... If I have some more time this weekend I might try to reflash one of my CC2530 routers as a coordinator and see if that does anything. Right now I really have no clue to why this is happening.

@regnerus
Copy link
Author

regnerus commented Jul 3, 2019

I did a few more tests and eventually found out that yes indeed the issue was caused by interference. It is still super weird to me that I had no issues when I have the CC2531 connected (through an USB extension) to my RPi but only when I connected it to the NUC (while leaving the CC2531 in exact the same place) when I start getting the issue. Even-though both the RPi and NUC have wifi/bluetooth disabled.

Through trail and error I found a location where the CC2531 was able to reconnect to the devices, however moving it as little as 30 cm sometimes made it lose the signal again!

I ordered some parts for the Hack-a-day CC2531 antenna mod (https://hackaday.io/project/163505-cc2531-usb-adapter-antenna-mod) which hopefully will result in a more stable signal.

@regnerus regnerus closed this as completed Jul 3, 2019
@Koenkk
Copy link
Owner

Koenkk commented Jul 3, 2019

@regnerus thanks for letting us know!

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

No branches or pull requests

2 participants