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
  • 11 minutes ago, jimicr said:

    The idea was to run some scenes and vd's on the odd minutes ,some on the even and the last few every minute.

     

    Jim

     

    I understand and I will keep your idea in my head until I came to that problem and then will see what I can do. :) 

    Link to comment
    Share on other sites

    • 0

    To do some TTS Scenes and Lights i needed an additional Vairable if tomorrow is a Bank Holiday:

     

    Please login or register to see this code.

    Maybe this helps somebody else too :)

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • 40 minutes ago, DonQuichopp said:

    Seems to be working ;-)

     

    Please login or register to see this attachment.

     

    Great achievement!

    Link to comment
    Share on other sites

    • 0

    hello. amazing code, dont understand any of it but im trying. Ive installed following the instructions ( i think properly ) I have added the globals and in demo mode it worked. taking it off demo mode this came up.

    I also had problems that the vd on timers for day and month didn't work but i figured out that i had to change them to english and they work fine.

    thanks for any help in what will be my mistake in either not reading the instruction properly or doing something else wrong. when ive got this working il going to have a go at the smart lighting script that you've done.

    thanks for a fab bit of work

    Ed

    Please login or register to see this image.

    Please login or register to see this image.

    Please login or register to see this attachment.

    Edited by Edb
    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • Hi @Edb,

     

    just open Sunrise and Sunset VD for editing and press save so that variables are restored. If after that you still have errors then check if you added all needed global variables.

     

    I'm working on new version of Main scene and Sunrise and Sunset VD that should be easy to install and will support 24 different languages, even more than HC itself! :-) 

    Link to comment
    Share on other sites

    • 0
    On 2/25/2017 at 6:45 AM, Sankotronic said:

    Hi @Edb,

     

    Did you first install Sunrise & sunset VD? Did you use Save button in variable panel after Sunrise & Sunset VD was installed? If you did use Save button then open to edit Sunrise & Sunset VD again and press Save button to correct values of variables generated by that VD. As I mentioned before, if Main scene is not working on the first run then it is always due to missing global variable or pressing save button in variable panel. There are two other VDs Home status and Timers that can be used to change values of global variables for testing purpose.

     

    thank you, thank you thank you. now all ive got to do is figure out how to implement it :)  Its wonderful that you are so generous to share all your  time and knowledge to help others.. again thank you. now time to play with your other scenes :)

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • 42 minutes ago, Edb said:

    thank you, thank you thank you. now all ive got to do is figure out how to implement it :)  Its wonderful that you are so generous to share all your  time and knowledge to help others.. again thank you. now time to play with your other scenes :)

     

    Hi @Edb,

     

    I'm glad that is working. But I'm cooking and baking something in my Fibaro lab and I hope that I will soon reveal results :-) 

    Link to comment
    Share on other sites

    • 0
    1 hour ago, Sankotronic said:

     

    Hi @Edb,

     

    I'm glad that is working. But I'm cooking and baking something in my Fibaro lab and I hope that I will soon reveal results :-) 

    YAY!!!! Looking forward to another toy!!!:)

    Link to comment
    Share on other sites

    • 0

    Hi Jompa

     

    i am not sure if you have the same requirement as I do.

    i have a light in the living room that comes on shortly before sunset and stops at random times.

     

    every night at 02:00 i start a scene that will randomly generate an ending time depending on the next day (weekday or public holiday/weekend). The time is then stored in a global Variable which is then taken by the Main scene for the lights trigger.

     

    cheers Don

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • 4 hours ago, jompa68 said:

    @Sankotronic, vacation time is coming up so my question is how can i setup so this scene will set house into sleep mode at different times?

     

    Hi @jompa68,

     

    I was very busy last month and this scene as well as other scenes and VD's will all be upgraded using new system with easy installation, translations and configurations. I have also idea how to do mimics with lights and blinds when we go to holidays, but first things first. After posting this new system which is crucial for next step then I will continue developing rest of the automation. VSL scene is ready to be used for mimicking lights in current version but it's biggest disadvantage is difficult setup which I intend to change soon.

     

    At the moment I'm testing this new system and it looks good so I believe that you will soon see what I was cooking in my Fibaro lab :-) 

     

    Link to comment
    Share on other sites

    • 0

    Looking forward to this!  If you need beta testers I'm available 

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • 2 minutes ago, jimicr said:

    Looking forward to this!  If you need beta testers I'm available 

     

    Thank you @jimicr, but I need first to explain what this is all about and will do that very soon.

    Link to comment
    Share on other sites

    • 0

    @Sankotronic it would be great to have the possibility to start a scene at the end of each month or at a specific date. Like I need to check the counter of my gasmeter every month-end :-) and I forget it all the time ;-)

     

    just an Idea, dunno if you maybe already have it planned in your magic Scene ;-)

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • 9 minutes ago, DonQuichopp said:

    @Sankotronic it would be great to have the possibility to start a scene at the end of each month or at a specific date. Like I need to check the counter of my gasmeter every month-end :-) and I forget it all the time ;-)

     

    just an Idea, dunno if you maybe already have it planned in your magic Scene ;-)

     

    Hi @DonQuichopp and thanks for the idea. Will see what I can do!

    Link to comment
    Share on other sites

    • 0
    On 2017-04-18 at 7:36 AM, DonQuichopp said:

    Hi Jompa

     

    i am not sure if you have the same requirement as I do.

    i have a light in the living room that comes on shortly before sunset and stops at random times.

     

    every night at 02:00 i start a scene that will randomly generate an ending time depending on the next day (weekday or public holiday/weekend). The time is then stored in a global Variable which is then taken by the Main scene for the lights trigger.

     

    cheers Don

    Can you share your code?

    Link to comment
    Share on other sites

    • 0

    Sure

    Daily Task script:

     

    basically it checks if the day is a normal working day (for morning lights).

    you can set a start hour (06:15) and a random timeframe (+/- 15min)

    it then calculates a random Light on time. If LightOn is more than 4 minutes before sunrise Hour then it will set the global variable that will be used in Main Scene.

    If for example the random time is 06:27 and sunrise is 05:13 in Summer, then it will set skip Light Action in global variable, that the light is not started in the light skript.

    Light Off will be at sunrise through Main Scene global Variable SunriseTime.

     

    for Weekends there is a different starttime (here 09:00 and +/- 30 mintes). Mostly only relevant in Winter.

     

    In the evening it will set the LightOff Variable to a specific time (23:00) that can be set in a variable and the random time difference (+/- 20 min).

     

    The Light will be switched on at Sunset out of Main Scene global Variable SunsetTime.

     

    Also here you can differ if the next day is Bankholiday or Weekend (when you are supposed to stay up longer ;-), that's at least what I do :D).

    Please login or register to see this code.

     

     

    In Main Scene:

    StehlampeEinAus is the Scene to switch Light On/Off (Scene times defined below)

    Daily Tasks Run is the above Scene (running only once at 02:00)

    Please login or register to see this code.

     

    However the Times are overwritten by the below code where it gets the above set values to put the lamp on and off:

    Please login or register to see this code.

     

    Hope that helps :) if you have questions, please let me know :)

     

    Cheers

    Don

    Link to comment
    Share on other sites

    • 0

    Goodmorning @Sankotronic,

     

    First of all I hope the problems you had with Angelina are over.

    If you are still working on the next version of the Main Scene I have a small request: the ability to set "Darkness" to 1 and 0 using a (outdoor)  lux sensor if one is present.

     

    Thanks,

     

    Jim

    Link to comment
    Share on other sites

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

    4)  VD "Timers" for check & manual change of time based variables  {v 1.0.1} -----> 

    Please login or register to see this attachment.

    I found blind time in this VD, how do you use that and how-to setup in you main 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...