<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>Du hast immerhin Perl!!!<br><p><span style="background-color: rgba(255, 255, 255, 0);">Mit den besten Grüßen</span></p><p><span style="background-color: rgba(255, 255, 255, 0);">Bernd Gewehr</span></p></div><div>Am 17.07.2013 um 08:56 schrieb Tom Weber <<a href="mailto:tom.weber@gmx.de">tom.weber@gmx.de</a>>:<br><br></div><blockquote type="cite"><div><span>Moin Justin und Bernd,</span><br><span></span><br><span>vielen Dank für Eure Ratschläge. Aber leider brauche ich das auf einer FritzBox- und da ist nicht viel außer sh - php+python sind da leider weit weg.</span><br><span>Nun ja, jetzt weiß ich aber wenigstens, dass es wohl nicht anders geht.</span><br><span></span><br><span>Vielen Dank,</span><br><span>Tom</span><br><span></span><br><span>Am 17.07.2013 08:21, schrieb Justin Otherguy:</span><br><blockquote type="cite"><span>Moin Tom,</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>Am 17.07.2013 um 07:41 schrieb Tom Weber:</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><blockquote type="cite"><span>ich möchte der middleware.php gerne die aktuellen Verbrauchsdaten entlocken. Dazu lese ich mit wget <a href="http://...middleware.php/data/uuid.json?from=10">http://...middleware.php/data/uuid.json?from=10</a> minutes ago den zurückgegeben Datensatz aus, aber das parsen der json ist sehr mühsam (mit shell-kommandos und zig sed suche ich den letzten Wert daraus)</span><br></blockquote></blockquote><blockquote type="cite"><span>was das parsen der JSON-Antwort angeht, kann ich dir empfehlen, das Werkzeug zu wechseln :-)</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>In [1] kannst du sehen, wie es mit Python und dessen JSON-Decoder geht. Das wird dir Zeit sparen - selbst wenn du Python noch nicht kennst (so ging's mir zumindest...).</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>Was den ersten Teil deiner Frage angeht:</span><br></blockquote><blockquote type="cite"><span>die Middleware hat noch keine Funktion, um den letzten Wert auszugeben - das habe ich mir selbst auch schon ein paar Male gewünscht: Momentanwertanzeige auf einem Smartphone oder auf einem Display. Dein Ansatz (eine Zeit annehmen, in der ein Wert in die DB geschrieben hätte werden müssen) ist auch der beste work-around, der mir eingefallen ist. Du schreibst auch schon, welche Haken dieser Ansatz hat:</span><br></blockquote><blockquote type="cite"><span>- ist das Intervall zu klein, ist vlt. doch mal kein Wert in der DB</span><br></blockquote><blockquote type="cite"><span>- je größer das Intervall ist, desto träger wird die Anzeige</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>Gruss, J.</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>[1] <a href="https://github.com/volkszaehler/volkszaehler.org/blob/master/misc/tools/vzmonitor">https://github.com/volkszaehler/volkszaehler.org/blob/master/misc/tools/vzmonitor</a></span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><span></span><br></div></blockquote></body></html>