<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hallo Frank, <div class=""><br class=""></div><div class="">das ist ne gute Frage, ich versuche gerade rauszufinden was das für ne Version ist, weiß nur nicht genau wie.</div><div class=""><br class=""></div><div class="">Ich habe das image verwendet, und es ist definitv noch ein image ohne nginx, ppm und virtuelle Kanäle.</div><div class=""><br class=""></div><div class="">Das mit dem Update ist auch so ne Sache, da habe ich mich bisher nie dran getraut. Bisher habe ich immer ein komplett neues Image aufgespielt, was ich allerdings jetzt nicht mehr machen wollen würde. Früher habe ich eine neue SD karte vorbereitet und dann einfach gewechselt, jetzt habe ich eine festverbaute SSD im Einsatz, und solange wollte ich den VZ nicht offline haben.</div><div class=""><br class=""></div><div class="">Ich hatte auch irgendwann mal auf einem Testsystem ein Update gemacht, dazu hatte ich auch eine Anleitung, allerdings finde ich diese nicht mehr. Bin mir nicht mehr sicher ob ich die aus dem Wiki oder hier aus der mailingliste hatte.</div><div class=""><br class=""></div><div class="">Wenn mir also jemand nen Tip geben kann wo ich suchen muss, bzw mir zusammenfassen kann wie ich ein Update sinnvollerweise mache, dann würde ich das System mal updaten.</div><div class=""><br class=""></div><div class="">Gruß Tobias<br class=""><div><blockquote type="cite" class=""><div class="">Am 31.03.2020 um 20:25 schrieb Frank Richter <<a href="mailto:frank.richter83@gmail.com" class="">frank.richter83@gmail.com</a>>:</div><br class="Apple-interchange-newline"><div class=""><div dir="auto" class="">Hallo Tobias,<div dir="auto" class=""><br class=""></div><div dir="auto" class="">von wann ist deine Installation? Hab das von GitHub kopiert, wenn's bei dir anders aussieht müsstest du vielleicht mal wieder updaten.</div><div dir="auto" class=""><br class=""></div><div dir="auto" class=""><a href="https://github.com/volkszaehler/volkszaehler.org/blob/master/htdocs/js/wui.js#L826" class="">https://github.com/volkszaehler/volkszaehler.org/blob/master/htdocs/js/wui.js#L826</a><br class=""></div><div dir="auto" class=""><br class=""></div><div dir="auto" class="">Grüße</div><div dir="auto" class="">Frank</div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Tobias Lehr <<a href="mailto:tobias.lehr@me.com" target="_blank" rel="noreferrer" class="">tobias.lehr@me.com</a>> schrieb am Di., 31. März 2020, 20:13:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class="">So ich wollte mich nochmal melden.<div class=""><br class=""></div><div class="">Die zweite SQL Abfrage, die in der Tabelle agregate nachschlägt, war bei mir auch erfolgreich.</div><div class=""><br class=""></div><div class="">Allerdings bin ich bei der dauerhaften Lösung im Frontend nicht weitergekommen.</div><div class=""><br class=""></div><div class="">Leider funktioniert der unschöne Hack in der options.js nicht. Also die precision auf 8 zu nehmen und dann für alle anderen Einheiten wie m3 eine maxprecision vorzunehmen, Wenn ich precision auf 8 nehme, dann haben alle Werte acht stellen. Auch die Temperaturen, die ja schon eine maxPrecision definiert haben. Ein weiter Regel für ‚W‘ hinzuzufügen hat leider gar keinen Effekt.</div><div class=""><br class=""></div><div class="">Also habe ich in der WUI.js gesucht, und die angegebene Stelle:</div><div class=""><br class=""></div><div class=""><div class="">var precision = (Math.abs(si.number) < vz.options.minNumber) ? 0 :<br class=""></div><div class=""> Math.max(0, vz.options.precision - Math.max(-1, Math.floor(Math.log(Math.abs(si.number))/Math.LN10)));<br class=""></div><div class=""><br class=""></div><div class="">gesucht, aber leider nicht gefunden. Zumindest nicht genauso wie in der Mail von frank angegeben.</div><div class=""><br class=""></div><div class="">Ich habe zum Thema Roundings das hier gefunden:</div><div class=""><br class=""></div><div class=""><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(83,48,225)" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><b class="">/**</b></span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(83,48,225)" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><b class=""> * Rounding precision</b></span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(83,48,225)" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><b class=""> *</b></span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(83,48,225)" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><b class=""> * Math.round rounds to whole numbers</b></span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(83,48,225)" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><b class=""> * to round to one decimal (e.g. 15.2) we multiply by 10,</b></span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(83,48,225)" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><b class=""> * round and reverse the multiplication again</b></span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(83,48,225)" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><b class=""> * therefore "vz.options.precision" needs</b></span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(83,48,225)" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><b class=""> * to be set to 1 (for 1 decimal) in that case</b></span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(83,48,225)" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><b class=""> */</b></span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">vz.wui.formatNumber = </span><span style="font-variant-ligatures:no-common-ligatures;color:#34bd26" class="">function</span><span style="font-variant-ligatures:no-common-ligatures" class="">(number, unit, prefix) {</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> prefix = prefix || true; </span><span style="font-variant-ligatures:no-common-ligatures;color:#5330e1" class=""><b class="">// default on</b></span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> </span><span style="font-variant-ligatures:no-common-ligatures;color:#34bd26" class="">var</span><span style="font-variant-ligatures:no-common-ligatures" class=""> siPrefixes = [</span><span style="font-variant-ligatures:no-common-ligatures;color:#afad24" class=""><b class="">'k'</b></span><span style="font-variant-ligatures:no-common-ligatures" class="">, </span><span style="font-variant-ligatures:no-common-ligatures;color:#afad24" class=""><b class="">'M'</b></span><span style="font-variant-ligatures:no-common-ligatures" class="">, </span><span style="font-variant-ligatures:no-common-ligatures;color:#afad24" class=""><b class="">'G'</b></span><span style="font-variant-ligatures:no-common-ligatures" class="">, </span><span style="font-variant-ligatures:no-common-ligatures;color:#afad24" class=""><b class="">'T'</b></span><span style="font-variant-ligatures:no-common-ligatures" class="">];</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> </span><span style="font-variant-ligatures:no-common-ligatures;color:#34bd26" class="">var</span><span style="font-variant-ligatures:no-common-ligatures" class=""> siIndex = 0,</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> maxIndex = (</span><span style="font-variant-ligatures:no-common-ligatures;color:#34bd26" class="">typeof</span><span style="font-variant-ligatures:no-common-ligatures" class=""> prefix == </span><span style="font-variant-ligatures:no-common-ligatures;color:#afad24" class=""><b class="">'string'</b></span><span style="font-variant-ligatures:no-common-ligatures" class="">) ? siPrefixes.indexOf(prefix)+1 : siPrefixes.length;</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;min-height:13px" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""></span><br class=""></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(83,48,225)" class=""><span style="font-variant-ligatures: no-common-ligatures;" class=""> </span><span style="font-variant-ligatures:no-common-ligatures" class=""><b class="">// flow unit or air pressure?</b></span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> </span><span style="font-variant-ligatures:no-common-ligatures;color:#afad24" class=""><b class="">if</b></span><span style="font-variant-ligatures:no-common-ligatures" class=""> ([</span><span style="font-variant-ligatures:no-common-ligatures;color:#afad24" class=""><b class="">'l'</b></span><span style="font-variant-ligatures:no-common-ligatures" class="">, </span><span style="font-variant-ligatures:no-common-ligatures;color:#afad24" class=""><b class="">'m3'</b></span><span style="font-variant-ligatures:no-common-ligatures" class="">, </span><span style="font-variant-ligatures:no-common-ligatures;color:#afad24" class=""><b class="">'m^3'</b></span><span style="font-variant-ligatures:no-common-ligatures" class="">, </span><span style="font-variant-ligatures:no-common-ligatures;color:#afad24" class=""><b class="">'m³'</b></span><span style="font-variant-ligatures:no-common-ligatures" class="">, </span><span style="font-variant-ligatures:no-common-ligatures;color:#afad24" class=""><b class="">'l/h'</b></span><span style="font-variant-ligatures:no-common-ligatures" class="">, </span><span style="font-variant-ligatures:no-common-ligatures;color:#afad24" class=""><b class="">'m3/h'</b></span><span style="font-variant-ligatures:no-common-ligatures" class="">, </span><span style="font-variant-ligatures:no-common-ligatures;color:#afad24" class=""><b class="">'m/h^3'</b></span><span style="font-variant-ligatures:no-common-ligatures" class="">, </span><span style="font-variant-ligatures:no-common-ligatures;color:#afad24" class=""><b class="">'m³/h'</b></span><span style="font-variant-ligatures:no-common-ligatures" class="">, </span><span style="font-variant-ligatures:no-common-ligatures;color:#afad24" class=""><b class="">'hPa'</b></span><span style="font-variant-ligatures:no-common-ligatures" class="">].indexOf(unit) >= 0) {</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(83,48,225)" class=""><span style="font-variant-ligatures: no-common-ligatures;" class=""> </span><span style="font-variant-ligatures:no-common-ligatures" class=""><b class="">// don't scale...</b></span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> maxIndex = -1;</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;min-height:13px" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""></span><br class=""></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(83,48,225)" class=""><span style="font-variant-ligatures: no-common-ligatures;" class=""> </span><span style="font-variant-ligatures:no-common-ligatures" class=""><b class="">// ...unless for l->m3 conversion</b></span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> </span><span style="font-variant-ligatures:no-common-ligatures;color:#afad24" class=""><b class="">if</b></span><span style="font-variant-ligatures:no-common-ligatures" class=""> (Math.abs(number) > 1000 && (unit == </span><span style="font-variant-ligatures:no-common-ligatures;color:#afad24" class=""><b class="">'l'</b></span><span style="font-variant-ligatures:no-common-ligatures" class=""> || unit == </span><span style="font-variant-ligatures:no-common-ligatures;color:#afad24" class=""><b class="">'l/h'</b></span><span style="font-variant-ligatures:no-common-ligatures" class="">)) {</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> unit = </span><span style="font-variant-ligatures:no-common-ligatures;color:#afad24" class=""><b class="">'m³'</b></span><span style="font-variant-ligatures:no-common-ligatures" class=""> + unit.substring(1);</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> number /= 1000;</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> }</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> }</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;min-height:13px" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""></span><br class=""></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> </span><span style="font-variant-ligatures:no-common-ligatures;color:#afad24" class=""><b class="">while</b></span><span style="font-variant-ligatures:no-common-ligatures" class=""> (prefix && Math.abs(number) > 1000 && siIndex < maxIndex) {</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> number /= 1000;</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> siIndex++;</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> }</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><br class=""></span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;min-height:13px" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""></span><div style="margin:0px;line-height:normal;color:rgb(83,48,225)" class=""><span style="font-variant-ligatures: no-common-ligatures;" class=""> </span><span style="font-variant-ligatures:no-common-ligatures" class=""><b class="">// avoid infinities/NaN</b></span></div><div style="margin:0px;line-height:normal" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> </span><span style="font-variant-ligatures:no-common-ligatures;color:#afad24" class=""><b class="">if</b></span><span style="font-variant-ligatures:no-common-ligatures" class=""> (number < 0 || number > 0) {</span></div><div style="margin:0px;line-height:normal" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> </span><span style="font-variant-ligatures:no-common-ligatures;color:#34bd26" class="">var</span><span style="font-variant-ligatures:no-common-ligatures" class=""> precision = Math.max(0, vz.options.precision - Math.floor(Math.log(Math.abs(number))/Math.</span><span style="font-variant-ligatures:no-common-ligatures;color:#c33720" class=""><b class="">LN10</b></span><span style="font-variant-ligatures:no-common-ligatures" class="">));</span></div><div style="margin:0px;line-height:normal;color:rgb(83,48,225)" class=""><span style="font-variant-ligatures: no-common-ligatures;" class=""> </span><span style="font-variant-ligatures:no-common-ligatures" class=""><b class="">// apply maximum precision e.g. for °C values</b></span></div><div style="margin:0px;line-height:normal" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> </span><span style="font-variant-ligatures:no-common-ligatures;color:#afad24" class=""><b class="">if</b></span><span style="font-variant-ligatures:no-common-ligatures" class=""> (vz.options.maxPrecision[unit] !== undefined) {</span></div><div style="margin:0px;line-height:normal" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> precision = Math.min(vz.options.maxPrecision[unit], precision);</span></div><div style="margin:0px;line-height:normal" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> }</span></div><div style="margin:0px;line-height:normal" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> number = Math.round(number * Math.pow(10, precision)) / Math.pow(10, precision); </span><span style="font-variant-ligatures:no-common-ligatures;color:#5330e1" class=""><b class="">// rounding</b></span></div><div style="margin:0px;line-height:normal" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> }</span></div><div style="margin:0px;line-height:normal;min-height:13px" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""></span><br class=""></div><div style="margin:0px;line-height:normal;color:rgb(83,48,225)" class=""><span style="font-variant-ligatures: no-common-ligatures;" class=""> </span><span style="font-variant-ligatures:no-common-ligatures" class=""><b class="">// avoid almost zero</b></span></div><div style="margin:0px;line-height:normal" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> </span><span style="font-variant-ligatures:no-common-ligatures;color:#afad24" class=""><b class="">if</b></span><span style="font-variant-ligatures:no-common-ligatures" class=""> (Math.abs(number) < Math.pow(10, -vz.options.precision)) {</span></div><div style="margin:0px;line-height:normal" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> number = 0;</span></div><div style="margin:0px;line-height:normal" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> }</span></div><div style="margin:0px;line-height:normal;min-height:13px" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""></span><br class=""></div><div style="margin:0px;line-height:normal" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> </span><span style="font-variant-ligatures:no-common-ligatures;color:#afad24" class=""><b class="">if</b></span><span style="font-variant-ligatures:no-common-ligatures" class=""> (prefix)</span></div><div style="margin:0px;line-height:normal" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> number += (siIndex > 0) ? </span><span style="font-variant-ligatures:no-common-ligatures;color:#afad24" class=""><b class="">' '</b></span><span style="font-variant-ligatures:no-common-ligatures" class=""> + siPrefixes[siIndex-1] : </span><span style="font-variant-ligatures:no-common-ligatures;color:#afad24" class=""><b class="">' '</b></span><span style="font-variant-ligatures:no-common-ligatures" class="">;</span></div><div style="margin:0px;line-height:normal" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> </span><span style="font-variant-ligatures:no-common-ligatures;color:#afad24" class=""><b class="">else</b></span></div><div style="margin:0px;line-height:normal" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> number += </span><span style="font-variant-ligatures:no-common-ligatures;color:#afad24" class=""><b class="">' '</b></span><span style="font-variant-ligatures:no-common-ligatures" class="">;</span></div><div style="margin:0px;line-height:normal;min-height:13px" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""></span><br class=""></div><div style="margin:0px;line-height:normal" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> </span><span style="font-variant-ligatures:no-common-ligatures;color:#afad24" class=""><b class="">if</b></span><span style="font-variant-ligatures:no-common-ligatures" class=""> (unit) number += unit;</span></div><div style="margin:0px;line-height:normal;min-height:13px" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""></span><br class=""></div><div style="margin:0px;line-height:normal" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> </span><span style="font-variant-ligatures:no-common-ligatures;color:#d53bd3" class="">return</span><span style="font-variant-ligatures:no-common-ligatures" class=""> number;</span></div><div style="margin:0px;line-height:normal" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">};</span></div><div style="margin:0px;line-height:normal" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><br class=""></span></div><div style="margin:0px;line-height:normal" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">unter avoid infinities ist die Angabe so ähnlich drin, aber eben nicht exakt, deshalb habe ich mich da auch nicht rangetraut, da ich keine Ahnung davon habe und mir nix zerschießen wollte. </span></div><div style="margin:0px;line-height:normal" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><br class=""></span></div><div style="margin:0px;line-height:normal" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">Also habe ich jetzt erst mal entschieden das Thema auf Eis zu legen, prinzipiell brauche ich die NAchkommastellen nur einmal im Jahr, und da kann ich jetzt ja die Datenbank abfrage machen, oder ich geh einfach in den Keller und lese die NAckommastellen selber ab.</span></div><div style="margin:0px;line-height:normal" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><br class=""></span></div><div style="margin:0px;line-height:normal" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">Trotzdem danke für eure Hilfe.</span></div><div style="margin:0px;line-height:normal" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><br class=""></span></div><div style="margin:0px;line-height:normal" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">Gruß</span></div><div style="margin:0px;line-height:normal" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">Tobias</span></div><div style="margin:0px;line-height:normal;min-height:13px" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""></span><br class=""></div></div></div><div class=""><blockquote type="cite" class=""><div class="">Am 29.03.2020 um 19:50 schrieb Frank Richter <<a href="mailto:frank.richter83@gmail.com" rel="noreferrer noreferrer" target="_blank" class="">frank.richter83@gmail.com</a>>:</div><br class=""><div class=""><div dir="ltr" class=""><div class="">Hi Tobias.</div><div class=""><br class=""></div>als unit musst du hier 'W' nehmen, nicht 'kWh'. Aber auch dann ist ein eher unschöner Hack...<div class=""><br class=""></div><div class="">Da würde ich eher versuchen, die Dezimalstellen zu fixieren und nicht mehr abhängig von der Stellenzahl zu machen. Ersetze mal in der wui.js</div><div class=""><br class=""></div><div class="">var precision = (Math.abs(si.number) < vz.options.minNumber) ? 0 :<br class=""></div><div class=""> Math.max(0, vz.options.precision - Math.max(-1, Math.floor(Math.log(Math.abs(si.number))/Math.LN10)));<br class=""></div><div class=""><br class=""></div><div class="">durch</div><div class=""><br class=""></div><div class="">var precision = (Math.abs(si.number) < vz.options.minNumber) ? 0 : vz.options.precision;<br class=""></div><div class=""><br class=""></div><div class="">oder gleich</div><div class=""><br class=""></div><div class=""> var precision = vz.options.precision; <br class=""></div><div class=""><br class=""></div><div class="">Ausprobiert hab ich's nicht, also keine Garantie...</div><div class=""><br class=""></div><div class="">Grüße</div><div class="">Frank</div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Am So., 29. März 2020 um 18:16 Uhr schrieb Tobias Lehr <<a href="mailto:tobias.lehr@me.com" rel="noreferrer noreferrer" target="_blank" class="">tobias.lehr@me.com</a>>:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="">Die Abfrage hat aber funktioniert, auch wenn die Ausführung 20 sec gedauert hat.<div class=""><br class=""></div><div class="">Bei der precision bin ich auch nicht weiter, habe diese auf 8 genommen, und für kWh in maxprecsision 2 definiert, hat aber nicht funktioniert, komischerweise haben damit auch Temperaturen mehr nachkommastellen, obwohl das vorher funktioniert hat</div><div class=""><br class=""></div><div class=""><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">precision: 8, </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(83,48,225)" class=""><b class="">// TODO update from middleware capabilities?</b></span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> maxPrecision:[</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> { </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(83,48,225)" class=""><b class="">// override precision for certain units</b></span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(175,173,36)" class=""><b class="">'°C'</b></span><span style="font-variant-ligatures:no-common-ligatures" class="">: 1</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> },{</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(175,173,36)" class=""><b class="">'kWh'</b></span><span style="font-variant-ligatures:no-common-ligatures" class="">: 2</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> }</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> ],</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;min-height:13px" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""></span><br class=""></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;min-height:13px" class=""><br class=""></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;min-height:13px" class="">Gruß Tobias</div><div class=""><blockquote type="cite" class=""><div class="">Am 29.03.2020 um 18:11 schrieb Frank Richter <<a href="mailto:frank.richter83@gmail.com" rel="noreferrer noreferrer" target="_blank" class="">frank.richter83@gmail.com</a>>:</div><br class=""><div class=""><div dir="auto" class="">Die SQL-Abfrage hilft nur bei einem Zählerstand-Kanal. Bei Impulsen müssen sämtliche Impulse aufsummiert werden, um den Gesamtverbrauch zu erhalten.<div dir="auto" class=""><br class=""></div><div dir="auto" class="">Grüße</div><div dir="auto" class="">Frank</div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Tobias Lehr <<a href="mailto:tobias.lehr@me.com" rel="noreferrer noreferrer" target="_blank" class="">tobias.lehr@me.com</a>> schrieb am So., 29. März 2020, 18:06:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="">Hm also dann habe ich da falsch herum gedacht. Das hieße ich müsste die precision auf 8 stellen und bei maxPrecision für alle anderen werte dann die entsprechende Zahl vorgeben? Etwas kompliziert. mal testen.<div class=""><br class=""></div><div class="">Die Datenbankabfrage habe ich jetzt auch hinbekommen, es lag an zwei doppelten Leerzeichen. Hab mir die korrekte Syntax jetzt mal abgespeichert, nur für den Fall.</div><div class=""><br class=""></div><div class="">Gruß Tobias<br class=""><div class=""><blockquote type="cite" class=""><div class="">Am 29.03.2020 um 17:43 schrieb <a href="mailto:rgb@nord-com.net" rel="noreferrer noreferrer noreferrer" target="_blank" class="">rgb@nord-com.net</a>:</div><br class=""><div class=""><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class=""><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><span lang="DE" style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)" class="">Hmm, bei mir funkioniert es…<u class=""></u><u class=""></u></span></div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><span lang="DE" style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)" class=""><u class=""></u> <u class=""></u></span></div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)" class="">pi@avz:~:(1)> mysql -uvz -pyourpassword<u class=""></u><u class=""></u></span></div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)" class="">Welcome to the MariaDB monitor. Commands end with ; or \g.<u class=""></u><u class=""></u></span></div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)" class="">Your MariaDB connection id is 76<u class=""></u><u class=""></u></span></div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)" class="">Server version: 10.3.13-MariaDB-1 Raspbian testing-staging<u class=""></u><u class=""></u></span></div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)" class=""><u class=""></u> <u class=""></u></span></div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)" class="">Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.<u class=""></u><u class=""></u></span></div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)" class=""><u class=""></u> <u class=""></u></span></div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)" class="">Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.<u class=""></u><u class=""></u></span></div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)" class=""><u class=""></u> <u class=""></u></span></div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)" class="">MariaDB [(none)]> SELECT id FROM `volkszaehler`.`entities`<u class=""></u><u class=""></u></span></div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)" class=""> -> WHERE UUID = 'b12dfd80-111c-11ea-8e1a-c9616b442377' INTO @CHANNEL;<u class=""></u><u class=""></u></span></div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)" class="">Query OK, 1 row affected (0.002 sec)<u class=""></u><u class=""></u></span></div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)" class=""><u class=""></u> <u class=""></u></span></div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)" class="">MariaDB [(none)]> SELECT channel_id AS Kanal,(SELECT VALUE FROM `volkszaehler`.`properties`<u class=""></u><u class=""></u></span></div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)" class=""> -> WHERE `entity_id` = @CHANNEL AND `pkey` = 'title') AS Name,<u class=""></u><u class=""></u></span></div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)" class=""> -> ROUND(sum(VALUE/100)+(SELECT VALUE FROM `volkszaehler`.`properties`<u class=""></u><u class=""></u></span></div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)" class=""> -> WHERE `entity_id` = @CHANNEL AND `pkey` = 'initialconsumption'),2) AS Zählerstand<u class=""></u><u class=""></u></span></div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)" class=""> -> FROM `volkszaehler`.`data`<u class=""></u><u class=""></u></span></div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)" class=""> -> WHERE `channel_id` = @CHANNEL ;<u class=""></u><u class=""></u></span></div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><span lang="DE" style="font-size:11pt;font-family:"Courier New";color:rgb(31,73,125)" class="">+-------+-------------+--------------+<u class=""></u><u class=""></u></span></div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><span lang="DE" style="font-size:11pt;font-family:"Courier New";color:rgb(31,73,125)" class="">| Kanal | Name | Zählerstand |<u class=""></u><u class=""></u></span></div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><span lang="DE" style="font-size:11pt;font-family:"Courier New";color:rgb(31,73,125)" class="">+-------+-------------+--------------+<u class=""></u><u class=""></u></span></div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><span lang="DE" style="font-size:11pt;font-family:"Courier New";color:rgb(31,73,125)" class="">| 10 | Zähler Gas | 7346.64 |<u class=""></u><u class=""></u></span></div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><span lang="DE" style="font-size:11pt;font-family:"Courier New";color:rgb(31,73,125)" class="">+-------+-------------+--------------+<u class=""></u><u class=""></u></span></div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><span lang="DE" style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)" class="">1 row in set (1.501 sec)<u class=""></u><u class=""></u></span></div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><span lang="DE" style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)" class=""><u class=""></u> <u class=""></u></span></div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><span lang="DE" style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)" class="">MariaDB [(none)]><u class=""></u><u class=""></u></span></div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><span lang="DE" style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)" class=""><u class=""></u> <u class=""></u></span></div><div style="border-style:none none none solid;border-left-color:blue;border-left-width:1.5pt;padding:0in 0in 0in 4pt" class=""><div class=""><div style="border-style:solid none none;border-top-color:rgb(181,196,223);border-top-width:1pt;padding:3pt 0in 0in" class=""><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><b class=""><span style="font-size:10pt;font-family:Tahoma,sans-serif" class="">From:</span></b><span style="font-size:10pt;font-family:Tahoma,sans-serif" class=""><span class=""> </span>volkszaehler-users [<a href="mailto:volkszaehler-users-bounces@demo.volkszaehler.org" rel="noreferrer noreferrer noreferrer" target="_blank" class="">mailto:volkszaehler-users-bounces@demo.volkszaehler.org</a>]<span class=""> </span><b class="">On Behalf Of<span class=""> </span></b>Tobias Lehr<br class=""><b class="">Sent:</b><span class=""> </span>Sunday, March 29, 2020 5:34 PM<br class=""><b class="">To:</b><span class=""> </span><a href="http://volkszaehler.org/" rel="noreferrer noreferrer noreferrer" target="_blank" class="">volkszaehler.org</a> - users<br class=""><b class="">Subject:</b><span class=""> </span>Re: [vz-users] Gesamtverbrauch Gaszähler mit Nachkommastellen<u class=""></u><u class=""></u></span></div></div></div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><u class=""></u> <u class=""></u></div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class="">Vielen Dank für die Anregungen, ABER…<u class=""></u><u class=""></u></div><div class=""><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><u class=""></u> <u class=""></u></div></div><div class=""><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class="">precision in der options.js habe ich gefunden, aber noch nicht so genau verstanden. Standardmäßig ist precision ja auf 2 eingestellt. Ich habe jetzt aber verschiedene Nachkommastellen. Temperaturen sind alle mit 1 NAchkommastelle, es sei denn diese wäre 0, dann haben sie keine nachkommastellen.<u class=""></u><u class=""></u></div></div><div class=""><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><u class=""></u> <u class=""></u></div></div><div class=""><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class="">Alle Werte mit 3 Stellen, haben gar keine Nachkommastellen. Werte kleiner 1 haben 1, 2 oder 3 Nachkommastellen. <u class=""></u><u class=""></u></div></div><div class=""><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><u class=""></u> <u class=""></u></div></div><div class=""><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class="">Die Werte unter Gesamt sind immer ohne, die haben aber auch 5 oder 6 Stellen.<u class=""></u><u class=""></u></div></div><div class=""><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><u class=""></u> <u class=""></u></div></div><div class=""><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class="">ich habe jetzt precision auf 8 hochgenommen, weil mein Gaszähler 5 Stellen vor dem Komma hat. Das funktioniert, dann hat der Gaszähler gesamt 3 Nachkommastellen, allerdings sehr unschön daran, Werte mit nur einer Stelle vor dem Komma haben dann plötzlich 7 NAchkommastellen.<u class=""></u><u class=""></u></div></div><div class=""><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><u class=""></u> <u class=""></u></div></div><div class=""><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class="">Also habe ich versucht eine Ausnahme einzufügen wie bei der für °C, das funktioniert aber nicht, ich vermute es liegt an der hochgestellten 3 in m3.<u class=""></u><u class=""></u></div></div><div class=""><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><u class=""></u> <u class=""></u></div></div><div class=""><div class=""><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><span style="font-size:8.5pt;font-family:Menlo,serif" class="">maxPrecision:[<u class=""></u><u class=""></u></span></div></div><div class=""><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><span style="font-size:8.5pt;font-family:Menlo,serif" class=""> { <span class=""> </span><b class=""><span style="color:rgb(83,48,225)" class="">// override precision for certain units</span></b><u class=""></u><u class=""></u></span></div></div><div class=""><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><span style="font-size:8.5pt;font-family:Menlo,serif" class=""> <span class=""> </span><b class=""><span style="color:rgb(175,173,36)" class="">'°C'</span></b>: 1<u class=""></u><u class=""></u></span></div></div><div class=""><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><span style="font-size:8.5pt;font-family:Menlo,serif" class=""> },{<u class=""></u><u class=""></u></span></div></div><div class=""><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><span style="font-size:8.5pt;font-family:Menlo,serif" class=""> <span class=""> </span><b class=""><span style="color:rgb(175,173,36)" class="">'m³'</span></b>: 8<u class=""></u><u class=""></u></span></div></div><div class=""><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><span style="font-size:8.5pt;font-family:Menlo,serif" class=""> }<u class=""></u><u class=""></u></span></div></div><div class=""><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><span style="font-size:8.5pt;font-family:Menlo,serif" class=""> ],<u class=""></u><u class=""></u></span></div></div><div class=""><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><br class=""><br class=""><u class=""></u><u class=""></u></div></div><div class=""><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class="">so habe ich versucht es zu erweitern. die hochgestellt 3 habe ich mir einfach reinkopiert. Aber auch die Angabe m3 oder m^3 funktionieren nicht.<u class=""></u><u class=""></u></div></div><div class=""><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><br class=""><br class=""><u class=""></u><u class=""></u></div></div><div class=""><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><br class=""><br class=""><u class=""></u><u class=""></u></div></div><div class=""><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class="">Zu der SQL Abfrage, ich würde zwar gerne den Wert fest im Frontend angezeigt bekommen aber so eine Abfrage kann ja hilfreich oder zumindest lehrreich sein. Ich muss dazu sagen ich bin absoluter Laie was SQL angeht.<u class=""></u><u class=""></u></div></div><div class=""><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><br class=""><br class=""><u class=""></u><u class=""></u></div></div><div class=""><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class="">Wo muss ich die absetzen? In mysql direkt? phpmyAdmin habe ich nicht installiert. Habe ich probiert, aber bekomme einen Fehler wenn ich folgendes eingebe, also per copy&paste.<u class=""></u><u class=""></u></div></div><div class=""><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><br class=""><br class=""><u class=""></u><u class=""></u></div></div><div class=""><blockquote style="margin-top:5pt;margin-bottom:5pt" type="cite" class=""><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class="">SELECT id FROM `volkszaehler`.`entities` <br class=""> WHERE UUID = 'b12dfd80-111c-11ea-8e1a-c9616b442377' INTO @CHANNEL;<u class=""></u><u class=""></u></div></blockquote><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><br class=""><br class=""><u class=""></u><u class=""></u></div></div><div class=""><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class="">Der Fehler lautet: <span style="font-size:8.5pt;font-family:Menlo,serif" class="">ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UUID = '01e03ee0-3241-11e9-991f-856a034c5015' INTO @CHANNEL' at line 2</span><u class=""></u><u class=""></u></div></div><div class=""><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><u class=""></u> <u class=""></u></div></div><div class=""><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><span style="font-size:8.5pt;font-family:Menlo,serif" class="">ich habe selbstverständlich die UUID auf die meines Gaszählers geändert.</span><u class=""></u><u class=""></u></div></div><div class=""><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><u class=""></u> <u class=""></u></div></div><div class=""><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><span style="font-size:8.5pt;font-family:Menlo,serif" class="">Gruß Tobias</span><u class=""></u><u class=""></u></div></div><div class=""><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><br class=""><br class=""><u class=""></u><u class=""></u></div></div><div class=""><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><br class=""><br class=""><u class=""></u><u class=""></u></div></div><div class=""><blockquote style="margin-top:5pt;margin-bottom:5pt" type="cite" class=""><div class=""><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class="">Am 29.03.2020 um 16:23 schrieb<span class=""> </span><a href="mailto:rgb@nord-com.net" style="color:purple;text-decoration:underline" rel="noreferrer noreferrer noreferrer" target="_blank" class="">rgb@nord-com.net</a>:<u class=""></u><u class=""></u></div></div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><u class=""></u> <u class=""></u></div><div class=""><div class=""><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class="">Hallo,<br class=""><br class="">Folgende SQL-Abfrage könnte als Vorlage für die Berechnung des genauen Verbrauches dienen... müsstest Du für Deine Gegebenheiten entsprechend anpassen...<br class=""><br class="">SELECT id FROM `volkszaehler`.`entities`<span class=""> </span><br class=""> WHERE UUID = 'b12dfd80-111c-11ea-8e1a-c9616b442377' INTO @CHANNEL;<br class=""><br class="">SELECT channel_id AS Kanal,(SELECT VALUE FROM `volkszaehler`.`properties`<span class=""> </span><br class=""> WHERE `entity_id` = @CHANNEL AND `pkey` = 'title') AS Name,<br class=""><span class=""> <span class=""> </span></span>ROUND(sum(VALUE/100)+(SELECT VALUE FROM `volkszaehler`.`properties`<span class=""> </span><br class=""> WHERE `entity_id` = @CHANNEL AND `pkey` = 'initialconsumption'),2) AS Zählerstand<br class="">FROM `volkszaehler`.`data`<span class=""> </span><br class="">WHERE `channel_id` = @CHANNEL ;<br class=""><br class="">Gruss,<br class="">Alex<br class=""><br class=""><br class=""><u class=""></u><u class=""></u></div><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class="">-----Original Message-----<br class="">From: volkszaehler-users [mailto:<a href="mailto:volkszaehler-users-" rel="noreferrer noreferrer noreferrer" target="_blank" class="">volkszaehler-users-</a><br class=""><a href="mailto:bounces@demo.volkszaehler.org" style="color:purple;text-decoration:underline" rel="noreferrer noreferrer noreferrer" target="_blank" class="">bounces@demo.volkszaehler.org</a>] On Behalf Of Tobias Lehr<br class="">Sent: Sunday, March 29, 2020 3:25 PM<br class="">To: volkszaehler-users<br class="">Subject: [vz-users] Gesamtverbrauch Gaszähler mit Nachkommastellen<br class=""><br class="">Hallo,<br class=""><br class="">ich logge meinen Gasverbrauch per S0 in den Volkszaehler. Die Werte für<br class="">min., max., aktuell und Verbrauch werden mit Nachkommastellen<br class="">angezeigt. Der Gesamtverbrauch wird aber nur mit ganzer Zahl angezeigt.<br class="">Mein Gaszähler hat aber 3 Nachkommastellen und mein Gasversorger<br class="">möchte den Zählerstand mit Nachkommastellen angegeben haben. Und da<br class="">ich gerade den Zählerstand für die Abrechnung angeben musste, wollte ich<br class="">wissen ob man den Gesamtverbrauch, der ja der Zählerstand ist, auch mit<br class="">Nachkommastellen anzeigen lassen kann. Ich habe da was in Erinnerung das<br class="">es eventuell durch Änderung der options.js Datei gehen könnte. Aber ich<br class="">habe leider überhaupt keine Idee wie. Liege ich da richtig? Und könnte mir<br class="">da jemand Unterstützung geben.<br class=""><br class="">Gruß Tobias</div></div></div></blockquote></div></div></div></div></div></blockquote></div><br class=""></div></div></blockquote></div>
</div></blockquote></div><br class=""></div></div></blockquote></div>
</div></blockquote></div><br class=""></div></div></blockquote></div>
</div></blockquote></div><br class=""></div></body></html>