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

  • Topic Author
  • Posted (edited)

    🚀 EventRunner 6 - Release v0.0.16

    Changes in v0.0.16

    •  Feature: add coercion function for comparison operators
    •  :key property for centralSceneEvents - returns "keyId:keyAttribute" to compare with
    • 🐛 improve error handling in tokenizer

    Generated automatically from git commits

    📥 Download

    • GitHub Releases: 

      Please login or register to see this link.

    • Direct .fqa files: 

      Please login or register to see this link.

      , 

      Please login or register to see this link.

    📚 Documentation

    • Full Documentation: 

      Please login or register to see this link.


    This release was automatically generated from commit 2fa43d7

    Edited by jgab
    • Like 1
  • Topic Author
  • Posted
    2 hours ago, Sjakie said:

    Please login or register to see this code.

    Error table is nil

    Please login or register to see this code.

    Error

     rule.lua:112: bad argument #2 to 'date' (number has no integer representation)

    Please login or register to see this code.

     

    Ok, the  rule.lua:112: bad argument #2 to 'date' (number has no integer representation)

    error was because of the bad long date format 12/21/00:00. It should start with a "/" if you don't have the year, like /03/21/00:00
    However the error message was bad. In v0.0.16 the error reporting system is much better (in general for all types of syntax/compiler errors)

     

    The "Error table is nil" - is it part of some more log?

    When something goes wrong while the rules are running an error message should be logged and the rule is disabled - so it doesn't cause more troubles.

    Posted

    Jan, in your example sheet you show HT definition and usage like this 

    Please login or register to see this code.

     

    but on other pages you are explaining variable usage, like below

     

    Let's break this down:

    • rule - Function to define automation rules
    • var - Table for storing variables accessible across all rules
    • triggerVar - Table for variables that can trigger rules when changed

     

     

    and its saying, that triggerVars are the ones that can be used as triggers in rules, while vars are globally accessible variables,but in the example above you still define HT table as var.HT and still using its elements in rules as triggers. What am i missing?

  • Topic Author
  • Posted (edited)

    Please login or register to see this code.

    is just a table reference, returning something like 754. So the statement is 754:breached - triggering when device 754 is breached.


    triggerVar.x = 88
    rule("x => log('x is %s',x)")
    will trigger whenever variable x changes values. It will not cause trigger when we initialize it to 88
    but if we do 
    rule(2@sunset => x = 42")
    the rule will trigger at sunset.
    So, triggerVar.x = 88 will declare var.x = 88 but the compiler also remembers that it should generate an event when it changes value.
    It actually emits the sourceTrigger {type='trigger-variable',name='x'} in this case.

    Edited by jgab
    Posted
    9 minutes ago, jgab said:

    Please login or register to see this code.

    is just a table reference, returning something like 754. So the statement is 754:breached - triggering when device 754 is breached.


    triggerVar.x = 88
    rule("x => log('x is %s',x)")
    will trigger whenever variable x changes values. It will not cause trigger when we initialize it to 88
    but if we do 
    rule(2@sunset => x = 42")
    the rule will trigger at sunset.
    So, triggerVar.x = 88 will declare var.x = 88 but the compiler also remembers that it should generate an event when it changes value.
    It actually emits the sourceTrigger {type='trigger-variable',name='x'} in this case.

    so this actually means that every variable delacred as var.x = 88 can also be used as a trigger in any rule.

     

    Please login or register to see this code.

     

    Eventualy both work the same way. The only difference is that the latter one will not cause any triger when initializing right?

  • Topic Author
  • Posted (edited)
    12 minutes ago, Neo Andersson said:

    so this actually means that every variable delacred as var.x = 88 can also be used as a trigger in any rule.

     

    Please login or register to see this code.

     

    Eventualy both work the same way. The only difference is that the latter one will not cause any triger when initializing right?

    The first rule will complain that there is no triggers in the rule. x is just a plain variable.
    The second will work. 'y' is a variable, but also a trigger variable.
    Technically, it is initialized when we do triggerVar.y = 88, and that does not cause any event to be emitted.
    Later if we assign 'y' a value (different from 88) it will emit an event and the rule will trigger.

    Edited by jgab
  • Topic Author
  • Posted

    🚀 EventRunner 6 - Release v0.0.19

    Changes in v0.0.19

    •  Feature: add uptime tracking and event formatting
    • 🐛 Fix: correct assignment error in parser
    • ♻️ Refactor: improve rule handling and logging
    • 🧪 Test: add usage examples for QuickApp
    •  Feature: add commit message guidelines and VS Code settings
    • 📚 Docs: include examples and formatting rules for conventional commits

    Generated automatically from git commits

    📥 Download

    • GitHub Releases: 

      Please login or register to see this link.

    • Direct .fqa files: 

      Please login or register to see this link.

      , 

      Please login or register to see this link.

    📚 Documentation

    • Full Documentation: 

      Please login or register to see this link.


    This release was automatically generated from commit 13f3873

    Posted

    Wooow you release updates faster as I manage!

    Thanks

    Posted (edited)

    Jan, I am on version .18

    If I want to update to version .19 it does't show any ER6 qa's.

    Restarted HC3 version 5.180

    Safari >> nada

    Chrome the same

    deleted ERUpdater nothing changed

    If I install  2 new QA's they will be visible in ERUpdater

    error:

    .start()

    Util.defvar("Hue",Hue)
     

    Please login or register to see this code.

    No integer no clue what is wrong in ER5 no error

     

    Please login or register to see this code.

    Error in handler

     
    Edited by Sjakie
    install 2 new QA's >>visual
  • Topic Author
  • Posted
    54 minutes ago, Sjakie said:

    Jan, I am on version .18

    If I want to update to version .19 it does't show any ER6 qa's.

    Restarted HC3 version 5.180

    Safari >> nada

    Chrome the same

    deleted ERUpdater nothing changed

    If I install  2 new QA's they will be visible in ERUpdater

    error:

    .start()

    Util.defvar("Hue",Hue)
     

    Please login or register to see this code.

    No integer no clue what is wrong in ER5 no error

     

    Please login or register to see this code.

    Error in handler

     

    Reload page and press refresh - refresh re-reads the ER6's installed.
    Your error messages are a bit hard to decipher ;-) 

    Please login or register to see this code.

     

    Posted

    Please login or register to see this code.

    Please login or register to see this code.

     

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

    Please login or register to see this code.

    Please login or register to see this code.

     

    There is no Util.* or Util.defvar in ER6. You add the function to er.variables.*
    If you have access to 'er' 

     

    Please login or register to see this code.


     

    Posted (edited)

     

    [QUICKAPP540]: ./include/parser.lua:383: attempt to index a nil value (field '_dbg') >> here I have a lot of

    Please login or register to see this code.

     

    Please login or register to see this code.

     

    Edited by Sjakie
    removed HUE add QA541
    Posted

    Jan, ERUpdater still show not all ER6 QA's

    Now it shows only those who I uploaded yesterday.

    So 3 hidden en 3 visible.

    Rereshed a few times no luck

  • Topic Author
  • Posted

    🚀 EventRunner 6 - Release v0.0.20

    Changes in v0.0.20

    •  Feature: Add addon support and refactor builtins and rules
      • Refactored `builtins.lua` to remove redundant uptime and weather property definitions, now handled by `addons`.
      • Updated `parser.lua` to improve property access handling.
      • Modified `rule.lua` to load rules asynchronously, enhancing startup performance.
    •  Feature: add add-on documentation for EventRunner 6
    • 🐛 Fix: global(name) returns success, message
    • 🐛 Fix: bug in parsing of {<table>}:property <op> <expression>

    Generated automatically from git commits

    📥 Download

    • GitHub Releases: 

      Please login or register to see this link.

    • Direct .fqa files: 

      Please login or register to see this link.

      , 

      Please login or register to see this link.

    📚 Documentation

    • Full Documentation: 

      Please login or register to see this link.


    This release was automatically generated from commit 90adf52

    4 minutes ago, Sjakie said:

    Jan, ERUpdater still show not all ER6 QA's

    Now it shows only those who I uploaded yesterday.

    So 3 hidden en 3 visible.

    Rereshed a few times no luck

    I think it's the update of the drop down the has issues - do me a favor and test this.
    Open ERUpdater, and in main replace QuickApp:refreshClicked() with the version below that logs the ER6 it finds in the console. See if it logs all the ER6 ?

    Please login or register to see this code.

     

    Posted

    Jan did it.

    still 3 QA's showing.

    Refreshed > nada

    Other browser >> same

  • Topic Author
  • Posted (edited)

    They don't show in the console log? And you are sure that they are ER6 QAs? (It can't upgrade ER5s)
    The way they are found is that they have the property 

    Please login or register to see this code.

    You know how to get into swagger and get the device structure and look at the properties?
    Check if your non-recognized QAs has the property....

    Edited by jgab
    Posted (edited)

    Sorry Jan swagger does't work well must wait on new fw. I don't want to use beta.

    After new uploads and copied main in I see now in updater 7 ER6 QA's.

    Sorry I can't help to discover what is wrong.

     

    No clue what this is?

     

    Please login or register to see this code.

     

    ["var","elog"]: Expected function, got: nil (disabling)

    This I don't use anymore

     

    Edited by Sjakie
    Posted

    Jan apologize but my swagger does't work properly, ned to wait on fw update. I don't want to use beta.

    I fixed it installed 4 new ER6 and copied old in new.

    Refreshed ERUpdater saw 3 old and 4 new ones  >>changed names >> nothing after refresh.

    Restarted HC3 (is slower as usual)

    Now I see 7 ER6 

    Sorry I could not help to get where it's going wrong.

     

    No red x
     
    [ERROR] [QUICKAPP545]: [Rule:4]: ["var","elog"]: Expected function, got: nil (disabling)

    Please login or register to see this code.

    [03.09.2025] [07:57:54] [DEBUG] [QUICKAPP545]: Parser: Expected ] at pos 175
    #licht_Hal_Slot_Unsecure =>
    hal.Achterlamp:value = xy=[0.5396,0.4224];

  • Topic Author
  • Posted

    🚀 EventRunner 6 - Release v0.0.21

    Changes in v0.0.21

    •  Feature: update add-on setup instructions and examples
    • ♻️ Refactor: change loadLibrary function to local scope
    • ♻️ Refactor: improve error handling in rule definitions
    •  Feature: add synchronous HTTP call functionality
    •  Feature: implement HC3 API integration
    • ♻️ Refactor: update HTTP client authorization handling
    • 📚 Docs: add release notes for v0.0.20

    Generated automatically from git commits

    📥 Download

    • GitHub Releases: 

      Please login or register to see this link.

    • Direct .fqa files: 

      Please login or register to see this link.

      , 

      Please login or register to see this link.

    📚 Documentation

    • Full Documentation: 

      Please login or register to see this link.


    This release was automatically generated from commit 4bab44f

    1 minute ago, Sjakie said:

    Jan apologize but my swagger does't work properly, ned to wait on fw update. I don't want to use beta.

    I fixed it installed 4 new ER6 and copied old in new.

    Refreshed ERUpdater saw 3 old and 4 new ones  >>changed names >> nothing after refresh.

    Restarted HC3 (is slower as usual)

    Now I see 7 ER6 

    Sorry I could not help to get where it's going wrong.

     

    No red x
     
    [ERROR] [QUICKAPP545]: [Rule:4]: ["var","elog"]: Expected function, got: nil (disabling)

    Please login or register to see this code.

    [03.09.2025] [07:57:54] [DEBUG] [QUICKAPP545]: Parser: Expected ] at pos 175
    #licht_Hal_Slot_Unsecure =>
    hal.Achterlamp:value = xy=[0.5396,0.4224];

     

    This line has 2 wrongs...

    Please login or register to see this code.

    You are assign :value the result of assigning xy = ...
    Assignment in ER5&ER6 don't return a value.


    Also this is wrong syntax, and was not allowed in ER5 either...

    Please login or register to see this code.

    To create an array use

    xy={0.5396,0.4224}>

    You probably wanted to do

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