Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. [GELÖST]Kleines Bewässerungsscript mit Fehler

    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

    [GELÖST]Kleines Bewässerungsscript mit Fehler

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

      Hallo, ich habe mir ein Script gebaut, mit welchem ich über einen meiner knx glastaster meine bewässerung schalten will. leider macht das script irgendwie nicht alles so wie ich will. wenn ich den knopf drücke wird das objekt "Bewaesserung" auf true gesetzt (nur während des drückens) und das Script fängt an zu laufen. bis dahin so gut....nur dann gehen irgendwie nicht wie ich das möchte die ventile nacheinander auf und zu sondern alle an. was mache ich falsch?

      beregner1.png beregner2.png

      bewaesserung.zip

      J paul53 2 Replies Last reply Reply Quote 0
      • J
        Jan1 @overfl0w last edited by

        @overfl0w
        Der timeout bezieht sich nur auf das was in ihm abgelegt ist, das was darunter kommt, wird mit dem Trigger gestartet .

        overfl0w 1 Reply Last reply Reply Quote 0
        • overfl0w
          overfl0w @Jan1 last edited by

          @jan1 okay verstehe. wie kann ich das denn am schlausten umbauen, dass die kreise erst nach 30min wechseln?

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

            @overfl0w
            Es wird nur mit je 20 s Versatz gestartet und beendet.
            Vorschlag:

            Blockly_temp.JPG

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

              @paul53

              MEGA! kannst du mir die Blöcke exportieren? dann spare ich mir das zusammen geklicke und brauch nur noch die objekte setzen.
              danke schonmal.. sieht um einiges professioneller aus und nach längerem anwschauen macht das mit den 20 sek sinn...

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

                @overfl0w sagte: Blöcke exportieren?

                <xml xmlns="https://developers.google.com/blockly/xml">
                 <variables>
                   <variable id="zhvC(J!AU}R4CK`j^NS{">ids</variable>
                   <variable id="h6%WjQ?!z=KP#3{q26#^">idx</variable>
                   <variable id="ok3@m_8ElDxBAL-#tJTD">id</variable>
                   <variable type="timeout" id="timeout">timeout</variable>
                 </variables>
                 <block type="variables_set" id="jxgU~e%p_d8,8(;ek{Hj" x="238" y="-12">
                   <field name="VAR" id="zhvC(J!AU}R4CK`j^NS{">ids</field>
                   <value name="VALUE">
                     <block type="lists_create_with" id="DKhLBmDCHSqmefU!w}et">
                       <mutation items="3"></mutation>
                       <value name="ADD0">
                         <block type="text" id="8opO+lgX0=,@P`ias}WV">
                           <field name="TEXT">knx.0.Licht_und_Steckdosen.Schalten.Bewaesserung_Kreis_01</field>
                         </block>
                       </value>
                       <value name="ADD1">
                         <block type="text" id="1Ej^s[b{s,q1EUeGLHW~">
                           <field name="TEXT">knx.0.Licht_und_Steckdosen.Schalten.Bewaesserung_Kreis_02</field>
                         </block>
                       </value>
                       <value name="ADD2">
                         <block type="text" id="i4}M+/on3)$p|5q}ECNV">
                           <field name="TEXT">knx.0.Licht_und_Steckdosen.Schalten.Bewaesserung_Kreis_03</field>
                         </block>
                       </value>
                     </block>
                   </value>
                   <next>
                     <block type="comment" id="Q)Z(mofMK{k.jl1O{E~u">
                       <field name="COMMENT">Bewässerung Garten Beregner Script</field>
                       <next>
                         <block type="on_ext" id=".hY/sH2jMgj(r^J(S*fg">
                           <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
                           <field name="CONDITION">true</field>
                           <field name="ACK_CONDITION"></field>
                           <value name="OID0">
                             <shadow type="field_oid" id="eT?nK@P#j[]9QtIESiOj">
                               <field name="oid">knx.0.Licht_und_Steckdosen.Schalten.Bewaesserung</field>
                             </shadow>
                           </value>
                           <statement name="STATEMENT">
                             <block type="variables_set" id="w@/)~X-Fh9-$*qg)UbqY">
                               <field name="VAR" id="h6%WjQ?!z=KP#3{q26#^">idx</field>
                               <value name="VALUE">
                                 <block type="math_number" id="11}gx-nJ!VReDTA!Ix5k">
                                   <field name="NUM">0</field>
                                 </block>
                               </value>
                               <next>
                                 <block type="debug" id="mfIXPyztD8hhDXKrqiBn">
                                   <field name="Severity">log</field>
                                   <value name="TEXT">
                                     <shadow type="text" id="|n{NzJ09-Pb@_,vw9_rL">
                                       <field name="TEXT">Bewässerung wurde gestartet.</field>
                                     </shadow>
                                   </value>
                                   <next>
                                     <block type="procedures_callnoreturn" id="_xObMHwq*/Yp)^=xd=vy">
                                       <mutation name="zyklus"></mutation>
                                     </block>
                                   </next>
                                 </block>
                               </next>
                             </block>
                           </statement>
                         </block>
                       </next>
                     </block>
                   </next>
                 </block>
                 <block type="procedures_defnoreturn" id="26g7cC6Aux0Q~kuawb4E" x="663" y="138">
                   <field name="NAME">zyklus</field>
                   <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
                   <statement name="STACK">
                     <block type="math_change" id=")]+u~)_cE{0WOK?amPH}">
                       <field name="VAR" id="h6%WjQ?!z=KP#3{q26#^">idx</field>
                       <value name="DELTA">
                         <shadow type="math_number" id="q[EKtbOX$:x0AGWMdAp|">
                           <field name="NUM">1</field>
                         </shadow>
                       </value>
                       <next>
                         <block type="variables_set" id="N6MD/|QhhY0~yjlLzufJ">
                           <field name="VAR" id="ok3@m_8ElDxBAL-#tJTD">id</field>
                           <value name="VALUE">
                             <block type="lists_getIndex" id="HNq5+mh/E~9HAT!=4K:W">
                               <mutation statement="false" at="true"></mutation>
                               <field name="MODE">GET</field>
                               <field name="WHERE">FROM_START</field>
                               <value name="VALUE">
                                 <block type="variables_get" id="|4@]72is#goa[e;]zku(">
                                   <field name="VAR" id="zhvC(J!AU}R4CK`j^NS{">ids</field>
                                 </block>
                               </value>
                               <value name="AT">
                                 <block type="variables_get" id="c?9B_im[Oi[J:qVip%g9">
                                   <field name="VAR" id="h6%WjQ?!z=KP#3{q26#^">idx</field>
                                 </block>
                               </value>
                             </block>
                           </value>
                           <next>
                             <block type="control_ex" id="Rmjxwr2eNT#-!Jj}fQ:}" inline="true">
                               <field name="TYPE">false</field>
                               <field name="CLEAR_RUNNING">FALSE</field>
                               <value name="OID">
                                 <shadow type="field_oid" id="4#RRWG]TJ/Z#1waGK[4,">
                                   <field name="oid">Object ID</field>
                                 </shadow>
                                 <block type="variables_get" id="Su2Z%T*~5E=Re+V[-`%=">
                                   <field name="VAR" id="ok3@m_8ElDxBAL-#tJTD">id</field>
                                 </block>
                               </value>
                               <value name="VALUE">
                                 <shadow type="logic_boolean" id="o}RlLNd~tLaY(J=:!VbW">
                                   <field name="BOOL">TRUE</field>
                                 </shadow>
                               </value>
                               <value name="DELAY_MS">
                                 <shadow type="math_number" id="U_|ZT9XSBnb!GNdUwhC0">
                                   <field name="NUM">0</field>
                                 </shadow>
                               </value>
                               <next>
                                 <block type="timeouts_settimeout" id=",hCbW^lhPdV#Bo@u+.UZ">
                                   <field name="NAME">timeout</field>
                                   <field name="DELAY">30</field>
                                   <field name="UNIT">min</field>
                                   <statement name="STATEMENT">
                                     <block type="control_ex" id="oBKc`|S]r!.f(/OGVHv-" inline="true">
                                       <field name="TYPE">false</field>
                                       <field name="CLEAR_RUNNING">FALSE</field>
                                       <value name="OID">
                                         <shadow type="field_oid" id="mQ-z-~4p}1}w@tEkWwO!">
                                           <field name="oid">Object ID</field>
                                         </shadow>
                                         <block type="variables_get" id="iGq;(,Jul)N;|q~)aS]7">
                                           <field name="VAR" id="ok3@m_8ElDxBAL-#tJTD">id</field>
                                         </block>
                                       </value>
                                       <value name="VALUE">
                                         <shadow type="logic_boolean" id="phNp-/AeW.lYR3CsyO[l">
                                           <field name="BOOL">FALSE</field>
                                         </shadow>
                                       </value>
                                       <value name="DELAY_MS">
                                         <shadow type="math_number" id="Z$lEc##]6AQr6cr0owCp">
                                           <field name="NUM">0</field>
                                         </shadow>
                                       </value>
                                       <next>
                                         <block type="timeouts_wait" id="^-K}V22L#zpT1%NI2@VQ">
                                           <field name="DELAY">20</field>
                                           <field name="UNIT">sec</field>
                                           <next>
                                             <block type="controls_if" id="GIb@}VwONB*EH=U^w]qL">
                                               <mutation else="1"></mutation>
                                               <value name="IF0">
                                                 <block type="logic_compare" id="V%3SWL!_9UPfB8j3J[DL">
                                                   <field name="OP">LT</field>
                                                   <value name="A">
                                                     <block type="variables_get" id="PV`F6_!yy:07X9mh{0`n">
                                                       <field name="VAR" id="h6%WjQ?!z=KP#3{q26#^">idx</field>
                                                     </block>
                                                   </value>
                                                   <value name="B">
                                                     <block type="math_number" id="?.4B;[z47/~`_I;x~8OX">
                                                       <field name="NUM">3</field>
                                                     </block>
                                                   </value>
                                                 </block>
                                               </value>
                                               <statement name="DO0">
                                                 <block type="procedures_callnoreturn" id="J/Kb(9h*_LAr~aRllD,@">
                                                   <mutation name="zyklus"></mutation>
                                                 </block>
                                               </statement>
                                               <statement name="ELSE">
                                                 <block type="debug" id="M3%n4a?%$LFUZ[T+6%2G">
                                                   <field name="Severity">log</field>
                                                   <value name="TEXT">
                                                     <shadow type="text" id="b!O.2wk=/#0Je0$hkGbK">
                                                       <field name="TEXT">Bewässerung erfolgreich beendet.</field>
                                                     </shadow>
                                                   </value>
                                                 </block>
                                               </statement>
                                             </block>
                                           </next>
                                         </block>
                                       </next>
                                     </block>
                                   </statement>
                                 </block>
                               </next>
                             </block>
                           </next>
                         </block>
                       </next>
                     </block>
                   </statement>
                 </block>
                </xml>
                

                @overfl0w sagte in Kleines Bewässerungsscript mit Fehler:

                brauch nur noch die objekte setzen.

                Die IDs sind bereits als String eingesetzt.

                overfl0w 2 Replies Last reply Reply Quote 1
                • overfl0w
                  overfl0w @paul53 last edited by

                  @paul53 Danke! ich teste das Script direkt morgen nach der Arbeit im hellen 🙂

                  Wenn ich schonmal beim Thema bin. Gibt es eine Möglichkeit, dass der KNX Glastaster solange "Aktiv" anzeigt wie das Script läuft, per Rückgabewert o.ä?

                  32a85733-5283-4223-90d4-e5142ce0a88b-image.png

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

                    @paul53

                    Bitte entschuldige, dass ich mich jetzt erst melde. Das Script läuft perfekt durch. Vielen Dank.
                    Lediglich der Trigger bleibt auf true. Wie ist es am schlausten diesen wieder auf false zu setzen?

                    5767d178-f7cd-4f91-ad78-de20666d3766-image.png

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

                      @overfl0w sagte: Trigger bleibt auf true. Wie ist es am schlausten diesen wieder auf false zu setzen?

                      Wozu ist das nötig?

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

                        @paul53 Ich dachte nur, der Vollständigkeit halber. Aber wenn's nicht muss, dann bleibts so 🙂

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

                        Support us

                        ioBroker
                        Community Adapters
                        Donate

                        861
                        Online

                        31.9k
                        Users

                        80.1k
                        Topics

                        1.3m
                        Posts

                        3
                        10
                        370
                        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