<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
span.E-MailFormatvorlage19
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="DE-AT" link="#0563C1" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Hallo Stefan!<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Ja, direkt die VZ.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Ich hole mir mit diesem kleinem Script die Werte in ioBroker.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">var url = "http://10.0.1.93/middleware.php/data.json?from=now&uuid[]=bc3edcd0-24c4-11ea-b257-bdbd9553c516&uuid[]=deda8550-24c4-11ea-b402-275ee0956365";<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">var pfad = "Volkszaehler.";<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">var idAKTUELLER_VERBRAUCH = pfad + "AKTUELLER_VERBRAUCH";<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">var idAKTUELLE_ERZEUGUNG = pfad + "AKTUELLE_LIEFERUNG";<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">// var idAKTUELLE_HEIZUNG = pfad + "AKTUELLE_HEIZUNG";<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"> <o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">// Vorgegebene Funktion, die nur dazu dient, das JSON einzulesen<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">// Angelehnt an: http://www.iobroker.net/docu/?page_id=3691<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">var request = require("request");<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">function readJson(url, callback) {<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"> request(url, function(err, state, body) {<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"> if (body) {<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"> var json = {};<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"> if (body !== "") {<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"> try {<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"> json = JSON.parse(body);<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"> } catch (ex) {<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"> json = {};<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"> }<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"> if (!json) {<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"> json = {};<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"> }<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"> }<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"> callback(null, json);<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"> } else {<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">
</span><span style="mso-fareast-language:EN-US">var error = "(" + err + ") ERROR bei Abfrage von: " + url;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"> </span>
<span lang="EN-US" style="mso-fareast-language:EN-US">log(error, "warn");<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"> callback(error, null);<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">
</span><span style="mso-fareast-language:EN-US">}<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"> });<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">}<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">// Erzeugen der Objekte in ioBroker<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">createState(idAKTUELLER_VERBRAUCH, 0, {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"> name: 'Aktueller Verbrauch',<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"> desc: 'Aktueller Verbrauch',<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"> </span><span lang="EN-US" style="mso-fareast-language:EN-US">type: 'number',<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"> role: 'value',<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"> unit: 'W'<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">});<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">createState(idAKTUELLE_ERZEUGUNG, 0, {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"> name: 'Aktuelle Erzeugung',<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"> desc: 'Aktuelle Erzeugung',<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"> type: 'number',<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"> </span><span lang="EN-US" style="mso-fareast-language:EN-US">role: 'value',<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"> unit: 'W'<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">});<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">// createState(idAKTUELLE_HEIZUNG, 0, {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">// name: 'Aktuelle Heizung',<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">// desc: 'Aktuelle Heizung',<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">// type: 'number',<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">// role: 'value',<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">// unit: 'W'<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">// });<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">// Startet das Skript alle 2 Sekunden neu<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">schedule("*/2 * * * * *", function() {<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"> readJson(url, function(err, json) {<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"> if (!err) {<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"> var wert1 = json.data[0].tuples[0][1];<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"> var wert2 = json.data[1].tuples[0][1];<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"> // var wert3 = json.data[2].tuples[0][1];<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">
</span><span style="mso-fareast-language:EN-US">// Setzen der Werte in ioBroker<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"> // Man füllt die oben erzeugten Objekte jetzt mit den Werten<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"> setState(idAKTUELLER_VERBRAUCH, wert1);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"> setState(idAKTUELLE_ERZEUGUNG, wert2);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"> // setState(idAKTUELLE_HEIZUNG, wert3);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"> } else {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"> log("Fehler beim Auslesen des JSON fuer Volkszaehler. Keine Daten erhalten.", "warn");<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"> }<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"> });<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">});<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="DE">Von:</span></b><span lang="DE"> volkszaehler-users <volkszaehler-users-bounces@demo.volkszaehler.org>
<b>Im Auftrag von </b>Stefan S.<br>
<b>Gesendet:</b> Sonntag, 27. November 2022 17:04<br>
<b>An:</b> volkszaehler-users@demo.volkszaehler.org<br>
<b>Betreff:</b> Re: [vz-users] Alternatives Volkszaehler Frontend<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt">Hallo Christian,<br>
<br>
verwendest du dann direkt die VZ Datenbank oder hast du noch eine eigene Datenbank in ioBroker ?<br>
<br>
Gruß,<br>
Stefan<o:p></o:p></p>
<div>
<p class="MsoNormal">Am 27.11.2022 um 10:47 schrieb Christian Wimmer:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Hallo Stefan</span><o:p></o:p></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Ja, ich machs mit ioBroker und Grafana.</span><o:p></o:p></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Schaut dann zB so aus.</span><o:p></o:p></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><img width="2112" height="619" style="width:22.0in;height:6.4444in" id="Grafik_x0020_1" src="cid:image001.png@01D90294.F0352390"></span><o:p></o:p></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"> </span><o:p></o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="DE">Von:</span></b><span lang="DE"> volkszaehler-users
<a href="mailto:volkszaehler-users-bounces@demo.volkszaehler.org"><volkszaehler-users-bounces@demo.volkszaehler.org></a>
<b>Im Auftrag von </b>DL4HUF<br>
<b>Gesendet:</b> Sonntag, 27. November 2022 10:34<br>
<b>An:</b> volkszaehler.org - users <a href="mailto:volkszaehler-users@demo.volkszaehler.org">
<volkszaehler-users@demo.volkszaehler.org></a><br>
<b>Betreff:</b> Re: [vz-users] Alternatives Volkszaehler Frontend</span><o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt">Hallo Stefan<br>
<br>
Sie Verbräuche für täglich, monatlich usw. oder jeden beliebigen Zeitraum sind doch direkt in der Spalte Verbrauch ablesbar.<br>
Du musst nur den entsprechenden Zeitraum auswählen.<br>
<br>
Ein direkter Vergleich mehrere Zeiträume in einer Grafik/Tabelle ist allerdings nicht möglich.<br>
Da muss man dann etwas springen.<br>
Außerdem gibt es noch verschiedene Ansichten wie z.B. "Year by Monat" (statt Current) in Säulenform, die schnelle Vergleiche ermöglichen.<br>
<br>
Gruß Ronald<o:p></o:p></p>
<div>
<p class="MsoNormal">Am 27. November 2022 09:38:48 MEZ schrieb "Stefan S." <<a href="mailto:shikvz@gmx.com">shikvz@gmx.com</a>>:<o:p></o:p></p>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt">
<p class="MsoNormal">Hallo,<br>
<br>
verwendet ihr eigentlich alle das Volkszaehler Frontend oder so etwas wie Home Assistant / openHAB?<br>
Beim Volkszaehler Frontend fehlen mir irgendwie die Daten wie täglicher, monatlicher, jährlicher Verbrauch.<br>
Vor allem ein monatlicher Vergleich zum Vorjahr.<br>
<br>
Wie macht ihr das?<br>
<br>
Gruß,<br>
Stefan<o:p></o:p></p>
</blockquote>
</div>
<div>
<div>
<p class="MsoNormal">-- <br>
Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.<o:p></o:p></p>
</div>
</div>
</blockquote>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>