https://github.com/udfsoft/wifi-temp-sensor
A simple IoT temperature and humidity sensor based on **ESP32-C3** and **DHT11**
https://github.com/udfsoft/wifi-temp-sensor
arduino dht11 esp32 sensor wifi
Last synced: about 2 months ago
JSON representation
A simple IoT temperature and humidity sensor based on **ESP32-C3** and **DHT11**
- Host: GitHub
- URL: https://github.com/udfsoft/wifi-temp-sensor
- Owner: UDFSoft
- License: apache-2.0
- Created: 2025-08-26T11:39:58.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-08-26T12:25:01.000Z (10 months ago)
- Last Synced: 2025-08-26T15:17:47.434Z (10 months ago)
- Topics: arduino, dht11, esp32, sensor, wifi
- Language: C++
- Homepage: https://udfsoft.com
- Size: 5.69 MB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 🌡️ WiFi Temperature Sensor (ESP32 + DHT11)
[official page](https://udfsoft.com/)
A simple IoT temperature and humidity sensor based on **ESP32-C3** and **DHT11**.
The device measures temperature and humidity, sends the data to a backend server, and from there it can be forwarded, for example, to a Telegram bot.
## 📌 Features
- Reads temperature and humidity from the DHT11 sensor
- Connects to Wi-Fi using [WiFiManager](https://github.com/tzapu/WiFiManager) (automatic configurator)
- Sends data to a server via HTTPS (with `X-Api-Key` and `X-Device-Id` headers)
- LED indicator while sending data
- Serial Monitor logging for debugging
## 🛠️ Hardware
- **ESP32-C3** (ESP8266/ESP32 can also be used with minor pin adjustments)
- **DHT11** sensor (can be replaced with DHT22 for better accuracy)
- LED indicator (`LED_PIN`)
## ⚙️ Setup
1. Install required libraries in Arduino IDE / PlatformIO:
- `DHT sensor library`
- `WiFiManager`
- `WiFiClientSecure`
- `HTTPClient`
2. Set your values in the code:
```cpp
#define API_KEY "your_api_key"
#define DEVICE_ID "your_device_id"
```
3. Flash the firmware to the ESP32-C3.
4. On the first run, the device will create an access point ESP32_AP with password 12345678 — connect and configure your Wi-Fi credentials.
## 🚀 How it works
1. ESP32 connects to Wi-Fi.
2. Every 30 seconds, it reads data from the DHT11.
3. Data is sent to the server via a POST request in JSON format:
```json
{
"deviceId": "xxxx-xxxx-xxxx-xxxx",
"temperature": 24.5,
"humidity": 55.0
}
```
## 📡 Integration example
The backend receives the data and forwards it to a Telegram bot, so you can easily check the temperature and humidity in your room.
## 📷 Photo (example)


## 🔧 Author: udfowner