Install
openclaw skills install dht11-tempRead temperature and humidity from DHT11 sensor. Supports custom GPIO pins via CLI argument or environment variable.
openclaw skills install dht11-tempRead temperature and humidity from a DHT11 sensor.
Wiring (adjust pin as needed):
DHT11 Pinout:
─────────────
1. VCC → 5V (Pin 2 oder 4)
2. DATA → GPIO <PIN> + 10K Pull-Up Widerstand → 5V
3. GND → GND (Pin 6)
Important: The 10K pull-up resistor must be connected between DATA and VCC (5V)!
# Install dependencies
pip3 install RPi.GPIO
sudo python3 scripts/dht/main.py
sudo python3 scripts/dht/main.py 4 # Uses GPIO 4
export DHT_PIN=4
sudo python3 scripts/dht/main.py
| Variable | Default | Description |
|---|---|---|
| DHT_PIN | 19 | GPIO pin number |
# Read every 30 minutes
*/30 * * * * sudo python3 ~/scripts/dht/main.py >> /var/log/dht.log 2>&1