Keeping My Teen Focused on Homework

Keeping My Teen Focused on Homework

A parents' Guide to Using AdGuardHome and Raspberry Pi

Victor Shi · 3 minute read

Hey, fellow parents and tech enthusiasts! As parents, we wear many hats, one of them being a developer. Recently, I faced a common parenting dilemma – ensuring my son stays on track with his homework, especially when the allure of web-based online games tempts him. In this blog post, I'll share my journey of addressing this issue using simple and accessible technologies.

The Problem

My oldest son, now in junior high, was introduced to online games by his friends. While I'm all for him enjoying these games with his pals, I discovered that sometimes he was gaming when he claimed to be working on school assignments. Trying to block specific games proved futile; it was like playing a never-ending game of wack-a-mole. I didn't want to isolate him from his friends, but I needed a way to ensure his focus on homework.

My Home Network Setup

My home network is pretty standard – a WiFi router and a modem, with all devices connecting either through WiFi or directly to the modem.

The Solution

After some research and tinkering, I found a solution for my family – a DNS sinkhole implemented using AdGuardHome and a Raspberry Pi.

AdGuardHome: Your Swiss Army Knife for Home Networks

AdGuardHome is an open-source tool that serves as an internal DNS server while also blocking ads and tracking across all devices on your network. Setting it up is relatively straightforward, eliminating the need to configure each device manually.

Raspberry Pi: The Affordable Sidekick

To implement my DNS sinkhole, I used a Raspberry Pi. This tiny, affordable computer runs AdGuardHome and a separate cron job to analyze AdGuardHome DNS query logs.

Implementation Steps

  1. Setting Up AdGuardHome:

    • Install AdGuardHome on your Raspberry Pi.

    • Configure it to be the primary DNS server on the home network's modem and Wifi router.

  2. Configuring the Cron Job:

    • Create a separate cron job on the Raspberry Pi to regularly analyze AdGuardHome DNS query logs.

    • Identify websites that aren't on the whitelist (common school websites).

    • Send a notification to salck when non-whitelisted sites are detected.

Results and Benefits

Now, when my son tries to sneak in some gaming during study time, I receive a notification on my Slack channel. This allows me to assess the situation and have a conversation with him about time management and priorities.

Conclusion

Parenting in the digital age comes with its challenges, but technology can be our ally. By combining AdGuardHome with a Raspberry Pi, I've found a simple and effective way to keep my son focused on his studies without resorting to draconian measures. It's a win-win – he gets to enjoy gaming with his friends, and I get the peace of mind knowing he's also getting his homework done.

I hope this solution proves helpful to other parents navigating similar challenges. Happy parenting and coding!