Skip to main content

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 Raspberry Pi. As a webthing, the DHT sensor can be discovered and used by home automation systems or custom solutions supporting the webthing API.

The pi_dht_webthing exposes an http webthing endpoint 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:8070/properties 

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

A RaspberryPi/DHTxx hardware setup and wiring may look like DHT22 example.

To install this software you may use Docker or PIP package manager such as shown below

** Docker approach**

sudo docker run --privileged -p 8070:8070 -e gpio=2 grro/pi_dht_webthing:0.1.0

PIP approach

sudo pip install pi_dht_webthing

After this installation you may start the webthing http endpoint inside your python code or via command line using

sudo dht --command listen --h--port 8070 --gpio 2

Here, the webthing API will be bind on port 8070 and be connected to the DHTxx signal pin using gpio 2

Alternatively to the listen command, you can use the register command to register and start the webthing service as systemd unit. By doing this the webthing service will be started automatically on boot. Starting the server manually using the listen command is no longer necessary.

sudo dht --command register --port 8070 --gpio 2

Metadata

Release files for pi-dht-webthing 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pi-dht-webthing 0.1.2
File Size Uploaded Provenance
pi_dht_webthing-0.1.2.tar.gz 5.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pi-dht-webthing 0.1.2
File Interpreter ABI Platform
pi_dht_webthing-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 16.2 kB

Release files / pi_dht_webthing-0.1.2.tar.gz

Download URL pi_dht_webthing-0.1.2.tar.gz
Size 5.4 kB
Tags Source
SHA-256 checksum
How to use checksums
cbaf819b23e18f2dbc90adc765a6f23255e636733fda95cf8d7f63c88ab0ef38
BLAKE2b-256 checksum
How to use checksums
3d94cde2a6ad77a2ebb6935c32f33c88efed399388f6eb3a08d36f47667e039b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.9.20

Release files / pi_dht_webthing-0.1.2-py3-none-any.whl

Download URL pi_dht_webthing-0.1.2-py3-none-any.whl
Size 10.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3d09af90e606ee22e3a534360a1ef6e01dbdffa47124edfd87590afe021bd702
BLAKE2b-256 checksum
How to use checksums
02e400670fafa1caaac802978ab75c21041460557f10fa5c829b6d009fe6d182
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.9.20

Security for pi-dht-webthing 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page