discovery service overwriting existing item configuration [message #1721097] |
Sat, 23 January 2016 12:32  |
Eclipse User |
|
|
|
Due to a recent reported issue I found that there is unexpected behavior in the discovery of already accepted items. If an thing is found again in the discovery, it will update the already accepted thing configuration parameters with the values as defined during the discovery.
I would think that is conceptional not the right approach. This way somehow the discovery should be made aware of all the changes.
I would assume that discovery does what it says: discovery. From that point onwards it is up to the user to update the configuration in either the binding or via the UI. It would be very hairy if we mix these.
There are several examples, e.g. in the ntp binding, the locale is set for the discovered item. However if it is updated by the user, at the next start of the binding the local item is discovered again and reset to the initial value
I think there will be many other examples as well where values set during discovery will be updated by the user later onwards. (same thing for e.g. the yahoo binding, I updated the location ID, to the one better reflecting my location, but it got changed back by discovery...not what I want)
I would consider this a bug, but wanted to hear the opinion of others as well.
[Updated on: Sat, 23 January 2016 12:32] by Moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: discovery service overwriting existing item configuration [message #1728386 is a reply to message #1728187] |
Mon, 04 April 2016 02:31  |
Eclipse User |
|
|
|
Simon Kaufmann wrote on Thu, 31 March 2016 19:40I would like to point out that the discovery only overrides properties that it actually _can_ detect automatically from the "environment". The fact that we can discover and preconfigure Things by magic actually is quite valuable, and the same applies for changing environments: If e.g. a Hue Bridge gets a new IP address, the user must not take care about it. And we should not change this behavior in general.
I agree but we cannot just mark such properties as read-only, as the user must be able to provide the ip address manually in case discovery fails for some reason. If we would just prevent the user to enter an IP address as it can be changed by the discovery at any time, how could a user provide an address manually?
|
|
|
Powered by
FUDForum. Page generated in 0.53293 seconds