Automate Islamic Adhan (also called Azan or Azzan) or other prayer calls - Updated 3_24_2023 for Node-RED

If i remove the Islamic Prayer Times integration and then reinstall it, will i have to change all the code and setup everything from scratch again as well or will it auto update?

No it should just pick it up again

I sent you a PM with my discord info

Here are the Adhan i am using
Adhan

Fajr-Adhan

I downloaded the azan to my laptop

how do i link it to home assistant now?

It is saved in C:\Azaan

Move what you downloaded to the www (create it if it does not exist) folder inside the config folder then refer to the pic i posted on how to access it.

Sorry once again for sounding super dumb but i have no idea about what you just said regarding moving it to the home assistant server and the www folder

I run the home assistant on an old laptop, i saw a few videos on youtube and installed Oracle VM VirtualBox Manager and that runs the Home assistant on it for me

I have saved the mp3 files on the same laptop that is running the HomeAssistant but donā€™t know what to do next to link it

In your case for the mp3 to work you have to move it inside the HA folder. HA wont be able to access any another part of your PC. There are two ways of doing this. First is by going to the folder which you have selected for installing HA in the VB Manager. There You will be able to find the folder ā€˜homeassistantā€™ and inside it ā€˜wwwā€™. You can copy the mp3 to that folder and use /config/www/<your_mp3_name> to get it working in HA. If you are not able to find the HA installation folder, you caan try the next method. i,e to install samba addon from addon store. Then add relevant details in config and use it to access HA folder form your PC itself.

Salams. Iā€™m looking to have an adthan play through my Sonos speakers 5 times a day. I have a particular adthan mp3 that Iā€™d like to stream. Is there anyone who could help me configure this? Iā€™m willing to pay for someoneā€™s assistance. Please let me know if you can help me sort this. Thanks!

Hi all,

can someone please explain me how it is possible to have all devices in sync? What is the secret? Just the input_boolean that turn on the automations?

  1. Go to your google home app and create a google group for your speakers.
  2. Home assistant will auto recognize this group on your network and show it on your overview tab. Take note of the entity name.
  3. Update automations to point to that group entity name instead of the individual speakers.

Hi Saros,

I have already created a group but when mp3 starts is not fully in sync (maybe it depends on the fact that some cast is in idle while some other is off).

This is great, however I want to use this with Alexa. I have been able to play Azan on demand through the following script on two different devices at the same time (apparently, you need to have either Nabu Casa or be able to remotely access HA to do this):

service: notify.alexa_media
data:
  message: "<audio src='https://xxxxxxxx.ui.nabu.casa/local/mp3/azan_normal.mp3'/>"
  target: media_player.xxxx_sonos_one
  target: media_player.echo_living_room
  data:
    type: tts

However, I am unable to automate this script. Can anyone with the Alexa test this and see whether the automated trigger works with Alexa?

Hello all,
Iā€™m sharing my setup in case it can help someone
installing the plugin to get sensors and configure it
define corresponding binary_sensors indicates if sensor time is reached :


template:
  - binary_sensor:
    - name: is_time_salat_fajr
      state: "{{ (as_timestamp(utcnow()) | int)  == (as_timestamp(states('sensor.fajr_prayer')) | int) }}"
    - name: is_time_salat_dhuhr
      state: "{{ as_timestamp(utcnow()) | int  == as_timestamp(states('sensor.dhuhr_prayer')) | int }}"
    - name: is_time_salat_asr
      state: "{{ as_timestamp(utcnow()) | int  == as_timestamp(states('sensor.asr_prayer')) | int }}"
    - name: is_time_salat_maghrib
      state: "{{ as_timestamp(utcnow()) | int  == as_timestamp(states('sensor.maghrib_prayer')) | int }}"
    - name: is_time_salat_isha
      state: "{{ as_timestamp(utcnow()) | int  == as_timestamp(states('sensor.isha_prayer')) | int }}"

creates a group with all of these binary_sensors, so if one of them goes to state on the group reports on :

time_to_pray:
    name: time_to_pray
    entities:
      - binary_sensor.is_time_salat_fajr
      - binary_sensor.is_time_salat_dhuhr
      - binary_sensor.is_time_salat_asr
      - binary_sensor.is_time_salat_maghrib
      - binary_sensor.is_time_salat_isha

finaly create on automation based on the group state :


- alias: adhan
  trigger:
    platform: state
    entity_id: group.time_to_pray
    to: 'on'
  action:
    - service: media_player.play_media
      data:
        media_content_id: /wwwcontent/your_file.mp3
        media_content_type: music
      entity_id: media_player.your_mediaplayer

put the mp3 file into the folder config/www/wwwcontent of your home assistant installation
replace the file and the media player according your configuration

Anybody know what to write in config ymal to have Alexa lower volume during a certain prayer?

Brother, please check the automation YAML file in first post.
You can change volume between 0.0 and 1.0 (0 is lowest and 1 is highest).

jazak Allaho khairan Brother.

Without wishing to hijack this thread perhaps this might be of value for you or others who might subscribe to the London Unified Timetable (ELM/LCM) (which canā€™t easily be calculated).

(Please respect the thread and send issues/support elsewhere)

1 Like

Hi

Just to remind everyone that the Azan times will be off due to the time change in the US but it will self correct the next day. this happens because the prayer time integration reaches out and updates before the time change happens.

Someone using this api at Netherlands hanafi and are the times well correct? Islamic prayer time integration was the times not correct.