Skip to content

infinitude for Carrier Infinity Thermostats (and Bryant)

Description

  • This template runs my infinitude proxy instance. This enables Carrier Infinity Thermostats to be controlled by API, web page, home assistant etc.
  • One note please for the love of god never buy a carrier heating system with one of these controls they are terrible in my experience. I inherited it, instead buy a nice generic heating/AC system that can support any standard thermostat.
  • I run the upstream image nebulous/infinitude, pinned by digest.

State Considerations for SWARM

  • state is a named bind of /mnt/docker-cephFS/infinitude_state, mounted at /infinitude/state, see stack conventions. it holds everything the thermostat has sent. without it the data went with the task whenever swarm moved it to another node, and the api returned nothing until the thermostat next pushed.
  • create the directory before the first deploy, the stack will not start without it:

    sudo mkdir /mnt/docker-cephFS/infinitude_state
    
  • the rest is configured by env vars, except APP_SECRET, which is a swarm secret. An entrypoint wrapper reads it at startup, see secrets.

Network Considerations

  • This publishes port 4000 for the container's internal 3000, because i have a container that needs 3000.
  • It can be reached by swarmIP:4000.

Placement Considerations

None, by default this template will result in a single replica.

compose.yml, 38 lines, 1 note

each in the code opens a note on that line. download compose.yml

version: "3"
services:
  infinitude:
    environment:
      - TZ=America/Los_Angeles
      - PASS_REQS=240
      - MODE=Production

    entrypoint:  # (1)!
      - /bin/sh
      - -c
      - set -e; APP_SECRET="$$(cat /run/secrets/infinitude_app_secret_v2)"; export APP_SECRET; exec /infinitude/entrypoint.sh

    hostname: infinitude
    image: nebulous/infinitude:latest@sha256:66f64d156c6f4537369d6ea587cf4440cf9607b0e7b8296468febf96bafebe00
    volumes:
      - type: bind
        source: /usr/share/zoneinfo
        target: /usr/share/zoneinfo
        read_only: true
      - state:/infinitude/state
    ports:
      - 4000:3000
    restart: always
    secrets:
      - infinitude_app_secret_v2

volumes:
  state:
    driver: local
    driver_opts:
      type: none
      device: "/mnt/docker-cephFS/infinitude_state"
      o: bind

secrets:
  infinitude_app_secret_v2:
    external: true
  1. nebulous/infinitude reads APP_SECRET, the key that signs its session cookies, only from the environment. a shell reads the swarm secret into it and execs /infinitude/entrypoint.sh, the image's entrypoint, and exits first if the secret is missing.

This page started as a gist: the original, with its comments