Coder Social home page Coder Social logo

Comments (63)

ekurgan avatar ekurgan commented on September 26, 2024 1

I am having the same issue here. It stopt during the night then in the morning it was good again. And then a couple of hours later it stopt again. I think the problem lies with Huawei. Maybe the adres changed or so. I see my credentials are good

Same here, the credentials are all checked but having the same issue

from homeassistant-fusionsolar.

tijsverkoyen avatar tijsverkoyen commented on September 26, 2024 1

It was just an information. It seems to me that Huawei changed something so I need to update the Kiosk-url. Maybe you also need to update any urls in the API-method

Kiosk and Northbound API are 2 completely different things and not related at all.
Kiosk urls also expire after a year. See: https://github.com/tijsverkoyen/HomeAssistant-FusionSolar?tab=readme-ov-file#i-am-using-the-kiosk-mode-but-the-data-is-not-updating

jose@ryzin:~$ curl --location 'https://eu5.fusionsolar.huawei.com/thirdData/login' 0i --header 'Content-Type: application/json' --data '{
    "userName": "XXX",
    "systemCode": "XXX"
}'
{"data":null,"success":true,"failCode":0,"params":{},"message":null}curl: (6) Could not resolve host: 0i
jose@ryzin:~$ 

Note that the message is null...

That is correct. In this login call the "success": true is the most important part. And the token off course.

This curl command doesn't output headers, I took some digging in headers and found the token..

I know, my fault. 0i should be -i

jose@ryzin:~$ curl --location 'https://eu5.fusionsolar.huawei.com/thirdData/getStationList' \
--header 'XSRF-TOKEN: XXX' \
--header 'Content-Type: application/json' \
--data '{}'
{"data":null,"failCode":401,"message":"Invalid access to current interface!","params":{},"success":false}

Ok, and what did the third curl call gave as output?

curl --location 'https://eu5.fusionsolar.huawei.com/thirdData/stations' \
--header 'XSRF-TOKEN: XXX' \
--header 'Content-Type: application/json' \
--data '{
    "pageNo": 1,
    "pageSize": 100
}'

#68 (comment) feels useful

Yeah, that is implemented. And that is the third call.

from homeassistant-fusionsolar.

tijsverkoyen avatar tijsverkoyen commented on September 26, 2024 1

@JohnMcLear maybe you can check it based on those screenshot from Huawei

from homeassistant-fusionsolar.

tobyknobi avatar tobyknobi commented on September 26, 2024 1

Latest respons from Huawei
"
Hi,

Based on RD analysis this issue is caused by a FusionSolar bug, we will fix it in the next upgrade this month."

Regards Toby

from homeassistant-fusionsolar.

gregyone avatar gregyone commented on September 26, 2024 1

Hello,

this thread helped me to solve fusionSolar API access, so I will share my experience.

Mid-Feb, my Python API automation stopped working returning"API Error 20056" (it worked successfully for years).
It was still possible to authenticate, but seems some authorizations were missing to access some API parts.
Huawei support forwarded me to my installer.
My installer having the same issue was already in contact with Huawei support.

After two months, based on this thread info, I request my installer to create a new API access credentials.
This morning, I tested those new credentials, but I get failCode":401,"message":"Invalid access to current interface!"

But then, my previous API credentials are working back !
Very strange... but I am now un-blocked.

Regards, Greg.

from homeassistant-fusionsolar.

Cedric29 avatar Cedric29 commented on September 26, 2024 1

@tijsverkoyen
Good news ! Resolved by itself with Huawei update
Working fine again at my side !
Apologize for creating a bug at your side while it wasn't ... But helped to find the root cause !

Thanks for you integration by the way ! amazing one !

from homeassistant-fusionsolar.

Edvliet avatar Edvliet commented on September 26, 2024 1

from homeassistant-fusionsolar.

tijsverkoyen avatar tijsverkoyen commented on September 26, 2024

Can you check with your installer if your credentials have access to retrieve the stations. As I think you don't have access to /thirdData/getStationList or /thirdData/stations

from homeassistant-fusionsolar.

CarloDeSutter avatar CarloDeSutter commented on September 26, 2024

I think I am suffering from the same problem.

I am currently contacting my installer to see if they can find anything that's causing this.

When I make the call manually, I am getting an obscure error of which I cannot find much else on the web.

POST https://eu5.fusionsolar.huawei.com/thirdData/stations
with body
{ "pageNo": 1 }

{
    "data": null,
    "failCode": 20056,
    "message": "exist resource that are not authorized by the owner.",
    "success": false
}

from homeassistant-fusionsolar.

Cedric29 avatar Cedric29 commented on September 26, 2024

Can you check with your installer if your credentials have access to retrieve the stations. As I think you don't have access to /thirdData/getStationList or /thirdData/stations

I had access 2 days agao, then all of a sudden no more entities provided.

The API call on that URL https://eu5.fusionsolar.huawei.com is giving me that response :
{ "data": null, "success": true, "failCode": 0, "params": {}, "message": null }

from homeassistant-fusionsolar.

Edvliet avatar Edvliet commented on September 26, 2024

Same situation here.
I am working with the openApi. Reinstalling and authorizing to the API is successful, but I do not see any entities.
Prior entitities were not producing any results.
The monitoring of Fusion Solar indicates that the information is send to Huawei

from homeassistant-fusionsolar.

tijsverkoyen avatar tijsverkoyen commented on September 26, 2024

Can 1 of you share their credentials with me. So I can debug it?
You can mail them to fusionsolar-ha [at] verkoyen [dot] eu

from homeassistant-fusionsolar.

Edvliet avatar Edvliet commented on September 26, 2024

from homeassistant-fusionsolar.

Cedric29 avatar Cedric29 commented on September 26, 2024

Can 1 of you share their credentials with me. So I can debug it? You can mail them to fusionsolar-ha [at] verkoyen [dot] eu

Email sent !, check your spam maybe if not received.

from homeassistant-fusionsolar.

tijsverkoyen avatar tijsverkoyen commented on September 26, 2024

I will try to find time next week.

from homeassistant-fusionsolar.

tijsverkoyen avatar tijsverkoyen commented on September 26, 2024

@Cedric29 & @Edvliet

Fusion Solar API debug
======================

→ Testing /login: ✔
→ Testing /getStationList: ❌
 [ERROR] Invalid access to current interface!                                                                           

→ Testing /stations: ❌
 [ERROR] exist resource that are not authorized by the owner.                                                           

You will need to contact your installer, or Fusion Solar Support.

I think there is something misconfigured to your credentials as you don't have access to get a list of the stations. Not for the /getStationList (old endpoint) and not for the /stations endpoint.

from homeassistant-fusionsolar.

tobyknobi avatar tobyknobi commented on September 26, 2024

I am having the same issue here. It stopt during the night then in the morning it was good again. And then a couple of hours later it stopt again.
I think the problem lies with Huawei. Maybe the adres changed or so. I see my credentials are good

from homeassistant-fusionsolar.

3010Mark avatar 3010Mark commented on September 26, 2024

@tijsverkoyen
Een vraagje, welke kan de reden zijn dat er geen verbruik gegevens worden weergeven van de powermeter? Alle andere gegevens van de inverter en batterij worden wel correct weer gegeven.
Meter-1 gegevens

from homeassistant-fusionsolar.

Edvliet avatar Edvliet commented on September 26, 2024

from homeassistant-fusionsolar.

Cedric29 avatar Cedric29 commented on September 26, 2024

@tijsverkoyen
Could you maybe investigate at your side what's going wrong ? A bit of a coincidence that we all have the same issue with the integration ? Has maybe the url changed to get the stationList ?
I always had the issue to get the station list on Postman with the tutorial they wrote. But with your integration, I had the values returned.

from homeassistant-fusionsolar.

CarloDeSutter avatar CarloDeSutter commented on September 26, 2024

If you do the call manually you will be hitting the same issue, so I don't think this is related to how the integration works.
My installer will contact their contacts for this, I propose you all request to do the same.

My guess is that something got changed/updated at the far backend (huawei) as that would explain this sudden change.

from homeassistant-fusionsolar.

tijsverkoyen avatar tijsverkoyen commented on September 26, 2024

Could you maybe investigate at your side what's going wrong ? A bit of a coincidence that we all have the same issue with the integration ? Has maybe the url changed to get the stationList ?
I always had the issue to get the station list on Postman with the tutorial they wrote. But with your integration, I had the values returned.

There are 2 calls getStationList, which is an older endpoint that is not available for newer installations. When this call fails with the Invalid access to current interface-error the stations endpoint is called to retrieve the list of stations. See https://github.com/tijsverkoyen/HomeAssistant-FusionSolar/blob/master/custom_components/fusion_solar/fusion_solar/openapi/openapi_api.py#L58

When the stations call also fails there is no data for the stations.

Feel free to contact Huawei / your installer. If something has changed. Or how exist resource that are not authorized by the owner. should be handled. At this moment I don't have the time to trying to debug it all, as to me the error exist resource that are not authorized by the owner. is something on Huawei their part.

from homeassistant-fusionsolar.

Cedric29 avatar Cedric29 commented on September 26, 2024

@tijsverkoyen
I've contacted the API service of Huawei, here is what they send me without telling me what's the issue ...
SmartPVMS V600R024C10 Northbound Interface Reference-V6 -API(FusionSolar SmartPVMS).pdf

from homeassistant-fusionsolar.

Cedric29 avatar Cedric29 commented on September 26, 2024

Has anyone found a solution ?
Installer giving the ball to Huawei, Huawei only sending the documentation without explaining what's going wrong ...

from homeassistant-fusionsolar.

Edvliet avatar Edvliet commented on September 26, 2024

from homeassistant-fusionsolar.

Cedric29 avatar Cedric29 commented on September 26, 2024

In fact, that documentation is the ‘ old’ documentation wat is already active since 2023. I have not yet got the API working. As Tim said to me, based on the API results it seems that I do not have a station, while the Kiosk of Huawei is working normal..

Op 23 feb 2024, om 09:26 heeft Cédric Vandenberge @.***> het volgende geschreven: Has anyone found a solution ? Installer giving the ball to Huawei, Huawei only sending the documentation without explaining what's going wrong ... — Reply to this email directly, view it on GitHub <#150 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/A652LGTSZQZZLYHHXKWGVHDYVBHCTAVCNFSM6AAAAABDH7OMK2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRQHEYDSMBVHA. You are receiving this because you were mentioned.

Exact, Kiosk solution working, but not enough data provided ...

from homeassistant-fusionsolar.

tobyknobi avatar tobyknobi commented on September 26, 2024

Just a notice. I just saw that the battery data is flowing again

from homeassistant-fusionsolar.

tobyknobi avatar tobyknobi commented on September 26, 2024

Just a notice. I just saw that the battery data is flowing again

Unfortunately after an hour it stopt again. 😔

from homeassistant-fusionsolar.

JohnMcLear avatar JohnMcLear commented on September 26, 2024

I'm getting successful auth but no entities, I'm going to attempt debug now and will come back w/ my findings.

Company and Plant are included in the "Company Management > Northbound" and the usernames are all correct.

I noticed under "Real-time device data" some things weren't selected, it might be that. The same was the case under "Daily device data". These have now been "checked" and I went to remove the hub and re-add it.

I still have "No devices or entities" being display. In the error log I get this

raceback (most recent call last):
  File "/config/custom_components/fusion_solar/fusion_solar/openapi/openapi_api.py", line 55, in get_station_list
    response = self._do_call(url, json)
               ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/fusion_solar/fusion_solar/openapi/openapi_api.py", line 183, in _do_call
    raise FusionSolarOpenApiErrorInvalidAccessToCurrentInterfaceError(json_data[ATTR_MESSAGE])
custom_components.fusion_solar.fusion_solar.openapi.openapi_api.FusionSolarOpenApiErrorInvalidAccessToCurrentInterfaceError: Invalid access to current interface!

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 344, in _async_setup_platform
    await asyncio.shield(task)
  File "/config/custom_components/fusion_solar/sensor.py", line 802, in async_setup_entry
    stations = await hass.async_add_executor_job(api.get_station_list)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/fusion_solar/fusion_solar/openapi/openapi_api.py", line 58, in get_station_list
    return self.stations()
           ^^^^^^^^^^^^^^^
  File "/config/custom_components/fusion_solar/fusion_solar/openapi/openapi_api.py", line 83, in stations
    response = self._do_call(url, json)
               ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/fusion_solar/fusion_solar/openapi/openapi_api.py", line 194, in _do_call
    raise FusionSolarOpenApiError(
custom_components.fusion_solar.fusion_solar.openapi.openapi_api.FusionSolarOpenApiError: Retrieving the data for https://eu5.fusionsolar.huawei.com/thirdData/stations failed with failCode: 20056, message: None

from homeassistant-fusionsolar.

Edvliet avatar Edvliet commented on September 26, 2024

I have looked in the Northbound Document iMaster NetEco V600R023C00 and found maybe something interesting.
Page 7 indicating that interface PlantList is about to go offline (doc is created in 01-2023).
Page 9 indicating that the interface PlantList is modified with mandatory pagination.
Page 162 is the modified interface PlantList is indicating pageNo and pageSize is mandatory.

I cannot run the getStationList, but can previous mandatory change be the problem?
When I execute https://eu5.fusionsolar.huawei.com/thirdData/getstationList
I receive the exceptionInfo: can not find api, please check if the request url is valid or the api has published! url=/thirdData/getstationList"

from homeassistant-fusionsolar.

Edvliet avatar Edvliet commented on September 26, 2024

Hmm, according to the documentation pag 162 the interface getStationList is version depending.
I have version V600R023C00SPC210 and the documentation indicates that I have to use 'station' instead of getStationList.
It seems that I am not authorized for the interface "station"

from homeassistant-fusionsolar.

tijsverkoyen avatar tijsverkoyen commented on September 26, 2024

Just a notice. I just saw that the battery data is flowing again

Unfortunately after an hour it stopt again. 😔

Can you enable debug mode for the integration. I would guess you are running into rate limiting.

Hmm, according to the documentation pag 162 the interface getStationList is version depending. I have version V600R023C00SPC210 and the documentation indicates that I have to use 'station' instead of getStationList. It seems that I am not authorized for the interface "station"

@Edvliet as told in #150 (comment) there is already handling of the getStationList vs stations. But you will need the correct rights. Ask you installer or Huawei to give you access to list the stations.

from homeassistant-fusionsolar.

tobyknobi avatar tobyknobi commented on September 26, 2024

Just a notice. I just saw that the battery data is flowing again

Unfortunately after an hour it stopt again. 😔

Can you enable debug mode for the integration. I would guess you are running into rate limiting.

Hmm, according to the documentation pag 162 the interface getStationList is version depending. I have version V600R023C00SPC210 and the documentation indicates that I have to use 'station' instead of getStationList. It seems that I am not authorized for the interface "station"

@Edvliet as told in #150 (comment) there is already handling of the getStationList vs stations. But you will need the correct rights. Ask you installer or Huawei to give you access to list the stations.

2024-02-03 18:30:44.212 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up fusion_solar platform for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 360, in _async_setup_platform
await asyncio.shield(task)
File "/config/custom_components/fusion_solar/sensor.py", line 802, in async_setup_entry
await add_entities_for_stations(hass, async_add_entities, stations, api)
File "/config/custom_components/fusion_solar/sensor.py", line 157, in add_entities_for_stations
devices = await hass.async_add_executor_job(api.get_dev_list, station_codes)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/fusion_solar/fusion_solar/openapi/openapi_api.py", line 131, in get_dev_list
response = self._do_call(url, json)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/fusion_solar/fusion_solar/openapi/openapi_api.py", line 194, in _do_call
raise FusionSolarOpenApiError(
custom_components.fusion_solar.fusion_solar.openapi.openapi_api.FusionSolarOpenApiError: Retrieving the data for https://eu5.fusionsolar.huawei.com/thirdData/getDevList failed with failCode: 20010, message: None

from homeassistant-fusionsolar.

JohnMcLear avatar JohnMcLear commented on September 26, 2024

Just a notice. I just saw that the battery data is flowing again

Unfortunately after an hour it stopt again. 😔

Can you enable debug mode for the integration. I would guess you are running into rate limiting.

Hmm, according to the documentation pag 162 the interface getStationList is version depending. I have version V600R023C00SPC210 and the documentation indicates that I have to use 'station' instead of getStationList. It seems that I am not authorized for the interface "station"

@Edvliet as told in #150 (comment) there is already handling of the getStationList vs stations. But you will need the correct rights. Ask you installer or Huawei to give you access to list the stations.

FWIW and this is purely for my instance; I am the installer and the end user. I'm happy to make changes/test however in my instance I have gone through and given ALL permissions / access yet still get no entities and experience the error in my previous comment.

from homeassistant-fusionsolar.

tijsverkoyen avatar tijsverkoyen commented on September 26, 2024

@JohnMcLear can you enable debug mode and see what the error is?

from homeassistant-fusionsolar.

JohnMcLear avatar JohnMcLear commented on September 26, 2024

@JohnMcLear can you enable debug mode and see what the error is?

Yes I'll grab it again and post again. Sorry but I thought I already did ;/

from homeassistant-fusionsolar.

JohnMcLear avatar JohnMcLear commented on September 26, 2024

cc @tijsverkoyen

2024-02-24 17:52:22.741 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up fusion_solar platform for sensor
Traceback (most recent call last):
  File "/config/custom_components/fusion_solar/fusion_solar/openapi/openapi_api.py", line 55, in get_station_list
    response = self._do_call(url, json)
               ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/fusion_solar/fusion_solar/openapi/openapi_api.py", line 183, in _do_call
    raise FusionSolarOpenApiErrorInvalidAccessToCurrentInterfaceError(json_data[ATTR_MESSAGE])
custom_components.fusion_solar.fusion_solar.openapi.openapi_api.FusionSolarOpenApiErrorInvalidAccessToCurrentInterfaceError: Invalid access to current interface!

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 344, in _async_setup_platform
    await asyncio.shield(task)
  File "/config/custom_components/fusion_solar/sensor.py", line 802, in async_setup_entry
    stations = await hass.async_add_executor_job(api.get_station_list)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/fusion_solar/fusion_solar/openapi/openapi_api.py", line 58, in get_station_list
    return self.stations()
           ^^^^^^^^^^^^^^^
  File "/config/custom_components/fusion_solar/fusion_solar/openapi/openapi_api.py", line 83, in stations
    response = self._do_call(url, json)
               ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/fusion_solar/fusion_solar/openapi/openapi_api.py", line 194, in _do_call
    raise FusionSolarOpenApiError(
custom_components.fusion_solar.fusion_solar.openapi.openapi_api.FusionSolarOpenApiError: Retrieving the data for https://eu5.fusionsolar.huawei.com/thirdData/stations failed with failCode: 20056, message: None
2024-02-25 11:56:34.597 DEBUG (SyncWorker_15) [custom_components.fusion_solar.fusion_solar.openapi.openapi_api] JSON data for https://eu5.fusionsolar.huawei.com/thirdData/getStationList: {'data': None, 'failCode': 401, 'message': 'Invalid access to current interface!', 'params': {}, 'success': False}
2024-02-25 11:56:34.597 DEBUG (SyncWorker_15) [custom_components.fusion_solar.fusion_solar.openapi.openapi_api] Could not use getStationList, trying stations: Invalid access to current interface!
2024-02-25 11:56:34.847 DEBUG (SyncWorker_15) [custom_components.fusion_solar.fusion_solar.openapi.openapi_api] JSON data for https://eu5.fusionsolar.huawei.com/thirdData/stations: {'data': None, 'failCode': 20056, 'message': 'exist resource that are not authorized by the owner.', 'success': False}
2024-02-25 11:56:34.847 DEBUG (SyncWorker_15) [custom_components.fusion_solar.fusion_solar.openapi.openapi_api] Error calling https://eu5.fusionsolar.huawei.com/thirdData/stations: None, failcode: 20056

from homeassistant-fusionsolar.

tijsverkoyen avatar tijsverkoyen commented on September 26, 2024
custom_components.fusion_solar.fusion_solar.openapi.openapi_api.FusionSolarOpenApiError: Retrieving the data for https://eu5.fusionsolar.huawei.com/thirdData/stations failed with failCode: 20056, message: None

The error indicates that you don't have any stations. Or you don't have access to any stations.

from homeassistant-fusionsolar.

JohnMcLear avatar JohnMcLear commented on September 26, 2024

image

image

image

image

Can I provide any other screenshots that might help?

from homeassistant-fusionsolar.

tijsverkoyen avatar tijsverkoyen commented on September 26, 2024

I'm not an installer, and I don't have access to an installer interface. So I would not know what to look for.

But I remember a PR for https://github.com/tijsverkoyen/HomeAssistant-FusionSolar?tab=readme-ov-file#device-data. Where that person told that you need to click open the different items and give access on the subitems.

What happens if you click on the plus on the left side off "Plant list"?

from homeassistant-fusionsolar.

JohnMcLear avatar JohnMcLear commented on September 26, 2024

I'm not an installer, and I don't have access to an installer interface. So I would not know what to look for.

But I remember a PR for https://github.com/tijsverkoyen/HomeAssistant-FusionSolar?tab=readme-ov-file#device-data. Where that person told that you need to click open the different items and give access on the subitems.

What happens if you click on the plus on the left side off "Plant list"?

You get "Selected company and Selected plant", both of which are populated as per this image:

image

This already tricked me once which is why I sent the screenshot initially ;)

The PR refers more to this selection item to ensure all sub items are selected as per the below image:

image

from homeassistant-fusionsolar.

JohnMcLear avatar JohnMcLear commented on September 26, 2024

FWIW I'm happy to jump on a quick screen share via whatever mechanism if you want to have a look at my installer UI and see if we're missing something obvious? john splat mclear dot co dot uk if you want to contact me directly.

from homeassistant-fusionsolar.

tijsverkoyen avatar tijsverkoyen commented on September 26, 2024

In that case I don't see why the Api would return no stations. And I would think it is an issue in the Huawei API.

I don't know if you are able to work with curl? But could you try this:

curl --location 'https://eu5.fusionsolar.huawei.com/thirdData/login' 0i \
--header 'Content-Type: application/json' \
--data '{
    "userName": "XXX",
    "systemCode": "XXX"
}'

This will return output include a header xsrf-token, you will need that value for the next request.

curl --location 'https://eu5.fusionsolar.huawei.com/thirdData/getStationList' \
--header 'XSRF-TOKEN: XXX' \
--header 'Content-Type: application/json' \
--data '{}'

I would assume this fails.

curl --location 'https://eu5.fusionsolar.huawei.com/thirdData/stations' \
--header 'XSRF-TOKEN: XXX' \
--header 'Content-Type: application/json' \
--data '{
    "pageNo": 1,
    "pageSize": 100
}'

I would assume this also fails, or gives an empty data attribute.

from homeassistant-fusionsolar.

JohnMcLear avatar JohnMcLear commented on September 26, 2024

Yeah I'm comfortable with curl and postman. I'll get on with this tonight and report back. One hour or so.

from homeassistant-fusionsolar.

JohnMcLear avatar JohnMcLear commented on September 26, 2024
jose@ryzin:~$ curl --location 'https://eu5.fusionsolar.huawei.com/thirdData/login' 0i --header 'Content-Type: application/json' --data '{
    "userName": "XXX",
    "systemCode": "XXX"
}'
{"data":null,"success":true,"failCode":0,"params":{},"message":null}curl: (6) Could not resolve host: 0i
jose@ryzin:~$ 

Note that the message is null...

This curl command doesn't output headers, I took some digging in headers and found the token..

jose@ryzin:~$ curl --location 'https://eu5.fusionsolar.huawei.com/thirdData/getStationList' \
--header 'XSRF-TOKEN: XXX' \
--header 'Content-Type: application/json' \
--data '{}'
{"data":null,"failCode":401,"message":"Invalid access to current interface!","params":{},"success":false}

#68 (comment) feels useful

from homeassistant-fusionsolar.

tijsverkoyen avatar tijsverkoyen commented on September 26, 2024

from homeassistant-fusionsolar.

eyk107 avatar eyk107 commented on September 26, 2024

I had the same issue but in "Kiosk"-mode. I had to grep a new kiosk-url from the website and everything is working again.

from homeassistant-fusionsolar.

JohnMcLear avatar JohnMcLear commented on September 26, 2024

I had the same issue but in "Kiosk"-mode. I had to grep a new kiosk-url from the website and everything is working again.

I'm not using the kiosk URL tho @eyk107 - I'll give it a go but I'm not sure how it could make a difference

from homeassistant-fusionsolar.

eyk107 avatar eyk107 commented on September 26, 2024

It was just an information. It seems to me that Huawei changed something so I need to update the Kiosk-url. Maybe you also need to update any urls in the API-method

from homeassistant-fusionsolar.

JohnMcLear avatar JohnMcLear commented on September 26, 2024

second request

{"data":null,"failCode":401,"message":"Invalid access to current interface!","params":{},"success":false}jose@ryzin:~$ 

third request

{"data":null,"failCode":20056,"message":"exist resource that are not authorized by the owner.","success":false}

One thing I did notice is this message "Before providing the northbound account, ensure that the northbound user has been authorized by the owner".. I'm the installer and not seeing any request to authorize the user...

The Developer Guide for northbound link doesn't work for me: https://support.huawei.com/enterprise/en/doc/EDOC1100339287 -- this is from the fusion solar page... FML

I've bumped Huawei via email.

Also I found this: https://forum.huawei.com/enterprise/en/API-user-error-on-Northbound/thread/760952027177500672-667213868771979264

Same problem dated 4 days ago.....

from homeassistant-fusionsolar.

tobyknobi avatar tobyknobi commented on September 26, 2024

Huawei
I just received this from Huawei.

from homeassistant-fusionsolar.

Cedric29 avatar Cedric29 commented on September 26, 2024

Huawei I just received this from Huawei.

I also received it
I don't have an installer account, so can't modify those settings...

from homeassistant-fusionsolar.

tijsverkoyen avatar tijsverkoyen commented on September 26, 2024

@Cedric29 try to contact your installer?

from homeassistant-fusionsolar.

Cedric29 avatar Cedric29 commented on September 26, 2024

@Cedric29 try to contact your installer?

As already mentionned, they're are giving the ball to Huawei, which is giving the ball to installer ... So noone can solve that issue ...

from homeassistant-fusionsolar.

tobyknobi avatar tobyknobi commented on September 26, 2024

from homeassistant-fusionsolar.

JohnMcLear avatar JohnMcLear commented on September 26, 2024

Huawei I just received this from Huawei.

I don't get the option to "Set permissions" on the plant management page.. I'm the installer... Anyone else not seeing this option?

from homeassistant-fusionsolar.

JohnMcLear avatar JohnMcLear commented on September 26, 2024

Looks like "installers" can't change permissions, only "owners" can..

Ref: https://uni003eu5.fusionsolar.huawei.com/hedex/hedex.do?lib=monitoring&pidid=pid_neteco&topicid=CONCEPT_0000001605656680&locale=en-us vs https://uni003eu5.fusionsolar.huawei.com/hedex/hedex.do?lib=monitoring&pidid=pid_neteco&topicid=CONCEPT_0000001605785438&locale=en-us

from homeassistant-fusionsolar.

alessandrozannini avatar alessandrozannini commented on September 26, 2024

image

from homeassistant-fusionsolar.

JohnMcLear avatar JohnMcLear commented on September 26, 2024

Turns out I was not the "plant owner" but the "company administator"

I created a new user who was a "plant owner" and I got the access to enable API.

On Web:
Plant -> Plant Management -> Select the plant – click on the symbol indicated in the print screen below:
image

from homeassistant-fusionsolar.

JohnMcLear avatar JohnMcLear commented on September 26, 2024

And after a remove and re-add I see all the entities :) Nice!

from homeassistant-fusionsolar.

Edvliet avatar Edvliet commented on September 26, 2024

from homeassistant-fusionsolar.

tijsverkoyen avatar tijsverkoyen commented on September 26, 2024

@Edvliet I don't know what the real solution is. But everyone has tried several things.
So I suggest: check the comments above and try the different things they did.

If you feel like I have closed the issues to soon, feel free to reopen the issue. Please mention all things you tried.
But to be honest: I suspect it is a Huawei issue.

from homeassistant-fusionsolar.

Edvliet avatar Edvliet commented on September 26, 2024

from homeassistant-fusionsolar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.