Jishar13 / pvbeancounter

Automatically exported from code.google.com/p/pvbeancounter
1 stars 0 forks source link

PVBC runs for a few minutes, then stops #89

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. onfiguring PVBC then clicking on Start Service.
3.

What is the expected output? What do you see instead?
Expect continuinous running and hourly updates as happened throughout July

What version of the product are you using (e.g. 1.4.1.9 32bit)?
1.5.0.12

What Operating system (XP, Vista, Windows 7 - 32bit or 64bit)?
Win 7

Which Database Type (MySQL, MS Access, SQLite - If Access, 32bit or 64bit)?
SQLite

Are there any unusual messages in PVService.log? (upload a copy to this issue 
if there are)
File attached

Please upload your settings.xml file with the issue. This answers many
questions I would otherwise need to ask.
File attached

Please provide any additional information below.

PVBC run well with the previous version, although some of the CurrentCost 
presenation of consumption was 'flaky'.  That encouraged me to use the present 
version.   A couple of days ago there was an inadverent desynchronisation of 
the CurrentCost meter, but that was rectified, and it continues synchronised to 
 towithin a minute.

In an effort to tidy up the data from 01 August I deleted the data for 01-04 
August and set configuation to forced update.  But PVBC drops out before old 
data are restored.

Original issue reported on code.google.com by jakelly...@bigpond.com on 5 Aug 2011 at 5:40

GoogleCodeExporter commented 8 years ago
I should have added that a usual happening was that pressing the Start Service 
button resulting in PVBC 'Running' for a few seconds, and then dropping out, 
repeatelt

I later tried the version I used in early July.  Same problem.  I replaced my 
Suspend Control settingss with settings close to the example in the 
configurartion instructions.  Same problem.  Restored version 1.5.0.12.  This 
time the the Start Service seemed to work long enough for some of the August 
data to be collected, but within two hours the program dropped out again.  
Pressing the Start Button got PVBC going again, but so far it has run only 
about 15 minutes since re-starting.

Original comment by jakelly...@bigpond.com on 5 Aug 2011 at 10:30

GoogleCodeExporter commented 8 years ago
Please change 'repeatelt' at the end of para 1 of Comment 1 to 'repeatedly'

Original comment by jakelly...@bigpond.com on 5 Aug 2011 at 10:33

GoogleCodeExporter commented 8 years ago
There are no error messages in the log to explain the failure. This indicates 
some failure that is not reported to the application. Or possibly PVBC not 
catching a critical exception. 

Can you check the windows event viewer for errors under ".Net Runtime" or 
"Application Error"

The event viewer can be found in Control Panel -> Administrative Tools -> Event 
Viewer

Please copy the details of the error to an entry under this issue.

Dennis M-F

Original comment by DennisMackayFisher on 6 Aug 2011 at 12:16

GoogleCodeExporter commented 8 years ago
Thanks Dennis

There are several or even many instances of ad advice, a recent one being as 
follows...

+ System 

  - Provider 

   [ Name]  .NET Runtime 

  - EventID 1026 

   [ Qualifiers]  0 

   Level 2 

   Task 0 

   Keywords 0x80000000000000 

  - TimeCreated 

   [ SystemTime]  2011-08-05T21:37:14.000000000Z 

   EventRecordID 9318 

   Channel Application 

   Computer ACER 

   Security 

- EventData 

   Application: PVService.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System.IO.IOException Stack: at System.IO.Ports.InternalResources.WinIOError(Int32, System.String) at System.IO.Ports.SerialStream..ctor(System.String, Int32, System.IO.Ports.Parity, Int32, System.IO.Ports.StopBits, Int32, Int32, System.IO.Ports.Handshake, Boolean, Boolean, Boolean, Byte) at System.IO.Ports.SerialPort.Open() at Devices.SerialStream.Open() at PVInverterManagement.CCMeterReader.StartPortReader() at PVInverterManagement.CCMeterReader.Initialise() at GenThreadManagement.GenThread.RunThread() at System.Threading.ThreadHelper.ThreadStart_Context(System.Object) at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object) at System.Threading.ThreadHelper.ThreadStart()  

Does that help?  Should I send other information?

Regards

James Kelly

Original comment by jakelly...@bigpond.com on 6 Aug 2011 at 12:51

GoogleCodeExporter commented 8 years ago
Dennis

I have just seen a pattern in the error messages for the dozen (or more) error 
messages.  Each set has three items...

1.  .Net runtime error  Error ID 7034

+ System 

  - Provider 

   [ Name]  .NET Runtime 

  - EventID 1026 

   [ Qualifiers]  0 

   Level 2 

   Task 0 

   Keywords 0x80000000000000 

  - TimeCreated 

   [ SystemTime]  2011-08-05T21:37:30.000000000Z 

   EventRecordID 9324 

   Channel Application 

   Computer ACER 

   Security 

- EventData 

   Application: PVService.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System.IO.IOException Stack: at System.IO.Ports.InternalResources.WinIOError(Int32, System.String) at System.IO.Ports.SerialStream..ctor(System.String, Int32, System.IO.Ports.Parity, Int32, System.IO.Ports.StopBits, Int32, Int32, System.IO.Ports.Handshake, Boolean, Boolean, Boolean, Byte) at System.IO.Ports.SerialPort.Open() at Devices.SerialStream.Open() at PVInverterManagement.CCMeterReader.StartPortReader() at PVInverterManagement.CCMeterReader.Initialise() at GenThreadManagement.GenThread.RunThread() at System.Threading.ThreadHelper.ThreadStart_Context(System.Object) at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object) at System.Threading.ThreadHelper.ThreadStart() 

2. (Within less than one second, Application Error Event ID 1000
Log Name:      Application
Source:        Application Error
Date:          8/6/2011 7:37:30 AM
Event ID:      1000
Task Category: (100)
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      ACER
Description:
Faulting application name: PVService.exe, version: 1.5.0.12, time stamp: 
0x4e326729
Faulting module name: KERNELBASE.dll, version: 6.1.7601.17625, time stamp: 
0x4de876e8
Exception code: 0xe0434352
Fault offset: 0x0000d36f
Faulting process id: 0x14d4
Faulting application start time: 0x01cc53b7da8ddc6a
Faulting application path: C:\Program Files\Mackay-Fisher\PV Bean 
Counter\PVService.exe
Faulting module path: C:\Windows\system32\KERNELBASE.dll
Report Id: 1edd961a-bfab-11e0-9a68-b870f471783f
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Application Error" />
    <EventID Qualifiers="0">1000</EventID>
    <Level>2</Level>
    <Task>100</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2011-08-05T21:37:30.000000000Z" />
    <EventRecordID>9325</EventRecordID>
    <Channel>Application</Channel>
    <Computer>ACER</Computer>
    <Security />
  </System>
  <EventData>
    <Data>PVService.exe</Data>
    <Data>1.5.0.12</Data>
    <Data>4e326729</Data>
    <Data>KERNELBASE.dll</Data>
    <Data>6.1.7601.17625</Data>
    <Data>4de876e8</Data>
    <Data>e0434352</Data>
    <Data>0000d36f</Data>
    <Data>14d4</Data>
    <Data>01cc53b7da8ddc6a</Data>
    <Data>C:\Program Files\Mackay-Fisher\PV Bean Counter\PVService.exe</Data>
    <Data>C:\Windows\system32\KERNELBASE.dll</Data>
    <Data>1edd961a-bfab-11e0-9a68-b870f471783f</Data>
  </EventData>
</Event>

3.  With two seconds Service Comtrol Manager Event ID 7034, of which the most 
recent, at ot:32 a.m. today was...

Log Name:      System
Source:        Service Control Manager
Date:          8/6/2011 7:37:32 AM
Event ID:      7034
Task Category: None
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      ACER
Description:
The PV Bean Counter - Yield Data Capture service terminated unexpectedly.  It 
has done this 13 time(s).
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Service Control Manager" Guid="{555908d1-a6d7-4695-8e1e-26931d2012f4}" EventSourceName="Service Control Manager" />
    <EventID Qualifiers="49152">7034</EventID>
    <Version>0</Version>
    <Level>2</Level>
    <Task>0</Task>
    <Opcode>0</Opcode>
    <Keywords>0x8080000000000000</Keywords>
    <TimeCreated SystemTime="2011-08-05T21:37:32.736210500Z" />
    <EventRecordID>27710</EventRecordID>
    <Correlation />
    <Execution ProcessID="596" ThreadID="744" />
    <Channel>System</Channel>
    <Computer>ACER</Computer>
    <Security />
  </System>
  <EventData>
    <Data Name="param1">PV Bean Counter - Yield Data Capture</Data>
    <Data Name="param2">13</Data>
  </EventData>
</Event>

Does any of that help you?

Regards

James Kelly

Original comment by jakelly...@bigpond.com on 6 Aug 2011 at 1:54

GoogleCodeExporter commented 8 years ago
That is exactly what I needed. The problem is related to the serial port 
connection to your Current Cost meter. The setting file indicates it is set to 
COM13

I suspect that you need to change this value. The configuration program has a 
drop down list of available COM ports. The CC meter will be associated with one 
of the ports in the list.

I note that you have CC meter history hours set to 120. This is very high and 
can cause issues if the CC meter clock gets significantly out of sync with the 
computer clock. Large scale data changes can result with associated large 
uploads to pvoutput.

Dennis M-F

Original comment by DennisMackayFisher on 6 Aug 2011 at 2:15

GoogleCodeExporter commented 8 years ago
Dennis

I am pretty sure that you are correct, in that the problem is / was? related to 
the serial port,  but perhaps more indirectly than you suggest.  A few days ago 
I connected a cheap USB hub to my PC, and connected the CurrentCost plug to 
that powered hub.  Then there were problems with the Prolific USB-Serial 
PL-2303 (Code 10) that I could only overcome by resstoring my PC to an early 
July restore point.  This morning I connected CurrentCoast direct to my PC, as 
it was originally and I am starting to collect data for today, including 
CurrentCost data.

Various changes in the USB connection often resulted in a new serial point 
point appearing for the Prolific connection in Ports in the Control Panel, and 
I always watched that, resetting the currentcost setting to match the latest in 
the control panel, and always running the Setup /Checking environment test 
before starting PVBC.

However, for now, I am collecting data again, but just today's.  The large 120 
hour meter history hours setting was in the hope that PVBC would recover 
urrentCost meter data forpower use 01 Aug to 04 Aug.  But it has not done so 
yet.  Will it do so eventually?  What settings should I use to encourage that?  
The forced update facility has so far worked only for recovering energy 
generation data.

Dennis, I am fascinated by PVBC and acknowdege respectfully your expertise in 
developing it.  And I am very grateful that you find time to attend to user's 
queries.

Regards

James Kelly

Original comment by jakelly...@bigpond.com on 6 Aug 2011 at 3:57

GoogleCodeExporter commented 8 years ago
To get the revised current cost data to upload:

On the Current Cost Tab:

- Ensure History Adjust is checked on the appliances to be updated.
- Set History Hours to the appropriate value (120 for 5 days including today)
- Save the settings and restart the PVBC service

Wait until 40 minutes after the next Odd Hour (say 7:40PM or 9:40PM). By this 
time the history records should have updated the CC Meter data in the database.

On the pvoutput.org Settings tab:

- Set Live Upload Days to the correct number of days (say 5)
- Check Force on each day you need reloaded
- Save Settings

Restart PVBC within a few minutes of setting the Force values. 

At startup, PVBC uses thr Force settings to clear the already uploaded flags on 
the pvoutput upload log table. This will cause the entire days to be uploaded 
again. These flags are ignored 10 minutes after they are set as some users were 
flooding pvoutput with redundant updates by leaving the old Force checkbox 
checked.

Due to transaction rate limits at pvoutput, 5 days of live data load will take 
between 5 and 6 hours to complete. You will encounter delays in current data 
reaching pvoutput. PVBC tracks what has been successfully uploaded. It keeps 
retrying until upload succeeds.

When complete set Live Upload Days back to 2 and set History Hours to something 
like 24.

Dennis M-F

Original comment by DennisMackayFisher on 6 Aug 2011 at 9:06

GoogleCodeExporter commented 8 years ago
Dennis

Comment 8 read a few minutes ago, possibly too late for a 2140h target for 
setting up PVOutput.org for that time.  But I shall follow your clear 
instructions either later tonight or tomorrow.

Regards

James Kelly

Original comment by jakelly...@bigpond.com on 6 Aug 2011 at 11:38

GoogleCodeExporter commented 8 years ago
Further to Comment 9

Update of CC data for 01 Aug to 04 Aug started at 2340h.  A quick look at 0230h 
gave the inpression that update might have been already completed.  

A daytime check this morning showed exciting results.  Power-use (consumption) 
data now appears complete for 01 to 04 Aug.  And that includes that estimated 
somehow appeard to have bridged a CC power disconnect on 01 Aug, that spanned 
the apparently critical odd-hour.  It is a most satisfyig result.  Thank you 
again.

It would be fair to declare this a 'done' issue.  But there is an associated 
matter, which you might prefer me to submit as a separate issue.....

The daily table in PVOutput does not show Exported data for 01 Aug to 04 Aug, 
even though inspection of the updated information in boxes on the graphs 
customised for dispay of Net power shows that 'JAK' does indeed have export 
data somewhere.  I started to insert export data in Add Output in PVOutput, but 
backed off when the program requested 'Energy Generated' as soon as I entered 
'Energy Exported'.  Daily 'Energy Generated' is obviously already in the 
database.  How should I get missing 'Exported' data onto the daily table in PV 
outout, and also get that missing data included in the 'Export Percentage' 
statistics for August?

Regards

James Kelly

Original comment by jakelly...@bigpond.com on 7 Aug 2011 at 12:05

GoogleCodeExporter commented 8 years ago
Dennis

I manually inserted the missing 01 Aug to 04 Aug export data, transcriping it 
from the graphs.

My initial problem is now resolved.  I thank you again.

Regards

James Kelly

Original comment by jakelly...@bigpond.com on 10 Aug 2011 at 11:25

GoogleCodeExporter commented 8 years ago

Original comment by DennisMackayFisher on 14 Aug 2011 at 6:53