HUB
Sign inSign up

elazzar/rpi-dht11-api-docker

By elazzar

•Updated over 3 years ago

Collect data from DHT11 sensors via docker container

Image
0

192

elazzar/rpi-dht11-api-docker repository overview

⁠rpi-dht11-api-docker

Collect data from DHT11 sensors via docker container

⁠Technologies

Main technologies used in the Docker image

Main technologies used in Raspberry Pi 3/4

  • Raspberry Pi OS (64 bit)
  • Docker

Hint with commands to install

sudo apt update
sudo apt upgrade
sudo apt install raspberrypi-kernel raspberrypi-kernel-headers
curl -sSL https://get.docker.com | sh
sudo usermod -aG docker <device-user>
sudo reboot

⁠How to Connect DHT11 on Raspberry Pi 3/4

To use this image on the Raspberry Pi 3/4 assemble your electronic circuit as shown below

Raspberry pi with dht11

⁠How to clone this repository on your Raspberry Pi

git clone https://github.com/eltonlazzarin/rpi-dht11-api-docker.git

⁠How to build the Docker image

To build run:

cd rpi-dht11-api-docker && docker image build --tag elazzar/rpi-dht11-api-docker -f Dockerfile . 

⁠How to run the Docker container

To run the container:

docker compose up -d 

⁠How to view sensor data in your browser

⁠Access the endpoint below to view data from temperature and humidity sensors
http://<your-device-ip>:5000
⁠Access the endpoint below to see only temperature sensor data
http://<your-device-ip>:5000/temperature
⁠Access the endpoint below to see only the humidity sensor data
http://<your-device-ip>:5000/humidity

⁠License

This project is under the MIT license.

The source code can be found here⁠.

Made with ♥ by Elton Lazzarin Get in touch!⁠

Tag summary
Recent tags
Content type
Image
Digest
sha256:f83f9f733…
Size
149.4 MB
Last updated
over 3 years ago
docker pull elazzar/rpi-dht11-api-docker:latest