Plugins

Introduction

Litehouse plugins are WebAssembly modules that extend the functionality of the Litehouse home automation system. They can be written in any language that compiles to WebAssembly, offering a wide range of possibilities for automation, integration, and customization.

Writing a Plugin

To write a plugin, you need to compile your code to WebAssembly and adhere to the Litehouse plugin specification. The specification is based on the WebAssembly Interface Types (wit) proposal, which allows WebAssembly modules to interoperate with the host environment.

You can learn more about writing plugins and the wit-bindgen tool, which facilitates the creation of WebAssembly modules that conform to the wit specification, by visiting the wit-bindgen repository.

Importing Plugins

To use a plugin in Litehouse, you need to import it in your settings.json file. The import syntax allows you to specify the registry and version of the plugin:

{
  "imports": [
    "my-registry::plugin@0.1.0"
  ]
}

This syntax enables Litehouse to fetch the plugin from the specified registry and ensure that the correct version is used.

On this page

Edit on Github