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
21 hours ago, jgab said:

If you look at this rule you gave, it ends in a double quote.

Please login or register to see this code.

But its part of a 

Please login or register to see this code.

so it should end in

Please login or register to see this code.

and remove the single quote in

Please login or register to see this code.

 

it's all google translator ... in life I have a rule of rules described ... with such errors ER4 would not even start

Posted (edited)

here in the log I see that the temperature has changed and the rule registers it ...

 

and today at 16.21 came the message that the temperature did not change ... although in fact the whole day LOG from your rule poured that the temperature changed ..

 

 

 

the rule sent in telegrams everything is OK ... here simply something the rule does not work so ...

although it is clear that at 16.07 the same rule recorded a change ...

 

 

 

Edited by fastvd
  • Topic Author
  • Posted
    15 minutes ago, fastvd said:

    here in the log I see that the temperature has changed and the rule registers it ...

    Please login or register to see this attachment.

    and today at 16.21 came the message that the temperature did not change ... although in fact the whole day LOG from your rule poured that the temperature changed ..

     

     

    Please login or register to see this attachment.

    the rule sent in telegrams everything is OK ... here simply something the rule does not work so ...

    although it is clear that at 16.07 the same rule recorded a change ...

     

     

    Please login or register to see this attachment.

    Thank, this is a good error report :-)

    I will look into it and come back.

    /J

    Posted
    29 minut temu, fastvd napisał:

    here in the log I see that the temperature has changed and the rule registers it ...

    Please login or register to see this attachment.

    and today at 16.21 came the message that the temperature did not change ... although in fact the whole day LOG from your rule poured that the temperature changed ..

     

     

    Please login or register to see this attachment.

    the rule sent in telegrams everything is OK ... here simply something the rule does not work so ...

    although it is clear that at 16.07 the same rule recorded a change ...

     

     

    Please login or register to see this attachment.

    I strongly advise you to remove these screenshots, or at least your public ip address visible on them ...

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

    Thank, this is a good error report :-)

    I will look into it and come back.

    /J

    Ok, I think I have the solution....

    Please login or register to see this code.

    We need to insert that magic wait(0) between flipping the tempWatch_Rx variables.

    My idea was that flipping the var would re-trigger the trueFor rule so it started another 12hour period.

    The problem is that the trueFor rule didn't get trigger between the flips, but triggered after the flip. Rules don't run in parallel so it flip-flopped the variable, the truFor got triggered afterwards and saw that the var was the same and didn't re-trigger.

    Inserting a wait(0) gives time for the trueFor rule to get scheduled in and discover that the var is set to false and thus restart the trueFor timer.

     

    My earlier test-case (when I crafted the rule for you) was too simple. Now I run it in the simulator for 72 hours and it works every time... :-) 

    Let me know if it works for you

     

     

    Posted

    Please tell me how to modify this rule:
    rule ("trueFor (00: 10, motion: safe) & door: isOff => fibaro.alarm (1, 'arm'); log ('Arming Basement Alarm'); again ()"). start ()
    So that it does not arm the alarm over and over again, even when it is already armed, but also arm the alarm after it is disarmed, but none of the sensors will be violated.

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

    Please tell me how to modify this rule:
    rule("trueFor (00: 10, motion: safe) & door: isOff => fibaro.alarm (1, 'arm'); log ('Arming Basement Alarm'); again ()"). start ()
    So that it does not arm the alarm over and over again, even when it is already armed, but also arm the alarm after it is disarmed, but none of the sensors will be violated.

    There was a post with the new alarm functions in ER4

    I'm a bit unsure what you mean with "but also arm the alarm after it is disarmed, but none of the sensors will be violated"

    Can you give some examples?

     

    In the rule. below I removed the again() - not sure you need this.

    It also checks if the partition is not armed before going ahead and arming.

    rule("trueFor(00:10, motion:safe) & door:isOff & 1:alarm.armed == false => 1:alarm=true; log ('Arming Basement Alarm')"). start()

  • Topic Author
  • Posted
    12 hours ago, Sjakie said:

    Jan,

    This combination of rules doest work properly. Curtain closes immeadiatly after start to open

    I need to add 30 seconds for open the curtain. Is this correct?

    How to adapt month in dates  ('04/14-10/31') or (04/10-10/31)

    What is the correct notation for:

     

     

    Please login or register to see this code.

    This will run when woonKamer.gordijnOpRit:isOpen triggers,

    then you immediately call close

    woonKamer.gordijnOpRit:close;

    So, yes, it will start to close as soon. as it starts to open.

     

    Yes, you need to add some delay so the  curtains get a chans to open I guess.

     

  • Topic Author
  • Posted
    12 hours ago, Sjakie said:

    How to adapt month in dates  ('04/14-10/31') or (04/10-10/31)

     

    rule("/04/14/00:00../10/31/23:00 => ....")

    Posted

    Jan,

    Thank you very much! The sun will not shine in my eys  at  early morning anymore.

     

    This I can not get working I have tried several option please correct my rule

     

    Please login or register to see this code.

     

    Posted
    17 minut temu, jgab napisał:

    There was a post with the new alarm functions in ER4

    I'm a bit unsure what you mean with "but also arm the alarm after it is disarmed, but none of the sensors will be violated"

    Can you give some examples?

    Alarm armed > disarming from phone, but change my mind and didn't open the basement, so it need to be auto armed, so i think "again()" is needed...  

    Posted

    @jgab hi mate:) hope you are doing fine. 

     

    Changing a sensor today i noticed none of the rules that were sending push messages do not work anymore. They seem to trigger but no message arrives.  

     

    Rules like: 

    rule("trueFor(00:00:30,ScafaBirou:isOn) => 2:msg=log('Scafa Birou On %s minutes',again(5)*3)")
     
    debug is:
    [19.04.2021] [23:32:54] [TRACE] [QUICKAPP1149]: Scafa Birou On 3 minutes
    [19.04.2021] [23:32:54] [DEBUG] [QUICKAPP1149]: fibaro.call(2,"sendGlobalPushNotifications","Scafa Birou On 3 minutes","false") => nil
     
    Most likely it is something i am doing or i just forgot how to do it.  Or something changed and i did not notice it.
    I looked through the topic but have not seen anything about this.
    Could you please enlighten me ? 
     
    Cheers:)
     
    Posted

    @Momos, on my end push msg does not work for admin or user. If you use IPhoneID you will recieve push msg again.

    //sjakie

    • Thanks 1
  • Topic Author
  • Posted
    8 minutes ago, Sjakie said:

    @Momos, on my end push msg does not work for admin or user. If you use IPhoneID you will recieve push msg again.

    //sjakie

    Yes, notifications are a hit and miss for me too.

    I'm not a heavy user of notifications - I want it to be silent if everything is working :-)

    Sometimes I haven't got notifications and I remember that during the Fall I sometimes got them twice...

    These day user:msg = ...

    Is translated to 

    fibaro.call(<id>,"sendGlobalPushNotifications",<message>,"false")

    I don't remember were I got the "false" at the end from, but at the time it seemed to help.

    If someone can come up with a better Lua command or API call I'm happy to make the modification.

    Btw, Interactive notifications have been dead for me for months now.

     

    Posted

    Jan,  I agree as less as possible messages.

    I use it to confirm an action is executed such as alarm on/off  or for dishwasser, dryer and washing machine are ready.

    By the way I forgot to mention that Telegram is a reliable alternative>>it is always sending your message!

    //Sjakie

    Posted (edited)

    These notifications used to work very well. I use them mainly to notify me of critical stuff.

     

    In LUA i use a line like this and it always work.

    fibaro.alert("push", {2}, "Gate is opened for more then 3 min !")
     
    No idea how to make it work in ER4 
     
    Cheers:) 
     
    Edited by Momos
  • Topic Author
  • Posted
    7 minutes ago, Momos said:

    These notifications used to work very well. 

    Anyhow this always works but no idea how to implement it...

    fibaro.alert("push", {2}, "Gate is opened for more then 3 min !")
     

    something like this until I can create a fix
     

    function notify(id,msg)

        fibaro.alert("push", {id}, msg)

    end
    rule("trueFor(00:00:30,ScafaBirou:isOn) => 

     notify(2,log('Scafa Birou On %s minutes',again(5)*3))”)

    Posted

    Does not work.

     

    The call is still:

    fibaro.call(2,"sendGlobalPushNotifications","Scafa Birou On 9 minutes","false") => nil

    Posted

    [20.04.2021] [09:09:14] [DEBUG] [QUICKAPP796]: fibaro.alert('push', {126}, 'PhoneID restart QA 796');

    Posted

    ? then i inserted that function in the wrong place...

     

    function notify(id,msg)
        fibaro.alert("push", {id}, msg)
    end
     
    rule("trueFor(00:00:30,ScafaBirou:isOn) => notify(2,log('Scafa Birou On %s minutes',again(5)*3))")
     
    I just copied before the rules
     
    • Like 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...