Batch Status API, consumption and generation


#1

Hi,

I’m trying to figure out how to use the batch status API to add import and export data to my system.

My setup currently uses a custom script to download a day’s worth of live data, a 5 minute intervals, from my inverter, munge the data into the format expected by pvoutput and upload via the batch status API. This works well.

My energy provider, Powershop, provides a CSV that contains import and export on a 30 minute intervals. This seems to be in kWh. I’d like to add this data to my system, but haven’t been able to work out how to achieve this.

This is a sample for from the CSV:

NMI,METER SERIAL NUMBER,CON/GEN,DATE,ESTIMATED?,00:00 - 00:30,00:30 - 01:00,01:00 - 01:30,01:30 - 02:00,02:00 - 02:30,02:30 - 03:00,03:00 - 03:30,03:30 - 04:00,04:00 - 04:30,04:30 - 05:00,05:00 - 05:30,05:30 - 06:00,06:00 - 06:30,06:30 - 07:00,07:00 - 07:30,07:30 - 08:00,08:00 - 08:30,08:30 - 09:00,09:00 - 09:30,09:30 - 10:00,10:00 - 10:30,10:30 - 11:00,11:00 - 11:30,11:30 - 12:00,12:00 - 12:30,12:30 - 13:00,13:00 - 13:30,13:30 - 14:00,14:00 - 14:30,14:30 - 15:00,15:00 - 15:30,15:30 - 16:00,16:00 - 16:30,16:30 - 17:00,17:00 - 17:30,17:30 - 18:00,18:00 - 18:30,18:30 - 19:00,19:00 - 19:30,19:30 - 20:00,20:00 - 20:30,20:30 - 21:00,21:00 - 21:30,21:30 - 22:00,22:00 - 22:30,22:30 - 23:00,23:00 - 23:30,23:30 - 00:00
410XX,217XXXXX,Consumption,24/8/2018,No,0.539,0.212,0.115,0.183,0.248,0.232,0.211,0.188,0.24,0.163,0.146,0.209,0.17,0.194,0.185,0.174,0.206,0.014,0.012,0.0,0.0,0.001,0.0,0.0,0.0,0.0,0.002,0.035,0.183,0.0,0.0,0.001,0.702,0.869,0.736,0.182,1.564,1.612,1.672,1.246,1.094,1.145,0.725,0.637,0.608,0.642,0.64,0.614
410XX,217XXXXX,Generation,24/8/2018,No,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.008,0.004,0.215,0.765,0.845,0.606,0.668,0.885,0.866,0.789,1.735,1.153,1.207,0.251,1.103,0.796,0.376,0.176,0.004,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0

Following the docs about Net upload with the batch status api:

Positive or zero	Positive or zero	v2	v4

I’m sending batches of records that look like this (but for 24hours):

"20180824,10:10,-1,101,-1,0", "20180824,10:15,-1,101,-1,0",
 "20180824,10:20,-1,101,-1,0", "20180824,10:25,-1,101,-1,0",
 "20180824,10:30,-1,111,-1,0", "20180824,10:35,-1,111,-1,0",
 "20180824,10:40,-1,111,-1,0", "20180824,10:45,-1,111,-1,0",
 "20180824,10:50,-1,111,-1,0", "20180824,10:55,-1,111,-1,0",
 "20180824,11:00,-1,147,-1,0", "20180824,11:05,-1,147,-1,0",
 "20180824,11:10,-1,147,-1,0", "20180824,11:15,-1,147,-1,0",
 "20180824,11:20,-1,147,-1,0", "20180824,11:25,-1,147,-1,0",
 "20180824,11:30,-1,144,-1,0", "20180824,11:35,-1,144,-1,0",

My understanding is that the records about show the export of, for example, 144W of power over the 11:25 to 11:30 period. There are corresponding figure for non-daylight hours that show positive import e.g.:

 "20180824,20:10,-1,0,-1,182", "20180824,20:15,-1,0,-1,182",
 "20180824,20:20,-1,0,-1,182", "20180824,20:25,-1,0,-1,182",

These records are accepted by the API but the resulting figures on the site don’t correspond with the totals provided by Powershop.

An example can be seen at https://pvoutput.org/intraday.jsp?id=67310&sid=59922&dt=20180824. The power used seems to mirror the power generated. I would expect the power used to be flat in the middle of the day with peaks in the morning and evening.

I’m not sure if I’m sending incorrect data or have a misunderstanding about how to upload the consumption and generation data. Any help greatly appreciated.

regards,

Martin


#2

To send net data (import/export) instead of gross add n=1 parameter to the request.


#3

I’m sending my params as

    "data=#{data}&n=1&delay=1"

where data is the concatenated string of statuses.

The data param is being picked up ok, so I don’t see why the n=1 wouldn’t?

thanks


#4

Make a request through web browser, this should process the n=1

The delay parameter is not applicable for Add Batch Status.