Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. Bewässerungskreise schalten

    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

    Bewässerungskreise schalten

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

      Hallo Zusammen, ich versuche mich im Programmieren mit Blockly. Komme hier und da nicht weiter.
      Ich habe ein Testscript erstellt, welches einen Schalter (Sonoff4CHGarten POWER1) nach zeitlichen Vorgaben (Bewässerung_Dauer_1) an und wieder aus schaltet.
      Nach dem "abarbeiten" soll er den nächsten (Sonoff4CHGarten POWER2) schalten. Wo ist die Schleife zu Ende? Er arbeitet dies gefühlt parallel ab.
      2cbefeab-f8dc-442f-8be7-ad952613407e-image.png

      
      BlocklyJavascriptTypeScriptRules
      19:20:30.002	warn	javascript.0 (1926) script.js.Gartenbewässerung_1_1: ----- Start Bewässerung 1 ------
      19:20:30.002	warn	javascript.0 (1926) script.js.Gartenbewässerung_1_1: ----- Ende Bewässerung 1 ------
      19:20:45.001	warn	javascript.0 (1926) script.js.Gartenbewässerung_1_1: ----- Start Bewässerung 1 ------
      19:20:45.002	warn	javascript.0 (1926) script.js.Gartenbewässerung_1_1: ----- Ende Bewässerung 1 ------
      19:21:00.002	warn	javascript.0 (1926) script.js.Gartenbewässerung_1_1: ----- Start Bewässerung 1 ------
      19:21:00.003	warn	javascript.0 (1926) script.js.Gartenbewässerung_1_1: ----- Ende Bewässerung 1 ------
      19:21:15.002	warn	javascript.0 (1926) script.js.Gartenbewässerung_1_1: ----- Start Bewässerung 1 ------
      19:21:15.003	warn	javascript.0 (1926) script.js.Gartenbewässerung_1_1: ----- Ende Bewässerung 1 ------
      19:21:30.001	warn	javascript.0 (1926) script.js.Gartenbewässerung_1_1: ----- Start Bewässerung 1 ------
      19:21:30.002	warn	javascript.0 (1926) script.js.Gartenbewässerung_1_1: ----- Ende Bewässerung 1 ------
      Ausgewählte Blöcke exportieren
      <xml xmlns="https://developers.google.com/blockly/xml">
        <variables>
          <variable id="3eB$2W@DF:EW1g*m75Zg">cn1</variable>
          <variable type="interval" id="Intervall">Intervall</variable>
        </variables>
        <block type="procedures_defnoreturn" id="YJVcUHF;_!PhZ_/@3DLF" x="462" y="112">
          <field name="NAME">Start_Bewaesserungskreis_1</field>
          <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
          <statement name="STACK">
            <block type="controls_if" id="C|Rn1cp4KqB^]Rt_ZAF|">
              <value name="IF0">
                <block type="logic_compare" id="KvUx}9:#E}*%xID$4yG@">
                  <field name="OP">GT</field>
                  <value name="A">
                    <block type="get_value" id="6_0D^zKp]sg+?J2tUmFp">
                      <field name="ATTR">val</field>
                      <field name="OID">admin.0.Bewässerung_Dauer_1</field>
                    </block>
                  </value>
                  <value name="B">
                    <block type="math_number" id="If;^notV4qpNzp$c8_AF">
                      <field name="NUM">0</field>
                    </block>
                  </value>
                </block>
              </value>
              <statement name="DO0">
                <block type="debug" id="d!P|@?E!?)cCX0F|/GP6">
                  <field name="Severity">warn</field>
                  <value name="TEXT">
                    <shadow type="text" id="qpkU^12=3FBQc!*$`]z2">
                      <field name="TEXT">----- Start Bewässerung 1 ------</field>
                    </shadow>
                  </value>
                  <next>
                    <block type="control" id="Ug1,cg%B}!1:$32DALow">
                      <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                      <field name="OID">sonoff.0.Sonoff4CHGarten.POWER1</field>
                      <field name="WITH_DELAY">FALSE</field>
                      <value name="VALUE">
                        <block type="logic_boolean" id="$%Cwm!n4%2evxR?G~O2g">
                          <field name="BOOL">TRUE</field>
                        </block>
                      </value>
                      <next>
                        <block type="variables_set" id="#IQ35Gsdiqs7q-`-HQ+1">
                          <field name="VAR" id="3eB$2W@DF:EW1g*m75Zg">cn1</field>
                          <value name="VALUE">
                            <block type="get_value" id="b?l5jm.nu1;L)1w:o1rE">
                              <field name="ATTR">val</field>
                              <field name="OID">admin.0.Bewässerung_Dauer_1</field>
                            </block>
                          </value>
                          <next>
                            <block type="timeouts_setinterval" id="_sLBD`c+El`j3nFOuUnk">
                              <field name="NAME">Intervall</field>
                              <field name="INTERVAL">1</field>
                              <field name="UNIT">sec</field>
                              <statement name="STATEMENT">
                                <block type="math_change" id="A:o.bS|YSqTZIXO,RYsq">
                                  <field name="VAR" id="3eB$2W@DF:EW1g*m75Zg">cn1</field>
                                  <value name="DELTA">
                                    <shadow type="math_number" id="B+g$AFW9SCLlqMpzkOE4">
                                      <field name="NUM">-1</field>
                                    </shadow>
                                  </value>
                                  <next>
                                    <block type="controls_if" id="Yp=BM9L*8-zaDM=,Yru$">
                                      <value name="IF0">
                                        <block type="logic_compare" id="J5-^zoj8EO|C5jUh`rYi">
                                          <field name="OP">LTE</field>
                                          <value name="A">
                                            <block type="variables_get" id="dgoR|fpuLn]gZFDY9@z-">
                                              <field name="VAR" id="3eB$2W@DF:EW1g*m75Zg">cn1</field>
                                            </block>
                                          </value>
                                          <value name="B">
                                            <block type="math_number" id="k4}].3J+$BT76=hy}Weu">
                                              <field name="NUM">0</field>
                                            </block>
                                          </value>
                                        </block>
                                      </value>
                                      <statement name="DO0">
                                        <block type="timeouts_clearinterval" id="]q%@S9Axuf%V_^Z-#S3L">
                                          <field name="NAME">Intervall</field>
                                          <next>
                                            <block type="control" id="GmOZ.kl$D(e@@ilhhbUA">
                                              <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                              <field name="OID">sonoff.0.Sonoff4CHGarten.POWER1</field>
                                              <field name="WITH_DELAY">FALSE</field>
                                              <value name="VALUE">
                                                <block type="logic_boolean" id="yRaL4Zuu1Y4S9ifLWeA%">
                                                  <field name="BOOL">FALSE</field>
                                                </block>
                                              </value>
                                            </block>
                                          </next>
                                        </block>
                                      </statement>
                                    </block>
                                  </next>
                                </block>
                              </statement>
                            </block>
                          </next>
                        </block>
                      </next>
                    </block>
                  </next>
                </block>
              </statement>
              <next>
                <block type="debug" id="n/O42/m|n:i)pzvYt0if">
                  <field name="Severity">warn</field>
                  <value name="TEXT">
                    <shadow type="text" id="/csjK0gf1QUORu}CDkOT">
                      <field name="TEXT">----- Ende Bewässerung 1 ------</field>
                    </shadow>
                  </value>
                </block>
              </next>
            </block>
          </statement>
        </block>
        <block type="schedule" id="-8J[8-rahq!PgM^t)bm)" x="138" y="138">
          <field name="SCHEDULE">*/15 * * * * *</field>
          <statement name="STATEMENT">
            <block type="procedures_callnoreturn" id="O9yEz|xTGwizXup64dF9">
              <mutation name="Start_Bewaesserungskreis_1"></mutation>
            </block>
          </statement>
        </block>
      </xml>
      <xml xmlns="https://developers.google.com/blockly/xml">
        <variables>
          <variable id="3eB$2W@DF:EW1g*m75Zg">cn1</variable>
          <variable type="interval" id="Intervall">Intervall</variable>
        </variables>
        <block type="procedures_defnoreturn" id="YJVcUHF;_!PhZ_/@3DLF" x="462" y="112">
          <field name="NAME">Start_Bewaesserungskreis_1</field>
          <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
          <statement name="STACK">
            <block type="controls_if" id="C|Rn1cp4KqB^]Rt_ZAF|">
              <value name="IF0">
                <block type="logic_compare" id="KvUx}9:#E}*%xID$4yG@">
                  <field name="OP">GT</field>
                  <value name="A">
                    <block type="get_value" id="6_0D^zKp]sg+?J2tUmFp">
                      <field name="ATTR">val</field>
                      <field name="OID">admin.0.Bewässerung_Dauer_1</field>
                    </block>
                  </value>
                  <value name="B">
                    <block type="math_number" id="If;^notV4qpNzp$c8_AF">
                      <field name="NUM">0</field>
                    </block>
                  </value>
                </block>
              </value>
              <statement name="DO0">
                <block type="debug" id="d!P|@?E!?)cCX0F|/GP6">
                  <field name="Severity">warn</field>
                  <value name="TEXT">
                    <shadow type="text" id="qpkU^12=3FBQc!*$`]z2">
                      <field name="TEXT">----- Start Bewässerung 1 ------</field>
                    </shadow>
                  </value>
                  <next>
                    <block type="control" id="Ug1,cg%B}!1:$32DALow">
                      <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                      <field name="OID">sonoff.0.Sonoff4CHGarten.POWER1</field>
                      <field name="WITH_DELAY">FALSE</field>
                      <value name="VALUE">
                        <block type="logic_boolean" id="$%Cwm!n4%2evxR?G~O2g">
                          <field name="BOOL">TRUE</field>
                        </block>
                      </value>
                      <next>
                        <block type="variables_set" id="#IQ35Gsdiqs7q-`-HQ+1">
                          <field name="VAR" id="3eB$2W@DF:EW1g*m75Zg">cn1</field>
                          <value name="VALUE">
                            <block type="get_value" id="b?l5jm.nu1;L)1w:o1rE">
                              <field name="ATTR">val</field>
                              <field name="OID">admin.0.Bewässerung_Dauer_1</field>
                            </block>
                          </value>
                          <next>
                            <block type="timeouts_setinterval" id="_sLBD`c+El`j3nFOuUnk">
                              <field name="NAME">Intervall</field>
                              <field name="INTERVAL">1</field>
                              <field name="UNIT">sec</field>
                              <statement name="STATEMENT">
                                <block type="math_change" id="A:o.bS|YSqTZIXO,RYsq">
                                  <field name="VAR" id="3eB$2W@DF:EW1g*m75Zg">cn1</field>
                                  <value name="DELTA">
                                    <shadow type="math_number" id="B+g$AFW9SCLlqMpzkOE4">
                                      <field name="NUM">-1</field>
                                    </shadow>
                                  </value>
                                  <next>
                                    <block type="controls_if" id="Yp=BM9L*8-zaDM=,Yru$">
                                      <value name="IF0">
                                        <block type="logic_compare" id="J5-^zoj8EO|C5jUh`rYi">
                                          <field name="OP">LTE</field>
                                          <value name="A">
                                            <block type="variables_get" id="dgoR|fpuLn]gZFDY9@z-">
                                              <field name="VAR" id="3eB$2W@DF:EW1g*m75Zg">cn1</field>
                                            </block>
                                          </value>
                                          <value name="B">
                                            <block type="math_number" id="k4}].3J+$BT76=hy}Weu">
                                              <field name="NUM">0</field>
                                            </block>
                                          </value>
                                        </block>
                                      </value>
                                      <statement name="DO0">
                                        <block type="timeouts_clearinterval" id="]q%@S9Axuf%V_^Z-#S3L">
                                          <field name="NAME">Intervall</field>
                                          <next>
                                            <block type="control" id="GmOZ.kl$D(e@@ilhhbUA">
                                              <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                              <field name="OID">sonoff.0.Sonoff4CHGarten.POWER1</field>
                                              <field name="WITH_DELAY">FALSE</field>
                                              <value name="VALUE">
                                                <block type="logic_boolean" id="yRaL4Zuu1Y4S9ifLWeA%">
                                                  <field name="BOOL">FALSE</field>
                                                </block>
                                              </value>
                                            </block>
                                          </next>
                                        </block>
                                      </statement>
                                    </block>
                                  </next>
                                </block>
                              </statement>
                            </block>
                          </next>
                        </block>
                      </next>
                    </block>
                  </next>
                </block>
              </statement>
              <next>
                <block type="debug" id="n/O42/m|n:i)pzvYt0if">
                  <field name="Severity">warn</field>
                  <value name="TEXT">
                    <shadow type="text" id="/csjK0gf1QUORu}CDkOT">
                      <field name="TEXT">----- Ende Bewässerung 1 ------</field>
                    </shadow>
                  </value>
                </block>
              </next>
            </block>
          </statement>
        </block>
        <block type="schedule" id="-8J[8-rahq!PgM^t)bm)" x="138" y="138">
          <field name="SCHEDULE">*/15 * * * * *</field>
          <statement name="STATEMENT">
            <block type="procedures_callnoreturn" id="O9yEz|xTGwizXup64dF9">
              <mutation name="Start_Bewaesserungskreis_1"></mutation>
            </block>
          </statement>
        </block>
      </xml>
      
      
      sigi234 R 2 Replies Last reply Reply Quote 0
      • sigi234
        sigi234 Forum Testing Most Active @oliverni last edited by

        @oliverni

        https://forum.iobroker.net/topic/32213/test-adapter-gartenbewässerung-v0-0-x?_=1617475130561

        https://forum.iobroker.net/topic/33573/vorlage-gartenbewässerung-mit-6-ventilen?_=1617475130564

        https://github.com/Dirk-Peter-md/ioBroker.sprinklecontrol

        1 Reply Last reply Reply Quote 1
        • R
          roland1000 @oliverni last edited by

          Hallo oliverni

          Hast du einen Adapter davon schon ausgewählt?

          MFG
          Roland1000

          oliverni 1 Reply Last reply Reply Quote 0
          • oliverni
            oliverni @roland1000 last edited by

            Hallo @roland1000 ich habe den ersten Adapter installiert. Wie komme ich zur Visualisierung? Wird das mit dem Adapter installiert? Oder gibt es dort ein fertiges Template? Da fehlt mir ein Stück Wissen.

            R 1 Reply Last reply Reply Quote 0
            • R
              roland1000 @oliverni last edited by

              @oliverni

              Ich hatte auch diese mal installiert. Habe mich aber dann für einen selbst gebauten entschieden dieser ist in Blockly geschrieben es beinhaltet eine Restzeit Anzeige ,Regenwarner (schaltet Bewässerung aus ) und einen Notaus sowie 3 verschiedene Kreise mit Magnetventile die dann auch per Rfid geschaltet werden können . Zudem noch ist per ESP8266 ein Nextion Display verbaut als Zentrale schalttafel. Jetzt wird diese Anlage mit Rasensensoren sowie UV Sensor überwacht damit sie bei Trockenheit einschalten kann wenn die Zeitschaltuhr aktiv ist aber nicht angeschaltet wird wenn die Sonne direkt auf dem Garten scheint als Sicherheits schaltung .Zudem kann ich auch noch die Rasensensoren grafisch einstellen ab wann sie trocken sein sollen so eine Art richt wert.

              bahnuhr 1 Reply Last reply Reply Quote 0
              • bahnuhr
                bahnuhr Forum Testing Most Active @roland1000 last edited by

                @roland1000 sagte in Bewässerungskreise schalten:

                ESP8266 ein Nextion Display

                Hast du dazu mehr Infos?

                R 1 Reply Last reply Reply Quote 0
                • R
                  roland1000 @bahnuhr last edited by

                  @bahnuhr

                  Steuerung Garten.png(Lade 100% hoch)

                  R 1 Reply Last reply Reply Quote 0
                  • R
                    roland1000 @roland1000 last edited by

                    @roland1000

                    Irgenwie wollen die Bilder nicht hochgeladen werden

                    R 1 Reply Last reply Reply Quote 0
                    • R
                      roland1000 @roland1000 last edited by

                      @roland1000

                      Es ist ein 3,5zoll Touch display von Nextion. Der ist an einen ESP8266 als Serial angeschlossen . Dieser schickt per Mqtt daten am ioBroker .Es gibt noch ein Nextion mit gpio Ausgänge diese können dann direkt an die Ausgänge an einen Esp32 oder Esp8266 mit Expander gespeist werden .Der Ohne war entschieden günstiger . Möglichkeit drei man muste rules schreiben die die Ausgange an den Esp8266 schalten last

                      R bahnuhr 2 Replies Last reply Reply Quote 0
                      • R
                        roland1000 @roland1000 last edited by

                        @roland1000 Steuerung Garten.png

                        bahnuhr 1 Reply Last reply Reply Quote 0
                        • bahnuhr
                          bahnuhr Forum Testing Most Active @roland1000 last edited by

                          @roland1000 sagte in Bewässerungskreise schalten:

                          ESP8266 als Serial

                          Kannst du mir die einstellungen nennen.
                          Ich habe es bisher nicht hinbekommen.
                          Ich habe auch die günstigen Nextion.

                          bahnuhr 1 Reply Last reply Reply Quote 0
                          • bahnuhr
                            bahnuhr Forum Testing Most Active @roland1000 last edited by

                            @roland1000 sagte in Bewässerungskreise schalten:

                            @roland1000 Steuerung Garten.png

                            Ist ja cool.
                            Würdest du die hmi hier teilen?

                            1 Reply Last reply Reply Quote 0
                            • bahnuhr
                              bahnuhr Forum Testing Most Active @bahnuhr last edited by

                              @bahnuhr sagte in Bewässerungskreise schalten:

                              Ich habe es bisher nicht hinbekommen.

                              Habe es aber bisher auch nur mit einem wemos d1 mini probiert.
                              Da klappt es nicht.

                              Mit einem Raspi klappt dies einwandfrei.

                              R 1 Reply Last reply Reply Quote 0
                              • R
                                roland1000 @bahnuhr last edited by

                                @bahnuhr
                                Hast du ESP easy darauf laufen

                                R 1 Reply Last reply Reply Quote 0
                                • R
                                  roland1000 @roland1000 last edited by

                                  @roland1000
                                  Hast du den Nextion Editor genommen . Mit dem Nextion Editor kannst du dann die Sende und Empfangszeilen eintragen .das erste Bild was ich geschickt habe war der Iobroker .Der vom Garten haus sieht ganz anders aus .

                                  R 1 Reply Last reply Reply Quote 0
                                  • R
                                    roland1000 @roland1000 last edited by

                                    @roland1000

                                    Klar kann ich machen dauert nur ein wenig muss gucken wo ich die Hmi datei hab auf dem Server ansonsten muss ich im garten halt die Sd karte rausholen .

                                    R 1 Reply Last reply Reply Quote 0
                                    • R
                                      roland1000 @roland1000 last edited by

                                      @roland1000

                                      Hier kommt das HMI hab s gefunden .Du must unbedingt noch daten punkte erzeugen .Die virtuellen schalter sind tastend und nicht rastend .Die Schalter waren mal bei einen Test Programm zu einen Nextion Programm eines anderen Projekts aus dem Internet fand sie richtig toll deswegen hab ich diese dringelassen .Weis jetzt nicht in wieso weit ich da jetzt hier im Forum dagegen verstöße. Ansonsten muss hier mal der Admin das halt löschen .Der Rest kommt von mir soweit .

                                      Gartenneu.HMI

                                      R 1 Reply Last reply Reply Quote 1
                                      • R
                                        roland1000 @roland1000 last edited by

                                        @roland1000

                                        So hier hast du noch ein Extra Blockly aus Tastend wird Rastend

                                        <xml xmlns="http://www.w3.org/1999/xhtml">
                                          <block type="on_ext" id="!st3ku!Q03]ln:GC6@i," x="63" y="65">
                                            <mutation items="1"></mutation>
                                            <field name="CONDITION">ne</field>
                                            <field name="ACK_CONDITION"></field>
                                            <value name="OID0">
                                              <shadow type="field_oid" id="r;sb5(K];%mC5yRXdFh(">
                                                <field name="oid">VirtuelleGeräte.0.Gartensteuerung.Pumpenzeit</field>
                                              </shadow>
                                            </value>
                                            <statement name="STATEMENT">
                                              <block type="controls_if" id="ky?;Yu$DfEte_#3*tvPd">
                                                <mutation elseif="1"></mutation>
                                                <value name="IF0">
                                                  <block type="logic_compare" id="?K3+%V^O*ZC-;0dcAw$0">
                                                    <field name="OP">EQ</field>
                                                    <value name="A">
                                                      <block type="get_value" id="ySHyofPRYZBU+N0-h,1w">
                                                        <field name="ATTR">val</field>
                                                        <field name="OID">VirtuelleGeräte.0.Gartensteuerung.Pumpenzeit</field>
                                                      </block>
                                                    </value>
                                                    <value name="B">
                                                      <block type="logic_boolean" id="4d~,k5O5=/oGP@sx$JC8">
                                                        <field name="BOOL">TRUE</field>
                                                      </block>
                                                    </value>
                                                  </block>
                                                </value>
                                                <statement name="DO0">
                                                  <block type="request" id="Z(SKmwoPok*/Z]PZ$!K}">
                                                    <mutation with_statement="false"></mutation>
                                                    <field name="WITH_STATEMENT">FALSE</field>
                                                    <field name="LOG"></field>
                                                    <value name="URL">
                                                      <shadow type="text" id="$~xIkveEMstP1W;evJ3-">
                                                        <field name="TEXT">http://192.168.178.78/control?cmd=Gpio,23,0</field>
                                                      </shadow>
                                                    </value>
                                                  </block>
                                                </statement>
                                                <value name="IF1">
                                                  <block type="logic_compare" id="L:nHVpaw1e}guok]{JB1">
                                                    <field name="OP">EQ</field>
                                                    <value name="A">
                                                      <block type="get_value" id=",jRoI7#-LE4J=g*1NTy?">
                                                        <field name="ATTR">val</field>
                                                        <field name="OID">VirtuelleGeräte.0.Gartensteuerung.Pumpenzeit</field>
                                                      </block>
                                                    </value>
                                                    <value name="B">
                                                      <block type="logic_boolean" id="1h,J[$O}J2DwE.mdVG03">
                                                        <field name="BOOL">FALSE</field>
                                                      </block>
                                                    </value>
                                                  </block>
                                                </value>
                                                <statement name="DO1">
                                                  <block type="request" id="wMOHL6v`E,tTt!w0dACO">
                                                    <mutation with_statement="false"></mutation>
                                                    <field name="WITH_STATEMENT">FALSE</field>
                                                    <field name="LOG"></field>
                                                    <value name="URL">
                                                      <shadow type="text" id="WPP-HQxvDSN=/($`X.t_">
                                                        <field name="TEXT">http://192.168.178.78/control?cmd=Gpio,23,1</field>
                                                      </shadow>
                                                    </value>
                                                  </block>
                                                </statement>
                                              </block>
                                            </statement>
                                          </block>
                                        </xml>
                                        
                                        1 Reply Last reply Reply Quote 0
                                        • First post
                                          Last post

                                        Support us

                                        ioBroker
                                        Community Adapters
                                        Donate

                                        705
                                        Online

                                        31.7k
                                        Users

                                        79.8k
                                        Topics

                                        1.3m
                                        Posts

                                        4
                                        18
                                        837
                                        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