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 help - run scene only in defined hours


Question

Posted

Hi, I am fairly new to LUA, and want to gave a scene that tells me (via TTS on Adroid PAW server) that the CO2 level is above a certain limit (based on Netatmo readouts). But I want it to notify me every 30 mins only during a certain period of day only ( example from 11 AM to 5PM). So far i have the mechanism to do the talking and all but would you help me with the scheduling?

what i have so far:

Please login or register to see this code.

[ Added: 2015-01-19, 21:57 ]

ok this works i think, let me know if you can do it better:

Please login or register to see this code.

2 answers to this question

Recommended Posts

  • 0
Posted

Use a global variable. Set this in a scheduler with all your other timers. New good scheduler in a recent post would work set to true when you want scene active from and false when not.

Change this scene to do a simple if statement to check if the global is enabled or disabled.

I use this for all of my lights so that when you are sitting in the evening they do not turn off because of lack of motion. So motion control is only active during certain hours

  • 0
  • Inquirer
  • Posted

    ah this is what i needed

    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" /> I will test that tomorrow morning. I think I saw the scheduler post somewhere. Cheers.

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