Ein herzerfirschendes Moin vom achtern Diek vorweg!
Ich möchte mir eine 2te DbLog - Datei anlegen welche nur ganz bestimmte Readings loggt:
CH_GasCalculator:CH_GasCounter_counters.A_CounterMonthLast
CH_GasCalculator:CH_GasCounter_counters.A_EnergyCostMeter
CH_GasCalculator:CH_GasCounter_counters.A_EnergyCostMonthLast
CH_GasCalculator:CH_GasCounter_counters.A_EnergyCostYear
CH_GasCalculator:CH_GasCounter_counters.A_EnergyMeter
CH_GasCalculator:CH_GasCounter_counters.A_EnergyMonthLast
CH_GasCalculator:CH_GasCounter_counters.A_EnergyYear
CH_GasCalculator:CH_GasCounter_counters.A_Vol1stMeter
CH_GasCalculator:CH_GasCounter_counters.A_Vol1stYear
CH_ElecricityCalculator:CH_ElectricityCounter_IEC_01_energyCalc_CounterMonthLast
CH_ElecricityCalculator:CH_ElectricityCounter_IEC_01_energyCalc_EnergyCostMonthLast
CH_ElecricityCalculator:CH_ElectricityCounter_IEC_01_energyCalc_EnergyCostYear
CH_ElecricityCalculator:CH_ElectricityCounter_IEC_01_energyCalc_EnergyMeter
CH_ElecricityCalculator:CH_ElectricityCounter_IEC_01_energyCalc_EnergyMonthLast
CH_ElecricityCalculator:CH_ElectricityCounter_IEC_01_energyCalc_EnergyYear
Die Datenbank selbst habe ich bereits erfolgreich angelegt, aber sie füllt sich leider nicht.
Ich dachte mit dem RegEx .*Calculator:.*(Meter|MonthLast|Year) haette ich das bereits richtig definiert.
Danke für Eure Hilfe
Gruß
Sailor
Internals:
COLUMNS field length used for Device: 64, Type: 64, Event: 512, Reading: 64, Value: 128, Unit: 32
CONFIGURATION /opt/fhem/dbenergy.conf
DEF /opt/fhem/dbenergy.conf .*Calculator:.*(Meter|MonthLast|Year)
FUUID 61b75cb6-f33f-02bc-d284-d2d85314c548bcbd
FVERSION 93_DbLog.pm:v4.12.3-s24440/2021-05-15
MODE asynchronous
MODEL SQLITE
NAME DbLogEnergy
NR 3487
NTFY_ORDER 50-DbLogEnergy
PID 26989
REGEXP .*Calculator:.*(Meter|MonthLast|Year)
SQLITECACHESIZE 4000
SQLITEWALMODE on
STATE connected
TYPE DbLog
dbconn SQLite:dbname=/home/fhem/fhemDb/energy.db
dbuser
HELPER:
COLSET 1
DEVICECOL 64
EVENTCOL 512
OLDSTATE connected
PACKAGE main
READINGCOL 64
TC current
TH history
TYPECOL 64
UNITCOL 32
VALUECOL 128
VERSION 4.12.3
READINGS:
2021-12-13 15:46:14 CacheOverflowLastNum 0
2021-12-13 15:46:14 CacheOverflowLastState normal
2021-12-20 11:53:27 CacheUsage 0
2021-12-20 11:53:27 NextSync 2021-12-20 11:53:42 or if CacheUsage 100 reached
2021-12-20 11:47:56 countCurrent 0
2021-12-20 11:47:56 countHistory 0
2021-12-20 11:53:27 state connected
Attributes:
DbLogExclude .*
DbLogInclude DbFileSize
DbLogSelectionMode Exclude/Include
DbLogType Current/History
asyncMode 1
cacheLimit 100
devStateIcon connected:10px-kreis-gruen disconnect.*:10px-kreis-rot
group DbLog
room System
showproctime 1
syncInterval 15
verbose 0
Moin Sailor,
hast du evtl. DbLogExclude in den Devices gesetzt ?
Ansonsten verbose 4 oder 5 im DbLogEnergy setzen. Dann sieht man sicherlich mehr warum nichts reinläuft.
LG
Hallo DS_Starter
Zitat von: DS_Starter am 20 Dezember 2021, 13:05:10
hast du evtl. DbLogExclude in den Devices gesetzt ?
Ansonsten verbose 4 oder 5 im DbLogEnergy setzen. Dann sieht man sicherlich mehr warum nichts reinläuft.
DbLogExclude setze ich zwar ein, aber der GasCalculator hat ein
DbLogInclude .*Das
verbose=5 ersheint das Folgende unter vielen anderen Eintraegen, die zum Teil ein
DbLogExclude .* haben.
2021.12.21 18:45:12.247 4: DbLog DbLogEnergy -> ################################################################
2021.12.21 18:45:12.248 4: DbLog DbLogEnergy -> ### start of new Logcycle ###
2021.12.21 18:45:12.248 4: DbLog DbLogEnergy -> ################################################################
2021.12.21 18:45:12.248 4: DbLog DbLogEnergy -> number of events received: 12 of device: CH_GasCalculator
2021.12.21 18:45:12.248 4: DbLog DbLogEnergy -> check Device: CH_GasCalculator , Event: CH_GasCounter_counters.A_PowerCurrent: 4.3855
2021.12.21 18:45:12.248 4: DbLog DbLogEnergy -> check Device: CH_GasCalculator , Event: CH_GasCounter_counters.A_PowerDayAver: 4.8829
2021.12.21 18:45:12.249 4: DbLog DbLogEnergy -> check Device: CH_GasCalculator , Event: CH_GasCounter_counters.A_EnergyDay: 91.6564
2021.12.21 18:45:12.249 4: DbLog DbLogEnergy -> check Device: CH_GasCalculator , Event: CH_GasCounter_counters.A_EnergyMonth: -7149.8568
2021.12.21 18:45:12.249 4: DbLog DbLogEnergy -> check Device: CH_GasCalculator , Event: CH_GasCounter_counters.A_EnergyYear: -387.6759
2021.12.21 18:45:12.249 4: DbLog DbLogEnergy -> check Device: CH_GasCalculator , Event: CH_GasCounter_counters.A_EnergyMeter: -387.6759
2021.12.21 18:45:12.249 4: DbLog DbLogEnergy -> check Device: CH_GasCalculator , Event: CH_GasCounter_counters.A_EnergyCostDay: 4.6901
2021.12.21 18:45:12.249 4: DbLog DbLogEnergy -> check Device: CH_GasCalculator , Event: CH_GasCounter_counters.A_EnergyCostMonth: -365.8582
2021.12.21 18:45:12.249 4: DbLog DbLogEnergy -> check Device: CH_GasCalculator , Event: CH_GasCounter_counters.A_EnergyCostYear: -19.8374
2021.12.21 18:45:12.249 4: DbLog DbLogEnergy -> check Device: CH_GasCalculator , Event: CH_GasCounter_counters.A_EnergyCostMeter: -19.8374
2021.12.21 18:45:12.249 4: DbLog DbLogEnergy -> check Device: CH_GasCalculator , Event: CH_GasCounter_counters.A_FinanceReserve: 652.6374
2021.12.21 18:45:12.249 4: DbLog DbLogEnergy -> check Device: CH_GasCalculator , Event: CH_GasCounter_counters.A_Meter: 8278.8960
Gruß
Sailor
Hallo Sailor,
ja jetzt sehe ich es, hätte mir aber auch gleich auffallen sollen.
Bei der DEF fehlt hinten der Match nach dem Readingnamen was ja Bestandteil eines jeden Events ist:
Zitat
2021.12.21 18:45:12.247 4: DbLog DbLogEnergy -> ################################################################
2021.12.21 18:45:12.248 4: DbLog DbLogEnergy -> ### start of new Logcycle ###
2021.12.21 18:45:12.248 4: DbLog DbLogEnergy -> ################################################################
2021.12.21 18:45:12.248 4: DbLog DbLogEnergy -> number of events received: 12 of device: CH_GasCalculator
2021.12.21 18:45:12.248 4: DbLog DbLogEnergy -> check Device: CH_GasCalculator , Event: CH_GasCounter_counters.A_PowerCurrent: 4.3855
2021.12.21 18:45:12.248 4: DbLog DbLogEnergy -> check Device: CH_GasCalculator , Event:CH_GasCounter_counters.A_PowerDayAver: 4.8829
2021.12.21 18:45:12.249 4: DbLog DbLogEnergy -> check Device: CH_GasCalculator , Event: CH_GasCounter_counters.A_EnergyDay: 91.6564
Also müsste die DEF so aussehen:
DEF /opt/fhem/dbenergy.conf .*Calculator:.*(Meter|MonthLast|Year).*
Grüße,
Heiko
Hallo Heiko
Zitat von: DS_Starter am 21 Dezember 2021, 21:59:50
ja jetzt sehe ich es, hätte mir aber auch gleich auffallen sollen.
Bei der DEF fehlt hinten der Match nach dem Readingnamen was ja Bestandteil eines jeden Events ist:
Ach du Sch€|$€, das hätte ich auch sehen müssen!
Danke!
Gruß
Sailor