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


Question

Posted

Hi all,

 

Background information:

In my kitchen and corridor I have lights turned on- and off automatically during the evening and night through PIR sensors and some scripts (.. also between a certain time during the night the same lights will still go on and off automatically, but then dimmed to 30% which is more convenient for your eyes during the night).

These lights go on once I'm in the kitchen or corridor, but once there's no movement for 20 seconds then they will go out again.

 

So far this is working perfect and I don't encounter any issues.

 

However, right now (as days are getting shorter and it is getting dark earlier in the evening), I keep changing the script every few days because I feel my lights should turn on more earlier. The very same happens ofcourse in the morning too because it is getting lighter each day much earlier too, so I keep adjusting the script every few days because I want my lights to stay off earlier in the morning too.

 

Desired solution:

Instead of me adjusting the scripts manually every few days, I'd like to use the trigger "at sunrise" and "at sunset" which does the trick then automatically for me. I've tested these triggers with simple notifications to my smartphone (.. to check how stable it works and also to see how reliable it works) and I'm really fond of it because the result is very good.

 

In a normal case when my lights would turn on with a brightness level of let's say xx% at all time, I don't have any issue and implementing a block-scene with the above desired solution is done very easily. However, the tough part here is that I have several scripts to manage that the light goes on with a specific brightness value between certain times. So right now the situation in my kitchen and corridor is:

 

1.   lights go on at 18:30hrs, with brightness level of 70%, and are turned off once there's no movement for 20 seconds

2.   between 22:30hrs and 05:00hrs, the same lights go on but with brightness level of 30%, and are turned off once there's no movement for 20 seconds

3.   between 05:00hrs and 08:00hrs, the same lights go on again but with brightness level of 70% again, and are turned off once there's no movement for 20 seconds.

 

After 08:00hrs the lights don't go on automatically any longer.

 

I hope anyone could help me to achieve my desired solution. Under block-scenes it is not possible as you cannot set a trigger as "from sunset or sunrise till xx hours".

Unfortunately I am not an expert on LUA scripting so I haven't succeeded in getting a script that does what I need.

 

Thanks for anyone's help and support here.

 

Best regards,

Mark

7 answers to this question

Recommended Posts

  • 0
  • Inquirer
  • Posted

    I found a way to make it work with Global Variables, now it is working perfect and it no longer requires manual adjustments of the scripts at all 

    Please login or register to see this image.

    /emoticons/default_smile.png" alt=":)" srcset="https://forum.fibaro.com/uploads/emoticons/[email protected] 2x" width="20" height="20" />

     

    Fibaro HomeCenter2 is really a nice and flexible system.

    • 0
    Posted

    Yes, I also have done this with Global Variables. Working great!

    I have a "Sun" variable and a "time of day" variable. Depending on sunset/sunrise and time of day (morning/afternoon/evening/night) I turn on light at a specific level.

    • 0
    Posted

    Hello

    Can please someone show an example of scene for this?

    Regards

    Boris

    • Like 1
    • 0
    Posted

    You can search the forum here. There are enough examples

    • 0
  • Inquirer
  • Posted

    Hi Borismatris,

     

    Please see the attached picture, this scene is triggered at sunset.

     

    Basically when it is sunset and my global variable "thuis" ("home") is set to "Aanwezig" ("present") then it will close my curtains and turn on specific lights on the wall.

    I also get a notification on my mobile that curtains are closed and the respective lights are turned on.

     

    Hope this clarifies enough, else just let me know.

     

    Best regards,

    Mark

     

     

    Please login or register to see this attachment.

    • 0
    Posted

    Have you thought of using the PIR LUX reading as well ? Or maybe just a double check of time and lux .. ?

    ( assuming it is a fibaro ( good for spot readings or better for a general room an aeotec one )

     

    So along the lines of High Lux then high light if required, low lux low light @ 10%, medium lux then 30% light or whatever works for you, then the time of day doesn't matter quite as much.

     

    Cheers,

    al.

    • 0
  • Inquirer
  • Posted

    Hi Al,

     

    It will work with PIR LUX reading as well ofcourse, but in order to have a very accurate and frequent reading you must change the settings of the PIR (.. increasing sensitivity and increasing the communication back to the HC2). As a result the battery lifetime is much shorter, so this is why I've decided to use Sunset and Sunrise as the triggers (.. at Sunrise my lights won't go automatically on any longer).

     

    I can recommend everyone to do it this way because it works really perfect and reliable

    Please login or register to see this image.

    /emoticons/default_smile.png" alt=":)" srcset="https://forum.fibaro.com/uploads/emoticons/[email protected] 2x" width="20" height="20" />

     

    Best regards,

    Mark

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