AI and VoIP Blog

VOIP | AI | Cloud | Kamailio | Open Source


Setup a Simple Web Page Watcher with Phone Notification on Raspberry Pi

web page watcher Raspberry Pi with ntfy push notifications

I needed to book an appointment through a website that only opens slots periodically. The announcement said new dates would be available “in the coming days” — no exact time given. Two weeks earlier I had missed the previous batch of slots entirely because I wasn’t watching closely enough and they filled up before I noticed. I wasn’t going to let that happen again.

So I built a dead-simple web page watcher on Raspberry Pi that monitors the page and pushes a notification to my phone the moment anything changes.

Here’s the full setup.


Table of Contents

  1. What You Need
  2. Step 1: Enable SSH on the Pi
  3. Step 2: Create the Web Page Watcher Script
  4. Step 3: Test It
  5. Step 4: Set Up Push Notifications with ntfy
  6. Step 5: Schedule It with Cron
  7. The Result
  8. Adapting This for Any Website
  9. Summary

What You Need

  • A Raspberry Pi (any model) connected to your home network
  • A phone (iOS or Android)
  • The ntfy app installed on your phone

Step 1: Enable SSH on the Pi

If you haven’t already, enable SSH so you can manage the Pi remotely from your laptop without needing a screen and keyboard every time.

On the Pi:

sudo nano /etc/ssh/sshd_config

Find and set:

PasswordAuthentication yes

Restart SSH:

sudo systemctl restart ssh

Now from your laptop:

ssh youruser@192.168.x.x

Pro tip: Copy your SSH key to the Pi so you never need a password again:

ssh-copy-id youruser@192.168.x.x

Step 2: Create the Web Page Watcher Script

The idea behind this web page watcher Raspberry Pi script is simple:
Fetch the page → Hash its content → Compare to last saved hash → If changed, send a notification

SSH into the Pi and create the script:

nano ~/watch_page.py
import requests
import hashlib
import os
URL = "https://example.com/appointments" # the page you want to monitor
STATE_FILE = "/home/youruser/.page_hash"
NTFY_TOPIC = "your-unique-topic-name" # pick anything unique
def get_page_hash():
r = requests.get(URL, timeout=15)
return hashlib.md5(r.text.encode()).hexdigest()
def notify(message):
requests.post(f"https://ntfy.sh/{NTFY_TOPIC}",
data=message.encode(),
headers={"Title": "Website Changed!"})
current_hash = get_page_hash()
if os.path.exists(STATE_FILE):
with open(STATE_FILE) as f:
saved_hash = f.read().strip()
if current_hash != saved_hash:
notify("Page changed! Check for new dates: " + URL)
with open(STATE_FILE, "w") as f:
f.write(current_hash)

Replace youruser and pick a unique topic name (e.g. john-appointment-watch).


Step 3: Test It

python3 ~/watch_page.py

No output means it ran fine and saved the initial page hash. The first run always creates the baseline — subsequent runs compare against it.


Step 4: Set Up Push Notifications with ntfy

ntfy.sh is a free, open-source push notification service. No account needed for basic use.

  1. Install the ntfy app on your phone (search “ntfy” in the App Store or Play Store — get the one by Philipp Heckel)
  2. Open the app → tap “+” → enter your topic name (e.g. john-appointment-watch) → Subscribe

Send a test notification from the Pi to confirm it works:

curl -H "Title: Test" -d "Hello from your Pi!" https://ntfy.sh/john-appointment-watch

You should get a push notification within seconds.


Step 5: Schedule It with Cron

Run the watcher every 2 hours automatically:

crontab -e

Add this line:

0 */2 * * * python3 /home/youruser/watch_page.py

Save and exit. The Pi will now silently check the page every 2 hours and alert you only when something changes.


The Result

A few days later, my phone buzzed. The page had changed. I opened the link, the new slots were live, and I booked my appointment within minutes — something I had completely missed the last time around.

Total cost: €0. Total Pi resources used: negligible.

The same Raspberry Pi can run a lot more alongside this watcher — check out running Gemma 4 locally on Raspberry Pi if you want a private AI assistant on the same hardware.


Adapting This for Any Website

This web page watcher Raspberry Pi pattern works for anything you want to monitor:

  • Flight prices
  • Concert ticket drops
  • Government appointment portals
  • Product restocks

Just swap out the URL variable. If you want to monitor a specific section rather than the whole page, use BeautifulSoup to target just the relevant block — that way minor updates like footer changes don’t trigger false alerts. Need to iterate on the script itself? Aider running against a local model is a clean way to do that without sending your code to the cloud.

sudo apt install -y python3-bs4
from bs4 import BeautifulSoup
def get_page_hash():
r = requests.get(URL, timeout=15)
soup = BeautifulSoup(r.text, "html.parser")
section = soup.find("section", class_="your-target-class")
return hashlib.md5(str(section).encode()).hexdigest()

Web Page Watcher Raspberry Pi: Summary

ComponentTool
HardwareRaspberry Pi
ScriptPython (requests, hashlib)
Schedulercron
Notificationsntfy.sh
Remote accessSSH

Simple, reliable, and runs forever on a Pi sitting in the corner of your room.

Leave a Reply

Join 925 other subscribers

Akash Gupta
Senior VoIP Engineer and AI Enthusiast



Discover more from AI and VoIP Blog

Subscribe to get the latest posts sent to your email.



Leave a Reply

Discover more from AI and VoIP Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading