NEWS
Test Adapter Zendure Solarflow
-
@lesiflo sagte in Test Adapter Zendure Solarflow:
Hi, hat schon Mal jemand versucht sich die Daten in kWh umzurechnen. Hab's über den Mittelwert probiert ist aber sehr ungenau.
Hab's mit Hilfe von paul53 selber hinbekommen. Hier meine Lösung:
-
@nograx Nach langer Zeit habe ich mal wieder meine Adapter aktualisiert und nun die 1.0.7 installiert.
Damit scheint der Login zu funktionieren, aber es läuft dann in diesen Fehler.Ich habe das SolarFlow und eine Steckdose die es damals als Vorbesteller dazu gab in meinem Account.
Die Zweite ID scheint zumindest einmalig den Ladestand zu bekommen.zendure-solarflow.0 2024-02-16 13:00:18.410 warn Terminated (UNCAUGHT_EXCEPTION): Without reason zendure-solarflow.0 2024-02-16 13:00:18.403 error The id "s3Xk4x." is invalid. Ids are not allowed to end in "." zendure-solarflow.0 2024-02-16 13:00:18.401 error Error: The id "s3Xk4x." is invalid. Ids are not allowed to end in "." at Validator.validateId (/opt/iobroker/node_modules/@iobroker/js-controller-adapter/build/lib/adapter/validator.js:147:23) at ZendureSolarflow._extendObject (/opt/iobroker/node_modules/@iobroker/js-controller-adapter/build/lib/adapter/adapter.js:2068:25) at ZendureSolarflow.extendObject (/opt/iobroker/node_modules/@iobroker/js-controller-adapter/build/lib/adapter/adapter.js:2051:21) at /opt/iobroker/node_modules/@iobroker/js-controller-common/build/lib/common/tools.js:2037:16 at new Promise (<anonymous>) at ZendureSolarflow.extendObjectAsync (/opt/iobroker/node_modules/@iobroker/js-controller-common/build/lib/common/tools.js:2036:16) at createSolarFlowStates (/opt/iobroker/node_modules/iobroker.zendure-solarflow/build/services/adapterService.js:38:45) zendure-solarflow.0 2024-02-16 13:00:18.397 error unhandled promise rejection: The id "s3Xk4x." is invalid. Ids are not allowed to end in "." zendure-solarflow.0 2024-02-16 13:00:18.396 error Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). zendure-solarflow.0 2024-02-16 13:00:18.353 warn State "zendure-solarflow.0.s3Xk4x..electricLevel" has no existing object, this might lead to an error in future versions
-
@marvw said in Test Adapter Zendure Solarflow:
@nograx Nach langer Zeit habe ich mal wieder meine Adapter aktualisiert und nun die 1.0.7 installiert.
Damit scheint der Login zu funktionieren, aber es läuft dann in diesen Fehler.Ich habe das SolarFlow und eine Steckdose die es damals als Vorbesteller dazu gab in meinem Account.
Die Zweite ID scheint zumindest einmalig den Ladestand zu bekommen.zendure-solarflow.0 2024-02-16 13:00:18.410 warn Terminated (UNCAUGHT_EXCEPTION): Without reason zendure-solarflow.0 2024-02-16 13:00:18.403 error The id "s3Xk4x." is invalid. Ids are not allowed to end in "." zendure-solarflow.0 2024-02-16 13:00:18.401 error Error: The id "s3Xk4x." is invalid. Ids are not allowed to end in "." at Validator.validateId (/opt/iobroker/node_modules/@iobroker/js-controller-adapter/build/lib/adapter/validator.js:147:23) at ZendureSolarflow._extendObject (/opt/iobroker/node_modules/@iobroker/js-controller-adapter/build/lib/adapter/adapter.js:2068:25) at ZendureSolarflow.extendObject (/opt/iobroker/node_modules/@iobroker/js-controller-adapter/build/lib/adapter/adapter.js:2051:21) at /opt/iobroker/node_modules/@iobroker/js-controller-common/build/lib/common/tools.js:2037:16 at new Promise (<anonymous>) at ZendureSolarflow.extendObjectAsync (/opt/iobroker/node_modules/@iobroker/js-controller-common/build/lib/common/tools.js:2036:16) at createSolarFlowStates (/opt/iobroker/node_modules/iobroker.zendure-solarflow/build/services/adapterService.js:38:45) zendure-solarflow.0 2024-02-16 13:00:18.397 error unhandled promise rejection: The id "s3Xk4x." is invalid. Ids are not allowed to end in "." zendure-solarflow.0 2024-02-16 13:00:18.396 error Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). zendure-solarflow.0 2024-02-16 13:00:18.353 warn State "zendure-solarflow.0.s3Xk4x..electricLevel" has no existing object, this might lead to an error in future versions
Hat sich gerade erledigt, bin noch einmal den ganzen Thread durchgegangen.
Es liegt tatsächlich an der Steckdose, habe mir einen zweiten Account erstellt und SolarFlow freigegeben.
Damit funktioniert es nun wunderbar. -
Hallo Zusammen, habe mir auch mal den Adapter installiert. Nach ein paar Schwierigkeiten funktioniert es auch.
@lesiflo hat ja schon über Blockly es geschafft die Kwh zu berechnen. Das würde ich auch gerne machen aber der Blockly übersteigt mein Wissen um das nachzubauen Gibt es dazu mehr Details wie ich den aufbaue? Ich habe ein shelly pro 3em und habe dadurch meinen Gesamtverbrauch, hätte aber gerne die KWh pro Tag die von dem Balkonkraftwerk kommen, damit ich genau rechnen und anzeigen kann, wie sich mein Verbrauch zusammen setzt. Was wäre da am einfachsten, dass zu bewerkstelligen? -
Könntest du vielleicht dein Blockly Code für die Umrechnung W in Kwh hier frei verfügbar machen, damit ich diesen bei mir importieren kann?
Dann würde ich versuchen, dass bei mir anzupassen. Das würde sehr helfen denke ich... -
Hallo zusammen,
hier der Blockly-Code für die Umrechnung in kWh
<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable id="gn:HU~SCGvnqbRCRMSCy">Neustart</variable> <variable id="H`8%Q[C];S#Po%f%^,*[">energie</variable> <variable id="B].n@]e_d8kNxs]d-Ky|">Laden_Akku</variable> <variable id="Ua?)Az%)A;%j}Z?Y(@qh">Entladen_Akku</variable> <variable id="rNmt]Ylyn6~w3v(K59#b">Abgabe_Haus</variable> <variable id="6-EW?O6)X$_9j`r)iuXZ">energie_start</variable> </variables> <block type="comment" id="j2:aNxn%Er`8Q_}@!!P$" x="488" y="1388"> <field name="COMMENT">Reset Tageswerte</field> <next> <block type="schedule" id="]L}6=Uyw4CKieYA8qo*{"> <field name="SCHEDULE">2 0 * * *</field> <statement name="STATEMENT"> <block type="control" id="wO]+tfPu:O]@8vg4)@^w"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Eigene_Variablen.PV.Solarflow.packInputPower_kWh</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="0-8b%VD~nqwRqI#LWXFs"> <field name="NUM">0</field> </block> </value> <next> <block type="control" id=":Xx0TE*B2+5{)MCyETx9"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Eigene_Variablen.PV.Solarflow.outputPackPower_kWh</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="%F@$?A{uLGsZVc@9nVkI"> <field name="NUM">0</field> </block> </value> <next> <block type="control" id="!Ssd`Ac.tsL+mEscm.y!"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Eigene_Variablen.PV.Solarflow.solarInputPower_kWh</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="B.yO.QUgA{;$4X?-g8,h"> <field name="NUM">0</field> </block> </value> <next> <block type="control" id="EW#t.vr$F-%Xm}DI79r$"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Eigene_Variablen.PV.Solarflow.outputHomePower_kWh</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id=")~K]8GK6@)ZJoFk(PTjL"> <field name="NUM">0</field> </block> </value> <next> <block type="variables_set" id="RfP%gUCE_#E^hZzbQAYj"> <field name="VAR" id="H`8%Q[C];S#Po%f%^,*[">energie</field> <value name="VALUE"> <block type="get_object" id="fhJ-zn1s(d8_~@ror)Ga"> <field name="OID">0_userdata.0.Eigene_Variablen.PV.Solarflow.solarInputPower_kWh</field> </block> </value> <next> <block type="variables_set" id="gw70B~d](MZS^tlJL$ZE"> <field name="VAR" id="B].n@]e_d8kNxs]d-Ky|">Laden_Akku</field> <value name="VALUE"> <block type="get_object" id="nvgxO+GU:/NYyfGjd(T7"> <field name="OID">0_userdata.0.Eigene_Variablen.PV.Solarflow.packInputPower_kWh</field> </block> </value> <next> <block type="variables_set" id="(HL3sW/GTkqUWTykp!IY"> <field name="VAR" id="Ua?)Az%)A;%j}Z?Y(@qh">Entladen_Akku</field> <value name="VALUE"> <block type="get_object" id="k8M@bC*%_F78uSqVwepP"> <field name="OID">0_userdata.0.Eigene_Variablen.PV.Solarflow.outputPackPower_kWh</field> </block> </value> <next> <block type="variables_set" id=".j`=}xOL2?JBtSp_b6LK"> <field name="VAR" id="rNmt]Ylyn6~w3v(K59#b">Abgabe_Haus</field> <value name="VALUE"> <block type="get_object" id="c[)j_kHXIV/jwf7+(%gs"> <field name="OID">0_userdata.0.Eigene_Variablen.PV.Solarflow.outputHomePower_kWh</field> </block> </value> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </statement> <next> <block type="variables_set" id="A.e$V`ynjg0#}qJnFF)w"> <field name="VAR" id="gn:HU~SCGvnqbRCRMSCy">Neustart</field> <value name="VALUE"> <block type="logic_boolean" id="9Lm!l6t-vOXOddA~3mJg"> <field name="BOOL">TRUE</field> </block> </value> <next> <block type="comment" id="RV+eO`6:RC~uyK=4f_nx"> <field name="COMMENT">Produktion PV</field> <next> <block type="variables_set" id="AgB0uh?CsFR}.}ii/]lj"> <field name="VAR" id="H`8%Q[C];S#Po%f%^,*[">energie</field> <value name="VALUE"> <block type="get_object" id="LHEv}In-fr%NySNK.%#/"> <field name="OID">0_userdata.0.Eigene_Variablen.PV.Solarflow.solarInputPower_kWh</field> </block> </value> <next> <block type="on_ext" id="TZZI45[#ikP]~r)[F#^K"> <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="FYq7rQr_UY1$l*O%mT96"> <field name="oid">zendure-solarflow.0.73bkTV.7rk1nVD9.solarInputPower</field> </shadow> </value> <statement name="STATEMENT"> <block type="controls_if" id="9ONCtcSN=;/2qz9[DzO~"> <value name="IF0"> <block type="logic_compare" id="4EEJBi[?ILa5iGd=EP**"> <field name="OP">GT</field> <value name="A"> <block type="on_source" id="^t~l#qd|9b]s|+=[u^;5"> <field name="ATTR">state.val</field> </block> </value> <value name="B"> <block type="math_number" id="pmxSrG=-GuXXA_}`$X1D"> <field name="NUM">0</field> </block> </value> </block> </value> <statement name="DO0"> <block type="math_change" id="4l|3nJK3ab*a;%4oOEr:"> <field name="VAR" id="H`8%Q[C];S#Po%f%^,*[">energie</field> <value name="DELTA"> <shadow type="math_number" id=",5ZCZx[AyTZPJRCD4}~t"> <field name="NUM">1</field> </shadow> <block type="math_arithmetic" id="*TjAL)Qm[^ij,1^%-zFp" inline="false"> <field name="OP">DIVIDE</field> <value name="A"> <shadow type="math_number" id="7TDAa@37OuJ`vcT;P%*S"> <field name="NUM">1</field> </shadow> <block type="math_arithmetic" id="f-yO-QtK`#*o44p4l~(z" inline="false"> <field name="OP">MULTIPLY</field> <value name="A"> <shadow type="math_number" id="5~%F;bHMxZ^filO5NJlP"> <field name="NUM">1</field> </shadow> <block type="on_source" id=":[cP3-xt`]9uOyB~EA0|"> <field name="ATTR">oldState.val</field> </block> </value> <value name="B"> <shadow type="math_number" id="pL#ugPnA,fA?t^ZJgf.Y"> <field name="NUM">1</field> </shadow> <block type="math_arithmetic" id="Lg(3A*d,5?1Nb.q|gM=s"> <field name="OP">MINUS</field> <value name="A"> <shadow type="math_number" id="vD5aC,I(S]J9iOZ+c4J-"> <field name="NUM">1</field> </shadow> <block type="on_source" id="Znb.rqcqheWmt5$ect[t"> <field name="ATTR">state.lc</field> </block> </value> <value name="B"> <shadow type="math_number" id="RlrE5saDi)]Sef;L+Ayu"> <field name="NUM">1</field> </shadow> <block type="on_source" id="sC$AGCU(o~$];AuwLfa_"> <field name="ATTR">oldState.lc</field> </block> </value> </block> </value> </block> </value> <value name="B"> <shadow type="math_number" id="f6(R_NuM*Zwyrg-(qhk}"> <field name="NUM">3600000000</field> </shadow> </value> </block> </value> <next> <block type="update" id="CII[{jcsb@hcMs[d|BQ("> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Eigene_Variablen.PV.Solarflow.solarInputPower_kWh</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_rndfixed" id="~?Jqw`YNch87/XxEuB~~"> <field name="n">3</field> <value name="x"> <shadow type="math_number" id="${2/m,%T*ULKInSPhEs;"> <field name="NUM">3.1234</field> </shadow> <block type="variables_get" id=";gMk*PhZzVvIU5*ye4Zc"> <field name="VAR" id="H`8%Q[C];S#Po%f%^,*[">energie</field> </block> </value> </block> </value> <next> <block type="control" id="Q!_jCcJF^7_-(qn6CvZ,"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">mqtt.0.openWB.set.pv.2.WhCounter</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_arithmetic" id="Ea`xv/s7NDugI.AC@N@g" inline="false"> <field name="OP">MULTIPLY</field> <value name="A"> <shadow type="math_number" id="N=7tsj%3fV7yT+T#m[MR"> <field name="NUM">1</field> </shadow> <block type="get_value" id="pmeKMtFb8gwAO1?l@QVQ"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.Eigene_Variablen.PV.Solarflow.solarInputPower_kWh</field> </block> </value> <value name="B"> <shadow type="math_number" id="w`C6H+RV?nMM32v2P^09"> <field name="NUM">1000</field> </shadow> </value> </block> </value> <next> <block type="controls_if" id="l?PM69}O3Ny(k|n,4W!q" collapsed="true" disabled="true"> <mutation else="1"></mutation> <value name="IF0"> <block type="logic_compare" id="dxSHTy}..dX]31ELC?+*"> <field name="OP">EQ</field> <value name="A"> <block type="variables_get" id="n5dslA_mI9Ou])Gyt:6A"> <field name="VAR" id="gn:HU~SCGvnqbRCRMSCy">Neustart</field> </block> </value> <value name="B"> <block type="logic_boolean" id="+uGx@r9=;yzVQ77vRIlg"> <field name="BOOL">TRUE</field> </block> </value> </block> </value> <statement name="DO0"> <block type="update" id="+|K^3$jkXW`=X}0xU/bc"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Eigene_Variablen.PV.Solarflow.solarInputPower_kWh</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_arithmetic" id="-fCShKtoQ)Ha2}/)PnuI"> <field name="OP">ADD</field> <value name="A"> <shadow type="math_number" id="OgbG}/M{KA~DNG^NVzQd"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="oo#pN(_vd0J(fEiw~B_x"> <field name="VAR" id="6-EW?O6)X$_9j`r)iuXZ">energie_start</field> </block> </value> <value name="B"> <shadow type="math_number" id="wPrBhM!5:VdrFq{;y9MF"> <field name="NUM">1</field> </shadow> <block type="math_rndfixed" id="=Ztd-ze#r??+IaxSV}ua"> <field name="n">3</field> <value name="x"> <shadow type="math_number" id="${2/m,%T*ULKInSPhEs;"> <field name="NUM">3.1234</field> </shadow> <block type="variables_get" id="v^;XU0)KEjM9-|/K~Bo4"> <field name="VAR" id="H`8%Q[C];S#Po%f%^,*[">energie</field> </block> </value> </block> </value> </block> </value> <next> <block type="variables_set" id="jGEZLQ^+h]kw.X(h]dO!"> <field name="VAR" id="gn:HU~SCGvnqbRCRMSCy">Neustart</field> <value name="VALUE"> <block type="logic_boolean" id="w+YH-t6C!S|2;e.pm;aQ"> <field name="BOOL">FALSE</field> </block> </value> </block> </next> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </statement> </block> </statement> <next> <block type="comment" id="S[uq}2B1D)vx]H[TnOay"> <field name="COMMENT">Berechnung Akku laden in kWh</field> <next> <block type="variables_set" id="Vx{@=gl.R24%PVZg^HjH"> <field name="VAR" id="B].n@]e_d8kNxs]d-Ky|">Laden_Akku</field> <value name="VALUE"> <block type="get_object" id="}PPbjk$IqE~P,cG)tO;Z"> <field name="OID">0_userdata.0.Eigene_Variablen.PV.Solarflow.packInputPower_kWh</field> </block> </value> <next> <block type="on_ext" id="tA7mP|%Y5`?gn6w1L-|D"> <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="N7O~V4f9c?ea+dU1L`:X"> <field name="oid">zendure-solarflow.0.73bkTV.7rk1nVD9.outputPackPower</field> </shadow> </value> <statement name="STATEMENT"> <block type="controls_if" id=")7LDT=K6QU!2Mi~2:ch["> <value name="IF0"> <block type="logic_compare" id="~|FCyyy5ewSEEN=g(M/."> <field name="OP">GT</field> <value name="A"> <block type="on_source" id="P-hhEf#);IW^2rvTpOl~"> <field name="ATTR">state.val</field> </block> </value> <value name="B"> <block type="math_number" id="b[5`?J9:V/-r9#MPS,I~"> <field name="NUM">0</field> </block> </value> </block> </value> <statement name="DO0"> <block type="math_change" id="3D[l(^?)Z9jp74dD.IzF"> <field name="VAR" id="B].n@]e_d8kNxs]d-Ky|">Laden_Akku</field> <value name="DELTA"> <shadow type="math_number" id=",5ZCZx[AyTZPJRCD4}~t"> <field name="NUM">1</field> </shadow> <block type="math_arithmetic" id="3KN-HkP.|^dECn0i2/5#" inline="false"> <field name="OP">DIVIDE</field> <value name="A"> <shadow type="math_number" id="7TDAa@37OuJ`vcT;P%*S"> <field name="NUM">1</field> </shadow> <block type="math_arithmetic" id="@Sf}+Gea0jl=,%LWIFo2" inline="false"> <field name="OP">MULTIPLY</field> <value name="A"> <shadow type="math_number" id="5~%F;bHMxZ^filO5NJlP"> <field name="NUM">1</field> </shadow> <block type="on_source" id="$^@Qa.}3uMQQJvd+da*1"> <field name="ATTR">oldState.val</field> </block> </value> <value name="B"> <shadow type="math_number" id="pL#ugPnA,fA?t^ZJgf.Y"> <field name="NUM">1</field> </shadow> <block type="math_arithmetic" id="#WpJ!YOf-_7#7PC5pBa5"> <field name="OP">MINUS</field> <value name="A"> <shadow type="math_number" id="vD5aC,I(S]J9iOZ+c4J-"> <field name="NUM">1</field> </shadow> <block type="on_source" id="{n03WD2#*3bft/ra((e5"> <field name="ATTR">state.lc</field> </block> </value> <value name="B"> <shadow type="math_number" id="RlrE5saDi)]Sef;L+Ayu"> <field name="NUM">1</field> </shadow> <block type="on_source" id="4*MM-y!,o-]x%L{|$FGf"> <field name="ATTR">oldState.lc</field> </block> </value> </block> </value> </block> </value> <value name="B"> <shadow type="math_number" id="BZE$ono{@LG}q4`:/JE6"> <field name="NUM">3600000000</field> </shadow> </value> </block> </value> <next> <block type="update" id="qXnE^jarf]|@.iM]pXSN"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Eigene_Variablen.PV.Solarflow.packInputPower_kWh</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_rndfixed" id="As^GC*c3c#/ovcCj[Izk"> <field name="n">3</field> <value name="x"> <shadow type="math_number" id="${2/m,%T*ULKInSPhEs;"> <field name="NUM">3.1234</field> </shadow> <block type="variables_get" id="DVvB(,~+n;u?KX$i-3+{"> <field name="VAR" id="B].n@]e_d8kNxs]d-Ky|">Laden_Akku</field> </block> </value> </block> </value> <next> <block type="control" id="[)VC.[VO$|K8PP2]tY67"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">mqtt.0.openWB.set.houseBattery.WhImported</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_arithmetic" id="AhC[[X(wwlT`p31ph@gH" inline="false"> <field name="OP">MULTIPLY</field> <value name="A"> <shadow type="math_number" id="N=7tsj%3fV7yT+T#m[MR"> <field name="NUM">1</field> </shadow> <block type="get_value" id="?,B:`OZ!(-V](MS~Z[jR"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.Eigene_Variablen.PV.Solarflow.packInputPower_kWh</field> </block> </value> <value name="B"> <shadow type="math_number" id="095(Ty8?(Bn804.AK%N@"> <field name="NUM">1000</field> </shadow> </value> </block> </value> <next> <block type="control" id="Z.d+spg1v98-k{7QJ@39"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">mqtt.0.openWB.housebattery.DailyYieldImportKwh</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="get_value" id="APZmsgLZl?fAgf?xyAEd"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.Eigene_Variablen.PV.Solarflow.packInputPower_kWh</field> </block> </value> </block> </next> </block> </next> </block> </next> </block> </statement> </block> </statement> <next> <block type="comment" id="c=~;P.ij`)3VXFF.QfJ9"> <field name="COMMENT">Berechnung Akku entladen in kWh</field> <next> <block type="variables_set" id=".iXLd,+o.#.:FMuVq*:F"> <field name="VAR" id="Ua?)Az%)A;%j}Z?Y(@qh">Entladen_Akku</field> <value name="VALUE"> <block type="get_object" id="5#B%R6?L%PE)#VFhs8wc"> <field name="OID">0_userdata.0.Eigene_Variablen.PV.Solarflow.outputPackPower_kWh</field> </block> </value> <next> <block type="on_ext" id="!BqpT6L5Jt9!dy}Om1f_"> <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="-$}N.4QXm{r96x(/6LPZ"> <field name="oid">zendure-solarflow.0.73bkTV.7rk1nVD9.packInputPower</field> </shadow> </value> <statement name="STATEMENT"> <block type="controls_if" id="8v:aj[g:]uaMl].C1`_."> <value name="IF0"> <block type="logic_compare" id="H3slbvS[c!1Lq#r^W74f"> <field name="OP">GT</field> <value name="A"> <block type="on_source" id="f.E$s3*Wp/UKOokR7Lob"> <field name="ATTR">state.val</field> </block> </value> <value name="B"> <block type="math_number" id="#~(=zoaXW2j_5O/GTH$U"> <field name="NUM">0</field> </block> </value> </block> </value> <statement name="DO0"> <block type="math_change" id="riS3c}TAcXe_!!.plM@F"> <field name="VAR" id="Ua?)Az%)A;%j}Z?Y(@qh">Entladen_Akku</field> <value name="DELTA"> <shadow type="math_number" id=",5ZCZx[AyTZPJRCD4}~t"> <field name="NUM">1</field> </shadow> <block type="math_arithmetic" id="hT!A95o{|l`Dl-*L8~w0" inline="false"> <field name="OP">DIVIDE</field> <value name="A"> <shadow type="math_number" id="7TDAa@37OuJ`vcT;P%*S"> <field name="NUM">1</field> </shadow> <block type="math_arithmetic" id="7h1m+`RNUVw,v~tSaaM8" inline="false"> <field name="OP">MULTIPLY</field> <value name="A"> <shadow type="math_number" id="5~%F;bHMxZ^filO5NJlP"> <field name="NUM">1</field> </shadow> <block type="on_source" id="nb4yu%3.-{i95)0NjX?q"> <field name="ATTR">oldState.val</field> </block> </value> <value name="B"> <shadow type="math_number" id="pL#ugPnA,fA?t^ZJgf.Y"> <field name="NUM">1</field> </shadow> <block type="math_arithmetic" id="(k3DD)L{Sr1[9px73+zv"> <field name="OP">MINUS</field> <value name="A"> <shadow type="math_number" id="vD5aC,I(S]J9iOZ+c4J-"> <field name="NUM">1</field> </shadow> <block type="on_source" id="[d3)`-(trr7]Jc,DR!vG"> <field name="ATTR">state.lc</field> </block> </value> <value name="B"> <shadow type="math_number" id="RlrE5saDi)]Sef;L+Ayu"> <field name="NUM">1</field> </shadow> <block type="on_source" id="!WejTQC/;ZkuwWS[LORL"> <field name="ATTR">oldState.lc</field> </block> </value> </block> </value> </block> </value> <value name="B"> <shadow type="math_number" id="rshwP?x0IX=aDOk|T6qZ"> <field name="NUM">3600000000</field> </shadow> </value> </block> </value> <next> <block type="update" id=";^JXx3vl[5u[6j}uIq(0"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Eigene_Variablen.PV.Solarflow.outputPackPower_kWh</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_rndfixed" id="o4%pJbXN;{br1M}:2,Sa"> <field name="n">3</field> <value name="x"> <shadow type="math_number" id="${2/m,%T*ULKInSPhEs;"> <field name="NUM">3.1234</field> </shadow> <block type="variables_get" id="e6xZibt(AEyrALe;?(`j"> <field name="VAR" id="Ua?)Az%)A;%j}Z?Y(@qh">Entladen_Akku</field> </block> </value> </block> </value> <next> <block type="control" id="(06jUc?xnQ,eg+64uDv`"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">mqtt.0.openWB.set.houseBattery.WhExported</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_arithmetic" id="G%YwXy}:JLdYme*1aOEN" inline="false"> <field name="OP">MULTIPLY</field> <value name="A"> <shadow type="math_number" id="N=7tsj%3fV7yT+T#m[MR"> <field name="NUM">1</field> </shadow> <block type="get_value" id="PH#Ytw3L8+aUa)$O|p3m"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.Eigene_Variablen.PV.Solarflow.outputPackPower_kWh</field> </block> </value> <value name="B"> <shadow type="math_number" id="D|T1ZM^54Ur/]np;jQ~L"> <field name="NUM">1000</field> </shadow> </value> </block> </value> <next> <block type="control" id="Y9A7~$-]]w7U3_Q~8{z." disabled="true"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">mqtt.0.openWB.housebattery.DailyYieldExportKwh</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="get_value" id="eu()*N4cXr):1jd}|iRA"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.Eigene_Variablen.PV.Solarflow.packInputPower_kWh</field> </block> </value> </block> </next> </block> </next> </block> </next> </block> </statement> </block> </statement> <next> <block type="comment" id="!Rz`~!wnwyL0;![Qh:}p"> <field name="COMMENT">Berechnung Abgabe Haus in kWh</field> <next> <block type="variables_set" id="m5[7D*Dasi6r#F2/!+c!"> <field name="VAR" id="rNmt]Ylyn6~w3v(K59#b">Abgabe_Haus</field> <value name="VALUE"> <block type="get_object" id="0;Fed2($nZ._EJVqt_hI"> <field name="OID">0_userdata.0.Eigene_Variablen.PV.Solarflow.outputHomePower_kWh</field> </block> </value> <next> <block type="on_ext" id="lu.)LCKv`g8i-n#_TISE"> <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="N3{ZrX7f+OsMsIP#/U9i"> <field name="oid">zendure-solarflow.0.73bkTV.7rk1nVD9.outputHomePower</field> </shadow> </value> <statement name="STATEMENT"> <block type="controls_if" id="+G8hcCGY@}X{m=_./ZS9"> <value name="IF0"> <block type="logic_compare" id="6?gQo4NovHN[5^(I,XC4"> <field name="OP">GT</field> <value name="A"> <block type="on_source" id="/),v0q8DTHi1duT7Tgk2"> <field name="ATTR">state.val</field> </block> </value> <value name="B"> <block type="math_number" id="BB)1-0}6e._yDF76=WOt"> <field name="NUM">0</field> </block> </value> </block> </value> <statement name="DO0"> <block type="math_change" id="fOOtZ|OD;Zg^wc=%q-vu"> <field name="VAR" id="rNmt]Ylyn6~w3v(K59#b">Abgabe_Haus</field> <value name="DELTA"> <shadow type="math_number" id=",5ZCZx[AyTZPJRCD4}~t"> <field name="NUM">1</field> </shadow> <block type="math_arithmetic" id="6`d(*2r1-^(nDnP22u}Y" inline="false"> <field name="OP">DIVIDE</field> <value name="A"> <shadow type="math_number" id="7TDAa@37OuJ`vcT;P%*S"> <field name="NUM">1</field> </shadow> <block type="math_arithmetic" id=":(v{J5s[tylm.H@s?]DL" inline="false"> <field name="OP">MULTIPLY</field> <value name="A"> <shadow type="math_number" id="5~%F;bHMxZ^filO5NJlP"> <field name="NUM">1</field> </shadow> <block type="on_source" id="H$z%4dk~6,]g.tJqB{L5"> <field name="ATTR">oldState.val</field> </block> </value> <value name="B"> <shadow type="math_number" id="pL#ugPnA,fA?t^ZJgf.Y"> <field name="NUM">1</field> </shadow> <block type="math_arithmetic" id="=~~6_;L{LVTuz+}g!4.p"> <field name="OP">MINUS</field> <value name="A"> <shadow type="math_number" id="vD5aC,I(S]J9iOZ+c4J-"> <field name="NUM">1</field> </shadow> <block type="on_source" id="?Fp$bU#F^_Hg*XTrF]`^"> <field name="ATTR">state.lc</field> </block> </value> <value name="B"> <shadow type="math_number" id="RlrE5saDi)]Sef;L+Ayu"> <field name="NUM">1</field> </shadow> <block type="on_source" id="L^%o@Qx+t:=j#mGtra=E"> <field name="ATTR">oldState.lc</field> </block> </value> </block> </value> </block> </value> <value name="B"> <shadow type="math_number" id="_[!N:%RqJ25HdZ}=i7=-"> <field name="NUM">3600000000</field> </shadow> </value> </block> </value> <next> <block type="update" id="NVg/pYOb]:Z0#~Y4x~^c"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Eigene_Variablen.PV.Solarflow.outputHomePower_kWh</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_rndfixed" id="uT1DuxRN5JQjq:xj(%`+"> <field name="n">3</field> <value name="x"> <shadow type="math_number" id="${2/m,%T*ULKInSPhEs;"> <field name="NUM">3.1234</field> </shadow> <block type="variables_get" id="/AI?+5SzC8*}70Yiw`In"> <field name="VAR" id="rNmt]Ylyn6~w3v(K59#b">Abgabe_Haus</field> </block> </value> </block> </value> </block> </next> </block> </statement> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </xml>
-
@lesiflo
Super danke dir. Dann versuche ich mich mal dran. -
Habe das Blocky mal importiert und entsprechend meine Datenpunkte eingetragen.
Mal sehen ob sich was tut, falls Morgen die Sonne scheint.Ich habe nur erstmal die mqtt Blöcke deaktiviert:
Wofür werden die benötigt? Und falls ich diese benötige, was muss ich dafür machen um das einzurichten?
Würde mich freuen, wenn ich da nochmal Hilfe bekomme...
Danke
-
@flojo Die brauche ich für die Weiterleitung der Daten an openWB (Wallbox). Kannst du also komplett rauslöschen.
-
-
@lesiflo danke erstmal! Ich hab allerdings noch nicht ganz verstanden, was Du damit genau machst. Wo laufen die Daten hin bzw. wie werden die später dann visualisiert?
Danke für ein paar mehr Details!
-
@diet99 z.B. dafür:
Widget oben links und unten rechts
-
@nograx: Hi, ich habe heute ein Firmware-Update vom Master auf V2.0.38 gemacht, seit dem kommen keine Daten mehr für pvPower1 und pwPower2 rein. Hat sich da eventuell etwas in der Datenstruktur/Namen verändert? Auf Github steht solarPower1 und solarPower2. Oder hast du das für den Adapter umbenannt?
-
@lesiflo Hi, ich habe die beiden Eingänge nur getauscht, weil Zendure in der App das auch so macht... kann das gerade leider nicht verifizieren, habe das Update noch nicht drauf - und lasse mir in der Regel immer etwas Zeit damit. Gab zuletzt ja auch öfters Probleme mit den Updates, und aktuell läuft mein System sehr zuverlässig. Never change a running system
Können das andere auch nachvollziehen?
-
@nograx Kann ich bestätigen. Die einzelnen Solarleistungen werden nicht mehr angezeigt:
-
@nograx OK, dann warte ich bis du auch so weit bist. Der Rest funktioniert ja.
Eventuell kannst du ja noch die Berechnung in kWh von mir mit aufnehmen, nur so als Vorschlag. Die API liefert das ja nicht. Die errechneten Werte stimmen ziemlich genau mit denen der App überein. -
Klappt bei euch die Ausgabe der Lade/Entladezeit? Da ich hier keine Werte bekomme errechne ich mir das selber.
Akkukapazität in Ah = Akkuanzahl x Kapazität/Ah: 2 x 20 Ah = 40 Ah (bei 2 x AB1000)
Spannung_PV_Panel = Spannung des Moduls bei max. Leistung (aus Datenblatt vom Panel)Die Variablen für "remainInputTime" und "remainOutTime" müsst ihr am besten unter 0_userdata.0 selber anlegen. Evtl. eigene Namen vergeben.
Ladezeit:
Entladezeit:
Export Blockly
<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable id="y{EyYfI6aqO8WcNtPY2w">Akkukapazität</variable> <variable id="JcbPVIO%aKu!SI`JU!JD">Spannung_PV_Panel</variable> <variable id="!sszI/Un!f$3Hn!1tk]B">Restakku</variable> <variable id="}bL170$YMV{_n7LhpGBh">Ladestrom</variable> <variable id="`lOge52h.+zOY`PGJnbm">Ladezeit</variable> <variable id="O^EBe~zb4T$B=87LqdjD">ladezeit_min</variable> <variable id="=VOm[,NN_4Fw5ed:086w">ladezeit_std</variable> </variables> <block type="comment" id="0^!mX,ag|{B$l?KZ}|UK" x="775" y="539"> <field name="COMMENT">Ladezeit berechnen</field> <next> <block type="variables_set" id="%Vl9XZ[$GMcs[`qohyq?"> <field name="VAR" id="y{EyYfI6aqO8WcNtPY2w">Akkukapazität</field> <value name="VALUE"> <block type="math_number" id="V^nvYM1W~tFYLcrSW%?r"> <field name="NUM">38.4</field> </block> </value> <next> <block type="variables_set" id="pg#LClGOjY,#MY7d0jzj"> <field name="VAR" id="JcbPVIO%aKu!SI`JU!JD">Spannung_PV_Panel</field> <value name="VALUE"> <block type="math_number" id="PA8C_0?Qc{R8fas-hV1q"> <field name="NUM">31.21</field> </block> </value> <next> <block type="on_ext" id="-*eavH]~|+T`*5!_u%e;"> <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="`_;Zkj?K=RLIsH)Hx2K/"> <field name="oid">zendure-solarflow.0.73bkTV.7rk1nVD9.outputPackPower</field> </shadow> </value> <statement name="STATEMENT"> <block type="variables_set" id="s/YcoZ4hO]7s2=r0JtL^"> <field name="VAR" id="!sszI/Un!f$3Hn!1tk]B">Restakku</field> <value name="VALUE"> <block type="math_arithmetic" id="l2hqe6uq%QR)HjLZp[:)"> <field name="OP">MINUS</field> <value name="A"> <shadow type="math_number" id="U.3*7Od6k;ghubO(hNz8"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="[fcQlzl5H[rk]Q.oM[t0"> <field name="VAR" id="y{EyYfI6aqO8WcNtPY2w">Akkukapazität</field> </block> </value> <value name="B"> <shadow type="math_number" id="tNY#^EVgu|?FCRcVcqRr"> <field name="NUM">1</field> </shadow> <block type="math_arithmetic" id="c#6mk`@C`ErD^`Fqk}Sg" inline="false"> <field name="OP">DIVIDE</field> <value name="A"> <shadow type="math_number" id="3e_E)w^DLR.[*$|bYW!6"> <field name="NUM">1</field> </shadow> <block type="math_arithmetic" id="X/:pi@s:YDVIz14asd1?" inline="false"> <field name="OP">MULTIPLY</field> <value name="A"> <shadow type="math_number" id="z=JnJ[KV?c^5m{Rb,msG"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="C#O;Z){J.o#{DIpd6N?y"> <field name="VAR" id="y{EyYfI6aqO8WcNtPY2w">Akkukapazität</field> </block> </value> <value name="B"> <shadow type="math_number" id="*`j,@!H9ujzx3_f=l4cl"> <field name="NUM">1</field> </shadow> <block type="get_value" id="_I:nxP70pMkv;kI^u66j"> <field name="ATTR">val</field> <field name="OID">zendure-solarflow.0.73bkTV.7rk1nVD9.electricLevel</field> </block> </value> </block> </value> <value name="B"> <shadow type="math_number" id="(4xaN|=t8Ba`uD%{U/H+"> <field name="NUM">100</field> </shadow> </value> </block> </value> </block> </value> <next> <block type="controls_if" id=":UFbeKem?j7-OimUDh3c"> <mutation elseif="1"></mutation> <value name="IF0"> <block type="logic_compare" id=".pvE#7x[T{-RFL?|/70P"> <field name="OP">GT</field> <value name="A"> <block type="get_value" id="H)fS@0:/ZD0qnCcS(Cu5"> <field name="ATTR">val</field> <field name="OID">zendure-solarflow.0.73bkTV.7rk1nVD9.outputPackPower</field> </block> </value> <value name="B"> <block type="math_number" id=").TzP*5M$S[VM]%sH6xx"> <field name="NUM">0</field> </block> </value> </block> </value> <statement name="DO0"> <block type="variables_set" id="h(N?0XJj6L*4Ih,k?-Wb"> <field name="VAR" id="}bL170$YMV{_n7LhpGBh">Ladestrom</field> <value name="VALUE"> <block type="math_arithmetic" id="Diq[[l,%jJoK~SEH%mgV"> <field name="OP">DIVIDE</field> <value name="A"> <shadow type="math_number" id="`s}jI^~:y:H{K?lfg__K"> <field name="NUM">1</field> </shadow> <block type="math_arithmetic" id="}_!SwYmvLqys9]5tA0];"> <field name="OP">DIVIDE</field> <value name="A"> <shadow type="math_number" id="llxw:a{n~#0Eyqq4NYy6"> <field name="NUM">1</field> </shadow> <block type="get_value" id="FRt=/;a{aDwSfX3PV8nx"> <field name="ATTR">val</field> <field name="OID">zendure-solarflow.0.73bkTV.7rk1nVD9.outputPackPower</field> </block> </value> <value name="B"> <shadow type="math_number" id="NL#5MAp_EEg_m4,GUmv+"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="2#|hmH%)^Z,;4b;rg0t)"> <field name="VAR" id="JcbPVIO%aKu!SI`JU!JD">Spannung_PV_Panel</field> </block> </value> </block> </value> <value name="B"> <shadow type="math_number" id="`ZA/6w^SAfpI61756S74"> <field name="NUM">2</field> </shadow> </value> </block> </value> <next> <block type="variables_set" id="Xr5g_mKP!2ms[;a!F7t*"> <field name="VAR" id="`lOge52h.+zOY`PGJnbm">Ladezeit</field> <value name="VALUE"> <block type="math_arithmetic" id="Y2EkD?z!ii7znx{8tzUQ"> <field name="OP">MULTIPLY</field> <value name="A"> <shadow type="math_number" id="I:}-3F3h(R,9Lr:TVQ3`"> <field name="NUM">1</field> </shadow> <block type="math_arithmetic" id=";oFfIK[AcS_$Y*0/I,*X" inline="false"> <field name="OP">DIVIDE</field> <value name="A"> <shadow type="math_number" id="VZ2Ra3A*87J[t{Y2vCm7"> <field name="NUM">1</field> </shadow> <block type="math_arithmetic" id="ha|yev/:juj*Mz3K]4~j" inline="false"> <field name="OP">DIVIDE</field> <value name="A"> <shadow type="math_number" id="X2A9GcU3zX_vWAb_Z%3P"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="}zAgf*nJ%Hvt{w_Oc,=I"> <field name="VAR" id="!sszI/Un!f$3Hn!1tk]B">Restakku</field> </block> </value> <value name="B"> <shadow type="math_number" id="s(bc]%.$C|CI21HcOf1K"> <field name="NUM">1.3</field> </shadow> </value> </block> </value> <value name="B"> <shadow type="math_number" id="A9K?p@IIdLLxXDS1S:Rd"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="xbU:n8FrM:JzTOvc]XCV"> <field name="VAR" id="}bL170$YMV{_n7LhpGBh">Ladestrom</field> </block> </value> </block> </value> <value name="B"> <shadow type="math_number" id="U-s@rqdzd|J{mO|tLsZN"> <field name="NUM">60</field> </shadow> </value> </block> </value> <next> <block type="variables_set" id="Cu62qYG.pn{)]-7k?Dk_"> <field name="VAR" id="O^EBe~zb4T$B=87LqdjD">ladezeit_min</field> <value name="VALUE"> <block type="math_modulo" id="`?T]=8CW9!`l65y9_lA:"> <value name="DIVIDEND"> <shadow type="math_number" id="QZ|BCq[:AYInR?K:plOz"> <field name="NUM">64</field> </shadow> <block type="variables_get" id="wK;;QlJJ?8TI@KVKpECi"> <field name="VAR" id="`lOge52h.+zOY`PGJnbm">Ladezeit</field> </block> </value> <value name="DIVISOR"> <shadow type="math_number" id="Mx_LMHgznO/jsh)a_YvO"> <field name="NUM">60</field> </shadow> </value> </block> </value> <next> <block type="variables_set" id="`%3^%]{=n=omnx//?r.D"> <field name="VAR" id="=VOm[,NN_4Fw5ed:086w">ladezeit_std</field> <value name="VALUE"> <block type="math_arithmetic" id="$8Em0!,(ju2X8:X7?F-f"> <field name="OP">DIVIDE</field> <value name="A"> <shadow type="math_number" id="#)P@)|RD%,^l[4mXA)Qg"> <field name="NUM">1</field> </shadow> <block type="math_arithmetic" id="6Nph4BRdjMeR7ypb/h;x" inline="false"> <field name="OP">MINUS</field> <value name="A"> <shadow type="math_number" id="gk(bxszYj-8oicyU^3X}"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="(h(/9QZc@^$Ibtp@dLR4"> <field name="VAR" id="`lOge52h.+zOY`PGJnbm">Ladezeit</field> </block> </value> <value name="B"> <shadow type="math_number" id="]4~#=gBD*RDDL_(m}ug/"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="E/!m;U7e@*%{qxgTRXN#"> <field name="VAR" id="O^EBe~zb4T$B=87LqdjD">ladezeit_min</field> </block> </value> </block> </value> <value name="B"> <shadow type="math_number" id="Dy!xFuu-eU4pQ-:%=-57"> <field name="NUM">60</field> </shadow> </value> </block> </value> <next> <block type="controls_if" id="6d-pWm-burHQ.*sRJC+9"> <mutation else="1"></mutation> <value name="IF0"> <block type="logic_compare" id="5u$zbiWX0Tb(4Xsnx#.x"> <field name="OP">LT</field> <value name="A"> <block type="variables_get" id="p=wFsc/w|@vus?R?$dUJ"> <field name="VAR" id="O^EBe~zb4T$B=87LqdjD">ladezeit_min</field> </block> </value> <value name="B"> <block type="math_number" id="`-[L)p@1J(NF(,A{g8(Q"> <field name="NUM">10</field> </block> </value> </block> </value> <statement name="DO0"> <block type="control" id="rQz^Bw5l3hI#=EhTBkTs"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation> <field name="OID">0_userdata.0.Eigene_Variablen.PV.Solarflow.remainInputTime</field> <field name="WITH_DELAY">TRUE</field> <field name="DELAY_MS">1000</field> <field name="UNIT">ms</field> <field name="CLEAR_RUNNING">FALSE</field> <value name="VALUE"> <block type="text_join" id="*A5Ks]vzGT4Q|+Z~v`%d"> <mutation items="4"></mutation> <value name="ADD0"> <block type="variables_get" id="~;NB[W.,7VV^nBTL:iXm"> <field name="VAR" id="=VOm[,NN_4Fw5ed:086w">ladezeit_std</field> </block> </value> <value name="ADD1"> <block type="text" id="AXN-`:E6N[c*r*v#^RAH"> <field name="TEXT">:</field> </block> </value> <value name="ADD2"> <block type="text" id=":~CD`PfoOYsHvQ=_7-$,"> <field name="TEXT">0</field> </block> </value> <value name="ADD3"> <block type="math_round" id="#6.cB,SUy]patR)*5$Cv"> <field name="OP">ROUND</field> <value name="NUM"> <shadow type="math_number" id="U+ZA*?oz60S#xQ]rsx0V"> <field name="NUM">3.1</field> </shadow> <block type="variables_get" id="xmgR9jeJEG47+FVO!he."> <field name="VAR" id="O^EBe~zb4T$B=87LqdjD">ladezeit_min</field> </block> </value> </block> </value> </block> </value> </block> </statement> <statement name="ELSE"> <block type="control" id="|w!Rr2kx+Pe0Yn,w.PsE"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation> <field name="OID">0_userdata.0.Eigene_Variablen.PV.Solarflow.remainInputTime</field> <field name="WITH_DELAY">TRUE</field> <field name="DELAY_MS">1000</field> <field name="UNIT">ms</field> <field name="CLEAR_RUNNING">FALSE</field> <value name="VALUE"> <block type="text_join" id="%I|CjdFI!yn`hZ9ZYUAr"> <mutation items="3"></mutation> <value name="ADD0"> <block type="variables_get" id="V;h9~k{YnG_nY(/09sb$"> <field name="VAR" id="=VOm[,NN_4Fw5ed:086w">ladezeit_std</field> </block> </value> <value name="ADD1"> <block type="text" id="tA:JP+r(/3;rkg6be:j-"> <field name="TEXT">:</field> </block> </value> <value name="ADD2"> <block type="math_round" id="~^WNC8MZCwi*w.F?,t9B"> <field name="OP">ROUND</field> <value name="NUM"> <shadow type="math_number" id="U+ZA*?oz60S#xQ]rsx0V"> <field name="NUM">3.1</field> </shadow> <block type="variables_get" id="M6E4q7eD;^fram%+FS%1"> <field name="VAR" id="O^EBe~zb4T$B=87LqdjD">ladezeit_min</field> </block> </value> </block> </value> </block> </value> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </next> </block> </statement> <value name="IF1"> <block type="logic_compare" id="3g;pUDzNW0w3#WSXsB=B"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="QGQ81pMxTZUo40StjM%V"> <field name="ATTR">val</field> <field name="OID">zendure-solarflow.0.73bkTV.7rk1nVD9.packInputPower</field> </block> </value> <value name="B"> <block type="math_number" id="@3v$5PeaR=g)XHY@1#9#"> <field name="NUM">0</field> </block> </value> </block> </value> <statement name="DO1"> <block type="control" id="c6d6_.DK05Af^A4qw}($"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation> <field name="OID">0_userdata.0.Eigene_Variablen.PV.Solarflow.remainInputTime</field> <field name="WITH_DELAY">TRUE</field> <field name="DELAY_MS">1000</field> <field name="UNIT">ms</field> <field name="CLEAR_RUNNING">FALSE</field> <value name="VALUE"> <block type="text" id=":3Dt+0b{~?o*xK#zl@2I"> <field name="TEXT">0</field> </block> </value> </block> </statement> </block> </next> </block> </statement> <next> <block type="comment" id="/kKDTf.b[BXI;3@z?S^U"> <field name="COMMENT">Endladezeit berechnen</field> <next> <block type="on_ext" id="-VY6uVv5|qV1,,%-c0ts"> <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="RVw37Xv/+_l0a|vhZC@D"> <field name="oid">zendure-solarflow.0.73bkTV.7rk1nVD9.packInputPower</field> </shadow> </value> <statement name="STATEMENT"> <block type="variables_set" id="5}r@EE1q%$TVm}M@z!J2"> <field name="VAR" id="!sszI/Un!f$3Hn!1tk]B">Restakku</field> <value name="VALUE"> <block type="math_arithmetic" id="Mi.Sl*eD:fiWEr*E;`4B" inline="false"> <field name="OP">DIVIDE</field> <value name="A"> <shadow type="math_number" id="3e_E)w^DLR.[*$|bYW!6"> <field name="NUM">1</field> </shadow> <block type="math_arithmetic" id="nV=oWUzXOc@Z^EocV:,~" inline="false"> <field name="OP">MULTIPLY</field> <value name="A"> <shadow type="math_number" id="z=JnJ[KV?c^5m{Rb,msG"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="A3DFN1|%W7[ZHsAw{/fK"> <field name="VAR" id="y{EyYfI6aqO8WcNtPY2w">Akkukapazität</field> </block> </value> <value name="B"> <shadow type="math_number" id="*`j,@!H9ujzx3_f=l4cl"> <field name="NUM">1</field> </shadow> <block type="get_value" id="u%RzP+MN-@Z3q#|jH@p)"> <field name="ATTR">val</field> <field name="OID">zendure-solarflow.0.73bkTV.7rk1nVD9.electricLevel</field> </block> </value> </block> </value> <value name="B"> <shadow type="math_number" id="J/edd2*@!L%W~x0czzO1"> <field name="NUM">100</field> </shadow> </value> </block> </value> <next> <block type="controls_if" id="1.TOTFI#-9W]$,Aly6JT"> <mutation elseif="1"></mutation> <value name="IF0"> <block type="logic_compare" id="*y6Nrn`Y2t40FWw}r)A?"> <field name="OP">GT</field> <value name="A"> <block type="get_value" id="2qmOAlmhWKm2XMB1p4tH"> <field name="ATTR">val</field> <field name="OID">zendure-solarflow.0.73bkTV.7rk1nVD9.packInputPower</field> </block> </value> <value name="B"> <block type="math_number" id="QmHkzMr5vTTx8j49{CK}"> <field name="NUM">0</field> </block> </value> </block> </value> <statement name="DO0"> <block type="variables_set" id="Bk2jv4495@cW(2?w1pv_"> <field name="VAR" id="}bL170$YMV{_n7LhpGBh">Ladestrom</field> <value name="VALUE"> <block type="math_arithmetic" id="a{DVP6E%%Ps]qEp;Qz0}"> <field name="OP">DIVIDE</field> <value name="A"> <shadow type="math_number" id="`s}jI^~:y:H{K?lfg__K"> <field name="NUM">1</field> </shadow> <block type="math_arithmetic" id="X0B/biEcj{Z0Dc=K$%Qe"> <field name="OP">DIVIDE</field> <value name="A"> <shadow type="math_number" id="llxw:a{n~#0Eyqq4NYy6"> <field name="NUM">1</field> </shadow> <block type="get_value" id="C96_lVEC{G[tN[],:1D/"> <field name="ATTR">val</field> <field name="OID">zendure-solarflow.0.73bkTV.7rk1nVD9.packInputPower</field> </block> </value> <value name="B"> <shadow type="math_number" id="NL#5MAp_EEg_m4,GUmv+"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="Hs/#G!wi4nf+RG!lxO8/"> <field name="VAR" id="JcbPVIO%aKu!SI`JU!JD">Spannung_PV_Panel</field> </block> </value> </block> </value> <value name="B"> <shadow type="math_number" id="7|w^L7BJPsr@kg^Q,-3A"> <field name="NUM">2</field> </shadow> </value> </block> </value> <next> <block type="variables_set" id="/)vg;u/FD2HB?f4*Dnk:"> <field name="VAR" id="`lOge52h.+zOY`PGJnbm">Ladezeit</field> <value name="VALUE"> <block type="math_arithmetic" id="G@,1szYHo|[!!?REb[TT"> <field name="OP">MULTIPLY</field> <value name="A"> <shadow type="math_number" id="I:}-3F3h(R,9Lr:TVQ3`"> <field name="NUM">1</field> </shadow> <block type="math_arithmetic" id="_llKaN,--nmtiv|gW*sP" inline="false"> <field name="OP">DIVIDE</field> <value name="A"> <shadow type="math_number" id="VZ2Ra3A*87J[t{Y2vCm7"> <field name="NUM">1</field> </shadow> <block type="math_arithmetic" id="BGhn@o3w5yLD_Nohz7H-" inline="false"> <field name="OP">DIVIDE</field> <value name="A"> <shadow type="math_number" id="X2A9GcU3zX_vWAb_Z%3P"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="ab)5sQn$b5Rh}VYB~|$G"> <field name="VAR" id="!sszI/Un!f$3Hn!1tk]B">Restakku</field> </block> </value> <value name="B"> <shadow type="math_number" id="TS,XL3fPev?{(w{*gf14"> <field name="NUM">1.3</field> </shadow> </value> </block> </value> <value name="B"> <shadow type="math_number" id="A9K?p@IIdLLxXDS1S:Rd"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="bqg^%unIv/[5Rx%2t+Qq"> <field name="VAR" id="}bL170$YMV{_n7LhpGBh">Ladestrom</field> </block> </value> </block> </value> <value name="B"> <shadow type="math_number" id="#[M{Gx!_HOq:#N#c3ua9"> <field name="NUM">60</field> </shadow> </value> </block> </value> <next> <block type="variables_set" id="Ny%ib{Z~rw*`tp|I73gN"> <field name="VAR" id="O^EBe~zb4T$B=87LqdjD">ladezeit_min</field> <value name="VALUE"> <block type="math_modulo" id="$#I07pq%nO)(-zn.y7qI"> <value name="DIVIDEND"> <shadow type="math_number" id="QZ|BCq[:AYInR?K:plOz"> <field name="NUM">64</field> </shadow> <block type="variables_get" id="5N;b6|/v-bKAKq;AT6dZ"> <field name="VAR" id="`lOge52h.+zOY`PGJnbm">Ladezeit</field> </block> </value> <value name="DIVISOR"> <shadow type="math_number" id="Uz)%aWJHTk)LQk#jQ!,E"> <field name="NUM">60</field> </shadow> </value> </block> </value> <next> <block type="variables_set" id="!41QYhGM9mn=V$qn%o5q"> <field name="VAR" id="=VOm[,NN_4Fw5ed:086w">ladezeit_std</field> <value name="VALUE"> <block type="math_arithmetic" id="P*(8pIt)19s4W@F_Mj09"> <field name="OP">DIVIDE</field> <value name="A"> <shadow type="math_number" id="#)P@)|RD%,^l[4mXA)Qg"> <field name="NUM">1</field> </shadow> <block type="math_arithmetic" id="f.~-COZ?GmtTiO(xsPh!" inline="false"> <field name="OP">MINUS</field> <value name="A"> <shadow type="math_number" id="gk(bxszYj-8oicyU^3X}"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="?vYIGU^EaY9z^4FWXmm3"> <field name="VAR" id="`lOge52h.+zOY`PGJnbm">Ladezeit</field> </block> </value> <value name="B"> <shadow type="math_number" id="]4~#=gBD*RDDL_(m}ug/"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="cL($n5^l2;o.n]{X,XIg"> <field name="VAR" id="O^EBe~zb4T$B=87LqdjD">ladezeit_min</field> </block> </value> </block> </value> <value name="B"> <shadow type="math_number" id="@nnKwenc8Y?$5{DNJa]U"> <field name="NUM">60</field> </shadow> </value> </block> </value> <next> <block type="controls_if" id="+MrOC$PJ.s:XW*NKYU:8"> <mutation else="1"></mutation> <value name="IF0"> <block type="logic_compare" id="@Dv]ZZnB-`1igoLsT)yQ"> <field name="OP">LT</field> <value name="A"> <block type="variables_get" id="~s2X^Ek_uF^Gh(PpqLrU"> <field name="VAR" id="O^EBe~zb4T$B=87LqdjD">ladezeit_min</field> </block> </value> <value name="B"> <block type="math_number" id="c+QVI{~dH_o`z7P6L?iK"> <field name="NUM">10</field> </block> </value> </block> </value> <statement name="DO0"> <block type="control" id="wOk#YxmO2P(RKBUI~z(T"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation> <field name="OID">0_userdata.0.Eigene_Variablen.PV.Solarflow.remainOutTime</field> <field name="WITH_DELAY">TRUE</field> <field name="DELAY_MS">1000</field> <field name="UNIT">ms</field> <field name="CLEAR_RUNNING">FALSE</field> <value name="VALUE"> <block type="text_join" id="kV0VQ#=Z?7@Ke,g=O!Hr"> <mutation items="4"></mutation> <value name="ADD0"> <block type="variables_get" id="lepo)3#*;{!Be[!1bw!t"> <field name="VAR" id="=VOm[,NN_4Fw5ed:086w">ladezeit_std</field> </block> </value> <value name="ADD1"> <block type="text" id="G9E)4`[9t;;fS6/+m3NM"> <field name="TEXT">:</field> </block> </value> <value name="ADD2"> <block type="text" id="U}0?xB^$R5D2RHJaN5q*"> <field name="TEXT">0</field> </block> </value> <value name="ADD3"> <block type="math_round" id=",Sy[/DxUI{2t7ab},%E2"> <field name="OP">ROUND</field> <value name="NUM"> <shadow type="math_number" id="U+ZA*?oz60S#xQ]rsx0V"> <field name="NUM">3.1</field> </shadow> <block type="variables_get" id="rvUPj@!|eC7~tE/^:1yh"> <field name="VAR" id="O^EBe~zb4T$B=87LqdjD">ladezeit_min</field> </block> </value> </block> </value> </block> </value> </block> </statement> <statement name="ELSE"> <block type="control" id="FJ#j^#R1/W,tjPMeMnlY"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation> <field name="OID">0_userdata.0.Eigene_Variablen.PV.Solarflow.remainOutTime</field> <field name="WITH_DELAY">TRUE</field> <field name="DELAY_MS">1000</field> <field name="UNIT">ms</field> <field name="CLEAR_RUNNING">FALSE</field> <value name="VALUE"> <block type="text_join" id="QjjLSj$P0uPc(@sIG;U]"> <mutation items="3"></mutation> <value name="ADD0"> <block type="variables_get" id="U@;AtX-e6*IW4s.jbpX+"> <field name="VAR" id="=VOm[,NN_4Fw5ed:086w">ladezeit_std</field> </block> </value> <value name="ADD1"> <block type="text" id="GSZAzCP^huon7J/G(;5r"> <field name="TEXT">:</field> </block> </value> <value name="ADD2"> <block type="math_round" id="k4C8?@`!m#r.InCJL[%r"> <field name="OP">ROUND</field> <value name="NUM"> <shadow type="math_number" id="U+ZA*?oz60S#xQ]rsx0V"> <field name="NUM">3.1</field> </shadow> <block type="variables_get" id="a$/wx}bNig,jH8M_^CqP"> <field name="VAR" id="O^EBe~zb4T$B=87LqdjD">ladezeit_min</field> </block> </value> </block> </value> </block> </value> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </next> </block> </statement> <value name="IF1"> <block type="logic_compare" id="$4$UB$5N*porfZX$pFBH"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id=";nP^D`kw35;XmX.UKq)U"> <field name="ATTR">val</field> <field name="OID">zendure-solarflow.0.73bkTV.7rk1nVD9.packInputPower</field> </block> </value> <value name="B"> <block type="math_number" id="?KbNiIWARUQf4zd_;m7}"> <field name="NUM">0</field> </block> </value> </block> </value> <statement name="DO1"> <block type="control" id="zSGxcU6SMNsk1T~_8f9%"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation> <field name="OID">0_userdata.0.Eigene_Variablen.PV.Solarflow.remainOutTime</field> <field name="WITH_DELAY">TRUE</field> <field name="DELAY_MS">1000</field> <field name="UNIT">ms</field> <field name="CLEAR_RUNNING">FALSE</field> <value name="VALUE"> <block type="text" id="*YGgeihzw5n:LX/n/b!s"> <field name="TEXT">0</field> </block> </value> </block> </statement> </block> </next> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </xml>
-
@lesiflo Ist seit gestern in einem ersten Ansatz in der Latest Version drin.
Kannst du mir das Blockly mal als Javascript umwandeln (sollte ein Blockly/Javascript Button geben) dann kann ich sicher was davon verwenden. Danke.
Mal schauen ggf. traue ich mich ja dieses Wochenende das Update durchzuführen Dann schaue ich mal was Zendure da geändert hat. Meine Vermutung ist das sie durch das Vertauschen nun 2 neue Namen für die Werte genommen haben.
-
@nograx Bitte schön, Berechnung in kWh
var timeout, timeout2, timeout3, Entladen_Soll, Akkukapazit_C3_A4t, Spannung_PV_Panel, Restakku, Ladestrom, Ladezeit, ladezeit_min, ladezeit_std; // Aktuelle PV-Leistung [W] on({ id: [].concat(['zendure-solarflow.0.73bkTV.7rk1nVD9.solarInputPower']), change: 'ne' }, async (obj) => { let value = obj.state.val; let oldValue = obj.oldState.val; if ((obj.state ? obj.state.val : '') > 0) { setStateDelayed('mqtt.0.openWB.set.pv.2.W' /* W */, (getState('zendure-solarflow.0.73bkTV.7rk1nVD9.solarInputPower').val * -1), 50, false); (() => { if (timeout) { clearTimeout(timeout); timeout = null; }})(); } else if ((obj.state ? obj.state.val : '') == 0) { timeout = setTimeout(async () => { timeout = null; setState('0_userdata.0.Eigene_Variablen.PV.Solarflow.packState' /* packState */, 0); setState('mqtt.0.openWB.set.pv.2.W' /* W */, 0); }, 60000); } }); // Ladeleistung in Akku [W] on({ id: [].concat(['zendure-solarflow.0.73bkTV.7rk1nVD9.outputPackPower']), change: 'ne' }, async (obj) => { let value = obj.state.val; let oldValue = obj.oldState.val; if ((obj.state ? obj.state.val : '') > 0) { setState('0_userdata.0.Eigene_Variablen.PV.Solarflow.packState' /* packState */, 1); setState('mqtt.0.openWB.set.houseBattery.W' /* W */, getState('zendure-solarflow.0.73bkTV.7rk1nVD9.outputPackPower').val); if (getState('zendure-solarflow.0.73bkTV.7rk1nVD9.outputPackPower').val > 0) { setState('0_userdata.0.Eigene_Variablen.PV.Solarflow.InOutPackPower' /* InOutPackPower */, getState('zendure-solarflow.0.73bkTV.7rk1nVD9.outputPackPower').val); setState('0_userdata.0.Eigene_Variablen.PV.Solarflow.InOutPackPower_Wh' /* InOutPackPower_Wh */, (Math.round(getState('0_userdata.0.Eigene_Variablen.PV.Solarflow.packInputPower_kWh').val * 1000))); setState('0_userdata.0.Eigene_Variablen.PV.Solarflow.InOutPackPower_Grafana' /* InOutPackPower_Grafana */, (getState('zendure-solarflow.0.73bkTV.7rk1nVD9.outputPackPower').val * -1)); setStateDelayed('0_userdata.0.Eigene_Variablen.PV.Solarflow.remainOutTime' /* remainOutTime */, 0, true, 1000, false); setState('0_userdata.0.Eigene_Variablen.PV.Solarflow.Ladestatus' /* Ladestatus */, 'Laden [W]'); setState('0_userdata.0.Eigene_Variablen.PV.Solarflow.Ladestatus_Wh' /* Ladestatus_Wh */, 'Geladen [Wh]'); } if (getState('zendure-solarflow.0.73bkTV.7rk1nVD9.outputPackPower').val == 0 && getState('zendure-solarflow.0.73bkTV.7rk1nVD9.packInputPower').val == 0) { setState('0_userdata.0.Eigene_Variablen.PV.Solarflow.InOutPackPower' /* InOutPackPower */, 0); setState('0_userdata.0.Eigene_Variablen.PV.Solarflow.InOutPackPower_Grafana' /* InOutPackPower_Grafana */, 0); setStateDelayed('0_userdata.0.Eigene_Variablen.PV.Solarflow.remainInputTime' /* remainInputTime */, 0, true, 1000, false); setStateDelayed('0_userdata.0.Eigene_Variablen.PV.Solarflow.remainOutTime' /* remainOutTime */, 0, true, 1000, false); setState('0_userdata.0.Eigene_Variablen.PV.Solarflow.Ladestatus' /* Ladestatus */, 'Standby'); } (() => { if (timeout2) { clearTimeout(timeout2); timeout2 = null; }})(); } else if ((obj.state ? obj.state.val : '') == 0) { timeout2 = setTimeout(async () => { timeout2 = null; setState('0_userdata.0.Eigene_Variablen.PV.Solarflow.packState' /* packState */, 0); setState('0_userdata.0.Eigene_Variablen.PV.Solarflow.InOutPackPower' /* InOutPackPower */, 0); setState('0_userdata.0.Eigene_Variablen.PV.Solarflow.InOutPackPower_Grafana' /* InOutPackPower_Grafana */, 0); setState('mqtt.0.openWB.set.houseBattery.W' /* W */, 0); }, 30000); } }); // Entnahmeleistung aus Akku [W] on({ id: [].concat(['zendure-solarflow.0.73bkTV.7rk1nVD9.packInputPower']), change: 'ne' }, async (obj) => { let value = obj.state.val; let oldValue = obj.oldState.val; if ((obj.state ? obj.state.val : '') > 0) { setState('0_userdata.0.Eigene_Variablen.PV.Solarflow.packState' /* packState */, 2); setState('mqtt.0.openWB.set.houseBattery.W' /* W */, (getState('zendure-solarflow.0.73bkTV.7rk1nVD9.packInputPower').val * -1)); if (getState('zendure-solarflow.0.73bkTV.7rk1nVD9.packInputPower').val > 0) { setState('0_userdata.0.Eigene_Variablen.PV.Solarflow.InOutPackPower' /* InOutPackPower */, getState('zendure-solarflow.0.73bkTV.7rk1nVD9.packInputPower').val); setState('0_userdata.0.Eigene_Variablen.PV.Solarflow.InOutPackPower_Wh' /* InOutPackPower_Wh */, (Math.round(getState('0_userdata.0.Eigene_Variablen.PV.Solarflow.outputPackPower_kWh').val * 1000))); setState('0_userdata.0.Eigene_Variablen.PV.Solarflow.InOutPackPower_Grafana' /* InOutPackPower_Grafana */, getState('zendure-solarflow.0.73bkTV.7rk1nVD9.packInputPower').val); setStateDelayed('0_userdata.0.Eigene_Variablen.PV.Solarflow.remainInputTime' /* remainInputTime */, 0, true, 1000, false); setState('0_userdata.0.Eigene_Variablen.PV.Solarflow.Ladestatus' /* Ladestatus */, 'Entladen [W]'); setState('0_userdata.0.Eigene_Variablen.PV.Solarflow.Ladestatus_Wh' /* Ladestatus_Wh */, 'Geliefert [Wh]'); } (() => { if (timeout3) { clearTimeout(timeout3); timeout3 = null; }})(); } else if ((obj.state ? obj.state.val : '') == 0) { timeout3 = setTimeout(async () => { timeout3 = null; setState('0_userdata.0.Eigene_Variablen.PV.Solarflow.packState' /* packState */, 0); setState('0_userdata.0.Eigene_Variablen.PV.Solarflow.InOutPackPower_Grafana' /* InOutPackPower_Grafana */, 0); setState('0_userdata.0.Eigene_Variablen.PV.Solarflow.InOutPackPower' /* InOutPackPower */, 0); setState('mqtt.0.openWB.set.houseBattery.W' /* W */, 0); }, 30000); } }); // Aktueller Ladestand des Akkus [%] und Ausgangsleistung auf 0 setzen on({ id: [].concat(['zendure-solarflow.0.73bkTV.7rk1nVD9.electricLevel']), change: 'ne' }, async (obj) => { let value = obj.state.val; let oldValue = obj.oldState.val; setState('mqtt.0.openWB.set.houseBattery.%Soc' /* %Soc */, getState('zendure-solarflow.0.73bkTV.7rk1nVD9.electricLevel').val); if (getState('zendure-solarflow.0.73bkTV.7rk1nVD9.electricLevel').val <= getState('zendure-solarflow.0.73bkTV.7rk1nVD9.minSoc').val) { setState('zendure-solarflow.0.73bkTV.7rk1nVD9.control.setOutputLimit' /* Einzustellende Ausgangsleistung */, 0); } }); // Ausgangsleistung einstellen - Variabel on({ id: [].concat(['0_userdata.0.Eigene_Variablen.PV.Solarflow.Entladen_Modus']).concat(['mqtt.0.openWB.global.WHouseConsumption']).concat(['0_userdata.0.Eigene_Variablen.PV.Solarflow.Umschalten_Auto_Manu']), change: 'ne' }, async (obj) => { if (getState('0_userdata.0.Eigene_Variablen.PV.Solarflow.Umschalten_Auto_Manu').val == 1 && getState('zendure-solarflow.0.73bkTV.7rk1nVD9.electricLevel').val >= getState('0_userdata.0.Eigene_Variablen.PV.Solarflow.Min_SOC_entladen').val) { if (getState('0_userdata.0.Eigene_Variablen.PV.Solarflow.Entladen_Modus').val == 1 || getState('0_userdata.0.Eigene_Variablen.PV.Solarflow.Entladen_Modus').val == 2 && compareTime(getState('0_userdata.0.Eigene_Variablen.PV.Solarflow.AkkuOut_Start').val, '06:00', 'between', null)) { Entladen_Soll = getState('mqtt.0.openWB.global.WHouseConsumption').val + getState('mqtt.0.openWB.pv.W').val; if (Entladen_Soll > 50) { setState('zendure-solarflow.0.73bkTV.7rk1nVD9.control.setOutputLimit' /* Einzustellende Ausgangsleistung */, 50); } else if (Entladen_Soll > 100) { setState('zendure-solarflow.0.73bkTV.7rk1nVD9.control.setOutputLimit' /* Einzustellende Ausgangsleistung */, 100); } else if (Entladen_Soll > 200) { setState('zendure-solarflow.0.73bkTV.7rk1nVD9.control.setOutputLimit' /* Einzustellende Ausgangsleistung */, 200); } else if (Entladen_Soll > 300) { setState('zendure-solarflow.0.73bkTV.7rk1nVD9.control.setOutputLimit' /* Einzustellende Ausgangsleistung */, 300); } else if (Entladen_Soll > 400) { setState('zendure-solarflow.0.73bkTV.7rk1nVD9.control.setOutputLimit' /* Einzustellende Ausgangsleistung */, 400); } else if (Entladen_Soll > 500) { setState('zendure-solarflow.0.73bkTV.7rk1nVD9.control.setOutputLimit' /* Einzustellende Ausgangsleistung */, 500); } else if (Entladen_Soll > 600) { setState('zendure-solarflow.0.73bkTV.7rk1nVD9.control.setOutputLimit' /* Einzustellende Ausgangsleistung */, 600); } else if (Entladen_Soll <= 0) { setStateDelayed('zendure-solarflow.0.73bkTV.7rk1nVD9.control.setOutputLimit' /* Einzustellende Ausgangsleistung */, 0, 30000, false); } } } }); // Ausgangsleistung einstellen - Fest sofort on({ id: [].concat(['0_userdata.0.Eigene_Variablen.PV.Solarflow.Entladen_Modus']).concat(['0_userdata.0.Eigene_Variablen.PV.Solarflow.Umschalten_Auto_Manu']), change: 'ne' }, async (obj) => { if (getState('0_userdata.0.Eigene_Variablen.PV.Solarflow.Umschalten_Auto_Manu').val == 0 && getState('zendure-solarflow.0.73bkTV.7rk1nVD9.electricLevel').val >= getState('0_userdata.0.Eigene_Variablen.PV.Solarflow.Min_SOC_entladen').val) { if (getState('0_userdata.0.Eigene_Variablen.PV.Solarflow.Entladen_Modus').val == 1) { setState('zendure-solarflow.0.73bkTV.7rk1nVD9.control.setOutputLimit' /* Einzustellende Ausgangsleistung */, getState('0_userdata.0.Eigene_Variablen.PV.Solarflow.SetOutputPower').val); } else if (getState('0_userdata.0.Eigene_Variablen.PV.Solarflow.Entladen_Modus').val == 0 || getState('0_userdata.0.Eigene_Variablen.PV.Solarflow.Entladen_Modus').val == 2) { setState('zendure-solarflow.0.73bkTV.7rk1nVD9.control.setOutputLimit' /* Einzustellende Ausgangsleistung */, 0); } } }); // Ausgangsleistung einstellen - Fest nach Zeit schedule("2,17,32,47 17-22 * * *", async () => { if ((getState('0_userdata.0.Eigene_Variablen.PV.Solarflow.Entladen_Modus').val == 2 && compareTime(getState('0_userdata.0.Eigene_Variablen.PV.Solarflow.AkkuOut_Start').val, '23:00', 'between', null) && getState('0_userdata.0.Eigene_Variablen.PV.Solarflow.Umschalten_Auto_Manu').val == 0 && getState('zendure-solarflow.0.73bkTV.7rk1nVD9.electricLevel').val >= getState('0_userdata.0.Eigene_Variablen.PV.Solarflow.Min_SOC_entladen').val)) { setState('zendure-solarflow.0.73bkTV.7rk1nVD9.control.setOutputLimit' /* Einzustellende Ausgangsleistung */, getState('0_userdata.0.Eigene_Variablen.PV.Solarflow.SetOutputPower').val); } }); // Ladezeit berechnen Akkukapazit_C3_A4t = 38.4; Spannung_PV_Panel = 31.21; on({ id: [].concat(['zendure-solarflow.0.73bkTV.7rk1nVD9.outputPackPower']), change: 'ne' }, async (obj) => { let value = obj.state.val; let oldValue = obj.oldState.val; Restakku = Akkukapazit_C3_A4t - (Akkukapazit_C3_A4t * getState('zendure-solarflow.0.73bkTV.7rk1nVD9.electricLevel').val) / 100; if (getState('zendure-solarflow.0.73bkTV.7rk1nVD9.outputPackPower').val > 0) { Ladestrom = (getState('zendure-solarflow.0.73bkTV.7rk1nVD9.outputPackPower').val / Spannung_PV_Panel) / 2; Ladezeit = ((Restakku / 1.3) / Ladestrom) * 60; ladezeit_min = Ladezeit % 60; ladezeit_std = (Ladezeit - ladezeit_min) / 60; if (ladezeit_min < 10) { setStateDelayed('0_userdata.0.Eigene_Variablen.PV.Solarflow.remainInputTime' /* remainInputTime */, ([ladezeit_std,':','0',Math.round(ladezeit_min)].join('')), 1000, false); } else { setStateDelayed('0_userdata.0.Eigene_Variablen.PV.Solarflow.remainInputTime' /* remainInputTime */, ([ladezeit_std,':',Math.round(ladezeit_min)].join('')), 1000, false); } } else if (getState('zendure-solarflow.0.73bkTV.7rk1nVD9.packInputPower').val == 0) { setStateDelayed('0_userdata.0.Eigene_Variablen.PV.Solarflow.remainInputTime' /* remainInputTime */, '0', 1000, false); } }); // Endladezeit berechnen on({ id: [].concat(['zendure-solarflow.0.73bkTV.7rk1nVD9.packInputPower']), change: 'ne' }, async (obj) => { let value = obj.state.val; let oldValue = obj.oldState.val; Restakku = (Akkukapazit_C3_A4t * getState('zendure-solarflow.0.73bkTV.7rk1nVD9.electricLevel').val) / 100; if (getState('zendure-solarflow.0.73bkTV.7rk1nVD9.packInputPower').val > 0) { Ladestrom = (getState('zendure-solarflow.0.73bkTV.7rk1nVD9.packInputPower').val / Spannung_PV_Panel) / 2; Ladezeit = ((Restakku / 1.3) / Ladestrom) * 60; ladezeit_min = Ladezeit % 60; ladezeit_std = (Ladezeit - ladezeit_min) / 60; if (ladezeit_min < 10) { setStateDelayed('0_userdata.0.Eigene_Variablen.PV.Solarflow.remainOutTime' /* remainOutTime */, ([ladezeit_std,':','0',Math.round(ladezeit_min)].join('')), 1000, false); } else { setStateDelayed('0_userdata.0.Eigene_Variablen.PV.Solarflow.remainOutTime' /* remainOutTime */, ([ladezeit_std,':',Math.round(ladezeit_min)].join('')), 1000, false); } } else if (getState('zendure-solarflow.0.73bkTV.7rk1nVD9.packInputPower').val == 0) { setStateDelayed('0_userdata.0.Eigene_Variablen.PV.Solarflow.remainOutTime' /* remainOutTime */, '0', 1000, false); } }); on({ id: [].concat(['zendure-solarflow.0.73bkTV.7rk1nVD9.outputPackPower']).concat(['zendure-solarflow.0.73bkTV.7rk1nVD9.packInputPower']), change: 'ne' }, async (obj) => { if (getState('zendure-solarflow.0.73bkTV.7rk1nVD9.outputPackPower').val > 0) { setStateDelayed('0_userdata.0.Eigene_Variablen.PV.Solarflow.Restzeit' /* Restzeit */, getState('0_userdata.0.Eigene_Variablen.PV.Solarflow.remainInputTime').val, 1000, false); } else if (getState('zendure-solarflow.0.73bkTV.7rk1nVD9.packInputPower').val > 0) { setStateDelayed('0_userdata.0.Eigene_Variablen.PV.Solarflow.Restzeit' /* Restzeit */, getState('0_userdata.0.Eigene_Variablen.PV.Solarflow.remainOutTime').val, 1000, false); } else if (getState('zendure-solarflow.0.73bkTV.7rk1nVD9.outputPackPower').val == 0 && getState('zendure-solarflow.0.73bkTV.7rk1nVD9.packInputPower').val == 0) { setStateDelayed('0_userdata.0.Eigene_Variablen.PV.Solarflow.Restzeit' /* Restzeit */, '0:00', 1000, false); } }); // Akkuheizung on({ id: [].concat(['hm-rpc.0.LEQ0122954.1.TEMPERATURE']), change: 'ne' }, async (obj) => { let value = obj.state.val; let oldValue = obj.oldState.val; if ((obj.state ? obj.state.val : '') < 10 && compareTime('07:00', '17:00', 'between', null) || (obj.state ? obj.state.val : '') < 8 && (compareTime('17:01', '23:59', 'between', null) || compareTime('00:00', '06:59', 'between', null))) { setState('shelly.0.SHPLG-S#5AD46F#1.Relay0.Switch' /* Switch */, true); setStateDelayed('shelly.0.SHPLG-S#5AD46F#1.Relay0.Switch' /* Switch */, false, 2700000, false); } else if ((obj.state ? obj.state.val : '') >= 15) { setState('shelly.0.SHPLG-S#5AD46F#1.Relay0.Switch' /* Switch */, false); } });
-
@nograx Du solltest noch warten mit dem Update. Bei mir passen die Leistungsdaten in der App seit dem nicht mehr.
Meine Akku's sind voll, 1920 Wh. An Solar wurde aber nur 1.53 kWh erzeugt. Die Akkus waren vorher auf 1%. Immerhin passen aber die errechneten Wert im iobroker.