Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. ioBroker Allgemein
    4. Ack-State abfragen/lesen

    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

    Ack-State abfragen/lesen

    This topic has been deleted. Only users with topic management privileges can see it.
    • paul53
      paul53 @saeft_2003 last edited by

      @saeft_2003 sagte:

      der wemos ist nicht mehr im wlan dann läuft meine Bewässerung als weiter und weiter...

      Wie willst Du auf diese Situation reagieren ?

      S 1 Reply Last reply Reply Quote 0
      • S
        saeft_2003 Most Active @paul53 last edited by

        @paul53

        Das eine pushnachricht in meiner VIS erscheint und ich eine telegram Nachricht bekomme. Gesteuert über ein Skript...

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

          @saeft_2003 sagte:

          Nachricht bekomme. Gesteuert über ein Skript...

          Blockly_temp.JPG

          <xml xmlns="http://www.w3.org/1999/xhtml">
           <variables>
             <variable type="" id="V*8SecbOYtdYL9J2Van6">soll</variable>
             <variable type="undefined" id="timeout">timeout</variable>
           </variables>
           <block type="on_ext" id="T+m`])pthE4_/)0c*(0q" x="63" y="13">
             <mutation items="1"></mutation>
             <field name="CONDITION">any</field>
             <field name="ACK_CONDITION"></field>
             <value name="OID0">
               <shadow type="field_oid" id="#Xdo7tmN|+t~RtIf=37P">
                 <field name="oid">default</field>
               </shadow>
             </value>
             <statement name="STATEMENT">
               <block type="controls_if" id="-$8{Ruml{`Qoi-^0g2D`">
                 <mutation else="1"></mutation>
                 <value name="IF0">
                   <block type="on_source" id="gNOVaU5R67SYrH=kMQDy">
                     <field name="ATTR">state.ack</field>
                   </block>
                 </value>
                 <statement name="DO0">
                   <block type="controls_if" id="axAh.K[$bN8D}G:qJEk3">
                     <value name="IF0">
                       <block type="logic_compare" id="*1Iuc|oaj(69[!}`/K_I">
                         <field name="OP">EQ</field>
                         <value name="A">
                           <block type="variables_get" id="j{~6nAgws8dt;HIcCyZ0">
                             <field name="VAR" id="V*8SecbOYtdYL9J2Van6" variabletype="">soll</field>
                           </block>
                         </value>
                         <value name="B">
                           <block type="on_source" id="n;uB,)b1K`MC.K$[[#0z">
                             <field name="ATTR">state.val</field>
                           </block>
                         </value>
                       </block>
                     </value>
                     <statement name="DO0">
                       <block type="timeouts_cleartimeout" id="#H91=^8g1qS.DR!uKi_z">
                         <field name="NAME">timeout</field>
                       </block>
                     </statement>
                   </block>
                 </statement>
                 <statement name="ELSE">
                   <block type="controls_if" id="hx_UgF=#TXr$#.]3kZn-">
                     <value name="IF0">
                       <block type="logic_compare" id="cqIWn@pqC}p5RE[qG@aM">
                         <field name="OP">NEQ</field>
                         <value name="A">
                           <block type="on_source" id="1Js7~v99vM2NE![EK=uk">
                             <field name="ATTR">state.val</field>
                           </block>
                         </value>
                         <value name="B">
                           <block type="on_source" id="8gh(8~j*:r!f{a);P%!n">
                             <field name="ATTR">oldState.val</field>
                           </block>
                         </value>
                       </block>
                     </value>
                     <statement name="DO0">
                       <block type="variables_set" id="JF1d5qm(@kADj.U:Y_7w">
                         <field name="VAR" id="V*8SecbOYtdYL9J2Van6" variabletype="">soll</field>
                         <value name="VALUE">
                           <block type="on_source" id="]]O{h!-K=v+bkT[A__Tn">
                             <field name="ATTR">state.val</field>
                           </block>
                         </value>
                         <next>
                           <block type="timeouts_settimeout" id="9,8Pim2S3B`0e{!m#wXA">
                             <field name="NAME">timeout</field>
                             <field name="DELAY">2</field>
                             <field name="UNIT">sec</field>
                             <statement name="STATEMENT">
                               <block type="comment" id="Igmu@H4dny_-b83dcQ,D">
                                 <field name="COMMENT">Nachricht: Keine Bestätigung</field>
                               </block>
                             </statement>
                           </block>
                         </next>
                       </block>
                     </statement>
                   </block>
                 </statement>
               </block>
             </statement>
           </block>
          </xml>
          

          S 1 Reply Last reply Reply Quote 2
          • S
            saeft_2003 Most Active @paul53 last edited by

            @paul53

            Vielen Dank für das Blockly. Ich habe jetzt zum Test als Trigger power von einem shelly mit tasmota (Licht Esstisch) angegeben. Muss ich sonst noch etwas im Skript anpassen?

            Wenn ich jetzt das Licht ein oder aus schalte bekomme ich immer die Nachricht über Telegram „Licht Esstisch nicht bestätigt“ obwohl das Licht erfolgreich geschalten wird.

            61B17BD9-9165-4BCB-91E8-16D8D0F2BE18.jpeg

            paul53 htrecksler 2 Replies Last reply Reply Quote 0
            • paul53
              paul53 @saeft_2003 last edited by paul53

              @saeft_2003 sagte:

              bekomme ich immer die Nachricht über Telegram „Licht Esstisch nicht bestätigt“ obwohl das Licht erfolgreich geschalten wird.

              Es muss das timeout gestoppt werden, das zur Verzögerung der Nachricht verwendet wird (timeout vs. timeout2).

              S 2 Replies Last reply Reply Quote 1
              • S
                saeft_2003 Most Active @paul53 last edited by

                @paul53

                Danke jetzt geht es!

                1 Reply Last reply Reply Quote 0
                • S
                  saeft_2003 Most Active @paul53 last edited by

                  @paul53

                  Ich hab noch ein paar Fragen. Wo finde ich links in der Blockauswahl z.B. den Block Wert?

                  Dieser sieht aus wie eine Variable, ist dort aber nicht zu finden. Nur soll ist wie es aussieht eine „normale“ Variable.

                  Bezieht sich dann z.B. der Wert immer auf die Objekt ID von dem darüber stehenden Trigger?

                  Das frage ich deshalb weil ich mehrere Abfragen in einem Skript haben möchte.

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

                    @saeft_2003 sagte:

                    Wo finde ich links in der Blockauswahl z.B. den Block Wert?

                    Unter "Trigger":

                    Blockly_DP_Props.JPG

                    @saeft_2003 sagte in Ack-State abfragen/lesen:

                    Bezieht sich dann z.B. der Wert immer auf die Objekt ID von dem darüber stehenden Trigger?

                    Ja.

                    S 1 Reply Last reply Reply Quote 1
                    • S
                      saeft_2003 Most Active @paul53 last edited by

                      @paul53

                      Wirklich vielen Dank du hast mir bei dem Thema sehr weiter geholfen. 👍

                      Eine letzte Frage habe ich noch und zwar messe ich den Füllstand meiner Zisterne per Ultraschall, hier kommt alle 60 Sek ein "neuer" Wert. Man könnte doch mit diesem Skript auch relativ "leicht" prüfen ob dies auch geschieht?

                      Leider bin ich mir nicht sicher wie ich es genau anpassen müsste...

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

                        @saeft_2003 sagte:

                        hier kommt alle 60 Sek ein "neuer" Wert

                        Blockly_temp.JPG

                        S 1 Reply Last reply Reply Quote 1
                        • S
                          saeft_2003 Most Active @paul53 last edited by

                          @paul53

                          Danke! 😊 👍

                          1 Reply Last reply Reply Quote 0
                          • htrecksler
                            htrecksler Forum Testing @saeft_2003 last edited by

                            @saeft_2003 da mich das Script als Vorlage sehr interessiert, könntest Du es vielleicht als Javascript exportieren und hier einstellen?
                            Ich nutze kein Blockly und verstehe auch nicht wirklich wie man das nachstellen könnte um ein Javascript zu erhalten. Das wäre super...Danke

                            S paul53 2 Replies Last reply Reply Quote 0
                            • S
                              saeft_2003 Most Active @htrecksler last edited by

                              @htrecksler

                              Paul53 und ich haben über zwei blocklys gesprochen, welches willst du als js?

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

                                @htrecksler sagte:

                                als Javascript

                                var timer, soll;
                                
                                on({id: '...'}, function(dp) { // triggert bei jeder Aktualisierung
                                    if(!dp.state.ack) { // Befehl
                                        if(dp.state.val != dp.oldState.val) { // Wertänderung
                                            soll = dp.state.val;
                                            timer = setTimeout(function() {
                                                // Nachricht: Keine Bestätigung
                                            }, 1000);
                                        }
                                    } else { // bestätigt
                                        if(dp.state.val == soll && timer) clearTimeout(timer);
                                    }
                                });
                                
                                htrecksler 1 Reply Last reply Reply Quote 0
                                • htrecksler
                                  htrecksler Forum Testing @paul53 last edited by

                                  @paul53 genau das...Danke schön 👍

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

                                  Support us

                                  ioBroker
                                  Community Adapters
                                  Donate
                                  FAQ Cloud / IOT
                                  HowTo: Node.js-Update
                                  HowTo: Backup/Restore
                                  Downloads
                                  BLOG

                                  502
                                  Online

                                  31.9k
                                  Users

                                  80.1k
                                  Topics

                                  1.3m
                                  Posts

                                  iobroker script states
                                  4
                                  24
                                  3297
                                  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