openhab / org.openhab.binding.zwave

openHAB binding for Z-Wave
Eclipse Public License 2.0
170 stars 202 forks source link

battery device (thing) is never offline despite removed battery for weeks. #1742

Closed TheTrueRandom closed 2 years ago

TheTrueRandom commented 2 years ago

If the problem is associated with a device, please provide the following -:

``` 0xc7837816 4 4 0x10f 0x1003 0xc02 false false true false true 40000 1000 COMMAND_CLASS_ZWAVEPLUS_INFO COMMAND_CLASS_BASIC COMMAND_CLASS_VERSION COMMAND_CLASS_MANUFACTURER_SPECIFIC COMMAND_CLASS_DEVICE_RESET_LOCALLY COMMAND_CLASS_ASSOCIATION_GRP_INFO COMMAND_CLASS_ASSOCIATION COMMAND_CLASS_POWERLEVEL COMMAND_CLASS_WAKE_UP COMMAND_CLASS_BATTERY COMMAND_CLASS_ALARM COMMAND_CLASS_CRC_16_ENCAP COMMAND_CLASS_CONFIGURATION COMMAND_CLASS_SENSOR_MULTILEVEL COMMAND_CLASS_MULTI_CHANNEL_ASSOCIATION COMMAND_CLASS_APPLICATION_STATUS COMMAND_CLASS_SENSOR_ALARM COMMAND_CLASS_SECURITY COMMAND_CLASS_FIRMWARE_UPDATE_MD 1 1 0 Lifeline 0x0 0x1 COMMAND_CLASS_SENSOR_MULTILEVEL COMMAND_CLASS_DEVICE_RESET_LOCALLY COMMAND_CLASS_ALARM COMMAND_CLASS_BATTERY 1 2 2 0 Smoke Alarm 0x71 0x1 COMMAND_CLASS_BASIC 3 3 0 Tamper 0x71 0x7 COMMAND_CLASS_ALARM 4 4 0 Smoke Alarm 0x71 0x1 COMMAND_CLASS_SENSOR_ALARM 5 5 0 Tamper 0x71 0x7 COMMAND_CLASS_SENSOR_ALARM 0 BASIC_TYPE_ROUTING_SLAVE GENERIC_TYPE_SENSOR_NOTIFICATION SPECIFIC_TYPE_NOTIFICATION_SENSOR 0 COMMAND_CLASS_NO_OPERATION 1 1 false 1 COMMAND_CLASS_BASIC 1 1 false 1 true COMMAND_CLASS_APPLICATION_STATUS 1 1 false 1 COMMAND_CLASS_SENSOR_MULTILEVEL 8 1 false 8 TEMPERATURE TEMPERATURE true true COMMAND_CLASS_CRC_16_ENCAP 1 1 false 1 COMMAND_CLASS_ASSOCIATION_GRP_INFO 1 1 false 1 1 3 4 5 COMMAND_CLASS_DEVICE_RESET_LOCALLY 1 1 false 1 COMMAND_CLASS_ZWAVEPLUS_INFO 1 1 false 2 1 ROLE_TYPE_SLAVE_SLEEPING_REPORTING NODE_TYPE_ZWAVEPLUS_NODE true COMMAND_CLASS_CONFIGURATION 1 1 false 1 1 1 1 2 false false 2 2 1 0 false false 3 3 1 0 false false 4 4 1 0 false false 10 10 1 0 false false 11 11 2 255 false false 12 12 2 0 false false 13 13 1 0 false false 14 14 1 15 false false 20 20 2 1 false false 21 21 1 10 false false 30 30 1 55 false false 31 31 2 1 false false 32 32 2 180 false false COMMAND_CLASS_ALARM 5 1 false 5 SMOKE SMOKE HEAT HEAT BURGLAR BURGLAR POWER_MANAGEMENT POWER_MANAGEMENT SYSTEM SYSTEM true true COMMAND_CLASS_MANUFACTURER_SPECIFIC 1 1 false 2 false 271 3074 4099 COMMAND_CLASS_POWERLEVEL 1 1 false 1 0 0 COMMAND_CLASS_FIRMWARE_UPDATE_MD 1 1 false 3 COMMAND_CLASS_BATTERY 1 1 false 1 100 false true COMMAND_CLASS_WAKE_UP 2 1 false 2 1 21600 4200 65535 21600 1 true COMMAND_CLASS_ASSOCIATION 2 1 false 2 5 COMMAND_CLASS_VERSION 2 1 false 2 LIB_SLAVE_ENHANCED 4.24 3.3 2 COMMAND_CLASS_TIME_PARAMETERS 0 0 false 0 COMMAND_CLASS_MULTI_CHANNEL_ASSOCIATION 2 1 false 2 5 COMMAND_CLASS_SECURITY 1 1 false 1 COMMAND_CLASS_SENSOR_ALARM 1 1 false 1 GENERAL GENERAL SMOKE SMOKE HEAT HEAT true true 1 2022-02-22 04:52:11.20 UTC ```

Expected Behavior

As stated in the documentation a battery device will be DEAD/OFFLINE "approximately twice the wakeup period".

Current Behavior

I use a FGSD002 Smoke Detector and a Aeotec AEOEZW090-C usb zwave stick. I added the controller and the device as a thing to openhab and it works perfectly. However, the device is always listed as ONLINE. By now I removed the batteries of the smoke detector for a week and the device is still listed at ONLINE.

Also I noticed that specifying wakeup_interval on the thing configuration is ignored. I can read the value on the UI though, which is set to 21600. So the device should be considered OFFLINE after approx. 12h. By now I removed the batteries for 168h.

Possible Solution

Steps to Reproduce (for Bugs)

  1. Add the below configuration to openhab
  2. See the device to be listed as online on openhab
  3. Remove the batteries of the smoke detector
    Bridge zwave:serial_zstick:controller "ZWave Controller" [ port="/dev/ttyACM1", security_networkkey="<hidden>" ] {
    fibaro_fgsd002_03_002 office "Smoke Detector Office" [ node_id=4, wakeup_interval=60 ]
    }

Context

I would like to know when a smoke detector is not reachable anymore.

Your Environment

Version used: (e.g., openHAB and add-on versions) openHAB 3.2.0 Release Build Environment name and version (e.g. Chrome 76, Java 8, Node.js 12.9, ...): *Operating System and version (desktop or mobile, Windows 10, Raspbian Buster, ...): Raspberry Pi: Linux openhabian 5.10.63-v8+

sitenote: I created the issue on openhab addons https://github.com/openhab/openhab-addons/issues/12102 By now I put the batteries back. The XML is taken today, when the batteries are added again.

apella12 commented 2 years ago

I'm not the developer but have played around with zwave battery devices quite a bit. I can't say this is not an issue, but in your testing the device needs to be fully initialized before you pull the battery out and you can't restart OH or the binding during the entire time the battery is out. How to tell? when you pull the battery out the time stamp on that node XML file in user/zwave has to be after the controller time stamp and has to stay after the controller for the entire test period.

That said, there are posts in the forum where others have solved your requirement in other ways. Again, not an expert, but I believe the expire binding was used. I do not have anything critical like a smoke detector, but link a datetime item to my daily battery update and have displayed in the UI Battery time stamp Good luck

cdjackson commented 2 years ago

I think this is a duplicate of 1065 so propose to close.