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

Yes, I recommend to upgrade the VD "Sunrise and Sunset" to newest version 1.3.

 

No need to edit anything. Just delete the old VD and upload new one.

 

The new version updates the global variables to proper values in case one pressed save button while in variables' panel.

I upgraded my S&S VD yesterday and I have no anymore problems with corrupted global variables.

Link to comment
Share on other sites

  • 0

Hi Thanks for the help.

I deleted VD then reloaded. Visited Variables panel, all looked ok, left without pushing save.

Then to make sure deleted scene and repasted.

Same debug as before.

Do I have to delete all top panel Variables first except for Darkness before reloading VD?

I tried this a couple of weeks ago and had same problem.

Thankyou

 

One thing I have noticed is on the "timers" VD "TimeOfDay" has no settings?

Edited by Jamie mccrostie
Link to comment
Share on other sites

  • 0
  • Inquirer
  • 1 hour ago, Jamie mccrostie said:

    Hi Thanks for the help.

    I deleted VD then reloaded. Visited Variables panel, all looked ok, left without pushing save.

    Then to make sure deleted scene and repasted.

    Same debug as before.

    Do I have to delete all top panel Variables first except for Darkness before reloading VD?

    I tried this a couple of weeks ago and had same problem.

    Thankyou

     

    One thing I have noticed is on the "timers" VD "TimeOfDay" has no settings?

     

    @Jamie mccrostie,

     

    Just download Sunrise & Sunset VD v1.3 if you still didn't and then open VD for editing and press SAVE button. You need to press SAVE button in S&S VD not scene! This will reset global variables to default values, but correct ones. Please try not to press SAVE button in variable panel, because that is what corrupts global variables values and then Main scene stops running!

     

    Link to comment
    Share on other sites

    • 0
    9 minutes ago, Sankotronic said:

     

    @Jamie mccrostie,

     

    Just download Sunrise & Sunset VD v1.3 if you still didn't and then open VD for editing and press SAVE button. You need to press SAVE button in S&S VD not scene! This will reset global variables to default values, but correct ones. Please try not to press SAVE button in variable panel, because that is what corrupts global variables values and then Main scene stops running!

     

    Thanks,I have done this but still get same Debug.

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • 20 minutes ago, Jamie mccrostie said:

    Thanks,I have done this but still get same Debug.

     

    @Jamie mccrostie,

     

    Can you check in global settings what did you do with weekdayMapping? Did you change mapping for weekday and make typo? If you still have difficulty to find problem can you send me copy of the scene to PM to check and find the culprit.

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • Dear All,

     

    NEW version of Main scene for time based events v1.2.5 and also Sunrise & Sunset VD v1.3.1 are now released! Please check my first post for details.

     

    Thank you all for valuable feedback and suggestions! Please keep up!

     

    Enjoy coding! :) 

    Link to comment
    Share on other sites

    • 0

    Hello,

     

    Did you upload the wrong file or did you forget to change version number in the Sunrise_&_Sunset_v1.3.1.vfib.json file beacuse it still reads v. 1.3?

    Please login or register to see this attachment.

    Edited by TurboWannaBe
    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • Just now, TurboWannaBe said:

    Hello,

     

    Did you upload the wrong file or did you forget to change version number in the Sunrise_&_Sunset_v1.3.1.vfib file beacuse it still reads v. 1.3?

    Please login or register to see this attachment.

     

    Forget to update version in code. Thanks for letting me know!

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • 1 minute ago, TurboWannaBe said:

    Time to night has a maximum value of 5:59 is this correct?

     

    Yes that is correct.

    Link to comment
    Share on other sites

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

    So the latest I can set time to night now is 22:11 in the version before i could set it to more than 23:xx

     

    Why is that?

     

    @TurboWannaBe,

     

    Again you are correct. Sorry for the inconvenience. I already replaced VD with one that has time span from 00:00 to 06:59 for Day and Night, and 00:00 to 12:59 for blinds.

    Thank you very much for pointing that out. I was testing it but didn't pay attention to time span after replacing calculating functions.

     

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • On 1/20/2017 at 10:02 AM, Jamie mccrostie said:

    Hi 

    Have created and saved HomeTable, Have created variable "Darkness". Have created Predefined variables "DemoMode","HomeTable","Month","SleepState",'TimeOfDay" and "WeekDay". without pressing save button

    Downloaded VD "sunrise and sunset" and copy and pasted "Main scene".

    Why when run would I get

    Please login or register to see this attachment.

    when scene is run ?

    Thankyou Jamie

     

    Hi @Jamie mccrostie,

     

    I tested your code on my HC2. Just copy and paste from PM to the HC and this is what I get on debug window:

     

     

    So code that you send me is running perfectly! This is picture from my code:

     

     

    As you can see I'm always using last published code. So, your problem lies somewhere else. Maybe some typo during making global variables, or didn't make all global variables, or just need to restart HC, I don't know since code that you send me is running without errors on my box!

     

     

     

    Edited by Sankotronic
    Attachment quota filled up / deleting older stuff sorry :-(
    Link to comment
    Share on other sites

    • 0
    25 minutes ago, Sankotronic said:

     

    Hi @Jamie mccrostie,

     

    I tested your code on my HC2. Just copy and paste from PM to the HC and this is what I get on debug window:

    Please login or register to see this attachment.

     

    So code that you send me is running perfectly! This is picture from my code:

    Please login or register to see this attachment.

     

    As you can see I'm always using last published code. So, your problem lies somewhere else. Maybe some typo during making global variables, or didn't make all global variables, or just need to restart HC, I don't know since code that you send me is running without errors on my box!

     

     

     

    Thanks Sankotronic,

    Timeofday instead of TimeOfDay

    Cheers for the help

    Jamie

    Link to comment
    Share on other sites

    • 0

    Is anyone else seeing this in the debug window after upgrading to 1.2.5?  The only thing I edited above this is to set useSleepState to 'true'.

    I have updated the S&S VD by deleting old and importing new.  I ran it and everything seemed normal.  I adjusted a couple of times, and as you cna see from the debug windows output Night and Blinds changed.

     

     

    Please login or register to see this attachment.

     

    I just checked, and v1.2.4 runs fine.  I can't see a difference between the two in this section.

    Edited by clowg
    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • @clowg,

     

    Please see my previous post. I downloaded from forum this new version, copy & paste to HC, press save and it runs! What did you f.. do this time? ;) 

    Must be something with variables or value mapping.

    Link to comment
    Share on other sites

    • 0

    @Sankotronic

     

    Found the issue - I had ommitted the definition of 'local  dadAway'.

    :oops:

     

    Weird that the debug was calling out 'line 154'...?

    Link to comment
    Share on other sites

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

    @Sankotronic

     

    Found the issue - I had ommitted the definition of 'local  dadAway'.

    :oops:

     

    Weird that the debug was calling out 'line 154'...?

     

    @clowg, you can't always believe debugger. It is quite good actually, but sometimes just get surprised with our coding and then reports wrong code line :D 

     

    I'm happy that you find problem!

    Cheers!

     

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