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!



Smart Home Forum by FIBARO Team

  • 0

missing global variables



Hi Sanko,

i'm using your wonderful script for this home scene for years, and it was working perfect.

However, since a few months, trigger times have been disturbed, and I found out in the debugging area that several variables are reported as missing:

Missing global variable for Time Of Day - Day of week is Vrijdag
Missing global variable for Season and/or Month


I don't know why, I haven't change anything for 2 years.

In the variables panel the variables do exist, although Season wasn't right.

Running the scene or VD's doesn't help.


Do you have any suggestion how to solve this?

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Hi @ErnstH ,


Sorry for late replay, but question is posted on another thread and not in Main scene FTBE. Also I was away for some time.


If Main scene reports missing global variables then please check provided User manual chapter 3.1 where all global variables are listed and check if they are still existing in HC2 variables panel. If all global variables are existing then try to reboot HC2 or just restart Main scene. If that does not help then you can try to delete and then add global variables as instructed in user manual.




Link to comment
Share on other sites

  • 0
  • Inquirer
  • Hi @Sankotronic


    The scene seemed to be working fine.

    And as i eplied rebooting seemd to settle it.

    However, I just saw that in the debug message area there is still that the message:

    Missing global variable for Time Of Day - Day of week is (..)
    Missing global variable for Season and/or Month


    Now that I looked deeper into it I noticed that in function doTimeOfDay() timeOfDay is not starting with a capital, while the defined Global variable is. So shouldn't it be TimeOfDay with a capital?

    The same for Season and Darkness.


    I tried to test it by changing nly TimeOfDay.

    Then this message disappeared, but some lines further now there is this message:

    [DEBUG] 21:09:00: 2023-08-24 21:09:00.644549 [ error] timer handler failed with error: /opt/fibaro/FibaroSceneAPI.lua:155: Assertion failed: Expected string


    That doesn't make sense (reported error lines are often wrong in my experience): line 155 is about local luxGlo:

    153 -- or you can setup global variables names that are set by other light sensors
    154 -- for example {"LuxGarden","LuxShade"}
    155 local luxGlo      = {}
    156 local luxLevelmin = 100
    157 local luxLevelmax = 300


    So, in summary, could it be an issue that referral to some global variables is not Capitalized?

    And how do I solve this new error message?

    Link to comment
    Share on other sites

    • 0

    Hi @ErnstH ,


    There is line of code in FTBE scene:

    local timeOfDay = "TimeOfDay"


    "TimeOfDay" is the real name of global variable as it is added to global variable panel, so with capitalization.

    timeOfDay is local variable that holds real name of the global variable and in code is only used this local variable without capitalized first letter. When you changed name of local variable then you actually make scene code to fail with Assertion failed.


    I guess that global variable TimeOfDay is somehow changed (not deleted) by other code. Just check if it is still there as predefined variable and can contain only time of day values.



    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.

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