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

LUA : Night / Day


AlexPeret

Question

Hello to all,

Is there a function in LUA to have night and day state ?

I'm looking for something like :

Please login or register to see this code.

Thanks for your help.

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0
  • Inquirer
  • Mmm that sound great, but... it seems to work for HC2 not HC 3 ? How can I update this scripts for HC 3 ?

    Link to comment
    Share on other sites

    • 0

    Hi,

     

    Yes, it is for HC2.

     

    It was developed by Zoran. We'll have to wait for him to update it.

    But he's out on business now and he's unlikely to be able to do that for a few months.

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • I've wrote a QA to get sunrise/sunset times request from 

    Please login or register to see this link.

     but it's terribly... useless.

    I realise, I just need :

    • a global variable defined in General > Variable (Enumerated variable with "day" and "night")
    • a blocky scene (triggered on "Time > sunset ") that change the previous variable to "night"
    • a blocky scene (triggered on "Time > sunrise") that change the previous variable to "day"

    And I got my variable with the current state ... soooooo simple ?

    Link to comment
    Share on other sites

    • 0

    I had the same need just a few days ago. I did exactly the same as you: new global variable plus 2 block scenes. Simple and works great!

    Link to comment
    Share on other sites

    • 0

    Also, if you want to create a Lua scene that does some time scheduling - like setting time of day variables etc you can build on this example:

     

    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...