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 Szene HC3L Help ?


Guest swissnet3000

Question

Guest swissnet3000

HC3L


Can someone help me ? I'm new to the LUA scene :)

I would like it to be switched on at 06:00 in the morning and off again at 08:00, and on again in the evening at 20:30 and switched off again at 23:30.

 

{
  conditions = { {
      isTrigger = true,
      operator = "match",
      property = "cron",
      type = "date",
      value = { "00", "06", "*", "*", "*", "*" }
    }, {
      isTrigger = true,
      operator = "match",
      property = "cron",
      type = "date",
      value = { "30", "20", "*", "*", "*", "*" }
    } },
  operator = "any"
}
Edited by swissnet3000
Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

No, it should look like this!
08:00 or 23:30

 

Greetings from Germany / Sauerland
Frank

 

Please login or register to see this code.

 

Link to comment
Share on other sites

  • 0
Guest swissnet3000
  • Inquirer
  • Möchte ein und Ausschalten in eine Szene haben.

     Grüsse aus der Schweiz

    ein: 06:00

    aus 08:00

     

    ein 20:30

    aus 23:30

     

    Edited by swissnet3000
    Link to comment
    Share on other sites

    • 0

    honestly this is how it was necessary to create scenes on HC2. Since we have HC3/HC3L, the LUA engine is evaluating anyway the trigger table, long before the scene get triggered (or not - if the pretrigger engine decided, based on the trigger table, to not call the scene at all), this saves resources!

     

    Therefore is much better to create (in your case) 4 triggers, one for each to the times, and evalute which of them got triggered in "actions" with sourceTrigger.

     

    In this case the trigger will get called only 4 times, the action as well only 4 times per day (and not 1440 times), no extra calls for os.date necessary each every minute. Additionally easy logic to evaluate who ran the scene, e.g.

     

     

    Please login or register to see this code.

     

    • Like 3
    Link to comment
    Share on other sites

    • 0
    Guest swissnet3000
  • Inquirer
  • Vielen Dank für die vielen Informationen. THX 

    Link to comment
    Share on other sites

    • -1

    Good Morning

    Here is the scene you would like to have.
    On the left side you have a 1 minute trigger, which means every minute the right side is run through 1 x.
    On the right side you can see the process.
    I get the current time and compare it with the specifications.
    Well, you can see what's going on for yourself.
    You only have to set the IDs of the lamp correctly.
    Greetings from the neighboring country
    Frank

     

    Guten Morgen

    Hier ist die Scene die du gerne hättest.
    Auf der Linken Seite hast du einen 1 min Trigger, das bedeutet jede Minute wird die Rechte Seite 1 x durchlaufen.
    Auf der Rechren Seite siehst du den Ablauf.
    Ich hole mir die Aktuelle Zeit und vergleiche sie mit den Vorgaben.
    Na ja du siehst ja selbst was da passiert.
    Nur die ID´s der Lampe musst du noch richtig stellen.
    Grüße aus dem Nachbarland
    Frank

     

    Hier mal ein Paar Quellen für Infos.

    Please login or register to see this link.

    Please login or register to see this link.

    Please login or register to see this link.

    Please login or register to see this link.

    Please login or register to see this link.

    Please login or register to see this link.

    Please login or register to see this link.

    Please login or register to see this link.

    Please login or register to see this link.

     

     

    Declaration

    Please login or register to see this code.

     

    Aktion

    Please login or register to see this code.

     

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