[RELEASE] Adhan Player app

Hello all,

Muslims, followers of the religion Islam, pray 5 times a day at specific times throughout the day. These times change effectively on a daily basis, and thus the timings need to be recalculated accordingly.

I tried searching the community and interwebs for an app that would properly calculate these timings and play the "call to prayer" (a.k.a. the Adhan/Azan) over the smart speakers added to the hub. However, after my searches were unsuccessful, I decided to go ahead and write my own (FYI: as of v3.2, the app is available via [BETA] Hubitat Package Manager).

Although this app is intended for a niche audience, I figured I share here because I presume that there may be others in a similar situation.

This app uses the hub's location (from its settings) and calls a backend API, starting v4.0, uses local logic to calculate the prayer timings for that particular location. The app then plays the Adhan on the selected speaker(s) (specifically with capability.speechSynthesis). Note: Alexa devices will simply play a TTS message instead of an actual Adhan. See the Alexa support issue for more information.

Please let me know if you have questions/comments about the app.

Thanks.

9 Likes

Salams,

JazakAllah Khair for your efforts and I have been desperately looking for an app to automate the Adhan on Google Home Minis.

Is it possible to do a video tutorial on how to install this for a novice user? I would really appreciate all your help and In Shaa Allah it can help many more in this blessed month.

Take care

Walaikum assalaam,

Done: https://youtu.be/pk_CJzPEzos

Thank you for creating the video.

I just realised that I need a hubitat hub for this configuration to work and it didn't look into this thread properly.

I was trying to find a cloud/free solution to get the google home Mini to play the Adhan but it looks like I have to wait for something else.

I was also searching on hubitat website to buy the hub but couldn't find anything.

Anyway, thanks for all your help and hopefully the video can help someone that already has the setup in place.

Where are you located? They sell to several countries around the world.

I really don't think that will work. You may be able to get something to work with a service like IFTTT or a mobile app, but "out of the box" from Google doesn't exist to my knowledge. That was the limitation that inspired me to author this app.

The other alternative I had before Hubitat was the following which I think is the absolute closest you can get:

I had Adhan Player and Prayer Times Today - Prayer Times and Adhan Player open in a Google Chrome tab on a Microsoft Surface that I had lying around for no other purpose. I set the tab to cast its audio to the Google Mini speakers I had setup. This worked...for a time. The problem is that the audio casting is unreliable. The Microsoft Surface would need to reboot for updates, Google Chrome would just stop casting for some reason or the webpage would need to be refreshed for some reason. In the end, it wasn't good enough for me.

Maybe you can set a mobile Android phone to permanently cast to your Google speakers that has a mobile Adhan app installed on it, but I really think you'll run into the same problems.

In conclusion: I think I was in a similar situation as yourself, and I just could not find a solution that I thought was good enough. Therefore, I made one.

Hope this helps, sorry if it is not as good of an answer as you were hoping.

Canada

Take a look at the link I posted above then. It might be kind of overkill for this one purpose. Are you otherwise interested in home automation?

Yeah, I went down the route of IFTTT but got lost in the process and couldn't get it to work properly.

You are right, there is nothing "out of the box" for this feature and it's very frustrating. I mean the possibilities are endless, maybe one day our smart speakers can be connected to the local mosques where we can hear the Adhan live.

Yeah, it's a bit much for this one purpose.

I will wait and see how this technology improves and hopefully they can offer something simple

Can everyone here who has developed or interested in developing a cloud service to connect Google Home to speaker groups message me on Telegram at:

t dot me /joinchat/A-aaSB2IQuaLypk8NkqUnw

This is very cool.
While I personally do not practice a religion where I could use this app, it's awesome to see this gap being filled, and on top of that - I'm sure this can help other developers build unique experiences that are time based and leverage connected speakers.

thank you for this!

1 Like

I wrote a nodejs application that runs on a raspberry pi and broadcasts the daily azans on google home speakers.
Right now its just a server that you can setup using a config file. I have been planning to put a UI on top of it and make it portable so that instead of having it running on a raspberry pi or another linux machine you can run the program as a system app on your Mac or PC.

Would that be useful for people?

I was able to develop a solution to Automate Adhan for Google Home. Try it...www.SmartAzan.com. all you need is a windows PC, OR a Raspberry pi.

Done...www.SmartAzan.com

For those of us who don't have smart speakers, I've modified the app a bit to make it work with Alexa rather than a smart speaker, I've also created another version for Ireland users that doesn't rely on the internet, follows the ICCI prayer times and can play/send notifications at a user defined time before the Azan.
https://github.com/mshwail/Neverland

Salaam, This is a great app. I just migrated to Hubitat from ST and was discovering a bunch of things and found your app. It's late night here so I can't fully test it, but it looks promising. I modified it a bit, since i'm familiar with aladhan.com API.

I added the following line after 73:

input "asr", "enum", title: "Asr Calculation Method", defaultVaule: getDefaultAsr(), options: getAsrMap().keySet()

and this to the end of the query:

school: getAsrMap()[asr ?: getDefaultAsr()]

And finally, these two commands at the end

def getDefaultAsr() { "Shafi" }
def getAsrMap() {
    [
        "Shafi": 0,
        "Hanafi": 1
    ]
}

Walaikum Assalaam.

Thanks, if you would like to submit a PR on Github, I'd be happy to review it. Thanks for the improvement.

FYI: version 3.1 is published now that accounts for daylight savings time changeovers.

If you use this app and your adhans are off by an hour, please update the app's code to the latest version. Thanks

Assalam alaikum
I have 2 requests if possible
on/off in the settings for each adhan
Volume settings
God bless you, keep up the good work.