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

Triggers and Conditions LUA


Momos

Question

Hi,

 

I am fighting with the triggers and conditions of a scene and it does not want to work ?

There is a motion sensor, a door sensor and a light.

 

What i want to achieve is the following:  check as condition if Lux value <10, and also if any of the sensors are breached then turn the light on.

 

Please login or register to see this code.

 

Any idea why this does not work please?

 

Thank you

Link to comment
Share on other sites

17 answers to this question

Recommended Posts

  • 0
  • Inquirer
  • mine does not.  works if i put the sensors first in the conditions, but then it does not take into account the lux. 

     

    @SmartHomeEddy can you please post your trigger for that scene ?

    Edited by Momos
    Link to comment
    Share on other sites

    • 0

    This is the code

     

    Please login or register to see this code.

     

    221 is my lux and my two motion sensors are 219 and 228

     

     

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • they are the same ?  no ideea why it does not work for me

     

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • hehe  action code is 

    fibaro.call(64, 'turnOn')

     

    i've set some trigger debugs also, scene just does not get triggered.

     

    So i resorted to the last known method.... delete the scene... copy paste again... and it works ? 

     

    cheers :) 

     

    Link to comment
    Share on other sites

    • 0
    1 hour ago, Momos said:

    hehe  action code is 

    fibaro.call(64, 'turnOn')

     

    i've set some trigger debugs also, scene just does not get triggered.

     

    So i resorted to the last known method.... delete the scene... copy paste again... and it works ? 

     

    cheers :) 

     

     

    I had similar behavior of my HC3 this weekend. Had to do the same as you.....Very unreliable.

    Link to comment
    Share on other sites

    • 0

    Why is there no simple trigger or checkbox that executes a scene when HC3 starts?
    In my opinion you can always use that.

    Link to comment
    Share on other sites

    • 0
    2 hours ago, jwi said:

    Why is there no simple trigger or checkbox that executes a scene when HC3 starts?

    1
    2
    3
    4
    5
    6
    7
    {
        type = "se-start",
        property = "start",
        operator = "==",
        value = true,
        isTrigger = true
    }
    Link to comment
    Share on other sites

    • 0
    2 hours ago, 10der said:
    type = "se-start",
        property = "start",
        operator = "==",
        value = true,
        isTrigger = true

    @10derThank you, I probably missed it

    But that's exactly what I was looking for.

    Link to comment
    Share on other sites

    • 0

    Typo in original code @Momos in your first post above?  Seems to say “conditons”... does that explain something?

    Edited by Greenhippo
    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • 1 hour ago, Greenhippo said:

    Typo in original code @Momos in your first post above?  Seems to say “conditons”... does that explain something?

     

    Eh ?  there is no typo there. It is as per fibaro LUA manual 

    Please login or register to see this link.

     and it works very well.

    Link to comment
    Share on other sites

    • 0
    On 6/5/2020 at 8:12 PM, Momos said:

    operator = "any", conditons = {

     

    Forgive me if I'm "barking up the wrong tree", but there is a typo "conditons" with no 'i' following the 't'.  I was just wondering if that was the cause of your original problem.

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • ahaha you are right:) i corrected that after submitting the first post :)  scene works now very well :) cheers

     

    Link to comment
    Share on other sites

    • 0
    On 6/17/2020 at 9:35 PM, jwi said:

    @10derThank you, I probably missed it

    But that's exactly what I was looking for.

     You can find this:

    Please login or register to see this image.

    /monthly_2020_06/image.png.87a61a510417ffa36cb1119c37c631cb.png">

     

     

    and more in Home Center 3 Lua documentation ; )

     

    Please login or register to see this link.

    Link to comment
    Share on other sites

    • 0
    On 6/19/2020 at 11:55 AM, I.Srodka said:

     You can find this:

    Please login or register to see this link.

     

     

    and more in Home Center 3 Lua documentation ; )

     

    Please login or register to see this link.

     

    This will answer the question "how to start a scene by startup" but not why no trigger work as to expect.
    If the scenes with some more conditions need to be started by boot and than handled everything in the "action" script ... this will break every design and sense for "Trigger delaration".

    As mentioned in my post, many triggers does not work for me and checking the "manual" i cannot find any root cause:

     

    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.

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