Connected gadgets that send small messages — smart home, edge vs cloud, and staying safe online.
IoT means Internet of Things — devices that send small updates (temperature, door open, location) so apps can show charts or take action.
What makes something “IoT”? It is not just “has Wi‑Fi.” It means: (1) sensor or actuator, (2) send data, (3) store, show, or act.
Three parts: (1) Device measures. (2) Gateway or cloud collects. (3) App or AI alerts or commands.
Messages are tiny — often dozens of characters, not video.
MQTT uses topics like school/greenhouse/sensor3/temp. Devices publish; apps subscribe.
Actuators turn fans, locks, or relays on — IoT can command back.
Figure — Measure → send → store → show or act.
Figure — Many devices publish; many apps can listen.
Where IoT shows up — industries and goals
| Place | Measured | Why | Example |
|---|---|---|---|
| Home | Temp, door, leak | Comfort, security | Thermostat, leak alarm |
| School | CO₂, occupancy | Fresh air, save power | Classroom monitor |
| Farm | Soil, weather | Water when needed | Field sensor |
| Factory | Vibration, heat | Prevent breakdown | Motor tag |
| Trucks | Temp, GPS | Food safety | Cold chain |
| City | Traffic, air | Planning | Smart parking |
Message styles — types and uses
| Style | Good for | Plain English |
|---|---|---|
| MQTT | Many small updates | Publish/subscribe channels |
| HTTP | Simple apps | Like loading data from a URL |
| WebSocket | Live dashboards | Server pushes updates fast |
| LoRaWAN | Long range, battery | Slow small packets from fields |
Common IoT sensors — what they measure and what they are used for
| Sensor | Measures | Used for | Example device |
|---|---|---|---|
| Temperature | Heat | Fridges, greenhouses, trucks | Smart thermostat, cold chain tag |
| Humidity | Moisture in air | Mould risk, plant care | Greenhouse monitor |
| Door / window | Open or closed | Security, heating waste | Smart door sensor |
| Motion (PIR) | Movement | Lights on, intruder alert | Hallway sensor light |
| Light level | Brightness | Auto blinds, street lights | Smart office lighting |
| Vibration | Shaking | Machine about to break | Factory motor monitor |
| CO₂ / air quality | Stale air | Fans in classrooms | Classroom air monitor |
| Water leak | Moisture on floor | Stop flood damage | Under-sink alarm |
Gateways and hubs — types and what they do
| Device | Role | Used for |
|---|---|---|
| Wi‑Fi board (ESP32) | Sensor + internet in one | Student projects, prototypes |
| Home hub / bridge | Translates radio to Wi‑Fi | Some smart bulbs, sensors |
| Industrial gateway | Collects many factory sensors | Plant floor to cloud |
| Phone as gateway | Bluetooth device → phone → cloud | Wearables, some health gadgets |
Sample JSON message (what many systems send):
{"device_id": "greenhouse-3", "temp_c": 24.1, "humidity": 58, "battery_pct": 72, "time": "2026-05-16T14:30:00Z"}
Your project should show one real message like this in the README — judges understand the system faster.
What does each measure? Where does the data go? Could someone else see that data?
Device → internet → storage → app → action. Label one sensor reading and one possible alert.
A smart thermostat might just follow a schedule, or it might learn your routine. More “intelligence” needs more data and testing.
Rule-based: If room empty 30 minutes → lights off.
Predictive: Heat the room before you arrive because it learned your pattern.
Digital twin: A computer model of a building or machine that updates when real sensors update — used to ask “what if?”
Types of smart devices — what they do
| Device | What it does | Used for |
|---|---|---|
| Smart plug | Turn power on/off remotely | Lamps, fans, coffee machine |
| Smart bulb | Dim or colour change | Mood lighting, schedules |
| Smart thermostat | Control heating/cooling | Save energy, comfort |
| Video doorbell | Camera + speaker at door | See visitor, talk from phone |
| Smart lock | Lock/unlock with phone or code | Home entry without keys |
| Smart speaker | Voice commands | Music, timers, smart home control |
| Smart meter | Electricity use | Bills, saving energy |
| Wearable | Steps, heart rate | Fitness trends |
| Pet feeder | Schedule + low food | Feed when away |
Rule vs learning — when each fits
| Situation | Use | Why |
|---|---|---|
| Clear threshold | Rules | Fast, auditable |
| Weekly patterns | Learning | Hard to write all rules |
| Safety alone | Human + rules | Do not auto-lock exits on AI guess |
Edge = on the device or nearby box (fast, private). Cloud = big computers far away (powerful, needs internet).
Latency is delay. Edge can answer in milliseconds; slow internet makes cloud feel sluggish on doorbells.
Bandwidth is how much data you send. Sending “person: yes” is cheaper than uploading every video frame.
Privacy: On-device processing can keep video at home; cloud needs encryption and clear delete rules.
Figure — Filter on device; upload clips only when needed.
How fast is fast enough?
| Job | Target | Where |
|---|---|---|
| Doorbell person | Under 1–2 s | Edge |
| Energy report | Hours OK | Cloud |
| Factory e-stop | Milliseconds | Edge / wired, not slow cloud |
Figure — Many products use both: quick guess on device, hard cases sent to cloud.
When to use edge vs cloud
| Choose | Good when | Example |
|---|---|---|
| Edge (on device) | Need fast reply, privacy, or spotty internet | “Someone at door” in 1 second |
| Cloud | Need long history or very large AI | Monthly energy report for whole building |
| Both | Device filters, cloud confirms | Doorbell: local detect, cloud stores video |
Default passwords, old software, and fake messages are real problems. Good habits matter as much as AI.
Safety habits — what they protect
| Habit | What it stops | Example |
|---|---|---|
| Change default password | Strangers logging into camera | password “admin” bots |
| Update firmware | Known security holes | OTA update from maker |
| Separate guest Wi‑Fi | Visitors reaching your devices | Guest network for friends |
| Encrypt video | Leaked private footage | Doorbell cloud with lock icon |
| Confirm big actions | Fake sensor data causing harm | Human OK before factory stop |
Attack surface: Every camera and plug is a door. IoT is often forgotten after setup — still using factory passwords.
Fake data: Spoofed “temperature OK” on a cold truck can spoil food. Big actions need human OK or a second sensor.
Common risks — types and fixes
| Risk | How | Fix |
|---|---|---|
| Default password | Bots scan “admin” | Change on day one |
| Old firmware | Known bugs | Auto-updates if offered |
| Open camera | No login on internet | Firewall, strong account |
| Fake MQTT | Spoofed message | Passwords; sign messages |
Privacy — sensitive data
| Data | Sensitivity | Care |
|---|---|---|
| Room temp | Lower | Do not publish openly |
| Indoor camera | Very high | Consent, encrypt, limit retention |
| Speaker mic | Very high | Clear when listening |
Think heating, doors, or factory stops. Who should confirm big actions?
10 easy questions on smart devices, the internet of things, and safety. Instant feedback on every answer.
Module 5 in short: devices talk to the cloud (or locally) — good data and passwords matter.