Skip to content
This repository has been archived by the owner on May 7, 2020. It is now read-only.

isLinked exception when a channel is unknown by the thing #2999

Closed
lolodomo opened this issue Feb 12, 2017 · 5 comments
Closed

isLinked exception when a channel is unknown by the thing #2999

lolodomo opened this issue Feb 12, 2017 · 5 comments

Comments

@lolodomo
Copy link
Contributor

lolodomo commented Feb 12, 2017

isLinked(channel) throws an exception when the channel in argument does not exist for the thing.
When a binding is enhanced with a new channel and a user updates to this new binding version, a use of isLinked for the new channel will lead to an exception until the user removes his thing and create another one.

I am asking myself if the exception should not be catched by isLinked and if the channel does not exist then returns false ?

Another option would be to be modify every binding using isLinked to catch the exception. Lot of work.

It leads to another consideration: would it be possible to automlatically add the new channels to old things.

@lolodomo
Copy link
Contributor Author

Here is an example of the problem : https://community.openhab.org/t/solved-sonos-binding-problems/22599

@J-N-K
Copy link
Contributor

J-N-K commented Feb 12, 2017

IMHO the last option would be best. The OH2 Astro binding had the Same problem. As long as only one or two things need to be updated, manually doing so is ok, but imagine a OneWire binding where you need to configure each sensor again.

@maggu2810
Copy link
Contributor

It leads to another consideration: would it be possible to automlatically add the new channels to old things.

IIRC there is already an issue (or an comment in an issue) that will bring that function into account.
Will try to find them...

@maggu2810
Copy link
Contributor

#2555

@lolodomo
Copy link
Contributor Author

I close this issue as the real issue is #2555.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants