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

Sorry to bug you again, I have a fishtank that switches on at 7:00 and off at 21:00. Is it possible to add scheduled devices to timer? 

  • 0
  • Inquirer
  • Posted

    Hi @pettzon

     

    this is proper configuration for running your scene:

    Please login or register to see this code.

    1) runSceneSchedName = {"test"} name must be in quotes unless test is local variable that contains name of your scene!

    2) runSceneSchedWeek = {{1, 1, 1, 1, 1, 1, 1}} - you were missing braces! Outer braces determine primary table and inner braces determine sub table.

    3) runSceneSchedPushFlag = {0} - for each scene you MUST determine if you want receive push notificartion (1) or not (0) but it MUST be there

    4) runSceneSchedPushMessage = {""} - for each scene you MUST determine push message text. If you don't need it you still have to put empty quotes.

     

    But first of all you need carefully read comments and instructions and then no problems! :) 

    • 0
    Posted

    Thank you very much! It finally works!!! :)

    • 0
  • Inquirer
  • Posted

    Hello everyone!

     

    Just posted NEW version 1.2.4!! Please check first post for details and download

     

    • 0
    Posted
    28 minutes ago, Sankotronic said:

    Hello everyone!

     

    Just posted NEW version 1.2.4!! Please check first post for details and download

     

     

    Thanks @Sankotronic

    upgraded to 1.2.4 and working well so far

     

    -f

     

     

    • 0
    Posted (edited)
    On ‎30‎-‎12‎-‎2016 at 9:24 PM, Sankotronic said:

     

    Hi @remcoploeg, you probably used SAVE button in variable panel. After that some of global variables get corrupted due to bug in HC firmware. I refer to global variables that save margin times in format "00:00". After using save button they are destroyed. Cure to this is to delete those variables and recreate them with Sunrise & Sunset VD by clicking on SAVE button while you are on advanced tab of the VD. More info you can find here in this thread because this problem was already discussed.

     

     

    Yes, I saw it. I have removed all the variables(and removed VD) and imported the VD again. It was working great yesterday, but today I get the same error again.... off course I can do this procedure again, but is this a bug in the Fibaro system or am I doing something really wrong?

     

    So I imported the VD again and now it's working again. Only strange thing now, is that the device says it's Saturday, instead of Sunday. Any idea what can be wrong? First day of the week here in the NL is Monday, so maybe there is something wrong?

     

    local weekDayMapping      = {Sunday    ="Zondag",
                                 Monday    ="Maandag",
                                 Tuesday   ="Dinsdag",
                                 Wednesday ="Woensdag",
                                 Thursday  ="Donderdag",
                                 Friday    ="Vrijdag",
                                 Saturday  ="Zaterdag"};
    -- enter week days in your language and mapped in previous variable
    local weekDayMap          = {"Zondag", "Maandag", "Dinsdag", "Woensdag", "Donderdag", "Vrijdag", "Zaterdag"};
    -- predefined global variable that keeps current month name.
    -- make sure that value mapping corresponds to month names in
    -- your language

     

    I changed it to my own language.

     

    Resolved: I have run the scene again, and now it's Sunday :) !

     

     

    Great scene BTW !

    Edited by remcoploeg
    extre debug information
    • 0
    Posted

    Thanks @Sankotronic, migrating from GEA now at a slow pace so I know where I mess up ;)

    • 0
  • Inquirer
  • Posted
    9 hours ago, jimicr said:

    Sorry to bug you again, I have a fishtank that switches on at 7:00 and off at 21:00. Is it possible to add scheduled devices to timer? 

     

    @jimicr,

     

    This scene does not support to control devices directly, only by calling VD or scene. I can add this feature in next release, but you can do that also with short scene and global variable value change. So you add global variable FishTank with value 0 - to turn off and 1 to turn On fish tank light. Then small scene that will be triggered by this global variable, something like:

    Please login or register to see this code.

    Here is how to setup Main scene to change "FishTank" global variable:

    Please login or register to see this code.

     

    Or you can make simple VD with one label and one button. Name it "Fish tank status", and add this code to the VD button:

    Please login or register to see this code.

    Then you setup scheduled run for this VD as follows:

    Please login or register to see this code.

    Advantage of VD is that you can then use VD to turn On/Off fish tank light manually. Also you can make VD with two buttons, one to turn On light and other to turn Off light and setup this two buttons in Main scene. Then you don't even need to use global variable FishTank!

     

     

     

    • 0
    Posted (edited)

    x

    Please login or register to see this attachment.

    Please login or register to see this attachment.

    Please login or register to see this attachment.

    Edited by Jamie mccrostie
    deleted as asked
    • 0
  • Inquirer
  • Posted
    5 hours ago, Jamie mccrostie said:

    Hi Sankotronic

    Am I on the right track here?

    Installed new system over xmas so all very new to me.

    Have read everything three times and reinstalled scene twice

    simple scene 1 sensor 1 light .

    Thanks Jamie

    Ps sparky with no programing experience but keen to learn

    Please login or register to see this attachment.

     

    Hello Jamie,

     

    Don't worry about posting in wrong post because one part of your question is regarding main scene. On above picture i can see that your global variables

    MarginBlinds, MarginDay, MarginNight, NightTime, DayTime,  OpenBlindTime, SunriseTime and SunsetTime all have improper values! They should have time in format "00:00" otherwise Main scene won't work! The thing  is that when you are in variables panel you should NOT press SAVE button as it is mentioned here many times! When you add global variables or deleting them you don't need to press SAVE button. If you want to play with global variables values then you should download and install Home Status and Timers virtual devices that I provided.

     

    To make Main scene running again you will need to delete above mentioned globals and then go to Sunrise & Sunset VD and open it to edit then press SAVE button so that VD again generate global variables with proper values for you.

     

    Regarding Very Smart Light scene can you please just edit your post and delete scene code. Answer to that question you can find here:

     

    • 0
    Posted

    Love your work Sankotronic!

    Another great piece of art programing work that brings fibaro to a higher level...

    Running great for few days now..

    • 0
  • Inquirer
  • Posted
    2 hours ago, D-Vine said:

    Love your work Sankotronic!

    Another great piece of art programing work that brings fibaro to a higher level...

    Running great for few days now..

     

    Hi @D-Vine,

     

    Thank you for positive feedback and kind words. Now I'm filled with new energy to continue! :) 

    • 0
    Posted

    Hi

    Re Hometable, Why do we recon debug as shown here team. thanks jamie

    Please login or register to see this attachment.

    • 0
  • Inquirer
  • Posted
    8 minutes ago, Jamie mccrostie said:

    Hi

    Re Hometable, Why do we recon debug as shown here team. thanks jamie

     

     

    Hi @Jamie mccrostie,

     

    can you please stick to the topic of this thread. What you are asking is another topic in another thread. Also I kindly asked you to delete scene code from your previous post since it has nothing to do with this topic. Thank you!

    • 0
    Posted

    What a great script. Found some time to play with it.

     

    I keep getting:

     

     

    [DEBUG] 15:44:30: line 442: attempt to perform arithmetic on local 'diffMinute' (a nil value)

     

    Any ideas?

    • 0
  • Inquirer
  • Posted
    4 minutes ago, necrosis said:

    What a great script. Found some time to play with it.

     

    I keep getting:

     

     

    [DEBUG] 15:44:30: line 442: attempt to perform arithmetic on local 'diffMinute' (a nil value)

     

    Any ideas?

     

    Hi @necrosis,

     

    This problem was already discussed in this topic. Your global variables get corrupted when you pressed SAVE button in variables panel. Just check Sunrise & Sunset VD for times if are shown in correct format "00:00" if not then you will have to regenerate them. And please avoid changing values of global variables in variables panel and pressing SAVE. You can do that by first deleting MarginDay, MarginNight and MarginBlinds and then pressing SAVE button when you are editing Sunrise & Sunset VD. After that you will need to setup all times again as you want them since they will be reset to default settings.

    • 0
    Posted

    Thanks @Sankotronic

     

    I already tried that: 

    Please login or register to see this link.

     

    Sunrise & Sunset v1.2 is working fine. No errors there? 

    Please login or register to see this link.

    • 0
  • Inquirer
  • Posted

    @necrosis,

     

    Error is in function that is calculating time and requires time to be formatted as string "07:00" with leading zero. Error is caused by time formatted as "07" or similar where minutes are missing. Can you make screen shot of VD itself?

    • 0
    Posted

    @Sankotronic

     

    Maybe due to the new time calculation that has been adjusted couple of pages back?

     

    Screenshot looks good, right?

    Please login or register to see this link.

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