|
Re: Thing / Channel Configuration Question [message #1688358 is a reply to message #1687711] |
Fri, 20 March 2015 14:29 |
Kai Kreuzer Messages: 673 Registered: December 2011 |
Senior Member |
|
|
Hi Eyal,
I see actually two different options here:
1. This is a property which you have to set in the device and which makes its functionality behave in a certain way (when receiving "ON", it always reacts with a delay of x seconds). For this, the Channel itself holds a "Configuration" object that can be used. Having said this, there is indeed no support of this feature in the framework yet, so there are no easy ways to change this configuration and to be notified about updates. So the easier solution for now might be to put the configuration property directly on the thing and not on the channel.
2. The property is not a "one-for-all", but you could e.g. have one item linked to the channel with a 2 second delay and another item with a 5 second delay. In this case, it should not be considered as a configuration of the channel itself, but of the item-channel-link. There is a bugzilla feature request for such a functionality already: https://bugs.eclipse.org/bugs/show_bug.cgi?id=456213
Best regards,
Kai
|
|
|
|
|
|
Re: Thing / Channel Configuration Question [message #1692608 is a reply to message #1692530] |
Thu, 16 April 2015 20:06 |
Dennis Nobel Messages: 166 Registered: September 2014 |
Senior Member |
|
|
Theoretically (which means I did not test it) the "thingUpdated" method should also be called if the configuration of a channel was changed. Does it not work?
I don´t think that it makes sense to introduce a command for informing about updates, because commands tell the binding something it should do, like "turn the Switch ON". But they are not meant to inform the binding about something, which happened in the framework. The RefreshType tells the binding to force a state refresh.
We may rethink the concept of configuration update notifications to have separate methods like "thingConfigurationUpdated()" and "channelConfigurationUpdated(ChannelUID channelUID)".
Regards
Dennis
[Updated on: Thu, 16 April 2015 20:16] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04995 seconds