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


Recommended Posts

Posted

I'd like to see an optional parameter added that will disable triggering scenes when setting a global variable in LUA. The HTTP API has this functionality albeit in reverse (default to false)

Something along the lines of:

Please login or register to see this code.

Where:
varName: The name of the global variable

value: The new value of the global variable
invokeScenes: Boolean, default true

Posted

You can disable scene , change global variable, activate scene again by lua

  • Topic Author
  • Posted

    You can disable scene , change global variable, activate scene again by lua

    Yes I know which is why I posted this in the idea's forum. Just a little bit of programming consistency and efficient coding (minimising the need to keep track of and change scene/virtual/device id's all over the place)

    Disabling and enabling scene's requires knowing the scene id. Adding the 'invokeScenes' parameter removes the need for this.

     

    Just an idea ... 

    Please login or register to see this image.

    /emoticons/default_smile.png" alt=":)" srcset="https://forum.fibaro.com/uploads/emoticons/[email protected] 2x" width="20" height="20" />

    Posted

    That "invokeScenes" statment is available with REST API. See

    Please login or register to see this link.

    .

    So if you change variable with REST API and not with fibaro:setGlobal(), than you can use "invokeScenes".

     

    In JSON body it will be {"value":"xyz","invokeScenes":true}.

     

    You can use it in LUA. I used it with HCL, so i had to made virtual device, that uses REST API.

     

    @Fibaro: You could implement "invokeScenes" into setvariable in Block scenes and in LUA scenes and set it to true by default.

    • 8 months later...

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Reply to this topic...

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