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 (edited)

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

Recommended Posts

  • 0
Posted

Hi @Sankotronic

Thank you!

Why I have such icons?

Please login or register to see this attachment.

  • 0
  • Inquirer
  • Posted
    6 hours ago, sega66 said:

    Hi @Sankotronic

    Thank you!

    Why I have such icons?

     

    Hi @sega66 ,

     

    You are running Windows version which does not support 

    Please login or register to see this link.

     as do other operating systems. There is no help for that, but maybe with Firefox situation can be a bit better. As long as emojis are properly displayed on Android and iOS mobile devices this should not be a big problem.

     

    • 0
    Guest dacianova
    Posted

    Hi @Sankotronic

     

    I can not solve the problem. Now I have another message :(
    How do I change global variables? I tried in several ways. I'm trying to figure out how to do it because I do not know programming. If I leave global variables the way you wrote them, is not it ok?
    Looks like I'm not doing well what I do.
    It needs to be changed elsewhere except GLOBAL VARIABLES
    Thanks for the help.
    I appreciate everything you do!

    Please login or register to see this attachment.

    Please login or register to see this attachment.

    • 0
    Posted

    You must manually add predefined variables.

    Go to Panels - >Variables Panel -> Press button - Enter

    Scroll down and Add pedefined variables.

    Add variable name: TimeOfDay

    and value "Morning", "Day", "Evening", "Night"

    and next

    SeasonState - ......,..................,..............

    and next

    Month - .....

    e.t.c.

     

    • 0
    Guest dacianova
    Posted

    Thank you
    Thank you
    Thank you
    Now I understand what I have to do.
    I didn't know that I had to go to the Panels to set Global Variables
    Thank you.

    You are a life saver!

    • 0
    Posted

    Some variables are added after installing VD and running Debug. If they are missing, they should be added manually. Read the instructions from Master Sanktronik. It is in pdf. Good luck. ;)

    • 0
    Guest dacianova
    Posted

    I read his instructions but did not know where to introduce them.
    I was lucky with you

    Thank you again

    • 0
    Posted

    @Sankotronic
    Hi, I noticed that the sunset time is wrong. Either I didn't noticed that before and I saw it only today because we changed to summertime (-1 hour).
    Or, it was never updated before or the summertime change is the cause.

     

    Please login or register to see this spoiler.


     

    • 0
    Posted (edited)

    Even stranger today, debug time is not matching the actual time in HC2.
    date / time in api is the same date / time as in HC2 UI.
    See time in the GUI. Compare with time in debug. And I can guarantee that the scene was still running.

    I guess it's a fibaro bug and nothing wrong with FTBE?
     

    Please login or register to see this spoiler.

     

    Edited by wpeeters
    confirmed scene is not the cause. Other scenes have wrong debug time as well.
    • 0
    Posted

    The timestamp in the debug window takes into account the time zone of the browser, this is the timezone of the machine that your browser is running on. The system time on the HC depends on the settings on the Location TAB. So if I set my MAC to timezone UK while my HC2 is using timezone CET, I'll get the same display as you, meaning the debug times seem to be 1 hour behind local time. In your case, maybe something with DST settings?

    • 0
    Posted

    Thanks a lot the new version works great,  I need some help can some one please help me:

    as you can see in the screen shot bellow I have added "Bedrrom Sleep" icon, section and variable

     

    it works okay except when the Variable changes its value from Awake to Sleep then the status Still remains Sleep, my question is this what code  and where I should add that the status always changes automatically 

    Please login or register to see this image.

    /monthly_2019_04/image.png.8e79538bf007aed726b346a4326daf08.png" alt="image.png.8e79538bf007aed726b346a4326daf08.png" />

    • 0
    Posted

    Hi @petergebruers
    Thanks for your feedback.
    To all, sorry to relate it to FTBE :-) No indication yet that the scene is the cause of the issue.


    Now you say so. I indeed had problems with my PC. It didn't change time to summertime. I changed a settings in order to have the time correct.
    While digging deeper now, I noticed that the internet time settings of windows are set to time.windows.com. Changing this to time.nist.gov solved the problem on my PC.
    I was not aware that debug time is based on browser time.
     

    But, it does not explain why the debug time changed when changing the timezone to [1h] Europe / Dublin in the settings of HC2.
    Maybe you mean the opposite? UI time is browser time and debug time is internal HC2 clock?
    Anyway, I didn't try it anymore. It seems to be solved.

    But, yet another but :-)
    My sunset time is no longer correct.
        
    According to

    Please login or register to see this link.


    sunset : 02 04 2019    07:17    20:16 in Belgium. 

    In HC2: API call HC2 (settings): "sunsetHour": "19:15",


    Any idea?

     

    • 0
    Posted
    10 hours ago, wpeeters said:

    Maybe you mean the opposite? UI time is browser time and debug time is internal HC2 clock?

    I understand the confusion. I've double checked, my previous post is correct. Your system and your Lua time take into account the settings of the HC2, this is what you expect. For sake of completeness, Lua date and time functions can convert with or without timezone, see online manual. I bet many users have actually buggy code when DST changes, because of the "apparent time change". If you dig into this, you'll soon find that time is a tricky concept...

     

    The "debug" window converts time to the zone of your PC. The time on the HC does not change. Your zone and/or DST settings between the sytems differed ---> confusion

     

    When you changed the TZ on your HC to "Dublin" it matched the wrong inforration on your PC so they matched again.

     

    It is possible to make less ambiguous timestamps to solve this problem, see 

    Please login or register to see this link.

     - but assuming you don't manage HCs in different timezones that might be overkill.

    • 0
    Posted

    @petergebruers. Thanks for your clarification. It's all clear and working now. Even the sunset time is correct nevertheless no additional change was done. Maybe it is not checked at startup but only once in while during the day.

    • 0
    Posted

    I have an VD for my rollersutters.

    Button ID "2" for "open" and Button ID "3" for "close". VD-ID is "377"

    I want open Blinds weekdays at "blindtime" and close at "nighttime".

    Weekends i want open at "07:30" and close at "nighttime".

     

    What is the right syntax for this?

    Please login or register to see this code.

     

    Please login or register to see this attachment.

    • Like 1
    • 0
  • Inquirer
  • Posted

    Hi @rk-design ,

     

    Usually I give only one comment on this type of questions: "RTFM" :-) But, I do understand that sometimes even reading user manuals does not help so here is proper setting for you:

    Please login or register to see this code.

    What you missed was setting for runVDSchedPushFlag and runVDSchedPushMessage for second VD schedule.

     

    Since you are using variables for time runVDSchedHour don't forget to add this part of code in function extraUserCodeFirst():

    Please login or register to see this code.

    Enjoy coding :-) 

    • 0
    Posted

    Great! It works!

    Thank you!!!

    • 0
    Posted

    Another Question:

    If i have an Variable (holiday_today) for local public holidays, is that possible, that scenes executed or VD´s buttons pressed only at this Days?

    I want open my Blinds on public holidays at the same time as on weekends.

    • 0
    Guest andyhud
    Posted (edited)

    Hey @Sankotronic

     

    Your FTBE is working great for me now. Had a few issues, but got it all sorted.

     

    However, one little thing. I can't find these icons for Home Status in your PDF User Manual for FTBE

     

    For example, I've looked through all your Icon Packs in your Files section on the forum but can't find the icons with the House and the Arm light in green or red like the screenshot in your PDF User manual. (Ignore the arrow pointing to Home Timers v1.1)

    Please login or register to see this attachment.

     

    Can you help point me to those icons as I'm updating the main loop code for the Home Status VD as per below and can't find those icons 'specifically' out of all your Icon Packs to use

     

    Please login or register to see this image.

    /monthly_2019_04/image.png.01256b343d167eb607d36aba3d4ce823.png" />

     

    So this is what my "Room" looks like for my FTBE Timers etc. As you can see, the Home Status v1.1 VD "Icon" is just the plain house, I want to update the Icon ID's in the main loop code (as per screenshot above) with those other "house" icons but with the green alarm bell etc... I just can't find them!

     

    image.png.b56143b45397c9539ad236253be56634.png

     

    Thanks!

     

    Andy

     

    Edited by andyhud
    • 0
  • Inquirer
  • Posted
    3 hours ago, andyhud said:

    However, one little thing. I can't find these icons for Home Status in your PDF User Manual for FTBE

     

    Hi @andyhud ,

     

    Icons are packed together with scene and VD's. When you unzip downloaded file icons should be in same folder with VD.

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