eltonlazzarin / rpi-dht11-api-docker

Collect data from DHT11 sensors via docker container

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

The docker image can be found here.

📝 License

This project is under the MIT license.

Made with ♥ by Elton Lazzarin 👋 Get in touch!

About

Collect data from DHT11 sensors via docker container

License:MIT License


Languages

Language:Python 89.4%Language:Dockerfile 10.6%