Skip to content
This an extension for the [MagicMirror](https://github.com/MichMich/MagicMirror). It will display prayer time (in local time).
JavaScript CSS
Branch: master
Clone or download
slametps Merge pull request #23 from webac/contribution
Added new variable "methodSettings" & french translation
Latest commit 9253780 Aug 13, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
res long version of tarhim imsak May 18, 2018
translations
.gitattributes
.gitignore update ignore list Mar 13, 2017
CHANGELOG.md add new option showTomorrow Apr 16, 2019
LICENSE initial release Mar 20, 2017
MMM-PrayerTime.css Fixing AM/PM style issue Nov 1, 2018
MMM-PrayerTime.js French translation Aug 11, 2019
README.md add new option showTomorrow Apr 16, 2019
node_helper.js add custom sound for IMSAK May 17, 2018
screenshot-alert.png resize screenshot Mar 20, 2017
screenshot-telegram.png resize Nov 15, 2017
screenshot.png initial release Mar 11, 2017
screenshot2.jpg resize screenshot Mar 20, 2017

README.md

MMM-PrayerTime GitHub license

This an extension for the MagicMirror2. It will display prayer time (in local time) and also recite Adzan/Adhan. Your mirror will be your helpful assistant to do sholat on time.

Screenshot

Screenshot Screenshot Screenshot Screenshot

Installation

  1. Navigate into your MagicMirror's modules folder
  2. execute git clone https://github.com/slametps/MMM-PrayerTime.git
  3. if this module does not run correctly, try npm install async

Using the module

To use this module, add it to the modules array in the config/config.js file:

modules: [
	{
		module: 'MMM-PrayerTime',
		position: 'top_left',	// This can be any of the regions. Best result is in the top_left/top_right.
		config: {
			apiVersion: '1.0', // please, leave unchanged. reserved for future use.
			lat: false, // latitude of your position (city)
			lon: false, // longitude of your position (city)
			timezone: false, // please refer to http://php.net/manual/en/timezones.php
			timeFormat: 24,
			method: 5,
			playAdzan: ['fajr', 'dhuhr', 'asr', 'maghrib', 'isha'],
			notDisplayed: ['midnight', 'sunset'],
			useUpdateInterval: true,
			updateInterval: 86400 * 1000, // How often do you want to fetch new praying time? (milliseconds)
			animationSpeed: 2.5 * 1000, // Speed of the update animation. (milliseconds)
			language: config.language,
			showAdzanAlert: true,
			showTomorrow: true,
			alertTimer: 15000
		}
	}
]

Configuration options

The following properties can be configured:

Option Description
apiVersion 1.0 (reserved for future use)
lat
REQUIRED
latitute of your position (city)
You can use google maps to get this info
Default value: false
lon
REQUIRED
longitude of your position (city)
You can use google maps to get this info
Default value: false
timezone
REQUIRED
Local timezone.
Possible values: refer to http://php.net/manual/en/timezones.php
Default value: true
timeFormat 12/24 time-format.
Possible values: 12, 24
Default value: config.timeFormat or 24
method
REQUIRED
method to identify various schools of thought about how to compute the timings
Possible values: 0-7 (0-Shia Ithna-Ashari, 1-University of Islamic Sciences,Karachi, 2-Islamic Society of North America (ISNA), 3-Muslim World League/MWL, 4-Umm al-Qura,Makkah, 5-Egyptian General Authority of Survey, 7-Institute of Geophysics, University of Tehran)
Default value: 5
playAdzan List/array of the prayer time name to play Adzan.
Possible values: ['fajr', 'dhuhr', 'asr', 'maghrib', 'isha', 'imsak', 'sunrise', 'sunset', 'midnight']
Default value: ['fajr', 'dhuhr', 'asr', 'maghrib', 'isha']
notDisplayed List/array of the prayer time name not to be displayed.
Possible values: ['fajr', 'dhuhr', 'asr', 'maghrib', 'isha', 'imsak', 'sunrise', 'sunset', 'midnight']
Default value: ['midnight', 'sunset']
useUpdateInterval Using internal update interval or triggered by MMM-ModuleScheduler to fetch and update new praying time? if false, add new schedule entry in MMM-ModuleScheduler:
{notification: 'PRAYER_TIME', schedule: '1 0 * * *', payload: {type: 'UPDATE_PRAYINGTIME'}}
Possible values: true, false
Default value: true
updateInterval How often to fetch new praying time? (milliseconds)
Default value: 86400000 (1 day)
animationSpeed Speed of the update animation. (milliseconds)

Possible values:0 - 5000
Default value: 2500 (2.5 seconds)
language module language. Can be different from MM.
Default value: config.language or 'en'
showAdzanAlert Display alert when enterigng praying time?
Possible values: true, false
Default value: true
showTomorrow Display tomorrow praying time?
Possible values: true, false
Default value: true
alertTimer How long alert will be displayed? (milliseconds)

Possible values:0 - 60000
Default value: 15000 (15 seconds)

Dependencies

The MIT License (MIT)

Copyright © 2016-2017 Slamet PS

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

The software is provided “as is”, without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software.

You can’t perform that action at this time.