Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Zeitabfrage wenn Wert X länger als X Sek BLOCKY

    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

    Zeitabfrage wenn Wert X länger als X Sek BLOCKY

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

      hi ich habe es so mal versucht,

      leider wird es im debug nicht immer ausgeführt mit einer zeitverzögerung von 5 sek.

      also wenn ich einmal den wert unterschritten habe dauert es 5 sek bis die meldung kommt egal ob der wert wieder höher als eingestellten wert ist.

      ich peile es einfach nicht!

      @fitti ich schaue es mir mal! Dankeschön

      4298_timeout.png

      1 Reply Last reply Reply Quote 0
      • L
        ludino last edited by

        Vielleicht einfach mal zum Thema,

        ich möchte meine Spülmaschine abfragen wann sie fertig ist.

        Das Script ist auch soweit fertig. Leider ist bei meiner Spülmaschine immer im Spülprozess immer mal 5 Sekunden im Standby.

        So gibt mir der Pushover in jedem Spülvorgang ca 3-8 mal die Meldung Spülmaschine fertig.

        Das möchte ich umgehen das der Standby wert 10 Sekunden anliegen muss bevor er den Push macht.

        hier mal das Blocky

        4298_spulmaschine.png

        var Spuelmaschine_fertig;
        
        on({id: 'sonoff.0.Spühlmaschine.ENERGY.Power', change: "any"}, function (obj) {
          var value = obj.state.val;
          var oldValue = obj.oldState.val;
          if (getState("sonoff.0.Spühlmaschine.ENERGY.Power").val > 20) {
            setState("javascript.0.Spuehlmachine_läuft"/*Spuehlmachine_läuft*/, false);
            Spuelmaschine_fertig = false;
          }
          if (getState("sonoff.0.Spühlmaschine.ENERGY.Power").val < 2) {
            if (getState("sonoff.0.Spühlmaschine.ENERGY.Power").val < 2 && Spuelmaschine_fertig == false) {
              sendTo("pushover.1", "send", {
                 message: 'Spülmaschine fertig',
                 sound: "",
                 title: 'Spülmaschine fertig'
              });
              Spuelmaschine_fertig = true;
              setState("javascript.0.Spuehlmachine_läuft"/*Spuehlmachine_läuft*/, true);
            }
          }
        });
        

        gruß

        ludino

        1 Reply Last reply Reply Quote 0
        • R
          RappiRN Most Active last edited by

          Der timeout-Block muss in den falls-Block und darein muss deine debug-Ausgabe!

          Es gibt hier noch einen "Waschmaschinen"-Thread, vielleicht findest du da schon was passendes.

          Enrico

          1 Reply Last reply Reply Quote 0
          • L
            ludino last edited by

            Hallo,

            waschmaschinen Threrad

            http://forum.iobroker.net/viewtopic.php … &start=120

            durchgelesen leider für mich nicht plausibel.

            Ich glaube ich gehe mal schlafen und vielleicht kommt mir morgen der AHA effekt, oder ich muss damit leben das die Meldung öfters kommt.

            Gruß

            1 Reply Last reply Reply Quote 0
            • L
              ludino last edited by

              Hallo,

              ich habe das nun so gelöst, weiß nur noch nicht ob es so sauber gepuzzelt ist.

              kann wer mal seine Augen drüber werfen?
              4298_spulmaschine1.png

              1 Reply Last reply Reply Quote 0
              • R
                RappiRN Most Active last edited by

                Könntest du dieses Blockly mal als Export einstellen, ich glaube, dass man da noch was vereinfachen kann.

                Und wenn du auf die Blockly-Variante Wert legst, schreib mal bitte noch Blockly in den Betreff rein, dann kommen noch mehr Experten dazu! 🙂

                Enrico

                1 Reply Last reply Reply Quote 0
                • L
                  ludino last edited by

                  Aber klar doch, Export hätte ich auch selber drauf kommen können!

                  ! <block 1999/xmlns="<URL url=" http:/www.w3.org/xhtml"="">http://www.w3.org/1999/xhtml" type="on_ext" id="OXQr)6s4u)WRaA/sYd[]" x="63" y="-187">
                  ! <mutation items="1"></mutation>
                  ! <field name="CONDITION">any</field>
                  ! <value name="OID0"><shadow type="field_oid" id="hVKHR4v;5OQ3]KJm?4Ne"><field name="oid">sonoff.0.Spühlmaschine.ENERGY.Power</field></shadow></value>
                  ! <statement name="STATEMENT"><block type="controls_if" id="1p:576{YrR,YW}?{#q*"><value name="IF0"><block type="logic_compare" id="IgLmnX#i;RDdJ!F.!dwi"><field name="OP">GT</field> ! <value name="A"><block type="get_value" id="bbvL!gG:DS1C3.@LJ=8="><field name="ATTR">val</field> ! <field name="OID">sonoff.0.Spühlmaschine.ENERGY.Power</field></block></value> ! <value name="B"><block type="math_number" id=":rvI^T/]33X=]9Whn2@M"><field name="NUM">20</field></block></value></block></value> ! <statement name="DO0"><block type="control" id="6y?a?]He1ZPeJ3ksSsVH"><mutation delay_input="false"></mutation> ! <field name="OID">javascript.0.Spuehlmachine_läuft</field> ! <field name="WITH_DELAY">FALSE</field> ! <value name="VALUE"><block type="logic_boolean" id="|gq7HEV2:Qm:mML4WO(y"><field name="BOOL">FALSE</field></block></value> ! <next><block type="variables_set" id="l#y|,9Tuei:o(c{tBq"><field name="VAR">Spuelmaschine_fertig</field> ! <value name="VALUE"><block type="logic_boolean" id="#!Clr61(]g}buhcJUwz-"><field name="BOOL">FALSE</field></block></value></block></next></block></statement> ! <next><block type="controls_if" id="upQVi)@0qJp#Pn~?vS(1"><value name="IF0"><block type="logic_compare" id="@2[YQKRO-dPfxMz!E0_+"><field name="OP">LT</field> ! <value name="A"><block type="get_value" id="*A?*@)xk2OVfe@OAO5x9"><field name="ATTR">val</field> ! <field name="OID">sonoff.0.Spühlmaschine.ENERGY.Power</field></block></value> ! <value name="B"><block type="math_number" id="pn1L)m4B2vnLoQHhx-1O"><field name="NUM">8</field></block></value></block></value> ! <statement name="DO0"><block type="timeouts_settimeout" id="zH6g9~*Ufq?,*bup5W7R"><field name="NAME">timeout</field> ! <field name="DELAY">20</field> ! <field name="UNIT">sec</field> ! <statement name="STATEMENT"><block type="controls_if" id="W23vz;E*W^~xTvyvom7+"><value name="IF0"><block type="logic_operation" id="D(wi!(8?jmXp+B-Pot3J"><field name="OP">AND</field> ! <value name="A"><block type="logic_compare" id="MDFJ-ii-NO+5Yh;{E)fe"><field name="OP">LT</field> ! <value name="A"><block type="get_value" id="8B@hI1T|mRy(BGgD|5U{"><field name="ATTR">val</field> ! <field name="OID">sonoff.0.Spühlmaschine.ENERGY.Power</field></block></value> ! <value name="B"><block type="math_number" id="Dw71y,9gjp(-yJp#v.Ry"><field name="NUM">8</field></block></value></block></value> ! <value name="B"><block type="logic_compare" id=")W)kjm6vUNwUcxnMq7/="><field name="OP">EQ</field> ! <value name="A"><block type="variables_get" id="[zwGULxq+jhl_L*wsd0^"><field name="VAR">Spuelmaschine_fertig</field></block></value> ! <value name="B"><block type="logic_boolean" id="{{T;#bFuh.]I1.3om.i"><field name="BOOL">FALSE</field></block></value></block></value></block></value>
                  ! <statement name="DO0"><block type="controls_if" id="5uH=jA:VlY-9Ft;uh2"><mutation else="1"></mutation>
                  ! <value name="IF0"><block type="logic_operation" id="8|.UG}B^=j8BoRh.hBl#"><field name="OP">AND</field>
                  ! <value name="A"><block type="logic_compare" id="yzF%6m#q:B?~:m;!-cRF"><field name="OP">GT</field>
                  ! <value name="A"><block type="get_value" id="0~Ei@%Z,6!n1XTCgdOSk"><field name="ATTR">val</field>
                  ! <field name="OID">sonoff.0.Spühlmaschine.ENERGY.Power</field></block></value>
                  ! <value name="B"><block type="math_number" id="k6W^P3u,m,-+C@2!Aa4X"><field name="NUM">8</field></block></value></block></value>
                  ! <value name="B"><block type="logic_compare" id="TGR!iq7y:,E5+Y3+U%Cx"><field name="OP">EQ</field>
                  ! <value name="A"><block type="variables_get" id="OYU]Ebl,^bN|khl1sbqM"><field name="VAR">Spuelmaschine_fertig</field></block></value>
                  ! <value name="B"><block type="logic_boolean" id="3Hx9~|9hh1l)Yw0jCV!_"><field name="BOOL">FALSE</field></block></value></block></value></block></value>
                  ! <statement name="DO0"><block type="timeouts_cleartimeout" id="mss!%%+AdJR0;S,]/u7v"><field name="NAME">timeout</field></block></statement>
                  ! <statement name="ELSE"><block type="pushover" id="k:Uf/_CKMW7fz)nX+~}w"><field name="INSTANCE">.1</field>
                  ! <field name="PRIORITY">0</field>
                  ! <value name="MESSAGE"><shadow type="text" id="c:2;FM!HNqmI0FV-;27e"><field name="TEXT">Spülmaschine fertig</field></shadow></value>
                  ! <value name="TITLE"><block type="text" id="y=BPFIk:NWJRtIJPrik}"><field name="TEXT">Spülmaschine fertig</field></block></value>
                  ! <next><block type="variables_set" id="FmwRf.B]o3UE):e*H^g|"><field name="VAR">Spuelmaschine_fertig</field>
                  ! <value name="VALUE"><block type="logic_boolean" id=":)EBH4bz#N_AY5aUjOiL"><field name="BOOL">TRUE</field></block></value>
                  ! <next><block type="control" id="2,kU}1:rUeWsSUN@WMWu"><mutation delay_input="false"></mutation>
                  ! <field name="OID">javascript.0.Spuehlmachine_läuft</field>
                  ! <field name="WITH_DELAY">FALSE</field>
                  ! <value name="VALUE"><block type="logic_boolean" id="_DvITzV3,J]Zq,xz@4_4"><field name="BOOL">TRUE</field></block></value></block></next></block></next></block></statement></block></statement></block></statement></block></statement></block></next></block></statement></block>

                  1 Reply Last reply Reply Quote 0
                  • R
                    RappiRN Most Active last edited by

                    Exporte bitte in Code-Tags anzeigen.

                    Was möchtest du erreichen? Eine Variable, die anzeigt, ob die Spülmaschine läuft und bei Programmende eine Ansage, dass fertig ist, oder?

                    Bei über 20 läuft die Maschine und bei unter 8 ist sie fertig! Richtig?

                    Enrico

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

                      So sieht mein Skript von oben in Blockly aus:
                      493_blockly_spuelmaschine.jpg
                      Export:

                      ! ````
                      <xml xmlns="http://www.w3.org/1999/xhtml"><block type="on_ext" id="5-O2AY`#?#ktxQ2lfJ1m" x="-1487" y="-312"><mutation items="1"></mutation>
                      <field name="CONDITION">ne</field>

                      <comment pinned="true" h="37" w="192">Spülmaschine Power</comment>
                      <value name="OID0"><shadow type="field_oid" id="Eer%bPPq;gP8jmueXn;:"><field name="oid">default</field></shadow></value> 
                      <statement name="STATEMENT"><block type="controls_if" id="b}G-QmDmWVGBv#{c7RQ|"><mutation else="1"></mutation>
                          <value name="IF0"><block type="logic_compare" id="0b%}}7dL8%5~THG4*PTL"><field name="OP">LT</field>
                              <value name="A"><block type="variables_get" id="U1?c+o%WU|{TaB8a-MQ2"><field name="VAR">value</field></block></value> 
                              <value name="B"><block type="math_number" id="r=:G{}ue[^7taH]XmCIL"><field name="NUM">20</field></block></value></block></value> 
                          <statement name="DO0"><block type="controls_if" id="@;7hQFGXxy!GvJ94WBX*"><value name="IF0"><block type="logic_compare" id="RL@D{wZ2VDvws|2yP:N)"><field name="OP">GTE</field>
                                  <value name="A"><block type="variables_get" id="l#hz40e1vFE,Iic+s1*5"><field name="VAR">oldValue</field></block></value> 
                                  <value name="B"><block type="math_number" id="1Jq-g{)hv?Wg-K9^4)lC"><field name="NUM">20</field></block></value></block></value> 
                              <statement name="DO0"><block type="timeouts_settimeout" id="A_OSp+}#Z?6XIMa,,WFi"><field name="NAME">timeout</field>
                                  <field name="DELAY">10</field>
                                  <field name="UNIT">sec</field></block></statement></block></statement> 
                          <statement name="ELSE"><block type="timeouts_cleartimeout" id="ITryM3IOC%7sO[W~X7Bd"><field name="NAME">timeout</field></block></statement></block></statement></block></xml> 
                      
                      1 Reply Last reply Reply Quote 0
                      • rantanplan
                        rantanplan last edited by

                        Hallo ludino

                        Habe ich heute reingesetzt.

                        http://forum.iobroker.net/viewtopic.php … 34#p107896

                        Ob Spül- oder Waschmaschine dürfte eigentlich egal sein.

                        Grüße

                        1 Reply Last reply Reply Quote 0
                        • L
                          ludino last edited by

                          @RappiRN:

                          Exporte bitte in Code-Tags anzeigen.

                          Was möchtest du erreichen? Eine Variable, die anzeigt, ob die Spülmaschine läuft und bei Programmende eine Ansage, dass fertig ist, oder?

                          Bei über 20 läuft die Maschine und bei unter 8 ist sie fertig! Richtig?

                          Enrico `

                          ganz genau~~@paul53:~~

                          Hallo ludino

                          Habe ich heute reingesetzt.

                          http://forum.iobroker.net/viewtopic.php … 34#p107896

                          Ob Spül- oder Waschmaschine dürfte eigentlich egal sein.

                          Grüße `

                          werde ich mal testen danke

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

                          Support us

                          ioBroker
                          Community Adapters
                          Donate

                          632
                          Online

                          31.9k
                          Users

                          80.2k
                          Topics

                          1.3m
                          Posts

                          5
                          16
                          5503
                          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