openhab-core: Zwave Controller won't enter exclusion mode, resets instead

Expected Behavior

Zwave controller should send the exclude node command and wait for response. From the attached logs, this happens correctly on 4.1.3. The last section of the attached document shows the relevant section of the controller configuration update in the Zwave binding.

Zwave Exclusion.txt

Current Behavior

The controller resets and the exclusion mode is not entered. This issue was posted on the Zwave repository, but from the attached file, the problem originates in the core. It appears to start with OH 4.2.0.M1. The logs are with both the core and Zwave in debug mode

Possible Solution

From the data it appears core.thing.internal.ThingManagerImpl initiates the controller reset that causes the exclusion command to not be executed

Steps to Reproduce (for Bugs)

  1. Have OH running with Zwave controller online
  2. From the UI page click exclude devices

Context

Just trying to help

Your Environment

I first duplicated this problem (not the original poster) with OH4.3M1 in docker on Rpi3b with aeotec Zstick. For testing I spun up OH4.1.3 and OH 4.2.0.M1 with the exact same zwave network and controller

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 50 (36 by maintainers)

Commits related to this issue

Most upvoted comments

I now have a fix: https://github.com/openhab/openhab-webui/pull/2775

I have tested the fix on my dev system with the Z-Wave serial controller Thing, and now only the config is saved. For some explanation what was going wrong, check the changes in the linked UI PR.

You can also edit the controller UI Code tab to false. The controller will reinitialize, but you will then be able to use exclude devices from the Controller UI Thing tab. Note that ANY change on the Controller UI tab will reinitialize the controller.

@florian-h05 I just installed snapshot 4309 and I can confirm that the problem is resolved. Thank you!!

However… This is for anyone who tried to run exclusion while this problem existed.

It’s possible/likely that controller_exclude in the Z-Wave Serial Controller thing now is set to true. So, even if you try to run exclusion it won’t run because the Z-Wave serial thing believes that controller_exclude is already set to true (hence it will ignore the config change). I fixed it by stopping openHAB and hand-editing the Thing.json in jsondb to change the value of controller_exclude from true to false.

@openhab/core-maintainers Can you please close this issue? I have just merged the fix in the UI.

Same happens to me when I navigate to the Z-Wave primary controller and click on Exclude Devices. The controller goes offline and online again without entering the exclusion mode.

So I did an investigation on possible workarounds.

I finally manged to put the Z-Wave binding into exclusion mode by executing an config update via REST API on my zwave primary controller thing. Have a look at the screen shot. The configuration payload can be taken from the rest action that is executed by the UI when the Exclude Devices button is pressed.

Important is to set the property "controller_exclude" to true

image

After that I could see the following related log messages:

2024-09-29 22:56:27.214 [DEBUG] [zwave.handler.ZWaveControllerHandler] - Controller Configuration update controller_exclude to true
2024-09-29 22:56:27.216 [DEBUG] [al.protocol.ZWaveInclusionController] - ZWave controller start exclusion
2024-09-29 22:56:37.149 [DEBUG] [al.protocol.ZWaveInclusionController] - ZWave controller end exclusion

Looks like this workaround works fine since I already excluded two nodes successfully.