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

In order to use this, you have to register the application with Ecobee.

  1. Go to the Ecobee site and login to your account.
  2. Click on the menu in the upper right hand corner and go to "Developer".
  3. Click on "Create new".
  4. For application name, choose a unique value. -homeautio works good. Enter some description.
  5. Set Authorization mode to "ecobee Pin".
  6. Click save and note the API key that is provided. Copy this value in the configuration file value "ecobeeAppKey".

Now you must start the application

  1. Run the command HomeAutio.Mqtt.Ecobee.exe (Or start the Docker container in interactive mode). This will provide you with a four character code. Copy this code and go back to the Ecobee site.
  2. Click on the menu in the upper right hand corner and go to "My Apps".
  3. Click on "Add application", put in the four character code, and click validate.
  4. Go back to the command prompt where HomeAutio.Mqtt.Ecobee.exe is still running and hit enter. This will write out a cached authorization token to the file system.

If doing this with the Docker instance, you can mount an empty token.txt file into the container to trigger the above interactive mode prompts. Without a token, the container will just continuously crash, so you will have to startup initially in an "interactive mode" with the container so that you can follow the prompts to complete this step. The command below will do that, and once started up you can just use "Ctrl + p, Ctrl + q" to detach from the instance.

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 token.txt file for Logitech token caching.
  6. Mount a directory for log files.
  7. Pass the local timezone as an environment variable

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

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