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


  • 3

[SCENE] Main scene FTBE v1.3.4


Sankotronic

Question

Main scene FTBE v 1.3.4

 

Hello everyone!

 

NEW version is OUT!

 

More about scene and download you can find here:

 

WHAT'S NEW:

 

  • Main scene FTBE 1.3.4 - changed function for time of day calculation and added use of SleepState global to set time of day to morning when Awake  regardless of current time
  • Main scene FTBE 1.3.0 - cleaned some bugs, added some more checks to prevent scene from stop running due to errors. Optimized and compacted code, removed unnecessary comments. DemoMode only stops changing timers while user code and scheduled events will continue to execute. Darkness can now be changed by measured lux level or global variable that is set to lux value measured by light measuring devices placed outside. Scene is now running on setTimeout function instead on sleep for better timing and also aligns to 0 seconds or exact minute.
  • Sunrise & Sunset VD v1.4.0 - Modified main loop code to better handle global variables. Variables are now automatically repaired and are not reset to default settings after HC2 reboot. Added variable SunriseIcon to store VD icon ID and now when main icon for VD is set also all button icons are set automatically.
  • Home Status VD v1.1 - Added variable HomeStatIcon to store VD icon ID and now when main icon for VD is set also all button icons are set automatically. Added label that shows most important values on VD when closed.
  • Home Timers VD v1.1 - Added variable HomeTimersIcon to store VD icon ID and now when main icon for VD is set also all button icons are set automatically. Added label that shows most important values on VD when closed.

 

 

Please login or register to see this attachment.

 

 

NOTE - This version is compatible with previous versions so need to do any changes in your current code of other scenes and VD's.

 

REQUEST - If you like my work and found it useful please give me support by rating and writing short review. Thank you! :-)

 

PS

Dear friends from Slovakia you can find this scene and VD translated to your language here: 

Please login or register to see this link.

 

 

Edited by Sankotronic
Updated to new version
  • Like 17
  • Thanks 6
Link to comment
Share on other sites

Recommended Posts

  • 0
  • Inquirer
  • Hi @ErnstH ,

     

    Name for scene in settings is to easier identify what scene was run in debug window so, in case of any problems for easier debugging.

    It has no other role whatsoever. :-) 

    Link to comment
    Share on other sites

    • 0

    Thanks. I already thought and hoped so, for that text and the referred name were different

    Link to comment
    Share on other sites

    • 0

    About users, another question.

    Is there a scene to find out if all users are at home or not, defined by proximity (GPS)?

    I couldn't find it.

    Edited by ErnstH
    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • On 1/26/2021 at 11:12 AM, RubberDuck1983 said:

    Where are the Sunrise pngs? For the VDs? ( the Sun with the arrow ) ?

     

    Try here:

     

    Link to comment
    Share on other sites

    • 0

    Thanks @Sankotronic

     

    One more Question. Can I make a fix Sunrise and Sunset Time? Because for my Kids it would be good when the Day starts at the same hour for example. Because in the summer time the Sunrise will be at 05:00 am and the Day i can set maximal +59 Minutes thats to early :-)


    Thanks for your help

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • Hi @RubberDuck1983,

     

    Difference to the sunrise can be set max. to +/- 59 min, but time to day can be set to 06:59 which means that if morning starts at 05:00 then day can start 11:59.

     

    Still it is possible to force morning (sunrise) to start at fixed time and how I explained here:

     

    Link to comment
    Share on other sites

    • 0
    10 minutes ago, Sankotronic said:

    Hi @RubberDuck1983,

     

    Difference to the sunrise can be set max. to +/- 59 min, but time to day can be set to 06:59 which means that if morning starts at 05:00 then day can start 11:59.

     

    Still it is possible to force morning (sunrise) to start at fixed time and how I explained here:

     

    Okay one more Question, sorry:

     

    The Time between Sunrise and Day is "morning" right? 

     

    So when the Sunrise is at 05:00 and the Day starts for example at 8. The Time Between 5:00 - 08:00 would be the Morning and so the Lights there would be turn on, wenn the House is not set on "sleep"?

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • 18 minutes ago, RubberDuck1983 said:

    The Time between Sunrise and Day is "morning" right? 

     

    Sunrise is actually time when night changes to morning. If sunrise is at 7:10 and difference is set to 0 min then that is the time when morning starts.

     

    Below sunrise setting is sunset setting on Sunrise & Sunset VD. Sunset is time when day changes to evening. Same as for sunrise (morning) it is possible to change when it will start with +/- 59 minutes difference.

     

    Below sunset is day settings where user can setup how long morning will last before it changes to day and duration of the morning can be set from 00:00 to 06:59. If set to 00:00 then there will be no morning time, but day time will start.

     

    Last time of day setting is for evening time duration or when night will start. So it is like this:

     

    sunrise +/- difference -> time when morning starts

    sunrise +/- difference + time of day -> time when day starts

    sunset +/- difference -> time when evening starts

    sunset +/- difference + time to night -> time when night starts.

     

    Since many users asked for fixed times and also to set time to morning when wake up is before sunrise UHAS version of Sunrise & Sunset VD has more settings as on the picture below:

    Please login or register to see this spoiler.

     

    From above picture:

    morning starts at sunrise time 07:24

    ? day is set to fixed time and starts at 09:30

    ? evening is set to start 15 minutes after sunset at 17:24

    night is set to fixed time and starts at 21:00

    It is also set that if we wake up between 03:00 and sunrise 07:24 then morning time will be set:

    ? ? 03:00 ? 07:24

    It is also set that if we go to sleep after sunset adjusted time 17:35 and evening time 21:00 then night time will be set:

    ? ? 17:35 ? 21:00

     

    Actually all time of day starting times can with this VD be set to fixed time.

    Time of day times morning, day, evening, night are used for setting lighting scenes, blinds behavior, music automatic volume setting etc.

     

    Reason why I haven't upgraded standalone version is because I want to finish UHAS for HC2 as soon as possible so I can start working on UHAS for HC3.

    Link to comment
    Share on other sites

    • 0
    15 minutes ago, Sankotronic said:

     

    Sunrise is actually time when night changes to morning. If sunrise is at 7:10 and difference is set to 0 min then that is the time when morning starts.

     

    Below sunrise setting is sunset setting on Sunrise & Sunset VD. Sunset is time when day changes to evening. Same as for sunrise (morning) it is possible to change when it will start with +/- 59 minutes difference.

     

    Below sunset is day settings where user can setup how long morning will last before it changes to day and duration of the morning can be set from 00:00 to 06:59. If set to 00:00 then there will be no morning time, but day time will start.

     

    Last time of day setting is for evening time duration or when night will start. So it is like this:

     

    sunrise +/- difference -> time when morning starts

    sunrise +/- difference + time of day -> time when day starts

    sunset +/- difference -> time when evening starts

    sunset +/- difference + time to night -> time when night starts.

     

    Since many users asked for fixed times and also to set time to morning when wake up is before sunrise UHAS version of Sunrise & Sunset VD has more settings as on the picture below:

    Please login or register to see this spoiler.

    So this VD above is from the UHAS which you will release? Okay that's sounds great. Now I know what I can do with actual Version and I am thank you for your time and help

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • 1 hour ago, wrongeu said:

    @Sankotronic 

    Hello

    how can i add more variables changes ? I tried to add but not change .... can you give an example? thanks

     

    Hi @wrongeu ,

     

    can you be more specific what variables you want to add?

     

    Link to comment
    Share on other sites

    • 0
    22 minutes ago, Sankotronic said:

     

    Hi @wrongeu ,

     

    can you be more specific what variables you want to add?

     

    I solved .... I could not add more variables to "SCHEDULED GLOBAL VARIABLE CHANGE SETUP".... thank you

    Link to comment
    Share on other sites

    • 0

    Great script, installed it and trying to figure out how to get it to work with my shutters.
    Wanted to do the following:

    - at sunrise and when the time >7u30, then open all shutters

    - at sunset: close shutters in front of the house, 15mins later close shutters side and back of the house.

    Link to comment
    Share on other sites

    • 0
    12 hours ago, comfix said:

    Great script, installed it and trying to figure out how to get it to work with my shutters.
    Wanted to do the following:

    - at sunrise and when the time >7u30, then open all shutters

    - at sunset: close shutters in front of the house, 15mins later close shutters side and back of the house.

    After reading the manual again I think I figured it out playing with blindtime and sunset time and external scenes.

    Wondering about the blindtime, can it be automatically set at 7u30 when the sunrise is earlier and when it is later, that sunsiretime is used.

     

     

    Getting an error now :(

     

    [DEBUG] 08:33:00: Scene running
    [DEBUG] 08:33:00: Day start: 07:35, Night start: 23:46, Raise blinds: 07:28, Now is: 08:33
    [DEBUG] 08:33:00: 2022-04-22 08:33:00.556314 [ error] timer handler failed with error: /opt/fibaro/scenes/117.lua:431: attempt to index field '?' (a string value)

     

    This code is in the line:

     

    Please login or register to see this code.

     

    Edited by comfix
    Link to comment
    Share on other sites

    • 0

    Solved my issue where you need to use also curly brackets around the local variables. This then finally returns the value.

     

    Please login or register to see this code.

     

     

    Debug feedback:

     

    Please login or register to see this code.

     

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