Quantcast
Channel: SBFspot Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 360

Commented Unassigned: workaround for: Power value too high for system size [132]

$
0
0
Hello,

I recently started using SBFspot, version 3.1.1 on raspberry pi.

I tried to get all archived data from the SMA inverter,
and then upload it to pvoutput.org.

I used the -ad and -ae flags too fetch the archived data
(I used -ad300 and -am300, which are larger than the
'live' data that is present in the inverter -- it gave me
'live' data for a few months;
it gave me per-day totals for all months since the inverter was activated.

Somehow, the very first datapoint for the very first day of the archived data
has an 'interesting' power/energy (V2) value:
I assume it is the amount of energy generated from the moment the SMA inverter was enabled upto that moment in time.
In my case, this is a large number: 110925396

In the csv file it looks as follows:

```
12/07/2015 04:25:00;9243,782;110925,396
12/07/2015 04:30:00;9243,782;0,000
```

When uploading the archived data to pvoutput.org
SBFspot tries to upload this huge value as a value for V2.
Pvoutput.org refuses the upload, because the value is higher than the system size:
```
Bad request 400: Power value [110925396] too high for system size [3825]

```


The following patch kind-of fixes this:
when obtaining the archived data using batch_get_archdaydata we take
the system size into account: the system size is passed as additional
parameter in the call to batch_get_archdaydata.

When it encounters a V2 value that is higher than system size,
it will use 0 instead; when that happens, a LOG line is printed.

This works for me; I only tested this with mysqlite.

Note: I slightly edited the attached diff to remove irrelevant changes;
because of this, line numbers in the patch may be slightly off.

Axel.
PS thanks for SBFspot, it does a nice job! :-)

Comments: PVoutput allows a max power value=150% of the system size. In your case, for an SB1300 this is appox. 1950W You can change the vwPvodata view to limit the powervalue to 1800 (to be on the safe side) ```SQL CASE WHEN dd.Power > 1800 THEN 0 ELSE dd.Power END ``` The comlete view looks like this: (SQLite has no "ALTER VIEW" so you have to DROP it first.) ```SQL DROP VIEW IF EXISTS vwPvoData; CREATE VIEW vwPvoData AS SELECT dd.Timestamp, dd.Name, dd.Type, dd.Serial, dd.TotalYield AS V1, CASE WHEN dd.Power > 1800 THEN 0 ELSE dd.Power END AS V2, cons.EnergyUsed AS V3, cons.PowerUsed AS V4, spot.Temperature AS V5, spot.Uac1 AS V6, NULL AS V7, NULL AS V8, NULL AS V9, NULL AS V10, NULL AS V11, NULL AS V12, dd.PVoutput FROM vwDayData AS dd LEFT JOIN vwAvgSpotData AS spot ON dd.Serial = spot.Serial AND dd.Timestamp = spot.Nearest5min LEFT JOIN vwAvgConsumption AS cons ON dd.Timestamp = cons.Nearest5min ORDER BY dd.Timestamp DESC; ```

Viewing all articles
Browse latest Browse all 360

Trending Articles