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

How include two if's?


RStolpe

Question

Hi,
I have the Home Center Lite and I want to make a scene when my lights are turning on at 06:00 if the sun are down - I can't find out how to do it.
I can make it turn on at 06 but I can't find out how to include the if the sun are down.

 

Also I want one more scene where the light are turning on 30min before the sun goes down that I know how to do, but I want to include the rule that it's limited between 07:00 - 22:00

Edited by RStolpe
Link to comment
Share on other sites

17 answers to this question

Recommended Posts

  • 0

Make a variable. And create a scene that change the variable at 07:00 and 22:00

Edited by kevin
Link to comment
Share on other sites

  • 0
  • Inquirer
  • 2 hours ago, kevin said:

    Make a variable. And create a scene that change the variable at 07:00 and 22:00

     

    I don't understand, how do I create the variable?

    I want the scene to start every morning at 06:00 and if the sun is down I want to Lights to turn on.

     

    And also when the sun goes down if the time is between 07:00 and 22:00 the Lights turns on.

     

    I don't think this one is going to work, the variable "test" is set at a value of 06:05 so what I want it to do is 60min before sunset if it's between 06:05 and 21:55 the lights will turn on.

    Please login or register to see this image.

    /monthly_2019_01/image.png.99844ba733afabbc2d1ecb0880111caf.png" alt="image.png.99844ba733afabbc2d1ecb0880111caf.png" />

     

    Simple if should look something like.

    IF sunset AND TIME=06:05-22:05 THEN turn on lights.

    Edited by RStolpe
    Link to comment
    Share on other sites

    • 0

    What do you mean with the sun goes down between 07:00 in the morning and 22:00 in the evening. There is one sunrise in the morgen and one subset in the evening.

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • 5 minutes ago, kevin said:

    What do you mean with the sun goes down between 07:00 in the morning and 22:00 in the evening. There is one sunrise in the morgen and one subset in the evening.

    Yes I know that, but as I live in Sweden we do have the sunset and sunrise at different times and some times at the summer we never have a sunset.
    So you see my issue here, sometime the sun goes down at 01:00 and I'm awake between 06:05 in the morning and 22:00 at the evening so if the sunset is after 22:00 I don't want the lights to turn on.

    Link to comment
    Share on other sites

    • 0

    Understood. I can't write LUA code so I show you with block scenes

     

    First create a predefined variable. You can do that in the panels sections.

    I have created the following variable.

    Please login or register to see this attachment.

     

     

    Now make a scene that changes the value of the variable. This scene changes every day of the week at 06:00 the variable value to after 06:00.

    Please login or register to see this attachment.

     

     

    Now make the scene to turn the lights on. 

    Please login or register to see this attachment.

     

     

    You can create a new scene that changes the variable everyday after 22:00 to variable value after 22:00

     

     

     

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • 3 hours ago, kevin said:

    Understood. I can't write LUA code so I show you with block scenes

     

    First create a predefined variable. You can do that in the panels sections.

    I have created the following variable.

    Please login or register to see this attachment.

     

     

    Now make a scene that changes the value of the variable. This scene changes every day of the week at 06:00 the variable value to after 06:00.

    Please login or register to see this attachment.

     

     

    Now make the scene to turn the lights on. 

    Please login or register to see this attachment.

     

     

    You can create a new scene that changes the variable everyday after 22:00 to variable value after 22:00

     

     

     

     

    Thanks, but how can I make it as a rule that if it's before 22:00 and it's sunset then the lights should turn on?

    Link to comment
    Share on other sites

    • 0

    The same as the last screenshot in my previous post, only change sunrise in sunset.

     

    maybe you also want so create a scene

    if variable is after 22:00 and sunset then lights off. Before you can do this you need a scene that change the variable from after 06:00 to after 22:00. Just like the second screenshot in in previous post.

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • 13 hours ago, kevin said:

    maybe you also want so create a scene

    if variable is after 22:00 and sunset then lights off. Before you can do this you need a scene that change the variable from after 06:00 to after 22:00. Just like the second screenshot in in previous post.

     

    I have this one now, and it seem to work good or do I miss something?

    Please login or register to see this image.

    /monthly_2019_01/image.png.8b802cd3788ab618c403b7f676df8656.png" />

    13 hours ago, kevin said:

    The same as the last screenshot in my previous post, only change sunrise in sunset.

     

    maybe you also want so create a scene

    if variable is after 22:00 and sunset then lights off. Before you can do this you need a scene that change the variable from after 06:00 to after 22:00. Just like the second screenshot in in previous post.

     

     

    Ok, so now according to the screen shots down below my lights are turning on if the time is before 21:58 and the sun is down?

     

    image.png.be2be55379ade8e1aa9d8bda72c304e0.png

     

     

    Please login or register to see this attachment.

     

     

    Edited by RStolpe
    Link to comment
    Share on other sites

    • 0

    That doesnt’t work. At 21:58 you change the variable to before 21:58, that time is already past. You don’t need a variable before 21:58.

    Before 21:58 is the same as after 06:00

     

     

    This is what you need.

     

    1. A scene that changes every day of the week the variable at 06:00 to value after 06:00

    2. A scene that changes every day of the week the variable at 22:00 to value after 22:00

     

    In the last screenshot you have provided you need to change the variable to after 06:00

     

     

    It should work. You just need to play with scenes to get understand it better.  Sometimes it's better to first write down the scene on paper, after that you make it in Fibaro.

     

    Edited by kevin
    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • 56 minutes ago, kevin said:

    That doesnt’t work. At 21:58 you change the variable to before 21:58, that time is already past. You don’t need a variable before 21:58.

     Before 21:58 is the same as after 06:00

     

     

    This is what you need.

     

    1. A scene that changes every day of the week the variable at 06:00 to value after 06:00

    2. A scene that changes every day of the week the variable at 22:00 to value after 22:00

     

    In the last screenshot you have provided you need to change the variable to after 06:00

     

     

    It should work. You just need to play with scenes to get understand it better.  Sometimes it's better to first write down the scene on paper, after that you make it in Fibaro.

     

    Ok, so with this sceen I don't understand how it knows if the clock is after 22:00? Because after 22:00 the sceen should not run because sometimes the sun in Sweden can go down after 22:00.

     

    Please login or register to see this image.

    /monthly_2019_01/image.png.8f5dac09e5c580c910f9431823ba836d.png" alt="image.png.8f5dac09e5c580c910f9431823ba836d.png" />

     

    image.png.c636ae4d99c0ed3147346ddd7eea1df8.png

    Link to comment
    Share on other sites

    • 0

    When the variable changes at 22:00 to after 22:00 then the other scene about turning the lights on after 06:00 can't start because the one of the 2 AND is not correct. The turn on lights scene can only start is variable is after 06:00 (that happens at 06:00) AND xx before sunset is xx.

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • 6 hours ago, kevin said:

    When the variable changes at 22:00 to after 22:00 then the other scene about turning the lights on after 06:00 can't start because the one of the 2 AND is not correct. The turn on lights scene can only start is variable is after 06:00 (that happens at 06:00) AND xx before sunset is xx.

     

    AA, Now I think I understand, so this sceens should work correct?

     

    Please login or register to see this image.

    /monthly_2019_01/image.png.676d094f0349f9f1cbb2e49589dd0887.png" alt="image.png.676d094f0349f9f1cbb2e49589dd0887.png" />

    Link to comment
    Share on other sites

    • 0

    Variable are now useless, because you now exactly say, I doesn’t matter what the time is, but if it’s 60minutes before sunset turn lights on

    Maybe it’s better to explain one more time what tou want.

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • 3 hours ago, kevin said:

    Variable are now useless, because you now exactly say, I doesn’t matter what the time is, but if it’s 60minutes before sunset turn lights on

    Maybe it’s better to explain one more time what tou want.

    So I should make it in the other order? Like this?

     

    What I want this to do is, if the time is between 06:02 and 22:00 and if the sun goes down or if the sun already are down during this time I want the lights to turn on 60min before the sunset.

     

    Please login or register to see this image.

    /monthly_2019_01/image.png.648fdedca157d0efdb41ae91716fea12.png" />

    Edited by RStolpe
    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • 1 minute ago, kevin said:

    And at 22:00 you want the lights to turn off?

     

    I have an other scene for that

    Link to comment
    Share on other sites

    • 0

    This is what you need.

     

    1. A scene that changes the variable at 06:02 to value after 06:02

    2. A scene that changes the variable at 22:00 to value after 22:00

    3. Scene in screenshot below

    Please login or register to see this image.

    /monthly_2019_01/image.png.676d094f0349f9f1cbb2e49589dd0887.png.6231e4b3cc790f03636c21acea02ecb0.png" alt="image.png.676d094f0349f9f1cbb2e49589dd0887.png.6231e4b3cc790f03636c21acea02ecb0.png" />

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