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

Question about some lines of coding again


Question

Posted

Hi all,

 

Once again I have to ask for the meaning of a piece of LUA-coding directly in the beginning:

 

--[[

%% properties

82 value

85 value

82 armed

85 armed

%% globals

AlarmMode

--]]

 

82 and 85 are the IDs of some of my motion sensors! But for what the lines within properties are used for? And are they necessary to work for the scene?

 

Thanks and cheers,

alkorsi

 

 

5 answers to this question

Recommended Posts

  • 0
Posted

These are the triggers, when to start the scene, if any of these id device properties are changed the scene will run.

In your example, if 82/85 gets any motion or get armed/disarmed it will run.

  • 0
  • Inquirer
  • Posted

    Hi,

     

    Thanks!

     

    Is the same valid for my global variable "AlarmMode"? And it is listed within "globals" because it is a global variable and not a device? Or is the meaning here a little bit different?

     

    Thanks again and cheers,

    alkorsi

    • 0
    Posted

    The global variable def. got the same behaviour, upon change it will run the scene. So its correct as you state. The only difference is that its a variable.

    Bare in mind that the variable must be changed using a scene to trigger. (Not via eg. a direct API change)

    • 0
    Posted

    The global variable def. got the same behaviour, upon change it will run the scene. So its correct as you state. The only difference is that its a variable.

    Bare in mind that the variable must be changed using a scene to trigger. (Not via eg. a direct API change)

     

    API calls for changing the variable can now trigger scene, add "invokeScenes":true to body of your call.

    • 0
    Posted

    nowacki, thanks! Example or link to documentation of this new feature?

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