openhab / openhab-webui

Web UIs of openHAB
Eclipse Public License 2.0
214 stars 235 forks source link

[Marketplace] Support a Marketplace for Transformations #2239

Open rkoshak opened 6 months ago

rkoshak commented 6 months ago

The problem

I find myself reposting some of the same transformation scripts to the forum over and over (e.g. split a number into DD:HH:MM:SS, filter out changes that are too small, unit conversions not supported by UoM, etc.).

Your suggestion

Add a new category to the marketplace to install transformations similar to the way that rule templates can be installed. It doesn't need to be a new forum category. I can see valid arguments for keeping them in the rule templates category and maybe identify them using a tag or something like that.

I don't think these need to support properties like a rule template because arguments can be passed to them when they are applied.

Additional information

It's not clear to me if this issue needs to be opened on core first. I can open one over there if work would need to be completed there before here on webui.

ghys commented 5 months ago

It doesn't need to be a new forum category. I can see valid arguments for keeping them in the rule templates category and maybe identify them using a tag or something like that.

For logical reasons you'd be right but for technical reasons I suppose it's better to have a separate forum category.

It's not clear to me if this issue needs to be opened on core first.

I think so.

This would be depending on a new category and then added first here to the constants then a separate handler for these:

https://github.com/openhab/openhab-core/blob/b77f95484823730ffd0e8d57e8e9cc3bb1587365/bundles/org.openhab.core.addon.marketplace/src/main/java/org/openhab/core/addon/marketplace/internal/community/CommunityMarketplaceAddonService.java#L102-L105

rkoshak commented 5 months ago

Opened the issue on core. https://github.com/openhab/openhab-core/issues/4046

rkoshak commented 1 month ago

Core has been updated with support for a new transformations category in the marketplace. Bumping here to notify that the UI portion is ready for development.