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

Motion Sensor safe delay


satori

Question

Is it correct to use the red block in order to specify the time neede for the motion sensor to be safe before taking action? I understand that the red block is a delay block but i see no other solution.

What i want is to trigger a scene if the motion sensor is safe for 30 minutes. It randomly works and i get a lot of number of instances warning.

Thank you for your inputs.

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

any "while" for timed value actions in your lua script will freeze your main body life cycles (you script still active in processes FIBARO HC).

so, for example, if you hold script on 30 mins and during 30 mins you have 100 motions - you will have at the least 100 copies of runned scripts here.

if you have 100 motions in first 5 mins and you waiting for 30 mins..... OMG!!.... right, yeah?

 

so, my IMHO you can 

1) terminate script asap. save os.time for example in global table

2) create another script what check motion state safe, compare current time and global time (saved in prev step) - do what you wish

 

or

 

create script with

1) %% autostart

2) 

while true do    

-- some logic with safe / breached here

fibaro:sleep(1000 * 60);  -- every minute for example

end

 

or

 

search ready for use scripts or look to @Sankotronic "tearline"  :) 

 

Have a nice day,

Oleg.

 

btw 

 

Link to comment
Share on other sites

  • 0
  • Inquirer
  • thank you, but no LUA for me, i have HCL. 

    is the situation hopeless without LUA?

    Link to comment
    Share on other sites

    • 0
    1 hour ago, satori said:

    is the situation hopeless without LUA?

     

    sorry, idk

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