Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


  • 0

Prayer times and HC2


Smartelite

Question

Hello guys,

 

My plan is to activate a scene when it is the prayer time.

The issue is that this time is changing during the year. So everyday it is something.

 

I found an API which responses with a table with the prayer time

 

Please login or register to see this link.

 

I dont know how to integrate it to HC2

 

Will you help me?

Link to comment
Share on other sites

12 answers to this question

Recommended Posts

  • 1

Create VD and copy code below to main loop

Create global predefined variable  naming  pTable.

Please change sceneID to your real scene ID you want to execute.

Please login or register to see this code.

That's the basic idea to use API and Json table, but you can change it as you wish.

Link to comment
Share on other sites

  • 1
On 6/15/2016 at 7:37 AM, cag014 said:

Create VD and copy code below to main loop

Create global predefined variable  naming  pTable.

Please change sceneID to your real scene ID you want to execute.

Please login or register to see this code.

That's the basic idea to use API and Json table, but you can change it as you wish.

Good work , thanks for help but there any possible to get something like that to HCL  

Thanks in advance

Edited by Abdalrhman
Link to comment
Share on other sites

  • 0
  • Inquirer
  • THANKS A LOT!!!

     

    Will test and ill let you know if any inquires !!!

     

    Appreciate your help

    Link to comment
    Share on other sites

    • 0

    There is no possibility to write LUA on HCL and there is no way to do it with block scenes.

    Sorry

    Link to comment
    Share on other sites

    • 0
    On 11/23/2018 at 7:52 PM, cag014 said:

    There is no possibility to write LUA on HCL and there is no way to do it with block scenes.

    Sorry

    I finally get HC2 and I am trying to test this script but I got this error in attached picture .

     

    Thanks in advance

     

    Please login or register to see this attachment.

    Link to comment
    Share on other sites

    • 0

    Please login or register to see this code.

    The problem is with global variable definition... but to solve it and make it simple please use code above. No global variable required

    This code will get prayer times every two minutes and will run your scene accordingly to prayer time.

    Link to comment
    Share on other sites

    • 0
    On 8/26/2019 at 5:33 PM, cag014 said:

    Please login or register to see this code.

    The problem is with global variable definition... but to solve it and make it simple please use code above. No global variable required

    This code will get prayer times every two minutes and will run your scene accordingly to prayer time.

     

    Can you explain to me how to make it work, i have added a new VD and pasted the code in the main loop and changed the scene id to AZAN to work what else need to be done to. as nothing works yet. also regarding the VD do i need to put any ip to port? or what scene should be their?

    Please login or register to see this attachment.

    Please login or register to see this attachment.

    Link to comment
    Share on other sites

    • 0

    i have created my own Prayer Time VD for HC2 and QA for HC3

    it uses your own set times and all calculations are done based on offset times which you decide and a fixed time for Zuhr.

    i will create a video shortly and upload to my channel.

    you would also need sonos speakers to be able to listen to the Azan.

    Link to comment
    Share on other sites

    • 0
    5 hours ago, fawzy said:

     

    Can you explain to me how to make it work, i have added a new VD and pasted the code in the main loop and changed the scene id to AZAN to work what else need to be done to. as nothing works yet. also regarding the VD do i need to put any ip to port? or what scene should be their?

     

     

    Looks like this site not free anymore and you need to use API Key...

    see

    Please login or register to see this link.

     

     

     

     

    Edited by cag014
    Link to comment
    Share on other sites

    • 0

    Hi

    i found that these sites only catered for the capital city of the country and so therefore i a have been using my own verison of prayertime which is auto adjusting on a daily basis basedon sunrise and sunset times. Zuhr prayer is an offset of a fixed time. With this a VD or QA is used to do minor tweaks if needed.

     

    See videos and all associated files which are downloadable from my channel here:

     

    HC2

     

     

     

    HC3

     

     

    Link to comment
    Share on other sites

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Answer this question...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

    ×
    ×
    • Create New...