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

Scene activating lights only in the evening or at night


Jaapdeknaap
 Share

Question

Hi all,

 

After a long time, i got it finally working. (my knowlegde go LUA is almost 0)

 

I would like that the lights only getting on when the house is in evening or night status.

 

Or maybe even better when also/or the LUX is getting below 60..

 

This code for updating my house state:

Please login or register to see this code.

Edited by T.Konopka
Topic moved from "Home Center - Xbmc"
Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

Hi Jaap, my knowledge of lua is even less than zero but from reading the code I understand I have to create a predefined variable with the values Morning, Day, Evening and Night. I did this now the script is running and it is 10:26 in the morning but the script keeps reporting [DEBUG] 10:26:01: Current time does not match any scenario.  Is there anything else I need to preconfigure?

Link to comment
Share on other sites

  • 0

Hi Jaap,

 

You can also do "if time between x and Y" then morning/afternoon/etc. You then know for sure it will always match, even if the HC2 is down for some time and you reboot the system. Example of the TimeOfDay script I use:

Please login or register to see this code.

Link to comment
Share on other sites

  • 0

Hi guys,

 

Instead of putting fixed times in your scripts or scenes, I would recommend to use the trigger Sunset & Sunrise (.. and, to set a state of presence, just use global variables).

That way you don't have to edit times every now and then because it automatically grabs data from a table on the web, plus, the global variable can be used as a condition for executing the scene / script.

 

Best regards,

Mark

Link to comment
Share on other sites

  • 0

Hi guys,

 

Instead of putting fixed times in your scripts or scenes, I would recommend to use the trigger Sunset & Sunrise (.. and, to set a state of presence, just use global variables).

That way you don't have to edit times every now and then because it automatically grabs data from a table on the web, plus, the global variable can be used as a condition for executing the scene / script.

 

Best regards,

Mark

 

Hi Mark,

 

It depends what the needs is for the scene off course, my scene was made 3 years ago and never changed since.

The scene of Jaap is already using Sunset and Sunrise, I only wanted to show that you can use between time x and y (also possible for Sunset/Sunrise off course, already somewhere on this forum), so that it also works if you made/save the script at 10:26 as Andor stated.

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.

 Share

×
×
  • Create New...