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
    3 hours ago, Earybeongbeong7 said:

    Module 'childs' missing

    Can I currently ignore this debug content after the update?

    I proceeded the update in the following way.

    I compared the structure of the newly installed Quick App. The quick app that was updated did not have a new module. (child)

    When updating the existing Quick App, I hope that new module files are uploaded.

    Is it okay to upload new module code? in  Existing used Quick APP.

    Thank you very much for upgrading the maintenance and new features every time.

     

    Yes, you can update the file(s) manually. 

    I never update "main" as it contains your  rules. 

    The other files are updated from my GitHub so it can be a bit difficult to know which files to use. 

    It consist of the EventRunner4Engine.lua and files from the /toolbox subdirectory

    I will try to more regularly update the QA linked in the EventRunner4 intro post so that it contains the last version of the files (I just did that)

    However, in the best of worlds, the autoupdate will work. 

    I'm also thinking about a model with beta-releases that would make it a bit less risky...

     

    Guest kallecux
    Posted

    Hi @jgab i updated the function: Util.updateFile(file) and it works - thanks for your quick response.

     

    I get this warning while startup:

    [28.09.2020] [08:26:28] [WARNING] [QUICKAPP490]: Module 'childs' missing

     

    Greetings!

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

    Hi @jgab i updated the function: Util.updateFile(file) and it works - thanks for your quick response.

     

    I get this warning while startup:

    [28.09.2020] [08:26:28] [WARNING] [QUICKAPP490]: Module 'childs' missing

     

    Greetings!

    Yes, there is a bug in the update routine for new modules. You can ignore it for now (unless you use the new child feature) and I will fix it in the next update.

    Posted
    59 minutes ago, jgab said:

     

    Yes, you can update the file(s) manually. 

    I never update "main" as it contains your  rules. 

    The other files are updated from my GitHub so it can be a bit difficult to know which files to use. 

    It consist of the EventRunner4Engine.lua and files from the /toolbox subdirectory

    I will try to more regularly update the QA linked in the EventRunner4 intro post so that it contains the last version of the files (I just did that)

    However, in the best of worlds, the autoupdate will work. 

    I'm also thinking about a model with beta-releases that would make it a bit less risky...

     

     

     

    Thank you for your confirmation. The new features work so well.

    Could you please find out about the problem below?

     

     

    4 hours ago, Earybeongbeong7 said:

     

    is there a way to send global variable value or local variable value in QA message?

     

    Please login or register to see this code.

     

    AND.

     

    Which button content can be changed based on an arbitrary button like the attached picture? What is updated is the global variable value.

     

     

    Please login or register to see this attachment.

     

  • Topic Author
  • Posted
    6 minutes ago, Earybeongbeong7 said:

    Thank you for your confirmation. The new features work so well.

    Could you please find out about the problem below?

    is there a way to send global variable value or local variable value in QA message?

     

    Please login or register to see this code.

     

    You mean like this?

    Please login or register to see this code.

     

    The second question I'm not sure I understand. You want to update the text of the button?

    Please login or register to see this code.

     

    Posted (edited)
    53 minutes ago, jgab said:

     

     

    The second question I'm not sure I understand. You want to update the text of the button?

    Please login or register to see this code.

     


    It means whether the content of the button can be replaced with the value of a global variable.

     

    ex,

     

    Please login or register to see this code.

    The value of the global variable TimeOfDay will change according to this rule.

     

    Is there a way to display the value in the preview screen of the quick app?

     

    The picture is an example of another quick app.

     

    If the content or status of the value appears like the lined part, I think it will be possible to easily check the global variable in the setting of HC3 when using ER4.

     

    Therefore, I suggest this part.

     

    And, 

     

    Please login or register to see this code.

     

    Can other types of equipment be supported?(ex. Multilevel sensor, Energy meter ??)

     

     

     

    Please login or register to see this attachment.

    Edited by Earybeongbeong7
    Posted

    How is auto update applied when writing ER4 rules through ZBS? Are the versions of QuickApp and ZBS compatible? Or should I put the update related files in ZBS? (ER4engin, toolbox, etc)

  • Topic Author
  • Posted
    30 minutes ago, Earybeongbeong7 said:

    How is auto update applied when writing ER4 rules through ZBS? Are the versions of QuickApp and ZBS compatible? Or should I put the update related files in ZBS? (ER4engin, toolbox, etc)

    Yes, you need to put them in the right directories by hand. (maybe I can automate it in the future)

    Posted

    Jan,

    I have a handshake error where to look? Thus the number guid to some where?

    Please advice,

    //Sjakie

  • Topic Author
  • Posted
    20 hours ago, Earybeongbeong7 said:

    How is auto update applied when writing ER4 rules through ZBS? Are the versions of QuickApp and ZBS compatible? Or should I put the update related files in ZBS? (ER4engin, toolbox, etc)

    New version of fibaroapiHC3.lua v0.135.

    New version of ER4 0.5fix24

     

    Wan running ER4 in ZBS you can call 

    Please login or register to see this code.

    It will download the latest

    EventRunner4Engine.lua

    Toolbox/Toolbox_basic.lua
    Toolbox/Toolbox_events.lua
    Toolbox/Toolbox_child.lua
    Toolbox/Toolbox_triggers.lua
    Toolbox/Toolbox_files.lua
    Toolbox/Toolbox_rpc.lua
    Toolbox/Toolbox_pubsub.lua

    to the current directory

    Posted
    On 9/14/2020 at 11:13 AM, jgab said:

    lamps={22,33,44,55,66,77,88} rule("$Away => lampStates = lamps:value") -- Save lamps current states rule("!$Away=> lamps:value = lampStates") -- Restore lamp states rule("@@rnd(00:10,00:30) & $Away & sunset..sunrise => lamps[rnd(1,length(lamps))]:toggle") -- toggle a random light every 10-20min

    Is it possible to set a specific time frame that this should be valid instead of between sunset to sunrise? Say that you want to simulate that someone is at home between 10:00 and 15:00 on weekdays. 

     

    I also did a simple test with switching the sunrise and sunset (see below) but that gave the attached error message. 

    Please login or register to see this code.

     

    Please login or register to see this attachment.

    Posted

    sorry Jan, I forgot to paste the error

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

     

    Please login or register to see this link.

      On 9/14/2020 at 11:13 AM,  

    Please login or register to see this link.

     said: 

    lamps={22,33,44,55,66,77,88} rule("$Away => lampStates = lamps:value") -- Save lamps current states 

    rule("!$Away=> lamps:value = lampStates") -- Restore lamp states

     rule("@@rnd(00:10,00:30) & $Away & sunset..sunrise => lamps[rnd(1,length(lamps))]:toggle") -- toggle a random light every 10-20min

    Is it possible to set a specific time frame that this should be valid instead of between sunset to sunrise? Say that you want to simulate that someone is at home between 10:00 and 15:00 on weekdays. 

     

    Yes,

    rule("@@rnd(00:10,00:30) & $Away & 10:00..15:00 & wday('mon-fri') => lamps[rnd(1,size(lamps))]:toggle") -- toggle a random light every 10-20min

     

    1 hour ago, Hans_Raven said:

     

    I also did a simple test with switching the sunrise and sunset (see below) but that gave the attached error message. 

    Please login or register to see this code.

     

    Please login or register to see this attachment.

     

    Sorry, the length function is called 'size' in ER

    rule("@@rnd(00:10,00:30) & $Home_Away=='Away' & sunrise..sunset => lamps[rnd(1,size(lamps))]:toggle") -- toggle a random light every 10-20min

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

    Jan,

    I have a handshake error where to look? Thus the number guid to some where?

    Please advice,

    //Sjakie

    It's a http request. I need to see the error message to try to figure out what it comes from. Nodered, Telegram, Hue?

    Posted

    Jan, 

    I gues Telegram.

    I still have the telgram errro network unreachable not able to tackle it.

    I didt see it for a long time.

    Now I play with Danalock and noticed it

    Can it be related with

    Please login or register to see this image.

    /monthly_2020_09/image.png.f03128bf17009bbe0fdf1ef915ae0f7b.png" />

    Posted (edited)
    5 hours ago, jgab said:

    New version of fibaroapiHC3.lua v0.135.

    New version of ER4 0.5fix24

     

    Wan running ER4 in ZBS you can call 

    Please login or register to see this code.

    It will download the latest

    EventRunner4Engine.lua

    Toolbox/Toolbox_basic.lua
    Toolbox/Toolbox_events.lua
    Toolbox/Toolbox_child.lua
    Toolbox/Toolbox_triggers.lua
    Toolbox/Toolbox_files.lua
    Toolbox/Toolbox_rpc.lua
    Toolbox/Toolbox_pubsub.lua

    to the current directory

     

    Thank you,

     

    So, can we just change fibaroapiHC3.lua and run er4 on ZBS right away?

     

    Or should I put ‘DOWNLOADSOURCE() in the ‘rule’ code and execute it?

     

    3 hours ago, Hans_Raven said:

    Is it possible to set a specific time frame that this should be valid instead of between sunset to sunrise? Say that you want to simulate that someone is at home between 10:00 and 15:00 on weekdays. 

     

    I also did a simple test with switching the sunrise and sunset (see below) but that gave the attached error message. 

    Please login or register to see this code.

     

    Please login or register to see this attachment.

     

     

    Wow!! Very good idea!! Thanks.

    Edited by Earybeongbeong7
  • Topic Author
  • Posted
    1 minute ago, Earybeongbeong7 said:

     

    Thank you,

     

    So, can we just change fibaroapiHC3.lua and run er4 on ZBS right away?

     

    Or should I put ‘DOWNLOADSOURCE() in the ‘rule’ code and execute it?

    The DOWNLOADSOURCE() function is defined inside EventRunner4Engine.lua so you need to open EventRunner4.lua in ZBS, add the call to

    DOWNLOADSOURCE() in QuickApp:main() and run it once to download the code.

     

    Ex.

    Please login or register to see this code.

     

    If you have the autoupdate rules you could do something like this

    Please login or register to see this code.

    and it will download the new source when available. If  it downloads you need to restart the debugging session so it will use the latest source.

    It's not default as it makes a web request every time to my GitHub which may slow things down when developing/debugging

    Posted
    2 hours ago, jgab said:

    Sorry, the length function is called 'size' in ER

    rule("@@rnd(00:10,00:30) & $Home_Away=='Away' & sunrise..sunset => lamps[rnd(1,size(lamps))]:toggle") -- toggle a random light every 10-20min

    Thanks, no it works! A question on the rnd command, does it take one lamp at a time or can you control that by the first numerical in the parenthesis? rnd(1, size etc)

  • Topic Author
  • Posted (edited)
    5 minutes ago, Hans_Raven said:

    Thanks, no it works! A question on the rnd command, does it take one lamp at a time or can you control that by the first numerical in the parenthesis? rnd(1, size etc)

    rnd(x,y) returns a random number between (and inclusive) x and y.

    In our case it generates a number between 1 and the number of lamps, that we use to select a lamp from the array.

    A more sophisticated function would run through each lamp to get a optimal distribution. Now lamp 4 may be turned on/off twice in a row - it's random ;-) 

    Edited by jgab
    • Thanks 1
    Posted
    6 hours ago, jgab said:

    New version of fibaroapiHC3.lua v0.135.

    New version of ER4 0.5fix24

     

    Wan running ER4 in ZBS you can call 

    Please login or register to see this code.

    It will download the latest

    EventRunner4Engine.lua

    Toolbox/Toolbox_basic.lua
    Toolbox/Toolbox_events.lua
    Toolbox/Toolbox_child.lua
    Toolbox/Toolbox_triggers.lua
    Toolbox/Toolbox_files.lua
    Toolbox/Toolbox_rpc.lua
    Toolbox/Toolbox_pubsub.lua

    to the current directory

     

    It does not proceed when forced update is performed in my version (0.5fix 23).

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