Skip to content
  • Home
  • Aktuell
  • Tags
  • 0 Ungelesen 0
  • Kategorien
  • Unreplied
  • Beliebt
  • GitHub
  • Docu
  • Hilfe
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Standard: (Kein Skin)
  • Kein Skin
Einklappen
ioBroker Logo

Community Forum

donate donate
  1. ioBroker Community Home
  2. Deutsch
  3. Skripten / Logik
  4. Counter für eine gewisse Zeit sperren

NEWS

  • Jahresrückblick 2025 – unser neuer Blogbeitrag ist online! ✨
    BluefoxB
    Bluefox
    16
    1
    1.4k

  • Neuer Blogbeitrag: Monatsrückblick - Dezember 2025 🎄
    BluefoxB
    Bluefox
    13
    1
    815

  • Weihnachtsangebot 2025! 🎄
    BluefoxB
    Bluefox
    25
    1
    2.1k

Counter für eine gewisse Zeit sperren

Geplant Angeheftet Gesperrt Verschoben Skripten / Logik
7 Beiträge 3 Kommentatoren 562 Aufrufe 2 Watching
  • Älteste zuerst
  • Neuste zuerst
  • Meiste Stimmen
Antworten
  • In einem neuen Thema antworten
Anmelden zum Antworten
Dieses Thema wurde gelöscht. Nur Nutzer mit entsprechenden Rechten können es sehen.
  • B Offline
    B Offline
    Baummy
    schrieb am zuletzt editiert von
    #1

    Hallo an Alle =)
    Ich habe mal wider ein kleines Problemchen. Und zwar:

    Ich habe in meiner Visulisierung einen Counter, wie oft der Kami AN war. Hierfür habe ich am Rauchrohr einen Wärmeschalter angebracht und mittels Kabel an einen Xiami-Wassersensor montiert.
    Kamin ist an --> Temperatur steigt --> Bimetall löst aus --> Kontakt geht auf Wassermelder -->Broker bekommt "True-Signal" --> Skript zählt Counter hoch.

    Funktioniert seit einem halben Jahr ohne Probleme.

    Das einzige Problem ist, wenn der Kamin die Temperatur so grad erreicht, das Bimetall auslöst und kurze Zeit später wider die Temperatur verliert, der Kontakt abfällt und kurz darauf wider aktiviert wird.
    Also ich möchte Quasi eine Hysterese einprogrammieren, sodass nur zum Beistpiel einmal pro Stunde hochgezählt werden kann.

    Hat jemand eine gute Idee?!

    Gruß und schönen Sonntag Abend!

    B 1 Antwort Letzte Antwort
    0
    • B Baummy

      Hallo an Alle =)
      Ich habe mal wider ein kleines Problemchen. Und zwar:

      Ich habe in meiner Visulisierung einen Counter, wie oft der Kami AN war. Hierfür habe ich am Rauchrohr einen Wärmeschalter angebracht und mittels Kabel an einen Xiami-Wassersensor montiert.
      Kamin ist an --> Temperatur steigt --> Bimetall löst aus --> Kontakt geht auf Wassermelder -->Broker bekommt "True-Signal" --> Skript zählt Counter hoch.

      Funktioniert seit einem halben Jahr ohne Probleme.

      Das einzige Problem ist, wenn der Kamin die Temperatur so grad erreicht, das Bimetall auslöst und kurze Zeit später wider die Temperatur verliert, der Kontakt abfällt und kurz darauf wider aktiviert wird.
      Also ich möchte Quasi eine Hysterese einprogrammieren, sodass nur zum Beistpiel einmal pro Stunde hochgezählt werden kann.

      Hat jemand eine gute Idee?!

      Gruß und schönen Sonntag Abend!

      B Offline
      B Offline
      Baummy
      schrieb am zuletzt editiert von wendy2702
      #2
      <xml xmlns="https://developers.google.com/blockly/xml">
        <block type="on_ext" id="@cU*#kZG[yp)D61sNOdi" x="-687" y="-362">
          <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="HEniw3^l=PY[E`%F:][}">
              <field name="oid">mihome.0.devices.sensor_wleak_aq1_158d00041f4a74.state</field>
            </shadow>
          </value>
          <statement name="STATEMENT">
            <block type="controls_if" id="_[B,/R4HQ0lQcXy@hX?q">
              <value name="IF0">
                <block type="logic_compare" id="_?3aXAZxSo?,h62VEytc">
                  <field name="OP">EQ</field>
                  <value name="A">
                    <block type="get_value" id="bjDLQI*+C(9-Z851m-X|">
                      <field name="ATTR">val</field>
                      <field name="OID">mihome.0.devices.sensor_wleak_aq1_158d00041f4a74.state</field>
                    </block>
                  </value>
                  <value name="B">
                    <block type="logic_boolean" id="b(+c!gI)?*vuXJ7?f2@d">
                      <field name="BOOL">TRUE</field>
                    </block>
                  </value>
                </block>
              </value>
              <statement name="DO0">
                <block type="update" id="~Tcti)P:6mduSO?TOAMW">
                  <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                  <field name="OID">mihome.0.devices.sensor_wleak_aq1_158d00041f4a74.Counter</field>
                  <field name="WITH_DELAY">FALSE</field>
                  <value name="VALUE">
                    <block type="math_arithmetic" id="=VpaF{!0B|LM#^qvGZ)p">
                      <field name="OP">ADD</field>
                      <value name="A">
                        <shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number" id="13[2d|-R}d{2A}ph-,=4">
                          <field name="NUM">1</field>
                        </shadow>
                        <block type="get_value" id="bWU!jRYkauKO?;5C)20k">
                          <field name="ATTR">val</field>
                          <field name="OID">mihome.0.devices.sensor_wleak_aq1_158d00041f4a74.Counter</field>
                        </block>
                      </value>
                      <value name="B">
                        <shadow type="math_number" id="`gT.8i?q:M+8Q-Sk;i(v">
                          <field name="NUM">1</field>
                        </shadow>
                      </value>
                    </block>
                  </value>
                </block>
              </statement>
            </block>
          </statement>
        </block>
      </xml>
      

      MOD EDIT: SCRIPT IN CODE TAGS GESETZT

      B 1 Antwort Letzte Antwort
      0
      • B Baummy
        <xml xmlns="https://developers.google.com/blockly/xml">
          <block type="on_ext" id="@cU*#kZG[yp)D61sNOdi" x="-687" y="-362">
            <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="HEniw3^l=PY[E`%F:][}">
                <field name="oid">mihome.0.devices.sensor_wleak_aq1_158d00041f4a74.state</field>
              </shadow>
            </value>
            <statement name="STATEMENT">
              <block type="controls_if" id="_[B,/R4HQ0lQcXy@hX?q">
                <value name="IF0">
                  <block type="logic_compare" id="_?3aXAZxSo?,h62VEytc">
                    <field name="OP">EQ</field>
                    <value name="A">
                      <block type="get_value" id="bjDLQI*+C(9-Z851m-X|">
                        <field name="ATTR">val</field>
                        <field name="OID">mihome.0.devices.sensor_wleak_aq1_158d00041f4a74.state</field>
                      </block>
                    </value>
                    <value name="B">
                      <block type="logic_boolean" id="b(+c!gI)?*vuXJ7?f2@d">
                        <field name="BOOL">TRUE</field>
                      </block>
                    </value>
                  </block>
                </value>
                <statement name="DO0">
                  <block type="update" id="~Tcti)P:6mduSO?TOAMW">
                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                    <field name="OID">mihome.0.devices.sensor_wleak_aq1_158d00041f4a74.Counter</field>
                    <field name="WITH_DELAY">FALSE</field>
                    <value name="VALUE">
                      <block type="math_arithmetic" id="=VpaF{!0B|LM#^qvGZ)p">
                        <field name="OP">ADD</field>
                        <value name="A">
                          <shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number" id="13[2d|-R}d{2A}ph-,=4">
                            <field name="NUM">1</field>
                          </shadow>
                          <block type="get_value" id="bWU!jRYkauKO?;5C)20k">
                            <field name="ATTR">val</field>
                            <field name="OID">mihome.0.devices.sensor_wleak_aq1_158d00041f4a74.Counter</field>
                          </block>
                        </value>
                        <value name="B">
                          <shadow type="math_number" id="`gT.8i?q:M+8Q-Sk;i(v">
                            <field name="NUM">1</field>
                          </shadow>
                        </value>
                      </block>
                    </value>
                  </block>
                </statement>
              </block>
            </statement>
          </block>
        </xml>
        

        MOD EDIT: SCRIPT IN CODE TAGS GESETZT

        B Offline
        B Offline
        Baummy
        schrieb am zuletzt editiert von
        #3

        @baummy dies ist das derzeitge Skript. Keine Ahnung wie ihr das sonst darstellt :thinking_face:

        B 1 Antwort Letzte Antwort
        0
        • B Baummy

          @baummy dies ist das derzeitge Skript. Keine Ahnung wie ihr das sonst darstellt :thinking_face:

          B Offline
          B Offline
          Baummy
          schrieb am zuletzt editiert von
          #4

          caa0c00c-fdf8-4876-8dcb-1cfda0fe3137-grafik.png

          paul53P 1 Antwort Letzte Antwort
          0
          • B Baummy

            caa0c00c-fdf8-4876-8dcb-1cfda0fe3137-grafik.png

            paul53P Offline
            paul53P Offline
            paul53
            schrieb am zuletzt editiert von paul53
            #5

            @baummy
            Für den Zugriff auf die Timer-Variable timeout muss erst einmal ein Dummy-Variable erstellt werden:

            Bild_2021-02-28_233814.png

            oder den Export verwenden:

            <xml xmlns="https://developers.google.com/blockly/xml">
             <variables>
               <variable type="timeout" id="timeout">timeout</variable>
             </variables>
             <block type="on_ext" id="@cU*#kZG[yp)D61sNOdi" x="-687" y="-362">
               <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
               <field name="CONDITION">gt</field>
               <field name="ACK_CONDITION"></field>
               <value name="OID0">
                 <shadow type="field_oid" id="HEniw3^l=PY[E`%F:][}">
                   <field name="oid">mihome.0.devices.sensor_wleak_aq1_158d00041f4a74.state</field>
                 </shadow>
               </value>
               <statement name="STATEMENT">
                 <block type="controls_if" id="_[B,/R4HQ0lQcXy@hX?q">
                   <value name="IF0">
                     <block type="logic_negate" id="LrHPJ4=6dq:A?ndFatkD">
                       <value name="BOOL">
                         <block type="variables_get" id="TKm{(!TWxQ$@C-sX@r=L">
                           <field name="VAR" id="timeout" variabletype="timeout">timeout</field>
                         </block>
                       </value>
                     </block>
                   </value>
                   <statement name="DO0">
                     <block type="update" id="~Tcti)P:6mduSO?TOAMW">
                       <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                       <field name="OID">mihome.0.devices.sensor_wleak_aq1_158d00041f4a74.Counter</field>
                       <field name="WITH_DELAY">FALSE</field>
                       <value name="VALUE">
                         <block type="math_arithmetic" id="=VpaF{!0B|LM#^qvGZ)p">
                           <field name="OP">ADD</field>
                           <value name="A">
                             <shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number" id="13[2d|-R}d{2A}ph-,=4">
                               <field name="NUM">1</field>
                             </shadow>
                             <block type="get_value" id="bWU!jRYkauKO?;5C)20k">
                               <field name="ATTR">val</field>
                               <field name="OID">mihome.0.devices.sensor_wleak_aq1_158d00041f4a74.Counter</field>
                             </block>
                           </value>
                           <value name="B">
                             <shadow type="math_number" id="`gT.8i?q:M+8Q-Sk;i(v">
                               <field name="NUM">1</field>
                             </shadow>
                           </value>
                         </block>
                       </value>
                       <next>
                         <block type="timeouts_settimeout" id="Wl,NgV]:+!.=qcM2a{I8">
                           <field name="NAME">timeout</field>
                           <field name="DELAY">60</field>
                           <field name="UNIT">min</field>
                           <statement name="STATEMENT">
                             <block type="variables_set" id="3(=EawAxO.||E{q~1s:c">
                               <field name="VAR" id="timeout" variabletype="timeout">timeout</field>
                               <value name="VALUE">
                                 <block type="logic_null" id="dg]2v39cL!RGb:hg_p0X"></block>
                               </value>
                             </block>
                           </statement>
                         </block>
                       </next>
                     </block>
                   </statement>
                 </block>
               </statement>
             </block>
            </xml>
            

            Bitte verzichtet auf Chat-Nachrichten, denn die Handhabung ist grauenhaft !
            Produktiv: RPi 2 mit S.USV, HM-MOD-RPI und SLC-USB-Stick mit root fs

            B 1 Antwort Letzte Antwort
            0
            • paul53P paul53

              @baummy
              Für den Zugriff auf die Timer-Variable timeout muss erst einmal ein Dummy-Variable erstellt werden:

              Bild_2021-02-28_233814.png

              oder den Export verwenden:

              <xml xmlns="https://developers.google.com/blockly/xml">
               <variables>
                 <variable type="timeout" id="timeout">timeout</variable>
               </variables>
               <block type="on_ext" id="@cU*#kZG[yp)D61sNOdi" x="-687" y="-362">
                 <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
                 <field name="CONDITION">gt</field>
                 <field name="ACK_CONDITION"></field>
                 <value name="OID0">
                   <shadow type="field_oid" id="HEniw3^l=PY[E`%F:][}">
                     <field name="oid">mihome.0.devices.sensor_wleak_aq1_158d00041f4a74.state</field>
                   </shadow>
                 </value>
                 <statement name="STATEMENT">
                   <block type="controls_if" id="_[B,/R4HQ0lQcXy@hX?q">
                     <value name="IF0">
                       <block type="logic_negate" id="LrHPJ4=6dq:A?ndFatkD">
                         <value name="BOOL">
                           <block type="variables_get" id="TKm{(!TWxQ$@C-sX@r=L">
                             <field name="VAR" id="timeout" variabletype="timeout">timeout</field>
                           </block>
                         </value>
                       </block>
                     </value>
                     <statement name="DO0">
                       <block type="update" id="~Tcti)P:6mduSO?TOAMW">
                         <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                         <field name="OID">mihome.0.devices.sensor_wleak_aq1_158d00041f4a74.Counter</field>
                         <field name="WITH_DELAY">FALSE</field>
                         <value name="VALUE">
                           <block type="math_arithmetic" id="=VpaF{!0B|LM#^qvGZ)p">
                             <field name="OP">ADD</field>
                             <value name="A">
                               <shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number" id="13[2d|-R}d{2A}ph-,=4">
                                 <field name="NUM">1</field>
                               </shadow>
                               <block type="get_value" id="bWU!jRYkauKO?;5C)20k">
                                 <field name="ATTR">val</field>
                                 <field name="OID">mihome.0.devices.sensor_wleak_aq1_158d00041f4a74.Counter</field>
                               </block>
                             </value>
                             <value name="B">
                               <shadow type="math_number" id="`gT.8i?q:M+8Q-Sk;i(v">
                                 <field name="NUM">1</field>
                               </shadow>
                             </value>
                           </block>
                         </value>
                         <next>
                           <block type="timeouts_settimeout" id="Wl,NgV]:+!.=qcM2a{I8">
                             <field name="NAME">timeout</field>
                             <field name="DELAY">60</field>
                             <field name="UNIT">min</field>
                             <statement name="STATEMENT">
                               <block type="variables_set" id="3(=EawAxO.||E{q~1s:c">
                                 <field name="VAR" id="timeout" variabletype="timeout">timeout</field>
                                 <value name="VALUE">
                                   <block type="logic_null" id="dg]2v39cL!RGb:hg_p0X"></block>
                                 </value>
                               </block>
                             </statement>
                           </block>
                         </next>
                       </block>
                     </statement>
                   </block>
                 </statement>
               </block>
              </xml>
              

              B Offline
              B Offline
              Baummy
              schrieb am zuletzt editiert von
              #6

              @paul53 Hallo Paul!
              Sorry für die späte Rückmeldung!! Also ich habe den Skript komplett eingefügt und getestet. Hat auf Anhieb funktioniert. Auch wenn ich dieses Skript nicht komplett nachvollziehen kann :sweat_smile:
              Aber egal, trotzdem DANKE!!!

              1 Antwort Letzte Antwort
              0
              • realwaxR Offline
                realwaxR Offline
                realwax
                schrieb am zuletzt editiert von
                #7

                @baummy Timeout ist super um einen Block nach einer Zeit auszuführen. Das restliche Skript läuft aber weiter. Diese Fnuktion wurde später eingefügt...685360b3-e6ea-4971-942f-ca91c3f79e9b-image.png

                1 Antwort Letzte Antwort
                0
                Antworten
                • In einem neuen Thema antworten
                Anmelden zum Antworten
                • Älteste zuerst
                • Neuste zuerst
                • Meiste Stimmen


                Support us

                ioBroker
                Community Adapters
                Donate

                693

                Online

                32.6k

                Benutzer

                82.0k

                Themen

                1.3m

                Beiträge
                Community
                Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen | Einwilligungseinstellungen
                ioBroker Community 2014-2025
                logo
                • Anmelden

                • Du hast noch kein Konto? Registrieren

                • Anmelden oder registrieren, um zu suchen
                • Erster Beitrag
                  Letzter Beitrag
                0
                • Home
                • Aktuell
                • Tags
                • Ungelesen 0
                • Kategorien
                • Unreplied
                • Beliebt
                • GitHub
                • Docu
                • Hilfe