Add Batch Status results not appearing

Hi all,

I’m not seeing results I’ve uploaded via the addbatchstatus endpoint appear in my results.

I have a new installation with a Huawei Sunn2000L inverter. Huawei provides and API interface where I can fetch daily results at 5 min intervals. I then convert that to a format suitable for uploading via the addbatchstatus service, and uploading batches of 30 results, as described in the docs.

The results of the calls are coming back with a “1” for each status, which I believe indicates success.

I uploaded a bunch of days last night but as of this morning am not seeing them in my output. Is there a way I can diagnose this further?

thanks,

Martin

1 Like

For diagnosis here is the “data” param I’m sending:

 "20180623,14:20,14.50;20180623,14:25,14.69;20180623,14:30,14.89;20180623,14:35,15.08;20180623,14:40,15.27;20180623,14:45,15.45;20180623,14:50,15.62;20180623,14:55,15.78;20180623,15:00,15.95;20180623,15:05,16.11;20180623,15:10,16.22;20180623,15:15,16.31;20180623,15:20,16.38;20180623,15:25,16.43;20180623,15:30,16.47;20180623,15:35,16.49;20180623,15:40,16.51;20180623,15:45,16.52;20180623,15:50,16.54;20180623,15:55,16.55;20180623,16:00,16.56;20180623,16:05,16.58;20180623,16:10,16.59;20180623,16:15,16.60;20180623,16:20,16.61;20180623,16:25,16.62;20180623,16:30,16.63;20180623,16:35,16.63;20180623,16:40,16.64;20180623,16:45,16.64;"

and here is what the call is returning:

{:ok,
%HTTPoison.Response{
body: “20180623,14:20,1;20180623,14:25,1;20180623,14:30,1;20180623,14:35,1;20180623,14:40,1;20180623,14:45,1;20180623,14:50,1;20180623,14:55,1;20180623,15:00,1;20180623,15:05,1;20180623,15:10,1;20180623,15:15,1;20180623,15:20,1;20180623,15:25,1;20180623,15:30,1;20180623,15:35,1;20180623,15:40,1;20180623,15:45,1;20180623,15:50,1;20180623,15:55,1;20180623,16:00,1;20180623,16:05,1;20180623,16:10,1;20180623,16:15,1;20180623,16:20,1;20180623,16:25,1;20180623,16:30,1;20180623,16:35,1;20180623,16:40,1;20180623,16:45,1”,
headers: [
{“Date”, “Sat, 23 Jun 2018 14:10:58 GMT”},
{“Set-Cookie”, “JSESSIONID=w60y1oazlnt51fjriwyeku37q;Path=/”},
{“Expires”, “Thu, 01 Jan 1970 00:00:00 GMT”},
{“Content-Length”, “509”},
{“Content-Type”, “text/plain;charset=ISO-8859-1”},
{“Server”, “Jetty(7.6.17.v20150415)”},
{“Strict-Transport-Security”, “max-age=15768000”}
],
request_url: “https://pvoutput.org/service/r2/addbatchstatus.jsp”,
status_code: 200
}}

It looks like the updates are being accepted, but I see no output for 20180623. My system is 59922.

thanks,

Martin

Looks okay - https://pvoutput.org/intraday.jsp?id=67310&sid=59922&dt=20180625

Hi BB,

I’ve added the last few days manually using the live loader, just so I could see my output. I’ll try again this evening with the the api and post the results. I assume any results should show up within a few minutes of upload?

thanks,

Martin

Hi,

I’ve just tried uploading yesterday’s data via the API, the output is below. I’ve interleaved the data string and the response from the API. I can see each reading has a “1” in the response, so it looks like it’s being accepted. The readings are batched into groups of 30 as per the API spec.

The data hasn’t appeared in my outputs as of 10 mins after upload.

thanks,

Martin

"20180626,06:52,0.00;20180626,06:55,0.00;20180626,07:00,0.00;20180626,07:05,0.00;20180626,07:10,0.00;20180626,07:15,0.00;20180626,07:20,0.02;20180626,07:25,0.04;20180626,07:30,0.07;20180626,07:35,0.10;20180626,07:40,0.14;20180626,07:45,0.18;20180626,07:50,0.23;20180626,07:55,0.29;20180626,08:00,0.35;20180626,08:05,0.42;20180626,08:10,0.49;20180626,08:15,0.56;20180626,08:20,0.63;20180626,08:25,0.71;20180626,08:30,0.79;20180626,08:35,0.87;20180626,08:40,0.96;20180626,08:45,1.06;20180626,08:50,1.13;20180626,08:55,1.17;20180626,09:00,1.21;20180626,09:05,1.26;20180626,09:10,1.31;20180626,09:15,1.36;"
{:ok,
%HTTPoison.Response{
  body: "20180626,06:52,1;20180626,06:55,1;20180626,07:00,1;20180626,07:05,1;20180626,07:10,1;20180626,07:15,1;20180626,07:20,1;20180626,07:25,1;20180626,07:30,1;20180626,07:35,1;20180626,07:40,1;20180626,07:45,1;20180626,07:50,1;20180626,07:55,1;20180626,08:00,1;20180626,08:05,1;20180626,08:10,1;20180626,08:15,1;20180626,08:20,1;20180626,08:25,1;20180626,08:30,1;20180626,08:35,1;20180626,08:40,1;20180626,08:45,1;20180626,08:50,1;20180626,08:55,1;20180626,09:00,1;20180626,09:05,1;20180626,09:10,1;20180626,09:15,1",
  headers: [
    {"Date", "Tue, 26 Jun 2018 22:21:14 GMT"},
    {"Set-Cookie", "JSESSIONID=mnn4lki9nkqv1dtp129uard4c;Path=/"},
    {"Expires", "Thu, 01 Jan 1970 00:00:00 GMT"},
    {"Content-Length", "509"},
    {"Content-Type", "text/plain;charset=ISO-8859-1"},
    {"Server", "Jetty(7.6.17.v20150415)"},
    {"Strict-Transport-Security", "max-age=15768000"}
  ],
  request_url: "https://pvoutput.org/service/r2/addbatchstatus.jsp",
  status_code: 200
}}
"20180626,09:20,1.42;20180626,09:25,1.48;20180626,09:30,1.53;20180626,09:35,1.59;20180626,09:40,1.66;20180626,09:45,1.74;20180626,09:50,1.84;20180626,09:55,1.98;20180626,10:00,2.20;20180626,10:05,2.36;20180626,10:10,2.56;20180626,10:15,2.69;20180626,10:20,2.81;20180626,10:25,2.92;20180626,10:30,3.02;20180626,10:35,3.15;20180626,10:40,3.30;20180626,10:45,3.44;20180626,10:50,3.58;20180626,10:55,3.70;20180626,11:00,3.83;20180626,11:05,3.96;20180626,11:10,4.08;20180626,11:15,4.20;20180626,11:20,4.35;20180626,11:25,4.61;20180626,11:30,4.78;20180626,11:35,4.95;20180626,11:40,5.10;20180626,11:45,5.26;"
{:ok,
%HTTPoison.Response{
  body: "20180626,09:20,1;20180626,09:25,1;20180626,09:30,1;20180626,09:35,1;20180626,09:40,1;20180626,09:45,1;20180626,09:50,1;20180626,09:55,1;20180626,10:00,1;20180626,10:05,1;20180626,10:10,1;20180626,10:15,1;20180626,10:20,1;20180626,10:25,1;20180626,10:30,1;20180626,10:35,1;20180626,10:40,1;20180626,10:45,1;20180626,10:50,1;20180626,10:55,1;20180626,11:00,1;20180626,11:05,1;20180626,11:10,1;20180626,11:15,1;20180626,11:20,1;20180626,11:25,1;20180626,11:30,1;20180626,11:35,1;20180626,11:40,1;20180626,11:45,1",
  headers: [
    {"Date", "Tue, 26 Jun 2018 22:21:14 GMT"},
    {"Set-Cookie", "JSESSIONID=1vxt6vyahayd2spdf0blirw8d;Path=/"},
    {"Expires", "Thu, 01 Jan 1970 00:00:00 GMT"},
    {"Content-Length", "509"},
    {"Content-Type", "text/plain;charset=ISO-8859-1"},
    {"Server", "Jetty(7.6.17.v20150415)"},
    {"Strict-Transport-Security", "max-age=15768000"}
  ],
  request_url: "https://pvoutput.org/service/r2/addbatchstatus.jsp",
  status_code: 200
}}
"20180626,11:50,5.39;20180626,11:55,5.55;20180626,12:00,5.70;20180626,12:05,5.84;20180626,12:10,5.98;20180626,12:15,6.11;20180626,12:20,6.24;20180626,12:25,6.37;20180626,12:30,6.50;20180626,12:35,6.64;20180626,12:40,6.78;20180626,12:45,6.94;20180626,12:50,7.09;20180626,12:55,7.23;20180626,13:00,7.44;20180626,13:05,7.66;20180626,13:10,7.89;20180626,13:15,8.13;20180626,13:20,8.37;20180626,13:25,8.63;20180626,13:30,8.88;20180626,13:35,9.04;20180626,13:40,9.22;20180626,13:45,9.37;20180626,13:50,9.53;20180626,13:55,9.64;20180626,14:00,9.80;20180626,14:05,9.99;20180626,14:10,10.17;20180626,14:15,10.37;"

{:ok,
%HTTPoison.Response{
  body: "20180626,11:50,1;20180626,11:55,1;20180626,12:00,1;20180626,12:05,1;20180626,12:10,1;20180626,12:15,1;20180626,12:20,1;20180626,12:25,1;20180626,12:30,1;20180626,12:35,1;20180626,12:40,1;20180626,12:45,1;20180626,12:50,1;20180626,12:55,1;20180626,13:00,1;20180626,13:05,1;20180626,13:10,1;20180626,13:15,1;20180626,13:20,1;20180626,13:25,1;20180626,13:30,1;20180626,13:35,1;20180626,13:40,1;20180626,13:45,1;20180626,13:50,1;20180626,13:55,1;20180626,14:00,1;20180626,14:05,1;20180626,14:10,1;20180626,14:15,1",
  headers: [
    {"Date", "Tue, 26 Jun 2018 22:21:15 GMT"},
    {"Set-Cookie", "JSESSIONID=crgqonyzcwcw1537hiigz7mny;Path=/"},
    {"Expires", "Thu, 01 Jan 1970 00:00:00 GMT"},
    {"Content-Length", "509"},
    {"Content-Type", "text/plain;charset=ISO-8859-1"},
    {"Server", "Jetty(7.6.17.v20150415)"},
    {"Strict-Transport-Security", "max-age=15768000"}
  ],
  request_url: "https://pvoutput.org/service/r2/addbatchstatus.jsp",
  status_code: 200
}}
"20180626,14:20,10.56;20180626,14:25,10.74;20180626,14:30,10.92;20180626,14:35,11.11;20180626,14:40,11.30;20180626,14:45,11.49;20180626,14:50,11.67;20180626,14:55,11.83;20180626,15:00,11.99;20180626,15:05,12.14;20180626,15:10,12.26;20180626,15:15,12.35;20180626,15:20,12.43;20180626,15:25,12.48;20180626,15:30,12.53;20180626,15:35,12.56;20180626,15:40,12.57;20180626,15:45,12.59;20180626,15:50,12.60;20180626,15:55,12.62;20180626,16:00,12.63;20180626,16:05,12.65;20180626,16:10,12.66;20180626,16:15,12.67;20180626,16:20,12.68;20180626,16:25,12.69;20180626,16:30,12.70;20180626,16:35,12.71;20180626,16:40,12.71;20180626,16:45,12.71;"

{:ok,
%HTTPoison.Response{
  body: "20180626,14:20,1;20180626,14:25,1;20180626,14:30,1;20180626,14:35,1;20180626,14:40,1;20180626,14:45,1;20180626,14:50,1;20180626,14:55,1;20180626,15:00,1;20180626,15:05,1;20180626,15:10,1;20180626,15:15,1;20180626,15:20,1;20180626,15:25,1;20180626,15:30,1;20180626,15:35,1;20180626,15:40,1;20180626,15:45,1;20180626,15:50,1;20180626,15:55,1;20180626,16:00,1;20180626,16:05,1;20180626,16:10,1;20180626,16:15,1;20180626,16:20,1;20180626,16:25,1;20180626,16:30,1;20180626,16:35,1;20180626,16:40,1;20180626,16:45,1",
  headers: [
    {"Date", "Tue, 26 Jun 2018 22:21:15 GMT"},
    {"Set-Cookie", "JSESSIONID=1wvvi5atsyxuuevj8s1vzox6l;Path=/"},
    {"Expires", "Thu, 01 Jan 1970 00:00:00 GMT"},
    {"Content-Length", "509"},
    {"Content-Type", "text/plain;charset=ISO-8859-1"},
    {"Server", "Jetty(7.6.17.v20150415)"},
    {"Strict-Transport-Security", "max-age=15768000"}
  ],
  request_url: "https://pvoutput.org/service/r2/addbatchstatus.jsp",
  status_code: 200
}}
"20180626,16:50,12.72;20180626,16:55,12.72;20180626,17:00,12.72;20180626,17:05,12.72;20180626,17:09,12.72;"

{:ok,
%HTTPoison.Response{
  body: "20180626,16:50,1;20180626,16:55,1;20180626,17:00,1;20180626,17:05,1;20180626,17:09,1",
  headers: [
    {"Date", "Tue, 26 Jun 2018 22:21:15 GMT"},
    {"Set-Cookie", "JSESSIONID=yvt6pscr1pj8mrki7q3clto;Path=/"},
    {"Expires", "Thu, 01 Jan 1970 00:00:00 GMT"},
    {"Content-Length", "84"},
    {"Content-Type", "text/plain;charset=ISO-8859-1"},
    {"Server", "Jetty(7.6.17.v20150415)"},
    {"Strict-Transport-Security", "max-age=15768000"}
  ],
  request_url: "https://pvoutput.org/service/r2/addbatchstatus.jsp",
  status_code: 200
}}
"2018-06-26"

Try adding a power value of -1 to calculate it.

20180626,16:50,100,-1;20180626,16:55,105,-1

The submitted energy 1Wh value is also too low and should be increasing.

Hi,

I got it working after a couple of changes. I multiplied the Energy Generation by 1000 to convert from Kwh to wh, and added the Power Generation values as well. All looks good now, thanks for your help!

regards,

Martin

Hi,

Is the Huawei API access documented? I can’t find anything about it in the user manual.
What are the setup parameters to access the data?

Thanks
Magnus

Hi,

I asked Huawei support for for documentation and they sent me a pdf of specs. I’ve uploaded a copy to https://drive.google.com/file/d/113Ulbsw8pOgWmIkGDcZxZZE09P7h6ZHf/view?usp=sharing

You’ll need to create an account on their NetEco platform, which is documented at https://drive.google.com/file/d/1W0Z6nn08THWAHiUaw3qqA7uxf2aVjsCi/view?usp=sharing

Let me know how you go.

regards,

Martin

Thanks! I’ll see when I have time to give it a shot :slight_smile:

Hi martinstannard,

I’ve just had a Huawei SUN2000L-5KTL installed recently and trying to get the data into PVOutput.org but don’t know where to start. For instance, how do i use the Neteco API to interface with PVOutput? Is it a manual process of running addbatchstatus commands everytime i want to upload my data or can you set it up to run automatically?

Any help would be greatly appreciated.

Rolando

Hi Rolando,

I’ve written a custom script that hits NetEcoAPI to pull down a days data, formats it, then posts it to PVOutput.org. It’s not really ready for public use, but I’ll look at cleaning it up and putting the code up for others to take a look at.

regards,

Martin

1 Like

HI!

Any plans to make a noob step by step guide how to do this?
I also like to connect my Huawei SUN2000L 3 KTL to pvoutput.

But no idea how to start…

1 Like

I’ll try to get something up this week. It needs some instructions and testing before it’s ready for public use.

Awesome, looking forward to it :slight_smile: Thanks mate

Hey there, I’ve cleaned up my script and put up some instructions at https://gitlab.com/martinstannard/solar. The instructions are in the README file of the repository, and include details on how to setup an account with Huawei so the script gets access to your inverter’s data.

I’d be grateful for any feedback on issues you come across so I can iron out bugs before release it more widely.

regards,

Martin

1 Like

Hi Martin,

Maybe the page is not public yet?

404

Page Not Found

Make sure the address is correct and the page hasn’t moved.
Please contact your GitLab administrator if you think this is a mistake

D’oh!

Should be public now.

Hi Martin thanks a lot for this.

I am currently trying to set the export process up on an Ubuntu LTS instance. At the point of executing the script to obtain the Plant ID, I am receiving the below output:

** (FunctionClauseError) no function clause matching in Solar.Inverter.handle_ok/1

_ The following arguments were given to Solar.Inverter.handle_ok/1:_

_ # 1_
_ {:ok, %{“errorMsg” => 100}}_

_ (solar) lib/solar/inverter.ex:87: Solar.Inverter.handle_ok/1_
_ (solar) lib/solar/inverter.ex:56: Solar.Inverter.handle_login_response/1_
_ (solar) lib/solar/inverter.ex:13: Solar.Inverter.info/0_
_ (solar) lib/solar.ex:19: Solar.run/1_
_ (elixir) lib/kernel/cli.ex:105: anonymous fn/3 in Kernel.CLI.exec_fun/2_

Any assistance appreciated!

Thanks

Hi Martin, thanks for your solution.

I have exactly the same problem as catchtherays above, any advice is highly appreciated.
Erlang is installed on a raspberry (sudo apt-get install erlang), the error message is after ./solar -i

Best regards, Jan