Skip to content

Discovery of new Things causes configuration parameters of existing Things to be updated #5093

@jlaur

Description

@jlaur

I noticed this behavior while working on openhab/openhab-addons#19516, but it turned out to have nothing to do with my changes, or the Miele binding at all. I was able to reproduce the issue with the Hue binding as well.

First, create a new discovered Thing. It needs to have its ThingUID generated in a consistent way, so that another discovery will create a result with the same ThingUID:

Image

Now, let's change one parameter to something else:

Image

And finally, let's trigger discovery:

Image

And rather unexpected, our existing Thing is now "repaired", i.e. its configuration parameters are changed as a result of the discovery:

Image

Expected Behavior

Discovery should not affect existing Things.

Current Behavior

Existing Thing is manipulated as a result of the discovery. handleConfigurationUpdate is called by the framework, and the existing thing handler derived from BaseThingHandler goes through dispose and initialize if that method is not implemented.

Possible Solution

For Miele and Hue the issue was reproduced by triggering mDNS discovery. However, currently I don't suspect MDNSDiscoveryParticipant in particular, but I'm rather afraid it's a general issue. I need to confirm that.

Steps to Reproduce (for Bugs)

See description.

I have not been able to reproduce this in 5.0.2, so I think it's caused by a recent regression in 5.1.

Context

Your Environment

  • Version used: 5.1.0-SNAPSHOT - Build 4854

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAn unexpected problem or unintended behavior of the Core

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions