https://github.com/cdump/miio2prometheus
https://github.com/cdump/miio2prometheus
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/cdump/miio2prometheus
- Owner: cdump
- Created: 2020-12-06T15:27:40.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-12-06T15:35:27.000Z (over 5 years ago)
- Last Synced: 2025-01-20T09:12:30.997Z (over 1 year ago)
- Language: Python
- Size: 7.81 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# miio2prometheus
Пример экспорта измерений с устройств Xiaomi в [prometheus](https://prometheus.io/)
- Монитор качества воздуха Xiaomi Cleargrass CGS1
- Увлажнитель воздуха Xiaomi Smartmi Zhimi Air Humidifier 2
Получить токены устройств (чтобы заменить `FIXME` в скрипте): [инструкция](https://github.com/jghaanstra/com.xiaomi-miio/blob/master/docs/obtain_token.md)
## Запуск
- Установить [python poetry](https://python-poetry.org/)
- Выполнить
```sh
$ git clone https://github.com/cdump/miio2prometheus.git
$ cd miio2prometheus
$ poetry install
$ poetry run python3 miio2prometheus.py
```
- Метрики доступы на `http://127.0.0.1:5433/metrics`