Skip to content

An app to control and monitor an Atag One thermostat via Python/Docker

Notifications You must be signed in to change notification settings

EtxeanNet/atagone2mqtt

Repository files navigation

atagone2mqtt

Codacy Badge Docker Pulls HitCount

An app to control and monitor an Atag One thermostat via MQTT

Introduction

atagone2mqtt works as an bridge between the Atag One webapi and MQTT. It periodically polls the Atag One thermostat and publishes the sensor information to an MQTT broker. Reversely, it subscribes to control messages on a number of MQTT topics and controls the Atag One thermostat e.g. to change the central heating or water setpoints.

The MQTT topics that this app publishes follow the Homie convention. By this means the Atag One can be integrated easily with home automation systems that recognize this convention such as openHAB or HomeAssistant.

Under the hood, this bridge uses (a modified version of) the pyatag library to interface with the Atag One Thermostat and the Homie library to communicate with the MQTT broker.

Setup

The configuration of atagone2mqtt is done with the following environment variables.

MQTT_HOST : The address of the MQTT broker.

MQTT_PORT : USe this if your MQTT broker uses a port different from 1883.

MQTT_USERNAME : Only use this if you need to use a username to connect to your MQTT broker.

MQTT_PASSWORD : Only use this if you need this to connect to your MQTT broker.

MQTT_CLIENT : The name used to identify this client to the MQTT broker. If not specified, the client will announce itself as '<atagmqtt-HOSTNAME>'.

ATAG_HOST : The address of your Atag One thermostat. If this is not specified then the Atag One themostat is discovered automatically on the local netwerk. Make sure that UDP port 11000 is not blocked by the firewall.

Build

You can run the app directly from Python, after installing the modules from requirements.txt. Alternatatively, you can use the supplied Dockerfile to build a Docker container to run app.

Building for docker hub can be done with:

docker buildx build --push --platform linux/arm/v7,linux/arm64/v8,linux/amd64 --tag etxean/atagone2mqtt:<version> --tag etxean/atagone2mqtt:latest .