NEWS
[Gelöst] Wemos D1 (Tasmota) Zisternenfüllstand MQTT Problem
-
Hi,
ich habe mir nun einen Wemos D1 Mini (Tasmota) mit einem SRT04T Modul zum Messen meines Zisternenwasserstands zusammen gebastelt. Funktioniert auch (obgleich die Messwerte immer stark hin-und her springen zwischen 25 cm und 1,8 m etwa), nur mit dem Senden der Daten per MQTT komme ich noch nicht ganz klar. Ich bekomme diverse Wert bereits übermittelt, aber eben nicht den Meßwert.
Ich vermute ich muss in der Konfiguration des Wemos noch was anpassen, kenne ich mit dem aber nicht aus. Das Template sieht wie folgt aus. Kann mir einer einen Tipp geben?

-
Hi,
ich habe mir nun einen Wemos D1 Mini (Tasmota) mit einem SRT04T Modul zum Messen meines Zisternenwasserstands zusammen gebastelt. Funktioniert auch (obgleich die Messwerte immer stark hin-und her springen zwischen 25 cm und 1,8 m etwa), nur mit dem Senden der Daten per MQTT komme ich noch nicht ganz klar. Ich bekomme diverse Wert bereits übermittelt, aber eben nicht den Meßwert.
Ich vermute ich muss in der Konfiguration des Wemos noch was anpassen, kenne ich mit dem aber nicht aus. Das Template sieht wie folgt aus. Kann mir einer einen Tipp geben?

-
Hi,
ich habe mir nun einen Wemos D1 Mini (Tasmota) mit einem SRT04T Modul zum Messen meines Zisternenwasserstands zusammen gebastelt. Funktioniert auch (obgleich die Messwerte immer stark hin-und her springen zwischen 25 cm und 1,8 m etwa), nur mit dem Senden der Daten per MQTT komme ich noch nicht ganz klar. Ich bekomme diverse Wert bereits übermittelt, aber eben nicht den Meßwert.
Ich vermute ich muss in der Konfiguration des Wemos noch was anpassen, kenne ich mit dem aber nicht aus. Das Template sieht wie folgt aus. Kann mir einer einen Tipp geben?

@joergh said in [Gelöst] Wemos D1 (Tasmota) Zisternenfüllstand MQTT Problem:
obgleich die Messwerte immer stark hin-und her springen zwischen 25 cm und 1,8 m etwa
Ich messe auch mit einem Ultraschallsensor die Füllhöhe von einem offenen Wassertank und habe das "springen" des Sensors einfach direkt ausgefiltert, an der Zentrale kommen so nur valide/plausible Werte an.
-
@joergh said in [Gelöst] Wemos D1 (Tasmota) Zisternenfüllstand MQTT Problem:
obgleich die Messwerte immer stark hin-und her springen zwischen 25 cm und 1,8 m etwa
Ich messe auch mit einem Ultraschallsensor die Füllhöhe von einem offenen Wassertank und habe das "springen" des Sensors einfach direkt ausgefiltert, an der Zentrale kommen so nur valide/plausible Werte an.
@opensourcenomad Ich nehme an, Du hast das selber programmiert?
Ich habe mir nun ein Blockly gebastelt um das zu bewerkstelligen:
<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable id="[|E@cx52aezVEG5!WZIo">Anzahl Messwerte</variable> <variable id="4)(XlXw+KxglBrbN0V14">Inhalt</variable> <variable id="C_5Sa1P)zCNOKF`eRQmD">Messreihe</variable> <variable id="[OrG_M{[^Ug2w:4oq6.v">Sortiert</variable> <variable id="+F8?wHwa)M(tMYdBS$8[">Distanzwert</variable> <variable id="UhIv[=c5pxjGb*b:^sG=">Zähler</variable> <variable id="w_Vmyv3k=J7)88!p**42">Geglättet</variable> </variables> <block type="variables_set" id="t*WPoL~N7|dBW5vW8m:$" x="113" y="88"> <field name="VAR" id="[|E@cx52aezVEG5!WZIo">Anzahl Messwerte</field> <value name="VALUE"> <block type="math_number" id="8Wg_aD}#$Slw7_rAoswN"> <field name="NUM">25</field> </block> </value> <next> <block type="variables_set" id="tB,AEfHrqP{kTK(*cEBR"> <field name="VAR" id="4)(XlXw+KxglBrbN0V14">Inhalt</field> <value name="VALUE"> <block type="lists_create_with" id="%wm`Fsdg!M00gTqGb1`a"> <mutation items="0"></mutation> </block> </value> <next> <block type="variables_set" id="4dW(6da^5JiZxQ7$*CR="> <field name="VAR" id="C_5Sa1P)zCNOKF`eRQmD">Messreihe</field> <value name="VALUE"> <block type="lists_repeat" id="@0+hhUZ{?.p8MF!J@lqz"> <value name="NUM"> <shadow type="math_number" id="*d/u,hF)^C~98hqm7U[!"> <field name="NUM">10</field> </shadow> <block type="variables_get" id="4Mr=iQ6K`Q@K}YHqo:ra"> <field name="VAR" id="[|E@cx52aezVEG5!WZIo">Anzahl Messwerte</field> </block> </value> <value name="ITEM"> <block type="math_number" id=";v!6uUof$%}Dz`@_5ofj"> <field name="NUM">0</field> </block> </value> </block> </value> <next> <block type="variables_set" id="%(()rkL_lMzU-dOE`mFT"> <field name="VAR" id="[OrG_M{[^Ug2w:4oq6.v">Sortiert</field> <value name="VALUE"> <block type="lists_repeat" id="PlvOBk4QfQ2()0+oLyeD"> <value name="NUM"> <shadow type="math_number" id="MP+;%F,xMh9/`e`qbse."> <field name="NUM">10</field> </shadow> <block type="variables_get" id=")9[mJQwxi:@(dCvt8#u|"> <field name="VAR" id="[|E@cx52aezVEG5!WZIo">Anzahl Messwerte</field> </block> </value> <value name="ITEM"> <block type="math_number" id="T2y?dMB*GaWw6Q8aShRj"> <field name="NUM">0</field> </block> </value> </block> </value> <next> <block type="on" id="Tg)3ZXkU,YZIEtun1EH5"> <field name="OID">mqtt.0.tele.Zisterne.SENSOR</field> <field name="CONDITION">ne</field> <field name="ACK_CONDITION"></field> <statement name="STATEMENT"> <block type="debug" id="eZt!/)(q5^E]H*8K@)JV"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="j8aZ7$Q#Y*Z54rcze2x!"> <field name="TEXT">test</field> </shadow> <block type="get_value" id="Y*4~Q$?)qj#/7F-6`hgY"> <field name="ATTR">val</field> <field name="OID">mqtt.0.tele.Zisterne.SENSOR</field> </block> </value> <next> <block type="variables_set" id="_K0t?FJMtM[FH.lkcPy}"> <field name="VAR" id="4)(XlXw+KxglBrbN0V14">Inhalt</field> <value name="VALUE"> <block type="on_source" id="!e#8?-;SpoWc|}mWL#{z"> <field name="ATTR">state.val</field> </block> </value> <next> <block type="variables_set" id="F:fByFPerjQ#$eK*62gp"> <field name="VAR" id="+F8?wHwa)M(tMYdBS$8[">Distanzwert</field> <value name="VALUE"> <block type="lists_getSublist" id="V3GtgkVXs0XKRi3#N1yk"> <mutation at1="true" at2="true"></mutation> <field name="WHERE1">FROM_START</field> <field name="WHERE2">FROM_START</field> <value name="LIST"> <block type="variables_get" id="58Nq(hu8#cHZo-:$+=n@"> <field name="VAR" id="4)(XlXw+KxglBrbN0V14">Inhalt</field> </block> </value> <value name="AT1"> <block type="math_number" id="C|F)?tc8=+sE0*x$el$)"> <field name="NUM">50</field> </block> </value> <value name="AT2"> <block type="math_number" id="p~%Wu5F]$~xK!-6tyK!u"> <field name="NUM">53</field> </block> </value> </block> </value> <next> <block type="debug" id="(@fkprkK%8h*@.#8$ku;"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="kj{-oOaL%eAdrf?ix,9E"> <field name="TEXT">test</field> </shadow> <block type="variables_get" id="rpK,(I-f.3T8hmjDu{*J"> <field name="VAR" id="+F8?wHwa)M(tMYdBS$8[">Distanzwert</field> </block> </value> <next> <block type="lists_setIndex" id="%YF]-vWSdWShHtOKZFi3"> <mutation at="true"></mutation> <field name="MODE">SET</field> <field name="WHERE">FROM_START</field> <value name="LIST"> <block type="variables_get" id="*y)Q+d1vZ7ejo9;@9Jyf"> <field name="VAR" id="C_5Sa1P)zCNOKF`eRQmD">Messreihe</field> </block> </value> <value name="AT"> <block type="variables_get" id="djzRpgAr}TL=DB]1[rLE"> <field name="VAR" id="[|E@cx52aezVEG5!WZIo">Anzahl Messwerte</field> </block> </value> <value name="TO"> <block type="convert_tonumber" id="Q`qNgRbCd;Hw@r`JLjhy"> <value name="VALUE"> <block type="variables_get" id=".9nMIGKFv[OYsJ_czM46"> <field name="VAR" id="+F8?wHwa)M(tMYdBS$8[">Distanzwert</field> </block> </value> </block> </value> <next> <block type="variables_set" id="l/c^/OrI?FI;f9R8inX/"> <field name="VAR" id="[OrG_M{[^Ug2w:4oq6.v">Sortiert</field> <value name="VALUE"> <block type="lists_sort" id="Q]TFu93qH;k0XGhu|dRp"> <field name="TYPE">NUMERIC</field> <field name="DIRECTION">1</field> <value name="LIST"> <block type="variables_get" id="H}JFd|}rUNoqve`cn8vA"> <field name="VAR" id="C_5Sa1P)zCNOKF`eRQmD">Messreihe</field> </block> </value> </block> </value> <next> <block type="variables_set" id="wDn/StCj*On,@RCcq5eA"> <field name="VAR" id="C_5Sa1P)zCNOKF`eRQmD">Messreihe</field> <value name="VALUE"> <block type="lists_getSublist" id="gj`Fhbq~X)WX$0f_QYk("> <mutation at1="true" at2="true"></mutation> <field name="WHERE1">FROM_START</field> <field name="WHERE2">FROM_START</field> <value name="LIST"> <block type="variables_get" id="$[g#Xh)Z1(|,s9*#^#[="> <field name="VAR" id="C_5Sa1P)zCNOKF`eRQmD">Messreihe</field> </block> </value> <value name="AT1"> <block type="math_number" id="OCM9nfXSr?z.f%gSlJuT"> <field name="NUM">2</field> </block> </value> <value name="AT2"> <block type="variables_get" id=";k[,+fxP#MtncP@Z:)0p"> <field name="VAR" id="[|E@cx52aezVEG5!WZIo">Anzahl Messwerte</field> </block> </value> </block> </value> <next> <block type="debug" id="^y,9jvjzhl`^@,_/|ifm"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="2d|X?FA5jKn0faDqxO#/"> <field name="TEXT">test</field> </shadow> <block type="variables_get" id="|4XymxXL|_P6;Rzp@?er"> <field name="VAR" id="[OrG_M{[^Ug2w:4oq6.v">Sortiert</field> </block> </value> <next> <block type="update" id="mrIu#JyMd;9.JoPPKg+^"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Zisterne_cm</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="lists_getIndex" id="`yADikhJ,dTe{}DQ!lXw"> <mutation statement="false" at="false"></mutation> <field name="MODE">GET</field> <field name="WHERE">LAST</field> <value name="VALUE"> <block type="variables_get" id="hsKNGW=IEd)=+2JaH]!E"> <field name="VAR" id="[OrG_M{[^Ug2w:4oq6.v">Sortiert</field> </block> </value> </block> </value> <next> <block type="variables_set" id="!pA^.6OsnKTiO?ylx!f5"> <field name="VAR" id="UhIv[=c5pxjGb*b:^sG=">Zähler</field> <value name="VALUE"> <block type="math_round" id="Wc|NRAWl)|v;7BJ]*oZW"> <field name="OP">ROUNDUP</field> <value name="NUM"> <shadow type="math_number" id="$?jX$|wVH*6n+r|AK5[r"> <field name="NUM">3.1</field> </shadow> <block type="math_arithmetic" id="L!{.V@.-s)Cs+|BTBD]["> <field name="OP">DIVIDE</field> <value name="A"> <shadow type="math_number" id="@:9;%@*-z4/Ph^VAt%|C"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="jGIvf#$lR_abhH-_i|{/"> <field name="VAR" id="[|E@cx52aezVEG5!WZIo">Anzahl Messwerte</field> </block> </value> <value name="B"> <shadow type="math_number" id="EU{D*d]6kh|kG?Qpa{-i"> <field name="NUM">2</field> </shadow> </value> </block> </value> </block> </value> <next> <block type="debug" id="2~(TLB#]~CbB}^(pJmR}"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="#lW-,sP7+KG9J^}/+$gT"> <field name="TEXT">test</field> </shadow> <block type="text_join" id="DMiI+0OCgK!{hYbkQDm7"> <mutation items="2"></mutation> <value name="ADD0"> <block type="text" id="7cJ2x}4F4kN`XzB84qg)"> <field name="TEXT">Zähler: </field> </block> </value> <value name="ADD1"> <block type="variables_get" id="Y{$6~b^E4pR]OTK`([AN"> <field name="VAR" id="UhIv[=c5pxjGb*b:^sG=">Zähler</field> </block> </value> </block> </value> <next> <block type="variables_set" id="GsA43i[c=k(==!|U,R[k"> <field name="VAR" id="w_Vmyv3k=J7)88!p**42">Geglättet</field> <value name="VALUE"> <block type="math_number" id="D$)xA]GI57Ck/RWKT][m"> <field name="NUM">0</field> </block> </value> <next> <block type="controls_whileUntil" id="FZ}+^)HAFiu^9k#)lT/R"> <field name="MODE">WHILE</field> <value name="BOOL"> <block type="logic_compare" id="a~DgGB-@W,hl34B[.=4|"> <field name="OP">LTE</field> <value name="A"> <block type="variables_get" id="5R@S--UZt{h8qlag=da?"> <field name="VAR" id="UhIv[=c5pxjGb*b:^sG=">Zähler</field> </block> </value> <value name="B"> <block type="variables_get" id="(*6i1_T^qmp:hZJ4ID2E"> <field name="VAR" id="[|E@cx52aezVEG5!WZIo">Anzahl Messwerte</field> </block> </value> </block> </value> <statement name="DO"> <block type="math_change" id="Ql*3*IEorB]zA7kex[s;"> <field name="VAR" id="w_Vmyv3k=J7)88!p**42">Geglättet</field> <value name="DELTA"> <shadow type="math_number" id=")^c88tB$IBp7UKXy-H`@"> <field name="NUM">1</field> </shadow> <block type="convert_tonumber" id="vVf}Xzp8B!Af}zOIgo3e"> <value name="VALUE"> <block type="lists_getIndex" id="jIyq3WuF/hE@^qppTQ^j"> <mutation statement="false" at="true"></mutation> <field name="MODE">GET</field> <field name="WHERE">FROM_START</field> <value name="VALUE"> <block type="variables_get" id="HLoK6Hcmjvb(xk5eBA;j"> <field name="VAR" id="[OrG_M{[^Ug2w:4oq6.v">Sortiert</field> </block> </value> <value name="AT"> <block type="variables_get" id="@,k0)]}oWflDlQbxWcZ@"> <field name="VAR" id="UhIv[=c5pxjGb*b:^sG=">Zähler</field> </block> </value> </block> </value> </block> </value> <next> <block type="variables_set" id="F7Rqaa7e]GQq08nim13="> <field name="VAR" id="w_Vmyv3k=J7)88!p**42">Geglättet</field> <value name="VALUE"> <block type="math_round" id="RU){}Fo9?b!1+2)~c~w;"> <field name="OP">ROUND</field> <value name="NUM"> <shadow type="math_number" id="A7wHWjQC$76+!fmXdEq4"> <field name="NUM">3.1</field> </shadow> <block type="math_arithmetic" id="~@$1SNCtP(zR:T[FhhDN"> <field name="OP">DIVIDE</field> <value name="A"> <shadow type="math_number" id="oj*xir?0B#hs;Rv./Z}h"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="mP|?$hF~*0Viu}Mf7#(:"> <field name="VAR" id="w_Vmyv3k=J7)88!p**42">Geglättet</field> </block> </value> <value name="B"> <shadow type="math_number" id="+T*}cBg73TuC0mOvO?pQ"> <field name="NUM">2</field> </shadow> </value> </block> </value> </block> </value> <next> <block type="math_change" id="Hy,2i%M#}bl%U-7is0w`"> <field name="VAR" id="UhIv[=c5pxjGb*b:^sG=">Zähler</field> <value name="DELTA"> <shadow type="math_number" id=")znl?,Bj_M0k8d[)mp!5"> <field name="NUM">1</field> </shadow> </value> </block> </next> </block> </next> </block> </statement> <next> <block type="debug" id="I;Bj0X`RWaALN0,TM39n"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="{vq:[?r,-gO4(A.-;c#c"> <field name="TEXT">test</field> </shadow> <block type="text_join" id="I0-Zh,WV.w~O9a!{)8hl"> <mutation items="2"></mutation> <value name="ADD0"> <block type="text" id="z{$IqPz73IVWx^Mt!-Xe"> <field name="TEXT">Geglättet: </field> </block> </value> <value name="ADD1"> <block type="variables_get" id="xiwJnx5tMo;ofFVlNgb*"> <field name="VAR" id="w_Vmyv3k=J7)88!p**42">Geglättet</field> </block> </value> </block> </value> <next> <block type="debug" id="e8DYRYRd:X^,H/875KXp"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text"> <field name="TEXT">test</field> </shadow> <block type="math_arithmetic" id="%H:;5C%wwl)?1E2f5GZ="> <field name="OP">MULTIPLY</field> <value name="A"> <shadow type="math_number"> <field name="NUM">1</field> </shadow> <block type="math_arithmetic" id="Q!KLr}H,0Z_ij0dRijjF"> <field name="OP">MINUS</field> <value name="A"> <shadow type="math_number" id="Y]G-md2aN_iEGgcGuMM)"> <field name="NUM">200</field> </shadow> </value> <value name="B"> <shadow type="math_number" id="@+szhk=xP#n^ryml[99("> <field name="NUM">1</field> </shadow> <block type="variables_get" id="1|rObd;vI6KR[i(P|rlQ"> <field name="VAR" id="w_Vmyv3k=J7)88!p**42">Geglättet</field> </block> </value> </block> </value> <value name="B"> <shadow type="math_number" id="Q[YRfrKDGU=/L/)R=j,."> <field name="NUM">50</field> </shadow> </value> </block> </value> <next> <block type="update" id="kYKh9^Sq[)w`*XPc?7y:"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Zisterne_Liter</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_round" id="$X2ug0Dml1`)L1{Z,PKW"> <field name="OP">ROUND</field> <value name="NUM"> <shadow type="math_number" id="]9y3xaz%4V`Z/f*a+{vz"> <field name="NUM">3.1</field> </shadow> <block type="math_arithmetic" id="pMCDE=_ANwVzsgflpa.?"> <field name="OP">MULTIPLY</field> <value name="A"> <shadow type="math_number"> <field name="NUM">1</field> </shadow> <block type="math_arithmetic" id="pCSO*:#}=Mrnd*4[)sTi"> <field name="OP">MINUS</field> <value name="A"> <shadow type="math_number" id="PLMf5GX/VB4Ej4D;Bi7M"> <field name="NUM">200</field> </shadow> </value> <value name="B"> <shadow type="math_number" id="5`8*I}7TdY8zrL(@%Vhd"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="s.BKgDOI[Wf1g##1{E0|"> <field name="VAR" id="w_Vmyv3k=J7)88!p**42">Geglättet</field> </block> </value> </block> </value> <value name="B"> <shadow type="math_number" id="[(VJJ}VIx}2Otb5~/6/8"> <field name="NUM">50</field> </shadow> </value> </block> </value> </block> </value> </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> </next> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </next> </block> </xml>Ich nehme an, dass es sich um einen JSON handelt? Mir sind leider die Unterschiede zwischen Objekten, Listen, JSON etc. nicht so richtig klar...Ich habe nun einfach die Werte per ausschneiden aus dem Inhalt des DP geschnitten, aber das ist natürlich nicht ganz korrekt, da der mal 2 oder auch 3 Vorkommastellen haben kann. Ich glaube man kann das auch eleganter machen?
-
@opensourcenomad Ich nehme an, Du hast das selber programmiert?
Ich habe mir nun ein Blockly gebastelt um das zu bewerkstelligen:
<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable id="[|E@cx52aezVEG5!WZIo">Anzahl Messwerte</variable> <variable id="4)(XlXw+KxglBrbN0V14">Inhalt</variable> <variable id="C_5Sa1P)zCNOKF`eRQmD">Messreihe</variable> <variable id="[OrG_M{[^Ug2w:4oq6.v">Sortiert</variable> <variable id="+F8?wHwa)M(tMYdBS$8[">Distanzwert</variable> <variable id="UhIv[=c5pxjGb*b:^sG=">Zähler</variable> <variable id="w_Vmyv3k=J7)88!p**42">Geglättet</variable> </variables> <block type="variables_set" id="t*WPoL~N7|dBW5vW8m:$" x="113" y="88"> <field name="VAR" id="[|E@cx52aezVEG5!WZIo">Anzahl Messwerte</field> <value name="VALUE"> <block type="math_number" id="8Wg_aD}#$Slw7_rAoswN"> <field name="NUM">25</field> </block> </value> <next> <block type="variables_set" id="tB,AEfHrqP{kTK(*cEBR"> <field name="VAR" id="4)(XlXw+KxglBrbN0V14">Inhalt</field> <value name="VALUE"> <block type="lists_create_with" id="%wm`Fsdg!M00gTqGb1`a"> <mutation items="0"></mutation> </block> </value> <next> <block type="variables_set" id="4dW(6da^5JiZxQ7$*CR="> <field name="VAR" id="C_5Sa1P)zCNOKF`eRQmD">Messreihe</field> <value name="VALUE"> <block type="lists_repeat" id="@0+hhUZ{?.p8MF!J@lqz"> <value name="NUM"> <shadow type="math_number" id="*d/u,hF)^C~98hqm7U[!"> <field name="NUM">10</field> </shadow> <block type="variables_get" id="4Mr=iQ6K`Q@K}YHqo:ra"> <field name="VAR" id="[|E@cx52aezVEG5!WZIo">Anzahl Messwerte</field> </block> </value> <value name="ITEM"> <block type="math_number" id=";v!6uUof$%}Dz`@_5ofj"> <field name="NUM">0</field> </block> </value> </block> </value> <next> <block type="variables_set" id="%(()rkL_lMzU-dOE`mFT"> <field name="VAR" id="[OrG_M{[^Ug2w:4oq6.v">Sortiert</field> <value name="VALUE"> <block type="lists_repeat" id="PlvOBk4QfQ2()0+oLyeD"> <value name="NUM"> <shadow type="math_number" id="MP+;%F,xMh9/`e`qbse."> <field name="NUM">10</field> </shadow> <block type="variables_get" id=")9[mJQwxi:@(dCvt8#u|"> <field name="VAR" id="[|E@cx52aezVEG5!WZIo">Anzahl Messwerte</field> </block> </value> <value name="ITEM"> <block type="math_number" id="T2y?dMB*GaWw6Q8aShRj"> <field name="NUM">0</field> </block> </value> </block> </value> <next> <block type="on" id="Tg)3ZXkU,YZIEtun1EH5"> <field name="OID">mqtt.0.tele.Zisterne.SENSOR</field> <field name="CONDITION">ne</field> <field name="ACK_CONDITION"></field> <statement name="STATEMENT"> <block type="debug" id="eZt!/)(q5^E]H*8K@)JV"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="j8aZ7$Q#Y*Z54rcze2x!"> <field name="TEXT">test</field> </shadow> <block type="get_value" id="Y*4~Q$?)qj#/7F-6`hgY"> <field name="ATTR">val</field> <field name="OID">mqtt.0.tele.Zisterne.SENSOR</field> </block> </value> <next> <block type="variables_set" id="_K0t?FJMtM[FH.lkcPy}"> <field name="VAR" id="4)(XlXw+KxglBrbN0V14">Inhalt</field> <value name="VALUE"> <block type="on_source" id="!e#8?-;SpoWc|}mWL#{z"> <field name="ATTR">state.val</field> </block> </value> <next> <block type="variables_set" id="F:fByFPerjQ#$eK*62gp"> <field name="VAR" id="+F8?wHwa)M(tMYdBS$8[">Distanzwert</field> <value name="VALUE"> <block type="lists_getSublist" id="V3GtgkVXs0XKRi3#N1yk"> <mutation at1="true" at2="true"></mutation> <field name="WHERE1">FROM_START</field> <field name="WHERE2">FROM_START</field> <value name="LIST"> <block type="variables_get" id="58Nq(hu8#cHZo-:$+=n@"> <field name="VAR" id="4)(XlXw+KxglBrbN0V14">Inhalt</field> </block> </value> <value name="AT1"> <block type="math_number" id="C|F)?tc8=+sE0*x$el$)"> <field name="NUM">50</field> </block> </value> <value name="AT2"> <block type="math_number" id="p~%Wu5F]$~xK!-6tyK!u"> <field name="NUM">53</field> </block> </value> </block> </value> <next> <block type="debug" id="(@fkprkK%8h*@.#8$ku;"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="kj{-oOaL%eAdrf?ix,9E"> <field name="TEXT">test</field> </shadow> <block type="variables_get" id="rpK,(I-f.3T8hmjDu{*J"> <field name="VAR" id="+F8?wHwa)M(tMYdBS$8[">Distanzwert</field> </block> </value> <next> <block type="lists_setIndex" id="%YF]-vWSdWShHtOKZFi3"> <mutation at="true"></mutation> <field name="MODE">SET</field> <field name="WHERE">FROM_START</field> <value name="LIST"> <block type="variables_get" id="*y)Q+d1vZ7ejo9;@9Jyf"> <field name="VAR" id="C_5Sa1P)zCNOKF`eRQmD">Messreihe</field> </block> </value> <value name="AT"> <block type="variables_get" id="djzRpgAr}TL=DB]1[rLE"> <field name="VAR" id="[|E@cx52aezVEG5!WZIo">Anzahl Messwerte</field> </block> </value> <value name="TO"> <block type="convert_tonumber" id="Q`qNgRbCd;Hw@r`JLjhy"> <value name="VALUE"> <block type="variables_get" id=".9nMIGKFv[OYsJ_czM46"> <field name="VAR" id="+F8?wHwa)M(tMYdBS$8[">Distanzwert</field> </block> </value> </block> </value> <next> <block type="variables_set" id="l/c^/OrI?FI;f9R8inX/"> <field name="VAR" id="[OrG_M{[^Ug2w:4oq6.v">Sortiert</field> <value name="VALUE"> <block type="lists_sort" id="Q]TFu93qH;k0XGhu|dRp"> <field name="TYPE">NUMERIC</field> <field name="DIRECTION">1</field> <value name="LIST"> <block type="variables_get" id="H}JFd|}rUNoqve`cn8vA"> <field name="VAR" id="C_5Sa1P)zCNOKF`eRQmD">Messreihe</field> </block> </value> </block> </value> <next> <block type="variables_set" id="wDn/StCj*On,@RCcq5eA"> <field name="VAR" id="C_5Sa1P)zCNOKF`eRQmD">Messreihe</field> <value name="VALUE"> <block type="lists_getSublist" id="gj`Fhbq~X)WX$0f_QYk("> <mutation at1="true" at2="true"></mutation> <field name="WHERE1">FROM_START</field> <field name="WHERE2">FROM_START</field> <value name="LIST"> <block type="variables_get" id="$[g#Xh)Z1(|,s9*#^#[="> <field name="VAR" id="C_5Sa1P)zCNOKF`eRQmD">Messreihe</field> </block> </value> <value name="AT1"> <block type="math_number" id="OCM9nfXSr?z.f%gSlJuT"> <field name="NUM">2</field> </block> </value> <value name="AT2"> <block type="variables_get" id=";k[,+fxP#MtncP@Z:)0p"> <field name="VAR" id="[|E@cx52aezVEG5!WZIo">Anzahl Messwerte</field> </block> </value> </block> </value> <next> <block type="debug" id="^y,9jvjzhl`^@,_/|ifm"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="2d|X?FA5jKn0faDqxO#/"> <field name="TEXT">test</field> </shadow> <block type="variables_get" id="|4XymxXL|_P6;Rzp@?er"> <field name="VAR" id="[OrG_M{[^Ug2w:4oq6.v">Sortiert</field> </block> </value> <next> <block type="update" id="mrIu#JyMd;9.JoPPKg+^"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Zisterne_cm</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="lists_getIndex" id="`yADikhJ,dTe{}DQ!lXw"> <mutation statement="false" at="false"></mutation> <field name="MODE">GET</field> <field name="WHERE">LAST</field> <value name="VALUE"> <block type="variables_get" id="hsKNGW=IEd)=+2JaH]!E"> <field name="VAR" id="[OrG_M{[^Ug2w:4oq6.v">Sortiert</field> </block> </value> </block> </value> <next> <block type="variables_set" id="!pA^.6OsnKTiO?ylx!f5"> <field name="VAR" id="UhIv[=c5pxjGb*b:^sG=">Zähler</field> <value name="VALUE"> <block type="math_round" id="Wc|NRAWl)|v;7BJ]*oZW"> <field name="OP">ROUNDUP</field> <value name="NUM"> <shadow type="math_number" id="$?jX$|wVH*6n+r|AK5[r"> <field name="NUM">3.1</field> </shadow> <block type="math_arithmetic" id="L!{.V@.-s)Cs+|BTBD]["> <field name="OP">DIVIDE</field> <value name="A"> <shadow type="math_number" id="@:9;%@*-z4/Ph^VAt%|C"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="jGIvf#$lR_abhH-_i|{/"> <field name="VAR" id="[|E@cx52aezVEG5!WZIo">Anzahl Messwerte</field> </block> </value> <value name="B"> <shadow type="math_number" id="EU{D*d]6kh|kG?Qpa{-i"> <field name="NUM">2</field> </shadow> </value> </block> </value> </block> </value> <next> <block type="debug" id="2~(TLB#]~CbB}^(pJmR}"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="#lW-,sP7+KG9J^}/+$gT"> <field name="TEXT">test</field> </shadow> <block type="text_join" id="DMiI+0OCgK!{hYbkQDm7"> <mutation items="2"></mutation> <value name="ADD0"> <block type="text" id="7cJ2x}4F4kN`XzB84qg)"> <field name="TEXT">Zähler: </field> </block> </value> <value name="ADD1"> <block type="variables_get" id="Y{$6~b^E4pR]OTK`([AN"> <field name="VAR" id="UhIv[=c5pxjGb*b:^sG=">Zähler</field> </block> </value> </block> </value> <next> <block type="variables_set" id="GsA43i[c=k(==!|U,R[k"> <field name="VAR" id="w_Vmyv3k=J7)88!p**42">Geglättet</field> <value name="VALUE"> <block type="math_number" id="D$)xA]GI57Ck/RWKT][m"> <field name="NUM">0</field> </block> </value> <next> <block type="controls_whileUntil" id="FZ}+^)HAFiu^9k#)lT/R"> <field name="MODE">WHILE</field> <value name="BOOL"> <block type="logic_compare" id="a~DgGB-@W,hl34B[.=4|"> <field name="OP">LTE</field> <value name="A"> <block type="variables_get" id="5R@S--UZt{h8qlag=da?"> <field name="VAR" id="UhIv[=c5pxjGb*b:^sG=">Zähler</field> </block> </value> <value name="B"> <block type="variables_get" id="(*6i1_T^qmp:hZJ4ID2E"> <field name="VAR" id="[|E@cx52aezVEG5!WZIo">Anzahl Messwerte</field> </block> </value> </block> </value> <statement name="DO"> <block type="math_change" id="Ql*3*IEorB]zA7kex[s;"> <field name="VAR" id="w_Vmyv3k=J7)88!p**42">Geglättet</field> <value name="DELTA"> <shadow type="math_number" id=")^c88tB$IBp7UKXy-H`@"> <field name="NUM">1</field> </shadow> <block type="convert_tonumber" id="vVf}Xzp8B!Af}zOIgo3e"> <value name="VALUE"> <block type="lists_getIndex" id="jIyq3WuF/hE@^qppTQ^j"> <mutation statement="false" at="true"></mutation> <field name="MODE">GET</field> <field name="WHERE">FROM_START</field> <value name="VALUE"> <block type="variables_get" id="HLoK6Hcmjvb(xk5eBA;j"> <field name="VAR" id="[OrG_M{[^Ug2w:4oq6.v">Sortiert</field> </block> </value> <value name="AT"> <block type="variables_get" id="@,k0)]}oWflDlQbxWcZ@"> <field name="VAR" id="UhIv[=c5pxjGb*b:^sG=">Zähler</field> </block> </value> </block> </value> </block> </value> <next> <block type="variables_set" id="F7Rqaa7e]GQq08nim13="> <field name="VAR" id="w_Vmyv3k=J7)88!p**42">Geglättet</field> <value name="VALUE"> <block type="math_round" id="RU){}Fo9?b!1+2)~c~w;"> <field name="OP">ROUND</field> <value name="NUM"> <shadow type="math_number" id="A7wHWjQC$76+!fmXdEq4"> <field name="NUM">3.1</field> </shadow> <block type="math_arithmetic" id="~@$1SNCtP(zR:T[FhhDN"> <field name="OP">DIVIDE</field> <value name="A"> <shadow type="math_number" id="oj*xir?0B#hs;Rv./Z}h"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="mP|?$hF~*0Viu}Mf7#(:"> <field name="VAR" id="w_Vmyv3k=J7)88!p**42">Geglättet</field> </block> </value> <value name="B"> <shadow type="math_number" id="+T*}cBg73TuC0mOvO?pQ"> <field name="NUM">2</field> </shadow> </value> </block> </value> </block> </value> <next> <block type="math_change" id="Hy,2i%M#}bl%U-7is0w`"> <field name="VAR" id="UhIv[=c5pxjGb*b:^sG=">Zähler</field> <value name="DELTA"> <shadow type="math_number" id=")znl?,Bj_M0k8d[)mp!5"> <field name="NUM">1</field> </shadow> </value> </block> </next> </block> </next> </block> </statement> <next> <block type="debug" id="I;Bj0X`RWaALN0,TM39n"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="{vq:[?r,-gO4(A.-;c#c"> <field name="TEXT">test</field> </shadow> <block type="text_join" id="I0-Zh,WV.w~O9a!{)8hl"> <mutation items="2"></mutation> <value name="ADD0"> <block type="text" id="z{$IqPz73IVWx^Mt!-Xe"> <field name="TEXT">Geglättet: </field> </block> </value> <value name="ADD1"> <block type="variables_get" id="xiwJnx5tMo;ofFVlNgb*"> <field name="VAR" id="w_Vmyv3k=J7)88!p**42">Geglättet</field> </block> </value> </block> </value> <next> <block type="debug" id="e8DYRYRd:X^,H/875KXp"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text"> <field name="TEXT">test</field> </shadow> <block type="math_arithmetic" id="%H:;5C%wwl)?1E2f5GZ="> <field name="OP">MULTIPLY</field> <value name="A"> <shadow type="math_number"> <field name="NUM">1</field> </shadow> <block type="math_arithmetic" id="Q!KLr}H,0Z_ij0dRijjF"> <field name="OP">MINUS</field> <value name="A"> <shadow type="math_number" id="Y]G-md2aN_iEGgcGuMM)"> <field name="NUM">200</field> </shadow> </value> <value name="B"> <shadow type="math_number" id="@+szhk=xP#n^ryml[99("> <field name="NUM">1</field> </shadow> <block type="variables_get" id="1|rObd;vI6KR[i(P|rlQ"> <field name="VAR" id="w_Vmyv3k=J7)88!p**42">Geglättet</field> </block> </value> </block> </value> <value name="B"> <shadow type="math_number" id="Q[YRfrKDGU=/L/)R=j,."> <field name="NUM">50</field> </shadow> </value> </block> </value> <next> <block type="update" id="kYKh9^Sq[)w`*XPc?7y:"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Zisterne_Liter</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_round" id="$X2ug0Dml1`)L1{Z,PKW"> <field name="OP">ROUND</field> <value name="NUM"> <shadow type="math_number" id="]9y3xaz%4V`Z/f*a+{vz"> <field name="NUM">3.1</field> </shadow> <block type="math_arithmetic" id="pMCDE=_ANwVzsgflpa.?"> <field name="OP">MULTIPLY</field> <value name="A"> <shadow type="math_number"> <field name="NUM">1</field> </shadow> <block type="math_arithmetic" id="pCSO*:#}=Mrnd*4[)sTi"> <field name="OP">MINUS</field> <value name="A"> <shadow type="math_number" id="PLMf5GX/VB4Ej4D;Bi7M"> <field name="NUM">200</field> </shadow> </value> <value name="B"> <shadow type="math_number" id="5`8*I}7TdY8zrL(@%Vhd"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="s.BKgDOI[Wf1g##1{E0|"> <field name="VAR" id="w_Vmyv3k=J7)88!p**42">Geglättet</field> </block> </value> </block> </value> <value name="B"> <shadow type="math_number" id="[(VJJ}VIx}2Otb5~/6/8"> <field name="NUM">50</field> </shadow> </value> </block> </value> </block> </value> </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> </next> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </next> </block> </xml>Ich nehme an, dass es sich um einen JSON handelt? Mir sind leider die Unterschiede zwischen Objekten, Listen, JSON etc. nicht so richtig klar...Ich habe nun einfach die Werte per ausschneiden aus dem Inhalt des DP geschnitten, aber das ist natürlich nicht ganz korrekt, da der mal 2 oder auch 3 Vorkommastellen haben kann. Ich glaube man kann das auch eleganter machen?
@joergh said in [Gelöst] Wemos D1 (Tasmota) Zisternenfüllstand MQTT Problem:
Ich nehme an, Du hast das selber programmiert?
Nope, programmieren tuh ich nicht, dauert mir zulange

Bei mir läuft alles mit esphome ("no code" approach), die Filter sind nicht mehr als eine Zeile yaml, siehe Link oben
-
@joergh said in [Gelöst] Wemos D1 (Tasmota) Zisternenfüllstand MQTT Problem:
Ich nehme an, Du hast das selber programmiert?
Nope, programmieren tuh ich nicht, dauert mir zulange

Bei mir läuft alles mit esphome ("no code" approach), die Filter sind nicht mehr als eine Zeile yaml, siehe Link oben
@opensourcenomad Ahja. Das habe ich mir gerade mal angesehen. Ist ganz nice, aber auch hier muss man wieder eine neue Art der Sprache lernen, was Aufwand bedeutet.
-
@opensourcenomad Ahja. Das habe ich mir gerade mal angesehen. Ist ganz nice, aber auch hier muss man wieder eine neue Art der Sprache lernen, was Aufwand bedeutet.
@joergh said in [Gelöst] Wemos D1 (Tasmota) Zisternenfüllstand MQTT Problem:
eine neue Art der Sprache lernen
YAML - "YAML Ain’t Markup Language"

Gegen deinen blocky/json/JavaScript wasauchimmer code den du oben gepostet hast ist yaml Kindergarten, dich wird das wahrscheinlich (zusammen mit der ausgezeichnet Dokumentation auf www.esphome.io) wahrscheinlich keine 5 Minute kosten die komplette Syntax zu durchblicken

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