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

https://github.com/zamberjo/dht22_sensor_client

Client MQTT for sensor DHT22
https://github.com/zamberjo/dht22_sensor_client

Last synced: about 1 month ago
JSON representation

Client MQTT for sensor DHT22

Awesome Lists containing this project

README

          

# DHT22 Sensor client for RPi

Installation
-------

I always recommend using virtualenv
```
apt-get update && apt-get install -y virtualenv build-essential python-dev python-openssl
```

```
git clone https://github.com/zamberjo/dht22_sensor_client.git /opt/dht22_sensor_client && pushd $_
```

```
virtualenv venv
source venv/bin/activate
```

```
git clone https://github.com/adafruit/Adafruit_Python_DHT.git /opt/Adafruit && pushd $_
python setup.py install
popd
rm -rf /opt/Adafruit
```

```
pip install -r requeriments.txt
```

Use
---

Publish temperature and humidity
```
/opt/dht22_sensor_client/venv/bin/python dht22_cron.py
```

Crontab
-------

```
crontab -e
*/5 * * * * cd /opt/dht22_sensor_client/venv/bin/python /opt/dht22_sensor_client/dht22.py >/dev/null 2>&1
```