BlazejosP / huawei-sun2000-API-CLI

Huawei SUN2000 compatible devices which working with Huawei Cloud Service command line bash API for monitoring or download data from their FusionSolarApp API
https://www.buymeacoffee.com/blazejosP
GNU General Public License v3.0
110 stars 15 forks source link

getStationRealKpi - problem #18

Closed githubmichal closed 3 years ago

githubmichal commented 3 years ago

I have a problem with this section...

`jq: error (at :1): Cannot iterate over null (null)

API getStationRealKpi connection OK Normal Status Time of your Request to API: nie, 30 maj 2021, 15:02:51 CEST

Numbers of plants to check: 1

Plant 1: 
Plant Status: Unknown
Daily energy:  kWh
Monthly energy:  kWh
Lifetime energy:  kWh
Daily revenue:  ¥
Total revenue:  ¥`

API data: { "data": null, "failCode": 0, "message": null, "params": { "currentTime": 1622380256531, "stationCodes": "6CD3185EE7074FFCBEF8B4E45AB11328" }, "success": true }

BlazejosP commented 3 years ago

First question from my side what about this functions they must be working and uncommented they are necessary to made getStationRealKpi working?

login_to_API getStationList

Next what I see jq jq: error (at :1): Cannot iterate over null (null) Code can't extract data from the answer because answer as you mentioned has empty field "data": null. So as I'm nearly certain this part of code for getStationRealKpi is correct and working. So who is to blame? If you look on answer your question to API is "success": true so why is no data? I myself have similar problem but in my case getStationList is working and show data

`` API getStationRealKpi connection OK Normal Status Time of your Request to API: Numbers of plants to check: 1

Plant 1: 
Plant Status: Healthy
Daily energy: 16.63 kWh
Monthly energy: 545.46 kWh
Lifetime energy: 3950.48 kWh
Daily revenue: 1.243 ¥
Total revenue: 467.618 ¥

`` But getKpiStationHour, getKpiStationDay,getKpiStationMonth,getKpiStationYear are not working and have the same issues like your question is also "success": true and "data": null.

Only what I can do in this case is to write to Huawei helpdesk with question to check my account. If after upgrade was limited in some way because problem is on their side I suppose some glitches on their server with rights to access certain data on specific account. Before upgrade I haven't such problems. I'm also certain that this isue is on their server side because I tested this question with use of Postman external program and have the same disappointing results with "success": true and "data": null. So I opened case on eu_inverter_support@huawei.com week ago and now case is in progress so hope they found why I have this strange answers like you. So In my opinion you shuld made the same. In meantime you can check other functions because some of them my have data other not there is no rule in that case.

githubmichal commented 3 years ago

login_to_API getStationList working ok.

I tried to use Postman and there is success but no data with getStationRealKpi. So I'm going to write to huawei support...