Metadata for Things

openhab2
things
metadata
Tags: #<Tag:0x00007f01542ba6b8> #<Tag:0x00007f01542ba438> #<Tag:0x00007f01542b9808>

(Dominik Krickl-Vorreiter) #1

Hi,

I’d like to discuss the need of metadata information for Things. These are data which get collected because of the use of the device, for example, the EnOcean binding can provide information about signal strength (RSSI), number of repeaters involved and the timestamp of the last received telegram.

As far as I know, right now we have to publish these information as normal channels, leading to a situation where every thing has, beside their main channels, three extra channels. In my opinion, this is a bit overloaded, and not friendly for the user who is primarily interested in the main channels (the reason why he bought the device).

I think the metadata channels should be less visible and separated, but still available for normal item linking to be able to persist the data, use them in rules, access them by REST etc.

So my proposal is to add a flag to the channel marking it as meta channel. The UI can handle it accordingly.

What do you think?

Cheers
Dominik


(Jan N. Klug) #2

Why don‘t you make it extensible and let the user add the channel if needed?


(Dominik Krickl-Vorreiter) #3

Thank you, @J-N-K, for your reply. I didn’t know the extensible option for things, and after experimenting, I think this is going in the right direction. However, there are three reasons why I am not happy with this:

  • You can define more than one channel. This is confusing!
  • You have to give the channel a new id and label. Complicated for a normal user.
  • More complex DSL. You have to define the channels in your *.things file, for every thing!

What I want is only an option to mark a predefined channel as “optional”. This way, the normal user can decide wether he wants to use it, or not.


(Dominik Krickl-Vorreiter) #4

I have found a solution: advanced="true":

The advanced property indicates whether this channel is a basic or a more specific functionality of the thing. If advanced is set to true a user interface may hide this channel by default. The default value is false and thus will be taken if the advanced attribute is not specified. Especially for complex devices with a lot of channels, only a small set of channels - the most important ones - should be shown to the user to reduce complexity. Whether a channel should be declared as advanced depends on the device and can be decided by the binding developer. If a functionality is rarely used it should be better marked as advanced .

https://www.eclipse.org/smarthome/documentation/development/bindings/thing-definition.html#system-state-channel-types