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

Alhamdulillah, I got it Adhan automation working.

My setup is a simple setup, with only for 1 google home device and without separate automation for Fajr. Just basic to get it Adhan automation working at the correct times.

I’m happy to share both my cong.yaml and auto.yaml to assist others who are having issues. Can someone assist me in how to attached the yaml files the same way porankazi’s has done in the first post so that it’s readable?

A big thanks to AdighaLogic for putting me in the right direction and AdighaLogic for the original post.
May Allah reward you for your efforts and time

1 Like

Asslamu-Alaikum,

Please find as attached my Configuration and Automation files. With Home Assisstant 0.92.1. It is working without any issue. I have one Azzan stored locally and one from web. You can use the same. I am also offsetting time based on local Masjid. I have installed Samba Share add on installed to have local MP3 Files.

Hope it will help you all. For me it is working on LAN.

configuration.yaml

homeassistant:
  # Name of the location where Home Assistant is running
  name: Home
  # Location required to calculate the time the sun rises and sets
  latitude: 51.3722
  longitude: -0.453
  # Impacts weather/sunrise data (altitude above sea level in meters)
  elevation: 0
  # metric for Metric, imperial for Imperial
  unit_system: metric
  # Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
  time_zone: Europe/London
  # Customization file
  customize: !include customize.yaml
  whitelist_external_dirs:
    - '/config/www'


# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:

# Show the introduction message on startup.
#introduction:

# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
# http:
#   base_url: example.duckdns.org:8123

# Discover some devices automatically
discovery:

media_extractor:

# Sensors
sensor:
  # Weather prediction
  - platform: yr
  
  - platform: time_date
    display_options:
        - 'time'
        - 'date'
        - 'date_time'
        - 'time_date'
        - 'time_utc'
        - 'beat'

  - platform: islamic_prayer_times
    calculation_method: mwl
    sensors:
       - fajr
       - sunrise
       - dhuhr
       - asr
       - maghrib
       - isha
       - midnight
# Text to speech
tts:
  - platform: google_translate
    service_name: google_say

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml

automations.yaml

# Automation for Dhuhr, Asr, Maghrib, and Isha Adhan
- action:
  - alias: ''
    data:
      entity_id: media_player.family_room_speaker,media_player.kitchen_speaker, media_player.bedroom_speaker    # replace with your Google Home
      media_content_id: http://www.alkalam.pk/azan_audios/maghrib_adhan_from_makkah_by_yunus_khoja.mp3   # replace with your choice of Adhan
     # media_content_id: http://192.168.1.253:8123/local/1.mp3
      media_content_type: audio/mp3
    service: media_extractor.play_media
  - data:
      entity_id: media_player.family_room_speaker,media_player.kitchen_speaker, media_player.bedroom_speaker   # replace with your Google Home's id
      volume_level: '0.4'
    service: media_player.volume_set
  alias: Adhan
  condition: []
  id: '1517693010922'
  trigger:
  - platform: template
    value_template: '{{ as_timestamp(strptime(states("sensor.time_date"), "%H:%M, %Y-%m-%d")) == as_timestamp(strptime(states("sensor.islamic_prayer_time_dhuhr"), "%Y-%m-%dT%H:%M:%S"))+240 }}'
  - platform: template
    value_template: '{{ as_timestamp(strptime(states("sensor.time_date"), "%H:%M, %Y-%m-%d")) == as_timestamp(strptime(states("sensor.islamic_prayer_time_asr"), "%Y-%m-%dT%H:%M:%S"))+3960 }}'
  - platform: template
    value_template: '{{ as_timestamp(strptime(states("sensor.time_date"), "%H:%M, %Y-%m-%d")) == as_timestamp(strptime(states("sensor.islamic_prayer_time_maghrib"), "%Y-%m-%dT%H:%M:%S"))+360 }}'
  - platform: template
    value_template: '{{ as_timestamp(strptime(states("sensor.time_date"), "%H:%M, %Y-%m-%d")) == as_timestamp(strptime(states("sensor.islamic_prayer_time_isha"), "%Y-%m-%dT%H:%M:%S"))-2220}}'

# Separate Automation for Fajr Adhan
- action:
  - alias: ‘’
    data:
      entity_id: media_player.family_room_speaker,media_player.bedroom_speaker   # replace with your Google Home's id
      media_content_id: http://www.alkalam.pk/azan_audios/makkah_fajr_azan_by_sheikh_ali_ahmed.mp3  
      # replace with your choice of Fajr Adhan
      media_content_type: audio/mp3
    service: media_extractor.play_media
  - data:
      entity_id: media_player.family_room_speaker,media_player.bedroom_speaker    # replace with your Google Home's id
      volume_level: '0.5'
    service: media_player.volume_set
  alias: Fajr Adhan
  condition: []
  id: '1517694139112'
  trigger:
  - platform: template
    value_template: '{{ as_timestamp(strptime(states("sensor.time_date"), "%H:%M, %Y-%m-%d")) == as_timestamp(strptime(states("sensor.islamic_prayer_time_fajr"), "%Y-%m-%dT%H:%M:%S"))+1200 }}'
Thank you very much for sharing your files.
Please take a look and tell me what I did wrong, I am not familiar with code at all.i copied you config and the automation to min and I got this error, I tried to put the mp3 adhan in the \config\www folder same problem and I tried to put mp3 adhan in share folder still same error.please help
![image|281x500](upload://uVIggKSLwCAvmyb3gZiLlqlUScK.png)

    homeassistant:
  # Name of the location where Home Assistant is running
  name: Home
  # Location required to calculate the time the sun rises and sets
  latitude: 40.5978
  longitude: -74.0001
  # Impacts weather/sunrise data (altitude above sea level in meters)
  elevation: 0
  # metric for Metric, imperial for Imperial
  unit_system: metric
 
  time_zone: America/New_York
  **# Customization file**
**customize: !include customize.yaml**
**whitelist_external_dirs:**
**  - '/share' (it was /config/www and didn't work)**
  # Configure a default setup of Home Assistant (frontend, api, etc)
default_config:

# Show the introduction message on startup.
#introduction:

# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
# http:
#   base_url: example. duckdns.org:8123

# Discover some devices automatically
discovery:

media_extractor:

# Sensors
sensor:
  # Weather prediction
  - platform: yr
  
  - platform: time_date
    display_options:
        - 'time'
        - 'date'
        - 'date_time'
        - 'time_date'
        - 'time_utc'
        - 'beat'

  - platform: islamic_prayer_times
    calculation_method: isna
    sensors:
       - fajr
       - sunrise
       - dhuhr
       - asr
       - maghrib
       - isha
       - midnight
# Text to speech
tts:
  - platform: google_translate
    service_name: google_say

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml

# Automation for Dhuhr, Asr, Maghrib, and Isha Adhan
- action:
  - alias: ''
    data:
      entity_id: media_player.living_room_speaker,media_player.attic_speaker, media_player.tv_speaker    # replace with your Google Home
      media_content_id: http://192.168.1.231:8123/share/Adhan1.mp3   # replace with your choice of Adhan
     # media_content_id: http://192.168.1.231:8123/share/Adhan1.mp3
      media_content_type: audio/mp3
    service: media_extractor.play_media
  - data:
      entity_id: media_player.living_room_speaker,media_player.attic_speaker, media_player.tv_speaker   # replace with your Google Home's id
      volume_level: '0.4'
    service: media_player.volume_set
  alias: Adhan
  condition: []
  id: '1517693010922'
  trigger:
  - platform: template
    value_template: '{{ as_timestamp(strptime(states("sensor.time_date"), "%H:%M, %Y-%m-%d")) == as_timestamp(strptime(states("sensor.islamic_prayer_time_dhuhr"), "%Y-%m-%dT%H:%M:%S"))+240 }}'
  - platform: template
    value_template: '{{ as_timestamp(strptime(states("sensor.time_date"), "%H:%M, %Y-%m-%d")) == as_timestamp(strptime(states("sensor.islamic_prayer_time_asr"), "%Y-%m-%dT%H:%M:%S"))+3960 }}'
  - platform: template
    value_template: '{{ as_timestamp(strptime(states("sensor.time_date"), "%H:%M, %Y-%m-%d")) == as_timestamp(strptime(states("sensor.islamic_prayer_time_maghrib"), "%Y-%m-%dT%H:%M:%S"))+360 }}'
  - platform: template
    value_template: '{{ as_timestamp(strptime(states("sensor.time_date"), "%H:%M, %Y-%m-%d")) == as_timestamp(strptime(states("sensor.islamic_prayer_time_isha"), "%Y-%m-%dT%H:%M:%S"))-2220}}'

# Separate Automation for Fajr Adhan
- action:
  - alias: ‘’
    data:
      entity_id: media_player.living_room_speaker,media_player.attic_speaker, media_player.tv_speaker   # replace with your Google Home's id
      media_content_id: http://192.168.1.231:8123/share/Adhan1.mp3  
      # replace with your choice of Fajr Adhan
      media_content_type: audio/mp3
    service: media_extractor.play_media
  - data:
      entity_id: media_player.living_room_speaker,media_player.attic_speaker, media_player.tv_speaker    # replace with your Google Home's id
      volume_level: '0.5'
    service: media_player.volume_set
  alias: Fajr Adhan
  condition: []
  id: '1517694139112'
  trigger:
  - platform: template
    value_template: '{{ as_timestamp(strptime(states("sensor.time_date"), "%H:%M, %Y-%m-%d")) == as_timestamp(strptime(states("sensor.islamic_prayer_time_fajr"), "%Y-%m-%dT%H:%M:%S"))+1200 }}'

Asslamu- Alaikum,

It looks like your Samba share is not setup correctly, try changing

media_content_id: http://192.168.1.231:8123/share/Adhan1.mp3 # replace with your choice of Adhan

with

media_content_id: https://www.islamcan.com/audio/adhan/azan5.mp3

I am having an issue getting this to work as well. I have pasted my configuration and automation, please inform what i have done wrong. new to this so i have been trying my best. thanks in advance!!

homeassistant:

Name of the location where Home Assistant is running

name: Home

Location required to calculate the time the sun rises and sets

latitude: xx.xxxx
longitude: xx.xxxx

Impacts weather/sunrise data (altitude above sea level in meters)

elevation: 0

metric for Metric, imperial for Imperial

unit_system: imperial

Pick yours from here: /en.wikipediadotorg/wiki/List_of_tz_database_time_zones

time_zone: XXXXXXXX

Customization file

customize: !include customize.yaml

Configure a default setup of Home Assistant (frontend, api, etc)

default_config:

  • platform: time_date
    display_options:
    • ‘time’
    • ‘date’
    • ‘date_time’
    • ‘time_date’
    • ‘time_utc’
    • ‘beat’
      sensor:
    • platform: islamic_prayer_times
      calculation_method: isna
      sensors:
      • fajr
      • dhuhr
      • asr
      • maghrib
      • isha
      • midnight

#Google Home

cast:
media_player:
- host: 192.168.1.111
- host: 192.168.1.121
- host: 192.168.1.155

#Input Boolean - used to synchronize between multiple speakers
input_boolean:
adhan:
name: Adhan
initial: off

sensor:
media_extractor:

Uncomment this if you are using SSL/TLS, running in Docker container, etc.

http:

base_url: example.duckdnsdotorg:8123

Discover some devices automatically

#discovery:

Sensors

#sensor:

#Athan

- platform: islamic_prayer_times

Weather prediction

- platform: yr

- platform: time_date

Text to speech

tts:

  • platform: google_translate

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
shell_command: !include shell_commands.yaml

##############################################################################

Automation

Automation for Dhuhr, Asr, Maghrib, and Isha Adhan

  • action:
    • alias: ‘’
      data:
      entity_id: media_player.basement_speaker,media_player.kitchen_speaker, media_player.master_bedroom_speaker # replace with your Google Home
      media_content_id: httyoutubedotcom/watch?v=UlLaUCAQlQQ # replace with your choice of Adhan

      media_content_id: 192.168.1.253:8123/local/1.mp3

      media_content_type: audio/mp3
      service: media_extractor.play_media
    • data:
      entity_id: media_player.basement_speaker,media_player.kitchen_speaker,media_player.master_bedroom_speaker # replace with your Google Home’s id
      volume_level: ‘0.5’
      service: media_player.volume_set
      alias: Adhan
      condition: []
      id: ‘1517693010922’
      trigger:
    • platform: template
      value_template: ‘{{ as_timestamp(strptime(states(“sensor.time_date”), “%H:%M, %Y-%m-%d”)) == as_timestamp(strptime(states(“sensor.islamic_prayer_time_dhuhr”), “%Y-%m-%dT%H:%M:%S”)) }}’
    • platform: template
      value_template: ‘{{ as_timestamp(strptime(states(“sensor.time_date”), “%H:%M, %Y-%m-%d”)) == as_timestamp(strptime(states(“sensor.islamic_prayer_time_asr”), “%Y-%m-%dT%H:%M:%S”)) }}’
    • platform: template
      value_template: ‘{{ as_timestamp(strptime(states(“sensor.time_date”), “%H:%M, %Y-%m-%d”)) == as_timestamp(strptime(states(“sensor.islamic_prayer_time_maghrib”), “%Y-%m-%dT%H:%M:%S”)) }}’
    • platform: template
      value_template: ‘{{ as_timestamp(strptime(states(“sensor.time_date”), “%H:%M, %Y-%m-%d”)) == as_timestamp(strptime(states(“sensor.islamic_prayer_time_isha”), “%Y-%m-%dT%H:%M:%S”))}}’

Separate Automation for Fajr Adhan

  • action:
    • alias: ‘’
      data:
      entity_id: media_player.family_room_speaker,media_player.bedroom_speaker # replace with your Google Home’s id
      media_content_id: https://www.youtubedotcom/watch?v=UlLaUCAQlQQ

      replace with your choice of Fajr Adhan

      media_content_type: audio/mp3
      service: media_extractor.play_media
    • data:
      entity_id: media_player.family_room_speaker,media_player.bedroom_speaker # replace with your Google Home’s id
      volume_level: ‘0.2’
      service: media_player.volume_set
      alias: Fajr Adhan
      condition: []
      id: ‘1517694139112’
      trigger:
    • platform: template
      value_template: ‘{{ as_timestamp(strptime(states(“sensor.time_date”), “%H:%M, %Y-%m-%d”)) == as_timestamp(strptime(states(“sensor.islamic_prayer_time_fajr”), “%Y-%m-%dT%H:%M:%S”)) }}’

First, Jazak allah khira brother,
Now it is working but manually,
I can trigger it manually but when the prayer time comes it doesn’t go automatically.
Any suggestions?!
Thanks again

Please check if you are connected with LAN cable or wireless. For me when i use wireless it does not work, so i have connected by Raspberry pi with LAN connection.

Also try restarting your Raspberry Pi.

Regards,

Asslamu Alaikum,

As per your configuration it looks you are trying to use Youtube, it used to work for me but stopped working since last update. So i would recommend to use my configuration and automation with change

media_content_id: http://192.168.1.231:8123/share/Adhan1.mp3 # replace with your choice of Adhan
with
media_content_id: https://www.islamcan.com/audio/adhan/azan5.mp3

It’s on lan only I didn’t setup the wireless yet.

Asslamu Alaikum. I am able to get it to work with my current configuration if i start it from the Overview Page and toggle the Adhan off and then on, or from off to on if it was already off. then all speakers play the adhan from youtube correctly. however i cannot get it to work automatically.

i will try your link and see if that fixes it for me but if i am able to force the automation and it pulls the adhan i got from youtube, i believe the issue maybe somewhere else. i am by no means even a novice when it comes to this. so please forgive my ignorance.

thanks again!

If anyone is having trouble with the automations not triggering automatically (but it plays if triggered manually):

Go to the the states page (http://hassio.local:8123/dev-state) and ensure that the following states are set:

input_boolean.adhan

is set to off


And

 automation.adhan

is set to on

and

 automation.adhan_fajr

is set to on

[repeat for any other automation.adhan_[name] that you may have pasted from the original code in the first post as applies to your code] etc.

Hope that helps and Ramadan Kareem

1 Like

Al salaam Alikum, and Ramadan Kareem,
I use the following setting for my Azan one file for sensores and another for automation, I split time to only display HH:MM and used the to compare with local time.
sensor.yaml

- platform: time_date
  display_options:
    - 'time'
    - 'date'
    - 'time_date'
  - platform: islamic_prayer_times
    calculation_method: isna
    sensors:
      - fajr
      - sunrise
      - dhuhr
      - asr
      - maghrib
      - isha
      - midnight

  - platform: template
    sensors:
      salah_fajr:
        friendly_name: "Sensor Salah fajr"
        value_template: >
           {%- set a = states("sensor.islamic_prayer_time_fajr").split("T")[1].split(":")[0] -%}
           {%- set b = states("sensor.islamic_prayer_time_fajr").split("T")[1].split(":")[1] -%}
           {{ a + ":" + b }}
      salah_dhuhr:
        friendly_name: "Sensor Salah Dhuhr"
        value_template: >
           {%- set a = states("sensor.islamic_prayer_time_dhuhr").split("T")[1].split(":")[0] -%}
           {%- set b = states("sensor.islamic_prayer_time_dhuhr").split("T")[1].split(":")[1] -%}
           {{ a + ":" + b }}

      salah_asr:
        friendly_name: "Sensor Salah Asr"
        value_template: >
           {%- set a = states("sensor.islamic_prayer_time_asr").split("T")[1].split(":")[0] -%}
           {%- set b = states("sensor.islamic_prayer_time_asr").split("T")[1].split(":")[1] -%}
           {{ a + ":" + b }}
      salah_maghrib:
        friendly_name: "Sensor Salah Maghrib"
        value_template: >
           {%- set a = states("sensor.islamic_prayer_time_maghrib").split("T")[1].split(":")[0] -%}
           {%- set b = states("sensor.islamic_prayer_time_maghrib").split("T")[1].split(":")[1] -%}
           {{ a + ":" + b }}
      salah_isha:
        friendly_name: "Sensor Salah isha"
        value_template: >
           {%- set a = states("sensor.islamic_prayer_time_isha").split("T")[1].split(":")[0] -%}
           {%- set b = states("sensor.islamic_prayer_time_isha").split("T")[1].split(":")[1] -%}
           {{ a + ":" + b }}
      salah_actual:
        friendly_name: "Salah Actual"
        value_template: >
           "{%- if states('sensor.salah_fajr') == states('sensor.time') -%}
             Fajr
           {%- elif states('sensor.salah_dhuhr') == states('sensor.time') -%}
             Dhuhr
           {%- elif states('sensor.salah_asr') == states('sensor.time') -%}
             Asr
           {%- elif states('sensor.salah_maghrib') == states('sensor.time') -%}
             Maghrib
           {%- elif states('sensor.salah_isha') == states('sensor.time') -%}
             Isha
           {%- endif -%}"

and Automation for prayer to play a local wave files, i have like 7 different Azan wav files, the system can choose random and play the file on local speacker connected t RPI, you still can use the media player to play your files, Also the shell_command.tts_local , i use a local tts, you can your your own mediaplayer to play the greeting message.
automation.yaml

  alias: Salah nuevo
  initial_state: "on"
  trigger:

    - platform: template
      value_template: "{{ states('sensor.salah_fajr') == states('sensor.time') }}"
    - platform: template
      value_template: "{{ states('sensor.salah_dhuhr') == states('sensor.time') }}"
    - platform: template
      value_template: "{{ states('sensor.salah_asr') == states('sensor.time') }}"
    - platform: template
      value_template: "{{ states('sensor.salah_maghrib') == states('sensor.time') }}"
    - platform: template
      value_template: "{{ states('sensor.salah_isha') == states('sensor.time') }}"

  action:
    - service: shell_command.tts_local
      data_template:
        message: >
           "{{states('sensor.greeting')}}, Esa es la Notificacion de Salah al {{ states('sensor.salah_actual')}} , Sera mejor levantarse a REZAR!."
    - delay:
        seconds: 0.125

    - service: shell_command.adan_chooser
      data_template:
        direccion: "/home/pi/sounds/azan/azan{{'{0:d}'.format(range(1, 8)|random)}}.wav"

and the shell command

adan_chooser: /usr/bin/aplay -q "{{direccion}}"
2 Likes

you can use the quotations
" ```
your codes

and again put the 3 qoutations
" 3 quotations before and after your code

This did not work for me unfortunately.

Is anyone else’s component broken? It looks like api.aladhan.com is down? @cgtobi, sorry to tag, but are you aware?

2019-05-31 06:13:01 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up platform islamic_prayer_times
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 159, in _new_conn
    (self._dns_host, self.port), self.timeout, **extra_kw)
  File "/usr/local/lib/python3.7/site-packages/urllib3/util/connection.py", line 80, in create_connection
    raise err
  File "/usr/local/lib/python3.7/site-packages/urllib3/util/connection.py", line 70, in create_connection
    sock.connect(sa)
OSError: [Errno 101] Network unreachable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 600, in urlopen
    chunked=chunked)
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 354, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/usr/local/lib/python3.7/http/client.py", line 1229, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/local/lib/python3.7/http/client.py", line 1275, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/local/lib/python3.7/http/client.py", line 1224, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/local/lib/python3.7/http/client.py", line 1016, in _send_output
    self.send(msg)
  File "/usr/local/lib/python3.7/http/client.py", line 956, in send
    self.connect()
  File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 181, in connect
    conn = self._new_conn()
  File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 168, in _new_conn
    self, "Failed to establish a new connection: %s" % e)
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x718f4ef0>: Failed to establish a new connection: [Errno 101] Network unreachable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 449, in send
    timeout=timeout
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 638, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "/usr/local/lib/python3.7/site-packages/urllib3/util/retry.py", line 399, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='api.aladhan.com', port=80): Max retries exceeded with url: /timings/1559232000?latitude=xxxxx&longitude=xxxxx&method=3 (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x718f4ef0>: Failed to establish a new connection: [Errno 101] Network unreachable'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 126, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT, loop=hass.loop)
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 416, in wait_for
    return fut.result()
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/islamic_prayer_times/sensor.py", line 51, in async_setup_platform
    prayer_times = prayer_times_data.get_new_prayer_times()
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/islamic_prayer_times/sensor.py", line 157, in get_new_prayer_times
    self.prayer_times_info = calc.fetch_prayer_times()
  File "/usr/local/lib/python3.7/site-packages/prayer_times_calculator/pray_times_calculator.py", line 38, in fetch_prayer_times
    response = requests.get(url)
  File "/usr/local/lib/python3.7/site-packages/requests/api.py", line 75, in get
    return request('get', url, params=params, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/api.py", line 60, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 533, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 646, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 516, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='api.aladhan.com', port=80): Max retries exceeded with url: /timings/1559232000?latitude=xxxxx&longitude=xxxxx&method=3 (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x718f4ef0>: Failed to establish a new connection: [Errno 101] Network unreachable'))

https://github.com/home-assistant/home-assistant/issues/24205

Yes it’s broken unfortunately :frowning:

Salem to all brothers and sisters,
I am completely new to home automation but had this idea of Azan to be played and cane across this Allhamdulillah.

Do you need a Raspberry Pi or just google home and a computer to download home assistant ? If I am completely wrong can someone please correct me ? Thank you

You will need both. But you can use other platforms instead of raspberry pi. I would recommend raspberry pi because there is alot of support for it.
I’m using synology nas but that’s only because I already have it.

You need to install home assistant (hassio on raspberry pi)
Hassio is operating system for raspberry pi which contains home assistant.

Once installed, follow the first post to set it up the sensors and automation.

Looks like it’s back again.

1 Like