Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Frage wegen Warnings in Blockly Prg

    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

    Frage wegen Warnings in Blockly Prg

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

      @hg6806 sagte: Wie schon geschrieben hatte ich "timeout" als Variable neu angelegt, da ich es sonst im Blockly nicht hätte auswählen können

      Dann wähle die andere (echte) Variable timeout aus und kontrolliere in der Javascript-Ansicht, dass nur noch eine Variable timeout existiert.

      @hg6806 sagte in Frage wegen Warnings in Blockly Prg:

      hier das Javascript:

      Falsch nachgebaut. Hier ein Export, bei dem nur noch sämtliche Datenpunkt-IDs zugewiesen werden müssen:

      <xml xmlns="https://developers.google.com/blockly/xml">
       <variables>
         <variable id="Z$dQ(fbDb]yEVd;|nC}-">sollwert</variable>
         <variable type="timeout" id="timeout">timeout</variable>
       </variables>
       <block type="on_ext" id="WS2pki!+Wa]B9pOoH1EE" x="37" y="212">
         <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="Y^gX`@%S7?]9pdzDbqEn">
             <field name="oid">0_userdata.0.Blockly.Power</field>
           </shadow>
         </value>
         <statement name="STATEMENT">
           <block type="controls_if" id="-o8O7GRQ_+OWlJ(^s1h%">
             <value name="IF0">
               <block type="logic_operation" id="eT!,1v1_jt8)-5XX@;?2" inline="false">
                 <field name="OP">AND</field>
                 <value name="A">
                   <block type="get_value" id="v/tyE{%;^.:%%orWc8:=">
                     <field name="ATTR">val</field>
                     <field name="OID">0_userdata.0.Blockly.Freigabe_Ventil</field>
                   </block>
                 </value>
                 <value name="B">
                   <block type="logic_negate" id="MXXJdcO#s]zQ-JxKx[Bh">
                     <value name="BOOL">
                       <block type="variables_get" id="x9+r_-8A*dc4*7wR}1KX">
                         <field name="VAR" id="timeout" variabletype="timeout">timeout</field>
                       </block>
                     </value>
                   </block>
                 </value>
               </block>
             </value>
             <statement name="DO0">
               <block type="controls_if" id="$+Tz0_$:o%:gB#ZPeD:C">
                 <mutation elseif="1"></mutation>
                 <value name="IF0">
                   <block type="logic_compare" id="pZ-=;Pw4Q#KOu7F|A6r%">
                     <field name="OP">LT</field>
                     <value name="A">
                       <block type="on_source" id="7r5wceo=h`FgR(eUAPjg">
                         <field name="ATTR">state.val</field>
                       </block>
                     </value>
                     <value name="B">
                       <block type="math_number" id="n|s4N_SYXa:14gT]--M8">
                         <field name="NUM">-500</field>
                       </block>
                     </value>
                   </block>
                 </value>
                 <statement name="DO0">
                   <block type="controls_if" id="-vmvsiA04M-QQ{q+;2=S">
                     <value name="IF0">
                       <block type="logic_compare" id="r!}hW3Jx;};jGqVq7(,*">
                         <field name="OP">LT</field>
                         <value name="A">
                           <block type="variables_get" id=";)|KKMwc}q?9GgFXDRJB">
                             <field name="VAR" id="Z$dQ(fbDb]yEVd;|nC}-">sollwert</field>
                           </block>
                         </value>
                         <value name="B">
                           <block type="math_number" id="cF!GbW/0|^ptc@N7QwxT">
                             <field name="NUM">30</field>
                           </block>
                         </value>
                       </block>
                     </value>
                     <statement name="DO0">
                       <block type="math_change" id=",tB,NxYBtB.os9gwcwKF">
                         <field name="VAR" id="Z$dQ(fbDb]yEVd;|nC}-">sollwert</field>
                         <value name="DELTA">
                           <shadow type="math_number" id="6.SMWS.JZ7n.%iWwSIYY">
                             <field name="NUM">0.5</field>
                           </shadow>
                         </value>
                       </block>
                     </statement>
                   </block>
                 </statement>
                 <value name="IF1">
                   <block type="logic_operation" id="?S~%I*Xg2:{~A+]VD?P`" inline="false">
                     <field name="OP">AND</field>
                     <value name="A">
                       <block type="logic_compare" id="!|lzv#rfsRB[uRR-?8$y">
                         <field name="OP">GT</field>
                         <value name="A">
                           <block type="on_source" id="k1M{WSL7Jhz.(NG+OzPq">
                             <field name="ATTR">state.val</field>
                           </block>
                         </value>
                         <value name="B">
                           <block type="math_number" id="-d#_*f;t]C(]]/Ai.1%f">
                             <field name="NUM">-50</field>
                           </block>
                         </value>
                       </block>
                     </value>
                     <value name="B">
                       <block type="logic_compare" id="cz6_7CvYs=$+Sm6EE:gb">
                         <field name="OP">GT</field>
                         <value name="A">
                           <block type="variables_get" id="9`#BZ6DDn/2xOix%G}4D">
                             <field name="VAR" id="Z$dQ(fbDb]yEVd;|nC}-">sollwert</field>
                           </block>
                         </value>
                         <value name="B">
                           <block type="get_value" id=";)%YZm}v`Zgyl_5nzjoc">
                             <field name="ATTR">val</field>
                             <field name="OID">ID auswählen</field>
                           </block>
                         </value>
                       </block>
                     </value>
                   </block>
                 </value>
                 <statement name="DO1">
                   <block type="math_change" id="cD[rF.$wvhyc9A~lPgHD">
                     <field name="VAR" id="Z$dQ(fbDb]yEVd;|nC}-">sollwert</field>
                     <value name="DELTA">
                       <shadow type="math_number" id="tgK{*FKsZ*.aVs|?/9kR">
                         <field name="NUM">-0.5</field>
                       </shadow>
                     </value>
                   </block>
                 </statement>
                 <next>
                   <block type="controls_if" id="(L0@;g9L{HUsVe)wksD9">
                     <value name="IF0">
                       <block type="logic_compare" id="qp1YjeoR-#T`*b)T-s/2">
                         <field name="OP">NEQ</field>
                         <value name="A">
                           <block type="variables_get" id="Y`5.KpcfrW`AxI:SDz#(">
                             <field name="VAR" id="Z$dQ(fbDb]yEVd;|nC}-">sollwert</field>
                           </block>
                         </value>
                         <value name="B">
                           <block type="get_value" id="ZX_bR1a[SnhgVmw|Q*9n">
                             <field name="ATTR">val</field>
                             <field name="OID">0_userdata.0.Blockly.Soll_Temperatur</field>
                           </block>
                         </value>
                       </block>
                     </value>
                     <statement name="DO0">
                       <block type="control" id="X]wVtN]L1~B?Hf+3=o5V">
                         <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                         <field name="OID">0_userdata.0.Blockly.Soll_Temperatur</field>
                         <field name="WITH_DELAY">FALSE</field>
                         <value name="VALUE">
                           <block type="variables_get" id="E=D1Jm-$N-SVHnI7!YsQ">
                             <field name="VAR" id="Z$dQ(fbDb]yEVd;|nC}-">sollwert</field>
                           </block>
                         </value>
                       </block>
                     </statement>
                     <next>
                       <block type="timeouts_settimeout" id="!Mx#av5+R*@g#]jARsK.">
                         <field name="NAME">timeout</field>
                         <field name="DELAY">1</field>
                         <field name="UNIT">min</field>
                         <statement name="STATEMENT">
                           <block type="variables_set" id="4ym+oZsroTg8TRrd$*lv">
                             <field name="VAR" id="timeout" variabletype="timeout">timeout</field>
                             <value name="VALUE">
                               <block type="logic_null" id="M6m?`rO-O1Ip)vX*cLw5"></block>
                             </value>
                           </block>
                         </statement>
                       </block>
                     </next>
                   </block>
                 </next>
               </block>
             </statement>
           </block>
         </statement>
       </block>
       <block type="on_ext" id="V!I|JBF1eXs(=1C?2MrO" x="512" y="213">
         <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="=f[=Yy}F]CQ@$O/r1k{V">
             <field name="oid">0_userdata.0.Blockly.Freigabe_Ventil</field>
           </shadow>
         </value>
         <statement name="STATEMENT">
           <block type="controls_if" id="S_.jdk|=zJG7scL4a!C@">
             <mutation else="1"></mutation>
             <value name="IF0">
               <block type="on_source" id=")mc%Hr$aEpk.r2gF#`Zw">
                 <field name="ATTR">state.val</field>
               </block>
             </value>
             <statement name="DO0">
               <block type="variables_set" id="j!fW@36IZ4+v~%`cE}.?">
                 <field name="VAR" id="Z$dQ(fbDb]yEVd;|nC}-">sollwert</field>
                 <value name="VALUE">
                   <block type="get_value" id="6L4QjxCw`a/4,tc%*MYr">
                     <field name="ATTR">val</field>
                     <field name="OID">0_userdata.0.Blockly.Soll_Temperatur</field>
                   </block>
                 </value>
                 <next>
                   <block type="update" id="M=0-F6W4M+$c3p(9Br11">
                     <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                     <field name="OID">Object ID</field>
                     <field name="WITH_DELAY">FALSE</field>
                     <value name="VALUE">
                       <block type="variables_get" id="M*ss*L*Amq{|pG|K0_^F">
                         <field name="VAR" id="Z$dQ(fbDb]yEVd;|nC}-">sollwert</field>
                       </block>
                     </value>
                   </block>
                 </next>
               </block>
             </statement>
             <statement name="ELSE">
               <block type="control" id="11t{niAfqS9bH9?UXEf{">
                 <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                 <field name="OID">0_userdata.0.Blockly.Soll_Temperatur</field>
                 <field name="WITH_DELAY">FALSE</field>
                 <value name="VALUE">
                   <block type="get_value" id="-6|)NTE*4+N[YhQF;%;,">
                     <field name="ATTR">val</field>
                     <field name="OID">ID auswählen</field>
                   </block>
                 </value>
               </block>
             </statement>
           </block>
         </statement>
       </block>
      </xml>
      

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

        @paul53
        Danke, aber Ziel ist es, dass ich es alleine auf die Beine stelle.
        Das Blockly hatte ich nur zur Hälfte verstanden, bei deinem Javascript verstehe ich gar nichts. Das bringt mir nichts.

        Ich muss erst einmal schauen, warum mir Alias wieder eine Tilde ausspuckt, obwohl ich ohne Tilde erstelle.

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

          @hg6806 sagte: Ziel ist es, dass ich es alleine auf die Beine stelle.

          Gut so. Vergleiche die Anordnung von "Ausführen timeout".

          Bild_2021-11-09_143546.png

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

            @paul53
            Stimmt!

            So sollte es hoffentlich passen. Kann es erst morgen testen:

            0c3b2bda-f0ec-4847-9c96-e4728c854cde-image.png

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

              @hg6806 sagte: So sollte es hoffentlich passen.

              Weshalb wird "Heizung-Boost" bei Skriptstart auf falsch gesetzt?

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

                Weil ich es generell eben auf aus gestellt haben möchte, wenn der Pi mal gebootet wird Javascript neu gestartet, etc.

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

                  So, nachdem ich es richtig umgesetzt wurde läuft es endlich 🙂

                  Noch eine kurze Off Topic Frage.

                  a5856ad1-ef73-41fb-b3d0-93416540277f-image.png

                  Das Objekt myHPSU HPSU.Betriebsart..... gibt mir ab und zu ein "Abtauen" aus.
                  Jedoch funktioniert die Falls-Abfrage nicht.

                  Homoran paul53 2 Replies Last reply Reply Quote 0
                  • Homoran
                    Homoran Global Moderator Administrators @hg6806 last edited by

                    @hg6806 sagte in Frage wegen Warnings in Blockly Prg:

                    Jedoch funktioniert die Falls-Abfrage nicht.

                    wie sieht denn das RAW des Datenpunktes aus?
                    kann das eine Werteliste sein?

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

                      Hier ist das Raw. Werteliste kann ich nicht beantworten.

                      {
                        "_id": "fhem.0.myHPSU.HPSU~Aktive_Betriebsart",
                        "type": "state",
                        "common": {
                          "name": "myHPSU HPSU.Aktive_Betriebsart",
                          "type": "string",
                          "role": "text",
                          "read": true,
                          "write": false,
                          "custom": {
                            "history.0": {
                              "enabled": true,
                              "aliasId": "",
                              "changesOnly": true,
                              "debounce": 0,
                              "changesRelogInterval": "0",
                              "changesMinDelta": 0,
                              "maxLength": 10,
                              "retention": "31536000"
                            }
                          }
                        },
                        "native": {
                          "Name": "myHPSU",
                          "Attribute": "HPSU.Aktive_Betriebsart",
                          "Readings": true,
                          "type": "string",
                          "role": "text"
                        },
                        "value": {
                          "val": "Standby"
                        },
                        "acl": {
                          "object": 1636,
                          "state": 1636,
                          "owner": "system.user.admin",
                          "ownerGroup": "system.group.administrator"
                        },
                        "from": "system.adapter.admin.0",
                        "user": "system.user.admin",
                        "ts": 1622098457713
                      }
                      
                      Homoran 1 Reply Last reply Reply Quote 0
                      • paul53
                        paul53 @hg6806 last edited by paul53

                        @hg6806
                        Du triggerst auf "...Aktive_Betriebsart", vergleichst dann aber "...Betriebsart". Besser so für Beginn:

                        Bild_2021-11-11_184938.png

                        und so für Ende Abtauen:

                        Bild_2021-11-11_185150.png

                        1 Reply Last reply Reply Quote 0
                        • Homoran
                          Homoran Global Moderator Administrators @hg6806 last edited by

                          @hg6806 sagte in Frage wegen Warnings in Blockly Prg:

                          "type": "string",

                          nein, ist wirklich ein String

                          dann schreib mal zusätzliche einen debug Baustein rein, der die den WERT ausgibt, damit man sieht was da wirklich ankommt, wenn da Abtauen steht,
                          Wert ist ein Menüpunkt des Pulldownmenüs in dem Baustein aus der Gruppe Trigger

                          hg6806 1 Reply Last reply Reply Quote 0
                          • hg6806
                            hg6806 Most Active @Homoran last edited by

                            @homoran
                            Welcher Baustein ist das?

                            paul53 Homoran 2 Replies Last reply Reply Quote 0
                            • paul53
                              paul53 @hg6806 last edited by paul53

                              @hg6806 sagte: Welcher Baustein ist das?

                              Wert? Es steht zuerst "Objekt ID" drin:

                              Blockly_DP_Props.JPG

                              1 Reply Last reply Reply Quote 0
                              • Homoran
                                Homoran Global Moderator Administrators @hg6806 last edited by

                                @hg6806 sagte in Frage wegen Warnings in Blockly Prg:

                                @homoran
                                Welcher Baustein ist das?

                                System -> debug

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

                                  Sorry, brauch da immer etwas länger.
                                  740542cb-bbc9-4775-877a-b5bbff03a017-image.png
                                  So wahrscheinlich.

                                  Gibt folgendes aus:

                                  19:08:38.278	info	javascript.0 (996) script.js.common.Heizung.Letztes_Abtauen_ermitteln: Heizen
                                  19:08:54.779	info	javascript.0 (996) script.js.common.Heizung.Letztes_Abtauen_ermitteln: Standby
                                  

                                  Abtauen an sich kann ich nicht provozieren.
                                  Aber in der History-Liste steht definitiv "Abtauen" drin.

                                  paul53 1 Reply Last reply Reply Quote 0
                                  • hg6806
                                    hg6806 Most Active last edited by

                                    Standby	true		2021-11-11 19:08:54.776	
                                    Heizen	true		2021-11-11 19:08:38.275	
                                    Warmwasserbereitung	true		2021-11-11 19:07:45.955	
                                    Standby	true		2021-11-11 18:52:23.234	
                                    Heizen	true		2021-11-11 17:51:12.529	
                                    Standby	true		2021-11-11 17:38:27.045	
                                    Heizen	true		2021-11-11 17:21:08.841	
                                    Standby	true		2021-11-11 17:18:00.298	
                                    Warmwasserbereitung	true		2021-11-11 16:26:45.422	
                                    Standby	true		2021-11-11 16:25:50.573	
                                    Warmwasserbereitung	true		2021-11-11 15:37:24.787	
                                    Standby	true		2021-11-11 15:32:05.956	
                                    Warmwasserbereitung	true		2021-11-11 14:59:48.208	
                                    Heizen	true		2021-11-11 11:58:37.692	
                                    Standby	true		2021-11-11 11:57:46.281	
                                    Heizen	true		2021-11-11 11:48:37.578	
                                    Standby	true		2021-11-11 11:44:30.094	
                                    Abtauen	true		2021-11-11 11:39:29.353	
                                    Heizen	true		2021-11-11 09:57:30.358	
                                    Standby	true		2021-11-11 09:49:26.442	
                                    Abtauen	true		2021-11-11 09:44:39.438
                                    
                                    1 Reply Last reply Reply Quote 0
                                    • paul53
                                      paul53 @hg6806 last edited by

                                      @hg6806 sagte: History-Liste steht definitiv "Abtauen" drin.

                                      Dann hast Du hier nur den falschen Datenpunkt für den Vergleich mit "Abtauen" verwendet.

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

                                        Funktioniert!
                                        Sorry, hatte dein Post ganz übersehen.

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

                                        Support us

                                        ioBroker
                                        Community Adapters
                                        Donate

                                        893
                                        Online

                                        31.8k
                                        Users

                                        79.9k
                                        Topics

                                        1.3m
                                        Posts

                                        8
                                        63
                                        2033
                                        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