-
-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
getStationList deprecated? #68
Comments
I don't know of this is something specific for the Australian market or not. |
@arohl Is you would be so kind to email ( |
Done! |
@arohl From what I can see the documentation is completely different. The calls also return data in a completely different format. So I don't think it will be a simple fix. {
"data": {
"list": [],
"pageCount": 1,
"pageNo": 100,
"pageSize": 100,
"total": 1
},
"failCode": 0,
"message": "get plant list success",
"success": true
} |
Nm. I should use pageNo: 1 |
Interesting - I thought pageNo was mandatory and so would give an error if you didn't include it. |
Do you have a batter and power sensor installed? |
It seems like getStationList is deprecated for certain devices. I don't know if the check is any good. Probably it would be better to have some sort of selector in the config flow that let the user decide if `thirdData/stations` or `thirdData/getStationList` should be used... This should fix #68
I certainly have a battery, so I guess I don’t have access. I can see the battery on the app. Can you please let me know what call you tried.
Andrew
From: Tijs Verkoyen ***@***.***>
Date: Tuesday, 28 February 2023 at 8:48 pm
To: tijsverkoyen/HomeAssistant-FusionSolar ***@***.***>
Cc: Andrew Rohl ***@***.***>, Mention ***@***.***>
Subject: Re: [tijsverkoyen/HomeAssistant-FusionSolar] getStationList deprecated? (Issue #68)
Do you have a batter and power sensor installed?
I don't get any data back for these devices. This is probably because they are not installed, or you don't have access
—
Reply to this email directly, view it on GitHub<#68 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ACTZWLDE5ERA7BCEBLJWIGTWZXXZTANCNFSM6AAAAAAVIMQU2Y>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
I will tag a release which should fix the issue. |
Are there simple instructions for how I install a tagged release so I can test? |
I just tagged the new release, So you can update the repository through HACS, or just wait a few hours until the version pops up in Home Assistant. |
Thx! Really appreciated! |
@arohl about the empty data for the Battery: curl --location 'https://au5.fusionsolar.huawei.com/thirdData/getDevRealKpi' \
--header 'XSRF-TOKEN: x-REDACTED' \
--header 'Content-Type: application/json' \
--data '{
"devIds": "1000000033759325",
"devTypeId": "39"
}' It responds with empty data: {
"data": [
{
"devId": 1000000033759325,
"dataItemMap": {},
"sn": "null"
}
],
"failCode": 0,
"message": null,
"params": {
"currentTime": 1677590785939,
"devIds": "1000000033759325",
"devTypeId": 39
},
"success": true
} For the Inverter it gets data: curl --location 'https://au5.fusionsolar.huawei.com/thirdData/getDevRealKpi' \
--header 'XSRF-TOKEN: x-REDACTED' \
--header 'Content-Type: application/json' \
--data '{
"devIds": "1000000033759324",
"devTypeId": "1"
}' |
Hope its enough for a G&T in Europe! Its getting late here, so I'll update the easy way in the morning and get in touch with Huawei |
I will enjoy it for sure! |
Hi, if the response is empty just ask your installer to set correct permissions. Had the same issue and installer forgot to set the rigth permissions. After that all the data will show. |
This doesn't affect just AU, it is likely to affect all endpoints (Can confirm on intl. as well) - In fact, I wrote almost the same code as you to fix it, but have now pulled across your changes. The reference is here: https://support.huawei.com/enterprise/en/doc/EDOC1100261860/e2cc6ca3/to-be-offline-interfaces Basically, my understanding is this:
If this was C# I could fix it in a flash :). However, I'm willing to test/poke my own code in there for review as nobody judges too harshly. I'd probably attack it in such a way that if /getStationList returns the error, attempt /stations. It's a little more work, but it ensures the result works for everyone. Alternatively, a toggle in the settings to "Use the new interfaces" or something. |
@aretokas thx! I have contacted Huawei to see if there is way to programmatically decide which endpoint to use. Or how the user can check which endpoint to use. |
I emailed them and all sorted. Now just need to figure out what all the numbers mean! |
@arohl The integration is programmed against the docs you can find in https://github.com/tijsverkoyen/HomeAssistant-FusionSolar/tree/master/docs. All names for the entities are the ones used in the documentation. |
@tijsverkoyen here is the error it returns if you try to access it if you haven't seen it:
I feel like the easiest flow would be, try the original endpoint, and if you receive this error, try the new one. If that then works, flip a toggle in the background for the user so you skip the first check from that point onwards. I certainly couldn't find any other way of identifying whether it was going to work or not. Not in their documentation and not with my stuffing around with the API and permissions etc. I'll be curious to know what they say. |
That would probably the way to go, or a setting. But if they can tell me how to decide it programmatically it would mean less useless calls |
Just an update: They're not really helpful at Huawei / Fusion Solar. |
I received a response from my provider: Translated: I am aware that maintenance is being carried out on the FusionSolar platform and that this function is temporarily unavailable. The provider has no further influence on this. So it seems that we have to wait until the maintenance is resolved... |
I am in Australia and using the API at https://au5.fusionsolar.huawei.com/thirdData/
The integration authenticates fine but fails when it calls getStationList. The log says
I have a document from Huawei titled Northbound Interface Reference- V6(SmartPVMS) and dated 19th January 2023 which says:
and that the new function is
Using Postman, I can confirm that getStationList doesn't work (with not surprisingly the same error code as the integration reports) and that stations does return a plantCode.
Is this a uniquely Australian situation? Or are they perhaps trying the updated API on us first?
The text was updated successfully, but these errors were encountered: