Quickstart
Installing and using Litehouse
Litehouse is a lightweight program for home automation. Think of it as a set of rules you define about what should happen when certain triggers are set. For example:
If it is 7am...
Set triggers at arbitrary times or when receiving updates from other sources
Check the weather for rain
Use one of many integrations to popular APIs to fetch arbitrary data
Send me a text message
Pick from a variety of actions to interact with the outside world
Or, alternatively...
If the washing machine power consumption goes below 5W
Integrate with a wide range of home automation hardware
Flash the lights 10 times in the living room
Group together commands into macros and execute them in a fault tolerant way
Litehouse does all these things securely and efficiently. It is designed to use minimal resources allowing it to be run on any hardware. This is achieved by through web-assembly plugins and a custom registry allowing for extremely low idle memory usage, fast startup, unparalleled security, and buzzwords.
Installation
Direct
You can install the server directly onto most OSes with a single command.
Prebuilt
We have pre-built binaries available for windows, macOS and linux. The latest version is v0.3.1. To see more about this release, see here:
Install litehouse 0.3.1 Install prebuilt binaries via shell script curl --proto '=https' --tlsv1.2 -LsSf https://github.com/arlyon/litehouse/releases/download/v0.3.1/litehouse-installer.sh | sh Ins...
To install, run one of the commands below. Each of these comes with an update utility as well.
Bleeding Edge
Alternatively, you can build the latest bleeding edge version. For this, you
need a rust toolchain. Please visit rustup.rs and follow
the instructions. Then, you can install litehouse
directly from source by
specifying the git repo.
Docker
Getting started with docker is an easy approach if you have docker easily available. The docker image is lightweight, weighing in at 10MB.
Litehouse Docker Image
For more information on the Litehouse Docker image, have a look at image in the GitHub package registry.
Docker Compose
In fact, to make it a little easier, you can also take advantage of the docker-compose file in the repo.
Podman
Good news! The setup is pretty much the same as docker, but with some extra goodies.
Podman play kube
An alternative to docker-compose is to use a kubernetes definition file.
Podman quadlet
Quadlet is a tool built-in in podman that integrates containers into systemd
so that their lifecycles are managed in the same way as other services. This
way, logs are also routed through the regular OS journal. To set it up,
place a kube systemd service file in ~/.config/containers/systemd
. This also
has the benefit of integrating with podman's auto-update system which will
automatically check for updates at a fixed interval and restart the service.
Flatcar Linux / coreOS
Combining the kubernetes config and systemd, you can deploy Litehouse on CoreOS or similar systems, using Butane to generate an Ignition configuration file. Here's an example Butane configuration that creates a user, configures ssh access, and uploads all the required files onto the system.
To generate the Ignition file, run butane, mounting the folder that the three files are in into the container.
Learn more
To learn more about the podman ecosystem, see below.
App
Coming soon...
We would also like to bring a desktop app into the mix. This would allow you to run litehouse on your laptop with a handy management UI built in.
Is this something you want?
Getting Set Up
We recommend running litehouse in its own folder, since it needs a few files out of the box. To start, let's run a few commands.
You will now notice a set of files in your folder.
- the
schema.json
file is generated by litehouse to provide intellisense when editing yoursettings.json
file - the
settings.json
file is where you define which plugins to use and how - the
wasm
folder contains the downloaded plugins
Let's add a plugin instance!
Notice that as you type, your editor knows what plugins are available, and what the config for that plugin is. No more invalid yaml! Let's make sure that we have everything right.
Congrats! You have just run your first litehouse instance.