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

LUA scene for sunset + 60 min


Question

Posted

Hello guys,

I have a problem and i can't find a real solution..

 

I have some roller shutter on my home and i need a scene that will close selected ID based on 2 conditions:

Condition 1: After sunset + 60 minutes

Condition 2: If value of a temperature sensor is bellow 15

 

I write a scene based on this but every time temperature sensor change value, the scene is running and this annoying.

Also i create variable that store time of day and temperature, same....once temperature change....run...

 

Please login or register to see this code.

 

 

10 answers to this question

Recommended Posts

  • 0
  • Inquirer
  • Posted

    This is second code...with value stored local

     

    Please login or register to see this code.

     

    • 0
    Posted (edited)

    After shutdown. Save state into global var and check if u already shuttled downed simple exit

    at the morning.do not forget clear saved state

     

    good event Sir  

    Edited by 10der
    • 0
  • Inquirer
  • Posted
    6 minutes ago, 10der said:

    After shutdown. Save state into global var and check if u already shuttled downed simple exit

    at the morning.do not forget clear saved state

     

    good event Sir  

     

    I will try this.

    Also a solution how to set sunset + 60 minutes?

    Thanks

    • 0
    Posted (edited)
    10 minutes ago, MDC said:

    Also a solution how to set sunset + 60 minutes?

    Hmmmm

     

    Please login or register to see this code.

     

    Edited by 10der
    • 0
  • Inquirer
  • Posted

    For sunset + 60 minutes i fixed on old style...

    I create a block scene that at sunset + 60 min set a variable, and then i use that variable as a rule for my morning scene.

     

    I think less stress for system...anyway that you for support!!!!!!

    • 0
    Posted (edited)

    Is it works now?

    Looks like your problem starts in

    Please login or register to see this code.

    Let's assume temperature changed, but your global value "Perioada_zilei" still equal "ziua" it will execute all notifications.

     

    May I suggest to download and use "All-in-One Scene" , this is exactly the case that scene written for...

    You'll get rid of all your global variables and block scenes, as you said

    6 hours ago, MDC said:

    I think less stress for system...

     

    Edited by cag014
    • 0
    Posted
    5 hours ago, cag014 said:

    May I suggest to download and use "All-in-One Scene"

    It’s stress for him system ;) 

    • 0
  • Inquirer
  • Posted
    On 12/4/2019 at 8:14 AM, 10der said:

    It’s stress for him system ;) 

    i rewrite the whole scene....

     

    On 12/4/2019 at 2:37 AM, cag014 said:

    Let's assume temperature changed, but your global value "Perioada_zilei" still equal "ziua" it will execute all notifications.

    Yes, i noticed, i remove notifications, rest works fine..

    • 0
    Posted
    28 minutes ago, MDC said:

    Yes, i noticed, i remove notifications, rest works fine..

    The problem is not only notifications, on every temperature change you send open commands X 3  over and over... keeping Z-wave traffic busy for no reason.

     

    • 0
  • Inquirer
  • Posted
    On 12/5/2019 at 10:59 PM, cag014 said:

    The problem is not only notifications, on every temperature change you send open commands X 3  over and over... keeping Z-wave traffic busy for no reason.

     

     

    Yes, I noticed, I rewrite everything. I created another variable that store roller position and use that as a part of new scene.

    Now everything works great, even notification.

     

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