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


  • 0

Help needed with LUA


Question

Posted

Hi Guys,

Here I am again!

If you are using global variables in a scene I cant do that or the system does not allow me or I am doing something wrong.

I have the complex devided in 3 parts and created the GV's:

GV

house      :              present       away

upstairs  :              present       away             Remark: different persons in 3 posibilities

outside  :               present       away

 

to "arm" it will become a combination of above house is always involved

I create one scene to include all for example:

if

( fibaro:getGlobalValue("house") == "present" )then

elseif

( fibaro:getGlobalValue("house") == "away" )then

 

elseif

( fibaro:getGlobalValue("upstairs") == "present" )then

.........

elseif

( fibaro:getGlobalValue("upstairs") == "away" )then

..........

elseif

( fibaro:getGlobalValue("outside") == "present" )then

elseif

( fibaro:getGlobalValue("outside") == "away" )then

..........

It will not work only the first mentioned GV in header will be executed.

I changed also elseif in if

I tried the GV one by one in a seperate scene and that works.

Where I go wrong????

Thanks in advance for the help.

2 answers to this question

Recommended Posts

  • 0
  • Inquirer
  • Posted

    Hello

    Please login or register to see this link.

    Thank you for responding. Ofcourse it was the guy behind the keyboard! I made a few (typo) mistakes with bringing the files together and worse was I created 2 GV wrong so it gave me the idea of lua script hanging somewhere. The response of switching GV was also a bit long so it was confusing me too

    To simplify I splitted my file in two pieces one for the warnings and one to arm.

    It goes now in the right direction>>> will keep you all informed and for sure I will have a question again.

    Thanks!

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