Skip to main content

A web connected DHT sensor reading temperature and humidity values on Raspberry Pi

Project description

pi_dht_webthing

A web connected humidity and temperature sensor

This project provides a webthing API to a DHT11 or DHT22 humidity and temperature sensor running on a Rasperry Pi.

By doing this a http endpoint is provided which supports reading the humidity and temperature sensor values via http. E.g.

# webthing has been started on host 192.168.0.23

curl http://192.168.0.23:9050/properties 

{
   "temperature" : 17.3,
   "humidity" : 79.9
}

Regarding the hardware setup please tutorials such as Using the DHT11 temperaturesensor with the raspberry pi

To install this software you ma use PIP such as shown below

pip install pi_dht_webthing

After this installation you may start the webthing via your code or via command line. E.g

sudo dht --command listen --port 9050 --gpio 33

Here the webthing API will be exposed using the local port 8080 and connecting the DHT signal pin 33

You may also use the register command to register and start the webthing service as systemd unit. By doing this the wething service will be started automatically on boot

sudo dht --command register --port 9050 --gpio 33

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pi_dht_webthing-0.0.5.tar.gz (3.7 kB view hashes)

Uploaded Source

Built Distribution

pi_dht_webthing-0.0.5-py3-none-any.whl (8.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page