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

Hello 

Maybe a stupid question, but...
I have two motion sensors in my kitchen. Now, when one of them is triggered, I want the light to turn on and then turn off again after a defined time. They are an FGD-212 and FGMS-001.
Anyway. The following rule is not working properly.

Please login or register to see this code.

 

What is not working? If the rule is triggered in the morning or at night, everything is fine. It does not turn off during the day or in the evening.

That's why I created this additional rule. It works and then turns the light off after the specified 4 minutes.

What am I doing wrong?? I'm starting to despair and my wife isn't really that happy either.

  • Topic Author
  • Posted (edited)
    7 hours ago, KaWi said:

    Hello 

    Maybe a stupid question, but...
    I have two motion sensors in my kitchen. Now, when one of them is triggered, I want the light to turn on and then turn off again after a defined time. They are an FGD-212 and FGMS-001.
    Anyway. The following rule is not working properly.

    Please login or register to see this code.

     

    What is not working? If the rule is triggered in the morning or at night, everything is fine. It does not turn off during the day or in the evening.

    That's why I created this additional rule. It works and then turns the light off after the specified 4 minutes.

    What am I doing wrong?? I'm starting to despair and my wife isn't really that happy either.

    Well, it becomes a bit complicated with the killOthers option. In this case every time the condition becomes true 

    Please login or register to see this code.

    it will kill all waiting timers, so if you have triggered before and its waiting to turn off it will be cancelled.... which is normally what you want to do but the you have secondary conditions after || and if they are false nothing happens... and then it becomes complicated to understand what's going on.... especially as the rule can trigger positive several times in a row as 

    Please login or register to see this code.


    can take turn triggering the rule positively...

     

    I think you should use the 2 rule example you have, like 

    Please login or register to see this code.

    I can't fully grasp your secondary conditions like lux and :value<=41 but I assume you know what you do there....

    Edited by jgab
    Posted
    On 11/25/2024 at 8:01 PM, jgab said:

    Please login or register to see this code.

     

    Ok, it seems like the scene values are numbers and not strings which makes the test untrue.

    Add this in main() 

    Please login or register to see this code.

     

    I will fix it in the next version but it may take some time...

    oki  tack så mycket  :)

    Posted
    2 hours ago, jgab said:

    can't fully grasp your secondary conditions like lux and :value<=41 but I assume you know what you do there....

     

    About the lux I want that the light is only turned on when it is no longer bright enough in the kitchen. 
     

    When I turn on the light with the switch, a value of 45 is set. That's why I check with :Value<=41 whether the light was turned on manually via the switch (or with Alexa).

     

    Because, and this is the decisive factor, when my wife stands in the kitchen and reads in a book (and does not move) and then the light is turned off, that is very very bad for me.😉

     

    Thanks for your example. I will Test it. 

    Posted (edited)

    @jgab hello! This is my rule: Is there a simple way to use ’for in‘ while retaining the .mode ("killOthers") method

    Please login or register to see this code.

    2.and here killOthers is not useful:
     

    Please login or register to see this code.

    3.now i use this rule :
     

    Please login or register to see this code.

     

    Edited by lux
    Posted

    @jgab Jan, a bit of help needed here.

     

    Please login or register to see this code.

     

    Goal is when cica_PIR is breached and cica_watch_active is true, we want to broadcast, but also we need to ensure that cica_watch_active is true 2 sec after the trigger, and broadcast only if its confirmed after 2 sec

     

    trhows

    Please login or register to see this code.

     

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

    @jgab Jan, a bit of help needed here.

     

    Please login or register to see this code.

     

    Goal is when cica_PIR is breached and cica_watch_active is true, we want to broadcast, but also we need to ensure that cica_watch_active is true 2 sec after the trigger, and broadcast only if its confirmed after 2 sec

     

    trhows

    Please login or register to see this code.

     

    I tried the rule and it works without problem.

    The error message implies some unexpected character at the end of the rule. I guess it's those invisible unicode characters that can get in.

    When I'm using vscode to code the rules those characters are marked in the editor.

     

    Btw, I have updated vscode to generate .fqa files with he new uiView data structure so I may be able to create an EventRunner5.fqa where the UI elements don't disappear when re-saved....

    • Like 2
    • Thanks 1
    Posted
    17 minutes ago, jgab said:

     

    Btw, I have updated vscode to generate .fqa files with he new uiView data structure so I may be able to create an EventRunner5.fqa where the UI elements don't disappear when re-saved....

    Thanks, that would be fantastic

    Posted

    @jgab Jan hello. fibaroi.between should not be working in ER5? I need to test time on the action side of the rule.

    Please login or register to see this code.

    this doesnt work, or is there any equivalent to test time range on the action side? would the 18:00..22:00 format work?

    Posted

    Hi all,

     

    I can confirm that the issue with the buttons disappearing and having 2 counters for ping is still present with 5.171.

    After rebooting there is only 1 ping report left but the buttons are still missing. 

    I have also downgraded and upgraded to 1.05 but still the same.

    Waiting patiently;🫠

     

    Thanks for your work, @jgab☺️


     

  • Topic Author
  • Posted

    Ok, it turns out that the buttons are there but becoming invisible.

    I don't really understand why and what to do differently to avoid it.

    So a fix for the moment is to add some lines in QuickApp:onInit()

    Please login or register to see this code.

    I will soon release a new version with this "fix" incorporated...

    • Like 1
    • Thanks 1
    Posted

    Perfect, it works !

    Thank you😉

    • 2 weeks later...
    Posted

    Topic: Enabling a rule does not seem to actually enable it. 

     

    Dear all, 

    My aim is to use a remote control to activate a "rule"  that turns on a heater at 22.00 to use the lower night electricty tariff. It seems to work, but it doesn't :-( 

    When I press the button on the remote, output shows that " rule 21"  is enabled, but the rule doesn't actually do anything at 10:52.

    Where is my thinking wrong? 

     

    Thanks for any suggestions. Code and log output below. As you can see in the example below, nothing actually happened at 10:52 

     

    Please login or register to see this code.

     

  • Topic Author
  • Posted
    57 minutes ago, JeroenL said:

    Topic: Enabling a rule does not seem to actually enable it. 

     

    Dear all, 

    My aim is to use a remote control to activate a "rule"  that turns on a heater at 22.00 to use the lower night electricty tariff. It seems to work, but it doesn't :-( 

    When I press the button on the remote, output shows that " rule 21"  is enabled, but the rule doesn't actually do anything at 10:52.

    Where is my thinking wrong? 

     

    Thanks for any suggestions. Code and log output below. As you can see in the example below, nothing actually happened at 10:52 

     

    Please login or register to see this code.

     

    The problem is that when you disable the rule the daily timer is canceled and it will not trigger until next day (daily timers are scheduled at midnight, and when defined).

    What you could do is force the rescheduling of the timer.

    Ex.

    Please login or register to see this code.

    Let me know if it works.

    Posted
    1 hour ago, jgab said:

    The problem is that when you disable the rule the daily timer is canceled and it will not trigger until next day (daily timers are scheduled at midnight, and when defined).

    What you could do is force the rescheduling of the timer.

    Ex.

    Please login or register to see this code.

    Let me know if it works.

     

    Thanks @jgab, this works perfectly! Is there a downside of doing this, or not really? Reason for asking is that I want to program 5 (shoe) heaters like this. 

     

    Copying the working output below for others on this forum: 

     

    Please login or register to see this code.

     

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

     

    Thanks @jgab, this works perfectly! Is there a downside of doing this, or not really? Reason for asking is that I want to program 5 (shoe) heaters like this. 

     

    Copying the working output below for others on this forum: 

     

    Please login or register to see this code.

     

    No, there should be no downside. In fact, I think that enable should run ._setupDailys per default. I add it next version.

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