Klik gambar berikut untuk melihat video demo:
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.
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.
-
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!
-
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
-
Inside this project folder, go to
/public
then insert your Pi's IP address onchat.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!
-
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.
-
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 userpi38.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.
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