Bin gestern beim neu Anlegen eines Devices über ein (kleines?) Problem gestolpert.
Ich kann im SVG Editor nicht alle Readings der neuen Device auswählen.
In der HISTORY sind alle Readings vorhanden, in der CURRENT jedoch nur einige davon.
select distinct reading from history where DEVICE='LCG.BME680' order by TIMESTAMP;
+-----------------+
| reading |
+-----------------+
| state |
| RSSI |
| humidity |
| OLED |
| gas |
| FreeHeap |
| debug |
| temperature |
| FramesPerMinute |
| UpTime |
| ReceivedFrames |
| pressure |
+-----------------+
select distinct reading from current where DEVICE='LCG.BME680' order by TIMESTAMP;
+---------+
| reading |
+---------+
| debug |
| gas |
| RSSI |
| UpTime |
+---------+
Und hier das Setting vom zugehörigen DbLog Device:
Internals:
CFGFN
CHANGED
COLUMNS field length used for Device: 64, Type: 64, Event: 512, Reading: 64, Value: 128, Unit: 32
CONFIGURATION ./contrib/dblog/MariaDB10.conf
DEF ./contrib/dblog/MariaDB10.conf .*:.*
MODE asynchronous
MODEL MYSQL
NAME logdb
NR 6
NTFY_ORDER 50-logdb
PID 6549
REGEXP .*:.*
STATE connected
TYPE DbLog
UTF8 1
VERSION 2.22.14
Attributes:
DbLogExclude .*
DbLogType Current/History
asyncMode 1
cacheEvents 2
colEvent 512
colReading 64
colValue 128
disable 0
event-on-change-reading CacheUsage,background_processing_time
icon security
room DbLog
showNotifyTime 1
showproctime 1
timeout 86400
verbose 3
Wo klemmt es da? Welches Setting muß ich ändern?
Die Einstellungen sehen alle gut aus. An der Logik hat sich seit "Ewigkeiten" auch nichts mehr geändert.
Von der Seite her ist alles ok.
Lösche dir doch mal den Inhalt der Current und schau dir an wie sich der Inhalt neu aufbaut.
Hilfreich ist dabei auch ein verbose 4 log:
Zitat
2017.11.30 16:27:07.276 4: DbLog LogDB -> ### New database processing cycle - asynchronous ###
2017.11.30 16:27:07.277 4: DbLog LogDB -> ################################################################
2017.11.30 16:27:07.278 4: DbLog LogDB -> MemCache contains 21 entries to process
2017.11.30 16:27:07.291 4: DbLog LogDB -> Device: LogDB excluded from database logging due to attribute "excludeDevs" restrictions
2017.11.30 16:27:07.422 4: DbLog LogDB -> 21 of 21 events inserted into table history using PK on columns TIMESTAMP,DEVICE,READING
2017.11.30 16:27:07.424 4: DbLog LogDB -> insert history committed
2017.11.30 16:27:07.448 4: DbLog LogDB -> 21 events inserted or replaced in table current using PK on columns DEVICE,READING
2017.11.30 16:27:07.449 4: DbLog LogDB -> insert or update current committed
2017.11.30 16:27:07.462 4: DbLog LogDB -> Device: LogDB excluded from database logging due to attribute "excludeDevs" restrictions
Lade dir vorher die aktuellle V2.22.15 per update. In der Version habe ich die Logausgaben etwas verbessert damit da nicht so viele durcheinander dargestellt wird.
Grüße
Heiko
Gesagt - getan.
Ergebnis des entsprechenden Devices:
defmod LCG.BME680 LaCrosseGateway 192.168.254.139:81
attr LCG.BME680 event-on-change-reading .*
attr LCG.BME680 icon it_wifi
attr LCG.BME680 kvp readings
attr LCG.BME680 mode WiFi
attr LCG.BME680 ownSensors both
attr LCG.BME680 room Wohnzimmer,LaCrosseGateway,Sensoren
attr LCG.BME680 stateFormat {sprintf("Uptime: %s", ReadingsVal($name,"UpTime",0))}\
attr LCG.BME680 timeout 60
attr LCG.BME680 usbFlashCommand ./FHEM/firmware/esptool.py -b 921600 -p [PORT] write_flash -ff 80m -fm dio -fs 4MB-c1 0x00000 [BINFILE] > [LOGFILE]
attr LCG.BME680 verbose 5
attr LCG.BME680 watchdog 300
setstate LCG.BME680 Uptime: 0Tg. 5Std. 36Min. 2Sek.
setstate LCG.BME680 2017-11-30 18:01:36 FramesPerMinute 0
setstate LCG.BME680 2017-11-30 18:01:36 FreeHeap 14744
setstate LCG.BME680 2017-11-30 18:01:36 OLED none
setstate LCG.BME680 2017-11-30 18:01:36 RSSI -61
setstate LCG.BME680 2017-11-30 18:01:36 ReceivedFrames 0
setstate LCG.BME680 2017-11-30 18:01:36 UpTime 0Tg. 5Std. 36Min. 2Sek.
setstate LCG.BME680 2017-11-30 18:01:36 debug 80895
setstate LCG.BME680 2017-11-30 18:01:36 gas 75
setstate LCG.BME680 2017-11-30 18:01:36 humidity 38
setstate LCG.BME680 2017-11-30 18:01:36 pressure 1004
setstate LCG.BME680 2017-11-30 18:01:36 state initialized
setstate LCG.BME680 2017-11-30 18:01:36 temperature 18.8
Und in current seh ich:
MariaDB [fhem]> select distinct reading from current where device='LCG.BME680';
+---------+
| reading |
+---------+
| gas |
| debug |
| UpTime |
| RSSI |
+---------+
4 rows in set (0.00 sec)
Und was sagt das verbose 4 log vom DbLog ?