NEWS
Zeitzähler Ladezustand Wallbox
-
Hallo,
ich möchte die Ladezeit von meiner Wallbox gerne loggen. Einmal die Ladezeit seit Ladestart und einmal die Gesamt Ladezeit der Wallbox. Die Ladezeit seit Ladestart funktioniert einwandfrei. Die Gesamtladezeit funktioniert leider nicht wie gewünscht. Sie erhöht sich nicht um die Zeit in Sekunden seit Ladestart sondern zu schnell und zu viel. Leider finde ich den Fehler auch nicht. Die Zeit soll anfangen zu zählen sobald der Ladestatus auf 2 erhöht wird. Die Zeit soll in Sekunden gemessen werden.

Ich hoffe jemand findet den Fehler in meinem Skript und kann ihn mir erklären.Hier noch die Blockly programmierung falls es jemand bei sich selbst ausprobieren möchte und ein Screenshot

<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable type="timeout" id="timeout">timeout</variable> <variable id="0+26QsH]ehr/=G`W`!Gc">Zeitstempel_Ladezustand_>2</variable> <variable type="interval" id="Intervall">Intervall</variable> </variables> <block type="on_ext" id="L)(b7H]KibOx?:v)xlzV" x="338" y="138"> <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="hVb9Xu[l@JocyuIv[yec"> <field name="oid">0_userdata.0.Standartwerte.TestNumber_1</field> </shadow> <block type="field_oid" id="ykB+iY4R2%+TH#vc`l9("> <field name="oid">0_userdata.0.Status.Wallbox.Warp_Pro_1.Ladezustand</field> </block> </value> <statement name="STATEMENT"> <block type="on_ext" id="1H1!^x2TuZ_dMYab=[S?"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation> <field name="CONDITION">gt</field> <field name="ACK_CONDITION"></field> <value name="OID0"> <shadow type="field_oid" id="CC$DYbChG:zIoWrX7|tY"> <field name="oid">default</field> </shadow> <block type="field_oid" id="/=Xh^{O#0uHH4+b#vj8?"> <field name="oid">0_userdata.0.Status.Wallbox.Warp_Pro_1.Ladezustand</field> </block> </value> <statement name="STATEMENT"> <block type="controls_if" id="eP.w`fRL:8f)4WA+Y}%6"> <value name="IF0"> <block type="logic_compare" id="*}NJ0JhchE3mA-fEjCk3" inline="false"> <field name="OP">EQ</field> <value name="A"> <block type="math_number" id="3*d~:T@qNF|$xb[U7119"> <field name="NUM">2</field> </block> </value> <value name="B"> <block type="get_value_var" id="c!!T7%xQC2afx}c~0#7:"> <field name="ATTR">val</field> <value name="OID"> <shadow type="text" id="+*e7bb1W#?yF:icLm-;-"> <field name="TEXT"></field> </shadow> <block type="field_oid" id="+BIPFN{H2=yW_QYRKbs("> <field name="oid">0_userdata.0.Status.Wallbox.Warp_Pro_1.Ladezustand</field> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="variables_set" id="jr`yWg`@,lztMy|rSFIi"> <field name="VAR" id="0+26QsH]ehr/=G`W`!Gc">Zeitstempel_Ladezustand_>2</field> <value name="VALUE"> <block type="time_get" id="2Zk3_wZW_ii3AGDXPD36"> <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation> <field name="OPTION">object</field> </block> </value> </block> </statement> </block> </statement> <next> <block type="timeouts_settimeout" id="9za]+n-99P4[{Xro#iWg"> <field name="NAME">timeout</field> <field name="DELAY">1000</field> <field name="UNIT">ms</field> <statement name="STATEMENT"> <block type="controls_if" id="P3}x~-szQ0)F$nJa#e41"> <mutation elseif="1"></mutation> <value name="IF0"> <block type="logic_compare" id="$MSvt-!QwtUx!F[2iXE|" inline="false"> <field name="OP">EQ</field> <value name="A"> <block type="math_number" id="t0Zct{2[4`PBfi=dlc|g"> <field name="NUM">2</field> </block> </value> <value name="B"> <block type="get_value_var" id="DW6]A:]l62gzCf:m*+~P"> <field name="ATTR">val</field> <value name="OID"> <shadow type="text" id="tR)v#cB(o1E50oX)?yho"> <field name="TEXT"></field> </shadow> <block type="field_oid" id="Q_6Y:f:FyXT2,3ugo?^Y"> <field name="oid">0_userdata.0.Status.Wallbox.Warp_Pro_1.Ladezustand</field> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="timeouts_setinterval" id="!PkVV_{{z|(sIaJF4Z|z"> <field name="NAME">Intervall</field> <field name="INTERVAL">1000</field> <field name="UNIT">ms</field> <statement name="STATEMENT"> <block type="control" id="0piJsg%2{9](y~{C.Dk%"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Status.Wallbox.Warp_Pro_1.Ladezeit</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="convert_tonumber" id="1=$zL7$P+)_]2M{jUVTj"> <value name="VALUE"> <block type="math_arithmetic" id="PDEiOfv5N9-,W7#pHMfV" inline="false"> <field name="OP">DIVIDE</field> <value name="A"> <shadow type="math_number" id="WE2dVAz[{h`veMbffwd~"> <field name="NUM">1</field> </shadow> <block type="math_arithmetic" id="P^Y5DRIhCopoPxOdSmd0" inline="false"> <field name="OP">MINUS</field> <value name="A"> <shadow type="math_number" id="}|Wms/Y(f!sQ[cU^*mWF"> <field name="NUM">1</field> </shadow> <block type="time_get" id="+z1Bf*j!`oriP#KEfLIF"> <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation> <field name="OPTION">object</field> </block> </value> <value name="B"> <shadow type="math_number" id="F`fFnk%rQn8iBb|)[%Cv"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="ygJo4h)Is;2qk{i,A1,d"> <field name="VAR" id="0+26QsH]ehr/=G`W`!Gc">Zeitstempel_Ladezustand_>2</field> </block> </value> </block> </value> <value name="B"> <shadow type="math_number" id="{6}W]a:Klf%5{z(6K0fu"> <field name="NUM">1000</field> </shadow> </value> </block> </value> </block> </value> <next> <block type="control" id="f#j4^Cq-Ha%:Wdh[lK}q"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Status.Wallbox.Warp_Pro_1.Ladezeit_Gesamt</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="convert_tonumber" id="P(RyN.Q+ttH+lg!w?2$k"> <value name="VALUE"> <block type="math_arithmetic" id="4]Crc;Ah)=1K}LVYQTga" inline="false"> <field name="OP">ADD</field> <value name="A"> <shadow type="math_number" id="=GqX^TFaRZ++G(iO8Lvp"> <field name="NUM">1</field> </shadow> <block type="get_value_var" id="}-Hg6p3YYE+GYCDndJ%^"> <field name="ATTR">val</field> <value name="OID"> <shadow type="text" id="P}8jXkUkLbN`}voJv_gb"> <field name="TEXT"></field> </shadow> <block type="field_oid" id="Y/*1e{5![{(6,)]Lr:.l"> <field name="oid">0_userdata.0.Status.Wallbox.Warp_Pro_1.Ladezeit_Gesamt</field> </block> </value> </block> </value> <value name="B"> <shadow type="math_number" id="lCNtg32~4m~%?T-@*@ka"> <field name="NUM">1</field> </shadow> <block type="math_arithmetic" id="G$E[jxtC7z9#I(AiQ7g+" inline="false"> <field name="OP">DIVIDE</field> <value name="A"> <shadow type="math_number"> <field name="NUM">1</field> </shadow> <block type="math_arithmetic" id="Ep.f4~$/?PfLZ9@I7+/u" inline="false"> <field name="OP">MINUS</field> <value name="A"> <shadow type="math_number"> <field name="NUM">1</field> </shadow> <block type="time_get" id="N?xVcwx4fY3!CpTj`pSi"> <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation> <field name="OPTION">object</field> </block> </value> <value name="B"> <shadow type="math_number"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="-eG9`;MRd#sg!$%FRN7T"> <field name="VAR" id="0+26QsH]ehr/=G`W`!Gc">Zeitstempel_Ladezustand_>2</field> </block> </value> </block> </value> <value name="B"> <shadow type="math_number" id="M^!hon1V`SFz#m|!FPI1"> <field name="NUM">1000</field> </shadow> </value> </block> </value> </block> </value> </block> </value> </block> </next> </block> </statement> </block> </statement> <value name="IF1"> <block type="logic_compare" id=".;nO%im(4?1kQ_!/BnUN" inline="false"> <field name="OP">NEQ</field> <value name="A"> <block type="math_number" id="2JJ+^g$I_6#6X_Q`ChWU"> <field name="NUM">2</field> </block> </value> <value name="B"> <block type="get_value_var" id="H}|^|2[$bmw=-8sH[lvY"> <field name="ATTR">val</field> <value name="OID"> <shadow type="text"> <field name="TEXT"></field> </shadow> <block type="field_oid" id="dDA)w,`Wb5R(T|-eDKF)"> <field name="oid">0_userdata.0.Standartwerte.TestNumber_1</field> </block> </value> </block> </value> </block> </value> <statement name="DO1"> <block type="timeouts_clearinterval" id="M3H]Q#yy}!TA@MVnk]jF"> <field name="NAME">Intervall</field> <next> <block type="control" id="d3P5#L~%bJ]b)~.)8)5a"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Status.Wallbox.Warp_Pro_1.Ladezeit</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="S!88$L_pBB80KmZAxKa."> <field name="NUM">0</field> </block> </value> </block> </next> </block> </statement> </block> </statement> </block> </next> </block> </statement> </block> </xml> -
Hallo,
ich möchte die Ladezeit von meiner Wallbox gerne loggen. Einmal die Ladezeit seit Ladestart und einmal die Gesamt Ladezeit der Wallbox. Die Ladezeit seit Ladestart funktioniert einwandfrei. Die Gesamtladezeit funktioniert leider nicht wie gewünscht. Sie erhöht sich nicht um die Zeit in Sekunden seit Ladestart sondern zu schnell und zu viel. Leider finde ich den Fehler auch nicht. Die Zeit soll anfangen zu zählen sobald der Ladestatus auf 2 erhöht wird. Die Zeit soll in Sekunden gemessen werden.

Ich hoffe jemand findet den Fehler in meinem Skript und kann ihn mir erklären.Hier noch die Blockly programmierung falls es jemand bei sich selbst ausprobieren möchte und ein Screenshot

<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable type="timeout" id="timeout">timeout</variable> <variable id="0+26QsH]ehr/=G`W`!Gc">Zeitstempel_Ladezustand_>2</variable> <variable type="interval" id="Intervall">Intervall</variable> </variables> <block type="on_ext" id="L)(b7H]KibOx?:v)xlzV" x="338" y="138"> <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="hVb9Xu[l@JocyuIv[yec"> <field name="oid">0_userdata.0.Standartwerte.TestNumber_1</field> </shadow> <block type="field_oid" id="ykB+iY4R2%+TH#vc`l9("> <field name="oid">0_userdata.0.Status.Wallbox.Warp_Pro_1.Ladezustand</field> </block> </value> <statement name="STATEMENT"> <block type="on_ext" id="1H1!^x2TuZ_dMYab=[S?"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation> <field name="CONDITION">gt</field> <field name="ACK_CONDITION"></field> <value name="OID0"> <shadow type="field_oid" id="CC$DYbChG:zIoWrX7|tY"> <field name="oid">default</field> </shadow> <block type="field_oid" id="/=Xh^{O#0uHH4+b#vj8?"> <field name="oid">0_userdata.0.Status.Wallbox.Warp_Pro_1.Ladezustand</field> </block> </value> <statement name="STATEMENT"> <block type="controls_if" id="eP.w`fRL:8f)4WA+Y}%6"> <value name="IF0"> <block type="logic_compare" id="*}NJ0JhchE3mA-fEjCk3" inline="false"> <field name="OP">EQ</field> <value name="A"> <block type="math_number" id="3*d~:T@qNF|$xb[U7119"> <field name="NUM">2</field> </block> </value> <value name="B"> <block type="get_value_var" id="c!!T7%xQC2afx}c~0#7:"> <field name="ATTR">val</field> <value name="OID"> <shadow type="text" id="+*e7bb1W#?yF:icLm-;-"> <field name="TEXT"></field> </shadow> <block type="field_oid" id="+BIPFN{H2=yW_QYRKbs("> <field name="oid">0_userdata.0.Status.Wallbox.Warp_Pro_1.Ladezustand</field> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="variables_set" id="jr`yWg`@,lztMy|rSFIi"> <field name="VAR" id="0+26QsH]ehr/=G`W`!Gc">Zeitstempel_Ladezustand_>2</field> <value name="VALUE"> <block type="time_get" id="2Zk3_wZW_ii3AGDXPD36"> <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation> <field name="OPTION">object</field> </block> </value> </block> </statement> </block> </statement> <next> <block type="timeouts_settimeout" id="9za]+n-99P4[{Xro#iWg"> <field name="NAME">timeout</field> <field name="DELAY">1000</field> <field name="UNIT">ms</field> <statement name="STATEMENT"> <block type="controls_if" id="P3}x~-szQ0)F$nJa#e41"> <mutation elseif="1"></mutation> <value name="IF0"> <block type="logic_compare" id="$MSvt-!QwtUx!F[2iXE|" inline="false"> <field name="OP">EQ</field> <value name="A"> <block type="math_number" id="t0Zct{2[4`PBfi=dlc|g"> <field name="NUM">2</field> </block> </value> <value name="B"> <block type="get_value_var" id="DW6]A:]l62gzCf:m*+~P"> <field name="ATTR">val</field> <value name="OID"> <shadow type="text" id="tR)v#cB(o1E50oX)?yho"> <field name="TEXT"></field> </shadow> <block type="field_oid" id="Q_6Y:f:FyXT2,3ugo?^Y"> <field name="oid">0_userdata.0.Status.Wallbox.Warp_Pro_1.Ladezustand</field> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="timeouts_setinterval" id="!PkVV_{{z|(sIaJF4Z|z"> <field name="NAME">Intervall</field> <field name="INTERVAL">1000</field> <field name="UNIT">ms</field> <statement name="STATEMENT"> <block type="control" id="0piJsg%2{9](y~{C.Dk%"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Status.Wallbox.Warp_Pro_1.Ladezeit</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="convert_tonumber" id="1=$zL7$P+)_]2M{jUVTj"> <value name="VALUE"> <block type="math_arithmetic" id="PDEiOfv5N9-,W7#pHMfV" inline="false"> <field name="OP">DIVIDE</field> <value name="A"> <shadow type="math_number" id="WE2dVAz[{h`veMbffwd~"> <field name="NUM">1</field> </shadow> <block type="math_arithmetic" id="P^Y5DRIhCopoPxOdSmd0" inline="false"> <field name="OP">MINUS</field> <value name="A"> <shadow type="math_number" id="}|Wms/Y(f!sQ[cU^*mWF"> <field name="NUM">1</field> </shadow> <block type="time_get" id="+z1Bf*j!`oriP#KEfLIF"> <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation> <field name="OPTION">object</field> </block> </value> <value name="B"> <shadow type="math_number" id="F`fFnk%rQn8iBb|)[%Cv"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="ygJo4h)Is;2qk{i,A1,d"> <field name="VAR" id="0+26QsH]ehr/=G`W`!Gc">Zeitstempel_Ladezustand_>2</field> </block> </value> </block> </value> <value name="B"> <shadow type="math_number" id="{6}W]a:Klf%5{z(6K0fu"> <field name="NUM">1000</field> </shadow> </value> </block> </value> </block> </value> <next> <block type="control" id="f#j4^Cq-Ha%:Wdh[lK}q"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Status.Wallbox.Warp_Pro_1.Ladezeit_Gesamt</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="convert_tonumber" id="P(RyN.Q+ttH+lg!w?2$k"> <value name="VALUE"> <block type="math_arithmetic" id="4]Crc;Ah)=1K}LVYQTga" inline="false"> <field name="OP">ADD</field> <value name="A"> <shadow type="math_number" id="=GqX^TFaRZ++G(iO8Lvp"> <field name="NUM">1</field> </shadow> <block type="get_value_var" id="}-Hg6p3YYE+GYCDndJ%^"> <field name="ATTR">val</field> <value name="OID"> <shadow type="text" id="P}8jXkUkLbN`}voJv_gb"> <field name="TEXT"></field> </shadow> <block type="field_oid" id="Y/*1e{5![{(6,)]Lr:.l"> <field name="oid">0_userdata.0.Status.Wallbox.Warp_Pro_1.Ladezeit_Gesamt</field> </block> </value> </block> </value> <value name="B"> <shadow type="math_number" id="lCNtg32~4m~%?T-@*@ka"> <field name="NUM">1</field> </shadow> <block type="math_arithmetic" id="G$E[jxtC7z9#I(AiQ7g+" inline="false"> <field name="OP">DIVIDE</field> <value name="A"> <shadow type="math_number"> <field name="NUM">1</field> </shadow> <block type="math_arithmetic" id="Ep.f4~$/?PfLZ9@I7+/u" inline="false"> <field name="OP">MINUS</field> <value name="A"> <shadow type="math_number"> <field name="NUM">1</field> </shadow> <block type="time_get" id="N?xVcwx4fY3!CpTj`pSi"> <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation> <field name="OPTION">object</field> </block> </value> <value name="B"> <shadow type="math_number"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="-eG9`;MRd#sg!$%FRN7T"> <field name="VAR" id="0+26QsH]ehr/=G`W`!Gc">Zeitstempel_Ladezustand_>2</field> </block> </value> </block> </value> <value name="B"> <shadow type="math_number" id="M^!hon1V`SFz#m|!FPI1"> <field name="NUM">1000</field> </shadow> </value> </block> </value> </block> </value> </block> </value> </block> </next> </block> </statement> </block> </statement> <value name="IF1"> <block type="logic_compare" id=".;nO%im(4?1kQ_!/BnUN" inline="false"> <field name="OP">NEQ</field> <value name="A"> <block type="math_number" id="2JJ+^g$I_6#6X_Q`ChWU"> <field name="NUM">2</field> </block> </value> <value name="B"> <block type="get_value_var" id="H}|^|2[$bmw=-8sH[lvY"> <field name="ATTR">val</field> <value name="OID"> <shadow type="text"> <field name="TEXT"></field> </shadow> <block type="field_oid" id="dDA)w,`Wb5R(T|-eDKF)"> <field name="oid">0_userdata.0.Standartwerte.TestNumber_1</field> </block> </value> </block> </value> </block> </value> <statement name="DO1"> <block type="timeouts_clearinterval" id="M3H]Q#yy}!TA@MVnk]jF"> <field name="NAME">Intervall</field> <next> <block type="control" id="d3P5#L~%bJ]b)~.)8)5a"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Status.Wallbox.Warp_Pro_1.Ladezeit</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="S!88$L_pBB80KmZAxKa."> <field name="NUM">0</field> </block> </value> </block> </next> </block> </statement> </block> </statement> </block> </next> </block> </statement> </block> </xml> -
-
Okay ich probiere es mal anders. Ich möchte aber die Zeitberechnung auf den Zeitstempel bezogen und nicht vom System. Das habe ich nämlich auch schon probiert und da variiert die Zeit im ms Bereich, was für mich keine genaue Messung ist.
Hey! Du scheinst an dieser Unterhaltung interessiert zu sein, hast aber noch kein Konto.
Hast du es satt, bei jedem Besuch durch die gleichen Beiträge zu scrollen? Wenn du dich für ein Konto anmeldest, kommst du immer genau dorthin zurück, wo du zuvor warst, und kannst dich über neue Antworten benachrichtigen lassen (entweder per E-Mail oder Push-Benachrichtigung). Du kannst auch Lesezeichen speichern und Beiträge positiv bewerten, um anderen Community-Mitgliedern deine Wertschätzung zu zeigen.
Mit deinem Input könnte dieser Beitrag noch besser werden 💗
Registrieren Anmelden

