This project has moved and is read-only. For the latest updates, please go here.

Double data in Monthdata tables

Topics: 4. Bugs
Oct 27, 2014 at 9:16 PM
Edited Oct 27, 2014 at 10:02 PM
Hello,
Since today all days in October in the MonthData-table of SBFspot.db have two (same) values with two different TimeStamps.
Because the TimeStamps differ 3600 seconds I presume it has something to do with the summer-/wintertime change. Is this a known problem? (Issue 68?)
What is the best to do?
(I am running SBFspot 3.0.2 on a Raspberry Pi, my inverter is a SMA SB 3000TL-21)
regards,
Frans
Oct 29, 2014 at 12:26 PM
I have a similar issue since SQL support, so I wondered if I was the only one since nobody reported it until now... Only I have a difference of -300 to +300 (+/- 5 mins)
#   UnixTime    UTC                 Total       Day     Diff
1   1414623300  29/10/2014 22:55    15669875    9058    86400
2   1414536900  28/10/2014 22:55    15660817    12973   86400
3   1414450500  27/10/2014 22:55    15647844    5367    86400
4   1414364100  26/10/2014 22:55    15642477    5367    86400
5   1414277700  25/10/2014 22:55    15637110    2897    86100
6   1414191600  24/10/2014 23:00    15637110    2897    300
7   1414191300  24/10/2014 22:55    15634213    3346    86100
8   1414105200  23/10/2014 23:00    15634213    3346    300
9   1414104900  23/10/2014 22:55    15630867    7830    86100
10  1414018800  22/10/2014 23:00    15630867    7830    300
11  1414018500  22/10/2014 22:55    15623037    4719    86100
12  1413932400  21/10/2014 23:00    15623037    4719    300
13  1413932100  21/10/2014 22:55    15618318    7636    86100
14  1413846000  20/10/2014 23:00    15618318    7636    300
15  1413845700  20/10/2014 22:55    15610682    9262    86100
16  1413759600  19/10/2014 23:00    15610682    9262    300
17  1413759300  19/10/2014 22:55    15601420    16031   86100
18  1413673200  18/10/2014 23:00    15601420    16031   300
19  1413672900  18/10/2014 22:55    15585389    9062    86100
20  1413586800  17/10/2014 23:00    15585389    9062    300
21  1413586500  17/10/2014 22:55    15576327    7762    86100
22  1413500400  16/10/2014 23:00    15576327    7762    300
It's easy to solve but some manual intervention is needed:
Delete all records for the month with double values (SQLite example):
delete from MonthData where strftime("%Y-%m",datetime(TimeStamp, 'unixepoch')) = "2014-10";
and reimport:
./SBFspot -v -nocsv -am1 -sp0 -ae0 -ad0 
I don't know what's the cause of this difference. Timestamp in db is raw time data coming from inverter.
I'll try to fix it by deleting the monthdata first as I don't see another possibillity for now.
Oct 29, 2014 at 9:42 PM
Here are my outputs from MonthData:
     UnixTime          DutchTime                      UTC            Total       Day
""  "1414537200"    "2014-10-29 00:00:00"   "2014-10-28 23:00:00"   "5831774"   "1985"
""  "1414450800"    "2014-10-28 00:00:00"   "2014-10-27 23:00:00"   "5829789"   "9634"
""  "1414364400"    "2014-10-27 00:00:00"   "2014-10-26 23:00:00"   "5820155"   "2176"
""  "1414360800"    "2014-10-26 23:00:00"   "2014-10-26 22:00:00"   "5820155"   "2176"
""  "1414278000"    "2014-10-26 01:00:00"   "2014-10-25 23:00:00"   "5817979"   "4551"
""  "1414274400"    "2014-10-26 00:00:00"   "2014-10-25 22:00:00"   "5817979"   "4551"
""  "1414191600"    "2014-10-25 01:00:00"   "2014-10-24 23:00:00"   "5813428"   "899"
""  "1414188000"    "2014-10-25 00:00:00"   "2014-10-24 22:00:00"   "5813428"   "899"
""  "1414105200"    "2014-10-24 01:00:00"   "2014-10-23 23:00:00"   "5812529"   "2445"
""  "1414101600"    "2014-10-24 00:00:00"   "2014-10-23 22:00:00"   "5812529"   "2445"
""  "1414018800"    "2014-10-23 01:00:00"   "2014-10-22 23:00:00"   "5810084"   "6514"
""  "1414015200"    "2014-10-23 00:00:00"   "2014-10-22 22:00:00"   "5810084"   "6514"
""  "1413932400"    "2014-10-22 01:00:00"   "2014-10-21 23:00:00"   "5803570"   "1805"
""  "1413928800"    "2014-10-22 00:00:00"   "2014-10-21 22:00:00"   "5803570"   "1805"
""  "1413846000"    "2014-10-21 01:00:00"   "2014-10-20 23:00:00"   "5801765"   "5805"
""  "1413842400"    "2014-10-21 00:00:00"   "2014-10-20 22:00:00"   "5801765"   "5805"
""  "1413759600"    "2014-10-20 01:00:00"   "2014-10-19 23:00:00"   "5795960"   "2523"
""  "1413756000"    "2014-10-20 00:00:00"   "2014-10-19 22:00:00"   "5795960"   "2523"
""  "1413673200"    "2014-10-19 01:00:00"   "2014-10-18 23:00:00"   "5793437"   "10000"
""  "1413669600"    "2014-10-19 00:00:00"   "2014-10-18 22:00:00"   "5793437"   "10000"
""  "1413586800"    "2014-10-18 01:00:00"   "2014-10-17 23:00:00"   "5783437"   "7056"
""  "1413583200"    "2014-10-18 00:00:00"   "2014-10-17 22:00:00"   "5783437"   "7056"
""  "1413500400"    "2014-10-17 01:00:00"   "2014-10-16 23:00:00"   "5776381"   "5928"
""  "1413496800"    "2014-10-17 00:00:00"   "2014-10-16 22:00:00"   "5776381"   "5928"
I was not able to make a 'Diff'-column. As you can see the differences are hours or 3600, 7200 seconds.
I do not understand your 300 difference either.
When I look to my values I think there should be one moment of a day in UTC-time where the Dayfield in the MonthData-table should be written. This time could be 12:00:00 UTC of a day, in stead of 00:00:00 local time. This solves the problem in summer-/wintertime too.

I will remove the extra (...) MonthData as advised. Thanks!

Gr.Frans
Nov 6, 2014 at 10:50 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.