An open API service indexing awesome lists of open source software.

https://github.com/l3akage/onewire_exporter

Prometheus exporter for DS18b20 1-wire sensors connected to a raspberry pi
https://github.com/l3akage/onewire_exporter

ds18b20 onewire prometheus-exporter

Last synced: 8 days ago
JSON representation

Prometheus exporter for DS18b20 1-wire sensors connected to a raspberry pi

Awesome Lists containing this project

README

        

# onewire_exporter

Prometheus exporter for 1-wire temperature sensors connected to a Raspberry PI

# Usage

```
./onewire_exporter
```

# Options

Name | Default | Description
---------|-------------|----
--version || Print version information
--listen-address | :9330 | Address on which to expose metrics.
--path | /metrics | Path under which to expose metrics.
--ignoreUnknown |true | Ignores sensors without a name
--names | names.yaml | File mapping IDs to names"

# Configuration

The names.yaml files contains the sensor id and name to use
```
names:
28-0416506c85ff: temp_sensor_01
```

# Setup
For gpio 4 append this to /boot/config.txt and reboot

```
dtoverlay=w1-gpio-pullup,gpiopin=4,extpullup=on
```

You should now see your sensors with IDs in /sys/bus/w1/devices

# Example output
```
# HELP onewire_temp Air temperature (in degrees C)
# TYPE onewire_temp gauge
onewire_temp{id="28-0416506c85ff",name="temp_sensor_01"} 28.187
```

# Circuit

I used DS18b20 1-wire sensors. For a long distance (50m worked fine) i used 5v power for the sensors and 3.3v with a 4.7k resistor as pull-up.

![Circuit](onewire_circuit.png)