[SOLVED] Zigbee binding - seems to loose connections


I use the Zigbee binding on OH 2.5.0 M1. I have an Ember Zigbee stick and IKEA Tradfri bulbs. Worked fine for a while. Today, after experimenting with the Tradfri remote, my setup became instable. Everything seems fine, all bulbs show “online” in PaperUI. However, none of the bulbs reacts on any command given from Basic UI.

One thing that I see in Paper UI that doesn’t seem right is this:

Normally, the zigbee_neighbors and zigbee_routes are not empty.

An other thing that I changed today, what could be related, is that I moved the Thing definition of the Zigbee stick to a .things file. I did this, because I had to manually select the right serial port after each restart.

Of course, I can change that back, but I’d rather understand whats going wrong before doing so. I might not be the cause of my problem and in that case I do a lot of work to find that out and still don’t have a working system.

Any help would be appreciated!

Best regards,
Bart Kummel

I’m not sure there’s much that I can comment on here. Do you have a logfile that shows what is happening? Or better still a sniffer log? Did you accidentally reset the network while you were experimenting?

Hi Chris,

I can send a logfile, which one do you need?

I didn’t reset the network, I don’t even know how to do that.

The problem occurred twice. Both of the times I could only fix it by resetting the bulbs, so they were re-discovered. The 3rd time I left it, since it was time to eat.

The debug log from the binding - as per the binding docs.

A sniffer log would be good, but you probably can’t do that without a sniffer.

If you don’t know how to do it, are you sure you didn’t do it? :wink: It’s just a config parameter, so if you set it wrong, it will reset everything.

if you turn the bulbs off and on again does that solve it? This will cause them to perform some communications with the coordinator.

I’m afraid I don’t have debug level enabled. So I can only get such a log if I reproduce the problem. That’s quite some work, so I can’t do that today.

Sure. What parameter is that? I’d love to know, so I can confirm that that’s not the problem.

Nope, I had to do a factory reset on the bulb. (Switching it on/off 6 times in case of the Tradfri bulbs.) The first time, I had to actually re-add the bulbs, because the ID changed. This was because the Zigbee stick was now added via a .things file. Second time, the ID didn’t change, so the bulbs were recognized and rebound to the existing thing.

I had the same problem after deleting a zigbee thing/device via PaperUI. I have also no logs to provide, but maybe this information helps.

Hi Chris,

I finally managed to reproduce the problem and create a log file with DEBUG logging enabled. Here’s the log file: openhab.log (943.3 KB)

Please note: I removed all lines before today.

  • At 2019-07-06 19:54:59, I enabled debug logging, as per the instructions in the docs
  • At 2019-07-06 19:56:05, I made a small change to my zigbee.things file, causing the Refreshing model 'zigbee.things' log line.

The behavior I observe from the moment the model gets refreshed is that all bulbs seems to be removed from the Zigbee network. In PaperUI, when I click on SHOW PROPERTIES, everything is empty, so e.g. the zigbee_routes and zigbee_neighbors are both empty arrays.

The only way to get things working again, is to give the bulbs a factory reset and let them be discovered again. Of course, this is not a usable solution. Every restart of OpenHAB or just the Zigbee binding and every change to the zigbee.things configuration file will force me to reset all bulbs and let them be discovered again.

I hope you will be able to pinpoint what the problem is, using the log file.

Best regards,
Bart Kummel

I was looking through the log file myself, and found this:

2019-07-06 19:56:06.485 [DEBUG] [bee.handler.ZigBeeCoordinatorHandler] - ExtendedPanId or PanId not set: initializeNetwork=true

Sounds like this could be the culprit. As I interpret this line, it says the network is being initialized, because no PanId or ExtendedPanId is set.

I just added zigbee_panid and zigbee_extendedpanid to my zigbee.things config file. And now my problem is solved. The zigbee network doesn’t get initialized every time the config file changes.

Funny thing is, the documentation literally states that this is expected behavior. I somehow did not read the docs well enough and missed this. My bad, of course. However, may I suggest a small improvement to the software? I think it would be helpful to log a WARNING (or even ERROR?) if a .things file does not contain zigbee_panid, zigbee_extendedpanid and zigbee_networkkey. This should’t be hard to implement, it can be done on the spot in the code where this line is logged:

ExtendedPanId or PanId not set: initializeNetwork=true

Anyway, problem solved! Thanks for your help, @chris!

Unfortunately it’s not possible to implement this since the binding does not know if the configuration is defined in a thing file, or through the UI. Leaving these at the default value is of course valid, so the binding can’t tell the difference here.

Anyway, glad it’s working now.

I have the exact same issue, I also did not reset my stick. And this (all devices must be resetted and added again) occurs to me like once in a month. I don’t want to reset and add all devices everytime again. I have my things added via the openhabUI. Do you guys have any clue what that could be?