Skip to content

LintangWisesa/RPi_Ramadan_PrayerTimes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

simplinnovation

Ramadan Prayer Times Display & Alarm

📋 Project Summary

Klik gambar berikut untuk melihat video demo:

Video

Display jadwal Imsakiyah Ramadan dengan fitur: menampilkan jadwal Imsakiyah di kota tertentu (di Indonesia), setting kota secara wireless via WiFi & alarm azan otomatis setiap masuk waktu sholat. Dirancang dengan Raspberry Pi 3B+, untuk fitur display dengan Node.js (Express.js & Socket.io), sedangkan alarm azan otomatis dengan Python (Pygame). Data jadwal Imsakiyah diambil dari Aladhan Prayer Times API, sedangkan audio azan bersumber dari serial Upin & Ipin, dengan muazzin Syeikh Abdul Karim Al-Makki.


📋 Project Tutorial

This project is built on Raspberry Pi 3B+ with Raspbian OS, Python 3.x (I'm using 3.4 & 3.8) & Node.js 8++ (I'm using 10). So make sure you've installed Python 3.x & Node.js 8++, also git to clone this project from my github.

  • 1. Connect to WiFi & Check its IP

    Connect your Raspberry Pi to a WiFi connection, then check its IP address. On terminal type:

    $ ifconfig

    Your Pi's IP address must be various, it consists of some numbers with some dots like 123.456.78.910. Note your IP address!


  • 2. Clone this project

    Clone this project from my github repo. Download here or clone it from your terminal (make sure you've installed git on your Pi):

    $ git clone https://github.com/LintangWisesa/RPi_Ramadan_PrayerTimes.git

  • 3. Insert your IP on the app

    Inside this project folder, go to /public then insert your Pi's IP address on chat.js file.

    $ cd RPi_Ramadan_PrayerTimes
    
    $ cd public
    
    $ sudo nano chat.js

    Insert your IP address on the following line (chat.js):

    var socket = io.connect('http://123.456.78.910:1234') 
    // change with your RPi IP address

    Exit & save it!


  • 4a. Run Express.js server (Display prayer times)

    Go back to the project root, then run its server application (app.js file). It'll be better if you have nodemon installed.

    $ node app

    or by using nodemon:

    $ nodemon app

    The server will be listening on port 1234, so you can access it via your Pi's web browser (for example Chromium): http://localhost:1234. It will make a GET request to Aladhan API then render an HTML page with prayer times displayed, you can configure its city by click Settings button on the page.


  • 4b. Run Python app (Alarm prayer times)

    Open new terminal, go to the project root, then run its Python application. If you're using Python below 3.5, use rpi34.py and if you're using Python above 3.5 please use rpi38.py file.

    $ python3 rpi34.py

    or

    $ python3 rpi38.py

    It will make a GET request to Aladhan API then play azan.mp3 automatically every prayer times are occured.


  • 5. Control it from your gadget

You can also configure the city displayed (Indonesia only) via your laptop, tablet or even a smartphone. First connect your gadget to a WiFi which your Raspberry Pi is connected to. Open your browser & go to your Pi's IP address on port 1234, for example: http://123.456.78.910:1234. You'll see something similar with your Pi display & try to config its city. Enjoy!


Lintang Wisesa 💌 lintangwisesa@ymail.com

Facebook | Twitter | Youtube | LinkedIn | :octocat: GitHub | Hackster