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
11 hours ago, jgab said:

 

 

So

Please login or register to see this code.

will trigger if $LuxNiveau1 sets to 'schemer' during the given interval.

Because it triggers at 15:30 it will also run the action if $LuxNiveau1 equals 'schemer' at 15:30.

That's were it goes wrong, the action always runs at 15:30, even if $LuxNiveau1 <> 'schemer'. That's were the problem is.

 

11 hours ago, jgab said:

So, the question is, what do you want to happen at 20:00 ? 

1. You want to run the action even if $LuxNiveau1 is not equal to 'schemer' ?

No, I want the action to run at latest at 20:00 or if it's 'schemer' but only in the timeframe 15:30-21:00. I know the timing conflicts between 20:00 and 21:00, I could set it to 15:30-20:00

11 hours ago, jgab said:

2. You want to run the action even if the action have been run earlier (from 15:30 to 20:00) ?

no.

Posted (edited)

@jgaI did some extra testing:

 

Please login or register to see this code.

This one works fine, it doesn't run the action at 9:19 if $testVar <> 'thuis' 

so, works as expected

 

Please login or register to see this code.

this one however, doesn't work as expected. It runs the action at 09:19 even when $testVar <> 'thuis'

I guess the OR function messes things up?

 

I do have other rules with the timing statement in an AND rule only, and that also works as expected. 

Edited by emielstroeve
  • Topic Author
  • Posted
    38 minutes ago, emielstroeve said:

    @jgaI did some extra testing:

     

    Please login or register to see this code.

    This one works fine, it doesn't run the action at 9:19 if $testVar <> 'thuis' 

    so, works as expected

     

    Please login or register to see this code.

    this one however, doesn't work as expected. It runs the action at 09:19 even when $testVar <> 'thuis'

    I guess the OR function messes things up?

     

    I do have other rules with the timing statement in an AND rule only, and that also works as expected. 

    You are right, the @09:30 causes the rule to trigger at 09.30, but when evaluated as part of another trigger it always returns true.

    The reason is that the @time was historically an exclusive time trigger in a rule. If there was a @time all other triggers were disabled. Over time that changed.

    However, @time always returned true when tested as it was obvious that it was called at <time>. Which is not true of course if triggered by other triggers.

     

    I have been aware of this short-coming/trade-off but I was reluctant to let @time test if the time was the current time. The reason is that when a rule is triggered and the test is actually run, it could be a second late, and the test would return false.

     

    However, after some thinking I have made a new version of ER where I do this test and I save the time the rule was expected to fire and compare against that time - thus it will always be correct if testing @time against firing time.

     

    Long story short. There is a new version of ER4 v.0.996, where @time return false if the rule is invoked and the time is not the same.

     

    Your rule, I expect, would then work because it would test the alternative $testVar=='thuis' path which then could be true instead.

     

    Thanks for helping to improve ER.

    • Like 1
  • Topic Author
  • Posted

    ...and as soon as I posted I found a bug. v0.997 is the valid version.

    (we are getting close to v.1.0 ;-) )

    Posted (edited)

    Jan, did I lost my startup tool?

    Rule.eval([[hal.door:isOpen | @now+00:00:08 => ????

    If I need to try some rules I am using @now+00+00+08 but in the latest update it does't start anymore.

    With what I can replace this delayed execution on start?

    Edited by Sjakie
  • Topic Author
  • Posted (edited)
    19 hours ago, Sjakie said:

    Jan, did I lost my startup tool?

    Rule.eval([[hal.door:isOpen | @now+00:00:08 => ????

    If I need to try some rules I am using @now+00+00+08 but in the latest update it does't start anymore.

    With what I can replace this delayed execution on start?

    No, it doesn't work anymore. It was also a kind of hack as it had strange side effects - like triggering the rule again after 24 hours...

     

    The best way is to implement a test trigger variable.

     

    Please login or register to see this code.

    all rules that have  a " & test" will be started after 3 second.

    If you want to remove the startup test then just comment out the 

    Please login or register to see this code.

     

    if you have several rules with different delays

    Please login or register to see this code.

     

    Edited by jgab
    Posted

    Jan, thanks but I have error:

    Please login or register to see this code.

    Please login or register to see this code.

     

  • Topic Author
  • Posted

    Yes I edited the post and added a ‘do’

    Posted

    Jan, sorry to bother you but if I see this in debug:

    Please login or register to see this code.

    Can you do something with it  in ER4?

    With a QA I am able to import this info name it fa keuken.radar

    Rule.eval([[keuken.radar:isOn |keueke.radar:isOff => log('......   it will show nothing

    Please login or register to see this code.

    The action should be on/off or safe/breached

    Thanks ink advance

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

    Jan, sorry to bother you but if I see this in debug:

    Please login or register to see this code.

    Can you do something with it  in ER4?

    With a QA I am able to import this info name it fa keuken.radar

    Rule.eval([[keuken.radar:isOn |keueke.radar:isOff => log('......   it will show nothing

    Please login or register to see this code.

    The action should be on/off or safe/breached

    Thanks ink advance

    I have no idea what this QA is doing. Please explain.

    Posted

    With this QA you can import devices from home assistant.

    But not all devices are working correct.

    The developper is not responding anymore

    I have send the QA in PM 

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

    With this QA you can import devices from home assistant.

    But not all devices are working correct.

    The developper is not responding anymore

    I have send the QA in PM 

    Seems to be buggy and not updating the property of the binary sensor child QA

    Posted

    Can you improve it?

    Posted

    Hi

     

    In the eventrunner 4, in main , befor this line >   fibaro.event({type='_startup_'},function() I put this

      Rule.eval("{@@00:00:05, sunrise+03:00, sunset-04:00} => log('Ding Dong')")
     

    My intention is to print this log between sunrise+03:00, sunset-04:00 in every 5 seconds , but doesn't work

    Could you help me?

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

    Hi

     

    In the eventrunner 4, in main , befor this line >   fibaro.event({type='_startup_'},function() I put this

      Rule.eval("{@@00:00:05, sunrise+03:00, sunset-04:00} => log('Ding Dong')")
     

    My intention is to print this log between sunrise+03:00, sunset-04:00 in every 5 seconds , but doesn't work

    Could you help me?

    Please login or register to see this code.

     

    Posted

    Jan, this does't work and I have no idea why.

    Please login or register to see this code.

    I isolated the first part of trigger in () did't help

    If I remove the first part of the trigger it will show the execution of this rule.

    PLease advice

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

    Jan, this does't work and I have no idea why.

    Please login or register to see this code.

    I isolated the first part of trigger in () did't help

    If I remove the first part of the trigger it will show the execution of this rule.

    PLease advice

    Tricky, my testvar approach need some modification. One needs to reset the testvar to false (test8 in your case)

    ...or try this

    Please login or register to see this code.

     

    Posted

    Nope Jan no activation of the trigger

    Posted

    When I wrote the command below, it worked well, but at some point, the notification stopped coming to my phone.

     

    Please login or register to see this code.

     

     

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