Skip to content

[Marketplace] Load rule template from file #4450

Open
@rkoshak

Description

@rkoshak

Rules can be loaded in JSON format from the $OH_CONF/automation folder. However, rule templates can only be loaded from a live marketplace posting.

This makes development and testing of rule templates slow, error prone, and frustraiting because the only way to install and test changes is to:

  1. make the change to the template
  2. update the marketplace posting
  3. remove the installed template
  4. force refresh the browser running MainUI since sometimes it doesn't pick up the changes right away
  5. add the tempalte back
  6. instantiate a rule using the template

And of course this is all out in the open meaning there's a chance someone might install the template while it's under development since it has to be posted to the mareketplace in order to load it, even for testing.

This proposal is to allow the loading of a rule template, preferably in YAML format as is expected by the Marketplace itself, from a file in $OH_CONF/automation (maybe a templates subfolder?). The ability to develop and test rule templates locally will greatly enhance the experience.

Your Environment

  • Version used: (e.g., openHAB and add-on versions) OH 4.3 M4
  • Environment name and version (e.g. Chrome 111, Java 17, Node.js 18.15, ...):official Docker
  • Operating System and version (desktop or mobile, Windows 11, Raspbian Bullseye, ...): Docker running on Ubuntu 24.04

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementAn enhancement or new feature of the Core

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions