berfarah / savant.mqtt

Savant MQTT Service - acts as a polling service that relays to and reads from MQTT

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Savant MQTT Server

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.

Setup

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.

Generate your files

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

Steps you have to take yourself

  1. Open your triggers window in the blueprint editor and import the triggers.plist in the bottom right corner
  2. Create a savantmqtt.conf file (see config for details on settings).

Getting running

  1. Run the build command
  2. Copy the binary to the Savant host
  3. Copy the systemctl config (lib/savant-mqtt.service) to the savant host under /lib/systemd/system/savant-mqtt.service
  4. Run sudo systemctl daemon-reload
  5. Enable the service via sudo systemctl enable savant-mqtt
  6. Start the service via sudo systemctl start savant-mqtt

Shout-outs

Thanks to this guide for making it easy to get up and running with MQTT in Go!

About

Savant MQTT Service - acts as a polling service that relays to and reads from MQTT


Languages

Language:Go 99.9%Language:Shell 0.1%