Smart Home Lab teaching notes

For middle and high school computer science and engineering teachers. Students write the rules for a house's hub in Blocks or Python, a family lives a day or a week with them, and meters compare the house with the same day and no rules.

Using this with a class? Make a free class and add your students yourself: each gets a username and password, with no email or Google account needed. Or give them one join code. Using Google Classroom? Post the link there; with a free class, the link also puts each student in your class, so you see their work. mytekDev is also available from the Google Workspace Marketplace, so your school's Google admin can install it for everyone.A first lesson: Open it on the projector at Level 1 and press play. At about 6:50 the family comes in the front door in the dark, and the parent feels along the wall for the hallway switch: a red mark on the day strip. Ask what rule would fix it. Then build it in Blocks with the class, when motion in the Hallway, turn on the Hallway light for 2 minutes, and run the evening again. Ask what happens when someone stands still in the hall for longer than 2 minutes.

Set up a free class Share to Google Classroom
Put this on your class site

Students can use Smart Home Lab right on your page, with no account. What they make stays on that page; to keep their work, they make a free account.

Google Sites: Insert, then Embed, then By URL, and paste this address.

https://mytekdev.com/try/smarthomelab?embed=1

Canvas, a blog, or any page that takes HTML: paste this code where you edit the page as HTML.

<iframe src="https://mytekdev.com/try/smarthomelab?embed=1" width="100%" height="640" style="border:0" allow="fullscreen" title="Smart Home Lab demo from mytekDev"></iframe>

About these notes

Smart Home Lab is one house: a one-story ranch with two bedrooms, a hallway, a kitchen, a living room, a den, a laundry and a utility closet where the hub sits. The student writes the rules the hub runs: when motion in a room, when a door opens, at a time, when a timer runs out, when an alarm sounds. A family of three (a parent, a teenager and a grandparent) lives the level's evening, day or week in the house.

Every run is the same family making the same choices from the same seed, so the only difference between two runs is the rules. The plain house is the same day with no rules, and four meters compare against it: the electricity in dollars, the person-minutes anyone was cold, hot or in the dark, how long it took everyone to get out in an alarm, and how many times someone felt for a switch in the dark.

A first period

Level 1 fits a period with time to talk about what the sensor sees.

  1. Watch (5 minutes) Open it on the projector at Level 1 and press play. At 6:52 the parent comes in the front door in the dark and feels for the hallway switch: a red mark on the day strip. Ask what rule would fix it.
  2. One rule (15 minutes) In Blocks, drag in when motion in Hallway and put turn on Hallway light for 2 minutes inside it. Go back to the Simulator and press play: the light meets everyone at the door, and nobody feels for the switch.
  3. What the sensor sees (10 minutes) Click the hallway sensor to see its view on the floor. Ask what it is really detecting. It sees warm bodies moving across its zones, not people, which is why someone standing still is invisible to it.
  4. Talk (10 minutes) Why does each new motion start the 2 minutes over? What would go wrong with 30 seconds? With an hour? Level 2 is the next question: lights that go out by themselves, without leaving a reader in the dark.

The thirteen levels

Each level opens with its own card and the house set up for it. A level passes on its own goal, measured against the plain house. Every number below is the app's own run.

LevelThe problemThe fix it is built forWhat it shows
1. Light the way (6:40 to 10:30 p.m.)The family comes home after dark and feels for the hallway switch twice.When motion in the Hallway, turn on the Hallway light for 2 minutes.Events: a rule waits for something to happen.
2. Lights out (7:30 to 11 p.m.)Lights burn in empty rooms: the hallway's for 55 minutes with nobody there.Motion rules with a few minutes each, enough for a reader who sits still.A timer that restarts, and a sensor that cannot see someone still.
3. Only after dark (11:30 a.m. to 7 p.m.)The Level 1 rule lights the hallway at noon.An if: it is dark in the Hallway.Conditions, and motion and dark together.
4. Doors and windows (3 to 9 p.m.)Bedroom 2's window is open 137 minutes with the heat on.When the window opens, send an alert: someone reads it and shuts the window within a minute.Contact sensors, alerts, and heat lost to an open window.
5. The thermostat (a whole day)The heat stays at 68 all day and all night.A setback at night and while everyone is out: about 12% less heat, nobody cold.Heat loss slows as the house cools, so a setback saves.
6. Who is home (7 a.m. to 7 p.m.)The house is empty 4.8 hours and the heat never goes down.The front door closes and a timer runs; any motion restarts it: the heat is down 79% of the empty hours.State worked out from several sensors over time.
7. Always on (6 a.m. to 6 a.m.)The TV corner draws 518 Wh in a day doing nothing.The plug switched off at night and between the shows, and on again before them: 73% less.Standby power, without anyone finding the TV dead.
8. Smoke and CO (1:30 a.m.)The alarm sounds; people feel for 3 switches and take 51 seconds to get out.When the smoke alarm sounds: every light on, the furnace off, an alert: 45 seconds.A program may add to a safety device, never take over from it.
9. Through the hub (10 p.m. to 1 a.m.)Bedroom 1's sensor is too far from the hub: its messages are lost, and the internet goes down.A plug in the Living room repeats its messages; the rule keeps running offline.Radio range, relays, and rules that run on the hub.
10. Default passwords (5 to 10 p.m.)A scanner gets into all four Wi-Fi devices at 6 p.m.Every password changed and the doorbell's firmware updated, and an alert when a login fails: 12 tries turned away.Factory passwords, firmware holes and devices reachable from the internet.
11. What leaves the house (7 a.m. to 7 p.m.)73 messages go to the cloud, and the motion log shows the house empty from 9:40 to 2:30.The sensors' events kept at home: 0 messages, and the hallway rule still works.Privacy: what a log of motion gives away.
12. Sun and shade (Phoenix, July)Someone is too hot for 31 minutes; 6.7 kWh from the grid.Blinds shut at midday and the dishwasher at noon: 4.9 kWh, 27% less, nobody hot.Sun through a window is heat; solar power is worth most when it is used.
13. The weekA week of a family's life in Minneapolis in January, Atlanta in January or Phoenix in July.A night setback and the hallway light: 4.3% less energy, nobody colder, fewer switches felt for.One house, one week: what a smart home really saves.

What students get wrong, and where the app answers it

These come up in almost every class. Each has a place in the app where the student can see the answer for themselves.

What they thinkWhat the app showsWhere
A motion sensor sees people.It sees warm bodies moving across its zones. The grandparent reading on the couch crosses nothing, and the light goes out.Level 2, the Living room.
Setting the thermostat higher heats the house faster.The furnace puts out the same heat whatever the setting; a higher number only runs it longer and overshoots.Level 5, the Heat view.
Turning the heat down at night wastes energy because the furnace has to work hard in the morning.A cooler house loses heat more slowly. The setback day uses about 12% less heat, warm-up included.Level 5.
A smart home works because it is connected to the internet.The rules run on the hub, in the house. The internet goes down in Level 9 and the night light keeps working; only the alerts wait.Level 9.
Updating a device keeps it safe.A factory password lets a scanner in whatever the firmware. And the doorbell's old firmware has a hole that skips the password, so it needs both.Level 10, Device settings.
If nobody hacks it, my data is private.Nothing was hacked in Level 11, and the motion log sent to the cloud still shows when the house was empty.Level 11, What left the house.
Smart homes save a lot of energy.A week of good rules in Minneapolis saves about 4%. Heat is most of a winter bill, and the setback is most of what saves.Level 13.

What the app simplifies, on purpose

The rulebook students hand in

File, The rulebook gives one page: the floor plan with the devices, the rules in plain words, and the day's numbers against the plain house (electricity, comfort, safety, switches felt for). It is a natural thing to collect at the end of a level.

Setting it up for a class

Nothing to install. Students open it from their projects; the project keeps the rules, the level and each level's best run. The Rules tab lists every rule in plain words with a switch to turn it off, so a student can test one rule at a time.

An evening takes about a minute at 10 minutes a second; a week, about three minutes at 1 hour a second. Clicking the day strip jumps to that moment, and the play button pauses.

Standards

More help

Is something on this page wrong or not clear? Write to us.

Page last reviewed November 2026.
Google, Google Classroom and Chromebook are trademarks of Google LLC.