ESP32 Temperature Humidity Web Server: Phone Dashboard
Share
ESP32 Temperature Humidity Web Server: Phone Dashboard
An ESP32 temperature humidity web server is the classic first WiFi project: the board reads a DHT11 sensor, hosts a tiny web page, and your phone opens it from anywhere in the house. No app, no cloud account, no soldering — about 45 minutes of hands-on time and every reading updates live in your phone's browser.
Quick answer: Flash an ESP32 with a sketch that reads a DHT11 on GPIO 4 and serves a dashboard at the board's WiFi IP address, then open that IP in your phone's browser on the same WiFi network. Our session's tray came to Rs.505; a practical build — swap in a real dev board and add the DHT11's missing pull-up resistor — lands near Rs.520. Difficulty: beginner, no soldering.
Proof of work: we built this exact project through Soldr, Compoden's AI build assistant, on 10 August 2026 — every screenshot below is from that session. Published 10 August 2026 · Last updated 11 August 2026.
What parts do you need for an ESP32 temperature and humidity dashboard?
You need three things that matter: an ESP32 (it is the WiFi radio and the web server), a DHT11 temperature and humidity sensor (Rs.45), and jumper wires. Our Soldr session carded a clean four-part tray for Rs.505 — no load-cell amplifiers, no parts unrelated to a temperature dashboard, just the pieces this build actually needs. Soldr still flagged two honest caveats about that tray on screen, which we walk through below.
This is the exact tray Soldr assembled in our session, verified against live catalog prices:
| Part | Qty | Price (Rs.) | Where to buy |
|---|---|---|---|
| ESP32-WROOM-32 WiFi + BLE module (see honest note below) | 1 | 280 | ESP32-WROOM-32 Module |
| DHT11 Temperature & Humidity Sensor | 1 | 45 | DHT11 Temperature & Humidity Sensor |
| 5V 2A Micro-USB Power Adapter (optional — see note) | 1 | 140 | 5V 2A Micro-USB Power Adapter |
| Male-to-Male Breadboard Jumper Wires (20cm, 24AWG) | 1 | 40 | Male-to-Male Breadboard Jumper Wires |
| Tray total | 505 | Cash on delivery available across India |
One tray, two honest notes — both flagged by Soldr itself, on screen, before we spent a rupee.
The Rs.280 board is a bare module, not a beginner board. Soldr picked the ESP32-WROOM-32 because it is "the lowest-cost listed controller that meets the Wi-Fi requirement" — and offered a swap. Take the swap. The catalog entry for that Rs.280 part is a bare WROOM-32 module with no USB port, no voltage regulator, and no reset/boot buttons: you cannot plug it into a laptop and flash it. The session's own build reply flags the related mismatch in plain words: "The controller's stated power input is 3.3V DC, so the adapter's 5V output is an electrical mismatch that must not be ignored." Both problems disappear if you swap to the ESP32-DevKitC Development Board (Rs.340): it carries the same WROOM-32 chip plus the USB programmer and 3.3V regulator on board, so your laptop's USB cable powers and flashes it — which also makes the Rs.140 wall adapter unnecessary for a desk build. The active parts draw roughly 81mA in Soldr's estimate (excluding the wires and the wall adapter itself), far below what a USB port supplies.
The DHT11 needs a pull-up resistor, and the tray has none. Soldr's own "Common problems" note for this build says it directly: "the DHT11 needing its pull-up resistor, which is not included in the listed parts." The firmware build log repeats the same fix in its wiring line: "pull-up 10kΩ to 3.3V if your sensor module doesn't have one built-in." Add the Resistor Variety Pack (Rs.75) — it carries the 4.7k–10k value the pull-up needs — plus a SYB-170 Mini Breadboard (Rs.20) to hold everything (our own addition, since Soldr's tray does not carry a breadboard and you need somewhere to make the connection), and skip the pull-up entirely if your DHT11 is a 3-pin module with the resistor pre-fitted on its little PCB.
So the list we would actually order: DevKitC board (Rs.340) + DHT11 (Rs.45) + jumper wires (Rs.40) + resistor pack (Rs.75) + mini breadboard (Rs.20) = Rs.520, powered from your laptop.
Tools: a laptop with the free Arduino IDE, a micro-USB data cable, your WiFi name and password, and your phone. That is all.
Step 1: Describe the dashboard to Soldr in one sentence
Open Soldr and say what you want in plain words. Our exact prompt: "I want a temperature and humidity dashboard I can open on my phone browser, using an ESP32." We named an outcome and one board family — not a single sensor, wire, or resistor.
Soldr's reply explains every part's role: the ESP32's WiFi and controller "give this project the controller and Wi-Fi connection needed to serve the dashboard to a phone browser," the DHT11 "is the part that supplies the dashboard's environmental readings" over a single-wire connection drawing about 0.5mA, and the jumper wires "fill the wiring slot" so nothing needs soldering. It rates the build profile Beginner ("every part plugs in, no soldering"), suitable for roughly ages 10+ with an adult handling the wall adapter, estimates the active parts at roughly 81mA total, and lists exactly two problems to expect: the missing DHT11 pull-up resistor and the 5V adapter's mismatch with the controller's stated 3.3V DC input.
Checkpoint: your parts tray shows 4 parts, all marked in stock, around Rs.505 — plus a "to complete this build" strip suggesting the resistor pack.
Step 2: Wire the DHT11 to the ESP32
Four connections. The session's firmware reads the DHT11 on GPIO 4 and its own wiring note is explicit about the pull-up: "pull-up 10kΩ to 3.3V if your sensor module doesn't have one built-in." Note: our screenshots captured the tray, the code, and the range question — not a dedicated wiring-tab view; this is standard-correct wiring for a DevKit-style ESP32 and a DHT11; verify against the wiring tab in your own Soldr session.
| DHT11 pin | ESP32 pin | Why |
|---|---|---|
| VCC (+) | 3V3 | The DHT11 accepts 3.3–5V; 3.3V keeps its data line at a level the ESP32's pins are rated for |
| DATA | GPIO 4 | The single-wire data pin the session's firmware reads and wires |
| GND (−) | GND | Common ground — no circuit without it |
| DATA → VCC | 10k resistor | The pull-up the sensor needs; the session's own wiring note asks for it |
Two practical tips. If your DHT11 is a 3-pin module on a small blue PCB, the pull-up is usually already fitted — wire just VCC, DATA, GND. And push the DevKit board into the breadboard so it straddles the centre gap, leaving one free hole beside each pin for its jumper.
Checkpoint: three (or four) connections made, nothing warm to the touch. Nothing else happens yet — there is no code on the board.
Step 3: Ask Soldr for the full code
Our second prompt was four words: "give me the full code." The build log ran 107 seconds and came back with a complete sketch described in one sentence: it "serves a dark, phone-friendly dashboard that updates in real time using WebSockets."
The build log also names its libraries plainly, and they are worth listing exactly because you will install these in the Arduino IDE's Library Manager before flashing: DHT sensor library (Adafruit), Adafruit Unified Sensor, ArduinoJson (by Benoit Blanchon), ESPAsyncWebServer and AsyncTCP (both maintained by ESP32Async). The flash steps in the session are: select board ESP32 Dev Module and the correct COM port, upload, then open the Serial Monitor at 115200 baud and watch for a [READY] line carrying the board's IP address; on your phone, open that IP and the dashboard appears, updating every 5 seconds.
One honest flag from the session itself, worth reading before you trust the pin assignments blindly: "Heads up — this code has not been checked against a board. Your build has parts in it, but no board I can compile for — so I could not verify the pins." That is because the tray's ESP32-WROOM-32 is a bare module Soldr cannot compile against — not a flaw in the wiring logic. GPIO 4 is the standard DHT11 data pin on ESP32 DevKit-style boards and matches the sensor's own datasheet requirements, but if you own a specific board, telling Soldr which one gets you pins actually verified against it.
Checkpoint: the build log finishes and your session shows "full code is in the Firmware tab."
Step 4: Flash the board and find its IP address
Open the sketch from the Firmware tab in the Arduino IDE, put your WiFi name and password into the WIFI_SSID and WIFI_PASS lines, select board ESP32 Dev Module (the session's own instruction — it fits the DevKitC), and click Upload. Then open the Serial Monitor at 115200 baud.
Watch for the [READY] line the session's flash instructions describe — it carries the board's WiFi IP address once the connection succeeds (something like 192.168.1.42). Write that address down; it is your dashboard's URL.
Checkpoint: Serial Monitor prints a [READY] line with an IP address.
Step 5: Open the dashboard on your phone
Take your phone, make sure it is on the same WiFi network as the ESP32 (not mobile data), open any browser, and type the IP address from the Serial Monitor into the address bar — for example http://192.168.1.42. That is the whole trick: the ESP32 is a tiny web server on your home network, and any device on that network can open it. No app to install, no account, no cloud — the page is served from the chip on your desk.
The page shows live temperature and humidity, pushed over the WebSocket connection every 5 seconds, with a status line that reads Live while connected. Breathe on the sensor: the humidity number jumps within a reading or two. That is your success state — sensor, firmware, radio, and browser all agreeing.
Checkpoint (success state): phone browser showing live numbers, status reading "Live", humidity rises when you breathe on the DHT11.
How far from your router can the ESP32 be?
We asked Soldr exactly that, mid-session: "how far from my router can the ESP32 be before this stops working?" Its answer, quoted directly: "Realistically: 10–30 m indoors through normal walls is the sweet spot, and 50–100 m line-of-sight outdoors if there's nothing between the board and the router. Those marketing 'range' figures assume open air with zero obstacles — ignore them."
Soldr's answer named three things that decide where you land on that range: walls ("drywall is fine, but brick, concrete, and metal studs eat 2.4 GHz signal fast — every wall between you and the router cuts range roughly in half"), the fact that the ESP32 is 2.4GHz-only ("that's actually good for wall penetration compared to 5 GHz, but it still means no 5 GHz band to fall back on"), and other 2.4GHz noise from microwaves, Bluetooth devices, and neighbours' WiFi competing for the same airtime. Rather than guess, its advice was to read the board's actual signal strength (RSSI) instead of trusting marketing numbers — it even offered to add a live RSSI readout to the dashboard code so you can see your real signal strength on the phone, "so you can see your actual signal strength on the phone. That'll tell you instantly whether placement is the problem before you go hunting for range extenders." The base reference code below does not include that RSSI readout — it is an enhancement Soldr offered, not something built into this build.
Practical placement advice from the same answer: point the exposed PCB antenna trace at the end of the board toward the router, keep the board off the floor and away from metal, and keep the router on a clear 2.4GHz channel.
The full code
This is a reference copy matching the structure described in our session's build log: same pin (GPIO 4 with a 10k pull-up to 3.3V), same serial speed (115200), a WebSocket push design for real-time updates every 5 seconds, and a [READY] boot line printing the WiFi IP. Your own session's Firmware tab holds the exact generated code. Libraries needed, all free in the IDE's Library Manager: DHT sensor library and Adafruit Unified Sensor (Adafruit), ArduinoJson (Benoit Blanchon), ESPAsyncWebServer and AsyncTCP (ESP32Async), on the Arduino-ESP32 core 3.x.
// ESP32 + DHT11 phone dashboard - reference copy (session code: Firmware tab)
// Board: ESP32 DevKitC ("ESP32 Dev Module"). Serial Monitor: 115200 baud.
#include <WiFi.h>
#include <AsyncTCP.h>
#include <ESPAsyncWebServer.h>
#include <ArduinoJson.h>
#include <Adafruit_Sensor.h>
#include <DHT.h>
#define WIFI_SSID "YourNetworkName"
#define WIFI_PASS "YourPassword"
#define DHTPIN 4 // DHT11 DATA -> GPIO 4, 10k pull-up to 3.3V (session wiring)
#define DHTTYPE DHT11
const unsigned long READ_INTERVAL = 5000; // dashboard updates every 5 s (session flash instructions)
DHT dht(DHTPIN, DHTTYPE);
AsyncWebServer server(80);
AsyncWebSocket ws("/ws");
float currentTemp = 0, currentHumidity = 0;
unsigned long lastRead = 0;
const char htmlContent[] PROGMEM = R"rawliteral(
<!DOCTYPE html><html><head><meta name="viewport" content="width=device-width,initial-scale=1">
<title>Temp & Humidity</title><style>body{font-family:sans-serif;text-align:center;background:#111;color:#eee}
.v{font-size:3em}.ok{color:#2ecc71}.err{color:#e74c3c}</style></head><body>
<p id="st" class="err">Connecting</p>
<p class="v"><span id="t">--</span>°C</p><p class="v"><span id="h">--</span>%</p>
<script>let ws;function connect(){ws=new WebSocket('ws://'+location.host+'/ws');
ws.onopen=()=>{st.className='ok';st.textContent='Live';};
ws.onmessage=e=>{let d=JSON.parse(e.data);t.textContent=d.temp.toFixed(1);h.textContent=d.hum.toFixed(0);};
ws.onclose=ws.onerror=()=>{st.className='err';st.textContent='Offline';setTimeout(connect,2000);};}
connect();</script></body></html>)rawliteral";
void setup() {
Serial.begin(115200);
dht.begin();
delay(2000); // settle time before the first read
WiFi.begin(WIFI_SSID, WIFI_PASS);
int attempts = 0;
while (WiFi.status() != WL_CONNECTED && attempts < 20) { delay(500); attempts++; }
if (WiFi.status() == WL_CONNECTED)
Serial.printf("[READY] WiFi connected, IP %s\n", WiFi.localIP().toString().c_str());
else
Serial.println("[READY] WiFi FAILED - check WIFI_SSID/WIFI_PASS and retry");
server.addHandler(&ws);
server.on("/", HTTP_GET, [](AsyncWebServerRequest *req){ req->send_P(200, "text/html", htmlContent); });
server.begin();
}
void loop() {
ws.cleanupClients();
if (millis() - lastRead >= READ_INTERVAL) {
lastRead = millis();
float t = dht.readTemperature(), h = dht.readHumidity();
if (!isnan(t) && !isnan(h)) {
currentTemp = t; currentHumidity = h;
StaticJsonDocument<64> doc;
doc["temp"] = t; doc["hum"] = h;
String json;
serializeJson(doc, json);
ws.textAll(json); // push to every connected phone
}
// a failed read simply keeps the last good value on the dashboard
}
}
What if it doesn't work? Real troubleshooting
These are the failure modes the session itself calls out, plus the classics of every first ESP32 build. Work through them in order.
Why does Soldr say this code "has not been checked against a board"?
Because the parts tray only carries the bare ESP32-WROOM-32 module — a chip Soldr has no compile target for, since it is not a complete development board. Soldr's own words: "Your build has parts in it, but no board I can compile for — so I could not verify the pins." That is a caveat about verification, not a sign the wiring is wrong: GPIO 4 for the DHT11 data pin is the standard choice on ESP32 DevKit-style boards and matches the sensor's own datasheet. If you already own a specific board, tell Soldr which one and it will regenerate the sketch checked against it.
Why does the DHT11 reading fail, or show blank values?
The session's own "Common problems" note narrows it to two causes, in order of likelihood: the missing pull-up resistor (add the 10k between DATA and 3V3, or use a 3-pin module with one built in) and a power mismatch (the sensor wants 3.3–5V; if you power it from the bare module through the mismatched 5V adapter, check the module is really receiving 3.3V on its own pins). Two more DHT quirks worth knowing: the sensor needs about 2 seconds after power-up before its first good read, and it cannot be read faster than once per second, so leave the 5-second interval alone.
Why can't my phone open the IP address?
Ninety percent of the time the phone is not on the same network as the ESP32: mobile data is still on, or the phone is on a guest network or a neighbour's WiFi. Turn mobile data off and join the same router the board uses. The phone being on the router's 5GHz band is normally fine — both bands are one network on most home routers — but remember the ESP32 itself only joins 2.4GHz names. Also re-check the IP in the Serial Monitor after any reboot: home routers hand out addresses by DHCP, and the board's IP can change.
Why won't the sketch compile or upload?
Compile errors almost always mean a missing library — install DHT sensor library, Adafruit Unified Sensor, ArduinoJson, ESPAsyncWebServer, and AsyncTCP from the Library Manager, and make sure the ESP32 board package is installed with "ESP32 Dev Module" selected. If the upload itself fails on a DevKit-style board, hold the BOOT button as the IDE prints "Connecting...". And if you bought the bare Rs.280 WROOM-32 module, this is where it bites hardest: it has no USB port to upload through at all — swap to the DevKitC, as covered in the parts section.
Why did the dashboard go quiet, or WiFi fail to connect?
If it fails at first flash, the two usual causes are a typo in WIFI_SSID or WIFI_PASS (both are case-sensitive) or a 5GHz-only network name (the ESP32 needs 2.4GHz). If it was working and then goes quiet later, you have likely walked past the board's real-world range — Soldr's own range answer above puts that at roughly 10–30m indoors through normal walls. Move the board or the router, point the antenna end of the board toward the router, or ask Soldr to add the RSSI readout it offered so you can read your actual signal strength instead of guessing.
What should you build next?
You now have the pattern behind every IoT dashboard: sensor → firmware → WiFi → any browser. Two good next moves. If this was your first build ever, see how the same one-sentence workflow handled the simplest possible project in our first Arduino project: button-controlled LED guide. And before you trust the DHT11's ±2°C in anything serious, read our DHT11 vs DHT22 vs BME280 accuracy-per-rupee comparison (queued — publishing soon on this blog) to see when the Rs.100 DHT22 upgrade is worth it.
Or start your own build right now: open Soldr, Compoden's AI build assistant, type one sentence about what you want — like we did — and it specs the kit, flags its own tray's weak points, and writes the firmware for your exact parts.
Frequently asked questions
ESP32 temperature humidity dashboard ke liye kaunse parts chahiye?
Three essential parts: an ESP32 development board — we recommend the DevKitC (Rs.340) over the bare Rs.280 module, which has no USB port — a DHT11 sensor (Rs.45), and jumper wires (Rs.40). Add a resistor pack (Rs.75) for the DHT11's 10k pull-up and a mini breadboard (Rs.20): about Rs.520 total from Compoden, cash on delivery available across India.
How much does this ESP32 project cost in India?
Our session's tray as carded came to Rs.505 for four parts — an ESP32-WROOM-32 module, a DHT11 sensor, a 5V adapter, and jumper wires. Soldr itself flagged that the adapter doesn't match the module's 3.3V input and that the DHT11 needs a pull-up resistor the tray doesn't include. The practical build — a DevKitC board instead of the bare module, plus a resistor pack and mini breadboard — is Rs.520, powered from your laptop's USB port. Prices checked August 2026; cash on delivery available.
Do I need an internet connection for this dashboard?
No. The ESP32 serves the dashboard on your local WiFi network — your phone talks straight to the board through your router, and nothing leaves the house. No cloud account, no app, no subscription; it keeps working even if your broadband is down, as long as the router itself is on so both devices share a network.
Can I use a DHT22 instead of the DHT11?
Yes, and for anything beyond learning it is the better sensor: the DHT22 (Rs.100 in the Compoden catalog) reads ±0.5°C against the DHT11's ±2°C, and covers a wider range than the DHT11's 0–50°C and 20–80% RH. The wiring is identical — same single-wire DATA pin, same pull-up — and the code changes by one line: #define DHTTYPE DHT22.