config description(s) limitation [message #1715885] |
Fri, 27 November 2015 09:45 |
|
Here just an example of a thing type XML.
<thing-type id="thingTypeID">
...
<supported-bridge-type-refs>
<bridge-type-ref id="bridgeTypeID" />
...
</supported-bridge-type-refs>
...
<channel-groups>
<channel-group id="channelGroupID" typeId="channelGroupTypeID" />
...
</channel-groups>
...
<config-description-ref uri="{binding|thing-type|bridge-type|channel-type|any_other}:bindingID:..." />
...
</thing-type>
A thing type can reference to (use[d by]) multiple bridges.
A thing type could use multiple channel groups.
A thing type could have only one config description.
Why can a thing type use only one config description.
Example:
I have different thing types but all need to be configured with ip + username + password.
So I create a config description (uri = "thing-type:bindingId:access") that contains that information (similar to the Hue config desc. example in the doc).
This config description should be used by all my things.
If different things needs additional configuration, I would like to add another config description.
IMHO this is very similar to the channel-groups.
Is there any reasons, we don't like that?
|
|
|
|
|
Re: config description(s) limitation [message #1716358 is a reply to message #1716356] |
Thu, 03 December 2015 08:48 |
|
I wouldn't nonce it "inheritance" but "reuse".
I would like to do what is possible for groups also for config descriptions.
I add an example:
Create three config descriptions.
The first one is a configuration that applies to all devices of that binding (access information for the device):
* <config-description uri="thing-type:bindingId:cfgaccess">
The other ones are configurations for the device specific parts:
* <config-description uri="thing-type:bindingId:cfgfoo">
* <config-description uri="thing-type:bindingId:cfgbar">
And the two thing types for the devices:
<thing-type id="foo">
<config-description-refs>
<config-description-ref uri="thing-type:bindingId:cfgaccess" />
<config-description-ref uri="thing-type:bindingId:cfgfoo" />
</config-description-refs>
</thing-type>
<thing-type id="bar">
<config-description-refs>
<config-description-ref uri="thing-type:bindingId:cfgaccess" />
<config-description-ref uri="thing-type:bindingId:cfgbar" />
</config-description-refs>
</thing-type>
|
|
|
|
Re: config description(s) limitation [message #1716362 is a reply to message #1716359] |
Thu, 03 December 2015 09:07 |
|
> You would change a single ref to an array of references - this would break a lot of code throughout ESH
Do you prefer to copy the content of cfgaccess to cfgbar and cfgfoo (and all the other decives)? I would prefer to add this feature to the framework instead of the creation of a lot of redundancy.
Another option is, that I do not use XML and generate the config description using code.
> would complicate many things like e.g. the Paper UI, which would have to iterate itself (as a client!) through the descriptions, deal with merging them into a consistent set (how to deal with conflicts?) etc
What is the difference between the mechanism for channels and this one?
The thing could contain an already merged set, the thing type could have an array.
Don't see the difference.
|
|
|
|
Powered by
FUDForum. Page generated in 0.04969 seconds