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



jgab

Recommended Posts

Jan, hehe somewhere a weird font, rules copied from Excel, sorry.

I started to type manually and suddenly it filled the GV with values.

Thanks

Link to comment
Share on other sites

Jan, how can I combine in one email?

Please login or register to see this code.

I tryed {20}:email ={log(..............), log(.............)};  did't wolk.

Thanks

Link to comment
Share on other sites

  • Topic Author
  • You can combine them in one log statement. A small problem is that in the HC3 log it will appear on one line but in the email you get a newline between the lines.

    Please login or register to see this code.

     

    Link to comment
    Share on other sites

    Thanks, finished my energy consumption now in HC3 awaiting for Sunday if the proper numbers will be reported.

    Nice weekend

    Link to comment
    Share on other sites

    On 9/2/2022 at 9:24 AM, jgab said:

    Yes, but doesn't this work?

    Please login or register to see this code.

    Our waterNormal will only be false if the sensor been safe for 15min.

    When the sensor is breached the waterNormal is immediately true

     

    Then we have another rule that looks at waterNormal and sends a message when it's been true for 30min.

    If the sensor is safe less than 15min it will not change waterNormal and thus not trigger a new message.

     

    Shouldn't you send a message if sensor been safe for >15min? Like "water high"?

    time appeared and sorted out your rule in my head...roughly speaking, this rule:
    rule("trueFor(00:15,waterUp:safe) => waterNormal=false").start()
    will constantly update the status of the variable...and only when, roughly speaking, it DOES NOT break the cycle of the bottom for 30 minutes, then the rule WORKS!
    while I just have a float and I play 1 and 2 min... there are no DUPLICATE messages!
    THANK YOU MAESTRO!

    • Like 1
    Link to comment
    Share on other sites

    On 8/28/2022 at 3:23 PM, ChristianSogaard said:

    I think this way should be easier for me to manage

    Hi @jgab

     

    I have a huge HTab, containing all my devices so naming in Eventrunner are easier. (at least most og the time) - structure is different and below is just one section..

     

    for creating a memory funktion for the light in my matrix switches - i need two functions. 

    One that can ADD a number, eg 1000 to rooms.all to local HTab 
    And One that can remove 1000 from rooms.all in local HTab

     

    With this - i can maintain the list and only add color changes to the number in the list.

    Would you show the light for me ;-)

     

    Please login or register to see this code.


     

    Link to comment
    Share on other sites

  • Topic Author
  • 10 hours ago, ChristianSogaard said:

    Hi @jgab

     

    I have a huge HTab, containing all my devices so naming in Eventrunner are easier. (at least most og the time) - structure is different and below is just one section..

     

    for creating a memory funktion for the light in my matrix switches - i need two functions. 

    One that can ADD a number, eg 1000 to rooms.all to local HTab 
    And One that can remove 1000 from rooms.all in local HTab

     

    With this - i can maintain the list and only add color changes to the number in the list.

    Would you show the light for me ;-)

     

    Please login or register to see this code.


     

     

    I see that you define the table with local HTab so I assume that you declare it later with Util.defvars(HTab) and that in rules you have access to

    rule("log('all rooms:%s',tjson(rooms.all))")

    ?

    If so, you can do

    Please login or register to see this code.

     

    • Like 1
    Link to comment
    Share on other sites

    Jan, I want 2 or zero decimals in 

    Please login or register to see this code.

    How to do?

    Thanks

    Link to comment
    Share on other sites

    the following question: how to use ER4 to receive, say, a message about the unavailability of the device in a telegram? p.s.: it seems that there is a place to put a check mark on the website so that the notification goes out, but firstly, it is not convenient to check the box on every device, and secondly, there are no third-party messengers!

    Edited by fastvd
    Link to comment
    Share on other sites

  • Topic Author
  • On 9/4/2022 at 2:01 PM, Sjakie said:

    Jan, I want 2 or zero decimals in 

    Please login or register to see this code.

    How to do?

    Thanks

     

    log('#C:yellow#$Zenergie_Elec_Verbr_Week kWh %.2f',$Zenergie_Elec_Verbr_Week);

    Link to comment
    Share on other sites

    Jan, thanks!

    I have another one:

    Please login or register to see this code.

    How to get sunset and sunrise in hh:mm in debug?

    Link to comment
    Share on other sites

  • Topic Author
  • Pushed v0.87. 

    Some new features.

     

    The log function will print tables without having to convert to json.

    Ex. 

    previously we did

    Please login or register to see this code.

    Now we can do

    Please login or register to see this code.

     

    If tables are pretty printed or not is decided by the flag 

    Please login or register to see this code.

     

    Secondly, a new property, :isDead.  (I thought I already had it but it may have disappeared between ER3 and ER4)

    Ex.

    Please login or register to see this code.

     

    Lastly, we can assign debug tags to rules

    Ex.

    Please login or register to see this code.

     

    It works a bit like fibaro.EM.SECTION.

    We can also assign a tag to a single rule with

    Please login or register to see this code.

     

    2 minutes ago, Sjakie said:

    Jan, thanks!

    I have another one:

    Please login or register to see this code.

    How to get sunset and sunrise in hh:mm in debug?

     

    Please login or register to see this code.

     

    there is also a function HMS(time) that gives you "HH:MM:SS"

    Link to comment
    Share on other sites

    Jan, Excellent!!!

    Is there a way for a lazy person as I am:

    extract in ER list of all devices

    or in case I forget to add to list dead devices to report new devices?

     

    Link to comment
    Share on other sites

    well..the rule of IsDead

    Please login or register to see this code.

    ..thanks.
    and now how to get a log that the connection has been restored?)))

    Edited by fastvd
    Link to comment
    Share on other sites

  • Topic Author
  • 4 hours ago, Sjakie said:

    Jan, Excellent!!!

    Is there a way for a lazy person as I am:

    extract in ER list of all devices

    or in case I forget to add to list dead devices to report new devices?

     

    Please login or register to see this code.

     

    Edited by jgab
    • Like 1
    Link to comment
    Share on other sites

  • Topic Author
  • 32 minutes ago, fastvd said:

    well..the rule of IsDead

    Please login or register to see this code.

    ..thanks.
    and now how to get a log that the connection has been restored?)))

    ...

    Please login or register to see this code.

    Edited by jgab
    • Like 1
    Link to comment
    Share on other sites

    58 minutes ago, jgab said:

    Please login or register to see this code.

     

    the rule is cool, but it would be good if it issued only on a rooted device (Parent)... otherwise, in such an edition, it ALL pours...

    Link to comment
    Share on other sites

    I just now saw that I have so many devices offline...
    came up with the idea of a morning daily mini report so to speak...
    let's say that at 9 o'clock in the morning they came in a telegram:
    1) if all devices are online - yes and say that all DEVICES are online, if not, then give a list of devices
    2) if there is an opportunity to check the battery charge level, it would be great to include this in the morning report as well
    3) also throw how much energy was consumed or produced

    4) if there are any binary sensors that, let's say, like mine: they measure the water level, or, like mine, they measure whether my septic tanks are not full - so report (I have a report on septic tanks, water level, lake water temperature and temperature air comes every day)-VERY comfortable
    .
    how nice to implement it? start least with AVAILABILITY!

     

     

    Please login or register to see this attachment.

    MY morning reports:
    rule([[once(@ {catch, 09:00} & 08:59..09:01 ) =>
      || $WaterLevel=='UP' >> fibaro.call(201, 'sendMessage', fmt('Temperatures: water in the lake %s °C, outside %s °C' , tempOzero:value, tempStreet:value), - 653771009);
     fibaro.call(201, 'sendMessage', fmt('Water level: CATASTROPHIC'), -653771009)
      || $WaterLevel=='NORM' >> fibaro.call(201, 'sendMessage', fmt('Temperatures: water in the lake %s °C, outside %s °C' , tempOzero:value, tempStreet:value), - 653771009);
      fibaro.call(201, 'sendMessage', fmt('Water level: NORMAL'), -653771009)
      || $WaterLevel=='DOWN' >> fibaro.call(201, 'sendMessage', fmt('Temperatures: Water in the lake %s °C, on the street %s °C' , tempOzero:value, tempStreet:value), - 653771009);
     fibaro.call(201, 'sendMessage', fmt('Water level: BELOW normal'), -653771009)
         ]])

     

     

    rule([[once(@ {catch, 09:00} & 08:59..09:01 & $SeptOE=='ok' & $SeptBanya2=='ok' & $SeptBanya=='ok' & $SeptOhorona =='ok') =>
       fibaro.call(201, 'sendMessage', fmt('The level in all septic tanks is normal'), -653771009)
      ]])

      rule([[once(@ {catch, 09:00} & 08:59..09:01 & $SeptOE=='bad' ) =>
          fibaro.call(201, 'sendMessage', fmt('Reminder: the level in the septic tank of O.E.'s house is high'), -653771009)
       ]])
       
       rule([[once(@ {catch, 09:00} & 08:59..09:01 & $SeptBanya=='bad' ) =>
       fibaro.call(201, 'sendMessage', fmt('Reminder: high level in the septic tank of the main septic tank of the BANI' ), -653771009)
      ]])

       rule([[once(@ {catch, 09:00} & 08:59..09:01 & $SeptBanya2=='bad') =>
        fibaro.call(201, 'sendMessage', fmt('Reminder: high level level in the septic tank of the spare septic tank of the BATHROOM' ), -653771009)
       ]])

       rule([[once(@ {catch, 09:00} & 08:59..09:01 & $SeptOhorona=='bad' ) =>
        fibaro.call(201, 'sendMessage', fmt('Reminder: high level in the SECURITY septic tank' ), -653771009)
           ]])

    Link to comment
    Share on other sites

    I am surprised that fasted is having so Manny dead devices.

    I was expecting that all my devices should be dead but I have zero dead devices.

    Note:

    My HC3 is in the livingroom, all my devices are boxed (not connected) or must my device status becomes dead for the becomes true?

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