Skip to content

Commit

Permalink
docs: update README
Browse files Browse the repository at this point in the history
  • Loading branch information
kpetremann committed Jun 23, 2023
1 parent 121384a commit 0e16554
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# DHT2MQTT

DHT2MQTT is a yet another tool to send DHT11/DHT22 metrics to MQTT.
DHT2MQTT is yet another tool to send DHT11/DHT22 metrics to MQTT.

It is designed to be compatible with [mqtt-exporter](https://github.com/kpetremann/mqtt-exporter).

Expand All @@ -12,23 +12,28 @@ It leverages [MichaelS11/go-dht](https://github.com/MichaelS11/go-dht).

### Build from source

```CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=5 go build ./cmd/dht2mqtt```
```CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=7 go build ./cmd/dht2mqtt```

### Usage

```
./dht2mqtt -h
Usage of ./dht2mqtt:
-dht-model string
DHT sensor model: DHT11 or DHT22 (default "DHT22")
-fahrenheit
Temperature unit. Fahrenheit if set, default is Celcius
-gpio-pin string
GPIO PIN Name on which the sensor is connected (default "GPIO4")
GPIO PIN Name on which the sensor is connected (default "GPIO4")
-log-level string
log level (debug, info, warn, error, fatal, panic, disabled) (default "info")
-mqtt-topic-root string
MQTT url, example: dh2mqtt/ (default "dh2mqtt/")
MQTT url, example: dh2mqtt/ (default "dh2mqtt/")
-mqtt-url string
MQTT url, example: tcp://127.0.0.1:1883
MQTT url, example: tcp://127.0.0.1:1883
-mqtt-username string
username to connect to MQTT. The password must be set as in 'DHT2MQTT_PASSWORD' varenv
username to connect to MQTT. The password must be set as in 'DHT2MQTT_PASSWORD' varenv
-sensor-name string
sensor name (default "sensor")
sensor name (default "sensor")
```

Example:
Expand Down

0 comments on commit 0e16554

Please sign in to comment.