Skip to content
Christopher Ferrari

Published on November 20, 2025

Automated bell control system for Raspberry Pi 4B with touchscreen interface, scheduled ringing, and mute period management.

Overview:

Automated church bell control system built for Raspberry Pi 4B with a 5" touchscreen. Provides both manual bell control and scheduled automated ringing with configurable mute periods for quiet hours.

Features:

  • Touch-friendly 5" display interface
  • Manual bell control with custom toll options (3, 6, 9, 12, 15 rings)
  • Scheduled automated ringing for services
  • Scheduled mute periods with recurring and one-time options
  • Manual mute override with confirmation dialog
  • Real-time clock with activity logging
  • GPIO5 relay control
  • Auto screen timeout (5 min) with touch-to-wake

Hardware:

  • Raspberry Pi 4B
  • 5" Touchscreen display
  • GPIO breakout hat
  • Bell relay on GPIO5

Default Schedules:

Bell Rings:

  • Mon-Sat: 9am (9x), 12pm (12x), 3pm (3x), 6pm (6x)
  • Sunday: 9:45am (15x)

Mute Periods:

  • Nighttime Quiet Hours: 8pm - 6am daily (recurring)
  • Supports one-time mute schedules for special events
  • Manual override available with confirmation dialog

Quick Start:

# Clone and install
git clone https://github.com/Tecttano/moody-bell.git
cd moody-bell/setup
chmod +x install.sh
./install.sh

# Reboot when done
sudo reboot

Installation:

Prerequisites

  • Raspberry Pi 4B with Raspberry Pi OS
  • 5" touchscreen connected
  • Bell relay wired to GPIO5

Setup

cd setup
chmod +x install.sh
./install.sh

Reboot when installation completes.

Usage:

Access the interface at http://localhost or http://<pi-ip>

Main Controls:

  • Ring Bell: Single toll (tap center bell icon)
  • Custom Tolls: Expandable menu for 3, 6, 9, 12, 15 rings
  • Mute: Manual mute toggle
  • Schedules: Manage bell ring times
  • Mute Schedules: Configure recurring and one-time mute periods

Mute Schedule Features:

  • Recurring schedules repeat daily (e.g., nighttime quiet hours)
  • One-time schedules for special events (shows next 7 days)
  • Manual override prompts confirmation if schedule is active

Development:

# Backend
cd backend
source venv/bin/activate
python app.py

# Frontend
cd frontend
npm start

Updates:

# Pull and deploy from repo
./setup/update.sh

# Rebuild without pulling
./setup/restart.sh

Tech Stack:

  • Backend: Flask, APScheduler, SQLAlchemy, RPi.GPIO
  • Frontend: React
  • Database: SQLite
  • Server: Nginx

Troubleshooting:

Check Logs:

# System logs
sudo journalctl -u moody-bell -f

# Activity logs
cat /opt/moody-bell/backend/bell_activity.log

# Restart service
sudo systemctl restart moody-bell

Common Issues:

# Verify GPIO access
gpio readall

# Check service status
sudo systemctl status moody-bell

# Test bell relay manually
gpio -g write 5 1 && sleep 0.5 && gpio -g write 5 0