Muslim Prayer Times

This flow lets you get muslim prayer times on the Dashbord, plus some other interesting times. Position is GOT as per your internet IP. If you use a Proxy or VPN, data will be false.

Nedded:

  1. Node-Red-Dashboard should be installed.

This flow is exploring https://aladhan.com & http://ip-api.com/json free APIs.

[{"id":"2f09e671.3fa27a","type":"inject","z":"6e509eba.845f6","name":"","topic":"","payload":"1","payloadType":"num","repeat":"3600","crontab":"","once":true,"onceDelay":"","x":101,"y":120,"wires":[["6dfe61e.62e6da"]]},{"id":"c8f0949e.c73fc8","type":"http request","z":"6e509eba.845f6","name":"Prayer Times","method":"GET","ret":"obj","url":"","tls":"","x":591,"y":120,"wires":[["a4220df5.4814b","c88c20fb.85f25","d6657928.6e34d8","950fdb0.170e828","88839798.b33e18","61324e42.33b73","bc4bf83f.4360c8","397d215a.a2bdce","2bacd763.0305d8","135dc37c.fc048d","968418a8.678a68"]]},{"id":"a4220df5.4814b","type":"debug","z":"6e509eba.845f6","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","x":911,"y":120,"wires":[]},{"id":"c88c20fb.85f25","type":"ui_text","z":"6e509eba.845f6","group":"40d45c48.fc58f4","order":2,"width":0,"height":0,"name":"","label":"Fajr","format":"{{msg.payload.data.timings.Fajr}}","layout":"row-spread","x":911,"y":260,"wires":[]},{"id":"d6657928.6e34d8","type":"ui_text","z":"6e509eba.845f6","group":"40d45c48.fc58f4","order":3,"width":0,"height":0,"name":"","label":"Sunrise","format":"{{msg.payload.data.timings.Sunrise}}","layout":"row-spread","x":921,"y":300,"wires":[]},{"id":"950fdb0.170e828","type":"ui_text","z":"6e509eba.845f6","group":"40d45c48.fc58f4","order":4,"width":0,"height":0,"name":"","label":"Dhuhr","format":"{{msg.payload.data.timings.Dhuhr}}","layout":"row-spread","x":911,"y":340,"wires":[]},{"id":"88839798.b33e18","type":"ui_text","z":"6e509eba.845f6","group":"40d45c48.fc58f4","order":5,"width":0,"height":0,"name":"","label":"Asr","format":"{{msg.payload.data.timings.Asr}}","layout":"row-spread","x":911,"y":380,"wires":[]},{"id":"61324e42.33b73","type":"ui_text","z":"6e509eba.845f6","group":"40d45c48.fc58f4","order":6,"width":0,"height":0,"name":"","label":"Maghrib & Iftar","format":"{{msg.payload.data.timings.Maghrib}}","layout":"row-spread","x":941,"y":420,"wires":[]},{"id":"135dc37c.fc048d","type":"ui_text","z":"6e509eba.845f6","group":"40d45c48.fc58f4","order":7,"width":0,"height":0,"name":"","label":"Isha","format":"{{msg.payload.data.timings.Isha}}","layout":"row-spread","x":911,"y":460,"wires":[]},{"id":"bc4bf83f.4360c8","type":"ui_text","z":"6e509eba.845f6","group":"c0267078.02e44","order":2,"width":0,"height":0,"name":"","label":"Imsak","format":"{{msg.payload.data.timings.Imsak}}","layout":"row-spread","x":911,"y":220,"wires":[]},{"id":"2bacd763.0305d8","type":"ui_text","z":"6e509eba.845f6","group":"c0267078.02e44","order":1,"width":0,"height":0,"name":"","label":"Midnight","format":"{{msg.payload.data.timings.Midnight}}","layout":"row-spread","x":921,"y":500,"wires":[]},{"id":"397d215a.a2bdce","type":"ui_text","z":"6e509eba.845f6","group":"a0647b57.fedc08","order":1,"width":0,"height":0,"name":"","label":"Date","format":"{{msg.payload.data.date.readable}}","layout":"row-spread","x":911,"y":180,"wires":[]},{"id":"67acda1.1c91424","type":"comment","z":"6e509eba.845f6","name":"APIs","info":"https://aladhan.com/prayer-times-api#GetCalendarByCitys\nhttp://ip-api.com/json","x":80.5,"y":56.99999809265137,"wires":[]},{"id":"6dfe61e.62e6da","type":"http request","z":"6e509eba.845f6","name":"Get Position","method":"GET","ret":"obj","url":"http://ip-api.com/json","tls":"","x":261,"y":120,"wires":[["72317032.d5b49","4d9b961b.7f6bf8","14d09063.69d3c","98281914.32d288","15b1ad34.7cb8e3","bc845b7b.5d8eb8"]]},{"id":"72317032.d5b49","type":"function","z":"6e509eba.845f6","name":"","func":"var url= \"http://api.aladhan.com/timingsByCity?city=\" + msg.payload.city + \"&country=\" + msg.payload.country + \"&method=3\";\nmsg.url = url;\n\nreturn msg;","outputs":1,"noerr":0,"x":421,"y":120,"wires":[["c8f0949e.c73fc8"]]},{"id":"4d9b961b.7f6bf8","type":"debug","z":"6e509eba.845f6","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","x":490,"y":320,"wires":[]},{"id":"14d09063.69d3c","type":"ui_text","z":"6e509eba.845f6","group":"a0647b57.fedc08","order":2,"width":0,"height":0,"name":"","label":"Country","format":"{{msg.payload.city}} - {{msg.payload.country}}","layout":"row-spread","x":501,"y":380,"wires":[]},{"id":"98281914.32d288","type":"ui_text","z":"6e509eba.845f6","group":"a0647b57.fedc08","order":3,"width":0,"height":0,"name":"","label":"Region","format":"{{msg.payload.regionName}} ({{msg.payload.region}})","layout":"row-spread","x":501,"y":420,"wires":[]},{"id":"15b1ad34.7cb8e3","type":"ui_text","z":"6e509eba.845f6","group":"a0647b57.fedc08","order":4,"width":0,"height":0,"name":"","label":"ISP","format":"{{msg.payload.isp}}","layout":"row-spread","x":491,"y":460,"wires":[]},{"id":"bc845b7b.5d8eb8","type":"ui_text","z":"6e509eba.845f6","group":"a0647b57.fedc08","order":5,"width":0,"height":0,"name":"","label":"IP","format":"{{msg.payload.query}}","layout":"row-spread","x":491,"y":500,"wires":[]},{"id":"968418a8.678a68","type":"ui_text","z":"6e509eba.845f6","group":"40d45c48.fc58f4","order":1,"width":0,"height":0,"name":"","label":"Methode","format":"{{msg.payload.data.meta.method.name}}","layout":"row-spread","x":921,"y":540,"wires":[]},{"id":"40d45c48.fc58f4","type":"ui_group","z":"","name":"Prayer Times","tab":"a0a71fdc.c283d","order":3,"disp":true,"width":"6","collapse":false},{"id":"c0267078.02e44","type":"ui_group","z":"","name":"Sunna","tab":"a0a71fdc.c283d","order":4,"disp":true,"width":"6","collapse":false},{"id":"a0647b57.fedc08","type":"ui_group","z":"","name":"Position","tab":"a0a71fdc.c283d","order":1,"disp":true,"width":"6","collapse":false},{"id":"a0a71fdc.c283d","type":"ui_tab","z":"","name":"Prayer Times","icon":"dashboard"}]
aitalinassim

Flow Info

created 9 months ago
updated 8 months, 3 weeks ago

Node Types

Core
  • comment (x1)
  • debug (x2)
  • function (x1)
  • http request (x2)
  • inject (x1)
Other
  • ui_group (x3)
  • ui_tab (x1)
  • ui_text (x14)

Tags

  • Muslim
  • Prayer
  • Pray
  • Times
  • Time
  • Fajr
  • Dhuhr
  • Asr
  • Maghrib
  • Isha
  • Midnight
  • Sunset
  • Imsak
  • heure
  • horaire
  • prière
Copy this flow JSON to your clipboard and then import into Node-RED using the Import From > Clipboard (Ctrl-I) menu option