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 (edited)

Jan, i got a bug here

 

Please login or register to see this image.

/monthly_2023_12/image.png.61f6ff6b607fa438c53fe97aa2c4200c.png" />

 

image.png.5a6dbde5cca1ad85fc4d3979f3d6f3dc.png

 

Please login or register to see this attachment.

 

 

I haven't noticed this error so far. It might have been there even before upgrade to 0.56 i can't tell for sure.

 

 

 

 

It is working with alarm:armed syntax, so i will use that one

 

Edited by Neo Andersson
  • Topic Author
  • Posted

    Yep, on the first page and a separate tutorial I have advertised that alarm handling is a bit different in ER5 compared to ER4... ;-)

     

    Posted

    Jan what is the shortest way to catch a device value change and apply the new value to another device?

    Please login or register to see this code.

     

  • Topic Author
  • Posted
    9 hours ago, Neo Andersson said:

    Jan what is the shortest way to catch a device value change and apply the new value to another device?

    Please login or register to see this code.

     

    Please login or register to see this code.

    We need to do the "| true" because device1's value could change to false and then the action would not run...

    There exist also :trigger that is a property that triggers on value property change and always return true and is useful for this case. Note that it only works with value property of a device.

    Please login or register to see this code.

     

    • Like 2
    Posted

    Hi Jan

     

    This is so ODD.

    I have disabled Rule 3 in EV5 / QA2047

    Please login or register to see this code.

     

    Please login or register to see this code.

     

    I changed the log text in Rule 3 - and Its NOT listed in the trigger logs

    And i also changed the trigger triggered #Key951_2_Pressed2_4_Pressed3 - but it triggers on "triggered #Key951_2_Pressed2_4_Pressed2"

    Please login or register to see this code.

    I Searched for "Keypad" in EV5 to look for rule duplicates, crazy because there are only 14 rules.

     

    Please login or register to see this attachment.

    So I guess everyone would say - i have a duplicate Rule some were. I have been posting a couple of days now about this and i cant find the Duplicate.

     

    And Why does the logs say its from EV4 QA2047 

    Rules:
    1:[Rule:1:matrix4Alarm:central & keyPrim => post({type=fmt('%s_%s_%s',keyPrim, matrix4Alarm:central.keyId,matrix4Alarm:central.keyAttribute)}); keyPrim = nil] [enabled]
    2:[Rule:2:matrix4Alarm:central & keyPrim==nil => keyPrim=fmt('Key%s_%s_%s',matrix4Alarm,matrix4Alarm:central.keyId,matrix4Alarm:central.keyAttribute); wait(3); keyPrim=nil] [enabled]
    3:[Rule:3:#Key951_2_Pressed2_4_Pressed3 => || 0:armed >> 0:armed=false; log('#Disarmed from Matrix as Keypad') || !1:armed >> 1:tryArm ; log('#QA2047 EV5 Rule3 Try to Arm the house from Matrix as Keypad')] [disabled]

     

    Why does Rule 3 triggers when its Disabled?

    [03.12.2023] [10:14:39] [TRACE] [ER2047]: [Rule:3:112]>> TRUE #device{id=951,val.. -> matrix4Alarm:central & keyPrim==nil =>..
     

    So I DELETED QA2047 Event runner 5 from HC3

    Please login or register to see this attachment.

     

    The I tried Trigger the ALARM again to find to find the duplicate

    WTF - how can it still trigger from 2047??

     

    Please login or register to see this attachment.

     

    Before rebooting my HC3, are there something i should check ?

     

  • Topic Author
  • Posted

    Yes, it looks like you run 2 ER5 in parallel. In the first log the first 3:110 that logs is actually rule 2 (if we look at the definition)
    :110 is also the 110th invocation of the rule which is strange as we have a log of 3:35 later, and the invocations are usually increasing (you can get them in slightly reversed order if you have an 
    invocation of a rule that is waiting).

    So, my feeling is that the 3:110 is from an another (earlier) instance of ER5...

    And yes that is strange. In the past (not ER related) I have seen "ghost QAs" like this - sometimes also we have seen 2 instances running when there is only one...

    Can you reboot the HC3 and see if the ghost version goes away?

    Posted
    1 hour ago, jgab said:

    Yes, it looks like you run 2 ER5 in parallel. In the first log the first 3:110 that logs is actually rule 2 (if we look at the definition)
    :110 is also the 110th invocation of the rule which is strange as we have a log of 3:35 later, and the invocations are usually increasing (you can get them in slightly reversed order if you have an 
    invocation of a rule that is waiting).

    So, my feeling is that the 3:110 is from an another (earlier) instance of ER5...

    And yes that is strange. In the past (not ER related) I have seen "ghost QAs" like this - sometimes also we have seen 2 instances running when there is only one...

    Can you reboot the HC3 and see if the ghost version goes away?

    Jan ...

    i rebooted, and imported back my EV5 with alarm

    Now it works :-)🙏.

     

    Thank you for assisting me on this, this was a crazy error.

  • Topic Author
  • Posted
    1 minute ago, ChristianSogaard said:

    Jan ...

    i rebooted, and imported back my EV5 with alarm

    Now it works :-)🙏.

     

    Thank you for assisting me on this, this was a crazy error.

    Well, hopefully it's not going to be so frequent. I've seen it 1-2 times the last 12 months, and it was not ER...

    Posted
    On 11/29/2023 at 12:23 PM, jgab said:

    I don't see that problem when arming partitions..., some more details?

     

    Well, partition 0 is the house/home so that name is given. To get the name from a partition id you need an helper function

    (I may build something like it into ER5 in the next version...)


     

    Please login or register to see this code.

     

    Hi Jan 
    Wondering if you decided for the helper function, to get the name from a partition id ? 

  • Topic Author
  • Posted
    17 minutes ago, ChristianSogaard said:

    Hi Jan 
    Wondering if you decided for the helper function, to get the name from a partition id ? 

    Yes, it's called :partition and returns the partition structure where you can access the name.

    Ex

    Please login or register to see this code.

    In next version - cleaning up some other stuff before I push it....

    Posted
    3 minutes ago, jgab said:

    Yes, it's called :partition and returns the partition structure where you can access the name.

    Ex

    Please login or register to see this code.

    In next version - cleaning up some other stuff before I push it....

    Cool - and that would allow me something like - <user>:msg = Partition.Name ..  "is armed"

  • Topic Author
  • Posted
    5 minutes ago, ChristianSogaard said:

    Cool - and that would allow me something like - <user>:msg = Partition.Name ..  "is armed"

    Yes,  <user>:msg = 2:partition.name ++  " is armed"

    Posted (edited)
    6 hours ago, jgab said:

    Please login or register to see this code.

    We need to do the "| true" because device1's value could change to false and then the action would not run...

    There exist also :trigger that is a property that triggers on value property change and always return true and is useful for this case. Note that it only works with value property of a device.

    Please login or register to see this code.

     

    Jan this syntax is a monster.. Customer has 120 buttons all together, each one controlling different devices. So far i used to create two rules for 1 button.One for true and one for false values.

    Now i only need 120 as i can handle both TRUE and FALSE results.

    If i was only able to somehow connect buttons to devices in a way that i can use that reference in the rule, i would need only 1 !!!!! rule, but unfortunatelly it doesnt work. We talked about this a few weeks ago, and i think you mentioned, 

    that we cant use device IDs inside a table in that way, so i am just curious, what else workaround may exist for this?

     

    Idea is

     

    Please login or register to see this code.

     

     

     

    Edited by Neo Andersson
  • Topic Author
  • Posted
    1 hour ago, Neo Andersson said:

    Jan this syntax is a monster.. Customer has 120 buttons all together, each one controlling different devices. So far i used to create two rules for 1 button.One for true and one for false values.

    Now i only need 120 as i can handle both TRUE and FALSE results.

    If i was only able to somehow connect buttons to devices in a way that i can use that reference in the rule, i would need only 1 !!!!! rule, but unfortunatelly it doesnt work. We talked about this a few weeks ago, and i think you mentioned, 

    that we cant use device IDs inside a table in that way, so i am just curious, what else workaround may exist for this?

     

    Idea is

     

    Please login or register to see this code.

     

     

     

     

    Hmm, I think that was a discussion we had for ER4, and I promised it would work in ER5...

    and I actually prepared the ER5 parser to handle it, but never enabled it. But now I have.

    In ER5 v0.58 that I just pushed you can initialise an array like

    Please login or register to see this code.

     

    • Like 1
    Posted
    29 minutes ago, jgab said:

     

    Hmm, I think that was a discussion we had for ER4, and I promised it would work in ER5...

    and I actually prepared the ER5 parser to handle it, but never enabled it. But now I have.

    In ER5 v0.58 that I just pushed you can initialise an array like

    Please login or register to see this code.

     

    gonna test it and come back to you

    Posted
    6 minutes ago, Neo Andersson said:

    gonna test it and come back to you

    This is just incredible...It is working. Yesterday i had 240 rules. Now i have a 1 single rule. Incredible...Thanks

    Posted
    11 minutes ago, Neo Andersson said:

    This is just incredible...It is working. Yesterday i had 240 rules. Now i have a 1 single rule. Incredible...Thanks

    PLease share a little more what your idea is, perhaps we can learn :-) ?

    Posted
    3 minutes ago, ChristianSogaard said:

    PLease share a little more what your idea is, perhaps we can learn :-) ?

     

    My customer has all together 120 buttons (relays) / 5 buttons on each wall switch. Every buttons controls different device. Usually turnON and Off actions. So far I had to create a rule for every single button relay state change, and act on the desired device, now i need only create a table of buttons and devices, and use one single line of code, that you can see above. 

     

     

     

     

     

     

    Posted
    4 hours ago, ChristianSogaard said:

    Cool - and that would allow me something like - <user>:msg = Partition.Name ..  "is armed"

     

    Jan, you helped create this rule

    Please login or register to see this code.

     

    I tried copy the name/roomname part to this rule 

    Please login or register to see this code.

    Im getting - bad argument #1 to 'f' (table expected, got boolean)

    Please login or register to see this code.

    would you help again ?

    Posted
    1 minute ago, Neo Andersson said:

     

    My customer has all together 120 buttons (relays) / 5 buttons on each wall switch. Every buttons controls different device. Usually turnON and Off actions. So far I had to create a rule for every single button relay state change, and act on the desired device, now i need only create a table of buttons and devices, and use one single line of code, that you can see above. 

     

     

     

     

     

     

    Thank you for sharing - i have around 25 of these 

    Please login or register to see this link.

     with 4 buttons (with 3 push) on each. Im doing similar mapping on each button, with Jans EV5. 
    So i can probably re-use what you guys has created. 

    I already have the HT implemented :-)

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