/hive-prometheus-exporter

A Prometheus exporter for Hive Home smart home products.

Primary LanguagePython

hive-prometheus-exporter

This project is a Docker image that polls Hive Home's API and exposes metrics about your smart devices. The metrics are exposed through the Prometheus client, so you'll need a Prometheus installation to collect them.

Usage

The Docker image requires a few environment variables to work properly. Fill in the following and save it to a file called .env:

PORT=8888
HIVE_USERNAME=
HIVE_PASSWORD=
POLLING_INTERVAL_SECONDS=60
LOG_LEVEL=INFO

Then you can run:

docker run --env-file .env -p 8888:8888 samwho/hive-prometheus-exporter

And if you navigate to http://localhost:8888 in your browser, you should see a bunch of Prometheus metrics. Anything starting with hive_ is a metric that has been exported by this project.

Note: This project currently doesn't support Hive Home accounts that have 2FA enabled. You'll need to either disable 2FA to use this, or create a new Hive Home account without 2FA and share your home with it. The read-only permissions are sufficient.