dehsgr / node-red-contrib-alphaess

This provides a node for retrieving information from Alpha ESS photovoltaic systems.
ISC License
14 stars 0 forks source link

Discussion about official API for Alpha AESS Cloud Customers #8

Closed dehsgr closed 1 year ago

dehsgr commented 2 years ago

For not further highjacking this discussion I would like to involve @ElevenFan here too for API requirements. Thanks for your contribution and your offer for an official customer API. I would really appreciate it an open customer API. I think this would bring a lot of projects straight forward for the whole community.

This project currently uses/requires the following API endpoints:

I'm open for any constructive discussion with Alpha ESS development team for getting those things up and flying.

ElevenFan commented 2 years ago

GetSecondDataBySn=GetLastPowerDataBySN

dehsgr commented 2 years ago

That sounds strange to me because GetLastPowerDataBySN is the "backup path" for requesting data within this project. Is this the more preferred or common way from your site to use? GetSecondDataBySn seems to not work on all systems.

ElevenFan commented 2 years ago

Last year GetSecondDataBySn was used for real-time power

dehsgr commented 2 years ago

So am I right that GetSecondDataBySn is deprecated and shouldn't be used further?

Thanks a lot for working together with me! I really like it!

ElevenFan commented 2 years ago

Yes,Now I didn't delete this code,The reason why I added the signature is that there are many people requesting millions of times at the same time

dehsgr commented 2 years ago

Ok. I see. So there was too much load on your systems, I think. Am I right? Maybe there should be implemented a query limit per second/minute/hour per connection? This would prevent such heavy loads. I think often people query data too often.

I think fetching realtime data every 5 secs. should be enough (this is what this project uses as default and IMHO the cloud portal does too). For statistical data 1 to 10 minutes should be enough (I poll them every 10 minutes).

Do you agree?

I'll remove the code for GetSecondDataBySn ASAP.

ElevenFan commented 2 years ago

GetLastPowerDataBySN you can request once in 10S

dehsgr commented 2 years ago

I just published an update reflecting your requirements and suggestions.

dehsgr commented 2 years ago

@ElevenFan am I right that upcoming update on 19th of November won‘t change sign key as the previous one (no anti-crawl updates)? So we can expect our projects will be running after the update?

ElevenFan commented 2 years ago

Yes,This update will only add the energy storage function

dehsgr commented 2 years ago

Related: https://github.com/alphaess-developer/alphacloud_open_api/issues/1

Thanks at the Alpha ESS Team!

vantech14 commented 2 years ago

@dehsgr I'm so happy to see this. I have over the last week put pressure on the Alpha UK office and also China directly for an API and didn't get a positive response so this is good to see.

Will we have the ability to stop and start charging from grid, or is this a read only API?

Thanks.

dehsgr commented 2 years ago

@vantech14 what features will be there in future I cannot tell you. It is the decision of Alpha ESS at all. But feel free to contribute with your ideas directly at https://github.com/alphaess-developer/alphacloud_open_api/.

If you open the link you'll see there is a planned call for named "setChargingBySn". It might reflect your needs.

ElevenFan commented 2 years ago

@vantech14 stop and start charging from grid This Api is Professional interface,It is provided to VPP company. If the end user does not use it properly, it will cause equipment failure。

Z0472 commented 2 years ago

Yes,This update will only add the energy storage function

I am not sure if it works after update alpha cloud 19.11. In debug log is: There was an error during fetching Alpha ESS Signature Key: We got an unexpected body.

We got the following body: (window.webpackJsonp=window.webpackJsonp||[]).push([["app"],{"/fHe":function(e,t,r){},"0Fbn":function(e,t,r){"use strict";r.r(t);var a=r("4BeY"),A=r.n(a),i=r("IaFt"),n=r.n(i),o=new A.a({id:"icon-people",use:"icon-people-usage",viewBox:"0 0 128 128",content:'<path d="M104.185 95.254c8.161 7.574 13.145 17.441 13.145 28.28 0 1.508-.098 2.998-.285 4.466h-10.784c.238-1.465.403-2.948.403-4.465 0-8.983-4.36-17.115-11.419-23.216C86 104.66 75.355 107.162 64 107.162c-11.344 0-21.98-2.495-31.22-6.83-7.064 6.099-11.444 14.218-11.444 23.203 0 1.517.165 3 .403 4.465H10.955a35.444 35.444 0 0 1-.285-4.465c0-10.838 4.974-20.713 13.127-28.291C9.294 85.42.003 70.417.003 53.58.003 23.99 28.656.001 64 .001s63.997 23.988 63.997 53.58c0 16.842-9.299 31.85-23.812 41.673zM64 36.867c-29.454 0-53.33-10.077-53.33 15....

vantech14 commented 2 years ago

@vantech14 stop and start charging from grid This Api is Professional interface,It is provided to VPP company. If the end user does not use it properly, it will cause equipment failure。

Thanks, will there be the ability to adjust charging times etc from the API? So if we can't force grid charge, can we adjust the scheduling?

ElevenFan commented 2 years ago

Yes, Set Charging Time Api and Set DisCharging Time Api are open。

ElevenFan commented 2 years ago

Please Wait a month,I will release this project。

vantech14 commented 1 year ago

@ElevenFan hope all is well. I see the Alpha cloud has been updated recently, has there been any movement on the API? 😀

ElevenFan commented 1 year ago

The platform developers have started work, the Api platform has been developed, and now I am writing documents and translations. Next, I will invite you to participate in the internal test, but now the Chinese New Year is coming, and it is expected to be around mid-February。

dehsgr commented 1 year ago

Because Alpha ESS Open API begins flying I'll close here for now. @ElevenFan thank you so much for your work and time spent on this.

I hope the missing statistics requested here will get implemented soon. So I would be able to switch over to Open API branch ASAP.