ioBroker / ioBroker.zigbee

Zigbee communcation with Hue, Xiaomi, Lighttify... via TI CC2xxx USB stick
MIT License
315 stars 190 forks source link

Zigbee stick stops working randomly #284

Closed mediaDS closed 5 years ago

mediaDS commented 5 years ago

Hi

Well, it is getting very frustrating and annoying lately with the Zigbee-Adpater and/or the Zigbee-Stick. Randomly it just stops working at all. I tried different sticks and re-flashed all of them at least twice. First there are just some red error messages in the log (see below) and then the green LED goes dark and nothing works anymore. Then I have to shutdown the Controller and switch off the power supply - and then back on. In 9 of 10 times it works.

I'd normally throw out the Zigbee stick and use my Philips Hue bridge instead but the Hue is no option for me - it has other problems. I also tried to use the same hardware and software on a Raspberry Pi 3B+ for testing. It got the same problem. I do not know if it's your adpater or the firmware I flashed onto the CC2531 pcb (or maybe both) but this needs to be fixed. I'll do my best to help you with that.

I read some postings here with similar problems but I'm not sure if it's the same issue.

Here are some further details:

Software:

ioBroker is running on an Odroid C2 with 2GB RAM - everything is installed in a plastic cabinet. I use a Meanwell power supply of 5.10 volts at ~3 amps for the Odroid. The Zigbee Stick is connected via a very well shielded USB extension cable (~1.5meters) and far away from the electric installation.

ioBroker.admin 3.6.0 Zigbee Adapter: 0.10.3

Plattform: linux RAM: 1.9 GB Node.js: v8.15.1 NPM: 6.4.1

Devices:

1 Zigbee Stick CC2531 Firmware Koenkk Z-Stack CC2531ZNP-Prod_20190223 3 Osram Plug01 Firmware V1.04.12 5 Philips Hue LWB010 Firmware 1.46.13_r26312 1 Philips Hue LCT010 Firmware 1.46.13_r26312 1 Philips Hue LTW012 Firmware 1.46.13_r26312 3 Philips Hue Dimmer switches RWL021 1 Philips Hue Motion sensor SML001

Device positions:

Zigbee Stick is in a room in the first floor, ~70cm away one Osram Plug01, switched on second Osram Plug01 upstairs ~3.5m away from the other Plug01 or the Zigbee stick third Plug01 in a room upstairs ~3m away from second Plug01

Two LWB010 in the hall on the first floor ~2m away from the first Plug01 or the Zigbee stick Three LWB010 upstairs in different rooms, largest direct distance to the Zigbee Stick is ~7m

The other devices are spread all over the place on the second floor. The house is appr. 10mx10m with two floors and a basement. Walls are Wood and drywall.

My Philips Hue put in the same spot does not have any problem whatsoever and runs stable.

Okay, lets do some logging at the same minute as the error happens, it starts with plenty of these:

zigbee.0    2019-04-04 17:10:03.525 error   Zigbee publish to '0x001788010253cfc6', genOnOff - off - {} - 11 failed with error Error: request timeout
zigbee.0    2019-04-04 17:09:09.528 error   Zigbee publish to '0x001788010287f8f8', genLevelCtrl - moveToLevelWithOnOff - {"level":178,"transtime":10} - 11 failed with error Error: request timeout
zigbee.0    2019-04-04 17:09:08.012 error   Zigbee publish to '0x0017880102b31e7e', genLevelCtrl - moveToLevelWithOnOff - {"level":254,"transtime":10} - 11 failed with error Error: request timeout
zigbee.0    2019-04-04 17:09:06.501 error   Zigbee publish to '0x001788010253cfc6', genLevelCtrl - moveToLevelWithOnOff - {"level":102,"transtime":10} - 11 failed with error Error: request timeout

zigbee.0    2019-04-04 17:02:34.141 error   Zigbee publish to '0x001788010253cfc6', genOnOff - off - {} - 11 failed with error Error: AF data request fails, status code: 205. No network route. Please confirm that the device has (re)joined the n
zigbee.0    2019-04-04 17:02:03.115 error   Zigbee publish to '0x0017880102860cfc', genLevelCtrl - moveToLevelWithOnOff - {"level":254,"transtime":10} - 11 failed with error Error: AF data request fails, status code: 183. APS no ack.
zigbee.0    2019-04-04 17:01:16.771 error   Zigbee publish to '0x001788010253cfc6', genLevelCtrl - moveToLevelWithOnOff - {"level":102,"transtime":10} - 11 failed with error Error: AF data request fails, status code: 205. No network route. Ple
zigbee.0    2019-04-04 16:59:53.115 error   Zigbee publish to '0x001788010253cfc6', genOnOff - off - {} - 11 failed with error Error: AF data request fails, status code: 205. No network route. Please confirm that the device has (re)joined the
zigbee.0    2019-04-04 16:59:38.598 error   Zigbee publish to '0x001788010253cfc6', genLevelCtrl - moveToLevelWithOnOff - {"level":102,"transtime":10} - 11 failed with error Error: AF data request fails, status code: 205. No network route. Ple
zigbee.0    2019-04-04 16:59:32.548 error   Zigbee publish to '0x0017880102860cfc', genOnOff - off - {} - 11 failed with error Error: AF data request fails, status code: 183. APS no ack.

From here on, the Zigbee network is dead - nothing works anymore.

First try to restart the adaper:

zigbee.0    2019-04-04 17:13:32.158 error   Error while starting zigbee-shepherd!. Error: request timeout
zigbee.0    2019-04-04 17:13:25.648 info    Starting zigbee-shepherd

zigbee.0    2019-04-04 17:12:25.639 info    Error while starting zigbee-shepherd, attempting to fix... (takes 60 seconds)

zigbee.0    2019-04-04 17:11:48.686 info    Reset coordinator
zigbee.0    2019-04-04 17:11:48.625 info    Queue is: true
zigbee.0    2019-04-04 17:11:48.624 info    Start on port: /dev/ttyACM1 with panID 6754 channel 11
zigbee.0    2019-04-04 17:11:48.611 info    starting. Version 0.10.3 in /opt/iobroker/node_modules/iobroker.zigbee, node: v8.15.1
host.Casper 2019-04-04 17:11:46.618 info    instance system.adapter.zigbee.0 started with pid 31418
host.Casper 2019-04-04 17:11:44.082 info    stopInstance system.adapter.zigbee.0 killing pid 2479
host.Casper 2019-04-04 17:11:44.082 info    stopInstance system.adapter.zigbee.0
host.Casper 2019-04-04 17:11:44.076 info    object change system.adapter.zigbee.0

Now the green LED on the CC2531 stick goes dark.

A quick dmesg gives this:

cdc_acm 1-1.4:1.0: failed to set dtr/rts
[67744.891682] cdc_acm 1-1.4:1.0: failed to set dtr/rts
[67781.420639] cdc_acm 1-1.4:1.0: failed to set dtr/rts
[67811.419773] cdc_acm 1-1.4:1.0: failed to set dtr/rts

Now I shutdown the Odroid. It hangs in an infinite loop because of the Zigbee stick (I assume), so I switch power off. And on again.

The system starts normally. ioBroker log:

zigbee.0    2019-04-04 18:04:15.155 error   Zigbee publish to '0x0017880103e78a44', genBasic - 0 - [{"attrId":16384},{"attrId":3}] - 1 failed with error Error: AF data request fails, status code: 183. APS no ack.
zigbee.0    2019-04-04 18:03:56.419 error   Zigbee publish to '0x0017880102c115a3', genBasic - 0 - [{"attrId":16384},{"attrId":3}] - 1 failed with error Error: AF data request fails, status code: 183. APS no ack.
zigbee.0    2019-04-04 18:03:25.941 error   Zigbee publish to '0x001788010210b7e7', genBasic - 0 - [{"attrId":16384},{"attrId":3}] - 1 failed with error Error: AF data request fails, status code: 205. No network route. Please confirm that the
zigbee.0    2019-04-04 18:02:48.860 error   Zigbee publish to '0x001788010210b7e7', genBasic - 0 - [{"attrId":16384},{"attrId":3}] - 1 failed with error Error: AF data request fails, status code: 205. No network route. Please confirm that the
zigbee.0    2019-04-04 18:02:42.107 error   Zigbee publish to '0x0017880103e7874d', genBasic - 0 - [{"attrId":16384},{"attrId":3}] - 1 failed with error Error: AF data request fails, status code: 183. APS no ack.
zigbee.0    2019-04-04 18:02:33.049 info    Successfully configured 0x0017880103e78a44 RWL021
zigbee.0    2019-04-04 18:02:23.504 error   Zigbee publish to '0x0017880103e78a44', genBasic - 0 - [{"attrId":16384},{"attrId":3}] - 1 failed with error Error: AF data request fails, status code: 183. APS no ack.
zigbee.0    2019-04-04 18:02:05.082 error   Zigbee publish to '0x0017880102c115a3', genBasic - 0 - [{"attrId":16384},{"attrId":3}] - 1 failed with error Error: AF data request fails, status code: 183. APS no ack.

zigbee.0    2019-04-04 17:22:48.894 warn    Dev 0x7cb03eaa00a74a12 Plug 01 not configured yet, will try again in latest 300 sec
zigbee.0    2019-04-04 17:22:48.857 warn    Dev 0x7cb03eaa00a77a71 Plug 01 not configured yet, will try again in latest 300 sec
zigbee.0    2019-04-04 17:22:48.674 warn    Dev 0x0017880103e78a44 RWL021 not configured yet, will try again in latest 300 sec
zigbee.0    2019-04-04 17:22:48.616 warn    Dev 0x0017880103e7874d RWL021 not configured yet, will try again in latest 300 sec
zigbee.0    2019-04-04 17:22:48.038 error   Cannot get the Node Descriptor of the Device: 0x001788010287f8f8 (Error: request unsuccess: 17)
zigbee.0    2019-04-04 17:22:48.007 error   Cannot get the Node Descriptor of the Device: 0x0017880102860cfc (Error: request unsuccess: 17)
zigbee.0    2019-04-04 17:22:47.983 error   Cannot get the Node Descriptor of the Device: 0x00178801029b1c9d (Error: request unsuccess: 17)
zigbee.0    2019-04-04 17:22:47.960 warn    Dev 0x7cb03eaa00a74a12 Plug 01 not configured yet, will try again in latest 300 sec
zigbee.0    2019-04-04 17:22:47.943 error   Cannot get the Node Descriptor of the Device: 0x0017880102b31e7e (Error: request unsuccess: 17)
zigbee.0    2019-04-04 17:22:47.902 error   Cannot get the Node Descriptor of the Device: 0x001788010253cfc6 (Error: request unsuccess: 17)
zigbee.0    2019-04-04 17:22:47.872 error   Cannot get the Node Descriptor of the Device: 0x001788010287f911 (Error: request unsuccess: 17)
zigbee.0    2019-04-04 17:22:47.846 error   Cannot get the Node Descriptor of the Device: 0x7cb03eaa00a70e37 (Error: request unsuccess: 17)
zigbee.0    2019-04-04 17:22:47.815 info    new dev 0x7cb03eaa00a77a71 63245 Plug 01
zigbee.0    2019-04-04 17:22:47.665 warn    Dev 0x0017880102c115a3 RWL021 not configured yet, will try again in latest 300 sec
zigbee.0    2019-04-04 17:22:47.120 info    new dev 0x7cb03eaa00a74a12 50951 Plug 01

From here on everything works again. Until the next crash. Maybe one hour or maybe two days.

As I said above - the Hue bridge is not an option for me and I would really like to use the Zigbee stick instead. I'm not sure what causes the problem - maybe the adapter or the Sticks firmware - I do not know. But I would like to help you to fix this. Please advise what to do - don't hesitate to aski if you need additional information.

Thanks, Dieter

Edit:

Before restarting the adpater I also tried the Soft-Reset of the stick. Did not change anything.

allofmex commented 5 years ago

Please try firmware 20190315 https://github.com/Koenkk/Z-Stack-firmware/tree/dev/coordinator/max_stability/CC2531

And maybe latest adapter version from GitHub.

This combination is running much better for me since a few days (except rwl021)

mediaDS commented 5 years ago

I am using 0.10.3 - this seems to be the latest?

And thanks for the tip - I will reflash with the dev firmware and will keep you posted.

arteck commented 5 years ago

i have here the DEV also.. wroks without problems . I'm afraid the Master Version is buggy

mediaDS commented 5 years ago

Okay, thanks. I re-flashed it this morning and will keep you updated. I had a quick look at my log, it is now filled with errors like this:

Cannot get the Node Descriptor of the Device: 0x001788010210b7e7 (Error: Timed out after 10000 ms)

This device is the Hue Motion sensor SML001. Do I have to worry about the stability or should I ignore this (it is a battery driven device)?

mediaDS commented 5 years ago

Well, I tested it for about four days now - working flawlessly without a problem. I agree to arteck - koenkks master branch seems to be kaputt :)

You can close this now - my problems are solved.