Baxi Connect+ to MQTT bridge with Home Assistant auto-discovery support.
- Connects to Baxi Connect+ over WebSocket
- Publishes heating state to MQTT
- Exposes Home Assistant climate entities through MQTT Discovery
- Provides
/health,/ready,/live, and/metricsendpoints - Runs cleanly in Docker Desktop / Docker Compose
- Create the main config:
cp config/config.example.yaml config/config.yaml-
Adjust
config/config.yamlfor your Baxi device and MQTT broker. -
Create local env overrides:
cp .env.example .envAt minimum, keep a unique MQTT_CLIENT_ID in .env if you run more than one instance against the same broker.
- Build and start:
docker compose up -d --build- Check status:
docker compose ps
docker compose logs --tail=100The app loads settings in this order:
config/config.yaml- Environment variables from the container
This means .env is a good place for machine-local overrides, while config/config.yaml stays as the shared base config.
These are supported by the application:
MQTT_CLIENT_IDMQTT_HOSTMQTT_PORTMQTT_USERNAMEMQTT_PASSWORDMQTT_KEEPALIVEMQTT_QOSBAXI_WS_URLBAXI_USERNAMEBAXI_PASSWORDBAXI_TIMEOUTLOG_LEVELLOG_FILEHEALTH_PORTHEALTH_INTERVALHEALTH_TIMEOUTHA_ENABLEDHA_DISCOVERY_PREFIXTZ
Recommended candidates for .env:
MQTT_CLIENT_ID: machine-specific, avoids duplicate client disconnectsLOG_LEVEL: useful per environmentHEALTH_PORT: useful if8080is busy locallyMQTT_HOST/BAXI_WS_URL: useful when the same repo is used against different devicesMQTT_USERNAME/MQTT_PASSWORD/BAXI_PASSWORD: useful when you do not want secrets in the shared YAML
The service exposes:
GET /health: detailed component healthGET /ready: readiness checkGET /live: liveness checkGET /metrics: Prometheus-style metrics
Docker health checks use /live, so temporary dependency startup delays do not flap container health.
Enable discovery in config/config.yaml:
homeassistant:
enabled: true
discovery_prefix: "homeassistant"python -m venv .venv
.venv\Scripts\python.exe -m pip install -r requirements.txt
.venv\Scripts\python.exe -m pip install pytest pytest-asyncio pytest-cov.venv\Scripts\python.exe -m pytest -qdocker compose build- If another instance is already connected to MQTT with the same
client_id, the broker may disconnect one of them. - A separate local
.envis the easiest way to keep desktop and server instances from conflicting.
MIT