A Prometheus exporter for Tasmota smart plugs.
Go to file
Nick Trimborn 4e45eb26f4
Docker Push / build (push) Successful in 40s Details
added error handling back in
2023-07-20 14:59:23 +02:00
.github/workflows updated workflow 2023-07-20 11:16:49 +02:00
.gitignore Able to scrape 2022-01-14 13:56:41 -05:00
Dockerfile Update Dockerfile 2022-11-23 16:12:19 -05:00
LICENSE Initial commit 2022-01-14 13:02:01 -05:00
README.md Updated readme 2022-04-24 18:04:40 -04:00
grafana.json Added grafana dashboard 2022-04-24 11:43:24 -04:00
grafana.png Updated readme 2022-04-24 18:04:40 -04:00
metrics.py added error handling back in 2023-07-20 14:59:23 +02:00
requirements.txt updated to match fork 2023-07-20 13:07:41 +02:00

README.md

Tasmota Power Exporter

A custom exporter for Prometheus for the Tasmota open source smart plug firmware.

Allows you to collect metrics directly from individual smart plugs without the use of HomeAssistant or something similar.

Grafana Dashboard

Available in grafana.json

grafana

Deployment

The GitHub actions pipeline automatically builds Docker images for ARM and x86 devices for simplified deployment.

Docker-Compose:

  tasmota:
    image: ghcr.io/astr0n8t/tasmota-power-exporter:latest
    container_name: tasmota-power
    restart: always
    ports:
    - 8000:8000
    environment:
    - DEVICE_IP=<Tasmota IP>
    - USER=<user>
    - PASSWORD=<password>

Prometheus Config:

- job_name: "tasmota"

    # metrics_path defaults to '/metrics'
    # scheme defaults to 'http'.

    static_configs:
        - targets: ["127.0.0.1:8000"]

Development

Perform the following:

git clone https://github.com/astr0n8t/tasmota-power-exporter.git
cd tasmota-power-exporter
pip install -r requirements.txt

All of the exporter code is found in metrics.py.

Contributors