Home IoT Hub Series · 20
[Part 20] The house finally fits on one screen - finishing the 20-slot Home IoT Hub
![[Part 20] Series finale — your Home IoT Hub is done, and what comes next, cover image](/iot-lab/assets/home-iot-hub-series-finale-hero.png)
This article is part of the Home IoT Hub system connected to the central NodeMCU server built in Part 2: Building the Brain. The sensor and control nodes from parts 3-19 converge into the brain server from part 2, completing the 20-slot Home IoT Hub. The collected data is sent over the local
IoT_Hub_Net network and updates all slots 1-20 on the central server (/set?noX=value), becoming part of the decision pipeline for the 20-channel smart-home controller.If you followed all the way to Part 19, this is the system running in your home right now.
- 1 brain: a NodeMCU + OLED + buzzer. Sitting in the middle of the living room, scrolling through all 20 slots four at a time to show you the state of your home.
- 19 sensor nodes: scattered around the house, measuring temperature, humidity, door-open, gas, power, even the weight of the food bowl.
- Wi-Fi: a private network called
IoT_Hub_Netthat connects every sensor node to the brain. - Alerts: when there's a gas leak, a fire, an open front door, or a near-empty food bowl, the buzzer sounds and the OLED inverts.
- Automatic control: when someone's in the living room and it's hot, the air conditioner turns itself on.
All 20 slots at a glance
What it looks like on the OLED
The OLED 128×64 screen is split into 4 lines per page, 5 pages in total, and auto-scrolls every 3 seconds. Here's what actually shows up on screen.
The OLED 128x64 screen shows 4 lines at a time, switching automatically every 3 seconds.
What each sensor does and how it's judged
| # | OLED label | What it measures | Normal range | Caution / alert threshold |
|---|---|---|---|---|
| 1 | Living Temp 24.5 | Living-room temp | 18–28℃ | — |
| 2 | Living Hum 58.0 | Living-room humidity | 40–65% | 70%+ watch for mold |
| 3 | Outside Temp 18.0 | Outdoor temp | varies by season | below freezing → watch for frozen pipes |
| 4 | AC ON/OFF | Air conditioner running | — | — |
| 5 | Boiler ON/OFF | Boiler running | ON in winter | ON in summer → something's off |
| 6 | Stove 0/1 | Gas stove in use | 0 normally | 1 while you're out → check |
| 7 | Gas Leak 0/1 ⚠ | Gas leak | 0 | if 1, inspect immediately |
| 8 | Fire 0/1 ⚠ | Flame detected | 0 | if 1, inspect immediately |
| 9 | Front Door 0/1 ⚠ | Front door open | 0 (while out) | 1 while out or asleep → alert |
| 10 | Door Lock 0/1 | Door lock engaged | 1 | 0 while out → check |
| 11 | Living Light ON/OFF | Living-room light | ON at night | ON while out → check |
| 12 | Fridge Temp 3.5 | Fridge temp | 0–5℃ | 8℃+ → suspect a fault |
| 13 | CO2 620 | Carbon dioxide | 400–800ppm | 1000+ → time to ventilate |
| 14 | Dust PM2.5 35 | Fine dust | 0–30㎍/m³ | 50+ → run the air purifier |
| 15 | Power 320 | Instantaneous power draw | varies by household | sudden spike above normal → suspect a short |
| 16 | Water 2.5 | Water usage | — | continuous flow → suspect a leak |
| 17 | Hot Water 42.0 | Hot-water pipe temp | 35–50℃ | 60℃+ → overheating |
| 18 | Rain 0/1 | Rainfall | — | 1 → check windows and laundry |
| 19 | Bath Hum 62.0 | Bathroom humidity | 40–65% | 70%+ → run the exhaust fan |
| 20 | Pet Bowl 120 ⚠ | Food weight | 50g+ | below 50g → refill the food |
A daily routine: how you actually use this system
Morning, waking up — a quick glance at the OLED.
- Check
Outside Tempto decide what to wear - If
Rainis 1, grab an umbrella
Before heading out — a 5-second check.
Front Door0,Door Lock1,Stove0,Living LightOFF → all clear
While you're out — check the web dashboard (optional).
- You can check anytime that
Gas LeakandFireare still 0 - If
Pet Bowldrops below 50, swing by to refill during the dog's walk
Coming home — an automatic welcome.
- Open the door and
Front Doorflips to 1 and the buzzer chirps briefly (the house letting you know someone came in) - The living-room PIR detects a person → if it's hot, the air conditioner turns on automatically
Before bed — one last check.
Front Door0,Gas Leak0,Fire0 → sleep easy- Glance at
Bath Humto decide the exhaust-fan timer
The web dashboard: a second screen
Connect to the brain's STA IP (e.g. http://192.168.0.50) and all 20 cards show up in a grid. You can take in more at a glance than on the OLED. Alert cards are highlighted in red. It refreshes automatically every 30 seconds.
Your phone can connect too, as long as it's on the same network. Add a shortcut to your home screen and it works like an app.
Ideas for future expansion
Right now it's 20 slots, but the way the system is built, you can add as many more as you like.
Sensors worth adding right away (~$7–20)
| Expansion idea | Sensor needed | Price (approx. USD) | Where |
|---|---|---|---|
| Measure TV-watching time | PIR + a light sensor combined | ~$1.40 | In front of the living-room TV |
| Bed occupancy detection | FSR-402 pressure sensor | ~$3.40 | Under the mattress |
| Freezer temp | one more DS18B20 | ~$1.40 | Same code as the boiler post |
| Dog water bowl | Water-level sensor | ~$0.70 | See the food-bowl post |
| Mailbox delivery | one more reed switch | ~$0.55 | Same code as the front-door post |
| Plant moisture | Soil moisture sensor | ~$1.00 | Balcony pots |
Sensors worth a bit more investment (~$20–67)
| Expansion idea | Sensor needed | Price (approx. USD) |
|---|---|---|
| Indoor formaldehyde (new-home syndrome) | ZE08-CH2O | ~$10 |
| Indoor radon | RD200M | ~$34 |
| Noise level | MAX4466 + FFT library | ~$2.00 |
| Window open (all of them) | n reed switches + a multiplexer | ~$3.40 |
| Solar generation | INA219 voltage/current | ~$2.00 |
System upgrades (software)
| Upgrade | Description | Difficulty |
|---|---|---|
| MQTT integration | Switch from HTTP GET to an MQTT broker. Two-way messaging, guaranteed QoS, offline buffering | ⭐⭐ |
| ESP-NOW | Direct ESP8266-to-ESP8266 communication with no Wi-Fi router. One-tenth the power draw, battery operation possible | ⭐⭐ |
| Deep Sleep | Sensor nodes cycle measure → send → sleep. Months of runtime on two AA batteries | ⭐⭐ |
| Remote access | Router port forwarding + DDNS to check your home's status from outside. Mind the security | ⭐⭐⭐ |
| Notification integration | Push an alert to Telegram or Slack when a warning fires. HTTP POST straight from the ESP8266 | ⭐⭐ |
| Data logging | Store readings to SPIFFS or an SD card. A year of data lets you analyze seasonal patterns | ⭐⭐ |
| Voice announcements | A DFPlayer Mini + speaker to announce "the front door is open" out loud | ⭐⭐⭐ |
| Color TFT | A 1.8-inch TFT LCD + a graphing library to visualize trends | ⭐⭐ |
| BLE integration | Upgrade to an ESP32 and connect straight to your phone over Bluetooth | ⭐⭐⭐ |
What you learned in this series
Even someone who used to just copy-paste code picks up these skills by following along through Part 19.
- Using the Arduino IDE: installing libraries, configuring boards, debugging with the serial monitor
- ESP8266 Wi-Fi programming: STA, AP, AP+STA modes, HTTP client/server
- Sensor interfacing: I2C (OLED), OneWire (DS18B20), SPI (MAX6675), UART (MH-Z19B), analog, digital, interrupts
- IoT architecture: a central hub + distributed nodes, REST API communication, a self-hosted AP network
- Troubleshooting: the habit of reading the checkpoints and debugging on your own when something breaks
Once you've got all this down, you can tackle any ESP8266 project floating around the internet on your own.
Closing
One ESP8266, one OLED. A project that started with ~$5.00 in parts became a system that watches over and controls your whole home. The important thing is that this isn't the end. Pick one of the expansion ideas above that appeals to you and write Part 21 yourself. The skeleton is already fully built.
And finally, thank you for following this series. I hope your home got a little smarter.
See you at iothub.co.kr.
Field operating checkpoints: troubleshooting, tips, and FAQ
The node code can look short, but real home installation is affected by placement, power, Wi-Fi quality, and sensor noise. Check these points before letting the node become a decision input for the brain server.
| Symptom | Likely cause | Field fix |
|---|---|---|
| Slots are filled but decisions are wrong | Each node has a different measurement interval and delay, so values are not from the same moment | Show last-updated time with each value so stale readings are visible. |
| Too many alerts become easy to ignore | Safety warnings and lifestyle notifications use the same urgency | Separate safety alerts from lifestyle alerts and slow down repeated lifestyle notifications. |
| Wi-Fi becomes unstable as nodes increase | Many ESP8266 nodes share one AP and have different power quality | Stagger measurement intervals and avoid immediate retry storms after failures. |
| Maintenance becomes confusing | Board location, slot number, IP, and sensor type are not documented | Label each enclosure with the slot number and use the Part 2 link tree as an operations index. |
Serial Monitor
After uploading, open Tools → Serial Monitor in the Arduino IDE and set the baud rate to 115200. The following is an example Serial Monitor flow for checking normal operation. This is not a real screenshot. It shows the type of overall slot-update log that can be checked from the central hub Serial Monitor.
[BOOT] Home IoT HUB brain - 20 slot dashboard [AP] IoT_Hub_Net started, ip=192.168.1.1 [HTTP] /set?no1=24.6&no2=58.2 -> 200 OK [HTTP] /set?no9=1 -> 200 OK, door=OPEN [HTTP] /set?no13=742&no14=11 -> 200 OK [DISPLAY] OLED page refresh: temp/humidity/door/air/power [STATUS] active_slots=20, stale_slots=0, uptime=03:12:44
- If
Connectedorconnectedappears, the Wi-Fi step passed. - If
HTTP 200or200 OKappears, the value reached the brain server. - If the value does not update, check both the slot number in the URL and the sensor wiring.
This article is part of the 20-channel Home IoT system built from the Part 2 central brain server and the distributed edge nodes in Parts 3-19. Use this map to check the slot and sensor flow across the series.
[Part 1] Home IoT Hub overview[Part 2] Central brain server · slots 1-20[Part 3] Stop guessing room comfort · slots 1/2[Part 4] Did I close the door? · slots 9[Part 5] Is the fridge really cooling? · slots 12[Part 6] Should I open the window? · slots 3[Part 7] Stop bathroom mold before it starts · slots 19[Part 8] Is the boiler actually running? · slots 5/17[Part 9] Did I leave the gas stove on? · slots 6[Part 10] Get warned before gas smell becomes obvious · slots 7[Part 11] Catch flame signs while away from home · slots 8[Part 12] Is bad air making you foggy? · slots 13/14[Part 13] Why is the power bill so high? · slots 15[Part 14] Is water leaking, and how much are we using? · slots 16[Part 15] Do not leave windows open in the rain · slots 18[Part 16] Are the lights off and the door locked? · slots 11/10[Part 17] Control the air conditioner from the IoT hub · slots 4[Part 18] Is the dog bowl empty? · slots 20[Part 19] Cool the room only when someone is there · slots 1/4[Part 20] The house finally fits on one screen · slots all