zwave-js-ui icon indicating copy to clipboard operation
zwave-js-ui copied to clipboard

[feat] UI for plugin

Open agracey opened this issue 3 years ago • 3 comments

Is your feature request related to a problem? Please describe. I'm looking at building a "virtual device" plugin to synchronize states and present to mqtt as a single device (my switches only allow the lifeline association, which is annoying as the signal path is long giving time for race conditions).

The problem is that this would require some external or custom UI.

Describe the solution you'd like I'd like a way to render buttons and forms in the main UI. Preferably on it's own tab or maybe in a accordion group under settings.

I would probably also need a way to read/write to the main config object?

Describe alternatives you've considered This could be driven via come external mechanism but this seems clunky.

agracey avatar Feb 13 '22 21:02 agracey

I thought about this, anyway I have no idea how I could implement such feature as the application is a SPA and everything is built using webpack :(

robertsLando avatar Feb 14 '22 08:02 robertsLando

There are two ways that I know to build this. Allow for a plugin to export a jsonschema for config then render that in the UI, or allow for the plugin to render it's own UI components in an iframe

If this is something there is interest in, I could likely submit a PR once I have enough time to do so.

agracey avatar Feb 18 '23 15:02 agracey

@agracey Feel free to submit a PR so, I think the iframe could be an option

robertsLando avatar Feb 20 '23 08:02 robertsLando