Lesson plan

Home Assistant devices lesson plan

Build the sensors and switches people put around the house on an ESP32-C3, and see how each reading reaches Home Assistant.

3 chapters, 5 lessons, about 5 hours, on the ESP32-C3-DevKitM-1. Every lesson runs in the browser, with nothing to install.

The unit

Objectives and materials

By the end, students can

  • Read a room and a plant pot, and turn each reading into a message.
  • Use a radar for occupancy and drive an LED strip that fades.
  • Press a garage door button safely and know where the door really is.

Materials for the whole unit

  • Addressable RGB LEDs
  • ESP32-C3-DevKitM-1
  • Full-size breadboard
  • LED
  • Light sensor, BH1750
  • Microwave motion sensor
  • Motion sensor
  • Photoresistor sensor module
  • Potentiometer
  • Pushbutton x 2
  • Reed switch x 2
  • Relay module
  • Resistor
  • Soil moisture sensor, capacitive
  • Temperature and humidity, DHT22

Every part is already on the simulator’s bench, so there is nothing to buy or hand out. The counts are the most any one lesson uses, if you build it on real breadboards too.

Chapter 1. About 2 h 5 min

Sensors that report

Read a room and a plant pot, and turn each reading into a message.

LessonTimeWhat students do
A room multisensorTemperature, humidity, light and motion on one board: the sensor Home Assistant users build first, and how each reading becomes a message.70 min
  1. Four readings, three parts
  2. Run it and read the messages
  3. Motion is reported the moment it happens
  4. Warm the room
  5. The same device in ESPHome
A calibrated plant sensorA capacitive soil sensor turned into a moisture percentage you can trust, a light level, and a thirsty alert that does not flicker. A sensor only, with no pump.55 min
  1. Calibration is the whole job
  2. Read the soil
  3. Let it dry out
  4. Two thresholds, not one

Materials

  • ESP32-C3-DevKitM-1
  • Full-size breadboard
  • LED
  • Light sensor, BH1750
  • Motion sensor
  • Photoresistor sensor module
  • Resistor
  • Soil moisture sensor, capacitive
  • Temperature and humidity, DHT22

Check for understanding

Each student finishes "A calibrated plant sensor" on their own, without opening the hints. The simulator checks 4 of its 4 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Two thresholds, not one".

Chapter 2. About 1 h 50 min

Presence and light

Use a radar for occupancy and drive an LED strip that fades.

LessonTimeWhat students do
A radar hallway lightAn RCWL-0516 radar, an off delay so a pause does not plunge you into the dark, and a light that only comes on when it is dark.55 min
  1. Motion is not presence
  2. Walk into the hallway
  3. Stand still and wait
  4. Daylight
An LED strip controllerOn, off, brightness, color and effects with a smooth fade, from buttons on the strip or from the network, plus the power rules for real strips.55 min
  1. Power is the hard part
  2. Light it
  3. Switch it off
  4. Effects, and the network

Materials

  • Addressable RGB LEDs
  • ESP32-C3-DevKitM-1
  • Full-size breadboard
  • LED
  • Microwave motion sensor
  • Photoresistor sensor module
  • Potentiometer
  • Pushbutton x 2
  • Resistor

Check for understanding

Each student finishes "An LED strip controller" on their own, without opening the hints. The simulator checks 4 of its 4 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Effects, and the network".

Chapter 3. About 55 min

Control something heavy

Press a garage door button safely and know where the door really is.

LessonTimeWhat students do
A garage door openerA relay that presses the wall button for half a second and two reed switches that report where the door really is, with the safety rules that come first.55 min
  1. Safety first
  2. Close the door
  3. Press the button
  4. Watch the door move

Materials

  • ESP32-C3-DevKitM-1
  • Full-size breadboard
  • Pushbutton x 2
  • Reed switch x 2
  • Relay module

Check for understanding

Each student finishes "A garage door opener" on their own, without opening the hints. The simulator checks 4 of its 4 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Watch the door move".

Your class

Teach this unit as a class

Start a class from this course and its 5 lessons are assigned in one go, in order. Students join with a six-character code or printed login cards, and each one’s work comes back to you.

The class tools are free for 30 days for one class of up to 20 students, with no card. The lessons themselves are free either way.