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

Hello! I really enjoy this scene! Thanx again. One question though, the morning, day, evening, night variables. Do I have to manually change them accordingly to when they change like every day? I mean sunrise n sunset is automatic right? But do I need to change day and night times ? Because they are static after what I choose them to be? 

 

regards K

Link to comment
Share on other sites

  • 0
5 hours ago, oceank said:

Hello! I really enjoy this scene! Thanx again. One question though, the morning, day, evening, night variables. Do I have to manually change them accordingly to when they change like every day? I mean sunrise n sunset is automatic right? But do I need to change day and night times ? Because they are static after what I choose them to be? 

 

regards K

 

No - the TimeOfDay variable that holds these values (Morning, Day, Evening, Night) is changed by this scene automatically.   It will adjust the time this value is set based on sunrise and sunset - so it adjusts automatically throughout the year.  That's the beuaty of this scene.

 

You should install the Sunrise & Sunset Virtual Device so that you can adjust the times that the changes from state to state are made.

 

Cheers,

G.

Link to comment
Share on other sites

  • 0

I had a strange event with this scene over the weekend.  We were away for 3 days, and when I got home I noticed that the house was in 'Sleep' state, when it should have been in 'Awake' mode.

I looked at the debug log of the Main Scene and found this:

 

Please login or register to see this attachment.

 

It was stopped at the 06:06:06 line.

 

I pressed the [Run] button and it started up again fine and has been running since.

 

Has anyone else ever seen such a failure?

 

Geoff.

Link to comment
Share on other sites

  • 0
  • Inquirer
  • 30 minutes ago, clowg said:

    I had a strange event with this scene over the weekend.  We were away for 3 days, and when I got home I noticed that the house was in 'Sleep' state, when it should have been in 'Awake' mode.

    I looked at the debug log of the Main Scene and found this:

     

    Please login or register to see this attachment.

     

    It was stopped at the 06:06:06 line.

     

    I pressed the [Run] button and it started up again fine and has been running since.

     

    Has anyone else ever seen such a failure?

     

    Geoff.

     

    @clowg,

     

    I had once same fault and did the same, just pressed RUN and scene didn't stop since. Cause of this fault is still unclear to me because it is obvious that it is not due to the scene itself. Similar problem I had with another scene but then I had to restart HC2 to make it work again. I have plan to make watchdog to monitor main scene and send me alert if it is stopped due to this error and then try to restart either scene or HC2.

    Link to comment
    Share on other sites

    • 0

    Hello again! one question abt this scene. I have now set so my hue lamps turn on at 16:00 and turnoff at 22:00 every day. BUT, sometimes I want to turn on these hue lamps before 16:00. When I do that say around 15:00, all is good. but when the clock turns 16:00 then all the hue lamps turn off instead.

     

    in the script, isnt there a check to see if the lamps are on, then it shouldnt do anything? because its abit anoying that they turn off 16:00.

     

    or am I missing something?

    Link to comment
    Share on other sites

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

    Hello again! one question abt this scene. I have now set so my hue lamps turn on at 16:00 and turnoff at 22:00 every day. BUT, sometimes I want to turn on these hue lamps before 16:00. When I do that say around 15:00, all is good. but when the clock turns 16:00 then all the hue lamps turn off instead.

     

    in the script, isnt there a check to see if the lamps are on, then it shouldnt do anything? because its abit anoying that they turn off 16:00.

     

    or am I missing something?

     

    Hi @oceank,

     

    Main scene does not make any checks it only presses buttons, starts scenes and changes global variables at setup time. Checks you have to program yourself in scenes or VD's that you call with main scene. In this case since you are using HUE VD that has toggle button (one button that either turns on or off lights) you can't use it as you setup. You have three choices:

     

    1) Make scene ro VD that will check status of lights and turn them on if lights are off otherwise do nothing

    2) add button on Philips HUE VD and change code so that one button is to turn on lights and another to turn them off

    3) use VSL scene to control lights :)

     

     

    Link to comment
    Share on other sites

    • 0
    2 minutes ago, Sankotronic said:

     

    Hi @oceank,

     

    Main scene does not make any checks it only presses buttons, starts scenes and changes global variables at setup time. Checks you have to program yourself in scenes or VD's that you call with main scene. In this case since you are using HUE VD that has toggle button (one button that either turns on or off lights) you can't use it as you setup. You have three choices:

     

    1) Make scene ro VD that will check status of lights and turn them on if lights are off otherwise do nothing

    2) add button on Philips HUE VD and change code so that one button is to turn on lights and another to turn them off

    3) use VSL scene to control lights :)

     

     

    thanx for the replay.

     

    I use VSL scene with motion sensor for the hallway lamp.  how do I make the VSL turn on/off the hue lamps at specific time/day? and not use the motion sensors for it? better to use VSL for it than the main scene for time based events?

    Link to comment
    Share on other sites

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

    thanx for the replay.

     

    I use VSL scene with motion sensor for the hallway lamp.  how do I make the VSL turn on/off the hue lamps at specific time/day? and not use the motion sensors for it? better to use VSL for it than the main scene for time based events?

     

    Hi @oceank,

     

    add global variable to VSL scene as motion trigger and then change value of that global variable with Main scene at preferred time. For details see instructions I wrote in first posts for each scene.

    Link to comment
    Share on other sites

    • 0

    Hi @Sankotronic 

     

    I really like this and I´m going to try it out.

     

    About the SleepState, I would like to have two more options like "Early sleep" and "Early awake" or something like that.
    Quite often one of us go to bed or get up before the other so it would be nice to have the oportunity to keep just the bedroom section separated when needed.

    Maybe there is an option for such thing that I havn´t noticed yet.

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • 12 minutes ago, diStefano said:

    Hi @Sankotronic 

     

    I really like this and I´m going to try it out.

     

    About the SleepState, I would like to have two more options like "Early sleep" and "Early awake" or something like that.
    Quite often one of us go to bed or get up before the other so it would be nice to have the oportunity to keep just the bedroom section separated when needed.

    Maybe there is an option for such thing that I havn´t noticed yet.

     

    Hi @diStefano,

     

    you can achieve that with

    Please login or register to see this link.

    by using sleepingName global variable that is set only for one bedroom. This main scene only connection to SleepState is to change TimeOfDay to Morning when you wakeup insted at sunrise time if that is desired. SleepState global variable is supposed to be changed by other scenes like Good morning and Good night scene which I will post in future. I have explained that in my first post.

     

    Link to comment
    Share on other sites

    • 0

    hello 

    Please login or register to see this link.

     

    Thanks for great contribute with this scene for the HC2 community

    I have installed yje VD's and Scene as you has written down in your first post.

    I have manually added the variable TimeOf Day

    after loaded the scene, find in debug window message below.

     

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

     

    Reinstalled VD's and scene . But did not fix the problem.

    find attached screenshots.

    please can you assist to find out what I did wrong

     

    Thanks

     

    RobS

     

    Please login or register to see this attachment.

    Please login or register to see this attachment.

     

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • Hi @RobS,

     

    can you please read through the posts and you will find the answer to your question. There was already same question asked.

    Make sure that you added all global variables and take care of capitalization and typos. Also use provided VDs to change values of global variables. Do not change values in variable panel and press Save button there because then some of the global variables used by Sunrise & Sunset VD will be destroyed and you will have to go to VD to press Save button to re-initialize them again.

     

    So, if scene is not running at first run then there is definitely some problem with global variable setup.

     

    Link to comment
    Share on other sites

    • 0

    Hello 

    Please login or register to see this link.

     

    Thanks for your quick reply, sorry i have read your instructions, and didn't no see that i have to implement more variables manually.

    Now the scene is running without any error messages, go for the next steps

     

    thanks again.

    still learning.

     

    Link to comment
    Share on other sites

    • 0

    @Sankotronic First of all - amazing work.

     

    I have a query though - I tried searching, but couldn't find an answer.

     

    I have sunrise and sunset working perfectly.  But I want day to ALWAYS start at 12:00 (midday) and night to ALWAYS start at 21:00.  When I set this value using TimeToDay and TimeToNight in VD, it doesn't remain constant, ie. On the next day, night starts at 21:02.

     

    Is it possible to have 'Day starts at' as a fixed variable, rather than 'Time to Day'?  or am I missing something?

     

     

    Link to comment
    Share on other sites

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

    @Sankotronic First of all - amazing work.

     

    I have a query though - I tried searching, but couldn't find an answer.

     

    I have sunrise and sunset working perfectly.  But I want day to ALWAYS start at 12:00 (midday) and night to ALWAYS start at 21:00.  When I set this value using TimeToDay and TimeToNight in VD, it doesn't remain constant, ie. On the next day, night starts at 21:02.

     

    Is it possible to have 'Day starts at' as a fixed variable, rather than 'Time to Day'?  or am I missing something?

     

     

     

    Hi @MonkeyJug,

     

    At the moment only way to make this values static is to change code itself. I can add this feature in next release as a part of the setup. But that will have to wait for at least next ten days or so since I'm at my work at the moment and will go home next week.

     

    Link to comment
    Share on other sites

    • 0

    I´m going to start using this scene together with the Sunrise/sunset VD and the Very Smart Light scene.
    I have a HC2 as master controller and HC Lite as a slave controller, do I install the scenes and VD on both controllers?

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