-
Notifications
You must be signed in to change notification settings - Fork 780
Proposal/Discussion: Self-contained add-on metadata #4503
Comments
Adding some metadata that could be used by which code ever will need them some day is okay. |
Hey Markus,
|
I don't think we should add urls at all in the extensions. The idea of ESH extensions is that they are potentially compatible with many different solutions that are based on ESH. So the link to the a suitable documentation will highly depend on the solution and thus cannot be given within the extension. |
That has been my reading. 😉 I only want to give you a comment.
Hm, look at the |
@kaikreuzer I had that thought in mind. I believe you are talking about All other links are pointed at the development repository, which is/can be very much solution independent. If you consider to remove those we can honestly stop the discussion here because they are what I'd especially like to benefit from in documentation... 😉 Btw. maybe you want to study the links I've given for npm and co to get a feeling how other/bigger ecosystems do it. |
@maggu2810 I have no strong feelings towards the version information and where it is stored. For me it feels like the position next to all other meta data would be useful for some use cases later. Yes, redundant information is bad. I've updated the description above, let's wait for other's opinion. |
@kaikreuzer @maggu2810 @SJKA @martinvw |
I don't think that that should lead to a problem, different solutions can just ignore or at least not expose the fields to the users. For a lot of background processes such as the marketplace and documentation i can see a large benefit in this proposal. |
How would the end user documentation benefit from this? Usually, pointing at source repos should be avoided (especially as you should use links to tags and not to master, because things might be moved around and such links can easily break). Source repo links should only be interesting for developers, not for users. Regarding
I don't really think they apply here as they are about libraries for developers - it is not meta-information that is meant for solutions that are built on npm to be shown to the end users, right? So to summarize: You want to rename the binding.xml to extension.xml (that's how add-ons are called in ESH, sorry) and add Yes, we could do so. We would have to adapt the parsing to correctly read that information and provide it through the REST API. And it would mean an API break as all existing bindings need to be adapted - something we should be careful about, but I do not rule it out if it makes it simpler for us to add new extension types easily. To come back to your original needs: I feel that it is probably the best solution to maintain dedicated meta-data (including links, images, openHAB specific keywords, etc.) somewhere in openHAB (likewise in any other solution). After all, every solution has special needs and different ways to store such information. Nothing wrong to put in the ESH-INF what clearly is in common for everyone, but I doubt that we can avoid having to maintain a separate list anyhow (see e.g. the image comment above). |
Hello Kai,
Currently the documentation page goes a great length to retrieve all needed data about add-ons. The process is complicated, error-prone and not able to satisfy all needs. Possible interesting proposed/requested features (e.g.) are currently simply not feasible. This is especially true as new add-ons are integrated from dedicated repositories. Instead of trying to predict properties of an add-on, the add-on should provide this data (up to a certain degree) in a self-contained matter. That seems logical and future-ready. Of course not everything can be provided without loosing solution-independency, I believe to have respected that fact.
Why exactly? I can't think of any serious reason why any kind of computer software (esp. open source) should NOT contain information about its origin 😲 The author(s) and home of the add-on/extension are irrespective of the solution using it. Again: The information doesn't have to be solution-specific, doesn't have to be utilized and may/must not be exposed to the end user!
I fully agree. Images/Logos are a complicated issue. In general, this might indeed be a field that can not be filled in most cases.
After all I've said above I did not exclude that, the image subject is a good example. Still the proposed metadata will help with that process/effort.
I believe that this is the subsequent task, that will in any case only benefit from already more-directly provided metadata. Those separate lists (or the chance of needing them) can be minimized by a good proposal now. I did not expect this much doubt on that end of the proposal. To summarize:
I'll update the OP with the aspects you've mentioned now. |
I think most of my confusion is that you say that the information is NOT meant to be shown to the end user, while you suggest at the top that this new file should replace the existing binding.xml, which IS meant for the end user (it is parsed at runtime, localisable, shown in the Paper UI, etc.). If the suggestion is to add some additional source/developer/tool-processing-oriented meta-data, that would be fine with me. I think in order to move forward with the discussion, it would be good to look at a concrete example. What file/information would we e.g. add to the hue binding and which to the JsonPath transformation? |
I was just pointed to this discussion because I did quite a lot of reviews for bindings in openhab2-addons. As a user that values privacy I am a bit concerned about more and more bindings using a cloud API to access the local hardware. Thus I would suggest a metadata information for bindings which express that they connect to the hardware locally or need some kind of internet connection to work. Solutions like openHAB could even sort the bindings in the documentation by this "flag", so users which only want to use local bindings know which ones do not connect to cloud services without having to look into the README files or even scan through the source code. |
Hey @triller-telekom sounds good to me. Privacy is (still) one of the corner stones of openHAB and a clear classification like that would be interesting. Could you please propose a line as in the OP and I'll add it above. |
@kaikreuzer I just read your #5176 (comment) and wonder what it is you wanted to discuss here. Do you want to remove the authors field? I don't think this is a good idea. We could clarify the options to allow mentioning of a community or company though. |
@ThomDietrich The problem with "adding a line" to you proposal above is the following: You have My "flag" would be for binding only, so it would have to be a child node of the Maybe the
But these parameters would also exist for |
Fields can be optional. If the The overall idea here is to provide metadata when meaningful and useful. I'd only require very few. |
Nothing really to discuss - I merely suggested to have an optional "author" here in the technical metadata, but don't include it in the binding.xml anymore, which is user-facing content (within the Paper UI). |
Data as proposed here isn't necessarily user-facing. It is not necessarily part of the Paper UI presentation. @triller-telekom I've added |
Yes, it seems you again misunderstood me. |
I see. I indeed misunderstood that part. Yet again, I would question the meaning of "content of binding.xml is user-facing" as I believe what you actually mean is "every detail available in binding.xml is by chance also presented by Paper UI". Nothing forbids the addition of more information that is not or only conditionally presented in Paper UI or other user-facing graphical interfaces... - Correct? Did I match your meaning of "user-facing"? The "data as proposed here" yet again is what I envision for a file called similar to Once again the content in this file MAY be used by Paper UI, however nothing dictates that. In conclusion I don't see why we should not add as much (useful, relevant and harmless) data as could be useful to Paper UI, the documentation, or any other future system that handles extensions - user-facing or not. Any other concerns with the proposal? It would be nice to settle this issue at some point, even though I have to admit that I am the wrong person to ask anything of anyone as I am currently not active myself. Best! |
I did not read the whole topic from the beginning again just the new parts. |
@ThomDietrich & @maggu2810 What you are obviously missing here is that the As I said, I am ok to include a package descriptor file (as the ones given as examples above) in the bundles, but I would not want to mix this with the UI infrastructure. |
@kaikreuzer I'm deeply sorry but even after countless comments I am still unclear what exactly is the issue, why are we still so focused on "user-facing" and what all of this has to do with "UI infrastructure". The goal is to provide a rich metadata file, so that each addon (not just bindings, therefore the change of file name) is accompanied by information that describes itself. Where this data is then utilized, processed or presented is almost irrelevant and the next step. |
Any new thoughts on this? |
Because this is what the current binding.xml is all about as explained above and you suggest to remove it and replace it by something else. If you'd alter your suggestion to simply add an additional metadata file, it all would make much more sense to me. |
Hey everyone.
I'd like to discuss a unified way of adding metadata to extensions/add-ons. While most extensions are still managed in 2-3 consolidated repositories, more and more extensions are developed in dedicated repositories and e.g. published through the Eclipse IoT Marketplace. That shift is unavoidable and I believe also accepted. It however brings a few challenges, e.g. for the Extensions/Add-ons overview in Paper UI or the addons section over at docs.openhab.org.
I propose to introduce a mandatory add-on metadata file to provide information about an add-on in a defined and self-contained matter. The idea is not new, a limited version is already available in the form of
ESH-INF/binding/binding.xml
for bindings (example) and many other extensions based system do the same thing. See:The following proposal was derived from the info given above and is open for discussion:
ESH-INF/extension.xml
(replaces
binding.xml
)name
- mandatory - The add-on name, no reference to specific solution (e.g. openHAB). Unclear if type should be included ("Air Quality" vs. "Air Quality Binding")description
- mandatory - A description of the purpose, specialization and limitations of the add-on, should be between 160-240 characters.authors
- mandatory - List of the main developers, can also be a community or company nametype
- mandatory - One out of a counted list, e.g. "Binding", "Action", ...keywords
- optional but recommended - Keywords (categories) out of an open list to filter against, e.g. "heating, lighting, graphing"version
- unclear - Needed or redundant to OSGi "Bundle-Version"?connection
- optional - highlight if a binding/action/... interacts locally or if it connects to an online service (seldom or continuously)repository_url
- mandatory if available - The root or branch/tag-specific URL of the git repository onlinehomepage_url
- optional - (preferably solution independent, e.g. for non-open-source add-ons)documentation_url
- optional - URL to end user documentation (preferably solution independent, e.g. for non-open-source extensions)image_url
- optional, if possible - Link to the extension icon/logo (critical topic due to copyright implications)More fields could be added, some of the above should be mandatory while most are optional.
Wdyt?
The text was updated successfully, but these errors were encountered: