Guten morgen zusammen,
bin jetzt seit gut 3 Jahren dabei und mein System ist ziemlich gewachsen.
Allerdings bin ich aktuell dazu gezwungen den Raspi nochmal neu aufzusetzen (Backups vorhanden).
Dabei sortiere ich viel altes aus und versuche auch zu optimieren. Ich hab z.B. einen ReduceLog um 3 Uhr, der aber extrem lahmt. Und deswegen habe ich den Tip hier aus dem Forum mit dem configCheck auf die DbLog-Verbindung.
Result of version check
Used Perl version: 5.24.1
Used DBI (Database independent interface) version: 1.636
Used DBD (Database driver) version mysql: 4.041
Used DbLog version: 4.9.12.
Your local DbLog module is up to date.
Recommendation: No update of DbLog is needed.
Result of configuration read check
Connection parameter store type: configDB (don't forget upload configuration file if changed. Use "configdb filelist" and look for your configuration file.)
Connection parameter: Connection -> mysql:database=fhemstrom;host=localhost;port=3306, User -> fhemuser, Password -> read o.k.
Result of connection check
Connection to database fhemstrom successfully done.
Recommendation: settings o.k.
Result of encoding check
Encoding used by Client (connection): LATIN1
Encoding used by DB fhemstrom: UTF8
Recommendation: Both encodings should be identical. You can adjust the usage of UTF8 connection by setting the UTF8 parameter in file './dblog/dbstrom.conf' to the right value.
Result of logmode check
Logmode of DbLog-device DbLogStrom is: asynchronous
Recommendation: settings o.k.
Result of insert mode check
Insert mode of DbLog-device DbLogStrom is: Array
Recommendation: Setting attribute "bulkInsert" to "1" may result a higher write performance in most cases. Feel free to try this mode.
Result of plot generation method check
WARNING - at least one of your FHEMWEB devices has attribute "plotfork = 1" and/or attribute "plotEmbed = 2" not set.
THEIZUNG: plotfork=0 / plotEmbed=0
WEB: plotfork=0 / plotEmbed=0
WEBhook: plotfork=0 / plotEmbed=0
Recommendation: You should set attribute "plotfork = 1" and "plotEmbed = 2" in relevant devices. If these attributes are not set, blocking situations may occure when creating plots. Note: Your system must have sufficient memory to handle parallel running Perl processes. See also global attribute "blockingCallMax".
Result of table 'history' check
Column width set in DB history: 'DEVICE' = 64, 'TYPE' = 64, 'EVENT' = 512, 'READING' = 64, 'VALUE' = 255, 'UNIT' = 32
Column width used by DbLogStrom: 'DEVICE' = 64, 'TYPE' = 64, 'EVENT' = 512, 'READING' = 64, 'VALUE' = 128, 'UNIT' = 32
Recommendation: settings o.k.
Result of table 'current' check
Column width set in DB current: 'DEVICE' = 64, 'TYPE' = 64, 'EVENT' = 512, 'READING' = 64, 'VALUE' = 255, 'UNIT' = 32
Column width used by DbLogStrom: 'DEVICE' = 64, 'TYPE' = 64, 'EVENT' = 512, 'READING' = 64, 'VALUE' = 128, 'UNIT' = 32
Recommendation: settings o.k.
Result of check 'Search_Idx' availability
Index 'Search_Idx' exists and contains recommended fields 'DEVICE', 'TIMESTAMP', 'READING'.
Recommendation: settings o.k.
Result of check 'Report_Idx' availability for DbRep-devices
At least one DbRep-device assigned to DbLogStrom is used. Index 'Report_Idx' exists and contains recommended fields 'TIMESTAMP', 'READING'.
Recommendation: settings o.k.
ich habe die Such Index erstellt und auf asynchronen Modus umgestellt. Nur den UTF8 bekomme ich nicht aktiviert und ich weiss nicht wieso.
Internals:
COLUMNS field length used for Device: 64, Type: 64, Event: 512, Reading: 64, Value: 128, Unit: 32
CONFIGURATION ./dblog/dbstrom.conf
DEF ./dblog/dbstrom.conf Zaehler_ED300L:(power|total_consumption).*
FUUID 5c44805b-f33f-55ff-2889-dee975a97f91b3c4
FVERSION 93_DbLog.pm:v4.9.12-s21801/2020-04-29
MODE asynchronous
MODEL MYSQL
NAME DbLogStrom
NR 174
NTFY_ORDER 50-DbLogStrom
PID 13219
REGEXP Zaehler_ED300L:(power|total_consumption).*
STATE connected
TYPE DbLog
UTF8 0
dbconn mysql:database=fhemstrom;host=localhost;port=3306
dbuser fhemuser
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.9.12
READINGS:
2020-05-12 09:15:56 CacheUsage 12
2020-05-12 09:15:37 NextSync 2020-05-12 09:16:07 or if CacheUsage 500 reached
2020-05-12 09:14:07 countCurrent 4
2020-05-12 09:14:07 countHistory 4091747
2020-05-11 19:54:01 reduceLogState reduceLogNbl 90 average started
2020-05-12 09:15:38 state connected
Attributes:
DbLogType Current/History
asyncMode 1
group DbLog
room 99a_Data
In der Config habe ich augenscheinlich alles richtig gemacht. Die Verbindung steht ja auch. Nur eben nicht UTF8
%dbconfig= (
connection => "mysql:database=fhemstrom;host=localhost;port=3306",
user => "fhemuser",
password => "starkespasswort",
utf8 => 1
);
Vielleicht weiss ja noch jemand nen Tip.
Gruß Mark
Hallo Mark,
sieht eigentlich alles gut aus.
Vorschlag: Lösche die Zeile "utf8 => 1" aus der dbstrom.conf komplett raus und schreibe sie neu rein.
Wir hatten schon ab zu mal den Fall dass bestimmte Teile aus der conf-Datei nicht gelesen werden konnten weil in der Datei nicht lesbare Zeichen vorhanden waren, warum auch immer.
LG,
Heiko
Ach noch etwas :
Connection parameter store type: configDB (don't forget upload configuration file if changed. Use "configdb filelist" and look for your configuration file.)
Hast du das gemacht nach der Änderung ?
Ne das hab ich noch nicht gemacht, aber das betrifft doch nur das Backup oder? Also eine Info dass die geänderte Config noch mit in die ConfigDB übertragen werden muss.
Aber...
ich glaub ich hab den Fehler entdeckt. In den Device-Help steht
Die Konfigurationsdatei wird z.B. nach /opt/fhem kopiert und hat folgenden Aufbau, den man an seine Umgebung anpassen muß (entsprechende Zeilen entkommentieren und anpassen):
####################################################################################
# database configuration file
#
# NOTE:
# If you don't use a value for user / password please delete the leading hash mark
# and write 'user => ""' respectively 'password => ""' instead !
#
#
## for MySQL
####################################################################################
#%dbconfig= (
# connection => "mysql:database=fhem;host=<database host>;port=3306",
# user => "fhemuser",
# password => "fhempassword",
# # optional enable(1) / disable(0) UTF-8 support (at least V 4.042 is necessary)
# utf8 => 1
#);
####################################################################################
#
(at least V 4.042 is necessary)
Laut list DbLogStrom hab ich Version 4.041. Wie kann ich diese updaten?
Gruß
ZitatNe das hab ich noch nicht gemacht, aber das betrifft doch nur das Backup oder?
Musst du machen. Sonst startet dein DbLog mit der alten conf aus der configDB.
ZitatLaut list DbLogStrom hab ich Version 4.041. Wie kann ich diese updaten?
Ja, das ist natürlich auch ein Punkt.
Ich habe keinen Raspi, denke aber diese Libraries werden durch das ganz normale Betriebssystemupdate / Upgrade mit erneuert.
Die Einstellung von UTF8 ist für deinen Problemfall auch nicht entscheidend, dadurch hast du allenfalls Probleme bei Umlauten und solchen Sachen. Falls es dir zu große Umstände bereitet, lässt du es momentan so wie es ist. Ist ja auch nur eine Empfehlung.
Ok das mit der ConfigDB war es tatsächlich. Danke :)
Ich hab erst kürzlich auf ConfigDB um gestellt und weiss noch nicht 100%ig welche Vor bzw Nachteile ich habe.
Habe nie in der fhem.cfg rumgeschrieben.
Ist es so dass ich die Dateien die ich Importiert habe nicht mehr im Filesystem brauche? Wenn du sagst ich muss die geänderten importieren?!
ZitatIst es so dass ich die Dateien die ich Importiert habe nicht mehr im Filesystem brauche? Wenn du sagst ich muss die geänderten importieren?!
Vermutlich brauchst du die nicht mehr. Ich selbst nutze configDB nicht.
Jetzt weiß ich auch wieder warum ich die Version 4.042 als Voraussetzung reingeschrieben hatte. Diese Version behebt sehr viele UTF8-bezogene Bugs der vorhergehenden Versionen. Also falls diesbezüglich etwas nicht richtig funktioniert weißt du woran es liegt. ;)