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


Recommended Posts

Posted
47 minutes ago, ChristianSogaard said:

Slave rule in EV4

 

Hi Jan

I would like to configure a slave rule - a rule that is triggered when another rule trigger, but does something else - so i tried these two rules

the rule @{catch,00:01 never triggers, could i do something else than the catch ?

 

 

Please login or register to see this code.

 

I got it ?

Please login or register to see this code.

 

  • Topic Author
  • Posted (edited)
    50 minutes ago, ChristianSogaard said:

    Slave rule in EV4

     

    Hi Jan

    I would like to configure a slave rule - a rule that is triggered when another rule trigger, but does something else - so i tried these two rules

    the rule @{catch,00:01 never triggers, could i do something else than the catch ?

     

     

    Please login or register to see this code.

     

     

    @00:01 means 1 minute after midnight.

    @@00:00:01 would run after a second and could work.

     

    However, it is much better to just post an event of your own - think about it as calling a subroutine. Note, the first rule will execute to the wait(00:10) before the other rule triggers and start to execute. (ecerytime a rule does a wait() it will give time to other rules to run that are waiting for it)

     

    Please login or register to see this code.

     

    Edited by jgab
    • Thanks 1
    Posted

    Jan,

    I need your expertise this rue doest work:

    Rule.eval([[$SanitairToilet=='Vrij' & (toilet.Spottoilet:last - now) > 00:01:12 =>
         $ToiletExtraAfzuiging='Aan';
            log('Extra afzuiging toilet -aan en na x min - Uit')
                    ]])
    Please advice,
    //Sjakie
     

     

    Posted

    Interesting, you can pee in less than 1 minute and 12 seconds ???

  • Topic Author
  • Posted
    2 hours ago, Sjakie said:

    Jan,

    I need your expertise this rue doest work:

    Please advice,
    //Sjakie

    Please login or register to see this code.

    last - now can never be positive, unless last is in the future - you probably need to switch the values

     

    Btw, if you paste the code inside an editor "code comment" <...> it may be better formatted, it's really hard to read otherwise.

    Posted

    Jan,

    Thanks for the solution, stupid I didt see it by myself.

    I wast aware how to tackle this issue, mostly I copy/paste first in Notepath before paste in forum. Thanks for the hint.

    @SmartHomeEddyyou smart...!

    I am fastSjakie

     

    Posted (edited)
    56 minutes ago, Sjakie said:

    I am fastSjakie


    hahaaa, especially the 12 seconds, sounds like you pee with a stopwatch in your other hand ? Or is there a international benchmark for that? ?

     

    maybe @jgab could add a routine to EV based on gender, age. ..

    Edited by SmartHomeEddy
    Posted

    12 sec has a purpose!

    My QA is rather long and its easy to find a rule back if seconds are added to determine ad once where to look.

    A day not laughed is a day not lived!

    //Sjakie

    • Like 1
    Posted (edited)

    Hi all, 

    I just received a new HC3 to replace my old HC2.

    Very interested in setting up EventRunner4 to replace all my HC2 scenes. I checked here and on GitHub, but not sure on "step by step, how and where to start"

    I installed the last version of EventRunner4 and QA_toolbox QuickApps, and would like to start to play with some rules.

    How exactly should I set up the script? as a scene?

    Thanks for your support and indulgence toward a rookie and his questions ;)

     

    edit: actually I see that there is nothing else to do, working just fine (I was not yet familiar with the edition of QA in HC3, but now I found out how to do it! Thanks for this amazing tool, will start using it to re-build my old HC2 scenes.

    Edited by ndelaet
  • Topic Author
  • Posted
    2 hours ago, ndelaet said:

    Hi all, 

    I just received a new HC3 to replace my old HC2.

    Very interested in setting up EventRunner4 to replace all my HC2 scenes. I checked here and on GitHub, but not sure on "step by step, how and where to start"

    I installed the last version of EventRunner4 and QA_toolbox QuickApps, and would like to start to play with some rules.

    How exactly should I set up the script? as a scene?

    Thanks for your support and indulgence toward a rookie and his questions ;)

     

    edit: actually I see that there is nothing else to do, working just fine (I was not yet familiar with the edition of QA in HC3, but now I found out how to do it! Thanks for this amazing tool, will start using it to re-build my old HC2 scenes.

    You don't need to install QA_toolbox, relevant files are included in the ER4 QA.

    If you want to run and debug ER4 QA offline you need to download some of the supporting files.

    Here is "ER4 the movie"

     

     

    Please feel free to ask questions in this thread  if you have difficulties with creating rules.

    A reminder to all using ER4 is that it's easy to integrate own Lua functions into rules, so all logic does not necessarily need to be expressed with event script.

    Posted

    Hi jgab,

     

    Thanks a lot for the reply.

    Working with Eventscript almost non stop since yesterday, I am really amazed… So powerful, so easy, so reactive on the HC3. It’s a real game changer for fast, efficient yet advanced automation. Most of my old scenes are already "converted", and working perfectly!

     

    Being totally rookie in programming, I re-create most of the rules by mimetism, leveraging on the many examples in the dozens of posts on this forum.

     

    A few things I could not (yet?) find:

     

    1. I would like a given lamp to “follow” the dimming level of the main lamp, only as of the moment the main lamp’s value is above 5%. How can I do that with a rule?
    2. I would like to trigger a scene through the sceneActivationEvent of a Fibaro dimmer 2. I tried to use an adapted version of the “Rule.eval("mySwitch:scene == S2.click => myLight1:on”)” but it does not work. Is there a more up to date “formula”?

     

    Thanks! I will certainly have more questions in the coming days, as I will start using more "advanced" ER4 capabilities

  • Topic Author
  • Posted
    2 hours ago, ndelaet said:

    Hi jgab,

     

    Thanks a lot for the reply.

    Working with Eventscript almost non stop since yesterday, I am really amazed… So powerful, so easy, so reactive on the HC3. It’s a real game changer for fast, efficient yet advanced automation. Most of my old scenes are already "converted", and working perfectly!

     

    Being totally rookie in programming, I re-create most of the rules by mimetism, leveraging on the many examples in the dozens of posts on this forum.

     

    A few things I could not (yet?) find:

     

    1. I would like a given lamp to “follow” the dimming level of the main lamp, only as of the moment the main lamp’s value is above 5%. How can I do that with a rule?

     

    rule("mainLamp:value > 5. => followLamp:value = mainLamp:value")

    Everytime mainLamp changes value and the value is greater than 5 (0..99 ~5%) set the followLamps value to the mains value

    2 hours ago, ndelaet said:
    1. I would like to trigger a scene through the sceneActivationEvent of a Fibaro dimmer 2. I tried to use an adapted version of the “Rule.eval("mySwitch:scene == S2.click => myLight1:on”)” but it does not work. Is there a more up to date “formula”?

    It looks ok to me. Sometimes the sceneActivationEvents can be tricky to get to work.

    Can you create a block scene that reacts on the sceneActivation from that switch?

    Do you see a trigger being logged in ER4 when you make an S2 click?

     

    2 hours ago, ndelaet said:

    Thanks! I will certainly have more questions in the coming days, as I will start using more "advanced" ER4 capabilities

     

    Posted
    4 hours ago, jgab said:

    rule("mainLamp:value > 5. => followLamp:value = mainLamp:value")

    Everytime mainLamp changes value and the value is greater than 5 (0..99 ~5%) set the followLamps value to the mains value

     

    Perfect thanks, working!

     

    4 hours ago, jgab said:

    It looks ok to me. Sometimes the sceneActivationEvents can be tricky to get to work.

    Can you create a block scene that reacts on the sceneActivation from that switch?

    Do you see a trigger being logged in ER4 when you make an S2 click?

     

    Ok it works now, used (sorry, in French):

    Please login or register to see this code.

     

    I now finalised the transfer of what I had on HC2... Now I will think about all the new things I will be able to add thanks to your QA!

     

    Is there somewhere a repository of all rules examples, or all rules that have been developed by you or others, to get inspired?

     

    Thanks,

  • Topic Author
  • Posted
    1 hour ago, ndelaet said:

     

    Perfect thanks, working!

     

     

    Ok it works now, used (sorry, in French):

    Please login or register to see this code.

     

    Good. ...but it doesn't work if you test against S2.click? (that is 26)

     

    1 hour ago, ndelaet said:

    I now finalised the transfer of what I had on HC2... Now I will think about all the new things I will be able to add thanks to your QA!

    Is there somewhere a repository of all rules examples, or all rules that have been developed by you or others, to get inspired?

    Thanks,

    No, no real repository. Would be nice if Fibaro allowed for a Wiki where we could edit together.

    Posted

    Good morning Jan,

    Question I use your alarm scene with full satisfaction.

    Is it possible to in- or exclude devices in alarm panel with ER?

    Why, now its freezing and to prevent frozen waterpipes heating is enabled on some places but also doors need to stay open to heat other places and therefor excluded from alarm.

    Okay I know I can do it by hand but it should be nice if my GV $Freezing=='Yes' can do it for me.

    Thanks in advance,

    //Sjakie

    Posted

    Hello, 

     

    19 hours ago, jgab said:

    Good. ...but it doesn't work if you test against S2.click? (that is 26)

    I checked, and it also works fine... I think I had an issue with the device itself (I reconfigured it, now it works much better...)

     

    Other question: I have 2 remotes, and currently their rules are quite heavy, yet exactly identical:

     

    Please login or register to see this code.

     

    --> Is there a possibility to use a "toggle" function to alternate between ON and OFF status of a device?

    --> Is there a possibility to use the same rules for both remotes? I tried to put keyfobDN = {75, 77} but it does not seem to work

     

    Thanks for any ideas!

     

  • Topic Author
  • Posted
    1 hour ago, ndelaet said:

    Hello, 

     

    I checked, and it also works fine... I think I had an issue with the device itself (I reconfigured it, now it works much better...)

     

    Other question: I have 2 remotes, and currently their rules are quite heavy, yet exactly identical:

     

    Please login or register to see this code.

     

    --> Is there a possibility to use a "toggle" function to alternate between ON and OFF status of a device?

    --> Is there a possibility to use the same rules for both remotes? I tried to put keyfobDN = {75, 77} but it does not seem to work

     

    Thanks for any ideas!

     

    Yes, toggle should work if it's a binary switch.

     

    Create a rule that re-posts the keys in a more compact format.

    Please login or register to see this code.

     

    and then re-use these events in the rules

    Please login or register to see this code.

    etc.

  • Topic Author
  • Posted
    14 hours ago, jgab said:

    Yes, toggle should work if it's a binary switch.

     

    Create a rule that re-posts the keys in a more compact format.

    Please login or register to see this code.

     

    and then re-use these events in the rules

    Please login or register to see this code.

    etc.

     

    Another variant, one rule per remote and a || >> selector

    Please login or register to see this code.

     

    • Thanks 1
    Posted

    Jan,

    What can cause this?

    [09.02.2021] [11:30:59] [TRACE] [QUICKAPP797]: Check - overLoop.pir:breached false
    [09.02.2021] [11:30:59] [TRACE] [QUICKAPP797]: Check - overLoop.pir:safe false

    Should be one of the two true?

    //Sjakie

  • Topic Author
  • Posted
    12 minutes ago, Sjakie said:

    Jan,

    What can cause this?

    [09.02.2021] [11:30:59] [TRACE] [QUICKAPP797]: Check - overLoop.pir:breached false
    [09.02.2021] [11:30:59] [TRACE] [QUICKAPP797]: Check - overLoop.pir:safe false

    Should be one of the two true?

    //Sjakie

    What is overLoop.pir? More than one device?

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