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

Jan I have a problem how to tackle? I do one cycle deur OPEN and Nachtslot

than I press an press and press............................no action only false.

I have 3 HUE switches who act all the same. I also tried HoldDown same result.

In history I see every push on the button

 

 

Please login or register to see this code.

 

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

    Jan I have a problem how to tackle? I do one cycle deur OPEN and Nachtslot

    than I press an press and press............................no action only false.

    I have 3 HUE switches who act all the same. I also tried HoldDown same result.

    In history I see every push on the button

     

     

    Please login or register to see this code.

     

    How are these Hue switches integrated with the HC3? Using childrenOfHue?

    Posted

    Yes in your COH 1.22

    Pressed followed automaticaly by released,  HoldDown >> shows in history

  • Topic Author
  • Posted

    There is also the approach that one builds a more complex tree of devices, like

    local HT = {

       kitchen = { lights = { tableLight=88,  roofLamp=99 }, sensors = { sensor1 = 53, sensor2 = 51 }},

       hall = { lights = {  roofLight1 = 101, roofLight2 = 109 }},

       bedroom = { lights = { roofLight = 201, bedTableLight1 = 204, bedTableLight2 = 205 }}

    }

     

    One could also generate this table by leveraging the rooms and sections that devices are placed in.

     

    Anyway, I'm sharing a feature that comes up in next version, a new property called :leaf 

    The reasoning is that the hometable, (or other ER defined variable with deviceIds) can be seen as a tree,

    where ex. kitchen in this example has 2 leafs, tableLight and roofLight.

     

    This is a good structure, but it also means that we can't do

    Please login or register to see this code.

    because kitchen.lights is not a list of devices, it's a key-value table, so it doesn't work.

    Well, :leafs takes an arbitrary complex key-value table and returns a list with the leafs (removing duplets)

    so, we can now do

    Please login or register to see this code.

    ...and it turns on all lights in the kitchen, without the need for a duplicate list variable.

     

    I'm also thinking how to filter out appropriate devices from the list , ex. only the lights or only the sensors...

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

    Yes in your COH 1.22

    Pressed followed automaticaly by released,  HoldDown >> shows in history

     

    I'm not sure I understand what you want to do. The log show that the rules trigger on 1:Pressed and 4:Pressed

    What is not working as expected?

    Posted

    Jan with the lights on/off I don't have a problem.

    I have aproblem withGV's sometimes they don'follow the rule fa

    Please login or register to see this code.

    If I check it's still $Verl_Dagdeel = 'Middag_Vroeg' so it skipped two other parts???

     

    the false in the log are also press the button

    but no respond in QA it show the action in History

    Posted (edited)

    Jan I never used those HUE dimmers in HC3.

    Here in ER% I got the idea to use them for enable arming if we go to sleep and to open manual by this switch the Dana lock, both a WAF project.

    So no experience how it should behave

    For HUE lights I have the grouped them in HUE app and don't often use a single light, if Ido it's to set different valus for brightness

     

    Edited by Sjakie
    add HUE
  • Topic Author
  • Posted
    9 minutes ago, Sjakie said:

    the false in the log are also press the button

    but no respond in QA it show the action in History

    The false in the logs are "Released" or "HeldDown" or the wrong keyId and thus false as far as I can see.

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

    Jan with the lights on/off I don't have a problem.

    I have aproblem withGV's sometimes they don'follow the rule fa

    Please login or register to see this code.

    If I check it's still $Verl_Dagdeel = 'Middag_Vroeg' so it skipped two other parts???

     

    Well, using an interval like this as a trigger is not so good.

    An interval like 12:00..16:15-1

    will trigger the rule at 12:00 and at 16:15-1+1

    The first trigger will be true, because it's 12:0, the second will be false because the time is > 16:15-1

    So, in effect, your rules trigger at 12:00, 16:15, and 18:00 respectively.

    That means that if you restart the QA at 18:15 it will not trigger and change the variable.

    You could add a .start() at the end of the each rule to trigger them at restart so that the varible is set accordingly.

    • Like 1
    Posted

    Please login or register to see this code.

    All button pressed after 19:53:32 are false!!!

    In history I see 

    Please login or register to see this code.

    Losgelaten>>Releasedbut I also press before I can release??

    It's the same device

    Posted
    5 hours ago, ChristianSogaard said:

    When using tryArm like this

    Please login or register to see this code.

    seems to work fine -ALARM cancel the arming if a windows is opened.

    But next step is post a message, which windows is opened. and i was expecting that below rule would give me that,.

    from the log, it seems that it newer triggers ?

     

     

    Please login or register to see this code.

     

     

     

    Its strange

    Trigger of the rule works.

    But even if my 3 alarm zones already are armed, it always run the !0:armed >> 0:tryArm.

    It sould be a toggle function enable/disable the alarm.

     

    Please login or register to see this code.

    Please login or register to see this spoiler.

     

    Posted

    Jan error posting scene events. I have added "sceneEvent" to self:enableTriggerType

     

    I use scene event, the scene itself is empty and used as a trigger that ER can read to do its thing (your code aswell :) )  I can then also use an apple shortcut to set an alarm dynamically called sunrise nursery to call the same scene.

     

    I'm getting this error

     

    [26.11.2023] [13:33:01] [TRACE] [ER311]: [Rule:28:3]>> TRUE #sceneEvent{id=11,.. -> #sceneEvent{id=11,value='started'} => ..

    [26.11.2023] [13:33:01] [TRACE] [ER311]: [Rule:28:3]>> Posting #sceneEvent11{} at Sun Nov 26 13:33:01 2023

    [26.11.2023] [13:33:01] [TRACE] [ER311]: [Rule:29:3]>> TRUE #sceneEvent11{} -> #sceneEvent11 => 60: value = 0; 60:on;..[

    26.11.2023] [13:33:01] [ERROR] [ER311]: [Rule:29:3]>> [Rule:29:#sceneEvent11 => 60: value = 0; 60:on; 60:dim = {00:15:00, 'up', 00:00:01, 'Li..] Runtime: ./include/utils.lua:319: attempt to call a nil value (method 'post') putprop
    #sceneEvent11 => 60: value = 0; 60:on; 60:dim = {00:15:00, 'up', 00:00:01, 'Linear', 0.99}; log('sceneEvent11 Sunrise nursery started')

    Posted

    hi jan

     

    EventRunner 5

    In

       -- Bathroom, uses a local flag (inBathroom)
       rule("trueFor(00:00:20,Livingbath_sensor:safe & Livingbath_door:value) & !inlivingBathroom => Livingbath_light:off")
       rule("Livingbath_sensor:breached => Livingbath_door:safe & inlivingBathroom=true; Livingbath_light:on")
       rule("Livingbath_door:breached => inlivingBathroom=false ")
       rule("Livingbath_door:safe & Livingbath_sensor:last<=3 => inlivingBathroom=true")

    Doesn't this rule support this action?
     
    Normal in ER4, error in ER5

  • Topic Author
  • Posted
    3 hours ago, Pica2017 said:

    Jan error posting scene events. I have added "sceneEvent" to self:enableTriggerType

     

    I use scene event, the scene itself is empty and used as a trigger that ER can read to do its thing (your code aswell :) )  I can then also use an apple shortcut to set an alarm dynamically called sunrise nursery to call the same scene.

     

    I'm getting this error

     

    [26.11.2023] [13:33:01] [TRACE] [ER311]: [Rule:28:3]>> TRUE #sceneEvent{id=11,.. -> #sceneEvent{id=11,value='started'} => ..

    [26.11.2023] [13:33:01] [TRACE] [ER311]: [Rule:28:3]>> Posting #sceneEvent11{} at Sun Nov 26 13:33:01 2023

    [26.11.2023] [13:33:01] [TRACE] [ER311]: [Rule:29:3]>> TRUE #sceneEvent11{} -> #sceneEvent11 => 60: value = 0; 60:on;..[

    26.11.2023] [13:33:01] [ERROR] [ER311]: [Rule:29:3]>> [Rule:29:#sceneEvent11 => 60: value = 0; 60:on; 60:dim = {00:15:00, 'up', 00:00:01, 'Li..] Runtime: ./include/utils.lua:319: attempt to call a nil value (method 'post') putprop
    #sceneEvent11 => 60: value = 0; 60:on; 60:dim = {00:15:00, 'up', 00:00:01, 'Linear', 0.99}; log('sceneEvent11 Sunrise nursery started')

    Sorry, this was a bug in the dim code. Next version today will have a fix.

    • Thanks 1
  • Topic Author
  • Posted
    11 hours ago, ChristianSogaard said:

    Its strange

    Trigger of the rule works.

    But even if my 3 alarm zones already are armed, it always run the !0:armed >> 0:tryArm.

    It sould be a toggle function enable/disable the alarm.

     

    Please login or register to see this code.

    Please login or register to see this spoiler.

    What error do you get?

    Posted
    3 minutes ago, jgab said:

    Sorry, it was a bug in 0:armed (whole house). Fixed in next version.

    What error do you get?

    [2023-11-26] [03:23:10 PM] [ERROR] [QUICKAPP2300]: Last err: [Rule:2:Livingbath_sensor:breached => Livingbath_door:safe & inlivingBathroom=true; Li..] Parser: left hand side of assignment unsupported Livingbath_sensor:breached => Livingbath_door:safe & inlivingBathroom=true; Livingbath_light:on ^

  • Topic Author
  • Posted
    45 minutes ago, minsad79 said:

    [2023-11-26] [03:23:10 PM] [ERROR] [QUICKAPP2300]: Last err: [Rule:2:Livingbath_sensor:breached => Livingbath_door:safe & inlivingBathroom=true; Li..] Parser: left hand side of assignment unsupported Livingbath_sensor:breached => Livingbath_door:safe & inlivingBathroom=true; Livingbath_light:on ^

    Yes, there is a change in ER5 language.

    In ER4

    a & b = c & d

    was interpreted as

    a & (b = c) & d

    in ER5 it is interpreted as

    (a & b) = (c & d)

    because & has higher priority than =

    To fix you rule add parenthesis around the assignment

     

    Please login or register to see this code.

     

  • Topic Author
  • Posted (edited)

    v0.34 pushed

    Fixed bugs causing problems for @Sjakie and his key rules

    Also, a general bug for trigger handling so I recommend all to update.

    Fixed 0:armed bug ( @ChristianSogaard )

    dim bug fixed ( @Pica2017 )

     

     

    Edited by jgab
    • Thanks 1
    Posted

    Good morning and thank you verry well!

  • Topic Author
  • Posted (edited)
    4 hours ago, minsad79 said:

    hi jan

    EventRunner 5

    In

       -- Bathroom, uses a local flag (inBathroom)
       rule("trueFor(00:00:20,Livingbath_sensor:safe & Livingbath_door:value) & !inlivingBathroom => Livingbath_light:off")
       rule("Livingbath_sensor:breached => Livingbath_door:safe & inlivingBathroom=true; Livingbath_light:on")
       rule("Livingbath_door:breached => inlivingBathroom=false ")
       rule("Livingbath_door:safe & Livingbath_sensor:last<=3 => inlivingBathroom=true")

    Doesn't this rule support this action?
     
    Normal in ER4, error in ER5

    When I got this problem report from @minsad79 I tried to run it, but I figured out quickly that it was an issue with the new language in ER5.

     

    However, to debug this kind of rules, one can setup a simple simulation of the devices involved.

    Please login or register to see this code.

    Redefine the sensors and lights 'Livingbath_x" with simulated binaryDevices.

    er.createBinaryDevice() creates a simulated binary device and returns the assigned deviceId.

     

    Then we have the bathroom rules as usual - now using our simulated devices.

     

    Then I setup a remote/keyfob so key presses toggles the door and motion sensor and logs a message what new state they have.

    I also setup debug options so the console output is not so noisy

    Please login or register to see this code.

     

    Then I can lean back, press the remote to toggle the state of the door and the sensor and see how the rules are triggered...

    WIthout having to run to the bathroom and open and close any door or breach any sensor :-) 

     

    Edited by jgab
    • Thanks 1

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