7

How to Set Up a Smart Home Network with Edge AI : Step-by-Step Guide (Part 2)

Introduction

In Part 1, we set up a smart edge-powered monitoring system using Raspberry Pi and Pi-hole. Now, let’s take it a step further—by making your network intelligent and automated. Whether it’s blocking internet during bedtime or reacting to internet slowdowns, automation keeps your digital life efficient.

Tools You’ll Need

ComponentDetails
Raspberry Pi 4/3With Raspberry Pi OS Lite installed
Docker InstalledContainerized environment for Home Assistant
TP-Link Deco RouterWith local IP access
Telegram Bot (optional)For automation alerts
Home AssistantSelf-hosted automation hub

Step 1: Install Home Assistant via Docker

Run the following in your Raspberry Pi terminal:

docker run -d –name homeassistant \
–privileged \
–restart=unless-stopped \
-e TZ=Asia/Kolkata \
-v /home/pi/homeassistant:/config \
-p 8123:8123 \
ghcr.io/home-assistant/home-assistant:stable

This sets up Home Assistant in Docker, with data stored in /home/pi/homeassistant.

🔗 Access it via: http://<raspberry_pi_ip>:8123

Step 2: Add TP-Link Deco Router Integration

Inside Home Assistant:

  • Navigate to Settings → Devices & Services → Integrations
  • Search for TP-Link Kasa Smart
  • Add your router’s IP and credentials

✅ This allows Home Assistant to control your Deco mesh router (device block, restart, etc.).

Step 3: Automation – Block Internet at Night

Here’s how to block internet on a child’s device every night at midnight:

Meera: Block Mobile Internet at Night
trigger:
platform: time
at: “00:00:00”
condition: []
action:
service: tplink.set_device_state
data:
device_id: “”
enabled: false
mode: single

Replace <DEVICE_ID> with the actual device ID shown in the Deco integration.

Step 4: Automation – Speed Drop Alert

Automatically notify you if your download speed drops below 20 Mbps:

Meera: Alert on Speed Drop
trigger:
platform: numeric_state
entity_id: sensor.speedtest_download
below: 20
condition: []
action:
service: notify.telegram
data:
message: “Internet speed dropped below 20 Mbps!”
mode: single

Setup Tip: Use Speedtest CLI + sensor integration from Part 1 to track download speed.

Step 5: Visual Automations with Lovelace

Turn automation toggles into visual buttons:

Steps:

  • Go to Overview → Edit Dashboard
  • Add a new Entities Card
  • Include automation toggles like:
    • automation.block_mobile_internet_at_night
    • automation.alert_on_speed_drop

What’s Next?

Now your network isn’t just monitored—it acts on its own. In Part 3, we’ll explore AI integrations—using lightweight LLMs or TTS models to make your router or Raspberry Pi smarter with voice and intent recognition.

📦 Stay tuned for:

  • Edge LLM on Pi (like Whisper, Whisper.cpp)
  • Use cases like offline voice commands
  • YAML for AI triggers

TechieBano.Com | Smart Gear. Smarter Minds.

Add a Comment

Your email address will not be published. Required fields are marked *