openhab / openhab-core

Core framework of openHAB
https://www.openhab.org/
Eclipse Public License 2.0
925 stars 428 forks source link

[RfC] Extend add-ons API (backend & REST) #2070

Open ghys opened 3 years ago

ghys commented 3 years ago

This initial proposal & RfC is related to #2058 and also to https://github.com/openhab/openhab-addons/issues/8448 to expand the add-ons API to handle multiple sources and versions better.

With these changes I believe we could provide marketplaces as org.openhab.core.addon.AddonService implementations instead of having a separate "marketplace provider" system and REST API as I initially suggested in https://github.com/openhab/openhab-addons/issues/8448. It would also be possible to install alternative versions of add-ons from other sources (for instance an AddonService for https://openhab.jfrog.io/artifactory/libs-snapshot-local/org/openhab/addons/bundles/)

Proposed additions to org.openhab.core.addon.AddonService

Proposed additions to org.openhab.core.addon.Addon

Proposed additions to the /addons REST API (org.openhab.core.io.rest.core.internal.addons.AddonResource)

delid4ve commented 3 years ago

I'm somewhat confused on the reasoning for 'custom' jars not showing up in the ui under settings-> bindings.

This was default behaviour in 2.x and is leading to huge confusion (especially newer users).

If they add a custom jar, they kinda know what they are doing and expect to see it installed in the ui, not karaf only which tbh even I only use to change logging levels.

Maybe I'm missing something, but from a 'beginner, end user' perspective it's counter intuitive it not being there.

Maybe if it's a rework of a current included binding it needs to be flagged, I get that as this could cause problems, but for one not in the distro I don't see any harm. They could always just be highlighted red though or something

J-N-K commented 2 years ago

@ghys Except the configDescriptionUri in .jar files: Isn't this all covered by your extensions?

ghys commented 2 years ago

The marketplace PR was inspired by these specs but a lot of the above wasn't implemented (optional call to AddonService.refreshSource, multiple versions management etc.)