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

Yes but my feeling is that somehow Fibaro cloud is causing these issues from time to time, they are not local.  I have no idea if thats even possible, it is just a hunch.

Link to comment
Share on other sites

I set up rule that send me email every time Event runner 4 QA is starting and I got email every hour at 28 minute. Then i add another "clean" EV4 QA, to be sure that restart is not caused by my bad written rule, but another one QA do the same. Is anybody else having this problem, or i have to reset whole HC?

Link to comment
Share on other sites

Mine does not do that. I am on version Fix67.

First i would check if there is any rule that triggers the restart. Disable all the rules and see if it still does that.  Then reboot if it still does.

Link to comment
Share on other sites

Now, thinking about it, is there a way to turn off/on all the rules in a QA of ER4 ?  

 

There are those 4 buttons which to be honest i never looked at what they do ?

Please login or register to see this image.

/monthly_2021_07/image.png.efef2a37df9fc7872048b388d985cb50.png" />

 

Trigger : displays all triggers 

Post: does not seem to do anything .  What is it supposed to do ?

Rule: not sure what it does also as no matter if i set it on ON or OFF rules still work :)  Seems to be about displaying all (true or false) or only true.

Restart: does a restart.

 

So excuse my noobish question, what are POST and RULE supposed to do ? 

 

Cheers :) 

 

Edited by Momos
Link to comment
Share on other sites

Fellow ER 4 users.

Fibaro showed me yesterday evening  in the cloud a red sign! I did not pay attention on it because you mention it it can be.

I dont know but as long as HC3 is on (on-off line it doest matter) QA's are running.

ER4 is much better than Fibaro so its easy error>>Fibaro.

If you write much worse rules as me than you will see after restart an error in debug, mostly.

I use to get info about restarting  QA's:

Please login or register to see this code.

At this moment I prefere Telegram option because its always functioning, push messages not.

//Sjakie

 

Link to comment
Share on other sites

  • Topic Author
  • 33 minutes ago, Momos said:

    Now, thinking about it, is there a way to turn off/on all the rules in a QA of ER4 ?  

     

    There are those 4 buttons which to be honest i never looked at what they do ?

    Please login or register to see this link.

     

    Trigger : displays all triggers 

    Post: does not seem to do anything .  What is it supposed to do ?

    Rule: not sure what it does also as no matter if i set it on ON or OFF rules still work :)  Seems to be about displaying all (true or false) or only true.

    Restart: does a restart.

     

    So excuse my noobish question, what are POST and RULE supposed to do ? 

     

    Cheers :) 

     

    It's old code that toggle the debugflags

    _debugFlags.trigger = true -- log incoming triggers
    _debugFlags.post = true    -- log internal posts
    _debugFlags.rule=true      -- log rules being invoked (true or false)

    Link to comment
    Share on other sites

    Jan,

    We where a few days away from home.

    The first evening our complex disarmed because somebody at home according IOS. Wierd me,(user and admin) and my wife left physically.

    Now we are back home and I see that my wife is still away. So I modified the rule that also her device will be in log if location change.

    //Sjakie

    Link to comment
    Share on other sites

    5 hours ago, jgab said:

    It's old code that toggle the debugflags

    _debugFlags.trigger = true -- log incoming triggers
    _debugFlags.post = true    -- log internal posts
    _debugFlags.rule=true      -- log rules being invoked (true or false)

     

    Ah that one about internal post i did not figure . ?

     

    But stil, is there a clean way of turning off all the rules in a QA ?  Example: i have an AC QA - thats all it does, control some AC units.  But when i leave home for 2-3 days i would like to just turn off the rules in the QA so AC doesnt start for nothing. Now i go into edit mode and commebt each rule ?

     

    Possible ?

    Link to comment
    Share on other sites

    @Momos use atHome with rules or away with rules.

    //Sjakie

    Link to comment
    Share on other sites

  • Topic Author
  • 11 hours ago, Momos said:

     

    Ah that one about internal post i did not figure . ?

     

    But stil, is there a clean way of turning off all the rules in a QA ?  Example: i have an AC QA - thats all it does, control some AC units.  But when i leave home for 2-3 days i would like to just turn off the rules in the QA so AC doesnt start for nothing. Now i go into edit mode and commebt each rule ?

     

    Possible ?

    Well, you can disable the QA in the WebUI but of course that may be too "manual" and there is no way the QA can enable itself... However, another QA could enable/disable the QA.

     

    Another approach is that you can enable/disable individual rules

    Ex.

    Please login or register to see this code.

    The rule function returns a reference to the rule that can be used as an argument to enable() and disable()

    The reference also has functions for enable/disable/print/start that we can use directly

    Please login or register to see this code.

    So enable(ref) is just a function that calls .disable() on the ref.

    The advantage with enable(ref) is that it can also take a list of rule references.

    If we declare our rules inside a list we can use that list to enable and disable sets of rules

    Please login or register to see this code.

     

    We start the rules disabled by calling .disable() on the ref we get back from rule(...).

    .disable() returns the ref again so we can chain the commands. Try rule("@@00:00:02 => log('Ding')").disable().print()  ....

     

    We can also create sections of rules

    Please login or register to see this code.

     

    This looks cleaner than collecting them in a list. You can create multiple sections and enable/disable them individually.

    Edited by jgab
    Link to comment
    Share on other sites

    Jan,

    Normal this rule will post restart +00:00:05 or 8 second

    why it also starts 5 & 8 sec after midnight?

    Please login or register to see this attachment.

    //Sjakie

    Link to comment
    Share on other sites

  • Topic Author
  • 38 minutes ago, Sjakie said:

    Jan,

    Normal this rule will post restart +00:00:05 or 8 second

    why it also starts 5 & 8 sec after midnight?

    Please login or register to see this attachment.

    //Sjakie

    I see a Rule:2 that starts 5s after midnight and a Rule:23 that starts 8s after midnight.

     

    'now' is always the current time. All @rules recalculate their time for the coming day at midnight so it will be 0+5 and 0+8, because 'now' is 0 at midnight.

    If you only want it to run at start/restart don't make it a rule (no =>)

    Please login or register to see this code.

     

    Edited by jgab
    Link to comment
    Share on other sites

    On 7/13/2021 at 7:18 AM, jgab said:

    Not sure what you want. Fibaro globals are accessible with the name prefixed by '$'

    ex.

    Please login or register to see this code.

     

    Hi jan,

    please can you check if creating global variable works fine? if i create global variable manually then it is accessible in ER4 by '$', but when i want to create some it do nothing.

    Please login or register to see this code.

    $MyVar is always nil.

     

    I updated to new HC3 version (5.072.14 (beta)) and ER4 don't restart anymore.

    Link to comment
    Share on other sites

  • Topic Author
  • 4 hours ago, kubo said:

    Hi jan,

    please can you check if creating global variable works fine? if i create global variable manually then it is accessible in ER4 by '$', but when i want to create some it do nothing.

    Please login or register to see this code.

    $MyVar is always nil.

     

    I updated to new HC3 version (5.072.14 (beta)) and ER4 don't restart anymore.

    Fibaro globals always need to be created manually before used. They will not be autocreated. 

     

    Btw, there are some ER functions to deal with Fibaro globals

    Please login or register to see this code.

     

    quickAppVariables ($$) are autocreated as that is the way fibaro.setVariable work

    Please login or register to see this code.

     

    Edited by jgab
    Link to comment
    Share on other sites

  • Topic Author
  • Problem with v0.5fix68 that's been out for an hour. If you upgraded it will crash. I have fixed it now so upgrades should work again.

    If the QA crash go into the QA files and the file "Toolbox" and line 694 and change

    Please login or register to see this code.

    to

    Please login or register to see this code.

     

    Link to comment
    Share on other sites

  • Topic Author
  • Ok, v0.5fix68 should work now.

    There has been a long time "bug" that disabled some error checks in ER4, and they are enabled now.

    Be prepared that you may see more error logs.

    In particular it's setTimeout/setInterval/net.HTTPClient that will report an error if the callbacks/functions provided throws an error.

    On the HC3 this is normally silent but it will show up now. 

    In the emulator these errors has always been reported.

    Link to comment
    Share on other sites

    Hi @jgab

     

    any idea why my alarm started failing? i didnt change anything for months in this section?

    Please login or register to see this code.

     

    Please login or register to see this code.

      

    Link to comment
    Share on other sites

  • Topic Author
  • 5 hours ago, ChristianSogaard said:

    Hi @jgab

     

    any idea why my alarm started failing? i didnt change anything for months in this section?

     

    Please login or register to see this code.

      

    This expression is strange

    post(#Armed from Matrix as Keypad);

    It's not a valid event name - spaces not allowed.

    Either

    post(#Armed_from_Matrix_as_Keypad);

    or

    post(#ArmedFromMatrixAsKeypad);

    or did you mean

    post(#Armed); -- from Matrix as Keypad

    or did you mean

    log('#Armed from Matrix as Keypad');

    ?

    • Thanks 1
    Link to comment
    Share on other sites

    Jan I have thsi error:

    Please login or register to see this code.

    Please advice,

    //Sjakie

    Link to comment
    Share on other sites

  • Topic Author
  • 1 hour ago, Sjakie said:

    Jan I have thsi error:

    Please login or register to see this code.

    Please advice,

    //Sjakie

    Can you post the whole rule20?

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