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

Run if device is on for xxx seconds, help.


Question

Posted

Hello, I have an fan extractor in my bathroom and I want it to turn on only if:

 

My bathroom light is on for 600s ( Luz Cozinha )

 

And ( E )

 

TimeOfDay = Morning or Afternoon ( TempoDoDia = Manha or Tarde )

 

If this happens Then ( Entao ):

 

Turn on the Extractor

Turn it of after 900s

 

----

 

For testing I reduced the times to 10s, and with my blocky scene even I turn off my lamp before the 10s, the scenery will turn on the extractor for 10s after the 10s that I turned on my lamp.

 

Please login or register to see this attachment.

 

How can I fix this?

 

Thanks in advance.

Please login or register to see this image.

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

 

4 answers to this question

Recommended Posts

  • 0
  • Inquirer
  • Posted

    Nobody can tell me the Lua command for that please?

    • 0
  • Inquirer
  • Posted

    C'mob people, give me a hand, I have this code:

    Please login or register to see this code.

    In the line n.10 I want this condition but not only if it turns on, I want if it turns on for 900s, can you give me a hand please?

    Please login or register to see this code.

    Thanks.

    • 0
  • Inquirer
  • Posted

    I almost got it, I already done almost everything here is the code:

    Please login or register to see this code.

    Please login or register to see this code.

    Now I just need to do one more thing, turn off the device 186 after 900s, that I know that is:

    Please login or register to see this code.

    But where in the script before can I put it?

    Thanks.

    • 0
  • Inquirer
  • Posted

    Ok, this was the best I can do, maybe the code is not the best but it's working.

    After 6 minutes of the Light '194' is turned ON, the extractor '196' starts to work for 900s ( 15m ), then it turns the extractor off. This only works if Variable 'TempoDoDia' is 'Manha' or 'Tarde' ( Morning or afternoon )

    Please login or register to see this image.

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

    If anyone want to 'optimize' this I'll be grateful, for now it will work like this:

    Please login or register to see this code.

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