Association Groups lost after saving or restarting openHAB [debug log attached]

Hi,
I’m currently unable to set my controller in the associaton groups of two of my devices.
The first one is a FGDW002 Fibaro Door Window Sensor 2 (node 5) and the second one a Aeon ZW100 MultiSensor 6 (node 6).
The door sensor takes the association and loses it after restarting openhab whereas the multisensor doesn’t show the association after reloading the configuration page.
It is not related to the known Habmin/PaperUI bug, I verified via the REST API and tried setting the configuration with all three options - Habmin, PaperUI and REST API as well.

openHAB is on stable version 2.4 and ZWave Binding is the last one available yesterday (2.5.0.201906102035).

I turned debug logging on and attached the log.
In the log I can see for node 6 that group 2 and 3 seem to be unknown to the device (and I probably don’t need them, should be resolved with updating the device library) but for node 5 associations are removed for whatever reason and here I need these associations.

While debugging I tried setting those associations in Habmin and PaperUI with restarts inbetween.

openhab.log (817.5 KB)
or
openhab_log.zip

Any help is very appreciated!

I tried updating to latest snapshot version of openHAB (Build #1609) with ZWave Binding 2.5.0.201906120432 to see if it makes any difference.
I hard resetted the controller, removed all things and included the controller and door sensor.

But again, group associations do not persist…
There are ASSOCIATION_REMOVE blocks in the log viewer, but I have no idea where these come from.
(eg. timestamp: 12:54:00.595).
openhab5.zip.log (115.1 KB) (remove .log extension)

@chris
Do you have any idea if it is an issue with the binding itself? the device? device library?

I don’t know what to do and am getting desperate…
I need to include at least 6 of these devices and this issue is keeping me from finalizing my “smart home project” at home.

What device are we talking about and what exactly is the device?

One issue I note in node 4 is you are setting the controller into more than one association group - this is almost certainly a bad idea as it will cause multiple messages to be sent which will congest your network and cause issues with openHAB.

image

It is a FGDW002 Fibaro Door Window Sensor 2 (FW 3.2) - contact sensor.

I was of the impression that those groups (of that specific device) are exclusive, ie. I would not get all information if the controller is only in group_1.
At least in older versions I needed to set those groups.

Is it possible that the device is programmed to remove “redundant” group associations?

this seems to be the case… I set another node id in group 2 and 3 , and these associations are kept.

@chris, in your experience, are there any devices that need to have the controller in multiple association groups? Of course it depends on the device and I should always consult the manual, I’m just talking in a general sense.

No - normally this will cause duplication which often causes problems (or at least it causes people to complain :wink: ).

Anything is possible, but I think this is unlikely.

No - the idea behind the lifeline is that it sends all useful data to the gateway. Adding the gateway to other groups will normally cause duplication.

alright, thank you for your help!

just out of curiosity - if this is not the case, why or how are the controller associations automatically removed?

I’m not sure what you are referring to - when is the device automatically removing associations?

well, this is the reason why I created this topic!
I am not a native speaker, that is probably why I’m not explaining myself clear enough…

In both logs I attached, there are ASSOCIATION_REMOVE blocks after adding the controller to the groups!
I did nothing else, just add controller to all three groups, wake up the device a few times and then restarting openHAB.
After that, all group associations fields are empty…

The binding is removing these associations - not the device. I have simply not had a chance to look over the reason for this yet - sorry. I did make one small change earlier today to fix a logging problem, but I’ve still not found why this is happening and will likely add more debug information.

Sorry it’s taking some time, but I will look at it further later.

ah, yes I see.
I saw those logging information and thought “Association [controller] consolidated to {}” meant the controller could not be accepted. The fix explains that, at least.

No problem at all!
If I don’t need the controller in those groups, this problem doesn’t apply to me at the moment anymore.

If you need me to post the log with a new build/more debug information, just say so.

Thanks again for your help.

I think I found what is causing this problem.
In ZWaveHandler.java all new group members are added up to totalMembers if they are not the controller and if totalMembers == 0, then all associations in this group are cleared.
Since added controller in groups don’t count to totalMembers, the group is always cleared.

I made a pull request to fix this issue. #1185

1 Like

Thanks - I will try and take a look at this tonight. From a quick look I don’t think this looks completely correct, but I’m sure that you’re on the right track.

I’ve had a look and in general it’s ok, but it’s not correct as we only need to apply newMembers - not new and old members.

yes, you are right, I did just that in the first commit, so I removed the last commit.

Thanks - I’ll take a look later.

Cheers
Chris