Skip to content

Daemon to query the local temperature sensor on a Raspberry Pi (DHT22, DHT11, or AM2302), and send the data to an MQTT server

License

Notifications You must be signed in to change notification settings

janw/dht22-mqtt-daemon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DHT22 MQTT Daemon

DHT22 MQTT is a simple daemon to query the local temperature sensor on a Raspberry Pi, and send the data to an MQTT server (in my case an embedded one from Home Assistant. It can be configured to match personal needs using the config.ini file, and can be daemonized using standard shell foo.

Before using it, it's dependencies have to be installed, most notably the Adafruit DHT Library. They're all inside the requirements.txt, and require Python2!

sudo apt-get install build-essential python-dev python-openssl
sudo pip install -r requirements.txt

Make sure to run the daemon as root (required to access the Raspberry Pi's GPIO pins):

sudo python2 mqtt-dht.py &

About

Daemon to query the local temperature sensor on a Raspberry Pi (DHT22, DHT11, or AM2302), and send the data to an MQTT server

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages