Zigbee controller and things suddenly all in status "unknown" (Openhabian 1.5, RPi 4, Razberry 2 Z-Wave, ITStuff CC2531 Zigbee USB)

Another observation - on the USB ITStuff CC2531 Stick, a green LED used to be on during “normal” operation, now a red LED is on.

Just for completeness, here comes the entry from the things file for the USB ITStuff CC2531:

Thing zigbee:coordinator_cc2531:zbstick "Zigbee USB Stick" [zigbee_port="/dev/ttyACM0", zigbee_baud=38400, zigbee_panid=17201, zigbee_extendedpanid="642D9925DBDE25DD", zigbee_networkkey="B515035238163CE0AF538F7DB07B80C3"]

I’m not super familiar with the CC2531 as I mostly develop with the Ember NCP these days, but it seems strange that there is nothing returned following this command. This tells the 2531 to start communicating on the network, and I think it should respond a few seconds later, and then it should come ONLINE.

Maybe the dongle is not working well maybe - I’m not 100% sure though and don’t have a 2531 system here to compare against.

Thanks @chris!
I have just contacted the dealer / manufacturer of the CC2531 device, who kindly offered to provide me with a replacement.
Once this arrives, I will test again and let the community know here about the results …

Hello all,
I have received today the new CC2531 device. It’s being recognized as online in the Paper UI, but I find it odd that although I am using the same entry in the things file for it as for the old/broken one

Thing zigbee:coordinator_cc2531:zbstick "Zigbee USB Stick" [zigbee_port="/dev/ttyACM0", zigbee_baud=38400, zigbee_panid=17201, zigbee_extendedpanid="642D9925DBDE25DD", zigbee_networkkey="B515035238163CE0AF538F7DB07B80C3"]

there are different values for PAN ID and extended PAN ID shown in the Paper UI for it.

I suspect that this is also the reason why the other Zigbee Things are all shown as “Offline-Gone”:

I had actually hoped that by using the same parameters for the new hardware would avoid the need to reconnect all things again.

I have also tried to change the differing parameters for the Zigbee USB stick in the Paper UI to match the ones in the things file, but whenever I am doing that, I am getting the error message “ERROR: 409 Conflict” in the lower right side of the browser.

Does anyone have a good idea how to get the PAN ID and extended PAN ID matching from the things file enforced?

Zigbee related logs:
I still have the debug mode on as @chris had advised earlier, therefore there is a huge amount of zigbee related entries in the log.

One can see that the parameters from the things file are read:

2020-09-11 13:39:36.626 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - PANID 17201
2020-09-11 13:39:36.628 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - EPANID 642D9925DBDE25DD
2020-09-11 13:39:36.637 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - Network Key B515035238163CE0AF538F7DB07B80C3

but a bit later

2020-09-11 13:39:41.565 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - ZigBee Initialise: Previous device configuration was: channel=CHANNEL_11, PanID=60911, EPanId=F62E4FD0B65143B7

and then

2020-09-11 13:39:42.490 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - ZigBee initialise done. channel=CHANNEL_11, PanId=60911  EPanId=F62E4FD0B65143B7

No - this is not possible with the TI stick. The ZigBee security will not allow this unless special configuration is made.

You need to reinitialse the stick, and add your devices into the new network.

Thanks for the clarification @chris !
I will try this out :slight_smile:

1 Like

So this afternoon I reconnected the previously connected devices (several Osram LED bulbs, one Osram Flex and an Osram Plug). This went well except the fact that after I think it was the fifth device the Zigbee part of the system got kind of hung, i.e. I wasn’t able to switch any Zigbee device any more. A reboot after every added Zigbee device helped me out then. As the last device I added successfully an Tradfri bulb, which previously I had not worked with. Now I am struggling with adding a Tradfri motion sensor, which turns out to be challenging - but for the latter, I will open a new thread … :slight_smile:
Thanks @chris for helping me to get through this!

@chris - maybe of interest for you:
When I just tried to add another Osram bulb, the Zigbee part of the system hung again and looks like exactly at that time the following log entries were generated:

2020-09-11 18:20:46.670 [ERROR] [531.network.packet.ZToolPacketStream] - Checksum of packet failed: received =226 expected = 230. Len = 3, ApiId = 0x4681, Packet = [7, 0, 33]
2020-09-11 18:20:46.673 [ERROR] [531.network.packet.ZToolPacketStream] - Packet parsing failed due to exception.
com.zsmartsystems.zigbee.dongle.cc2531.network.packet.ZToolParseException: Packet checksum failed
	at com.zsmartsystems.zigbee.dongle.cc2531.network.packet.ZToolPacketStream.parsePacket(ZToolPacketStream.java:125) [bundleFile:?]
	at com.zsmartsystems.zigbee.dongle.cc2531.network.packet.ZToolPacketParser.run(ZToolPacketParser.java:107) [bundleFile:?]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_265]

I don’t have a TI system so can’t really do a lot of development here unfortunately. If the checksum is just a transient, then it should automatically recover.

Hi @chris , good morning :slight_smile:
This morning I experienced the same problem with the Zigbee part auf my automation “hanging”/becoming unresponsive after switching an Osram bulb physically off and on again (testing what I call the “emergency feature” of switching a lamp on when the smartphone with the remote control is not at reach).
After that switching activity, the following entries were in the log:

2020-09-12 07:44:56.638 [ERROR] [531.network.packet.ZToolPacketStream] - Checksum of packet failed: received =135 expected = 130. Len = 72, ApiId = 0x45b1, Packet = [234, 115, 0, 8, 0, 3, 113, 209, 164, 220, 79, 37, 15, 179, 165, 154, 4, 10, 170, 62, 176, 124, 82, 11, 37, 2, 15, 254, 113, 209, 164, 220, 79, 37, 15, 179, 137, 99, 0, 10, 170, 62, 176, 124, 213, 35, 37, 2, 15, 251, 113, 209, 164, 220, 79, 37, 15, 179, 218, 120, 20, 0, 0, 184, 209, 240, 107, 107, 5, 2, 15, 254]
2020-09-12 07:44:56.641 [ERROR] [531.network.packet.ZToolPacketStream] - Packet parsing failed due to exception.
com.zsmartsystems.zigbee.dongle.cc2531.network.packet.ZToolParseException: Packet checksum failed
	at com.zsmartsystems.zigbee.dongle.cc2531.network.packet.ZToolPacketStream.parsePacket(ZToolPacketStream.java:125) [bundleFile:?]
	at com.zsmartsystems.zigbee.dongle.cc2531.network.packet.ZToolPacketParser.run(ZToolPacketParser.java:107) [bundleFile:?]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_265]

Unfortunately, the system does not recover from this situation by itself, the only way I am currently aware of to resolve is a reboot of the RPi 4.

What’s the total number of devices that you now have paired through the CC2531? It can’t handle too many devices, with experiences varying from about 15 devices upwards…

Hi @hafniumzinc, at the moment, there are 9 devices connected to the Zigbee part (7 bulbs (6 Osram, 1 Tradfri), 1 Osram flex and 1 Osram plug).

1 Like

The number of devices will be set in the firmware, but shouldn’t hopefully be less than 10.

I’m not sure why there seems to be a systematic CRC error with this frame - CRC errors will, of course occur from time to time, but they should recover. Without seeing a log I can’t comment too much more, but it’s a little strange that you’re having this issue when I think lots of others are using the CC2531 without problems

I’m not sure what firmware you have - maybe there’s an incompatibility there. If you provide a log I’ll take a quick look to see what I can see, but unfortunately as I said earlier I don’t have a test setup with this dongle so can’t really do too much investigation.

Hi @chris, thanks, the cc2531 usb stick I am using comes with a preinstalled firmware which the shop here in Germany describes as “latest from Koenkk” .

I am able to reproduce the issue now by simply switching off electricity for a zigbee bulb and switch electricity on again. I am attaching here the debug log entries that are created in the seconds after switching the electricity on:

events.log (9.8 KB) openhab.log (349.7 KB)

That’s not normally the one we use with the binding - normally the TI firmware from the manufacturer is recommended. Some versions of the MQTT version have also worked, but I’ve no idea what this version is.

I’ll take a quick look to at least see if I can prevent the issue killing the stack, but I’m not really in a position to be able to do much more than this unfortunately.

I’ve created a PR that will hopefully stop this aborting. Since I can’t test this, I cant be 100% sure, so we’ll have to wait and see.

My guess is that the errors are happening due to corrupt frames. This can happen, although I’m not sure why it’s happening more for you than others and really it should be very rare that a frame is corrupt over USB. It looks like a corrupt frame can cause it to bomb out of the handler, so I’ll try and stop that, but it won’t prevent the underlying corruption if that’s what is happening. It’s strange though that this is only affecting you :confused:.

It will take a few days for this to filter through the system.

Thanks @chris:slight_smile:
I am also happy to test another Zigbee USB stick in parallel for comparison, I saw that in another post you recommended the Telegesis ETRX3 in Feb 2018 (does not seem to be easy to get here (Germany) currently) - would that also be your current recommendation, or a different one which is easy to get in
Germany/EU?

Hello all, a couple of updates from my side on this topic.
Last week I was traveling and the family members at home got a bit annoyed with the lack of stability of my setup, I had to remotely reboot the openhabian system worst case several times a day as the zigbee part was hanging/crashing as described above.
Since Friday I was able to stabilize the setup by reducing the number of registered Zigbee devices to eight, I have not experienced any hang/crash since I did that.
In parallel I have ordered a SMaBiT (Bitron Video) ZigBee USB Wireless Stick, which should arrive tomorrow to be able to conduct experiments for comparison.
Have a great day everyone!

Hi all,
I started using the Bitron Video Zigbee USB Stick today. In Paper UI, it appears like that:


Afterwards I added 10 Zigbee devices without issues - as you can read above, an amount of 10 devices caused constant issues with the cc2531 stick I used before. So far everything is stable and working as expected, which is positive.