If you live in a place where you cannot hear the athan, you’re probably relying on an app (such as Mawaqit) on your phone to know the prayer times. While these apps generally work well, I’ve had an issue with not being able to hear my phone when the athan goes off for Fajr.
I tried using another device, such as my iPad, where I don’t enable DND mode at night. However, the athan often doesn’t play fully. Setting an alarm was a temporary solution, but it is static and not ideal long-term.
I realized I don’t just want to hear the athan from my phone—I want a source that plays it louder and clearer. At first, I considered buying a smart home speaker, but since I don’t want a device that’s always listening, I decided to build my own solution.
- Raspberry Pi (or any similar device)
- Speakers
- Git, Python3, and pip3 installed
- The Python script fetches the monthly prayer calendar from Mawaqit once per month.
- Daily prayer times are read from a local
calendar.jsonfile, reducing network dependency. - Athan is played automatically at scheduled times from a local audio file.
- Logs are written to
out/athan.logfor easy monitoring. - The app can be started/stopped using the provided Bash script, which also activates the Python virtual environment.
Clone the repository and set up the Python environment:
git clone https://github.com/aahajj/athan-home.git
cd athan-home
python3 -m venv .env
source .env/bin/activate
pip3 install -r requirements.txtSet the MASJID_ID environment variable to your masjid's ID from Mawaqit:
export MASJID_ID="your-masjid-id-here"You can find your masjid ID by visiting the Mawaqit website and looking at the URL (e.g., https://mawaqit.net/de/m/your-masjid-id).
The project includes a Bash script athan.sh to start or stop the app. Make it executable first:
cd src
chmod +x athan.sh- Start Athan (activates the Python environment, runs in the background):
./athan.sh a- Stop Athan (deactivates and kills the process):
./athan.sh dLogs are saved in
out/athan.log. The monthly calendar is stored inout/calendar.json.