Open darkogorgievski opened 3 years ago
The only way for a sensor to get to "GONE" is when a message with "reachable": false
is received.
If you disable/enable the thing, does it come back online? You could try setting the binding to TRACE logging and see what messages for this sensor are received if you disable/enable.
Disabling and then enabling changed all 3 sensors to ONLINE. I changed the log to TRACE before that, but I don't know if I see something extra than in my normal log. Here is what i got:
2021-02-26 22:40:16.695 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'deconz:firesensor:conbeeII:chSmokeDetectorBedroom' changed from UNINITIALIZED (DISABLED) to INITIALIZING
2021-02-26 22:40:16.700 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'deconz:firesensor:conbeeII:chSmokeDetectorBedroom' changed from INITIALIZING to UNKNOWN
2021-02-26 22:40:16.702 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Sensor_CPUTemp' changed from 33.1 to 32.1
==> /var/log/openhab/openhab.log <==
2021-02-26 22:40:16.756 [INFO ] [org.openhab.core.model.script.FILE ] - health:Smoke Detector Bedroom set healthy ON|Smoke Detector Bedroom is ONLINE
2021-02-26 22:40:16.768 [INFO ] [org.openhab.core.model.script.FILE ] - health:Smoke Detector Bedroom set healthy ON|Smoke Detector Bedroom is ONLINE
==> /var/log/openhab/events.log <==
2021-02-26 22:40:16.796 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'deconz:firesensor:conbeeII:chSmokeDetectorBedroom' changed from UNKNOWN to ONLINE
2021-02-26 22:40:16.800 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'itmSmokeDetectorBedroomHealth' received command ON
2021-02-26 22:40:16.803 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'SmokeDetectorLastSeenBedroom' changed from 2021-02-07T22:51:00.000+0100 to 2021-02-26T21:40:00.000+0000
2021-02-26 22:40:16.809 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'itmSmokeDetectorBedroomHealth' received command ON
2021-02-26 22:40:16.819 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'itmSmokeDetectorBedroomHealth' changed from OFF to ON
2021-02-26 22:40:35.628 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'deconz:firesensor:conbeeII:chSmokeDetectorHallFF' changed from OFFLINE (GONE): Not reachable to UNINITIALIZED
2021-02-26 22:40:35.650 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'deconz:firesensor:conbeeII:chSmokeDetectorHallFF' changed from UNINITIALIZED to UNINITIALIZED (DISABLED)
2021-02-26 22:40:37.102 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'deconz:firesensor:conbeeII:chSmokeDetectorHallFF' changed from UNINITIALIZED (DISABLED) to INITIALIZING
2021-02-26 22:40:37.117 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'deconz:firesensor:conbeeII:chSmokeDetectorHallFF' changed from INITIALIZING to UNKNOWN
2021-02-26 22:40:37.190 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'SmokeDetectorLastSeenHallFF' changed from 2021-02-07T23:08:00.000+0100 to 2021-02-26T21:26:00.000+0000
2021-02-26 22:40:37.211 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'deconz:firesensor:conbeeII:chSmokeDetectorHallFF' changed from UNKNOWN to ONLINE
The interesting message is the last one before it goes to GONE.
OK, I will follow up and post it when it happens (it happened 2-3 times already). It might take several days
I didn't follow this thing properly, so I saw the sensors "GONE" and then I restarted the rPi. Here is the log:
2021-05-21 09:09:54.131 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'deconz:firesensor:conbeeII:chSmokeDetectorHallGF' changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to INITIALIZING
2021-05-21 09:09:54.133 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'deconz:firesensor:conbeeII:chSmokeDetectorHallGF' changed from INITIALIZING to UNKNOWN
2021-05-21 09:09:54.134 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'deconz:firesensor:conbeeII:chSmokeDetectorHallGF' changed from UNKNOWN to OFFLINE (GONE): Not reachable
Similar for the other 2 sensors that receive status gone The REST API returns this
9: {
"config": {
"battery": 100,
"enrolled": 0,
"on": true,
"pending": [],
"reachable": true
},
"ep": 1,
"etag": "6ae2457a69504e434978e204c13db485",
"lastseen": "2021-05-21T07:20Z",
"manufacturername": "Heiman",
"modelid": "SmokeSensor-EM",
"name": "Smoke Sensor Hall Ground Floor",
"state": {
"fire": null,
"lastupdated": "none",
"lowbattery": null,
"tampered": null
},
"swversion": "1.1.1",
"type": "ZHAFire",
"uniqueid": "00:0d:6f:00:14:cd:3a:74-01-0500"
},
If I disable and re-enable the sensor from the UI, it comes back to online
2021-05-21 09:50:53.828 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'deconz:firesensor:conbeeII:chSmokeDetectorHallGF' changed from OFFLINE (GONE): Not reachable to UNINITIALIZED
2021-05-21 09:50:53.844 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'deconz:firesensor:conbeeII:chSmokeDetectorHallGF' changed from UNINITIALIZED to UNINITIALIZED (DISABLED)
2021-05-21 09:50:57.573 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'deconz:firesensor:conbeeII:chSmokeDetectorHallGF' changed from UNINITIALIZED (DISABLED) to INITIALIZING
2021-05-21 09:50:57.582 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'deconz:firesensor:conbeeII:chSmokeDetectorHallGF' changed from INITIALIZING to UNKNOWN
2021-05-21 09:50:57.611 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'deconz:firesensor:conbeeII:chSmokeDetectorHallGF' changed from UNKNOWN to ONLINE
This issue has been mentioned on openHAB Community. There might be relevant details there:
https://community.openhab.org/t/deconz-binding-strange-behaviour/113979/3
Unreachable should result in status OFFLINE, not GONE - according to documentation: https://www.openhab.org/docs/concepts/things.html#status-details
I don't know if this bug could indicate to the framework that it doesn't need to care about the thing anymore, in which case it would never come back online again? Alternatively we have two separate issues. I'm experiencing the same problem with a socket outlet I'm currently testing with a new deCONZ installation. The device will be marked as GONE after being disconnected from its power source, and when it becomes reachable again, this it not detected by the binding.
Thing:
Overview:
Thing:
Overview:
The binding can only detect it's connected again when it either sends a state update (one that is reported via websocket) or if the state is actively requested (e.g. on initialization when you disable/enable the thing). The framework doesn't care about GONE.
This is an older issue, is there anything left to fix or document?
The problem is still the same: deconz does not report a change from reachable=false
to reachable=true
over the web socket. It only reports state changes (in case of the smoke detector fire/no fire). So the thing status will change only when the first state change happens.
Expected Behavior
Thing should be online since REST API returns recent "lastseen" change
Current Behavior
I have two Heiman Smoke detectors and they get status "gone" eventhough the REST API has update on the "lastseen" field. The same happens also to one of the 5 Xiaomi Honeywell smoke detectors I have. The result of the API call for the three detectors is (The moment of writing the bug report is 26/02/2021 21:00 CET):
Screenshot of things:![image](https://user-images.githubusercontent.com/34253919/109348872-62dba280-7875-11eb-89b7-69c51a385bc7.png)
Also eventhough the items are defined in a textual item file, not all items are shown in the UI for the "Gone" sensors:
My item file configuration:
Screenshot of the channels in the gone things:
Possible Solution
Steps to Reproduce (for Bugs)
Context
I have some safety related rules upon smoke detection, like lights on and shutters open to enable safe escape, but some of my sensors are failing to connect
Your Environment
openHABian 3.0.1 Release = Raspbian GNU/Linux 10 (buster) Kernel = Linux 5.10.11-v7l+ Platform = Raspberry Pi 4 Model B Rev 1.4