Zigbee Devices Going Offline

This is quite a common problem - we see this a lot with ZWave issues as well where people need to use a powered USB hub with the RPi to get it working reliably.

My first Zigbee coordinator is a Elelabs Zigbee shield which is connected to the PIO of the Rpi.
The other one is the ā€œ357 long rangeā€ (dont recall its name. Its the one I bought from you for sniffing long time ago). Its connected directly the USB port of my Odroid C2 atm.
My Zwave dongle is connected directly to my main Rpi 3B+. Never had an issue with that.

Anyway - I will ofcouse give it a try soonā€¦ I need to reorganize some stuff first to release my active USB hub from ā€œdutyā€.

I am running mine in a USB 2.0 hub that is connected to a PC connected to USB 2.0 port in computer so I can keep the interference down. USB 3.0 does interfere with 2.4ghz, for example, mini keyboard and wifi dongle, radios connected directly but that can be resolved by just using a small extension cable.

My Aquara temperature sensors drops off constantly, but after reading a lot of threads here I found out it does not like hops, it works great when it is directly connected to coordinator. So I am not too worried about this as of now.

Currently, I reset all my Zwave devices so it shows Online,cleared logs and set Zigbee log to debug so hopefully I can capture relevant information.

After quite a while of not changing anything I updated openHAB to 2.5.7 yesterday. The situation looking at zigbee devices after updating stays the same: when openHAB was restarted, all things were online. Today the usual supects are shown as offline again.
Iā€™ll check, if resetting the things changes the behavior and stay online reliably as they should again.

Please provide a log so I can take a look. If the device doesnā€™t respond to the poll, then the code I added obviously will not have helped.

I generated a log today. Things have been ā€œonlineā€ today when i started the log, because i restarted openHAB yesterday. After starting the log, i did some status changes for every device. Some minutes later the things are marked as ā€œOfflineā€ in paperui.

2020-07-27 zigbee.log (640.6 KB)

I donā€™t think the last change you applied helped to get rid off this issue.
Next iā€™m going to reset the things.

If i werenā€™t exactly the same 5 of 6 things, i would suspect an other potential source of problems: i run a raspi with z-wave circuit board, rfxcom and zigbee Telegesis near a wlan repeater. Iā€™ll move the repeater because of some strange behaviour of my repeater-connecting wlan devices. If this has any effect, iā€™ll tell you here.

Can you talk me through what this log shows? Itā€™s pretty short, and I donā€™t see any devices going OFFLINE. That said, I donā€™t see any logging other than from the ZigBee binding, so maybe this is filtering out stuff that Iā€™d need to see to understand what is happening?

Can you at least please tell me exactly what time the device went OFFLINE?

From what I can tell from the code that tracks the state, there were no devices that triggered the transition to OFFLINE here either, so Iā€™m a bit confused what is being shown?

I spent some more time looking through the log, and really donā€™t see any problems. All commands seem to be acknowledged and states updated, and this is all pretty fast. Thereā€™s no sign of anything going OFFLINEā€¦

Iā€™d really need to know what is happening, or to have a more detailed log that shows the wider view of what is happening in OH.

Iā€™ll attach the events.log, so you can have a look what happend.
2020-07-27 events.log (7.0 KB)

13:34:58.967 switch on power HDi_Wz_Decke3_Dim for device Lam_Wz_Decke3_1*
13:35:33.139 state changes of Lam_Wz_Decke3_1* (Decke1_1 is a typo in items file) 001788010337DD9F
13:36:12.360 state changes of Lam_Wz_Tisch_Dim 00178801045965bb
13:36:22.660 state changes of Lam_Wz_Schrank_EA 7cb03eaa00ad44c7
13:36:36.375 state changes of am_Ku_SchrankRe_EA 7cb03eaa00acebf6
13:36:56.597 state changes of Lam_Sz_BettLi_Farb ccccccfffebb12f0
13:37:13.798 state changes of Lam_Sz_BettRe_Farb ec1bbdfffe271435

I did not filter anything. zigbee log settings:

log:set debug org.openhab.binding.zigbee
log:set debug com.zsmartsystems.zigbee
log:set info com.zsmartsystems.zigbee.dongle.ember.internal.ash

The log does not show anything but what is shown below for some minutes after the version i attached above.

2020-07-27 13:37:21.507 [DEBUG] [gesis.internal.TelegesisFrameHandler] - TX Telegesis queue: 1
2020-07-27 13:37:21.508 [DEBUG] [gesis.internal.TelegesisFrameHandler] - TX Telegesis: TelegesisDisplayNetworkInformationCommand [device=null, channel=null, power=null, panId=null, epanId=null]
2020-07-27 13:37:21.511 [DEBUG] [gesis.internal.TelegesisFrameHandler] - TX Telegesis Data:AT+N?

2020-07-27 13:37:21.525 [DEBUG] [gesis.internal.TelegesisFrameHandler] - RX Telegesis Data:+N=COO,11,-07,A65E,665871B3A8F70766
2020-07-27 13:37:21.527 [DEBUG] [gesis.internal.TelegesisFrameHandler] - RX Telegesis Data:OK
2020-07-27 13:37:21.529 [DEBUG] [gesis.internal.TelegesisFrameHandler] - RX Telegesis: TelegesisDisplayNetworkInformationCommand [device=COO, channel=11, power=-7, panId=42590, epanId=665871B3A8F70766, status=SUCCESS]

I canā€™t tell when the devices went offline exactly. I just realized, that they were shown ā€œOFFLINEā€ in paperui after doing the actions shown in events.log.

I had to restart openHAB some minutes ago now, so all zigebee devices are shown online again until tomorrow(?).

But I really need to know when this is. Youā€™ve provided me a log that I assumed shows the problem, but I donā€™t see anything that shows the devices are OFFLINE.

Normally OH logs also include information level logging that shows this - if youā€™re not including this, or youā€™ve completely disabled all other logging, then Iā€™ve no way to know that a device has gone offline.

Please can you provide a log that shows the issue?

Thanks.

I fully understand. Iā€™d really like to provide the desired info. My log settings (not set zigbee to debug):

ROOT                                               ā”‚ WARN
com.zsmartsystems.zigbee                           ā”‚ WARN
com.zsmartsystems.zigbee.dongle.ember.internal.ash ā”‚ WARN
javax.jmdns                                        ā”‚ ERROR
javax.mail                                         ā”‚ ERROR
org.apache.karaf.jaas.modules.audit                ā”‚ INFO
org.apache.karaf.kar.internal.KarServiceImpl       ā”‚ ERROR
org.apache.karaf.shell.ssh.SshUtils                ā”‚ ERROR
org.apache.karaf.shell.support                     ā”‚ OFF
org.eclipse.lsp4j                                  ā”‚ OFF
org.eclipse.smarthome                              ā”‚ INFO
org.eclipse.smarthome.rules                        ā”‚ INFO
org.jupnp                                          ā”‚ ERROR
org.openhab                                        ā”‚ INFO
org.openhab.binding.amazonecho                     ā”‚ INFO
org.openhab.binding.zigbee                         ā”‚ INFO
org.openhab.binding.zwave                          ā”‚ INFO
org.openhab.ui.paper                               ā”‚ WARN
org.openhab.ui.paper.internal                      ā”‚ INFO
org.ops4j.pax.url.mvn.internal.AetherBasedResolver ā”‚ ERROR
org.ops4j.pax.web.pax-web-runtime                  ā”‚ OFF
smarthome.event                                    ā”‚ DEBUG
smarthome.event.InboxUpdatedEvent                  ā”‚ ERROR
smarthome.event.ItemAddedEvent                     ā”‚ ERROR
smarthome.event.ItemRemovedEvent                   ā”‚ ERROR
smarthome.event.ItemStateEvent                     ā”‚ ERROR
smarthome.event.ThingAddedEvent                    ā”‚ ERROR
smarthome.event.ThingRemovedEvent                  ā”‚ ERROR
smarthome.event.ThingStatusInfoEvent               ā”‚ ERROR
smarthome.event.ThingUpdatedEvent                  ā”‚ DEBUG

Anything i should change?

I suspect that this is one that I need - this shows when devices go ONLINE or OFFLINE (I think). However since I also didnā€™t see the binding side showing that the tracker timed out, Iā€™m not sure that this is even coming from the binding - or possibly this log simply didnā€™t contain the errorā€¦

Ok, i set this to INFO. Now iā€™m getting lines like

2020-07-27 22:47:56.958 [event.ThingStatusInfoEvent] - 'rfxcom:temperaturehumidity:b7166a07:58625' updated: ONLINE

Iā€™ll have a look tomorrow evening, if something has gone OFFLINE.

In events.log i found:

2020-07-28 00:50:06.754 [event.ThingStatusInfoEvent] - 'zigbee:device:04000B88:00178801045965bb' updated: OFFLINE
2020-07-28 00:50:06.757 [hingStatusInfoChangedEvent] - 'zigbee:device:04000B88:00178801045965bb' changed from ONLINE to OFFLINE

openHAB was restarted at 15:58.

As DEBUG was not enabled (INFO / WARN only) for the zigbee binding, thereā€™s absolutely nothing in openhab.log. Iā€™ll go for DEBUG again later, now that we see the OFFLINE change.

Iā€™ve got a longer logfile finally. Please download zip file here.

openHAB restarted when lofiles starts (~14:57).
There are two zigbee THINGs to look at:
00178801045965bb - HUE bulb
This one had been switched off all the time and went offline at 23:48:16.240 - see events.log

001788010337dd9f - HUE transformer / LED
This one has been switched on for quite a while when it went offline at 23:49:46.338 but stayed on.

All other THINGS seem to be ok after selecting ā€œInitialize deviceā€ in paperui for each one. ā€œInitialize deviceā€ for both THINGS that have gone offline produces an error and does not seem to work.

Hopefully the logs will give a hint whatā€™s going on.

Net step on my side would be to reset the two THINGs / devices an reinclude them.

Iā€™ve made a change to the binding. I found that the notifications from the framework that channels are linked are occurring before the thing handler is initialised, so this stops the polling working.

This log also explains why the device isnā€™t sending reports - I suspect some of these are old devices - possibly old Hue bulbs? They only have a single table entry in their reporting table, and I see that the table is full.

Anyway, hopefully this will at least resolve the devices going offline as the polling should now work.

2 Likes

Good to see the logs bringing something to the light.

Yes. A HUE bulb and a HUE trafo/LED I bought the devices 2 years ago. The bulb, bought from a promotion for a low price, maybe even older.

Iā€™ll go for the new binding and let you know what i see. Thx!

1 Like

I installed 2.5.8 yesterday. The thing in question did not go offline until now.

I set loglevel to debug anyway and will wait until tomorrow. But ATM it looks like your improvement caused a change to the better - from my point of view. :slight_smile:

1 Like

Thing is still online. Thanks for persistently having worked on that one.

Iā€™ll keep an eye on the thing the next days. If it will go offline again unexpectedly, iā€™ll set log to debug once more, restart openHAB and wait for the next unpleasant event ā€¦

1 Like

Thanks for the feedback - Iā€™m pleased it looks positive still :slight_smile: