Skip to content
Michael Hallock edited this page Oct 23, 2021 · 5 revisions

Docker command

The command below will run a container with the following configuration:

  1. Allow Docker to manage restarting the container on exit.
  2. Run container as user with ID 1000.
  3. Run in interactive mode (-it).
  4. Mount override config file appsettings.Production.json in readonly mode. Note, you can copy the appsettings.json file from this repo to start with this.
  5. Mount a directory for log files.
  6. Pass the local timezone as an environment variable

docker run --restart=always --name homeautio.mqtt.harmony --user=1000 -it -v /srv/homeautio.mqtt.harmony/appsettings.Production.json:/app/appsettings.Production.json:ro -v /srv/homeautio.mqtt.harmony/logs:/app/logs -e TZ=America/New_York ghcr.io/i8beef/homeautio.mqtt.harmony:latest

Special Topics

This bridge will automatically publish a retained MQTT topic at "harmony/default/homeAutio" (Default will be replaced with whatever you set "harmonyName" to in the config) which shows how the Harmony's configuration has been mapped to MQTT topics that it subscribes to.

With the exception of "harmony/default/activity/set", the payloads of anything sent to these topics is not used for anything and can be any value you want, they will be treated like "button presses" on a remote.

The only topics that publish current state are "harmony/default/activity", and the "harmony/default/homeAutio" topics. All other topics are one-way.

MQTT Broker TLS Settings

When using TLS with the broker, additional settings can be specified.

{
  "mqtt": {
    "brokerUseTls": true,
    "brokerTlsSettings": {
      "allowUntrustedCertificates": false,
      "ignoreCertificateChainErrors": false,
      "ignoreCertificateRevocationErrors": false,
      "protocol": "1.2",
      "certificates": [
        {
          "file": "",
          "passPhrase": ""
        }
      ]
    }
  }
}
Setting Usage
allowUntrustedCertificates Whether to ignore untrusted certificate errors.
ignoreCertificateChainErrors Whether to ignore certificate chain errors.
ignoreCertificateRevocationErrors Whether to ignore certificate revocation errors.
protocol TLS protocol to use, one of 1.0, 1.1, or 1.2. Defaults to 1.2.
certificates Array of information for certificates. Can be a CA certificate for verification, or certificates used for certificate auth in MQTT. See below for more information.
Certificate Setting Usage
file File path to an external certificate. Usually something like config/signingKey.pfx
passPhrase Pass phrase to use for decryption of cert private key, if needed. Usually only used for certificate auth.
Clone this wiki locally