In my previous post we used Homebridge along with IFTTT to announce the Prayer calls to my Homepods. In this post I will try to achieve the same but using Homebrige with a webcal that would have all the prayer time. We will use the Homebridge "Calendar Scheduler" plugin to get all events (Prayer Calls) from the calendar and use the exposed contact sensor in Homekit to trigger a scene that announces Athan on my homepods
For this i am using the prayer calendar offered by www.prayerwebcal.dsultan.com
Click on the gear on the top right corner to configure your location and all options related to times and events you would want to be notified on
In my case, i only wanted to be notifed for the payer calls, so i have disabled all other notification regarding sunrise, sunset, ...
Once you are done with adjusting your configuration, make sure to copy the URL of your calendar
Download and install for your platform here: https://homebridge.io
I have it installed on my Synology NAS
Once installed, you should be able to access your homebridge via http://localhost:8581/Â
In the Plugins page search for "Homebridge Calendar Scheduler"
Give your calendar and name (it will show up as a sensor in Homekit, but we won't use it)
In the Calendar URL, paste the your calnedar URL you got from dsultan.com website
In the above screenshot, I could have just enabled "Trigger on any active events or only on disabled events" and the automation in homekit would have worked for any event in the calendar. But I wanted to have different Athan for every prayer call, so I have created an event for every prayer, below is an example of Fajr
Once done, save the plugin config and restart Homebridge. After the restart, Contact sensors should show up in your Home app.
Note: During my testing I enabled debug for this plugin, that helped my check when events where pulled from the calendar and which events/contact sensors where triggered.
In my setup, I have a room called Homebridge that has all homebridge virtual devices. After Homebridge restarts, I was all to see all the events i created in homebridge as contact sensors.
Next, i have created a custom scene for each prayer call, in the scene I have chosen the homepods I would like the athan to be played on. In the Media sectio, i chose Apple Music, searched for the Athan i would like for every prayer call and saved them.
Next, I created an automation for every prayer call, chose the respective contact sensor in the "When" section and selected "Opens". In "Select Accessories and Scenes..." I chose the respective scene. For example, for the Fajr prayers, I chose the Fajr contact sensor and Fajr Scene