Skip to content
  • Home
  • Recent
  • Tags
  • 0 Unread 0
  • Categories
  • Unreplied
  • Popular
  • 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

  • Default (No Skin)
  • No Skin
Collapse
ioBroker Logo

Community Forum

donate donate
  1. ioBroker Community Home
  2. Deutsch
  3. Skripten / Logik
  4. Blockly
  5. Motorsteuerung

NEWS

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

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

  • Weihnachtsangebot 2025! 🎄
    BluefoxB
    Bluefox
    25
    1
    2.4k

Motorsteuerung

Scheduled Pinned Locked Moved Blockly
7 Posts 3 Posters 284 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Caveman2020
    wrote on last edited by
    #1

    Hallo geehrte Gemeinde. Vermutlich stelle ich mich wieder zu doof an.
    Wollte eine Getriebemotor über trigger ansteuern, das script soll nur einmal ausgeführt werden, egal wie lange der trigger anliegt.
    Meine Lösung funktioniert nur leider nicht wie gewünscht, wird wiederholt ausgeführt.
    Wenn als jemand einen Denkanstoss für mich hat, wäre ich dankbar.

    <xml xmlns="https://developers.google.com/blockly/xml">
      <variables>
        <variable type="timeout" id="timeout">timeout</variable>
      </variables>
      <block type="on_ext" id="|9EAo{H4p*Pyrzo(WvHb" x="13" y="-612">
        <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
        <field name="CONDITION">false</field>
        <field name="ACK_CONDITION"></field>
        <value name="OID0">
          <shadow type="field_oid" id="F.(9T~tyofsH4ep6q;ru">
            <field name="oid">sonoff.0.Badezimmer.POWER</field>
          </shadow>
        </value>
        <statement name="STATEMENT">
          <block type="controls_repeat_ext" id="o3eE(3uJCz`8!USdR,f?">
            <value name="TIMES">
              <shadow type="math_number" id="v6BT]x[/.O~yjEdj$=Qc">
                <field name="NUM">1</field>
              </shadow>
            </value>
            <statement name="DO">
              <block type="request" id=":o{v`w@S:}f2?(zgZdPI">
                <mutation xmlns="http://www.w3.org/1999/xhtml" with_statement="true"></mutation>
                <field name="WITH_STATEMENT">TRUE</field>
                <field name="LOG">log</field>
                <value name="URL">
                  <shadow type="text" id="|E;?QLtpK`?AV`ibxR|1">
                    <field name="TEXT">http://192.168.178.63/control?cmd=LolinMotorShieldCMD,0,backward,50 </field>
                  </shadow>
                </value>
                <next>
                  <block type="timeouts_settimeout" id="!uzm3TRrd+|E#v?Uyjcj">
                    <field name="NAME">timeout</field>
                    <field name="DELAY">10</field>
                    <field name="UNIT">sec</field>
                    <statement name="STATEMENT">
                      <block type="request" id=",dCw$lU)V6!=qCy)l.m}">
                        <mutation xmlns="http://www.w3.org/1999/xhtml" with_statement="true"></mutation>
                        <field name="WITH_STATEMENT">TRUE</field>
                        <field name="LOG">log</field>
                        <value name="URL">
                          <shadow type="text" id="q,LQ3;P$U@_M!bvKh}$y">
                            <field name="TEXT">http://192.168.178.63/control?cmd=LolinMotorShieldCMD,0,stop</field>
                          </shadow>
                        </value>
                      </block>
                    </statement>
                    <next>
                      <block type="controls_flow_statements" id="P?U]s11q/=o}u_PI7vHs">
                        <field name="FLOW">BREAK</field>
                      </block>
                    </next>
                  </block>
                </next>
              </block>
            </statement>
          </block>
        </statement>
      </block>
    </xml>
    

    (ist ein Blockly-Script)

    sigi234S C paul53P 3 Replies Last reply
    0
    • C Caveman2020

      Hallo geehrte Gemeinde. Vermutlich stelle ich mich wieder zu doof an.
      Wollte eine Getriebemotor über trigger ansteuern, das script soll nur einmal ausgeführt werden, egal wie lange der trigger anliegt.
      Meine Lösung funktioniert nur leider nicht wie gewünscht, wird wiederholt ausgeführt.
      Wenn als jemand einen Denkanstoss für mich hat, wäre ich dankbar.

      <xml xmlns="https://developers.google.com/blockly/xml">
        <variables>
          <variable type="timeout" id="timeout">timeout</variable>
        </variables>
        <block type="on_ext" id="|9EAo{H4p*Pyrzo(WvHb" x="13" y="-612">
          <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
          <field name="CONDITION">false</field>
          <field name="ACK_CONDITION"></field>
          <value name="OID0">
            <shadow type="field_oid" id="F.(9T~tyofsH4ep6q;ru">
              <field name="oid">sonoff.0.Badezimmer.POWER</field>
            </shadow>
          </value>
          <statement name="STATEMENT">
            <block type="controls_repeat_ext" id="o3eE(3uJCz`8!USdR,f?">
              <value name="TIMES">
                <shadow type="math_number" id="v6BT]x[/.O~yjEdj$=Qc">
                  <field name="NUM">1</field>
                </shadow>
              </value>
              <statement name="DO">
                <block type="request" id=":o{v`w@S:}f2?(zgZdPI">
                  <mutation xmlns="http://www.w3.org/1999/xhtml" with_statement="true"></mutation>
                  <field name="WITH_STATEMENT">TRUE</field>
                  <field name="LOG">log</field>
                  <value name="URL">
                    <shadow type="text" id="|E;?QLtpK`?AV`ibxR|1">
                      <field name="TEXT">http://192.168.178.63/control?cmd=LolinMotorShieldCMD,0,backward,50 </field>
                    </shadow>
                  </value>
                  <next>
                    <block type="timeouts_settimeout" id="!uzm3TRrd+|E#v?Uyjcj">
                      <field name="NAME">timeout</field>
                      <field name="DELAY">10</field>
                      <field name="UNIT">sec</field>
                      <statement name="STATEMENT">
                        <block type="request" id=",dCw$lU)V6!=qCy)l.m}">
                          <mutation xmlns="http://www.w3.org/1999/xhtml" with_statement="true"></mutation>
                          <field name="WITH_STATEMENT">TRUE</field>
                          <field name="LOG">log</field>
                          <value name="URL">
                            <shadow type="text" id="q,LQ3;P$U@_M!bvKh}$y">
                              <field name="TEXT">http://192.168.178.63/control?cmd=LolinMotorShieldCMD,0,stop</field>
                            </shadow>
                          </value>
                        </block>
                      </statement>
                      <next>
                        <block type="controls_flow_statements" id="P?U]s11q/=o}u_PI7vHs">
                          <field name="FLOW">BREAK</field>
                        </block>
                      </next>
                    </block>
                  </next>
                </block>
              </statement>
            </block>
          </statement>
        </block>
      </xml>
      

      (ist ein Blockly-Script)

      sigi234S Online
      sigi234S Online
      sigi234
      Forum Testing Most Active
      wrote on last edited by
      #2

      @caveman2020

      Screenshot vom Blockly wäre auch interessant.

      Bitte benutzt das Voting rechts unten im Beitrag wenn er euch geholfen hat.
      Immer Daten sichern!

      1 Reply Last reply
      0
      • C Caveman2020

        Hallo geehrte Gemeinde. Vermutlich stelle ich mich wieder zu doof an.
        Wollte eine Getriebemotor über trigger ansteuern, das script soll nur einmal ausgeführt werden, egal wie lange der trigger anliegt.
        Meine Lösung funktioniert nur leider nicht wie gewünscht, wird wiederholt ausgeführt.
        Wenn als jemand einen Denkanstoss für mich hat, wäre ich dankbar.

        <xml xmlns="https://developers.google.com/blockly/xml">
          <variables>
            <variable type="timeout" id="timeout">timeout</variable>
          </variables>
          <block type="on_ext" id="|9EAo{H4p*Pyrzo(WvHb" x="13" y="-612">
            <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
            <field name="CONDITION">false</field>
            <field name="ACK_CONDITION"></field>
            <value name="OID0">
              <shadow type="field_oid" id="F.(9T~tyofsH4ep6q;ru">
                <field name="oid">sonoff.0.Badezimmer.POWER</field>
              </shadow>
            </value>
            <statement name="STATEMENT">
              <block type="controls_repeat_ext" id="o3eE(3uJCz`8!USdR,f?">
                <value name="TIMES">
                  <shadow type="math_number" id="v6BT]x[/.O~yjEdj$=Qc">
                    <field name="NUM">1</field>
                  </shadow>
                </value>
                <statement name="DO">
                  <block type="request" id=":o{v`w@S:}f2?(zgZdPI">
                    <mutation xmlns="http://www.w3.org/1999/xhtml" with_statement="true"></mutation>
                    <field name="WITH_STATEMENT">TRUE</field>
                    <field name="LOG">log</field>
                    <value name="URL">
                      <shadow type="text" id="|E;?QLtpK`?AV`ibxR|1">
                        <field name="TEXT">http://192.168.178.63/control?cmd=LolinMotorShieldCMD,0,backward,50 </field>
                      </shadow>
                    </value>
                    <next>
                      <block type="timeouts_settimeout" id="!uzm3TRrd+|E#v?Uyjcj">
                        <field name="NAME">timeout</field>
                        <field name="DELAY">10</field>
                        <field name="UNIT">sec</field>
                        <statement name="STATEMENT">
                          <block type="request" id=",dCw$lU)V6!=qCy)l.m}">
                            <mutation xmlns="http://www.w3.org/1999/xhtml" with_statement="true"></mutation>
                            <field name="WITH_STATEMENT">TRUE</field>
                            <field name="LOG">log</field>
                            <value name="URL">
                              <shadow type="text" id="q,LQ3;P$U@_M!bvKh}$y">
                                <field name="TEXT">http://192.168.178.63/control?cmd=LolinMotorShieldCMD,0,stop</field>
                              </shadow>
                            </value>
                          </block>
                        </statement>
                        <next>
                          <block type="controls_flow_statements" id="P?U]s11q/=o}u_PI7vHs">
                            <field name="FLOW">BREAK</field>
                          </block>
                        </next>
                      </block>
                    </next>
                  </block>
                </statement>
              </block>
            </statement>
          </block>
        </xml>
        

        (ist ein Blockly-Script)

        C Offline
        C Offline
        Caveman2020
        wrote on last edited by
        #3

        @caveman2020 Motorsteuerung.png

        1 Reply Last reply
        0
        • C Caveman2020

          Hallo geehrte Gemeinde. Vermutlich stelle ich mich wieder zu doof an.
          Wollte eine Getriebemotor über trigger ansteuern, das script soll nur einmal ausgeführt werden, egal wie lange der trigger anliegt.
          Meine Lösung funktioniert nur leider nicht wie gewünscht, wird wiederholt ausgeführt.
          Wenn als jemand einen Denkanstoss für mich hat, wäre ich dankbar.

          <xml xmlns="https://developers.google.com/blockly/xml">
            <variables>
              <variable type="timeout" id="timeout">timeout</variable>
            </variables>
            <block type="on_ext" id="|9EAo{H4p*Pyrzo(WvHb" x="13" y="-612">
              <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
              <field name="CONDITION">false</field>
              <field name="ACK_CONDITION"></field>
              <value name="OID0">
                <shadow type="field_oid" id="F.(9T~tyofsH4ep6q;ru">
                  <field name="oid">sonoff.0.Badezimmer.POWER</field>
                </shadow>
              </value>
              <statement name="STATEMENT">
                <block type="controls_repeat_ext" id="o3eE(3uJCz`8!USdR,f?">
                  <value name="TIMES">
                    <shadow type="math_number" id="v6BT]x[/.O~yjEdj$=Qc">
                      <field name="NUM">1</field>
                    </shadow>
                  </value>
                  <statement name="DO">
                    <block type="request" id=":o{v`w@S:}f2?(zgZdPI">
                      <mutation xmlns="http://www.w3.org/1999/xhtml" with_statement="true"></mutation>
                      <field name="WITH_STATEMENT">TRUE</field>
                      <field name="LOG">log</field>
                      <value name="URL">
                        <shadow type="text" id="|E;?QLtpK`?AV`ibxR|1">
                          <field name="TEXT">http://192.168.178.63/control?cmd=LolinMotorShieldCMD,0,backward,50 </field>
                        </shadow>
                      </value>
                      <next>
                        <block type="timeouts_settimeout" id="!uzm3TRrd+|E#v?Uyjcj">
                          <field name="NAME">timeout</field>
                          <field name="DELAY">10</field>
                          <field name="UNIT">sec</field>
                          <statement name="STATEMENT">
                            <block type="request" id=",dCw$lU)V6!=qCy)l.m}">
                              <mutation xmlns="http://www.w3.org/1999/xhtml" with_statement="true"></mutation>
                              <field name="WITH_STATEMENT">TRUE</field>
                              <field name="LOG">log</field>
                              <value name="URL">
                                <shadow type="text" id="q,LQ3;P$U@_M!bvKh}$y">
                                  <field name="TEXT">http://192.168.178.63/control?cmd=LolinMotorShieldCMD,0,stop</field>
                                </shadow>
                              </value>
                            </block>
                          </statement>
                          <next>
                            <block type="controls_flow_statements" id="P?U]s11q/=o}u_PI7vHs">
                              <field name="FLOW">BREAK</field>
                            </block>
                          </next>
                        </block>
                      </next>
                    </block>
                  </statement>
                </block>
              </statement>
            </block>
          </xml>
          

          (ist ein Blockly-Script)

          paul53P Offline
          paul53P Offline
          paul53
          wrote on last edited by paul53
          #4

          @caveman2020 sagte: wird wiederholt ausgeführt.

          Ändere mal den Trigger auf "ist kleiner als letztes" und entferne die sinnlose Schleife.

          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

          C 1 Reply Last reply
          0
          • paul53P paul53

            @caveman2020 sagte: wird wiederholt ausgeführt.

            Ändere mal den Trigger auf "ist kleiner als letztes" und entferne die sinnlose Schleife.

            C Offline
            C Offline
            Caveman2020
            wrote on last edited by
            #5

            @paul53 Habe die Änderung vorgenommen, funktioniert. Vielleicht ist mein Verständnis beschränkt, aber warum fünktioniert das auf diese Weise ?
            Danke für die Hilfe

            C 1 Reply Last reply
            0
            • C Caveman2020

              @paul53 Habe die Änderung vorgenommen, funktioniert. Vielleicht ist mein Verständnis beschränkt, aber warum fünktioniert das auf diese Weise ?
              Danke für die Hilfe

              C Offline
              C Offline
              Caveman2020
              wrote on last edited by
              #6

              @caveman2020 Hallo geehrte Gemeinde,
              ich habe folgendes Script überarbeitet (vielen Dank nochmal für die Hilfe).
              Motorscript.jpg

              Die Angaben im URL Request sehen wie folgt aus

              http://192.168.178.63/control?cmd=LolinMotorShieldCMD,0,forward,50

              Wie könnte ich das Script um eine Variable erweitern, die eine Laufzeit aus einem Widget ( Zahlenwert zwischen 0-100) erzeugt.

              leider habe ich bisher keine wirkliche Lösung gesehen, den wert an den Timeout-Block zu übergeben.

              Vielen Dank für eure Tipps.

              paul53P 1 Reply Last reply
              0
              • C Caveman2020

                @caveman2020 Hallo geehrte Gemeinde,
                ich habe folgendes Script überarbeitet (vielen Dank nochmal für die Hilfe).
                Motorscript.jpg

                Die Angaben im URL Request sehen wie folgt aus

                http://192.168.178.63/control?cmd=LolinMotorShieldCMD,0,forward,50

                Wie könnte ich das Script um eine Variable erweitern, die eine Laufzeit aus einem Widget ( Zahlenwert zwischen 0-100) erzeugt.

                leider habe ich bisher keine wirkliche Lösung gesehen, den wert an den Timeout-Block zu übergeben.

                Vielen Dank für eure Tipps.

                paul53P Offline
                paul53P Offline
                paul53
                wrote on last edited by
                #7

                @caveman2020 sagte: Script um eine Variable erweitern, die eine Laufzeit aus einem Widget ( Zahlenwert zwischen 0-100) erzeugt.

                Bild_2021-04-05_141831.png

                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

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                Support us

                ioBroker
                Community Adapters
                Donate

                759

                Online

                32.7k

                Users

                82.3k

                Topics

                1.3m

                Posts
                Community
                Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen | Einwilligungseinstellungen
                ioBroker Community 2014-2025
                logo
                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Home
                • Recent
                • Tags
                • Unread 0
                • Categories
                • Unreplied
                • Popular
                • GitHub
                • Docu
                • Hilfe