I have ~10 Zigbee battery motion sensors (Iris 3326-L), and every once in a while one of them stops reporting. I monitor last-report date/times via a rule and restart the bundle via a shell script. It works, but it’s pretty heavy-handed.
I’m trying to find a way to recover individual Zigbee (or Z-Wave) sensors that become unresponsive without nuking the whole mesh, but so far haven’t found an approach.
Has anyone cracked that code yet? Is it even possible?
Restarting the binding really should not bring the device back online - it might say it’s online, but given this is a battery device, and most battery devices will not be listening, then it really shouldn’t make any difference.
The binding configures devices to send reports periodically, and if it doesn’t receive 2 reports that it expects in a row, it gets marked offline. When a report comes in, it will be marked online again…
It would be interesting to understand what you are monitoring, and what the debug logs shows is happening for the device to understand what is happening. I think it is necessary to know what problem you’re actually trying to “crack”.
Interesting, thanks for the additional information. I hadn’t considered that the sensor could be happily broadcasting away and the problem was elsewhere in the chain.
I don’t know for sure that they’re marked offline, I’ll check next time it happens. I noticed it when started graphing room temperatures over time. So when I say offline I mean the sensor is no longer updating its temperature value - it “flatlines” on the graph.
I’ve turned on debug logging for the Zigbee binding and another “last-update” item that monitors battery level from the same sensors. I will report back when it happens again and I have some more debug data.
events.log generally go back a fair way, you should find older generations in /userdata/logs
Note that if your Item gets updated to UNDEF by binding (e.g. detecting some error) or remains at NULL for some time after a reboot (failure to initially update) these are ignored and not recorded by persistence service.
Some more context. It looks like the last time was during a restart/reboot (not sure which). It looks like in this case there was an error on initialization.
The sensor in question here is: 000D6F000E260024
The item is: nLiving_Room_Temp
Blockquote
events.log.4:2020-01-17 15:32:06.273 [vent.ItemStateChangedEvent] - nLiving_Room_Temp changed from 52.934 °F to 52.97 °F
events.log.4:2020-01-17 15:32:06.275 [GroupItemStateChangedEvent] - avg_room_temps changed from 55.112 to 55.118 through nLiving_Room_Temp
events.log.4:2020-01-17 15:18:29.237 [vent.ItemStateChangedEvent] - nLiving_Room_Temp changed from NULL to 52.97 °F
events.log.4:2020-01-17 15:18:29.335 [GroupItemStateChangedEvent] - avg_room_temps changed from 55.622 to 55.169 through nLiving_Room_Temp events.log.5:2020-01-18 06:49:01.512 [temChannelLinkRemovedEvent] - Link ‘nLiving_Room_Temp => zigbee:device:7812aab4:000d6f000e260024:000D6F000E260024_1_temperature’ has been removed.
events.log.5:2020-01-18 06:50:45.991 [vent.ItemStateChangedEvent] - nLiving_Room_Temp changed from NULL to 52.97 °F
events.log.5:2020-01-18 06:53:22.784 [GroupItemStateChangedEvent] - avg_room_temps changed from 56.066 to 56.462 through nLiving_Room_Temp
events.log.5:2020-01-18 06:53:22.786 [vent.ItemStateChangedEvent] - nLiving_Room_Temp changed from 52.97 °F to 55.346 °F
It’s hard to know what is happening here - the events log doesn’t really mean a lot and I’d really need to see a debug log to understand what’s going on.
Grep’d log from a restart where one of the sensors didn’t come up is below. The reason I restarted is because the sensor wasn’t sending update. I was trying to separate out the zigbee log into a separate file when that happened, and I (of course) didn’t capture that event.
The restart that generated this log didn’t knock the sensor free - meaning it’s still not reporting. It is alive and sensing movement, though, per the LED indicator on the sensor itself.
27-Jan-2020 20:45:50.392 [INFO ] [ab.binding.zigbee.discovery.ZigBeeDiscoveryService] - 000D6F00057B8CDE: Starting ZigBee device discovery
27-Jan-2020 20:49:28.681 [DEBUG] [.openhab.binding.zigbee.handler.ZigBeeThingHandler] - 000D6F00057B8CDE: Dynamically created 7 channels
27-Jan-2020 20:49:28.684 [DEBUG] [.openhab.binding.zigbee.handler.ZigBeeThingHandler] - 000D6F00057B8CDE: Device initialization will be skipped as the device is already initialized
27-Jan-2020 20:49:28.687 [DEBUG] [nding.zigbee.internal.converter.ZigBeeConverterIas] - 000D6F00057B8CDE: Initialising device IAS Zone cluster for zigbee:ias_motionintrusion
27-Jan-2020 20:49:52.705 [DEBUG] [nding.zigbee.internal.converter.ZigBeeConverterIas] - 000D6F00057B8CDE: Initialising device IAS Zone cluster for zigbee:ias_tamper
27-Jan-2020 20:50:16.715 [DEBUG] [nding.zigbee.internal.converter.ZigBeeConverterIas] - 000D6F00057B8CDE: Initialising device IAS Zone cluster for zigbee:ias_motionpresence
27-Jan-2020 20:50:28.720 [DEBUG] [nding.zigbee.internal.converter.ZigBeeConverterIas] - 000D6F00057B8CDE: Initialising device IAS Zone cluster for system:low-battery
27-Jan-2020 20:50:52.725 [DEBUG] [.openhab.binding.zigbee.handler.ZigBeeThingHandler] - 000D6F00057B8CDE: Channel initialisation complete
27-Jan-2020 20:51:04.733 [DEBUG] [.openhab.binding.zigbee.handler.ZigBeeThingHandler] - 000D6F00057B8CDE: Error getting binding table
27-Jan-2020 20:51:04.738 [DEBUG] [.openhab.binding.zigbee.handler.ZigBeeThingHandler] - 000D6F00057B8CDE: Polling initialised at 7389421ms
27-Jan-2020 20:51:04.740 [DEBUG] [.openhab.binding.zigbee.handler.ZigBeeThingHandler] - 000D6F00057B8CDE: Done initialising ZigBee Thing handler
27-Jan-2020 20:51:05.195 [DEBUG] [rg.openhab.binding.zigbee.internal.ZigBeeDataStore] - 000D6F00057B8CDE: ZigBee saving network state complete.
It looks like for some reason the binding reinitialised and I’ve found a bug in the temperature converter that was causing an exception during the startup.
I’ve created a PR to fix that - let’s see if that helps -:
Hey Chris, when will this fix be released, i’m still having the same problem with my osram motion sensor since i updated to 2.5.1? Do i need to reinstall the binding? Thanks for fixing that. Hope my lights will turn on on their own again in the future. ^^