Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. mqtt-Power Limit über Blockly

    NEWS

    • Wir empfehlen: Node.js 22.x

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker goes Matter ... Matter Adapter in Stable

    mqtt-Power Limit über Blockly

    This topic has been deleted. Only users with topic management privileges can see it.
    • K
      knopers1 @Homoran last edited by

      @homoran sorry, ich bemühe mich weiter.... 😁
      Ist jetzt die Über/Unterschreitung der Entscheidungsgrenze passend gesetzt, so dass der Wert für Leistungslimit nicht jedes mal neu geschrieben wird?

      7.png

      <xml xmlns="https://developers.google.com/blockly/xml">
        <block type="on" id="G(hXlntz~E?zMmfAf;T8" x="-137" y="-612">
          <field name="OID">mqtt.0.openDTUonBattery.victron.HQ2410QUPQE.PPV</field>
          <field name="CONDITION">ne</field>
          <field name="ACK_CONDITION"></field>
          <statement name="STATEMENT">
            <block type="controls_if" id="s[R-}avHMlL2CvPO2/vL">
              <mutation elseif="1"></mutation>
              <value name="IF0">
                <block type="logic_multi_and" id="5La4dN}DmcNVR^B(T_16">
                  <mutation xmlns="http://www.w3.org/1999/xhtml" items="2"></mutation>
                  <value name="AND0">
                    <block type="logic_compare" id="@Y8!ScK}ilH:K@n`.T=M">
                      <field name="OP">GT</field>
                      <value name="A">
                        <block type="get_value" id="S7V`Rre69N18)?K?pAn`">
                          <field name="ATTR">val</field>
                          <field name="OID">mqtt.0.openDTUonBattery.victron.HQ2410QUPQE.PPV</field>
                        </block>
                      </value>
                      <value name="B">
                        <block type="math_number" id="o2peKYobd?+[T;fX*0=l">
                          <field name="NUM">500</field>
                        </block>
                      </value>
                    </block>
                  </value>
                  <value name="AND1">
                    <block type="logic_compare" id="6GOJGx@]xZ;*ViaH8.S`">
                      <field name="OP">LT</field>
                      <value name="A">
                        <block type="get_value" id="M+DF@@O$Zwu@BqTzm}mH">
                          <field name="ATTR">val</field>
                          <field name="OID">mqtt.0.openDTUonBattery.victron.HQ2410QUPQE.PPV</field>
                        </block>
                      </value>
                      <value name="B">
                        <block type="math_number" id="-X%461Ai;2pzD|m%E/N!">
                          <field name="NUM">300</field>
                        </block>
                      </value>
                    </block>
                  </value>
                </block>
              </value>
              <statement name="DO0">
                <block type="control" id="_*^K^LTE*=P{CK?5@MS3">
                  <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                  <field name="OID">mqtt.0.openDTUonBattery.powerlimiter.cmd.upper_power_limit</field>
                  <field name="WITH_DELAY">FALSE</field>
                  <value name="VALUE">
                    <block type="math_number" id="OtaozD[sVYi}oJ01RT/^">
                      <field name="NUM">500</field>
                    </block>
                  </value>
                </block>
              </statement>
              <value name="IF1">
                <block type="logic_compare" id=":M!mg*tJ_[0;e6BMlI1!">
                  <field name="OP">LT</field>
                  <value name="A">
                    <block type="get_value" id="6/ELkSjnpF{?N$2)*Od^">
                      <field name="ATTR">val</field>
                      <field name="OID">mqtt.0.openDTUonBattery.victron.HQ2410QUPQE.PPV</field>
                    </block>
                  </value>
                  <value name="B">
                    <block type="math_number" id="lo^v]NR(#_/90)I;r%EA">
                      <field name="NUM">300</field>
                    </block>
                  </value>
                </block>
              </value>
              <statement name="DO1">
                <block type="control" id="u~Zy6dW$x4%B$5%ib=09">
                  <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                  <field name="OID">mqtt.0.openDTUonBattery.powerlimiter.cmd.upper_power_limit</field>
                  <field name="WITH_DELAY">FALSE</field>
                  <value name="VALUE">
                    <block type="math_number" id="%]g7]`J2fB4R.$QUOx]F">
                      <field name="NUM">300</field>
                    </block>
                  </value>
                </block>
              </statement>
            </block>
          </statement>
        </block>
      </xml>
      
      <xml xmlns="https://developers.google.com/blockly/xml">
        <block type="on" id="G(hXlntz~E?zMmfAf;T8" x="-137" y="-612">
          <field name="OID">mqtt.0.openDTUonBattery.victron.HQ2410QUPQE.PPV</field>
          <field name="CONDITION">ne</field>
          <field name="ACK_CONDITION"></field>
          <statement name="STATEMENT">
            <block type="controls_if" id="s[R-}avHMlL2CvPO2/vL">
              <mutation elseif="1"></mutation>
              <value name="IF0">
                <block type="logic_multi_and" id="5La4dN}DmcNVR^B(T_16">
                  <mutation xmlns="http://www.w3.org/1999/xhtml" items="2"></mutation>
                  <value name="AND0">
                    <block type="logic_compare" id="@Y8!ScK}ilH:K@n`.T=M">
                      <field name="OP">GT</field>
                      <value name="A">
                        <block type="get_value" id="S7V`Rre69N18)?K?pAn`">
                          <field name="ATTR">val</field>
                          <field name="OID">mqtt.0.openDTUonBattery.victron.HQ2410QUPQE.PPV</field>
                        </block>
                      </value>
                      <value name="B">
                        <block type="math_number" id="o2peKYobd?+[T;fX*0=l">
                          <field name="NUM">500</field>
                        </block>
                      </value>
                    </block>
                  </value>
                  <value name="AND1">
                    <block type="logic_compare" id="6GOJGx@]xZ;*ViaH8.S`">
                      <field name="OP">LT</field>
                      <value name="A">
                        <block type="get_value" id="M+DF@@O$Zwu@BqTzm}mH">
                          <field name="ATTR">val</field>
                          <field name="OID">mqtt.0.openDTUonBattery.victron.HQ2410QUPQE.PPV</field>
                        </block>
                      </value>
                      <value name="B">
                        <block type="math_number" id="-X%461Ai;2pzD|m%E/N!">
                          <field name="NUM">300</field>
                        </block>
                      </value>
                    </block>
                  </value>
                </block>
              </value>
              <statement name="DO0">
                <block type="control" id="_*^K^LTE*=P{CK?5@MS3">
                  <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                  <field name="OID">mqtt.0.openDTUonBattery.powerlimiter.cmd.upper_power_limit</field>
                  <field name="WITH_DELAY">FALSE</field>
                  <value name="VALUE">
                    <block type="math_number" id="OtaozD[sVYi}oJ01RT/^">
                      <field name="NUM">500</field>
                    </block>
                  </value>
                </block>
              </statement>
              <value name="IF1">
                <block type="logic_compare" id=":M!mg*tJ_[0;e6BMlI1!">
                  <field name="OP">LT</field>
                  <value name="A">
                    <block type="get_value" id="6/ELkSjnpF{?N$2)*Od^">
                      <field name="ATTR">val</field>
                      <field name="OID">mqtt.0.openDTUonBattery.victron.HQ2410QUPQE.PPV</field>
                    </block>
                  </value>
                  <value name="B">
                    <block type="math_number" id="lo^v]NR(#_/90)I;r%EA">
                      <field name="NUM">300</field>
                    </block>
                  </value>
                </block>
              </value>
              <statement name="DO1">
                <block type="control" id="u~Zy6dW$x4%B$5%ib=09">
                  <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                  <field name="OID">mqtt.0.openDTUonBattery.powerlimiter.cmd.upper_power_limit</field>
                  <field name="WITH_DELAY">FALSE</field>
                  <value name="VALUE">
                    <block type="math_number" id="%]g7]`J2fB4R.$QUOx]F">
                      <field name="NUM">300</field>
                    </block>
                  </value>
                </block>
              </statement>
            </block>
          </statement>
        </block>
      </xml>
      
      Homoran 1 Reply Last reply Reply Quote 0
      • Homoran
        Homoran Global Moderator Administrators @knopers1 last edited by

        @knopers1 sagte in mqtt-Power Limit über Blockly:

        ich bemühe mich weiter....

        weiss ich doch!

        @knopers1 sagte in mqtt-Power Limit über Blockly:

        Ist jetzt die Über/Unterschreitung der Entscheidungsgrenze passend gesetzt

        nein! >500 und <300 geht nicht zeitgleich.

        @knopers1 sagte in mqtt-Power Limit über Blockly:

        so dass der Wert für Leistungslimit nicht jedes mal neu geschrieben wird?

        das hat damit weniger zu tun.
        Du müsstest nur prüfen ob die gewünschte Stufe bereits läuft und nur wenn das nicht der Fall ist schreiben.

        K 1 Reply Last reply Reply Quote 0
        • K
          knopers1 @Homoran last edited by

          @homoran
          du forderst mich.. Ein paar Tipps wären nicht schlecht aber ... 😨
          Was hällst du davon?

          8.png

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

            @knopers1 sagte in mqtt-Power Limit über Blockly:

            du forderst mich.

            jepp!

            @knopers1 sagte in mqtt-Power Limit über Blockly:

            Ein paar Tipps wären nicht schlecht

            gerne.

            die Idee mit der Variable ist nicht schlecht!!!

            aber nimm noch mal
            trigger=victron
            falls victron > 500 UND limiter ungleich 500
            steuere mqtt mit 500
            sonstfalls victron < 300 und limiter ungleich 300
            steuere mqtt mit 300

            und statt wert von id victron nimmst du einfach den Baustein Wert aud dem Bereich Trigger

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

              Ich glaube, hier könnte ein bisschen Lesestoff nicht schaden:
              https://forum.iobroker.net/topic/70481/blockly-for-dummies-starthilfe-und-tipps

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

                @codierknecht sagte in mqtt-Power Limit über Blockly:

                Ich glaube, hier könnte ein bisschen Lesestoff nicht schaden:
                https://forum.iobroker.net/topic/70481/blockly-for-dummies-starthilfe-und-tipps

                aber erst später!

                im Moment haperts nicht wirklich am Blockly selbst

                K 1 Reply Last reply Reply Quote 1
                • K
                  knopers1 @Homoran last edited by knopers1

                  @homoran

                  puhh, es haperts an allem Männer 😂

                  9.png

                  K Codierknecht 2 Replies Last reply Reply Quote 0
                  • K
                    knopers1 @knopers1 last edited by

                    @Homoran

                    benötige deine Meinung 😁 😁

                    1 Reply Last reply Reply Quote 0
                    • Codierknecht
                      Codierknecht Developer Most Active @knopers1 last edited by

                      @knopers1
                      Du hast das UND überlesen.

                      cbb9b436-384a-4630-9851-33cf6800b15c-grafik.png

                      K 1 Reply Last reply Reply Quote 1
                      • K
                        knopers1 @Codierknecht last edited by

                        @codierknecht
                        danke Dir sehr.... Ist es jetzt so okay?
                        11.png

                        Codierknecht Homoran 2 Replies Last reply Reply Quote 0
                        • Codierknecht
                          Codierknecht Developer Most Active @knopers1 last edited by

                          @knopers1
                          Nicht ganz. Es fehlt im jeweiligen Block noch ein "setze Limit auf ...", damit die Prüfung auch Sinn macht.
                          Aktuell wird die Variable ja nur 1x beim Start des Script gesetzt.

                          73f7b0cc-a1e8-40a2-8d32-12aafcae7fcd-image.png

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

                            @knopers1 sagte in mqtt-Power Limit über Blockly:

                            @codierknecht
                            danke Dir sehr.... Ist es jetzt so okay?
                            11.png

                            nein, das setze auf wird nur bei Skriptstart gesetzt.

                            Entweder separater Trigger auf das limit auf Änderung und dann den Block,

                            oder in dem falls und sonstfalls einfach setze limit auf 300 bzw 500

                            K 1 Reply Last reply Reply Quote 1
                            • K
                              knopers1 @Homoran last edited by

                              @homoran @Codierknecht

                              besten Dank für euere Hilfe! das Script läuft natürlich. Ich werde mir etwas von dem Lesestoff oben verlinkt durchlesen... Man macht es so sporadisch, deshalb ist es so schwer mir jedenfalls ein Script selbst zu erstellen. Besten Dank nochmal 👍

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

                              Support us

                              ioBroker
                              Community Adapters
                              Donate

                              871
                              Online

                              32.0k
                              Users

                              80.4k
                              Topics

                              1.3m
                              Posts

                              3
                              25
                              1156
                              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