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. ioBroker Allgemein
  4. [Frage] Realisierung Adapter UDP Keba Wallbox

NEWS

  • Monatsrückblick Januar/Februar 2026 ist online!
    BluefoxB
    Bluefox
    16
    1
    320

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

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

[Frage] Realisierung Adapter UDP Keba Wallbox

Scheduled Pinned Locked Moved ioBroker Allgemein
1.3k Posts 70 Posters 473.5k Views 54 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.
  • G gto

    @sneak-l8 Die Phasenlage habe ich heute überprüft, sie ist bei beiden Boxen und beim Zähler ident.
    Ich denke aber dass eine Programmierung gar kein so großer Aufwand ist und auch allgemein funktioniert. Die Idee kam mir von den Einstellmöglichkeiten der P30x. Diese könnte ja die Last regeln, allerdings wird kein Akku wie in deinem Adapter unterstützt, weshalb das nicht nutzbar ist.
    Bei der Keba gibt man als Limit die Ampere der Hauptzählersicherung/Phase an. Vom Wechselrichter kommen die Phasenwerte, diese kann ich mit dem Froniusadapter auch auslesen und als State im Adapter einbinden. Das wären dann die 3 Zählerwerte aus denen sich die Absenkung der Ladeleistung durch den Adapter ergäbe.
    Ich kann mich natürlich auch an einem Script versuchen.

    Blockly ist fertig, falls es jemand benötigt
    Ich rechne von der Phasenlast die geregelte Wallbox weg, ermittle die stärkst belastete Phase und setze die noch möglichen mA ins Current Limit

    <xml xmlns="https://developers.google.com/blockly/xml">
      <variables>
        <variable id="MU8;yslk(B7(Tv%sqWM=">Phasenlimit in A</variable>
        <variable id="9_y3TZ-b(n~=;KGQMbHy">Phase 1 ohne Wallbox</variable>
        <variable id="s,uBvtT+|q{)6)SO_[Md">Phase 2 ohne Wallbox</variable>
        <variable id="B8u[OZEOXEt|YkNhgOxu">Phase 3 ohne Wallbox</variable>
        <variable id="14Q~A%n3eqx=_.wh9IJo">Phase max A</variable>
        <variable id=".vhe63pLski-nVvGA3*.">Phase max mA</variable>
      </variables>
      <block type="variables_set" id="E*Vu$_+fuxrGm/d:dGi#" x="265" y="-408">
        <field name="VAR" id="MU8;yslk(B7(Tv%sqWM=">Phasenlimit in A</field>
        <value name="VALUE">
          <block type="math_number" id="gqLBcLSd@@Snb8KlaVTx">
            <field name="NUM">32</field>
          </block>
        </value>
        <next>
          <block type="on_ext" id="2s[RmVP})1RW}8|l/6pN">
            <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="$s?)jmdJ!-uBN2*Q%ez]">
                <field name="oid">fronius.1.meter.0.Current_AC_Sum</field>
              </shadow>
            </value>
            <statement name="STATEMENT">
              <block type="comment" id="xrjTG/oCpXmHLZ2_%Xek">
                <field name="COMMENT">Phasenlast ohne Wallbox</field>
                <next>
                  <block type="variables_set" id="2UprYF$bz9vpLCV#O;W}">
                    <field name="VAR" id="9_y3TZ-b(n~=;KGQMbHy">Phase 1 ohne Wallbox</field>
                    <value name="VALUE">
                      <block type="math_arithmetic" id="/6Na./,HDWbDa%UzOC1v">
                        <field name="OP">MINUS</field>
                        <value name="A">
                          <shadow type="math_number" id="l?cH+*JFd_5keBns9P{y">
                            <field name="NUM">1</field>
                          </shadow>
                          <block type="get_value" id="ow$Xn02]:Vt{wT;tLX%$">
                            <field name="ATTR">val</field>
                            <field name="OID">fronius.1.meter.0.Current_AC_Phase_1</field>
                          </block>
                        </value>
                        <value name="B">
                          <shadow type="math_number" id="$V4TOE]`|(kA]v;^+:rO">
                            <field name="NUM">3</field>
                          </shadow>
                          <block type="math_arithmetic" id="~Q0)S2hCNGGR@VhsGa#Q">
                            <field name="OP">DIVIDE</field>
                            <value name="A">
                              <shadow type="math_number" id="#Wt81FmAbdWGGZ~D/@}_">
                                <field name="NUM">1</field>
                              </shadow>
                              <block type="get_value" id="R#(k#VwX{#hy;i{0)]Aw">
                                <field name="ATTR">val</field>
                                <field name="OID">kecontact.0.i1</field>
                              </block>
                            </value>
                            <value name="B">
                              <shadow type="math_number" id="gKnZ{b*!^n~1k.9~12fk">
                                <field name="NUM">1000</field>
                              </shadow>
                            </value>
                          </block>
                        </value>
                      </block>
                    </value>
                    <next>
                      <block type="variables_set" id="D.i|*TV`Y/6lhWWx^UFo">
                        <field name="VAR" id="s,uBvtT+|q{)6)SO_[Md">Phase 2 ohne Wallbox</field>
                        <value name="VALUE">
                          <block type="math_arithmetic" id="+0nK1=4Hs^BJTJX`)p^s">
                            <field name="OP">MINUS</field>
                            <value name="A">
                              <shadow type="math_number" id="l?cH+*JFd_5keBns9P{y">
                                <field name="NUM">1</field>
                              </shadow>
                              <block type="get_value" id="=bdn8.dOaSZs.tZ]bWRk">
                                <field name="ATTR">val</field>
                                <field name="OID">fronius.1.meter.0.Current_AC_Phase_2</field>
                              </block>
                            </value>
                            <value name="B">
                              <shadow type="math_number" id="Conwu{[UvbZ_o?[ZFzA0">
                                <field name="NUM">3</field>
                              </shadow>
                              <block type="math_arithmetic" id="KsyRcEjnv~D,aT.AaO(5">
                                <field name="OP">DIVIDE</field>
                                <value name="A">
                                  <shadow type="math_number" id="#Wt81FmAbdWGGZ~D/@}_">
                                    <field name="NUM">1</field>
                                  </shadow>
                                  <block type="get_value" id="[cc,kYI6Si:@4GdT$acO">
                                    <field name="ATTR">val</field>
                                    <field name="OID">kecontact.0.i2</field>
                                  </block>
                                </value>
                                <value name="B">
                                  <shadow type="math_number" id="YH/lJN3,!RZM+Lk~RJ6+">
                                    <field name="NUM">1000</field>
                                  </shadow>
                                </value>
                              </block>
                            </value>
                          </block>
                        </value>
                        <next>
                          <block type="variables_set" id="iIiN8[BO)GhwT=D#4r8h">
                            <field name="VAR" id="B8u[OZEOXEt|YkNhgOxu">Phase 3 ohne Wallbox</field>
                            <value name="VALUE">
                              <block type="math_arithmetic" id="OL[0m(n6SBGsa@jf|#wv">
                                <field name="OP">MINUS</field>
                                <value name="A">
                                  <shadow type="math_number" id="l?cH+*JFd_5keBns9P{y">
                                    <field name="NUM">1</field>
                                  </shadow>
                                  <block type="get_value" id="p5he[kz$J=zaKte5tC}:">
                                    <field name="ATTR">val</field>
                                    <field name="OID">fronius.1.meter.0.Current_AC_Phase_3</field>
                                  </block>
                                </value>
                                <value name="B">
                                  <shadow type="math_number" id="#OBc2iu6EB0f-6h,DIF^">
                                    <field name="NUM">3</field>
                                  </shadow>
                                  <block type="math_arithmetic" id="a$t$272mdh,L.a:xV.5C">
                                    <field name="OP">DIVIDE</field>
                                    <value name="A">
                                      <shadow type="math_number" id="#Wt81FmAbdWGGZ~D/@}_">
                                        <field name="NUM">1</field>
                                      </shadow>
                                      <block type="get_value" id="fmfn5=3Y64QnYFXSwwKG">
                                        <field name="ATTR">val</field>
                                        <field name="OID">kecontact.0.i3</field>
                                      </block>
                                    </value>
                                    <value name="B">
                                      <shadow type="math_number" id="gXLT*%!OJ=zY2~r=hu1}">
                                        <field name="NUM">1000</field>
                                      </shadow>
                                    </value>
                                  </block>
                                </value>
                              </block>
                            </value>
                            <next>
                              <block type="comment" id="nW_R=QRFZ^Yqw==W)Z{M">
                                <field name="COMMENT">stärkste Phase ermitteln</field>
                                <next>
                                  <block type="controls_if" id="/^G/xAzqu$TM:N!uV/n[">
                                    <mutation elseif="2"></mutation>
                                    <value name="IF0">
                                      <block type="logic_operation" id="wSICv[-Q?lNdhP4dG-Q$">
                                        <field name="OP">AND</field>
                                        <value name="A">
                                          <block type="logic_compare" id="]GG#?||_/xhy^fdtD1C{">
                                            <field name="OP">GTE</field>
                                            <value name="A">
                                              <block type="variables_get" id="b(0n;E,_%o1^t:kg]e4|">
                                                <field name="VAR" id="9_y3TZ-b(n~=;KGQMbHy">Phase 1 ohne Wallbox</field>
                                              </block>
                                            </value>
                                            <value name="B">
                                              <block type="variables_get" id="[WOHI2)^!J^WiQx0`I+I">
                                                <field name="VAR" id="s,uBvtT+|q{)6)SO_[Md">Phase 2 ohne Wallbox</field>
                                              </block>
                                            </value>
                                          </block>
                                        </value>
                                        <value name="B">
                                          <block type="logic_compare" id="AS*pUWjhc6leZXY5q5-%">
                                            <field name="OP">GTE</field>
                                            <value name="A">
                                              <block type="variables_get" id="o#g6zHc*Mh._(wi1SLBy">
                                                <field name="VAR" id="9_y3TZ-b(n~=;KGQMbHy">Phase 1 ohne Wallbox</field>
                                              </block>
                                            </value>
                                            <value name="B">
                                              <block type="variables_get" id="i.*he3j0ou:r^j|6Poj!">
                                                <field name="VAR" id="B8u[OZEOXEt|YkNhgOxu">Phase 3 ohne Wallbox</field>
                                              </block>
                                            </value>
                                          </block>
                                        </value>
                                      </block>
                                    </value>
                                    <statement name="DO0">
                                      <block type="variables_set" id="%_OdKx+xAv*}-*3}U:|4">
                                        <field name="VAR" id="14Q~A%n3eqx=_.wh9IJo">Phase max A</field>
                                        <value name="VALUE">
                                          <block type="variables_get" id="0q|:3|_E+D;{pnf@x5R=">
                                            <field name="VAR" id="9_y3TZ-b(n~=;KGQMbHy">Phase 1 ohne Wallbox</field>
                                          </block>
                                        </value>
                                      </block>
                                    </statement>
                                    <value name="IF1">
                                      <block type="logic_operation" id="U7`L+VlDzN*;51c_6$7l">
                                        <field name="OP">AND</field>
                                        <value name="A">
                                          <block type="logic_compare" id="hU_%X:nvg-0OJ|SeFB+E">
                                            <field name="OP">GTE</field>
                                            <value name="A">
                                              <block type="variables_get" id=".qDGa`*fN{5.k?]p^r~m">
                                                <field name="VAR" id="s,uBvtT+|q{)6)SO_[Md">Phase 2 ohne Wallbox</field>
                                              </block>
                                            </value>
                                            <value name="B">
                                              <block type="variables_get" id="vuUI(Qt?{f_3v-R_(c)#">
                                                <field name="VAR" id="9_y3TZ-b(n~=;KGQMbHy">Phase 1 ohne Wallbox</field>
                                              </block>
                                            </value>
                                          </block>
                                        </value>
                                        <value name="B">
                                          <block type="logic_compare" id="WO^.MTn*u:FU?}Y6b~h(">
                                            <field name="OP">GTE</field>
                                            <value name="A">
                                              <block type="variables_get" id="VLac$(8TaK3oZYU!2lgJ">
                                                <field name="VAR" id="s,uBvtT+|q{)6)SO_[Md">Phase 2 ohne Wallbox</field>
                                              </block>
                                            </value>
                                            <value name="B">
                                              <block type="variables_get" id="/Aa0GKiIMG6J(ZP{]ix=">
                                                <field name="VAR" id="B8u[OZEOXEt|YkNhgOxu">Phase 3 ohne Wallbox</field>
                                              </block>
                                            </value>
                                          </block>
                                        </value>
                                      </block>
                                    </value>
                                    <statement name="DO1">
                                      <block type="variables_set" id=":8h6-wJ5|KIR.C25w/UI">
                                        <field name="VAR" id="14Q~A%n3eqx=_.wh9IJo">Phase max A</field>
                                        <value name="VALUE">
                                          <block type="variables_get" id="{/)M;fr,$]$Dhqk0;.1L">
                                            <field name="VAR" id="s,uBvtT+|q{)6)SO_[Md">Phase 2 ohne Wallbox</field>
                                          </block>
                                        </value>
                                      </block>
                                    </statement>
                                    <value name="IF2">
                                      <block type="logic_operation" id="/14}1=0y+?`9kmTKzYdv">
                                        <field name="OP">AND</field>
                                        <value name="A">
                                          <block type="logic_compare" id="Kr~e.)tYz1zg[08):aG7">
                                            <field name="OP">GTE</field>
                                            <value name="A">
                                              <block type="variables_get" id="^Z/?3/X]YpJ[rMFA=w:e">
                                                <field name="VAR" id="B8u[OZEOXEt|YkNhgOxu">Phase 3 ohne Wallbox</field>
                                              </block>
                                            </value>
                                            <value name="B">
                                              <block type="variables_get" id="TaU==ET,NVhb]qiW?-o|">
                                                <field name="VAR" id="9_y3TZ-b(n~=;KGQMbHy">Phase 1 ohne Wallbox</field>
                                              </block>
                                            </value>
                                          </block>
                                        </value>
                                        <value name="B">
                                          <block type="logic_compare" id="Z6=EoG0]ojqj$4SMUbO|">
                                            <field name="OP">GTE</field>
                                            <value name="A">
                                              <block type="variables_get" id="ru,1qkev|]W7{/;HCdNO">
                                                <field name="VAR" id="B8u[OZEOXEt|YkNhgOxu">Phase 3 ohne Wallbox</field>
                                              </block>
                                            </value>
                                            <value name="B">
                                              <block type="variables_get" id="OTSF];r%4ufAlNa((gk*">
                                                <field name="VAR" id="s,uBvtT+|q{)6)SO_[Md">Phase 2 ohne Wallbox</field>
                                              </block>
                                            </value>
                                          </block>
                                        </value>
                                      </block>
                                    </value>
                                    <statement name="DO2">
                                      <block type="variables_set" id="xPyPJ6N_Om]iYL3FQ!!?">
                                        <field name="VAR" id="14Q~A%n3eqx=_.wh9IJo">Phase max A</field>
                                        <value name="VALUE">
                                          <block type="variables_get" id="_xtu8qP#ax*0rD43u%0)">
                                            <field name="VAR" id="B8u[OZEOXEt|YkNhgOxu">Phase 3 ohne Wallbox</field>
                                          </block>
                                        </value>
                                      </block>
                                    </statement>
                                    <next>
                                      <block type="comment" id="BL#hsp^[T3;nI?SD$Crj">
                                        <field name="COMMENT">Berechnen, Runden und Umrechnen</field>
                                        <next>
                                          <block type="variables_set" id=";.-OFI4XTL:1(cUJ2Rop">
                                            <field name="VAR" id=".vhe63pLski-nVvGA3*.">Phase max mA</field>
                                            <value name="VALUE">
                                              <block type="math_arithmetic" id="J6Nk{J9=+uJ%]s.koila">
                                                <field name="OP">MULTIPLY</field>
                                                <value name="A">
                                                  <shadow type="math_number" id="Z{Vk|*~/(O0zyg;T@0-q">
                                                    <field name="NUM">1</field>
                                                  </shadow>
                                                  <block type="math_arithmetic" id="xlV)uzos74*Z54_`_vpH">
                                                    <field name="OP">MINUS</field>
                                                    <value name="A">
                                                      <shadow type="math_number" id="F4``i@tO{@ZsVDVEkX^s">
                                                        <field name="NUM">1</field>
                                                      </shadow>
                                                      <block type="variables_get" id="?,G]_}j/2XK.{I/:SV(x">
                                                        <field name="VAR" id="MU8;yslk(B7(Tv%sqWM=">Phasenlimit in A</field>
                                                      </block>
                                                    </value>
                                                    <value name="B">
                                                      <shadow type="math_number" id=",l%4P_9nAUjj2mNGH[h2">
                                                        <field name="NUM">1</field>
                                                      </shadow>
                                                      <block type="math_round" id="~[yGWn[1a|N5Vd]OFBYo">
                                                        <field name="OP">ROUND</field>
                                                        <value name="NUM">
                                                          <shadow type="math_number" id="{wV8`R=q|7O=$|[gI6_t">
                                                            <field name="NUM">3.1</field>
                                                          </shadow>
                                                          <block type="variables_get" id="bKt:q{5Optbt)`$ca{As">
                                                            <field name="VAR" id="14Q~A%n3eqx=_.wh9IJo">Phase max A</field>
                                                          </block>
                                                        </value>
                                                      </block>
                                                    </value>
                                                  </block>
                                                </value>
                                                <value name="B">
                                                  <shadow type="math_number" id=".0n_l9PyIGr}lG[(RN7+">
                                                    <field name="NUM">1000</field>
                                                  </shadow>
                                                </value>
                                              </block>
                                            </value>
                                            <next>
                                              <block type="comment" id="U4sh$]P1ZTIA(#c;KHG*">
                                                <field name="COMMENT">Ladelimit setzen</field>
                                                <next>
                                                  <block type="control" id="T~q1?/]SMOxLPmZ?_S7T">
                                                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                    <field name="OID">kecontact.0.automatic.limitCurrent</field>
                                                    <field name="WITH_DELAY">FALSE</field>
                                                    <value name="VALUE">
                                                      <block type="variables_get" id="U79EJpWJZC^s%^co:P|}">
                                                        <field name="VAR" id=".vhe63pLski-nVvGA3*.">Phase max mA</field>
                                                      </block>
                                                    </value>
                                                  </block>
                                                </next>
                                              </block>
                                            </next>
                                          </block>
                                        </next>
                                      </block>
                                    </next>
                                  </block>
                                </next>
                              </block>
                            </next>
                          </block>
                        </next>
                      </block>
                    </next>
                  </block>
                </next>
              </block>
            </statement>
          </block>
        </next>
      </block>
    </xml>
    

    und als Javasctript

    var Phasenlimit_in_A, Phase_1_ohne_Wallbox, Phase_2_ohne_Wallbox, Phase_3_ohne_Wallbox, Phase_max_A, Phase_max_mA;
    
    
    Phasenlimit_in_A = 32;
    on({ id: [].concat(['fronius.1.meter.0.Current_AC_Sum']), change: 'ne' }, async (obj) => {
      let value = obj.state.val;
      let oldValue = obj.oldState.val;
      // Phasenlast ohne Wallbox
      Phase_1_ohne_Wallbox = getState('fronius.1.meter.0.Current_AC_Phase_1').val - getState('kecontact.0.i1').val / 1000;
      Phase_2_ohne_Wallbox = getState('fronius.1.meter.0.Current_AC_Phase_2').val - getState('kecontact.0.i2').val / 1000;
      Phase_3_ohne_Wallbox = getState('fronius.1.meter.0.Current_AC_Phase_3').val - getState('kecontact.0.i3').val / 1000;
      // stärkste Phase ermitteln
      if (Phase_1_ohne_Wallbox >= Phase_2_ohne_Wallbox && Phase_1_ohne_Wallbox >= Phase_3_ohne_Wallbox) {
        Phase_max_A = Phase_1_ohne_Wallbox;
      } else if (Phase_2_ohne_Wallbox >= Phase_1_ohne_Wallbox && Phase_2_ohne_Wallbox >= Phase_3_ohne_Wallbox) {
        Phase_max_A = Phase_2_ohne_Wallbox;
      } else if (Phase_3_ohne_Wallbox >= Phase_1_ohne_Wallbox && Phase_3_ohne_Wallbox >= Phase_2_ohne_Wallbox) {
        Phase_max_A = Phase_3_ohne_Wallbox;
      }
      // Berechnen, Runden und Umrechnen
      Phase_max_mA = (Phasenlimit_in_A - Math.round(Phase_max_A)) * 1000;
      // Ladelimit setzen
      setState('kecontact.0.automatic.limitCurrent' /* limit dynamic charging to this value of amperage (0 = no limitation) */, Phase_max_mA);
    });
    

    Vielleicht kannst du nochmals darüber nachdenken, deine Ladelimitierung auf diese Art umzubauen. bei deiner Variante benötigt man ja auch einen Zähler, es sind also keine weiteren Komponenten nötig und somit allgemein verwendbar. Die Berechnung mit der Phasenlast ist aber wesentlich genauer.
    LG Thomas

    S Offline
    S Offline
    Sneak-L8
    wrote on last edited by
    #1131

    @gto Danke für das ausführliche Skript.
    Ja, im Grunde ist das kein Problem. Drei States für die Stromstärken der einzelnen Phasen und ein Maximalwert, der mit der Wallbox zusammen nicht überschritten werden darf.
    Ich denke, ein Maximalwert über alle Phasen sollte reichen und nicht je Phase, oder?
    Ich schau mal, dass ich mit die nächsten Tage dranmache.

    Zu Deinem Skript: den Maximalwert kannst du auch mit Math.max(Phase_1_ohne_Wallbox, Phase_2_ohne_Wallbox, Phase_3_ohne_Wallbox) ermitteln.

    G 1 Reply Last reply
    0
    • T tminimax

      @sneak-l8 ok das verstehe ich; nichts desto trotz könnte man die Regulate Wallbox Eintrage nach dem beenden der Ladung reduzieren, indem eine Abfrage mit eingebaut werden würde, die nur Regulate Wallbox sendet, wenn eine Ladung aktiv ist? Wäre das eine Möglichkeit? Danke

      S Offline
      S Offline
      Sneak-L8
      wrote on last edited by
      #1132

      @tminimax Ja, ich kann die Logs natürlich reduzieren und z.B. im abgesteckten Zustand die Begrenzungsinfo nur auf Loglevel Debug anstatt Info ausgeben. Aber regulieren würde ich in jedem Fall.
      Ich weiß ja nicht, wann jemand ein Auto ansteckt. Daher würde ich das Ladelimit (als Überlastschutz) aus Sicherheitsgründen unabhängig von einem angesteckten Auto regeln. Sonst kann es passieren, dass man einige Zeit den Anschluss überlastet, bis die nächste Berechnung (alle 30 Sekunden) stattfindet.

      T 1 Reply Last reply
      0
      • S Sneak-L8

        @tminimax Ja, ich kann die Logs natürlich reduzieren und z.B. im abgesteckten Zustand die Begrenzungsinfo nur auf Loglevel Debug anstatt Info ausgeben. Aber regulieren würde ich in jedem Fall.
        Ich weiß ja nicht, wann jemand ein Auto ansteckt. Daher würde ich das Ladelimit (als Überlastschutz) aus Sicherheitsgründen unabhängig von einem angesteckten Auto regeln. Sonst kann es passieren, dass man einige Zeit den Anschluss überlastet, bis die nächste Berechnung (alle 30 Sekunden) stattfindet.

        T Offline
        T Offline
        tminimax
        wrote on last edited by
        #1133

        @sneak-l8 ok - das ist ein punkt - soweit habe ich nicht gedacht - gglfs. wirklich nur im log debug...

        S 1 Reply Last reply
        0
        • S Sneak-L8

          @gto Danke für das ausführliche Skript.
          Ja, im Grunde ist das kein Problem. Drei States für die Stromstärken der einzelnen Phasen und ein Maximalwert, der mit der Wallbox zusammen nicht überschritten werden darf.
          Ich denke, ein Maximalwert über alle Phasen sollte reichen und nicht je Phase, oder?
          Ich schau mal, dass ich mit die nächsten Tage dranmache.

          Zu Deinem Skript: den Maximalwert kannst du auch mit Math.max(Phase_1_ohne_Wallbox, Phase_2_ohne_Wallbox, Phase_3_ohne_Wallbox) ermitteln.

          G Offline
          G Offline
          gto
          wrote on last edited by gto
          #1134

          @sneak-l8 Ja , ein Maximalwert wird angegeben und der gilt für alle Phasen, es sind ja auch immer 3 idente Sicherungen in der Hauptsicherung verbaut.

          Danke für den Hinweis mit der Maximalberechnung, das baue ich ein. Bin leider nicht so tief in der Programmierung bewandert.

          Hier die korrigierte Version

          var Phasenlimit_in_A, Phase_max_A, Phase_1_ohne_Wallbox, Phase_2_ohne_Wallbox, Phase_3_ohne_Wallbox, Phase_max_mA;
          
          
          Phasenlimit_in_A = 32;
          on({ id: [].concat(['fronius.1.meter.0.Current_AC_Sum']), change: 'ne' }, async (obj) => {
            let value = obj.state.val;
            let oldValue = obj.oldState.val;
            // Phasenlast ohne Wallbox
            Phase_1_ohne_Wallbox = getState('fronius.1.meter.0.Current_AC_Phase_1').val - getState('kecontact.0.i1').val / 1000;
            Phase_2_ohne_Wallbox = getState('fronius.1.meter.0.Current_AC_Phase_2').val - getState('kecontact.0.i2').val / 1000;
            Phase_3_ohne_Wallbox = getState('fronius.1.meter.0.Current_AC_Phase_3').val - getState('kecontact.0.i3').val / 1000;
            // stärkste Phase ermitteln
            Phase_max_A = Math.max.apply(null, [Phase_1_ohne_Wallbox, Phase_2_ohne_Wallbox, Phase_3_ohne_Wallbox]);
            // Berechnen, Runden und Umrechnen
            Phase_max_mA = (Phasenlimit_in_A - Math.round(Phase_max_A)) * 1000;
            // Ladelimit setzen
            setState('kecontact.0.automatic.limitCurrent' /* limit dynamic charging to this value of amperage (0 = no limitation) */, Phase_max_mA);
          });
          
          

          und Blockly

          <xml xmlns="https://developers.google.com/blockly/xml">
            <variables>
              <variable id="MU8;yslk(B7(Tv%sqWM=">Phasenlimit in A</variable>
              <variable id="14Q~A%n3eqx=_.wh9IJo">Phase max A</variable>
              <variable id="9_y3TZ-b(n~=;KGQMbHy">Phase 1 ohne Wallbox</variable>
              <variable id="s,uBvtT+|q{)6)SO_[Md">Phase 2 ohne Wallbox</variable>
              <variable id="B8u[OZEOXEt|YkNhgOxu">Phase 3 ohne Wallbox</variable>
              <variable id=".vhe63pLski-nVvGA3*.">Phase max mA</variable>
            </variables>
            <block type="variables_set" id="E*Vu$_+fuxrGm/d:dGi#" x="295" y="-363">
              <field name="VAR" id="MU8;yslk(B7(Tv%sqWM=">Phasenlimit in A</field>
              <value name="VALUE">
                <block type="math_number" id="gqLBcLSd@@Snb8KlaVTx">
                  <field name="NUM">32</field>
                </block>
              </value>
              <next>
                <block type="on_ext" id="2s[RmVP})1RW}8|l/6pN">
                  <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="$s?)jmdJ!-uBN2*Q%ez]">
                      <field name="oid">fronius.1.meter.0.Current_AC_Sum</field>
                    </shadow>
                  </value>
                  <statement name="STATEMENT">
                    <block type="comment" id="xrjTG/oCpXmHLZ2_%Xek">
                      <field name="COMMENT">Phasenlast ohne Wallbox</field>
                      <next>
                        <block type="variables_set" id="2UprYF$bz9vpLCV#O;W}">
                          <field name="VAR" id="9_y3TZ-b(n~=;KGQMbHy">Phase 1 ohne Wallbox</field>
                          <value name="VALUE">
                            <block type="math_arithmetic" id="/6Na./,HDWbDa%UzOC1v">
                              <field name="OP">MINUS</field>
                              <value name="A">
                                <shadow type="math_number" id="l?cH+*JFd_5keBns9P{y">
                                  <field name="NUM">1</field>
                                </shadow>
                                <block type="get_value" id="ow$Xn02]:Vt{wT;tLX%$">
                                  <field name="ATTR">val</field>
                                  <field name="OID">fronius.1.meter.0.Current_AC_Phase_1</field>
                                </block>
                              </value>
                              <value name="B">
                                <shadow type="math_number" id="$V4TOE]`|(kA]v;^+:rO">
                                  <field name="NUM">3</field>
                                </shadow>
                                <block type="math_arithmetic" id="~Q0)S2hCNGGR@VhsGa#Q">
                                  <field name="OP">DIVIDE</field>
                                  <value name="A">
                                    <shadow type="math_number" id="#Wt81FmAbdWGGZ~D/@}_">
                                      <field name="NUM">1</field>
                                    </shadow>
                                    <block type="get_value" id="R#(k#VwX{#hy;i{0)]Aw">
                                      <field name="ATTR">val</field>
                                      <field name="OID">kecontact.0.i1</field>
                                    </block>
                                  </value>
                                  <value name="B">
                                    <shadow type="math_number" id="gKnZ{b*!^n~1k.9~12fk">
                                      <field name="NUM">1000</field>
                                    </shadow>
                                  </value>
                                </block>
                              </value>
                            </block>
                          </value>
                          <next>
                            <block type="variables_set" id="D.i|*TV`Y/6lhWWx^UFo">
                              <field name="VAR" id="s,uBvtT+|q{)6)SO_[Md">Phase 2 ohne Wallbox</field>
                              <value name="VALUE">
                                <block type="math_arithmetic" id="+0nK1=4Hs^BJTJX`)p^s">
                                  <field name="OP">MINUS</field>
                                  <value name="A">
                                    <shadow type="math_number" id="l?cH+*JFd_5keBns9P{y">
                                      <field name="NUM">1</field>
                                    </shadow>
                                    <block type="get_value" id="=bdn8.dOaSZs.tZ]bWRk">
                                      <field name="ATTR">val</field>
                                      <field name="OID">fronius.1.meter.0.Current_AC_Phase_2</field>
                                    </block>
                                  </value>
                                  <value name="B">
                                    <shadow type="math_number" id="Conwu{[UvbZ_o?[ZFzA0">
                                      <field name="NUM">3</field>
                                    </shadow>
                                    <block type="math_arithmetic" id="KsyRcEjnv~D,aT.AaO(5">
                                      <field name="OP">DIVIDE</field>
                                      <value name="A">
                                        <shadow type="math_number" id="#Wt81FmAbdWGGZ~D/@}_">
                                          <field name="NUM">1</field>
                                        </shadow>
                                        <block type="get_value" id="[cc,kYI6Si:@4GdT$acO">
                                          <field name="ATTR">val</field>
                                          <field name="OID">kecontact.0.i2</field>
                                        </block>
                                      </value>
                                      <value name="B">
                                        <shadow type="math_number" id="YH/lJN3,!RZM+Lk~RJ6+">
                                          <field name="NUM">1000</field>
                                        </shadow>
                                      </value>
                                    </block>
                                  </value>
                                </block>
                              </value>
                              <next>
                                <block type="variables_set" id="iIiN8[BO)GhwT=D#4r8h">
                                  <field name="VAR" id="B8u[OZEOXEt|YkNhgOxu">Phase 3 ohne Wallbox</field>
                                  <value name="VALUE">
                                    <block type="math_arithmetic" id="OL[0m(n6SBGsa@jf|#wv">
                                      <field name="OP">MINUS</field>
                                      <value name="A">
                                        <shadow type="math_number" id="l?cH+*JFd_5keBns9P{y">
                                          <field name="NUM">1</field>
                                        </shadow>
                                        <block type="get_value" id="p5he[kz$J=zaKte5tC}:">
                                          <field name="ATTR">val</field>
                                          <field name="OID">fronius.1.meter.0.Current_AC_Phase_3</field>
                                        </block>
                                      </value>
                                      <value name="B">
                                        <shadow type="math_number" id="#OBc2iu6EB0f-6h,DIF^">
                                          <field name="NUM">3</field>
                                        </shadow>
                                        <block type="math_arithmetic" id="a$t$272mdh,L.a:xV.5C">
                                          <field name="OP">DIVIDE</field>
                                          <value name="A">
                                            <shadow type="math_number" id="#Wt81FmAbdWGGZ~D/@}_">
                                              <field name="NUM">1</field>
                                            </shadow>
                                            <block type="get_value" id="fmfn5=3Y64QnYFXSwwKG">
                                              <field name="ATTR">val</field>
                                              <field name="OID">kecontact.0.i3</field>
                                            </block>
                                          </value>
                                          <value name="B">
                                            <shadow type="math_number" id="gXLT*%!OJ=zY2~r=hu1}">
                                              <field name="NUM">1000</field>
                                            </shadow>
                                          </value>
                                        </block>
                                      </value>
                                    </block>
                                  </value>
                                  <next>
                                    <block type="comment" id="nW_R=QRFZ^Yqw==W)Z{M">
                                      <field name="COMMENT">stärkste Phase ermitteln</field>
                                      <next>
                                        <block type="variables_set" id="zcPHN?iLq0cMx7pcO!?+">
                                          <field name="VAR" id="14Q~A%n3eqx=_.wh9IJo">Phase max A</field>
                                          <value name="VALUE">
                                            <block type="math_on_list" id="IE:o.]A^D[N|P{Bno.IL">
                                              <mutation op="MAX"></mutation>
                                              <field name="OP">MAX</field>
                                              <value name="LIST">
                                                <block type="lists_create_with" id="O162NtYNZ~wUA9s=P=]W">
                                                  <mutation items="3"></mutation>
                                                  <value name="ADD0">
                                                    <block type="variables_get" id="W+e.#H?-wT#;7#a~,8)K">
                                                      <field name="VAR" id="9_y3TZ-b(n~=;KGQMbHy">Phase 1 ohne Wallbox</field>
                                                    </block>
                                                  </value>
                                                  <value name="ADD1">
                                                    <block type="variables_get" id="XBD7Ia^DcAO^a;%OZC,x">
                                                      <field name="VAR" id="s,uBvtT+|q{)6)SO_[Md">Phase 2 ohne Wallbox</field>
                                                    </block>
                                                  </value>
                                                  <value name="ADD2">
                                                    <block type="variables_get" id="G51$^lN6iru6boK_!mT*">
                                                      <field name="VAR" id="B8u[OZEOXEt|YkNhgOxu">Phase 3 ohne Wallbox</field>
                                                    </block>
                                                  </value>
                                                </block>
                                              </value>
                                            </block>
                                          </value>
                                          <next>
                                            <block type="comment" id="BL#hsp^[T3;nI?SD$Crj">
                                              <field name="COMMENT">Berechnen, Runden und Umrechnen</field>
                                              <next>
                                                <block type="variables_set" id=";.-OFI4XTL:1(cUJ2Rop">
                                                  <field name="VAR" id=".vhe63pLski-nVvGA3*.">Phase max mA</field>
                                                  <value name="VALUE">
                                                    <block type="math_arithmetic" id="J6Nk{J9=+uJ%]s.koila">
                                                      <field name="OP">MULTIPLY</field>
                                                      <value name="A">
                                                        <shadow type="math_number" id="Z{Vk|*~/(O0zyg;T@0-q">
                                                          <field name="NUM">1</field>
                                                        </shadow>
                                                        <block type="math_arithmetic" id="xlV)uzos74*Z54_`_vpH">
                                                          <field name="OP">MINUS</field>
                                                          <value name="A">
                                                            <shadow type="math_number" id="F4``i@tO{@ZsVDVEkX^s">
                                                              <field name="NUM">1</field>
                                                            </shadow>
                                                            <block type="variables_get" id="?,G]_}j/2XK.{I/:SV(x">
                                                              <field name="VAR" id="MU8;yslk(B7(Tv%sqWM=">Phasenlimit in A</field>
                                                            </block>
                                                          </value>
                                                          <value name="B">
                                                            <shadow type="math_number" id=",l%4P_9nAUjj2mNGH[h2">
                                                              <field name="NUM">1</field>
                                                            </shadow>
                                                            <block type="math_round" id="~[yGWn[1a|N5Vd]OFBYo">
                                                              <field name="OP">ROUND</field>
                                                              <value name="NUM">
                                                                <shadow type="math_number" id="{wV8`R=q|7O=$|[gI6_t">
                                                                  <field name="NUM">3.1</field>
                                                                </shadow>
                                                                <block type="variables_get" id="bKt:q{5Optbt)`$ca{As">
                                                                  <field name="VAR" id="14Q~A%n3eqx=_.wh9IJo">Phase max A</field>
                                                                </block>
                                                              </value>
                                                            </block>
                                                          </value>
                                                        </block>
                                                      </value>
                                                      <value name="B">
                                                        <shadow type="math_number" id=".0n_l9PyIGr}lG[(RN7+">
                                                          <field name="NUM">1000</field>
                                                        </shadow>
                                                      </value>
                                                    </block>
                                                  </value>
                                                  <next>
                                                    <block type="comment" id="U4sh$]P1ZTIA(#c;KHG*">
                                                      <field name="COMMENT">Ladelimit setzen</field>
                                                      <next>
                                                        <block type="control" id="T~q1?/]SMOxLPmZ?_S7T">
                                                          <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                          <field name="OID">kecontact.0.automatic.limitCurrent</field>
                                                          <field name="WITH_DELAY">FALSE</field>
                                                          <value name="VALUE">
                                                            <block type="variables_get" id="U79EJpWJZC^s%^co:P|}">
                                                              <field name="VAR" id=".vhe63pLski-nVvGA3*.">Phase max mA</field>
                                                            </block>
                                                          </value>
                                                        </block>
                                                      </next>
                                                    </block>
                                                  </next>
                                                </block>
                                              </next>
                                            </block>
                                          </next>
                                        </block>
                                      </next>
                                    </block>
                                  </next>
                                </block>
                              </next>
                            </block>
                          </next>
                        </block>
                      </next>
                    </block>
                  </statement>
                </block>
              </next>
            </block>
            <block type="controls_if" id="/^G/xAzqu$TM:N!uV/n[" disabled="true" x="362" y="213">
              <mutation elseif="2"></mutation>
              <value name="IF0">
                <block type="logic_operation" id="wSICv[-Q?lNdhP4dG-Q$">
                  <field name="OP">AND</field>
                  <value name="A">
                    <block type="logic_compare" id="]GG#?||_/xhy^fdtD1C{">
                      <field name="OP">GTE</field>
                      <value name="A">
                        <block type="variables_get" id="b(0n;E,_%o1^t:kg]e4|">
                          <field name="VAR" id="9_y3TZ-b(n~=;KGQMbHy">Phase 1 ohne Wallbox</field>
                        </block>
                      </value>
                      <value name="B">
                        <block type="variables_get" id="[WOHI2)^!J^WiQx0`I+I">
                          <field name="VAR" id="s,uBvtT+|q{)6)SO_[Md">Phase 2 ohne Wallbox</field>
                        </block>
                      </value>
                    </block>
                  </value>
                  <value name="B">
                    <block type="logic_compare" id="AS*pUWjhc6leZXY5q5-%">
                      <field name="OP">GTE</field>
                      <value name="A">
                        <block type="variables_get" id="o#g6zHc*Mh._(wi1SLBy">
                          <field name="VAR" id="9_y3TZ-b(n~=;KGQMbHy">Phase 1 ohne Wallbox</field>
                        </block>
                      </value>
                      <value name="B">
                        <block type="variables_get" id="i.*he3j0ou:r^j|6Poj!">
                          <field name="VAR" id="B8u[OZEOXEt|YkNhgOxu">Phase 3 ohne Wallbox</field>
                        </block>
                      </value>
                    </block>
                  </value>
                </block>
              </value>
              <statement name="DO0">
                <block type="variables_set" id="%_OdKx+xAv*}-*3}U:|4">
                  <field name="VAR" id="14Q~A%n3eqx=_.wh9IJo">Phase max A</field>
                  <value name="VALUE">
                    <block type="variables_get" id="0q|:3|_E+D;{pnf@x5R=">
                      <field name="VAR" id="9_y3TZ-b(n~=;KGQMbHy">Phase 1 ohne Wallbox</field>
                    </block>
                  </value>
                </block>
              </statement>
              <value name="IF1">
                <block type="logic_operation" id="U7`L+VlDzN*;51c_6$7l">
                  <field name="OP">AND</field>
                  <value name="A">
                    <block type="logic_compare" id="hU_%X:nvg-0OJ|SeFB+E">
                      <field name="OP">GTE</field>
                      <value name="A">
                        <block type="variables_get" id=".qDGa`*fN{5.k?]p^r~m">
                          <field name="VAR" id="s,uBvtT+|q{)6)SO_[Md">Phase 2 ohne Wallbox</field>
                        </block>
                      </value>
                      <value name="B">
                        <block type="variables_get" id="vuUI(Qt?{f_3v-R_(c)#">
                          <field name="VAR" id="9_y3TZ-b(n~=;KGQMbHy">Phase 1 ohne Wallbox</field>
                        </block>
                      </value>
                    </block>
                  </value>
                  <value name="B">
                    <block type="logic_compare" id="WO^.MTn*u:FU?}Y6b~h(">
                      <field name="OP">GTE</field>
                      <value name="A">
                        <block type="variables_get" id="VLac$(8TaK3oZYU!2lgJ">
                          <field name="VAR" id="s,uBvtT+|q{)6)SO_[Md">Phase 2 ohne Wallbox</field>
                        </block>
                      </value>
                      <value name="B">
                        <block type="variables_get" id="/Aa0GKiIMG6J(ZP{]ix=">
                          <field name="VAR" id="B8u[OZEOXEt|YkNhgOxu">Phase 3 ohne Wallbox</field>
                        </block>
                      </value>
                    </block>
                  </value>
                </block>
              </value>
              <statement name="DO1">
                <block type="variables_set" id=":8h6-wJ5|KIR.C25w/UI">
                  <field name="VAR" id="14Q~A%n3eqx=_.wh9IJo">Phase max A</field>
                  <value name="VALUE">
                    <block type="variables_get" id="{/)M;fr,$]$Dhqk0;.1L">
                      <field name="VAR" id="s,uBvtT+|q{)6)SO_[Md">Phase 2 ohne Wallbox</field>
                    </block>
                  </value>
                </block>
              </statement>
              <value name="IF2">
                <block type="logic_operation" id="/14}1=0y+?`9kmTKzYdv">
                  <field name="OP">AND</field>
                  <value name="A">
                    <block type="logic_compare" id="Kr~e.)tYz1zg[08):aG7">
                      <field name="OP">GTE</field>
                      <value name="A">
                        <block type="variables_get" id="^Z/?3/X]YpJ[rMFA=w:e">
                          <field name="VAR" id="B8u[OZEOXEt|YkNhgOxu">Phase 3 ohne Wallbox</field>
                        </block>
                      </value>
                      <value name="B">
                        <block type="variables_get" id="TaU==ET,NVhb]qiW?-o|">
                          <field name="VAR" id="9_y3TZ-b(n~=;KGQMbHy">Phase 1 ohne Wallbox</field>
                        </block>
                      </value>
                    </block>
                  </value>
                  <value name="B">
                    <block type="logic_compare" id="Z6=EoG0]ojqj$4SMUbO|">
                      <field name="OP">GTE</field>
                      <value name="A">
                        <block type="variables_get" id="ru,1qkev|]W7{/;HCdNO">
                          <field name="VAR" id="B8u[OZEOXEt|YkNhgOxu">Phase 3 ohne Wallbox</field>
                        </block>
                      </value>
                      <value name="B">
                        <block type="variables_get" id="OTSF];r%4ufAlNa((gk*">
                          <field name="VAR" id="s,uBvtT+|q{)6)SO_[Md">Phase 2 ohne Wallbox</field>
                        </block>
                      </value>
                    </block>
                  </value>
                </block>
              </value>
              <statement name="DO2">
                <block type="variables_set" id="xPyPJ6N_Om]iYL3FQ!!?">
                  <field name="VAR" id="14Q~A%n3eqx=_.wh9IJo">Phase max A</field>
                  <value name="VALUE">
                    <block type="variables_get" id="_xtu8qP#ax*0rD43u%0)">
                      <field name="VAR" id="B8u[OZEOXEt|YkNhgOxu">Phase 3 ohne Wallbox</field>
                    </block>
                  </value>
                </block>
              </statement>
            </block>
          </xml>
          
          1 Reply Last reply
          0
          • T tminimax

            @sneak-l8 ok - das ist ein punkt - soweit habe ich nicht gedacht - gglfs. wirklich nur im log debug...

            S Offline
            S Offline
            Sneak-L8
            wrote on last edited by
            #1135

            @tminimax hab das jetzt mal geändert (Log ins Debug, wenn Leistung limitiert ist und das Fahrzeug nicht angesteckt). Kannst gerne mal testen.

            T 1 Reply Last reply
            0
            • S Sneak-L8

              @tminimax hab das jetzt mal geändert (Log ins Debug, wenn Leistung limitiert ist und das Fahrzeug nicht angesteckt). Kannst gerne mal testen.

              T Offline
              T Offline
              tminimax
              wrote on last edited by
              #1136

              @sneak-l8 kann es sein das da was nicht passt vom "speziall" install pfad oder ist da bei mir was faul?

              folgender fehler kommt:

              npm error code 128

              npm error An unknown git error occurred

              npm error Warning: Permanently added 'github.com,140.82.121.3' (ECDSA) to the list of known hosts.npm error git@github.com: Permission denied (publickey).npm error fatal: Konnte nicht vom Remote-Repository lesen.npm errornpm error Bitte stellen Sie sicher, dass die korrekten Zugriffsberechtigungen bestehennpm error und das Repository existiert.

              npm error A complete log of this run can be found in: /home/iobroker/.npm/_logs/2025-02-17T18_10_04_337Z-debug-0.log

              npm error code 128npm error An unknown git error occurrednpm error command git --no-replace-objects ls-remote ssh://git@github.com/iobroker-community-adapters/ioBroker.kecontact.gitnpm error Warning: Permanently added 'github.com,140.82.121.3' (ECDSA) to the list of known hosts.npm error git@github.com: Permission denied (publickey).npm error fatal: Konnte nicht vom Remote-Repository lesen.npm errornpm error Bitte stellen Sie sicher, dass die korrekten Zugriffsberechtigungen bestehennpm error und das Repository existiert.npm error A complete log of this run can be found in: /home/iobroker/.npm/_logs/2025-02-17T18_10_04_337Z-debug-0.log

              host.ioBroker Cannot install iobroker-community-adapters/ioBroker.kecontact#new-core-base: 128

              ERROR: Process exited with code 25

              S 1 Reply Last reply
              0
              • T tminimax

                @sneak-l8 kann es sein das da was nicht passt vom "speziall" install pfad oder ist da bei mir was faul?

                folgender fehler kommt:

                npm error code 128

                npm error An unknown git error occurred

                npm error Warning: Permanently added 'github.com,140.82.121.3' (ECDSA) to the list of known hosts.npm error git@github.com: Permission denied (publickey).npm error fatal: Konnte nicht vom Remote-Repository lesen.npm errornpm error Bitte stellen Sie sicher, dass die korrekten Zugriffsberechtigungen bestehennpm error und das Repository existiert.

                npm error A complete log of this run can be found in: /home/iobroker/.npm/_logs/2025-02-17T18_10_04_337Z-debug-0.log

                npm error code 128npm error An unknown git error occurrednpm error command git --no-replace-objects ls-remote ssh://git@github.com/iobroker-community-adapters/ioBroker.kecontact.gitnpm error Warning: Permanently added 'github.com,140.82.121.3' (ECDSA) to the list of known hosts.npm error git@github.com: Permission denied (publickey).npm error fatal: Konnte nicht vom Remote-Repository lesen.npm errornpm error Bitte stellen Sie sicher, dass die korrekten Zugriffsberechtigungen bestehennpm error und das Repository existiert.npm error A complete log of this run can be found in: /home/iobroker/.npm/_logs/2025-02-17T18_10_04_337Z-debug-0.log

                host.ioBroker Cannot install iobroker-community-adapters/ioBroker.kecontact#new-core-base: 128

                ERROR: Process exited with code 25

                S Offline
                S Offline
                Sneak-L8
                wrote on last edited by
                #1137

                @tminimax oh, ich hab vergessen zu erwähnen, dass ich den Branch auf master zurück gemergt habe. Bitte wieder Master nehmen (geht also mit Reiter git)

                G 1 Reply Last reply
                0
                • S Sneak-L8

                  @tminimax oh, ich hab vergessen zu erwähnen, dass ich den Branch auf master zurück gemergt habe. Bitte wieder Master nehmen (geht also mit Reiter git)

                  G Offline
                  G Offline
                  gto
                  wrote on last edited by gto
                  #1138

                  @sneak-l8
                  Habe mein Script noch etwas gekürzt

                  Blockly

                  <xml xmlns="https://developers.google.com/blockly/xml">
                    <variables>
                      <variable id="MU8;yslk(B7(Tv%sqWM=">Phasenlimit in A</variable>
                    </variables>
                    <block type="variables_set" id="E*Vu$_+fuxrGm/d:dGi#" x="23" y="-354">
                      <field name="VAR" id="MU8;yslk(B7(Tv%sqWM=">Phasenlimit in A</field>
                      <value name="VALUE">
                        <block type="math_number" id="gqLBcLSd@@Snb8KlaVTx">
                          <field name="NUM">32</field>
                        </block>
                      </value>
                      <next>
                        <block type="on_ext" id="2s[RmVP})1RW}8|l/6pN">
                          <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="$s?)jmdJ!-uBN2*Q%ez]">
                              <field name="oid">fronius.1.meter.0.Current_AC_Sum</field>
                            </shadow>
                          </value>
                          <statement name="STATEMENT">
                            <block type="control" id="T~q1?/]SMOxLPmZ?_S7T">
                              <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                              <field name="OID">kecontact.0.automatic.limitCurrent</field>
                              <field name="WITH_DELAY">FALSE</field>
                              <value name="VALUE">
                                <block type="math_arithmetic" id="J6Nk{J9=+uJ%]s.koila">
                                  <field name="OP">MULTIPLY</field>
                                  <value name="A">
                                    <shadow type="math_number" id="Z{Vk|*~/(O0zyg;T@0-q">
                                      <field name="NUM">1</field>
                                    </shadow>
                                    <block type="math_arithmetic" id="xlV)uzos74*Z54_`_vpH">
                                      <field name="OP">MINUS</field>
                                      <value name="A">
                                        <shadow type="math_number" id="F4``i@tO{@ZsVDVEkX^s">
                                          <field name="NUM">1</field>
                                        </shadow>
                                        <block type="variables_get" id="?,G]_}j/2XK.{I/:SV(x">
                                          <field name="VAR" id="MU8;yslk(B7(Tv%sqWM=">Phasenlimit in A</field>
                                        </block>
                                      </value>
                                      <value name="B">
                                        <shadow type="math_number" id=",l%4P_9nAUjj2mNGH[h2">
                                          <field name="NUM">1</field>
                                        </shadow>
                                        <block type="math_round" id="~[yGWn[1a|N5Vd]OFBYo">
                                          <field name="OP">ROUND</field>
                                          <value name="NUM">
                                            <shadow type="math_number" id="{wV8`R=q|7O=$|[gI6_t">
                                              <field name="NUM">3.1</field>
                                            </shadow>
                                            <block type="math_on_list" id="IE:o.]A^D[N|P{Bno.IL">
                                              <mutation op="MAX"></mutation>
                                              <field name="OP">MAX</field>
                                              <value name="LIST">
                                                <block type="lists_create_with" id="O162NtYNZ~wUA9s=P=]W">
                                                  <mutation items="3"></mutation>
                                                  <value name="ADD0">
                                                    <block type="get_value" id="ow$Xn02]:Vt{wT;tLX%$">
                                                      <field name="ATTR">val</field>
                                                      <field name="OID">fronius.1.meter.0.Current_AC_Phase_1</field>
                                                    </block>
                                                  </value>
                                                  <value name="ADD1">
                                                    <block type="get_value" id="=bdn8.dOaSZs.tZ]bWRk">
                                                      <field name="ATTR">val</field>
                                                      <field name="OID">fronius.1.meter.0.Current_AC_Phase_2</field>
                                                    </block>
                                                  </value>
                                                  <value name="ADD2">
                                                    <block type="get_value" id="p5he[kz$J=zaKte5tC}:">
                                                      <field name="ATTR">val</field>
                                                      <field name="OID">fronius.1.meter.0.Current_AC_Phase_3</field>
                                                    </block>
                                                  </value>
                                                </block>
                                              </value>
                                            </block>
                                          </value>
                                        </block>
                                      </value>
                                    </block>
                                  </value>
                                  <value name="B">
                                    <shadow type="math_number" id=".0n_l9PyIGr}lG[(RN7+">
                                      <field name="NUM">1000</field>
                                    </shadow>
                                  </value>
                                </block>
                              </value>
                            </block>
                          </statement>
                        </block>
                      </next>
                    </block>
                  </xml>
                  

                  und Javascript

                  var Phasenlimit_in_A;
                  Phasenlimit_in_A = 32;
                  on({ id: [].concat(['fronius.1.meter.0.Current_AC_Sum']), change: 'ne' }, async (obj) => {
                    let value = obj.state.val;
                    let oldValue = obj.oldState.val;
                    setState('kecontact.0.automatic.limitCurrent' /* limit dynamic charging to this value of amperage (0 = no limitation) */, ((Phasenlimit_in_A - Math.round(Math.max.apply(null, [getState('fronius.1.meter.0.Current_AC_Phase_1').val, getState('fronius.1.meter.0.Current_AC_Phase_2').val, getState('fronius.1.meter.0.Current_AC_Phase_3').val]))) * 1000));
                  });
                  
                  
                  S 1 Reply Last reply
                  0
                  • G gto

                    @sneak-l8
                    Habe mein Script noch etwas gekürzt

                    Blockly

                    <xml xmlns="https://developers.google.com/blockly/xml">
                      <variables>
                        <variable id="MU8;yslk(B7(Tv%sqWM=">Phasenlimit in A</variable>
                      </variables>
                      <block type="variables_set" id="E*Vu$_+fuxrGm/d:dGi#" x="23" y="-354">
                        <field name="VAR" id="MU8;yslk(B7(Tv%sqWM=">Phasenlimit in A</field>
                        <value name="VALUE">
                          <block type="math_number" id="gqLBcLSd@@Snb8KlaVTx">
                            <field name="NUM">32</field>
                          </block>
                        </value>
                        <next>
                          <block type="on_ext" id="2s[RmVP})1RW}8|l/6pN">
                            <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="$s?)jmdJ!-uBN2*Q%ez]">
                                <field name="oid">fronius.1.meter.0.Current_AC_Sum</field>
                              </shadow>
                            </value>
                            <statement name="STATEMENT">
                              <block type="control" id="T~q1?/]SMOxLPmZ?_S7T">
                                <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                <field name="OID">kecontact.0.automatic.limitCurrent</field>
                                <field name="WITH_DELAY">FALSE</field>
                                <value name="VALUE">
                                  <block type="math_arithmetic" id="J6Nk{J9=+uJ%]s.koila">
                                    <field name="OP">MULTIPLY</field>
                                    <value name="A">
                                      <shadow type="math_number" id="Z{Vk|*~/(O0zyg;T@0-q">
                                        <field name="NUM">1</field>
                                      </shadow>
                                      <block type="math_arithmetic" id="xlV)uzos74*Z54_`_vpH">
                                        <field name="OP">MINUS</field>
                                        <value name="A">
                                          <shadow type="math_number" id="F4``i@tO{@ZsVDVEkX^s">
                                            <field name="NUM">1</field>
                                          </shadow>
                                          <block type="variables_get" id="?,G]_}j/2XK.{I/:SV(x">
                                            <field name="VAR" id="MU8;yslk(B7(Tv%sqWM=">Phasenlimit in A</field>
                                          </block>
                                        </value>
                                        <value name="B">
                                          <shadow type="math_number" id=",l%4P_9nAUjj2mNGH[h2">
                                            <field name="NUM">1</field>
                                          </shadow>
                                          <block type="math_round" id="~[yGWn[1a|N5Vd]OFBYo">
                                            <field name="OP">ROUND</field>
                                            <value name="NUM">
                                              <shadow type="math_number" id="{wV8`R=q|7O=$|[gI6_t">
                                                <field name="NUM">3.1</field>
                                              </shadow>
                                              <block type="math_on_list" id="IE:o.]A^D[N|P{Bno.IL">
                                                <mutation op="MAX"></mutation>
                                                <field name="OP">MAX</field>
                                                <value name="LIST">
                                                  <block type="lists_create_with" id="O162NtYNZ~wUA9s=P=]W">
                                                    <mutation items="3"></mutation>
                                                    <value name="ADD0">
                                                      <block type="get_value" id="ow$Xn02]:Vt{wT;tLX%$">
                                                        <field name="ATTR">val</field>
                                                        <field name="OID">fronius.1.meter.0.Current_AC_Phase_1</field>
                                                      </block>
                                                    </value>
                                                    <value name="ADD1">
                                                      <block type="get_value" id="=bdn8.dOaSZs.tZ]bWRk">
                                                        <field name="ATTR">val</field>
                                                        <field name="OID">fronius.1.meter.0.Current_AC_Phase_2</field>
                                                      </block>
                                                    </value>
                                                    <value name="ADD2">
                                                      <block type="get_value" id="p5he[kz$J=zaKte5tC}:">
                                                        <field name="ATTR">val</field>
                                                        <field name="OID">fronius.1.meter.0.Current_AC_Phase_3</field>
                                                      </block>
                                                    </value>
                                                  </block>
                                                </value>
                                              </block>
                                            </value>
                                          </block>
                                        </value>
                                      </block>
                                    </value>
                                    <value name="B">
                                      <shadow type="math_number" id=".0n_l9PyIGr}lG[(RN7+">
                                        <field name="NUM">1000</field>
                                      </shadow>
                                    </value>
                                  </block>
                                </value>
                              </block>
                            </statement>
                          </block>
                        </next>
                      </block>
                    </xml>
                    

                    und Javascript

                    var Phasenlimit_in_A;
                    Phasenlimit_in_A = 32;
                    on({ id: [].concat(['fronius.1.meter.0.Current_AC_Sum']), change: 'ne' }, async (obj) => {
                      let value = obj.state.val;
                      let oldValue = obj.oldState.val;
                      setState('kecontact.0.automatic.limitCurrent' /* limit dynamic charging to this value of amperage (0 = no limitation) */, ((Phasenlimit_in_A - Math.round(Math.max.apply(null, [getState('fronius.1.meter.0.Current_AC_Phase_1').val, getState('fronius.1.meter.0.Current_AC_Phase_2').val, getState('fronius.1.meter.0.Current_AC_Phase_3').val]))) * 1000));
                    });
                    
                    
                    S Offline
                    S Offline
                    Sneak-L8
                    wrote on last edited by
                    #1139

                    @gto Danke für die Skripte, ich hatte aber schon das Meiste programmiert. Jetzt steht eine guthub-Version bereit, die auch eine Limitierung auf einen bestimmten wert je Phase zulässt.
                    Bitte einfach mal testen, mein energyMeter liefert keine Ampere-Werte und wollte die jetzt auch nicht berechnen lassen.

                    G 1 Reply Last reply
                    0
                    • S Sneak-L8

                      @gto Danke für die Skripte, ich hatte aber schon das Meiste programmiert. Jetzt steht eine guthub-Version bereit, die auch eine Limitierung auf einen bestimmten wert je Phase zulässt.
                      Bitte einfach mal testen, mein energyMeter liefert keine Ampere-Werte und wollte die jetzt auch nicht berechnen lassen.

                      G Offline
                      G Offline
                      gto
                      wrote on last edited by gto
                      #1140

                      @sneak-l8 Hallo Sneak, danke für die Arbeit. Es hat sich noch ein Fehler eingeschlichen. LimitCurrent bleibt immer auf auf einem konstanten Wert, egal was die Phasen für Werte haben.

                      Habe im debug-log gesehen, dass ein Eintrag "wallbox set to charging maximum of 7000 mA" kommt. Dieser Wert wäre richtig, er wird aber nicht in "limitCurrent" geschrieben. Regelst du über einen anderen Datenpunkt?

                      Habe gerade gesehen, dass du über CurrentUser regelst. Hier scheint es korrekt zu laufen. Ich muss aber noch warten bis ein KFZ lädt.

                      S 1 Reply Last reply
                      0
                      • G gto

                        @sneak-l8 Hallo Sneak, danke für die Arbeit. Es hat sich noch ein Fehler eingeschlichen. LimitCurrent bleibt immer auf auf einem konstanten Wert, egal was die Phasen für Werte haben.

                        Habe im debug-log gesehen, dass ein Eintrag "wallbox set to charging maximum of 7000 mA" kommt. Dieser Wert wäre richtig, er wird aber nicht in "limitCurrent" geschrieben. Regelst du über einen anderen Datenpunkt?

                        Habe gerade gesehen, dass du über CurrentUser regelst. Hier scheint es korrekt zu laufen. Ich muss aber noch warten bis ein KFZ lädt.

                        S Offline
                        S Offline
                        Sneak-L8
                        wrote on last edited by
                        #1141

                        @gto Ah, ok. Ich hatte gerade danach geschaut und dachte, dass es eigentlich passen muss. Hab das Debug-Log nun auch um die Einzelwerte für die Ampere-Berechnung ergänzt.
                        Aber ja, limitCurrent ist für Dich. Dort kannst dem Adapter dynamisch eine (zusätzliche) Begrenzung mitteilen.
                        Wenn Du den wert brauchst, könnte ich ihn höchstens als weiteren State (wie maxPower) unter statistics ausgeben.

                        G 1 Reply Last reply
                        0
                        • S Sneak-L8

                          @gto Ah, ok. Ich hatte gerade danach geschaut und dachte, dass es eigentlich passen muss. Hab das Debug-Log nun auch um die Einzelwerte für die Ampere-Berechnung ergänzt.
                          Aber ja, limitCurrent ist für Dich. Dort kannst dem Adapter dynamisch eine (zusätzliche) Begrenzung mitteilen.
                          Wenn Du den wert brauchst, könnte ich ihn höchstens als weiteren State (wie maxPower) unter statistics ausgeben.

                          G Offline
                          G Offline
                          gto
                          wrote on last edited by gto
                          #1142

                          @sneak-l8 Noch eine Verständnisfrage für die Testung.
                          Regelst du immer oder nur wenn an der Wallbox ein Auto lädt?
                          Die Hardwarelimitierung über die DIP-Schalter ist die Obergrenze für currentUser?

                          LimitCurrent benötige ich nicht.

                          S 1 Reply Last reply
                          0
                          • G gto

                            @sneak-l8 Noch eine Verständnisfrage für die Testung.
                            Regelst du immer oder nur wenn an der Wallbox ein Auto lädt?
                            Die Hardwarelimitierung über die DIP-Schalter ist die Obergrenze für currentUser?

                            LimitCurrent benötige ich nicht.

                            S Offline
                            S Offline
                            Sneak-L8
                            wrote on last edited by
                            #1143

                            @gto Siehe Post #1133 - ich regle immer, da ich nicht weiß, wann ein Fahrzeug angesteckt wird und dann die Wallbox bereits runtergeregelt sein sollte.
                            Ja, das "Standardlimit" ist currentHardware, ein anderes Limit kenne ich nicht.

                            G 2 Replies Last reply
                            0
                            • S Sneak-L8

                              @gto Siehe Post #1133 - ich regle immer, da ich nicht weiß, wann ein Fahrzeug angesteckt wird und dann die Wallbox bereits runtergeregelt sein sollte.
                              Ja, das "Standardlimit" ist currentHardware, ein anderes Limit kenne ich nicht.

                              G Offline
                              G Offline
                              gto
                              wrote on last edited by
                              #1144

                              @sneak-l8 Danke, ich teste wenn der Hybrid zuhause ist und gebe dann Bescheid

                              1 Reply Last reply
                              1
                              • S Sneak-L8

                                @gto Siehe Post #1133 - ich regle immer, da ich nicht weiß, wann ein Fahrzeug angesteckt wird und dann die Wallbox bereits runtergeregelt sein sollte.
                                Ja, das "Standardlimit" ist currentHardware, ein anderes Limit kenne ich nicht.

                                G Offline
                                G Offline
                                gto
                                wrote on last edited by
                                #1145

                                @sneak-l8 Hallo Sneak
                                Leider ist ein Fehler im Adapter. Es erfolgt keine Regelung.
                                Ich habe "maximaler Strom/Phase" auf 32000mA, hier die Phasenwerte und der "currentUser". Die Werte sind um 17:49 registriert.
                                6f856402-8696-4314-ab80-838f10f892bc-image.png

                                Debug-Log:
                                LOG.txt

                                S 1 Reply Last reply
                                0
                                • G gto

                                  @sneak-l8 Hallo Sneak
                                  Leider ist ein Fehler im Adapter. Es erfolgt keine Regelung.
                                  Ich habe "maximaler Strom/Phase" auf 32000mA, hier die Phasenwerte und der "currentUser". Die Werte sind um 17:49 registriert.
                                  6f856402-8696-4314-ab80-838f10f892bc-image.png

                                  Debug-Log:
                                  LOG.txt

                                  S Offline
                                  S Offline
                                  Sneak-L8
                                  wrote on last edited by
                                  #1146

                                  @gto Kannst Du noch mal die neuste Version ziehen? Hatte heute Morgen noch ergänzt, dass im Debug log auch die Einzel-Werte aus der Berechnung ausgegeben werden. Jetzt hab ich noch einen State statistics.maxAmperage ergänzt, in dem Du immer die aktuelle Begrenzung siehst.
                                  Und schicke bitte auch mal ein Screenshot der Konfig (gerne aus dem Log).
                                  Evtl. hast Du die Einheit für das EnergyMeter noch auf mA stehen?

                                  G 1 Reply Last reply
                                  0
                                  • S Sneak-L8

                                    @gto Kannst Du noch mal die neuste Version ziehen? Hatte heute Morgen noch ergänzt, dass im Debug log auch die Einzel-Werte aus der Berechnung ausgegeben werden. Jetzt hab ich noch einen State statistics.maxAmperage ergänzt, in dem Du immer die aktuelle Begrenzung siehst.
                                    Und schicke bitte auch mal ein Screenshot der Konfig (gerne aus dem Log).
                                    Evtl. hast Du die Einheit für das EnergyMeter noch auf mA stehen?

                                    G Offline
                                    G Offline
                                    gto
                                    wrote on last edited by gto
                                    #1147

                                    @sneak-l8 neueste Version installiert
                                    Debug-LOG
                                    LOG.txt

                                    Info-Log
                                    Info-Log.txt

                                    Einstellungen zur Leistungsbegrenzung
                                    Config.zip

                                    Ich denke deine Umrechnung A in mA stimmt nicht, ich habe gerade einen Fixwert von 25A an einer Phase eingegeben und der Wert statistics.maxAmperage ist 31975.

                                    kecontact.0
                                    2025-02-24 20:51:55.301 debug Available max amperage: 31975

                                    kecontact.0
                                    2025-02-24 20:51:55.301 debug amperage of mains: 25/-3.39/-4.15, amperage of charging station: 0/0/0 => available: 31975/32003.39/32004.15

                                    S 1 Reply Last reply
                                    0
                                    • G gto

                                      @sneak-l8 neueste Version installiert
                                      Debug-LOG
                                      LOG.txt

                                      Info-Log
                                      Info-Log.txt

                                      Einstellungen zur Leistungsbegrenzung
                                      Config.zip

                                      Ich denke deine Umrechnung A in mA stimmt nicht, ich habe gerade einen Fixwert von 25A an einer Phase eingegeben und der Wert statistics.maxAmperage ist 31975.

                                      kecontact.0
                                      2025-02-24 20:51:55.301 debug Available max amperage: 31975

                                      kecontact.0
                                      2025-02-24 20:51:55.301 debug amperage of mains: 25/-3.39/-4.15, amperage of charging station: 0/0/0 => available: 31975/32003.39/32004.15

                                      S Offline
                                      S Offline
                                      Sneak-L8
                                      wrote on last edited by
                                      #1148

                                      @gto Ah, hab die Einheit falsch abfragt, bin aber schon auf der Couch... Muss ich morgen machen, wird evtl. auch übermorgen.

                                      G 1 Reply Last reply
                                      0
                                      • S Sneak-L8

                                        @gto Ah, hab die Einheit falsch abfragt, bin aber schon auf der Couch... Muss ich morgen machen, wird evtl. auch übermorgen.

                                        G Offline
                                        G Offline
                                        gto
                                        wrote on last edited by gto
                                        #1149

                                        @sneak-l8 kein Problem, ich teste gerne wenn du fertig bist, morgen habe ich ohnehin kein Auto zum laden daheim

                                        S 1 Reply Last reply
                                        0
                                        • G gto

                                          @sneak-l8 kein Problem, ich teste gerne wenn du fertig bist, morgen habe ich ohnehin kein Auto zum laden daheim

                                          S Offline
                                          S Offline
                                          Sneak-L8
                                          wrote on last edited by
                                          #1150

                                          @gto So, jetzt bitte nochmal probieren. Jetzt wird im Log auch der neue Wert für die Einheit mitprotokolliert.

                                          G 2 Replies 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
                                          FAQ Cloud / IOT
                                          HowTo: Node.js-Update
                                          HowTo: Backup/Restore
                                          Downloads
                                          BLOG

                                          437

                                          Online

                                          32.7k

                                          Users

                                          82.5k

                                          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