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 to I use lights with different dim levels depending on sunset / sunrise?


EJH59

Question

I'd like a scene which make my lights more dimmed when it's dark outside (e.g. 30 minutes after sunset), how do I do that in a scene?

Link to comment
Share on other sites

12 answers to this question

Recommended Posts

  • 0

@EJH59 You can try with a scenario scene. Go to settings > scenes > add scene > scenarios > light scenarios. Not every dimmer supports level settings. 

Link to comment
Share on other sites

  • 0
  • Inquirer
  • Thanks, for starters, there's a translation error in the Dutch setup. In the "When" of the light scenario, I see the option "Volgens zonsopgang", the last word is Dutch for sunRISE. If I switch to "US English" (as I was confused), I read "According to sunset", and that makes more sense...

     

    Anyway, the scenario that is built is automated and triggered by time, I apologize for not having explained better but what I'm looking for is a scene that I trigger (via a switch) and then depending on the time of day (or better: how dark it is outside, so related to some time between sunset and sunrise) my lights should be more dimmed (@night) or less dimmed (@daytime). 

    Link to comment
    Share on other sites

    • 0

    @EJH59 So you would need a brigtness sensor mounted outside. Battery powered sensors are reporting the brigthness to rarely. If you set up them to report more often, this will drain the battery quickly. 

    I recommend the aeotec multisensor 6 with power supply. It needs to be mounted under a shelter / roof when outside, since it isn't designed for that use case. 

    Edited by Fabir
    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • Sorry, no it can be simpler than that, that's why I need sunrise and sunset. I can set that it's 'dark' e.g. between 30 min after sunset and 30 min before sunrise. I did that in the past with another system without any problems (for the Dutch: "Klik aan Klik uit").

    So e.g. when I switch on the light between these times (so when it's dark), it should be dimmed. When I switch it on outside these times it should be brighter.

    Link to comment
    Share on other sites

    • 0

    You'll need a couple of scenes and a global variable for this. Start by creating a global variable called IsDark. Then create a simple block scene that is triggered by sunset (or sunset -30 minutes etc), and which sets IsDark to the value 1. Do the same for sunrise, creating a scene that sets it to 0. Now your HC3 knows whether it is dark outside or not, based on the inbuilt sunrise/set routine. You can use this knowledge in multiple scenes.

     

    Then, create a lighting scene that is activated by a button press on your Dimmer2. This scene checks the value of IsDark and sets the dimmer level accordingly. This might need to be an LUA scene but you can start with a block scene and convert it to LUA.

     

    Lastly you'll need a scene that is triggered at sunset to check if the lights are on, and if they are, then dim them. Do the same for sunrise. If you are handy with code, you can combine all these small scenes into one larger LUA scene, but multiple smaller scenes will work just fine too.

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • Thanks, I can follow but two questions:

     

    (1) I created the variable and I can make a scene with the sunset condition but how do I change a variable name in a block scene? All I see is Weather, Time, Device, User, Scene, Notification, Panel and Energy. None of these seem to allow me to change the value of a global variable...

     

    (2) What is a LUA scene and why are you suggesting I might need that?

    Link to comment
    Share on other sites

    • 0
    11 hours ago, EJH59 said:

    (1) I created the variable and I can make a scene with the sunset condition but how do I change a variable name in a block scene? All I see is Weather, Time, Device, User, Scene, Notification, Panel and Energy. None of these seem to allow me to change the value of a global variable...

     

    In "Panel" you wil find "Variables"

     

    11 hours ago, EJH59 said:

    (2) What is a LUA scene and why are you suggesting I might need that?

     

    There are 3 kinds of scenes:

     

    Please login or register to see this image.

    /monthly_2023_11/image.png.6bce39ff5a0861bf44425f71e9939cf6.png" />

     

    In the LUA Scene you have to code the Conditions/Triggers and Actions. There is a way to learn or make a quick start with a Lua scene. You can make a blockscene and convert it with one click of a button to a Lua scene. 

     

     

     

     

     

    Edited by SmartHomeEddy
    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • This is very helpful, I'm learning but hopefully you can guide me a bit more.

     

    Here's what I have now:

    Please login or register to see this image.

    /monthly_2023_11/image.png.386d99e1af9fd84c5985025c12cf39d4.png" />

     

    I'm checking if the "Night" variable ("IsNacht") is set to 1 AND I'm using the switch. Then I do three actions... are these all correct and in the right order?

    (A1) I'm thinking that if I set the brightness (to 23% here), the LED will switch on already...? Or should I indeed turn the LED on in the second action-step?

    (A2) And, if that is true, wouldn't it be more logical to also set the color BEFORE I switch the LED on (so swap the 2nd and 3rd action)?

     

    (A3) And do I need another scene now for the scenario where my variable is "0" (and I want the LED less dimmed), or can I include that somehow in this scene?

    (A4) Could I make a global variable for the brightness and use that or is this the only way.

     

    Note that I understand that with LUA, I can program things. I will step into that later when I've learned the basics (and any tutorial / reference information on that would be appreciated as well).

    Link to comment
    Share on other sites

    • 0

    You could try things out and see if it works the way you want it to work. You can change the variable and start the scene manually and see what happens. 
     

    If it works it ain't stupid 😁

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • Thanks, I'll start experimenting if I get the basics but I'm still somewhat stuck as my problems (questions) A1 - A4 are still unclear to me. Also, how to I read and/or change the value of a variable manually?

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