tijsverkoyen / HomeAssistant-FusionSolar

Integrate FusionSolar into your Home Assistant.
MIT License
133 stars 25 forks source link

New API calls #83

Closed reyntjensw closed 1 year ago

reyntjensw commented 1 year ago

Hi

I came across this post https://github.com/tijsverkoyen/HomeAssistant-FusionSolar/issues/68#issuecomment-1450406343 and I am working on a similar integration for the Homey platform (https://github.com/reyntjensw/Homey-FusionSolar), where I am running into the same issue.

Some users are not able to use the plugin, because their account is to new.

What I was wondering is do you already have a use case for the api call getDevHistoryKpi, I am not finding any examples online nor in the code base. Or did you get any feedback from Huawei?

Thanks in advance.

tijsverkoyen commented 1 year ago

Never got a decent response. Only some helpdesk person that did not know what he was talking about

I altered my code in https://github.com/tijsverkoyen/HomeAssistant-FusionSolar/pull/78/files to call the new endpoint if the “old” one fails.

reyntjensw commented 1 year ago

Hi @tijsverkoyen thanks for the update. I have the same feeling regarding Huawei support.

I tried some things but I was noticing that no data was coming in via the getDevRealKpi, did you find a workaround for this call?

tijsverkoyen commented 1 year ago

I should look into it. I don’t know for sure if I use that call in the integration. But I am on my phone at the moment. But I will check later

tijsverkoyen commented 1 year ago

@reyntjensw I was wrong. The integration does use getDevRealKpi but not getDevHistoryKpi. I did not got any complaints (yet) that getDevRealKpi is not returning any data.

I think the best approach is to get in touch with Huawei support. Keep me posted please!

tijsverkoyen commented 1 year ago

@reyntjensw any update on this issue. Feel free to reopen this issue is you get any news.

reyntjensw commented 1 year ago

Hi @tijsverkoyen just fyi I am looking at this https://github.com/jgriss/FusionSolarPy/tree/main. At the moment I am getting a lot of support requests regarding the API and in my opinion it's not worth it.

If I can translate the FusionSolarPy to node and get it working, I'll migrate everything to that.

tijsverkoyen commented 1 year ago

See https://github.com/tijsverkoyen/HomeAssistant-FusionSolar/blob/master/custom_components/fusion_solar/fusion_solar/openapi/openapi_api.py and https://github.com/tijsverkoyen/HomeAssistant-FusionSolar/blob/master/docs/postman_collection.json

reyntjensw commented 1 year ago

Thank you for the links. The issue where I am running into is that at random times I get a 305 error, even tho, the session is still valid.

For most people the integration is working but is sometimes stuck for a unknown reason. A lot of users also have issues with their api key that is expired or not setup correctly. (that is why I want to get rid of it)

tijsverkoyen commented 1 year ago

I know the feeling ;-)