[patch] for datetime pattern in valueFn with DbLog

Begonnen von stephan.ritscher, 12 Januar 2020, 20:43:25

Vorheriges Thema - Nächstes Thema

stephan.ritscher

Fix pattern for timestamps in month October which are set by valueFn of DbLog device.

DS_Starter

Hi,

I'm a litttle bit confused about your version. The last version is:

FVERSION   93_DbLog.pm:v4.9.6-s20883/2020-01-04

and the mentioned code doesn't exist. The valueFn is currently designed as:


....
                      my ($yyyy, $mm, $dd, $hh, $min, $sec) = ($TIMESTAMP =~ /(\d+)-(\d+)-(\d+) (\d+):(\d+):(\d+)/);
                      eval { my $epoch_seconds_begin = timelocal($sec, $min, $hh, $dd, $mm-1, $yyyy-1900); };
                      if (!$@) {
                          $timestamp = $TIMESTAMP;
                      } else {
.....
Proxmox+Debian+MariaDB, PV: SMA, Victron MPII+Pylontech+CerboGX
Maintainer: SSCam, SSChatBot, SSCal, SSFile, DbLog/DbRep, Log2Syslog, SolarForecast,Watches, Dashboard, PylonLowVoltage
Kaffeekasse: https://www.paypal.me/HMaaz
Contrib: https://svn.fhem.de/trac/browser/trunk/fhem/contrib/DS_Starter

DS_Starter

Uuups, inddeed there is an old code snippet in lines 4624. I will change it to the current standard code.

best regards
Heiko
Proxmox+Debian+MariaDB, PV: SMA, Victron MPII+Pylontech+CerboGX
Maintainer: SSCam, SSChatBot, SSCal, SSFile, DbLog/DbRep, Log2Syslog, SolarForecast,Watches, Dashboard, PylonLowVoltage
Kaffeekasse: https://www.paypal.me/HMaaz
Contrib: https://svn.fhem.de/trac/browser/trunk/fhem/contrib/DS_Starter

DS_Starter

I have changed the code to DbLog standard and checked in the module just now.

regards,
Heiko
Proxmox+Debian+MariaDB, PV: SMA, Victron MPII+Pylontech+CerboGX
Maintainer: SSCam, SSChatBot, SSCal, SSFile, DbLog/DbRep, Log2Syslog, SolarForecast,Watches, Dashboard, PylonLowVoltage
Kaffeekasse: https://www.paypal.me/HMaaz
Contrib: https://svn.fhem.de/trac/browser/trunk/fhem/contrib/DS_Starter