2012.12.05 20:31:59 0: Executing SELECT DATE_FORMAT(TIMESTAMP, '%Y-%m-%d %H:%i:%s'), DEVICE, READING, VALUE FROM history WHERE 1=1 AND (DEVICE || '|' || READING) = ('wetter|Temp-inside') AND TIMESTAMP > STR_TO_DATE('2012-01-01 00:00:00', '%Y-%m-%d %H:%i:%s') AND TIMESTAMP < STR_TO_DATE('2012-12-31 00:00:00', '%Y-%m-%d %H:%i:%s') ORDER BY TIMESTAMP
SELECT DATE_FORMAT(TIMESTAMP, '%Y-%m-%d %H:%i:%s'), DEVICE, READING, VALUE FROM history WHERE 1=1 AND CONCAT(DEVICE, '|' ,READING) = 'wetter|Temp-inside' AND TIMESTAMP > STR_TO_DATE('2012-01-01 00:00:00', '%Y-%m-%d %H:%i:%s') AND TIMESTAMP < STR_TO_DATE('2012-12-31 00:00:00', '%Y-%m-%d %H:%i:%s') ORDER BY TIMESTAMP
bitte mal testen....
Odd number of elements in hash assignment at /opt/fhem//FHEM/93_DbLog.pm line 304. 2012.12.06 16:58:13 0: Executing SELECT DATE_FORMAT(TIMESTAMP, '%Y-%m-%d %H:%i:%s'), DEVICE, READING, VALUE FROM history WHERE 1=1 AND CONCAT(DEVICE,'|',READING) = ('wetter|Temp-inside') AND TIMESTAMP > STR_TO_DATE('2012-12-06 00:00:00', '%Y-%m-%d %H:%i:%s') AND TIMESTAMP < STR_TO_DATE('2012-12-07 00:00:00', '%Y-%m-%d %H:%i:%s') ORDER BY TIMESTAMP
bei mir steht das gleiche in Zeile 304 wie bei Erwin in Zeile 380
jetzt auch mit Anhang
Timestamp: Device, Type, Event, Reading, Value, Unit ===================================================== 2012-05-30 11:48:02: KS300, KS300, temperature: 15.3, temperature, 15.3, °C 2012-05-30 11:53:08: KS300, KS300, temperature: 15.2, temperature, 15.2, °C
m wesentlichen:
1) ich schreibe das EVENT-Feld nicht in die history DB - redundante Info. datenbank minimierung....
2) ich setze beim Datenbank-schreiben generische defaults für UNITs, für temperatur, humidity, pressure, wind usw.
Unter anderm auch weil ich nach wie vor Probleme mit der richtigen Darstellung (trotz UTF-8) vom ° (Grad Zeichen) in der DB bzw. mySQLAdmin habe.....
z.b: if($reading eq 'temperature') { $unit= "C"; }
--