mirror of
https://codeberg.org/icewind/mitemp-prometheus.git
synced 2026-06-03 09:04:13 +02:00
usage
This commit is contained in:
parent
4c573d0d3b
commit
284f83a904
1 changed files with 24 additions and 0 deletions
24
README.md
24
README.md
|
|
@ -2,6 +2,30 @@
|
|||
|
||||
Expose Xiaomi MI Temperature and Humidity Sensor to prometheus
|
||||
|
||||
## Usage
|
||||
|
||||
Run the binary with the following environment variables
|
||||
|
||||
```dotenv
|
||||
ADAPTER=00:1A:7D:DA:71:01
|
||||
PORT=3030
|
||||
NAMES="58:2d:34:39:1a:01=Sensor 1,58:2d:34:39:1a:02=Sensor 2"
|
||||
```
|
||||
|
||||
The prometheus metrics will be available at `localhost:3030/metrics`
|
||||
|
||||
```
|
||||
sensor_battery{name="Sensor 1", mac="58:2d:34:39:1a:01"} 100
|
||||
sensor_temperature{name="Sensor 1", mac="58:2d:34:39:1a:01"} 15.8
|
||||
sensor_humidity{name="Sensor 1", mac="58:2d:34:39:1a:01"} 59.2
|
||||
sensor_battery{name="Sensor 2", mac="58:2d:34:39:1a:02"} 100
|
||||
sensor_temperature{name="Sensor 2", mac="58:2d:34:39:1a:02"} 16
|
||||
sensor_humidity{name="Sensor 2", mac="58:2d:34:39:1a:02"} 55.9
|
||||
sensor_battery{mac="58:2d:34:39:1a:03"} 100
|
||||
sensor_temperature{mac="58:2d:34:39:1a:03"} 16.1
|
||||
sensor_humidity{mac="58:2d:34:39:1a:03"} 55.3
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
Licensed under either of
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue