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


QA or Scene for temperature control and switching


Djgraphy

Recommended Posts

Hello, I need help with a LUA script in a scene.

The following is planned:

Temp.sensors 3 = S1, S2, S3
Actor 1 = A1

if S1 > S2 then switch on A1, wait 10 min then if S3 < S2 then switch A1 off otherwise check S3<S2 again after 10 min

if A1 off then S1>S2 would have to be checked again.

Thank you in advance.

Link to comment
Share on other sites

  • Topic Author
  •  

     

    if (fibaro.getValue(201, ‚value‘) < fibaro.getValue(77, ‚value‘)) then
    fibaro.call(47, ‚turnOn‘) end

    fibaro.sleep(math.random(10000))

    if (fibaro.getValue(76, ‚value‘) < fibaro.getValue(77, ‚value‘)) then
    fibaro.call(47, ‚turnOff‘) end

     

     

    After that my scene stops how can these if loops be looped over and over again?

    Link to comment
    Share on other sites

    You could use interval in your trigger. Look here for the manual: 

    Please login or register to see this link.

     

    (or use a quickapp)

    Link to comment
    Share on other sites

  • Topic Author
  • Scene dont start again
     
     
     
    {
      conditions = { {
          isTrigger = true,
          operator = "matchInterval",
          property = "cron",
          type = "date",
          value = {
            date = { "00""10""5""3""*""2022" },
            interval = 10
          }
        } },
      operator = "all"
    }
    Link to comment
    Share on other sites

    This is the Example:


    Condition true every 10 minutes, starting at 12:00 5.04.2019

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    {
        type = "date",
        property = "cron",
        operator = "matchInterval",
        value = {
            date = { "0", "12", "5", "4", "*", "2019" },
            interval = 600
        },
        isTrigger = true
    }

     

    So if you want an interval of 10 minutes, in seconds it is 600

     

    If you copy-paste this one, it should work

     

     

    Link to comment
    Share on other sites

  • Topic Author
  • Please login or register to see this attachment.

     

    Sorry  but  its dont start again.   If I use only aktion  " fibaro.call  TurnOn" its run

     

     

    Link to comment
    Share on other sites

  • Topic Author
  • This was a 10 second test to see if it worked. In the live run it will probably be 10 or 20 minutes

    Link to comment
    Share on other sites

  • Topic Author
  • I copied everything again into a new scene and now it works. Thanks for the help.

    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
    Reply to this topic...

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