This server is designed to run on Savant's smart hosts and acts as an MQTT client and state polling service.
It's set up to work with Homeassistant's MQTT discovery, where it configures devices as Light Entities.
Before you get started generating files, make sure you open your blueprint
editor with the rpmConfig
you plan on deploying. This will load the file into
cache, which is where our generator will put some needed details.
go run ./generate [path to].rpmConfig
Will create the following for you:
triggers.plist
for importing into Savant- Necessary workflows for your triggers to work
loads.json
for referencing in your configuration file
- Open your triggers window in the blueprint editor and import the
triggers.plist
in the bottom right corner - Create a
savantmqtt.conf
file (see config for details on settings).
- Run the build command
- Copy the binary to the Savant host
- Copy the systemctl config (lib/savant-mqtt.service) to the savant host under /lib/systemd/system/savant-mqtt.service
- Run
sudo systemctl daemon-reload
- Enable the service via
sudo systemctl enable savant-mqtt
- Start the service via
sudo systemctl start savant-mqtt
Thanks to this guide for making it easy to get up and running with MQTT in Go!