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

This EV5 Alarm rule works perf.

Please login or register to see this code.

My old EV4 rule was a little optimised compared with one above, it could tell what sensor in what room that was breached. And i could send that as a message the the Phone or to SONOS speaker.

I tried migrating the message part, but its not triviel to me, how to do in EV5?

 

Please login or register to see this code.

 

Posted

I have a few questions how to replace some rules:

 

example 1 - I think env.p.m is not exist in ER5 

Please login or register to see this code.

example 2

Please login or register to see this code.

example 3

Please login or register to see this code.

 

  • Topic Author
  • Posted
    33 minutes ago, petrkl12 said:

    I have a few questions how to replace some rules:

     

    example 1 - I think env.p.m is not exist in ER5 

    Please login or register to see this code.

    example 2

    Please login or register to see this code.

    example 3

    Please login or register to see this code.

     

     

    1. The matching variables becomes local variables for the rule

    Please login or register to see this code.

     

    2, Should work....?

    If LogUpdateToER is defined on QuickApp, e.g. function QuickApp:LogUpdateToER() you can do

    Please login or register to see this code.

     

    3.

    This still works as you do.

    If you have the triggerVar variable defined in the beginning of QuickApp:main(er) you can do

    Please login or register to see this code.

     

     

    • Thanks 1
    Posted (edited)

    @jgabJan, child support is not yey included to ER5? When i click on child switch i get this

     

    Please login or register to see this attachment.

    Edited by Neo Andersson
  • Topic Author
  • Posted
    6 minutes ago, Neo Andersson said:

    @jgabJan, child support is not yey included to ER5? When i click on child switch i get this

     

    Please login or register to see this attachment.

     

    Are you running v.034 ?

    Posted (edited)
    9 minutes ago, jgab said:

     

    Are you running v.034 ?

    0.33

    6 minutes ago, Neo Andersson said:

    0.33

     

    Okay, my bad...Sorry

    Edited by Neo Andersson
    Posted (edited)

    I have changed a bit QA layout but after upgrade via Updater it disapears :(

     

    @jgab I think it could be useful for others also

     

    image.png.865fb51a0a1ab38da5ef2fb2a1442348.png

     

    Please login or register to see this code.

     

    Edited by petrkl12
    Posted

    After update there is some bug i think

     

    Please login or register to see this image.

    /monthly_2023_11/image.png.52b6de5cfdf74e89f4d88f735f46ff1f.png" />

  • Topic Author
  • Posted
    2 minutes ago, Neo Andersson said:

    After update there is some bug i think

     

    Please login or register to see this link.

    I don't have the symbol 'bfxqctph' in the project - not even on my computer - sure it's not in your code?

    15 minutes ago, petrkl12 said:

    I have changed a bit QA layout but after upgrade via Updater it disapears :(

     

    @jgab I think it could be useful for others also

     

    Please login or register to see this link.

     

    Please login or register to see this code.

     

    Yes, the updater updates the UI too.

    Don't know to do additional user defined elements yet.... need to think about that.

     

    Something like the last update thing is coming with a list of the last 10 rules that has been run and time

    Posted (edited)
    9 minutes ago, jgab said:

    I don't have the symbol 'bfxqctph' in the project - not even on my computer - sure it's not in your code?

    I reloaded my previous QA running on 0.33..there is not any error

    5 minutes ago, Neo Andersson said:

    I reloaded my previous QA running on 0.33..there is not any error

    If you check the picture what i posted, you see, that ER5 doesnt even show the version number

    i will try again

    5 minutes ago, Neo Andersson said:

    I reloaded my previous QA running on 0.33..there is not any error

    If you check the picture what i posted, you see, that ER5 doesnt even show the version number

    i will try again

    Now it seems okay. Strange..I didnt touch my QA

     

    Please login or register to see this image.

    /monthly_2023_11/image.png.76517d27053770dd19701243137436ad.png" />

    Edited by Neo Andersson
    Posted

    Jan, in debug window there are still showing up nonexistent ER debug tags

    I tried closing browser, reopening Fibaro...

     

    Please login or register to see this image.

    /monthly_2023_11/image.png.f8087a0945d561baea82b76634659825.png" />

    Posted

    Can't you design your rules so it doesn't matter if you get 2 released?

    The problem is that if you push the button nothing happends only release in history and false in debug.

    I never noticed that because the HUE dimmer operates directly to HUE bridge.

    I will use scene for this task, no problem.

    Hue switch

    first press>> on

    second press change in brightness

    third press nothing?

    Thanks for your support 

     

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

    Jan, in debug window there are still showing up nonexistent ER debug tags

    I tried closing browser, reopening Fibaro...

     

    Please login or register to see this link.

    Yes, not ER specific.  it's Fibaro that probably hangs on to the tags as long as they keep the history, eventually they go away...

    10 minutes ago, Sjakie said:

    Can't you design your rules so it doesn't matter if you get 2 released?

    The problem is that if you push the button nothing happends only release in history and false in debug.

    I never noticed that because the HUE dimmer operates directly to HUE bridge.

    I will use scene for this task, no problem.

    Hue switch

    first press>> on

    second press change in brightness

    third press nothing?

    Thanks for your support 

     

    You mean a Hue scene? Because I guess that in a Fibaro scene you will have the same problem.

    Edited by jgab
    Posted

    You mean a Hue scene? Because I guess that in a Fibaro scene you will have the same problem.

     

    HC3 scene looks to work better. Will check later to implement in ER5. WAF works and thats the main issue.

    If it does't work perhaps I need to buy a real switch.

     

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

    You mean a Hue scene? Because I guess that in a Fibaro scene you will have the same problem.

     

    HC3 scene looks to work better. Will check later to implement in ER5. WAF works and thats the main issue.

    If it does't work perhaps I need to buy a real switch.

     

     

     

    If it works in a HC3 scene it should work in ER - let me know how it goes.

    Posted

    Jan, how can i access HT table insisde a rule?

     

    I have a function that loops throught all the HT table elements and checks devices. But this throws error. 

     

    Please login or register to see this code.

     

    Complains about that nil is passed to my function.  Should i make HT table global? I dont now how will it affect ER in general

  • Topic Author
  • Posted
    19 minutes ago, Neo Andersson said:

    Jan, how can i access HT table insisde a rule?

     

    I have a function that loops throught all the HT table elements and checks devices. But this throws error. 

     

    Please login or register to see this code.

     

    Complains about that nil is passed to my function.  Should i make HT table global? I dont now how will it affect ER in general

    var.HT = HT

    declares 'HT' as a eventrunner variable, accessible in you rule above.

    No special effect on ER...

     

    Usually, people like to declare the first keys of a HT as event runner variables

    Ex.

    Please login or register to see this code.

    and one wants 'kitchen' and 'bedroom' as event runner variables.

    But then one just loops the first level of the HT

    Please login or register to see this code.

    or use er.defvars(HT)

     

     

    Posted (edited)
    15 minutes ago, jgab said:

    var.HT = HT

    declares 'HT' as a eventrunner variable, accessible in you rule above.

    No special effect on ER...

     

    Usually, people like to declare the first keys of a HT as event runner variables

    Ex.

    Please login or register to see this code.

    and one wants 'kitchen' and 'bedroom' as event runner variables.

    But then one just loops the first level of the HT

    Please login or register to see this code.

    or use er.defvars(HT)

     

     

    Jan i just dont get it, i tried to run the function without a rule, but still the same

     

    Please login or register to see this code.

    HT is still nil when passed to my function

     

    This is how i load my stuff..

    My functions are loaded before the rules

     

    Please login or register to see this attachment.

    7 minutes ago, Neo Andersson said:

    Jan i just dont get it, i tried to run the function without a rule, but still the same

     

    Please login or register to see this code.

    HT is still nil when passed to my function

     

    This is how i load my stuff..

    My functions are loaded before the rules

     

    Please login or register to see this attachment.

    var.HT = HT didnt help

     

    When I json.encode HT table (right after the table end) and print it out, it gets printed, but when I use it as my function argument, then its nil.

    Edited by Neo Andersson
  • Topic Author
  • Posted
    16 minutes ago, Neo Andersson said:

    Jan i just dont get it, i tried to run the function without a rule, but still the same

     

    Please login or register to see this code.

    HT is still nil when passed to my function

     

    This is how i load my stuff..

    My functions are loaded before the rules

     

    Please login or register to see this attachment.

    var.HT = HT didnt help

     

    When I json.encode HT table (right after the table end) and print it out, it gets printed, but when I use it as my function argument, then its nil.

    Where is shs declared? and how is  shs.checkAllDeivicesInTable(HT) defined? Is shs local or global and in what file is it declared?

    So,  shs.checkAllDeivicesInTable(HT) outside a rule works like in the example above but

    rule("shs.checkAllDeivicesInTable(HT)") fails?

     

     

     

    Posted
    14 minutes ago, jgab said:

    Where is shs declared? and how is  shs.checkAllDeivicesInTable(HT) defined? Is shs local or global and in what file is it declared?

    So,  shs.checkAllDeivicesInTable(HT) outside a rule works like in the example above but

    rule("shs.checkAllDeivicesInTable(HT)") fails?

     

     

    14 minutes ago, jgab said:

    shs is declared as a global variable in a separate file (u_shsExtra) where all my functions are defined.

     

    shs.checkAllDeivicesInTable(HT) doesnt work. Neither inside a rule nor outside. I called it for test right after the HT table definition and it still claims that HT is nil.

     

    It is like my functions are loaded/defined before HT table is created, but this is not true see below my Main file, and rules are loaded in u_myRules file,

    Please login or register to see this code.

     

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