Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. English
    3. Scripting / Logic
    4. Blockly
    5. Notification every X minutes

    NEWS

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    Notification every X minutes

    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      sekino last edited by

      Hi, I'm strugling to setup notification sending every X minutes.
      For example I'm trying to send notification when my washingmachine finish, that means power consumption is between 10-1 watts, this state is for 15 minutes until washingmachine will turn automatically off. HomematicIP power socket is updating state every 30 seconds, so when I simply turn on notification for state between 10-1 watts I'm getting notifications every 30 seconds which is too many. How can I set up Blockly to send notification for example every 5 minutes during state between 10-1 watts ?

      paul53 1 Reply Last reply Reply Quote 0
      • paul53
        paul53 @sekino last edited by

        @sekino sagte:

        HomematicIP power socket is updating state every 30 seconds
        send notification for example every 5 minutes during state between 10-1 watts ?

        5 min = 10 * 30 sec.
        Try it with a counter:

        Blockly_temp.JPG

        S 1 Reply Last reply Reply Quote 0
        • S
          sekino @paul53 last edited by

          @paul53 That'working OK. Thank you very much!

          However I found out, sometimes when there is same value measured on power socket, it will not send any update, so counter not working, for example if washingmachine is in stand-by mode it will take 0.05wats whole day, this info is broadcasted just once at the beginning and then it's not updated in iObroker until washingmachine is woke up from stand-by mode. So a counter based on counting time will be more accurate... if someone did that already and working please share. Thank you!

          paul53 1 Reply Last reply Reply Quote 0
          • paul53
            paul53 @sekino last edited by paul53

            @sekino sagte:

            every 5 minutes during state between 10-1 watts ?

            Blockly_temp.JPG

            <xml xmlns="https://developers.google.com/blockly/xml">
             <variables>
               <variable type="interval" id="Intervall">Intervall</variable>
               <variable id="{A0`1jN@JIs8CP|SdIu$">value</variable>
             </variables>
             <block type="on_ext" id="gxtz;)Dk/LY#MZsB7D92" x="88" y="38">
               <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
               <field name="CONDITION">ne</field>
               <field name="ACK_CONDITION"></field>
               <value name="OID0">
                 <shadow type="field_oid" id="}E495DOI+!xy@bYeSZop">
                   <field name="oid">default</field>
                 </shadow>
               </value>
               <statement name="STATEMENT">
                 <block type="controls_if" id="oD]^g)Q2+28vt_2^!c|d">
                   <mutation elseif="1"></mutation>
                   <value name="IF0">
                     <block type="logic_operation" id="J^LX}g.t-FadQgTQ1nm," inline="false">
                       <field name="OP">OR</field>
                       <value name="A">
                         <block type="logic_compare" id="qP@j+y#/;[:cpQ2)NIwK">
                           <field name="OP">LT</field>
                           <value name="A">
                             <block type="variables_get" id="9_{)s([hS-jDX0n`~2*P">
                               <field name="VAR" id="{A0`1jN@JIs8CP|SdIu$">value</field>
                             </block>
                           </value>
                           <value name="B">
                             <block type="math_number" id="ZFF*md,Ght6.0LQMc;bd">
                               <field name="NUM">1</field>
                             </block>
                           </value>
                         </block>
                       </value>
                       <value name="B">
                         <block type="logic_compare" id="LK}XT_nke4u?J,L.jiW@">
                           <field name="OP">GT</field>
                           <value name="A">
                             <block type="variables_get" id="d)y0R-2-;R:AyzG0,N8Q">
                               <field name="VAR" id="{A0`1jN@JIs8CP|SdIu$">value</field>
                             </block>
                           </value>
                           <value name="B">
                             <block type="math_number" id="Y^/Ok|-|KUN?YZ2Q!4M.">
                               <field name="NUM">10</field>
                             </block>
                           </value>
                         </block>
                       </value>
                     </block>
                   </value>
                   <statement name="DO0">
                     <block type="timeouts_clearinterval" id="JUHJw}F8]N/s/(rul!C?">
                       <field name="NAME">Intervall</field>
                     </block>
                   </statement>
                   <value name="IF1">
                     <block type="logic_negate" id="8vT9u%pqocN)yB.svek_">
                       <value name="BOOL">
                         <block type="variables_get" id="M|Y.t_rF!)+wqse*Za(N">
                           <field name="VAR" id="Intervall" variabletype="interval">Intervall</field>
                         </block>
                       </value>
                     </block>
                   </value>
                   <statement name="DO1">
                     <block type="telegram" id="~Y{?b~^.XF9Spn.!BBF0">
                       <field name="INSTANCE"></field>
                       <field name="LOG"></field>
                       <field name="SILENT">FALSE</field>
                       <field name="PARSEMODE">default</field>
                       <value name="MESSAGE">
                         <shadow type="text" id="DJx!ZENicIL;Fk[,6H^j">
                           <field name="TEXT">text</field>
                         </shadow>
                       </value>
                       <next>
                         <block type="timeouts_setinterval" id=";~E8uG]8Q+{%+:o8Zd1#">
                           <field name="NAME">Intervall</field>
                           <field name="INTERVAL">5</field>
                           <field name="UNIT">min</field>
                           <statement name="STATEMENT">
                             <block type="telegram" id="`c0t$b?BxWF4Y6Ef`Vnz">
                               <field name="INSTANCE"></field>
                               <field name="LOG"></field>
                               <field name="SILENT">FALSE</field>
                               <field name="PARSEMODE">default</field>
                               <value name="MESSAGE">
                                 <shadow type="text" id="`$7UMl8.S5Xral.%/)D3">
                                   <field name="TEXT">text</field>
                                 </shadow>
                               </value>
                             </block>
                           </statement>
                         </block>
                       </next>
                     </block>
                   </statement>
                 </block>
               </statement>
             </block>
            </xml>
            

            S 1 Reply Last reply Reply Quote 0
            • S
              sekino @paul53 last edited by

              @paul53 Thank you very much! Working great 🙂

              1 Reply Last reply Reply Quote 0
              • First post
                Last post

              Support us

              ioBroker
              Community Adapters
              Donate

              917
              Online

              31.9k
              Users

              80.1k
              Topics

              1.3m
              Posts

              3
              5
              665
              Loading More Posts
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes
              Reply
              • Reply as topic
              Log in to reply
              Community
              Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
              The ioBroker Community 2014-2023
              logo