mqtt-homekit-light

command module
v0.4.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 9, 2022 License: AGPL-3.0 Imports: 9 Imported by: 0

README

mqtt-homekit-light

goreleaser

This creates a bridge between virtual homekit light and mqtt, allowing one to toggle an mqtt topic using homekit.

You can configure options using command line flags, environment variables using the prefix MHL_, or with a JSON config file.

Packages are available for RPM and DEB, on am64 and aarch64 architectures.

CLI

Usage of mqtt-homekit-light:
  -config string
        Config file to load settings from
  -debug
        Enable debugging
  -manufacturer string
        homekit accessory manufacturer (default "hc")
  -mqtt string
        mqtt url (default "mqtt://localhost:1883")
  -mqtt-client-id string
        mqtt client ID (default "homekit-mqtt")
  -mqtt-topic string
        topic to listen for state, will call <mqtt-topic>/set when homekit triggers (default "homekit/light")
  -name string
        homekit accessory name (default "Light")
  -pin string
        homekit PIN for pairing (default "32191123")
  -storage-path string
        where to store persistent files (default "./")

Environment Variables

Environment variables match the CLI flags; prefixed with MHL_, in all caps, and underscores replacing hyphens.

MHL_MQTT_CLIENT_ID=myclient mqtt-homekit-light

Configuration File

{
      "mqtt-client-id": "myclient"
}

Running with systemd

Requires systemd 235 or user due to the use of dynamic users. Tested on versions 246 and 247.

The systemd service can be used to run multiple instances using a systemd template unit.

  1. Create a JSON config file in /etc/mqtt-homekit-light/<name>.json
  2. Enable and start the service, systemctl enable --now mqtt-homekit-light@<name>.service

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL