Skip to content

About

Bridge from the WeatherFlow Tempest API to MQTT, with Home Assistant auto-discovery.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

WeatherFlow MQTT Bridge

A lightweight service that polls the WeatherFlow Tempest REST API and publishes sensor data to an MQTT broker with Home Assistant auto-discovery.

Sensors

The bridge exposes the following sensors to Home Assistant:

Sensor Unit
Air Temperature °C
Feels Like °C
Dew Point °C
Relative Humidity %
Barometric Pressure mbar
Sea Level Pressure mbar
Pressure Trend —
Wind Speed m/s
Wind Gust m/s
Wind Direction °
Precipitation Rate mm/h
Precipitation (1hr) mm
Solar Radiation W/m²
UV Index UV index
Lightning Count strikes
Lightning Distance km
Air Density kg/m³

Configuration

All configuration is done via environment variables:

Variable Required Default Description
WEATHERFLOW_TOKEN Yes — WeatherFlow API token
WEATHERFLOW_STATION_ID No 2799 Station ID to poll
MQTT_HOST No localhost MQTT broker hostname
MQTT_PORT No 1883 MQTT broker port
MQTT_USERNAME No — MQTT username
MQTT_PASSWORD No — MQTT password
POLL_INTERVAL No 60 Polling interval in seconds

Running

Docker Compose

cp .env.example .env
# Edit .env with your values
docker compose up -d

Docker

docker run -d \
  -e WEATHERFLOW_TOKEN=your_token \
  -e MQTT_HOST=192.168.1.42 \
  ghcr.io/hacking-robots-and-beer/wetherflow:latest

Kubernetes

Apply the manifests from the k8s/ directory. Update the Secret values first:

kubectl apply -f k8s/deployment.yaml

Locally

pip install -r requirements.txt
export WEATHERFLOW_TOKEN=your_token
python weatherflow_mqtt.py

How It Works

  1. Connects to the configured MQTT broker
  2. Publishes Home Assistant MQTT discovery messages for all sensors
  3. Polls the WeatherFlow REST API at the configured interval
  4. Publishes each sensor value to weatherflow/sensor/<field>/state
  5. Publishes availability status to weatherflow/status

The service handles graceful shutdown on SIGTERM/SIGINT and sets an MQTT last-will message so Home Assistant marks sensors as unavailable if the bridge goes offline.

About

Bridge from the WeatherFlow Tempest API to MQTT, with Home Assistant auto-discovery.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages