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
6 minutes ago, TurboWannaBe said:

After updating to 1.2.5 i´m having trouble with Morning starting at midnight why is that?

 

 

have you got useSleepState set to true? and is your SleepState = Awake? cos that will do it..

Link to comment
Share on other sites

  • 0
  • Inquirer
  • 7 hours ago, TurboWannaBe said:

    After updating to 1.2.5 i´m having trouble with Morning starting at midnight why is that?

     

     

    @TurboWannaBe,

     

    I know for this problem. This happens if sleepState is still set to Awake after midnight while useSleepState is set to true. Go down in code and find code line:

    Please login or register to see this code.

    and change it to some later time like:

    Please login or register to see this code.

    Now TimeOfDay will change to Morning at 3 o'clock in the morning if useSleepState is set to true and SleepState is still set to Awake.

    If you set useSleepState to false, then TimeOfDay will change from Night to Morning at sunrise time that you set with Sunrise & Sunset VD.. 

    Link to comment
    Share on other sites

    • 0
    On 10-12-2016 at 9:09 PM, Sankotronic said:

    - INSTALLATION INSTRUCTIONS

    IMPORTANT!

    1) Please first download "Sunrise & Sunset" VD and import to your HC.

    2) Create new LUA scene and copy and paste code. Save to start scene and check debug window for any errors. If all good it should look like this:

    Please login or register to see this attachment.

    1) done

    2) created Lua scene....ok....... and copy/past CODE  ......lost, wich code?

     

    Kind regards Kees

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • 3 minutes ago, zaanhoeve said:

    1) done

    2) created Lua scene....ok....... and copy/past CODE  ......lost, wich code?

     

    Kind regards Kees

     

    Hi @zaanhoeve,

     

    but of course copy/paste Main scene for time based events code. All download links you can find at the end of my first post!

     

    Link to comment
    Share on other sites

    • 0

    OK Tnx
    The problem what is so normal for pro's could be confusing to newby's

     

    Kind regards Kees

     

    Debug gives:

    [DEBUG] 15:14:26: Main scene for time events version 1.2.5 - © 2016 Sankotronic
    [DEBUG] 15:14:26: Day time: 10:12, Night time: 20:18, Time to raise blinds: 13:12
    [DEBUG] 15:14:26: DEMO MODE is turned On! No globals will be changed or scene/VD executed!
    [DEBUG] 15:14:26: line 924: attempt to concatenate a nil value

     

    line 924:   " TimeOfDay: " .. fibaro:getGlobalValue(timeOfDay)) end

     

    Is this problem caused by demo mode?

    Edited by zaanhoeve
    last post so ad problem
    Link to comment
    Share on other sites

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

    OK Tnx
    The problem what is so normal for pro's could be confusing to newby's

     

    Kind regards Kees

     

    Debug gives:

    [DEBUG] 15:14:26: Main scene for time events version 1.2.5 - © 2016 Sankotronic
    [DEBUG] 15:14:26: Day time: 10:12, Night time: 20:18, Time to raise blinds: 13:12
    [DEBUG] 15:14:26: DEMO MODE is turned On! No globals will be changed or scene/VD executed!
    [DEBUG] 15:14:26: line 924: attempt to concatenate a nil value

     

    line 924:   " TimeOfDay: " .. fibaro:getGlobalValue(timeOfDay)) end

     

    Is this problem caused by demo mode?

     

    @zaanhoeve,

     

    That error is related to global variable TimeOfDay. Please check if you name it properly and be aware that variable names are case sensitive which means that big T is different than small t.

     

    Link to comment
    Share on other sites

    • 0
    On 12/19/2016 at 8:32 AM, rasmusaabo said:

    2) I think I understand your thoughts with HomeTable, but I'm not sure I understand how you define the values in that table. Is it manually defined or the HC create the table for you?

     

    hi @rasmusaabo

    not sure if you found this but myself and a few others have compiled a tutorial on the HomeTable

    You can find it here 

    Please login or register to see this link.

     

    -f

     

    Link to comment
    Share on other sites

    • 0

    hello!

     

    im still newbie with fibaro. im trying to get this main scene for time based events working. How do I make the SleepState global variabel go to sleep at 22:00? and awake at 07:00??

     

     

    regards K

    Link to comment
    Share on other sites

    • 0
    1 minute ago, oceank said:

    hello!

     

    im still newbie with fibaro. im trying to get this main scene for time based events working. How do I make the SleepState global variabel go to sleep at 22:00? and awake at 07:00??

     

     

    regards K

     

    I do this using the SCHEDULED GLOBAL VARIABLE CHANGE SETUP section.
     

    Please login or register to see this code.

    Cheers,

    Link to comment
    Share on other sites

    • 0
    9 minutes ago, clowg said:

     

    I do this using the SCHEDULED GLOBAL VARIABLE CHANGE SETUP section.
     

    Please login or register to see this code.

    Cheers,

     

     

    Ohhh, damn thanx! //K

    Link to comment
    Share on other sites

    • 0

    This is a 'temporary' work around until we get the formal release of @Sankotronic's virtual device/scene for managing the 'wake up' & 'go to sleep' events that integrates with this scene and others like Very Smart Lights.

    Link to comment
    Share on other sites

    • 0
    9 minutes ago, clowg said:

    This is a 'temporary' work around until we get the formal release of @Sankotronic's virtual device/scene for managing the 'wake up' & 'go to sleep' events that integrates with this scene and others like Very Smart Lights.

    I see! thanx for the info.

     

    just one more question. Sunrise & sunset VD. Time to day 03:49 and then the "day starts at" says 12:00 what does that mean?,  Time to night says 00:00" but then "night starts at 16:38.

     

    I cant really understand that? will this mes upp the "morning, day, evening, night"? and what should the values be set to?

    Edited by oceank
    Link to comment
    Share on other sites

    • 0

    "Time to Day" sets the time that Morning will change to Day

    "Time to Night" sets the time that Evening will change to Night.

     

    These times are all based off your local sunrise and sunset times, as determined by HC2.  As the sunrise and sunset times change throughout the year, the Morning, Day, Evening & Night times will adjust accordingly.  The 'TIme to XXX' settings let you customise the time you want those state changes to happen.  As do the 'Difference' settings for sunrise and sunset - you can customise when you want the VD to set those states.

     

    Hope that explains it.  If not, keep asking questions :-)

     

    G.

     

     

    Link to comment
    Share on other sites

    • 0
    10 hours ago, AutoFrank said:

     

    hi @rasmusaabo

    not sure if you found this but myself and a few others have compiled a tutorial on the HomeTable

    You can find it here 

    Please login or register to see this link.

     

    -f

     

    Great. Thanks 

    Link to comment
    Share on other sites

    • 0
    16 hours ago, Sankotronic said:

     

    @zaanhoeve,

     

    That error is related to global variable TimeOfDay. Please check if you name it properly and be aware that variable names are case sensitive which means that big T is different than small t.

     

     

    Hello Sankotronic,

     

    I did take a look in variables. There was no Variable "TimeOfDay". added it manualy. Still the same message:

    [DEBUG] 11:09:55: Main scene for time events version 1.2.5 - © 2016 Sankotronic
    [DEBUG] 11:09:55: Day time: 10:11, Night time: 20:20, Time to raise blinds: 13:11
    [DEBUG] 11:09:55: DEMO MODE is turned On! No globals will be changed or scene/VD executed!
    [DEBUG] 11:09:55: line 924: attempt to concatenate a nil value

     

    Reinstalled VD Sunrise. Did not fix the problem.

    Did not translate any code to prevent typos resulting in errors

     

    kind regards ,

    Kees

     

    Please login or register to see this attachment.

    Link to comment
    Share on other sites

    • 0

    Hello again!

     

    I got som help yesterday regarding changing of SleepState with this:

     

    I do this using the SCHEDULED GLOBAL VARIABLE CHANGE SETUP section. 

    local chgGlobalSchedName   = {"SleepState"};
    local chgGlobalValue       = {{"Awake", "Sleep"}};
    local chgGlobalHour        = {{"07:00", "23:55"}};
    local chgGlobalWeek        = {{1, 1, 1, 1, 1, 1, 1}}; 

     

     

    But this morning nothing happend to my SleepState, anything else I should change or do? I have the global variable SleepState with "Awake and Sleep"

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • 5 hours ago, zaanhoeve said:

     

    Hello Sankotronic,

     

    I did take a look in variables. There was no Variable "TimeOfDay". added it manualy. Still the same message:

    [DEBUG] 11:09:55: Main scene for time events version 1.2.5 - © 2016 Sankotronic
    [DEBUG] 11:09:55: Day time: 10:11, Night time: 20:20, Time to raise blinds: 13:11
    [DEBUG] 11:09:55: DEMO MODE is turned On! No globals will be changed or scene/VD executed!
    [DEBUG] 11:09:55: line 924: attempt to concatenate a nil value

     

    Reinstalled VD Sunrise. Did not fix the problem.

    Did not translate any code to prevent typos resulting in errors

     

    kind regards ,

    Kees

     

    Please login or register to see this attachment.

     

    Hi @zaanhoeve,

     

    I can see from your picture that global variable TimeOfDay is defined in upper part of variable panel and has value 0 (zero). You need to define this global variable in lower part of variable panel where are predefined variables and with this four values: Morning, Day, Evening and Night. You can also give values in your language but then you need to map your values to english values in scene.

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