[vz-users] Frage zu DB und vzlogger

Michael Baer mibaer at web.de
Sat Jan 25 15:07:56 CET 2014


> SQL kann das aber auch für dich übernehmen.
> 
> Öffne phpmyadmin http://[URLdesRaspi]/phpmyadmin/
> Benutzer: vz
> Passwort: demo
> Wähle links die "volkszaehler" Datenbank
> Dann oben den Reiter "SQL" und ins Fenster den Befehl eintragen
> SELECT * FROM `data` WHERE UNIX_TIMESTAMP('2013-03-09 12:10')*1000
> < TIMESTAMP AND UNIX_TIMESTAMP('2013-03-09 12:15')*1000 >
> TIMESTAMP;
> 
> datum, Uhrzeit natürlich entsprechend anpassen und "ok".

SELECT * FROM `data`WHERE `channel_id`=14 AND UNIX_TIMESTAMP( 
'2014-01-21 19:00' ) *1000 < TIMESTAMP AND UNIX_TIMESTAMP( '2015-01-21 
09:00' ) *1000 > TIMESTAMP

"14274152","14","1390328594145","159225"
"14274448","14","1390337455440","1"
"14274549","14","1390339008231","2"
"14276933","14","1390375942924","3"
"14276948","14","1390376143404","4"
"14276959","14","1390376308607","5"
"14276968","14","1390376453181","6"
"14276977","14","1390376568176","7"
"14276984","14","1390376667794","8"
"14276991","14","1390376757478","9"
"14276998","14","1390376841540","10"
"14277003","14","1390376921006","11"
"14277010","14","1390376995716","12"
"14277015","14","1390377061243","13"
"14277024","14","1390377176463","14.5"
"14277031","14","1390377279874","16.5"
"14277038","14","1390377374743","18.5"
"14277043","14","1390377462282","20.5"
"14277050","14","1390377542884","22.5"


So wie es aussieht zählt vzlogger die Impulse hoch und legt den 
aktuellen Stand in der DB ab. Bei einem Neustart beginnt er wieder bei 
Null - deshalb der Negative Wert...... 



P.S.: Neuer Versuch - im "to" steht nur "volkszaehler-
users at lists.volkszaehler.org"


-- 


Gruss,
	Michael

GnuPG-ID 0x1E4ED700  http://pgp.mit.edu/


More information about the volkszaehler-users mailing list