MOO WebTech
Networks & Securitytheory-practicebeginner

L29 — Smart Home

What is a smart home? We explore IoT devices, how they talk to each other, and control a virtual smart home on demo.home-assistant.io — right in the browser.

80 min17.03.2026L29

🎯Learning Objectives

  • Explain what IoT means and give three examples of smart home devices
  • Describe how smart home devices communicate (Wi-Fi, Zigbee, voice assistants)
  • List the benefits and risks of a smart home
  • Control a virtual smart home in the browser using the Home Assistant demo

📖Theory

1. What Is a Smart Home?

A smart home is a house where everyday devices — lights, locks, heating, cameras — are connected to the internet and can be controlled remotely or automatically.

Examples you've probably seen or heard of:

  • Smart light bulbs that you turn on with your phone or voice
  • Smart thermostat that learns your schedule and adjusts temperature automatically
  • Smart door lock that lets you in with a fingerprint or a code instead of a key
  • Security camera that sends a notification when it detects motion
  • Smart speaker (Alexa, Google Home) that answers questions and controls other devices

The goal of a smart home: save time, save energy, and increase security — all controllable from a single app on your phone.

2. What Is IoT?

IoT stands for Internet of Things — the idea that ordinary physical objects ("things") can be connected to the internet and exchange data.

A light bulb isn't normally connected to the internet. A smart light bulb is — it can receive commands ("turn on"), report status ("I'm at 70% brightness"), and be part of automations.

The number of IoT devices worldwide in 2024 is over 15 billion — more than twice the number of people on Earth.

3. How Smart Home Devices Communicate

Smart home devices use different wireless technologies depending on their purpose:

TechnologyRangePower useUsed for
Wi-Fi~50 m indoorsHighVideo cameras, smart TVs, speakers
Bluetooth~10 mLowSmart locks, fitness trackers
Zigbee / Z-Wave~30 m (mesh)Very lowLight bulbs, sensors, plugs
IR (infrared)Direct line-of-sightVery lowRemote controls for TVs and ACs

Most smart home systems use a hub — a central box that speaks all these languages and connects to your home Wi-Fi. Your phone app talks to the hub; the hub talks to each device.

Popular hubs: Google Home, Amazon Alexa, Apple HomeKit, Home Assistant (open-source, free).

4. Voice Control

Smart speakers like Google Nest or Amazon Echo respond to voice commands:

  • "Hey Google, turn off the lights in the bedroom."
  • "Alexa, set the thermostat to 22 degrees."
  • "Hey Siri, lock the front door."

The speaker sends your voice to the cloud, converts it to text, finds the command, and sends instructions back to the device — all in under 1 second.

Privacy note: smart speakers are always listening for the wake word ("Hey Google"). This means they're recording snippets of audio continuously. This is a privacy trade-off that smart home owners should be aware of.

5. Smart Home Automations

The most powerful feature of a smart home is automation — rules that run without you doing anything:

TriggerConditionAction
Time is 07:00WeekdayTurn on bedroom light at 30%
Front door opensNobody homeTurn on hallway lights
Outdoor temperature < 5°CHeating is offTurn on heating
Motion detected in gardenTime is 23:00–06:00Send phone notification

This is literally the algorithm from L24 written in a smart home app:

  • Trigger = when the event happens
  • Condition = if this is true
  • Action = do this

6. Benefits and Risks

BenefitsRisks
Remote control from anywhereDevices can be hacked if not secured
Energy saving (turn off forgotten lights)Privacy — data is sent to company servers
Security alerts and camera accessDepends on internet — if Wi-Fi is down, devices may not work
Convenience (schedules, voice control)Can be expensive to set up
Accessibility for elderly or disabledNew technology = new skills to learn

7. Home Assistant — A Free, Open Smart Home System

Home Assistant is a free, open-source smart home platform. It runs on a Raspberry Pi (a tiny $35 computer) at home and doesn't send your data to any company server.

You don't need to buy hardware today — there's a live demo you can explore in the browser right now.

Open: demo.home-assistant.io

No login needed. You'll see a real smart home dashboard with lights, temperature, media players, and a map.

💻Code Examples

Example A — What an automation looks like (YAML)

In Home Assistant, automations are written in a simple format called YAML. Here's a real example:

YAML
automation:
  - alias: "Turn off lights at night"
    trigger:
      - platform: time
        at: "23:00"
    action:
      - service: light.turn_off
        target:
          entity_id: light.living_room

Reading it in English: "At 23:00, turn off the living room light."

Even without knowing YAML, you can read it like a flowchart:

  • Alias: name of the automation
  • Trigger: when to run it (at 23:00)
  • Action: what to do (turn off light)

Example B — A "Good morning" routine

YAML
automation:
  - alias: "Good morning routine"
    trigger:
      - platform: time
        at: "07:00"
    condition:
      - condition: time
        weekday: [mon, tue, wed, thu, fri]
    action:
      - service: light.turn_on
        data:
          brightness_pct: 50
        target:
          entity_id: light.bedroom

Trigger at 07:00 → Condition weekday only → Action: turn on bedroom light at 50%.

✏️Practice Tasks

Task 1Explore the smart home demo
EASY — IN CLASS
  1. Open demo.home-assistant.io in the browser (no login needed)
  2. Find and answer in your notebook:
    • How many rooms are shown in the dashboard?
    • What is the current temperature in the living room?
    • Find a light — click to turn it on and off. What changes on the screen?
    • Find the Energy panel — which device uses the most power?
  3. Click on any automation and describe in your own words what it does (Trigger → Action)
💡 Hint
The left sidebar has sections: Overview, Energy, Map, Automations, etc. Click "Automations" to see the list of rules. Click any automation to read its trigger and action in the editor view.
Task 2Design your smart home
MEDIUM — IN CLASS

You have a budget of $500 to set up a smart home in a 2-room apartment. Choose devices:

DevicePrice
Smart light bulb (each)$15
Smart plug (each)$20
Smart door lock$80
Motion sensor (each)$25
Smart speaker (Google Nest Mini)$50
Temperature + humidity sensor$20
Smart smoke detector$60
Smart doorbell with camera$100
  1. List the devices you'd buy and the total cost (must be ≤ $500)
  2. Write 3 automations in the Trigger → Condition → Action format
  3. State one personal benefit and one personal risk of this setup
💡 Hint
Example starter kit: 4 bulbs ($60) + speaker ($50) + door lock ($80) + 2 motion sensors ($50) + smoke detector ($60) = $300, leaving $200 for extras. A practical automation: "If motion sensor detects movement AND time is between 22:00–07:00 THEN turn on hallway light at 20%".
Task 3Privacy investigation
HARD — HOMEWORK

Pick one product: Google Nest Hub, Amazon Echo, or Apple HomePod.

Write a half-page report:

  1. What data does this device collect?
  2. Where is the data stored (on the device or in the cloud)?
  3. Does the company share data with third parties? (check the privacy policy)
  4. Would you buy it for your home? Give a reason for your answer.
💡 Hint
Search "[product name] privacy policy" and "[product name] data collection". Wikipedia articles on these products often summarize controversies in plain language as a starting point.

⚠️Common Mistakes

Thinking "smart" always means "better"

A smart light bulb is worse than a regular one if the Wi-Fi goes down and you can't turn the lights on manually. Every smart device should have a backup way to use it.

Confusing IoT with AI

IoT = devices connected to the internet. AI = software that makes smart decisions. A smart thermostat that learns your schedule uses both. A smart plug you turn on with your phone is just IoT.

Leaving default passwords on devices

Many cheap cameras and routers ship with a default password like admin / admin. Change them immediately — otherwise anyone can access your home camera from the internet.

🎓Instructor Notes

⚡ How to run this lesson (~80 min)

  • [5 min] Hook. Ask who has a smart device at home. Ask one student to explain how they control it.
  • [15 min] Theory. Use real product photos. Focus on the communication table and the automation idea.
  • [10 min] Demo: Home Assistant. Project demo.home-assistant.io. Click through lights, energy panel, open one automation.
  • [30 min] Tasks 1 + 2 in class. Task 1 = exploration; Task 2 = design challenge (pairs optional).
  • [15 min] Share designs. 3–4 groups present their $500 setup. Class votes on most practical.
  • [5 min] Preview L30. Digital marketing — we'll create a poster/landing page for the app from L27.

💬 Discussion questions

  • "Which single automation would save you the most time every day?"
  • "If a company can see when you turn your lights on or off, what could they figure out about you?"
  • "Should schools install smart cameras or sensors? What are the trade-offs?"