achaudhry / adhan Goto Github PK
View Code? Open in Web Editor NEWRaspberry Pi Adhan Clock
Raspberry Pi Adhan Clock
I see in the Adtham folder there are a couple of different MP3 files for different Athans. How can I select between them?
I implemented this on a Raspberry Pi 4 and hooked up speakers with it to make an Azaan Clock.
My problem is that it doesn't seem to run the script to calculate new Azaan Times. Why is that?
I tried using sudo with the python execute command in the crontab command (because I thought it might not be working because of lack of root privilege), but that doesn't seem to work either.
Right now, I have to manually execute this again every few days to update Azaan Times.
Sorry I don't know about GitHub enough to contribute myself, however, I notices the the UTC offset calculation is rounding off to the nearest integer instead of at least one decimal place.
utcOffset = -(time.timezone/3600)
This resulted in incorrect prayer timings for places with x.5 hours offset. This probably can be fixed by adding a decimal place in 3600
utcOffset = -(time.timezone/3600.0)
Hey,
I am having somehow totally wrong times.
The script gives:
03:13
12:51
16:54
20:15
22:31
Should be:
03:52
05:22 (sun)
12:56
16:57
20:21
21:41
Selected is Karachi
Is there a way to get it to run over connected Bluetooth speakers? I tried it and unfortunately it does not work. It must be connected through a 3.5mm jack.
I have some custom recorded adhaans that I am trying to swap in place of the pre-determined ones. I have changed the name of my file to match "Adhan-Makkah.mp3" in /home/pi/adhan but nothing ends up playing. Is there another folder that I should copy these files to beside that one?
Was inspired by Hossam Hammady to open this as an issue as other people might have faced this issue as well too.
I am just playing with the praytimes.py and updateazantimer.py and instead of playing the audio on a pi, I am trying to run this in my local mac with the help of crontab but what is confusing me is how could I work around this command that is used for omxplayer to play the audio file. omxplayer -o local /home/pi/adhan/Adhan-fajr.mp3 > /dev/null 2>&1
How could I work around that in order to be able to able to play the Adhan on my local machine?
Also, it seems as my jobs get created using crontab on my local machine but the audio file never really plays.
The other thing that I am wondering is that instead of using a Pi to run this what If I wanted to use my own server to get this job done, what would I need to do then to create the jobs and make sure the audio plays when the prayer time comes?
Any tips or suggestions would be appreciated.
Edit: It was mentioned by Hammady that launchd might be helpful to run this project on a mac.
Sometimes it is needed to run custom commands either before, after or before and after playing adhan. For example, if you have Quran playing continuously, you would want to pause and resume the playback. Another example, is to set your status on a social network, or a calendar, to block/unblock the Internet using pi.hole rules, ... etc.
With optional command line arguments added in #7, one can introduce custom commands using additional arguments.
@achaudhry I am going to submit a PR to add this once the above is merged.
Salaam br.
Noticed playAzaan.sh is leveraging omxplayer
I noticed that omxplayer has been deprecated in the latest version of Raspbian (v11 Bullseye)
https://github.com/popcornmix/omxplayer#readme
I'm still on v10 (Buster) so not impacting me until I upgrade but the script may need to be modified to use mpg123 (or mpg321) or some other player
w'salaam
I haven't had a chance to debug this yet but here is my crontab output:
25 5 * * * /usr/local/bin/omxplayer -o local /home/osmc/adhan/Adhan-fajr.mp3 > /dev/null 2>&1 # rpiAdhanClockJob
57 12 * * * /usr/local/bin/omxplayer -o local /home/osmc/adhan/Adhan-Makkah.mp3 > /dev/null 2>&1 # rpiAdhanClockJob
26 16 * * * /usr/local/bin/omxplayer -o local /home/osmc/adhan/Adhan-Makkah.mp3 > /dev/null 2>&1 # rpiAdhanClockJob
4 19 * * * /usr/local/bin/omxplayer -o local /home/osmc/adhan/Adhan-Makkah.mp3 > /dev/null 2>&1 # rpiAdhanClockJob
34 17 * * * /usr/local/bin/omxplayer -o local /home/osmc/adhan/Adhan-Makkah.mp3 > /dev/null 2>&1 # rpiAdhanClockJob
For some reason i'sha (the last entry) is coming in as 17:34 instead of 20:34. All the other prayer times are correct or off by 1 minute (not a big deal).
Here is approximately my lat/long from google maps:
lat = 34.131025
long = -117.673580
PT.setMethod('Makkah')
Do you have any ideas as to why i'sha is wrong? I will try to investigate this some more later if you can't.
Cool project otherwise ๐
-Ibraheem
Selam Aleykum,
how can I integrate a delay so my speakers have time to activate? Thanks a lot.
Salams brother,
JazakAllah for the great effort - May ุงููู reward you all. I have just installed the code - I was wondering how can we play Adhan-Makkah-Dua.mp3 after each Adhan?
BR
Usman
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.