1
0
Fork
You've already forked taspromto
0
Publish tasmota state into prometheus
  • Rust 91.4%
  • Nix 8.6%
Find a file
Robin Appelman 7dff97b474
Some checks failed
CI / checks (push) Failing after 54s
forward mitemp to home assistant
2026年06月29日 23:01:15 +02:00
.forgejo/workflows workflow updates 2025年06月02日 22:26:40 +02:00
nix updates 2026年03月26日 16:38:43 +01:00
src forward mitemp to home assistant 2026年06月29日 23:01:15 +02:00
.dockerignore docker setup 2020年11月15日 17:28:50 +01:00
.envrc flake 2022年07月28日 19:13:02 +02:00
.gitignore allow using config file instead of env 2024年10月27日 13:52:53 +01:00
Cargo.lock forward mitemp to home assistant 2026年06月29日 23:01:15 +02:00
Cargo.toml forward mitemp to home assistant 2026年06月29日 23:01:15 +02:00
config.toml allow using config file instead of env 2024年10月27日 13:52:53 +01:00
flake.lock flake update 2026年06月26日 17:11:04 +02:00
flake.nix flake update 2026年06月26日 17:11:04 +02:00
README.md forward mitemp to home assistant 2026年06月29日 23:01:15 +02:00
scratch.json forward mitemp to home assistant 2026年06月29日 23:01:15 +02:00

taspromto

Publish tasmota (and other) state into prometheus

What

Taspromto listens to messages published by tasmota (and other) devices to MQTT and presents the data in a prometheus compatible format.

Usage

Run the binary with the following environment variables set

PORT=
MQTT_HOSTNAME=
MQTT_USERNAME= # Optional
MQTT_PASSWORD= # Optional

Exposed data

The following tasmota data is supported

  • ON/OFF state
  • Current and total power consumption for power meter devices
  • CO2 levels for MH-Z19 sensors
  • Power and Gas levels from supported P1 smart meters
  • Particle concentration from PMS5003 sensors
  • 433Mhz temperature sensor readings from rtl_433

Xiaomi MI Temperature and Humidity Sensors

Tasmota can expose temperature and humidity data from Xiaomi sensors, to expose these sensors you need to configure the names for the sensors.

This is done by setting the MITEMP_NAMES environment variable to comma separated key value pairs of the last 6 digits of the MAC address of the sensors and the desired name.

MITEMP_NAMES="351234=Bedroom,352468=Living Room"

In addition to exposing the data to prometheus, taspromto will also publish this data over the same MQTT connection in a home-assistant compatible format.

433Mhz temperature sensors

Taspromto can parse data 433Mhz temperature sensors send to MQTT by rtl_433.

rtl_433 needs to be configured to send it's output to the rtl_433[/model] topic, then sensors can be configured by setting the RF_TEMP_NAMES environment variable to comma seperated key value pairs. Where the key is the sensor model, id and channel.

RF_TEMP_NAMES="Bresser-3CH:73:1=Front Yard,Bresser-3CH:73:2=Attic"