[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Husdata forum • View topic - Losing Intraday Stats on serial port connection failure
Page 1 of 1

Losing Intraday Stats on serial port connection failure

PostPosted: Fri Oct 03, 2014 14:12
by Beardymarrow
Hi there,
I have StatLink on my PC set to automatically start when my PC does. This means that in the event of power failure or reboot in the night to apply updates, it carries on collecting data automatically.

A few times I have found that the Serial port has not connected correctly after a reboot, and so StatLink is unable to see my Rego. When it does this, StatLink resets the IntraDay stats back to zero, and so when I resolve the problem with the serial port, the daily reports and logs are not correct.

Is there a way to stop StatLink from resetting the daily stats when it fails to connect to the serial port?

Thanks

Beardy

Re: Losing Intraday Stats on serial port connection failure

PostPosted: Mon Jan 12, 2015 19:52
by Peter
Hi.

I have checked the code and there is no process in where the intraday stat is deleted by thar reason.
The only way to telet that is in the File menu, Reset statistics or if Computer date changes to a new day.

BR
/Peter

Re: Losing Intraday Stats on serial port connection failure

PostPosted: Tue Jan 13, 2015 15:07
by Beardymarrow
Hi Peter,
Glad to see you back and active. I may have used the wrong term in saying Intraday stats.

I can replicate this problem every time by un-plugging my USB-Serial adapter and re-starting StatLink. Please find below some screenshots which show the problem.

My StatLink statistics before :-
Image

I then Unplug my USB-Serial adapter and restart StatLink and get this error (as expected) :-
Image

I click OK, and then get this screen :-
Image
I can then click Save or Cancel or this screen. It doesn't matter which

Then StatLink starts, but is unable to see my Rego (obviously) :-
Image

Then I re-connect my USB-Serial port and re-start StatLink and I have lost the history (hours of operation, kWh used etc.):-
Image

Image

Hope this helps describe the problem better and that you can see the issue.

Re: Losing Intraday Stats on serial port connection failure

PostPosted: Tue Jan 13, 2015 17:25
by Peter
Ok I know why.
When StatLink shuts down, the current date is stored to a file.
When StatLink start up it compares the computer date with the date in file. If it is a different day the Intrastat is reset.

As the Com port error occurs, StatLink crashes and therefore it dows not store the date to file as it does on a proper shutdown.
Therefore, when i starts again the dates missmatches and the Intraday stat is reset.

This could be redisigned i think, I have to look in to it.

Re: Losing Intraday Stats on serial port connection failure

PostPosted: Tue Jan 13, 2015 18:14
by Beardymarrow

Re: Losing Intraday Stats on serial port connection failure

PostPosted: Tue Jan 13, 2015 19:23
by Peter
yes you can.
It is the Intraday.xml file.
Change the date (Key Datum) to the current date.

<KvArray><KeyValue><Key>Datum</Key><Value>2015-01-13</Value>

Re: Losing Intraday Stats on serial port connection failure

PostPosted: Tue Jan 13, 2015 21:58
by Beardymarrow