Git Product home page Git Product logo

piprayer's Introduction

PiPrayer

Azaan/Adhan player for Raspberry Pi.

Overview

PiPrayer project is for setting up and playing Azaan on Raspberry Pi (any version), using a bluetooth speaker. The Azaan automatically plays at the calculated times depending on the coordinates provided. PiPrayer also constantly updates the Azaan times as they change. Tested on Raspberry Pi 3 using Amazon Echo Pop as a bluetooth speaker.

Setup

Run the following commands to install prerequisites and clone project source.

sudo apt install pulseaudio-module-bluetooth 
sudo apt install python python-pip
pip install configparser

pulseaudio --start

git clone https://github.com/kamranzafar/piprayer.git

You could also download the latest piprayer release instead of cloning the repository.

wget -qO- https://github.com/kamranzafar/piprayer/archive/v0.6.tar.gz | tar -xzf -

Configure Default Bluetooth Device

Scan and pair Raspberry Pi with the bluetooth speaker.

bluetoothctl scan on

All available bluetooth devices will be listed with their MAC addresses (format is XX:XX:XX:XX:XX:XX). Copy the MAC address of the preferred audio device from the list. Once copied, run the following command to pair and trust the bluetooth speaker.

bluetoothctl pair XX:XX:XX:XX:XX:XX
bluetoothctl trust XX:XX:XX:XX:XX:XX

PiPrayer Configuration and Installation

Create a .piprayer configuration file in the piprayer project directory. Below is a sample configuration. The description of each configuration option is given at the end.

[Default]
lat = -37.909499
lng = 144.751876
dst = 1
gmt-offset = 10
method = MWL
asr-time = Hanafi
prayers = Fajr:-11, Dhuhr:1, Asr:0, Maghrib:-23, Isha:19

You can get the coordinates (latitude and longitude) of the place from Google Maps, see the following link for more information.

https://support.google.com/maps/answer/18539?co=GENIE.Platform%3DDesktop&hl=en

Installation

Once the .piprayer configuration file is created, simply run the following script to setup and install PiPrayer.

./setup-piprayer.sh

This script also takes an optional integer argument to play a different Azaan. There are 15 different Azaans available in this project, so the script argument can be any number between 1 and 15. By default azaan-1 is played, which can be changed by running the script as below.

./setup-piprayer.sh 5

All Azaan files can be found in the media folder.

Configuration options

Below are the available configuration options.

lat         # Latitude of the place

lng         # Longitude of the place

dst         # Daylight Saving
            # Acceptable values (only one):
            #   0
            #   1

gmt-offset  # Timezone, offset from GMT

method      # Calculation method 
            # Acceptable values (only one):
            #   MWL
            #   ISNA
            #   Egypt
            #   Makkah
            #   Karachi
            #   Tehran
            #   Jafari

asr-time    # Asr prayer calculation
            # Acceptable values (only one):
            #   Standard
            #   Hanafi

prayers     # Prayers to setup Azaan for
            # For each prayer, the time offset (in minutes) can be added after the colon (:)
            # By default all time offsets are set to 0 minutes
            # Acceptable values (comma separated) are below, with offsets separate by colon
            #   Fajr:0, Dhuhr:0, Asr:0, Maghrib:0, Isha:0

piprayer's People

Contributors

kamranzafar avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

icodein

piprayer's Issues

Adjust time offests

Esselemu Aleykum, may you help me to adjust the time offsets. I do not really know where to write the adjustmens

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.