'; } add_action('wp_head', 'custom_blog_layout_styles'); }' }) Tutorial: Automated Bathroom Fan Control Using TP-Link Motion Switch – imtrajan

System Overview

๐Ÿ’ก
KS220M
Motion Sensor Switch
(Powder Room Light)
โ†’
๐Ÿ“ฑ
Kasa App
Smart Actions
โ†’
๐ŸŒ€
HS200
Fan Switch
(Powder Room Fan)

Overview

This tutorial shows you how to use a TP-Link occupancy smart switch to automatically control a bathroom fan. When motion is detected, the fan turns on. When the room is unoccupied, the fan turns off.

How It Works

๐Ÿšถ
Person Enters Room
โ†’
๐Ÿ‘๏ธ
Motion Detected
โ†’
๐Ÿ’จ
Fan Turns ON
๐Ÿšช
Person Leaves Room
โ†’
โฑ๏ธ
5-10 Min Timeout
โ†’
โญ•
Fan Turns OFF

What You’ll Need

TP-Link KS220M – Motion Sensor Switch with Dimmer & Ambient Light Sensor

TP-Link HS200 – Smart Fan Switch (Standard On/Off)

  • Kasa app installed on your smartphone
  • Both switches added to your Kasa account and connected to Wi-Fi
  • 2.4GHz Wi-Fi network (5GHz not supported)
View KS220M View HS200

Setup Steps

1Install and Configure Your Switches

โš ๏ธ Safety First!
Always turn off power at the circuit breaker before working with electrical wiring. Use a voltage tester to confirm power is off. If you’re unsure about electrical work, hire a licensed electrician.
  1. Install both smart switches according to TP-Link’s installation instructions
    • The KS220M requires a neutral wire and has built-in motion/ambient light sensors
    • The HS200 requires a neutral wire and works as a standard on/off switch
  2. Add both switches to your Kasa app
  3. Name them clearly:
    • Motion switch: “Powder Room Motion” or “Powder Room Light”
    • Fan switch: “Powder Room Fan”

2Configure the Motion Switch Settings

  1. Open the Kasa app and tap on your KS220M motion sensor switch
  2. Tap the settings gear icon โš™๏ธ
  3. Configure motion detection settings:
    Motion Sensitivity: Set to Medium or High depending on room size
    Occupancy Timeout: Set to 5-10 minutes
    Ambient Light Detection: Configure if you want motion activation only when dark
    Light Response: Configure as desired for the connected light

3Create the Fan Automation

Using Kasa Smart Actions:

  1. In the Kasa app, tap the Smart tab at the bottom
  2. Tap the + button to create a new Smart Action
  3. Select When Device Status Changes

Configure the “Turn On” Rule:

  1. Name: “Powder Room Fan On”
  2. Trigger: Select your KS220M โ†’ Choose “Motion Detected” or “Switch Turns On”
  3. Action: Select “Powder Room Fan” (HS200) โ†’ Set to “Turn On”
  4. Save the automation

Configure the “Turn Off” Rule:

  1. Create another Smart Action
  2. Name: “Powder Room Fan Off”
  3. Trigger: Select your KS220M โ†’ Choose “No Motion Detected” or “Switch Turns Off”
  4. Action: Select “Powder Room Fan” (HS200) โ†’ Set to “Turn Off”
  5. Save the automation

4Test Your Setup

  1. Walk into the powder room and trigger the motion sensor
  2. Verify the fan turns on within a few seconds
  3. Leave the room and wait for the occupancy timeout period
  4. Verify the fan turns off automatically

Troubleshooting

Fan doesn’t turn on:
  • Verify both switches are online in the Kasa app
  • Check that Smart Actions are enabled
  • Test manual control of the HS200 fan switch
  • Review motion sensor sensitivity settings on the KS220M
Fan turns off too quickly:
  • Increase the occupancy timeout in KS220M motion sensor settings
  • Consider using Home Assistant for custom delay timers
Motion sensor too sensitive or not sensitive enough:
  • Adjust sensitivity setting in the KS220M switch configuration
  • Ensure the sensor isn’t facing windows or heat sources

Tips for Best Results

๐Ÿ’ก Pro Tips:
  • Position the KS220M to reliably detect entry to the powder room
  • Set occupancy timeout to 5-10 minutes to account for typical bathroom use
  • Test during actual use and adjust timing as needed
  • Consider manual override capability – users should still be able to control the HS200 fan switch directly if needed
  • The KS220M ambient light sensor can prevent the fan from activating during daytime if desired

โœ… Setup Complete!

This setup creates a hands-free bathroom fan experience that helps maintain air quality while saving energy by ensuring the fan only runs when needed.