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

@jgab profiles are working, thanks. I would like also detect that profile was changed - how to do it without checking in regular interval?

  • Topic Author
  • Posted
    2 hours ago, petrkl12 said:

    @jgab profiles are working, thanks. I would like also detect that profile was changed - how to do it without checking in regular interval?

    A sourceTrigger event is generated, that you can trigger on.

    Please login or register to see this code.

     

    • Thanks 1
    Posted (edited)

    Congrats on ER6!

     

    Previously in my ER5, I had this line which activates on a HTTP call. This then 'broadcasts' out to other QAs.

     

    Please login or register to see this code.

     

    I see the following in my log:

     

    Please login or register to see this code.

     

    Do I need to change fibaro.publish() ?

     

    thanks

    Edited by gurpal2000
    Posted (edited)

    Second problem. Events firing earlier than expected.

     

    eg.

     

    Please login or register to see this code.

     

    log shows

     

    Please login or register to see this code.

     

    I will compare with ER5, but is this 'normal' ? I haven't changed the motion detectors' timeout setting etc. 

    Edited by gurpal2000
  • Topic Author
  • Posted
    12 hours ago, gurpal2000 said:

    Congrats on ER6!

     

    Previously in my ER5, I had this line which activates on a HTTP call. This then 'broadcasts' out to other QAs.

     

    Please login or register to see this code.

     

    I see the following in my log:

     

    Please login or register to see this code.

     

    Do I need to change fibaro.publish() ?

     

    thanks

    fibaro.publish is not there. Will add today and release a new version.

    10 hours ago, gurpal2000 said:

    Second problem. Events firing earlier than expected.

     

    eg.

     

    Please login or register to see this code.

     

    log shows

     

    Please login or register to see this code.

     

    I will compare with ER5, but is this 'normal' ? I haven't changed the motion detectors' timeout setting etc. 

     

    This is strange. I made a test with the same rule and it turned off exactly 5min later.
    If it would have turned off later it would have made sense (the sensor being re-breached), but early is really strange.
    You always have this behavior or only sometimes?

    Posted (edited)
    5 hours ago, jgab said:

    fibaro.publish is not there. Will add today and release a new version.

     

    This is strange. I made a test with the same rule and it turned off exactly 5min later.
    If it would have turned off later it would have made sense (the sensor being re-breached), but early is really strange.
    You always have this behavior or only sometimes?

     

    Originally, I thought it could be because I had both ER5 and ER6 installed, even though ER5 is disabled in HC3. But I think disabled isn't good enough to guarantee it won't be active in some way (eg. initialisation code outside of init() still called?), so I just completely deleted it and repeated some tests:

     

    (a) Utility

    1 sensor, 1 light

     

    (b) Stairs

    2 sensors, 1 light

    sensors are completely out of sight of each other

    breach any one of the sensors (or both), in my test i only breached one for sure

     

     

    Please login or register to see this code.

     

     

    Please login or register to see this code.

     

    logs (NOTE not in chrono order i've grouped them)

     

    Please login or register to see this code.

     

    1. Just over 5 mins for Utility
    2. Why would "stairs on" appear twice...
    3. The outer times for the 1st test is exactly 5 mins (good)
    4. The outer times for the 3rd test is 3 min 10 sec (not good)
     
    Assume the logging is async, but it can't be that latent.
     
    thanks
    Edited by gurpal2000
    Posted

    @jgab Is parameter CATCH implemented?

     

    In this rule there is error:

    Please login or register to see this code.

     

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

    @jgab Is parameter CATCH implemented?

     

    In this rule there is error:

    Please login or register to see this code.

     

    If you declare 
    triggerVar._heatingSeason = 0
    you should use just _heatingSeason in rule.

    Please login or register to see this code.

     

    • Thanks 1
  • Topic Author
  • Posted
    1 hour ago, gurpal2000 said:

     

    Originally, I thought it could be because I had both ER5 and ER6 installed, even though ER5 is disabled in HC3. But I think disabled isn't good enough to guarantee it won't be active in some way (eg. initialisation code outside of init() still called?), so I just completely deleted it and repeated some tests:

     

    (a) Utility

    1 sensor, 1 light

     

    (b) Stairs

    2 sensors, 1 light

    sensors are completely out of sight of each other

    breach any one of the sensors (or both), in my test i only breached one for sure

     

     

    Please login or register to see this code.

     

     

    Please login or register to see this code.

     

    logs (NOTE not in chrono order i've grouped them)

     

    Please login or register to see this code.

     

    1. Just over 5 mins for Utility
    2. Why would "stairs on" appear twice...
    3. The outer times for the 1st test is exactly 5 mins (good)
    4. The outer times for the 3rd test is 3 min 10 sec (not good)
     
    Assume the logging is async, but it can't be that latent.
     
    thanks

    Thanks for the info.
    ER5 and ER6 don't interfere with each other...


    The stairs.motion:breached is triggered every time a sensor in the motion table changes state. That's why you get 2 triggers.
    For turning on or off lights, that is not usually a problem as turning on something already on doesn't do anything...
    There are ways around it like wrapping the test in once(...)

    Please login or register to see this code.

    but you should not need it.

    test 2 is the utility? It's late by 27 seconds, could be a system delay but a bit suspicious...

    test 3 is not good, I need to put on my thinking hat and come back to you...

     

    • Like 1
    Posted

    @jgab

    I have this rule:

    Please login or register to see this code.

     

    result is:

    Please login or register to see this code.

     

    rule was trigged but result is %s

     

  • Topic Author
  • Posted

    Yes, the .start() don't work for this as the rule will get a generic event that probably don't have value.... the device haven't sent an event yet so rule.start() hands the rule a generic event, just to trigger the rule. It works better with rules like "device:isOn => ..."  because the device:isOn makes the test if the device is on...
    So if you wan't to read the value at startup you need a separate expression for that
    Like:
    rule("_stateHeating=fibaro.getValue(HT.Celydum.Hlavnitermostat,'thermostatOperatingState'); log('Zmena stavu hlavniho termostatu pro topeni: %s',_stateHeating)"

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

     

    Originally, I thought it could be because I had both ER5 and ER6 installed, even though ER5 is disabled in HC3. But I think disabled isn't good enough to guarantee it won't be active in some way (eg. initialisation code outside of init() still called?), so I just completely deleted it and repeated some tests:

     

    (a) Utility

    1 sensor, 1 light

     

    (b) Stairs

    2 sensors, 1 light

    sensors are completely out of sight of each other

    breach any one of the sensors (or both), in my test i only breached one for sure

     

     

    Please login or register to see this code.

     

     

    Please login or register to see this code.

     

    logs (NOTE not in chrono order i've grouped them)

     

    Please login or register to see this code.

     

    1. Just over 5 mins for Utility
    2. Why would "stairs on" appear twice...
    3. The outer times for the 1st test is exactly 5 mins (good)
    4. The outer times for the 3rd test is 3 min 10 sec (not good)
     
    Assume the logging is async, but it can't be that latent.
     
    thanks

     

    I haven't been able to replicate it. I (think I) have tried all kind of combinations with timings...

    Can you change the stairs rule that you have issues with to this

    Please login or register to see this code.

    Then we get a feeling when the sensors change value for you and
    we get both the "stairs motion change.." log to correlate with the "stairs lights off" log.
     

    Posted (edited)
    3 hours ago, jgab said:

     

    I haven't been able to replicate it. I (think I) have tried all kind of combinations with timings...

    Can you change the stairs rule that you have issues with to this

    Please login or register to see this code.

    Then we get a feeling when the sensors change value for you and
    we get both the "stairs motion change.." log to correlate with the "stairs lights off" log.
     

     

    Sure, I'm attaching the full log for transparency. There's a load of rules there, but stairs appears as rule 1 to 3 with log lines prefixed with double stars. In this case, it is exactly 5 mins (a good result). Why the variations...who knows.

    Please login or register to see this attachment.

    Edited by gurpal2000
  • Topic Author
  • Posted

    I woke up in the middle of the night and realized that the log rule I gave you was wrong. It will only log motion when true.

    This is the correct rule

    Please login or register to see this code.

    Anyway, I will look at your log anyway and see if it makes sense - but it will miss when they go true....

  • Topic Author
  • Posted

    I looked at your log, it was very helpful, but it IS strange. I only show rule 1-3

    Please login or register to see this code.

     

    motion:breached is true if any of the sensors in motion is breached, e.g. any value is true
    motion:safe is true if all the sensors in motion is safe, all values are false

     

    So the log from you have 2 strangeness... 

    1. When rule 2 triggers and succeeds when both sensor are false. HT.stairs.motion:breached should be false and rule should not succeed.

    2. When rule 3 is 'true' at 22:27:49 and starts timer. HT.stairs.motion:safe should be false when 366 is true and the trueFor timer should not be started.

     

    This is not just bugs, as ex. 1 should be (is) impossible...

     

    I'm a bit clueless right now. Can you replace the rules once again with the version below, it would expose the strangeness even better...
     

    Please login or register to see this code.

    also try to get the first log with the list of stair sensors...

     

    I do like a good mystery and this is certainly a one....
    Thanks.

    Posted (edited)
    5 hours ago, jgab said:

    I looked at your log, it was very helpful, but it IS strange. I only show rule 1-3

    Please login or register to see this code.

     

    motion:breached is true if any of the sensors in motion is breached, e.g. any value is true
    motion:safe is true if all the sensors in motion is safe, all values are false

     

    So the log from you have 2 strangeness... 

    1. When rule 2 triggers and succeeds when both sensor are false. HT.stairs.motion:breached should be false and rule should not succeed.

    2. When rule 3 is 'true' at 22:27:49 and starts timer. HT.stairs.motion:safe should be false when 366 is true and the trueFor timer should not be started.

     

    This is not just bugs, as ex. 1 should be (is) impossible...

     

    I'm a bit clueless right now. Can you replace the rules once again with the version below, it would expose the strangeness even better...
     

    Please login or register to see this code.

    also try to get the first log with the list of stair sensors...

     

    I do like a good mystery and this is certainly a one....
    Thanks.

     

    Attached log2.txt.

    I still don't understand the "on" at 11:59:39

    Please login or register to see this attachment.

    Edited by gurpal2000
  • Topic Author
  • Posted
    22 minutes ago, gurpal2000 said:

     

    Attached log2.txt

    Please login or register to see this attachment.

     

    Thanks.

    Question: Why 2 logs from this rule in the beginning?

    Please login or register to see this code.

    or is it a typo? (every little detail counts ;-) )

     

    Otherwise, the BIG problem I see in your log is that when we log :breached or :safe for the stair with 2 sensors, the log is the table with the 2 sensors, not the expected true or false value. That is strange(!)

    A table is always "true" in Lua, so all :safe and :breached tests on stair will be true ,which is (a) reason for the strange behavior of your rules...

     

    Can you just run

    Please login or register to see this code.

     

    Please login or register to see this code.

    Please login or register to see this code.

    ...and tell me what you get?

  • Topic Author
  • Posted

    I also saw in your log that my rule created uneccessary triggers 

    Please login or register to see this code.

    It should only be one for 366 and one for 388.

    I have published v0.0.52 with a fix for that - however, that should not be the cause of your problems.

    Posted (edited)

    I'm using the debug console in full screen (reset filters so everything is shown).

    They appear twice. I even rebooted the device and tried again. Could it be that something has changed in the HC code itself?

     

    Please login or register to see this image.

    /monthly_2025_10/image.png.470a76225b64dbddf889854b338e0aaa.png" />

     

    Extra info that may be useful:

     

    Attached the actual QA code.

    Attached a dump of the "ListDevices" QA I got from somewhere.

    Using HC3 build 5.190.36 - newer than yours

    The sensors are all Aeotec Multisensor 6 with firmware versions 1.15 for id=366, version 1.17 for id=388. Yes, there's is a difference, however I'm only physically walking under one of them. Both devices have the same config/params.

     

    output for what you asked:

     

    Please login or register to see this code.

     

    Please login or register to see this attachment.

    Please login or register to see this attachment.

    Edited by gurpal2000
  • Topic Author
  • Posted
    7 hours ago, gurpal2000 said:

    I'm using the debug console in full screen (reset filters so everything is shown).

    They appear twice. I even rebooted the device and tried again. Could it be that something has changed in the HC code itself?

     

    Please login or register to see this link.

     

    Extra info that may be useful:

     

    Attached the actual QA code.

    Attached a dump of the "ListDevices" QA I got from somewhere.

    Using HC3 build 5.190.36 - newer than yours

    The sensors are all Aeotec Multisensor 6 with firmware versions 1.15 for id=366, version 1.17 for id=388. Yes, there's is a difference, however I'm only physically walking under one of them. Both devices have the same config/params.

     

    I have the last fw, I just don't update my signature...

     

    I don't think it's your sensors that is the problem - it is something with your ER6 instance/code.

    Can you save it as a .fqa and PM me the QA so I could have a look at it and debug it?

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