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
System architecture and data pipeline note
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_Net that 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.

IoT Hub [1/5]
Living Temp24.5
Living Hum58.0
Outside Temp18.0
ACON
IoT Hub [2/5]
BoilerON
Stove0
Gas Leak0
Fire0
IoT Hub [3/5]
Front Door0
Door Lock1
Living LightON
Fridge Temp3.5
IoT Hub [4/5]
CO2620
Dust PM2.535
Power320
Water2.5
IoT Hub [5/5]
Hot Water42.0
Rain0
Bath Hum62.0
Pet Bowl120

What each sensor does and how it's judged

#OLED labelWhat it measuresNormal rangeCaution / alert threshold
1Living Temp 24.5Living-room temp18–28℃
2Living Hum 58.0Living-room humidity40–65%70%+ watch for mold
3Outside Temp 18.0Outdoor tempvaries by seasonbelow freezing → watch for frozen pipes
4AC ON/OFFAir conditioner running
5Boiler ON/OFFBoiler runningON in winterON in summer → something's off
6Stove 0/1Gas stove in use0 normally1 while you're out → check
7Gas Leak 0/1Gas leak0if 1, inspect immediately
8Fire 0/1Flame detected0if 1, inspect immediately
9Front Door 0/1Front door open0 (while out)1 while out or asleep → alert
10Door Lock 0/1Door lock engaged10 while out → check
11Living Light ON/OFFLiving-room lightON at nightON while out → check
12Fridge Temp 3.5Fridge temp0–5℃8℃+ → suspect a fault
13CO2 620Carbon dioxide400–800ppm1000+ → time to ventilate
14Dust PM2.5 35Fine dust0–30㎍/m³50+ → run the air purifier
15Power 320Instantaneous power drawvaries by householdsudden spike above normal → suspect a short
16Water 2.5Water usagecontinuous flow → suspect a leak
17Hot Water 42.0Hot-water pipe temp35–50℃60℃+ → overheating
18Rain 0/1Rainfall1 → check windows and laundry
19Bath Hum 62.0Bathroom humidity40–65%70%+ → run the exhaust fan
20Pet Bowl 120Food weight50g+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 Temp to decide what to wear
  • If Rain is 1, grab an umbrella

Before heading out — a 5-second check.

  • Front Door 0, Door Lock 1, Stove 0, Living Light OFF → all clear

While you're out — check the web dashboard (optional).

  • You can check anytime that Gas Leak and Fire are still 0
  • If Pet Bowl drops below 50, swing by to refill during the dog's walk

Coming home — an automatic welcome.

  • Open the door and Front Door flips 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 Door 0, Gas Leak 0, Fire 0 → sleep easy
  • Glance at Bath Hum to 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 ideaSensor neededPrice (approx. USD)Where
Measure TV-watching timePIR + a light sensor combined~$1.40In front of the living-room TV
Bed occupancy detectionFSR-402 pressure sensor~$3.40Under the mattress
Freezer tempone more DS18B20~$1.40Same code as the boiler post
Dog water bowlWater-level sensor~$0.70See the food-bowl post
Mailbox deliveryone more reed switch~$0.55Same code as the front-door post
Plant moistureSoil moisture sensor~$1.00Balcony pots

Sensors worth a bit more investment (~$20–67)

Expansion ideaSensor neededPrice (approx. USD)
Indoor formaldehyde (new-home syndrome)ZE08-CH2O~$10
Indoor radonRD200M~$34
Noise levelMAX4466 + FFT library~$2.00
Window open (all of them)n reed switches + a multiplexer~$3.40
Solar generationINA219 voltage/current~$2.00

System upgrades (software)

UpgradeDescriptionDifficulty
MQTT integrationSwitch from HTTP GET to an MQTT broker. Two-way messaging, guaranteed QoS, offline buffering⭐⭐
ESP-NOWDirect ESP8266-to-ESP8266 communication with no Wi-Fi router. One-tenth the power draw, battery operation possible⭐⭐
Deep SleepSensor nodes cycle measure → send → sleep. Months of runtime on two AA batteries⭐⭐
Remote accessRouter port forwarding + DDNS to check your home's status from outside. Mind the security⭐⭐⭐
Notification integrationPush an alert to Telegram or Slack when a warning fires. HTTP POST straight from the ESP8266⭐⭐
Data loggingStore readings to SPIFFS or an SD card. A year of data lets you analyze seasonal patterns⭐⭐
Voice announcementsA DFPlayer Mini + speaker to announce "the front door is open" out loud⭐⭐⭐
Color TFTA 1.8-inch TFT LCD + a graphing library to visualize trends⭐⭐
BLE integrationUpgrade 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.

SymptomLikely causeField fix
Slots are filled but decisions are wrongEach node has a different measurement interval and delay, so values are not from the same momentShow last-updated time with each value so stale readings are visible.
Too many alerts become easy to ignoreSafety warnings and lifestyle notifications use the same urgencySeparate safety alerts from lifestyle alerts and slow down repeated lifestyle notifications.
Wi-Fi becomes unstable as nodes increaseMany ESP8266 nodes share one AP and have different power qualityStagger measurement intervals and avoid immediate retry storms after failures.
Maintenance becomes confusingBoard location, slot number, IP, and sensor type are not documentedLabel 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 Connected or connected appears, the Wi-Fi step passed.
  • If HTTP 200 or 200 OK appears, the value reached the brain server.
  • If the value does not update, check both the slot number in the URL and the sensor wiring.