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

  • Topic Author
  • Yes, it's marking that you have some extended (invisible) iso chars after => in the rule.

    Link to comment
    Share on other sites

    Just now, jgab said:

    Yes, it's marking that you have some extended (invisible) iso chars after => in the rule.

    ?? How can it hapen, and how to solve? Just delete and rewrite?

    Link to comment
    Share on other sites

  • Topic Author
  • 5 minutes ago, Neo Andersson said:

    ?? How can it hapen, and how to solve? Just delete and rewrite?

    Yes, delete the text around from "}" to after the "=>" and retype it.

    Happens me quite often when I type "}" on my Mac keyboard.

    Link to comment
    Share on other sites

    @jgab Jan, you have checked this for me already, but this still doesn't work.

     

    Please login or register to see this code.

     As far as it concerns the windowOpened proeprty i can say that it is definitelly posted by the system, as i was checking this property for years using fibaroExtra without any problem.

    Do you have any clue where to find the problem?

    To monitor the triggers by the system is not an option for me, as i can't sit infront of the PC all the day and waiting for it to happen, and this trigger can not be evoked artifically i think.

    Some tips how to catch the origin of the problem?

    Is it possible that this event is not fired in the system after the fw update? I doubt it, because in main panel notification section there is the warning message from the system.

    Edited by Neo Andersson
    Link to comment
    Share on other sites

  • Topic Author
  • 1 hour ago, Neo Andersson said:

    @jgab Jan, you have checked this for me already, but this still doesn't work.

     

    Please login or register to see this code.

     As far as it concerns the windowOpened proeprty i can say that it is definitelly posted by the system, as i was checking this property for years using fibaroExtra without any problem.

    Do you have any clue where to find the problem?

    To monitor the triggers by the system is not an option for me, as i can't sit infront of the PC all the day and waiting for it to happen, and this trigger can not be evoked artifically i think.

    Some tips how to catch the origin of the problem?

    Is it possible that this event is not fired in the system after the fw update? I doubt it, because in main panel notification section there is the warning message from the system.

    In the event pattern you shouldn't have value ==  '$value'

    You should have value = '$value'

    Link to comment
    Share on other sites

    10 hours ago, jgab said:

    In the event pattern you shouldn't have value ==  '$value'

    You should have value = '$value'

    @jgab Thats the difference. For me 6 hours of searching..no result...For you.. 1 minute

    I have a picture of you on my office wall 😁

    Link to comment
    Share on other sites

    Thats why the proposal to use ER5 it has a much better error notification.:)

    Link to comment
    Share on other sites

    Hello Jan, 

    How to send http post using rule? i didnt find any example for POST


    What is wrong with this ?

    Please login or register to see this code.

     
    Edited by Neo Andersson
    Link to comment
    Share on other sites

    Hello. I make a mini-calendar for myself so that I don't forget some chores around the house. and faced the problem that I don't know how to describe the rule so that it would work for me once every 3 years, let's say on September 1...

    Link to comment
    Share on other sites

  • Topic Author
  • 22 minutes ago, fastvd said:

    Hello. I make a mini-calendar for myself so that I don't forget some chores around the house. and faced the problem that I don't know how to describe the rule so that it would work for me once every 3 years, let's say on September 1...

    Every 3 years? You will keep your HC3 that long? :-) 

     

    Ok, assume, September 1, - you have to decide what time, in the morning, in the evening? Let's assume 07:00

    There is no good way to check a list of years so we do a Lua table with the years of interest...

    Please login or register to see this code.

     

     

    • Like 1
    Link to comment
    Share on other sites

    Jan, i need to create a rule that will check devices lastChanged property and when it is older than one day, it should report it.

    So in ER5 we can create our property, what i did, and it works, so i can get lastChanged property value from a device (if it supports it)

    How canwe create a rule that will monitor this property for a list of sensors? I created this one,should this work?

     

    Please login or register to see this code.

     

    Edited by Neo Andersson
    Link to comment
    Share on other sites

  • Topic Author
  • 20 minutes ago, Neo Andersson said:

    Jan, i need to create a rule that will check devices lastChanged property and when it is older than one day, it should report it.

    So in ER5 we can create our property, what i did, and it works, so i can get lastChanged property value from a device (if it supports it)

    How canwe create a rule that will monitor this property for a list of sensors? I created this one,should this work?

     

    Please login or register to see this code.

     

    No, :lastChanged applied to a list of devices will return a list of last changed times of the devices.

    The other problem is that lastChanged don't generate an event when lastChanged grows so we can't do a trueFor either.

    The simplest way is to check every hour and see if any devices hasn't changed for 24 hour

    and if so, filter out the devices with a :last > 24 and log them

    Please login or register to see this code.

     

    Now if any sensors has a :last > 24 it will log them every hour...

    • Like 1
    Link to comment
    Share on other sites

    2 hours ago, jgab said:

    No, :lastChanged applied to a list of devices will return a list of last changed times of the devices.

    The other problem is that lastChanged don't generate an event when lastChanged grows so we can't do a trueFor either.

    The simplest way is to check every hour and see if any devices hasn't changed for 24 hour

    and if so, filter out the devices with a :last > 24 and log them

    Please login or register to see this code.

     

    Now if any sensors has a :last > 24 it will log them every hour...

    Jan i am getting error

    Please login or register to see this code.

     

     

    [04.12.2023] [14:14:46] [ERROR] [ER1163]: [Rule:1:2]>> [Rule:1:@@01:00 & max(allSensors:lastChanged) > 24:00 => local devices = [ _:lastChang..] Runtime: ./include/vm.lua:89: attempt to compare number with nil gt
    @@01:00 & max(allSensors:lastChanged) > 24:00 => local devices = [ _:lastChanged > 24:00 in allSensors]; log('Devices with lastChanged > 24:00 %l',devices)

     

     

    Please login or register to see this attachment.

    Link to comment
    Share on other sites

  • Topic Author
  • Yes, lastChanged is not a property of a device. It's the second value you get when you do fibaro.get(id, prop).

    Also, the lastChanged as reported by fibaro.get is the epoch date of the change - we want the difference between now and the change date.

     

    Anyway - you don't need to define the property, the :last property is already defined and return the number of seconds since the last change - so my example should work as is.

    Link to comment
    Share on other sites

    • 1 month later...
    On 11/10/2023 at 3:14 PM, jgab said:

    Please login or register to see this code.

     

    @jgab Jan this apporach seems to me incorrrect.

    || x > 5 >> dosomething

    || x == 5 >> dosomething

    || true >> dosomething

     

    Doesnt that mean the last part will run always? regardless of anything..becuase true is always true, so it will run even if x > 5  and x == 5 i think

     

    Link to comment
    Share on other sites

  • Topic Author
  • 44 minutes ago, Neo Andersson said:

    @jgab Jan this apporach seems to me incorrrect.

    || x > 5 >> dosomething

    || x == 5 >> dosomething

    || true >> dosomething

     

    Doesnt that mean the last part will run always? regardless of anything..becuase true is always true, so it will run even if x > 5  and x == 5 i think

     

    No, ||>> becomes an if-then-else chain where it only runs the first statement that has a true test.

    By having a true as test in the last branch that will be done if none of the previous have tested true.

    • Thanks 1
    Link to comment
    Share on other sites

    • 4 weeks later...

    Hello. Thanks to you, I'm using er4 well.
    This is the phrase I use to run the boiler.
    rule("BO.DR:isOff & BO.DRT:value<4 => BO.DR:on")
    It is allowed to be turned on when the room temperature is less than 4°C.
    Can you set a range of indoor temperatures to turn on the boiler?
    For example, I only want it to be turned on between 0°C and 4°C.

    Link to comment
    Share on other sites

  • Topic Author
  • 45 minutes ago, jeongddeng said:

    Hello. Thanks to you, I'm using er4 well.
    This is the phrase I use to run the boiler.
    rule("BO.DR:isOff & BO.DRT:value<4 => BO.DR:on")
    It is allowed to be turned on when the room temperature is less than 4°C.
    Can you set a range of indoor temperatures to turn on the boiler?
    For example, I only want it to be turned on between 0°C and 4°C.

     

    Please login or register to see this code.

     

    0-4 including...

    • Like 1
    Link to comment
    Share on other sites

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