CharlesGillanders / homeassistant-alphaESS

Monitor your energy generation, storage, and usage data using the official API from Alpha ESS.
MIT License
101 stars 22 forks source link

Missing EV charger power and state #141

Open farmer1969 opened 3 weeks ago

farmer1969 commented 3 weeks ago

Hello Charles,

I'm missing the actual EV charger power along with charger state like:

image

Is that something you could potentially implement?

Thanks, Frank

CharlesGillanders commented 3 weeks ago

The Alpha OpenAPI at https://open.alphaess.com/developmentManagement/apiList does have getEvChargerStatusBySn which returns the charger state, there's also getEvChargerCurrentsBySn - does that return the power metric that you are looking for?

I don't have either of those currently used in my python library, I don't have a charger to test with but if you would be open to volunteering to do some testing I'm sure that I could add both of them relatively easily.

farmer1969 commented 3 weeks ago

Certainly I could help here as I have an AlphaESS Charger type 'SMILE-EVCT11'. And I have experience in using the ioBroker adapter provided by Gaspode69 at https://github.com/Gaspode69/ioBroker.alpha-ess/tree/main . Since version 1.3.0 this is supporting the wallbox based on OpenAPI.

Poshy163 commented 3 weeks ago

Heya man, I also don't personally don't have an EV, so if you can give me some of the responses from the API from those either Charles or I can hook it up to the current PR I'm working on and add it in

farmer1969 commented 3 weeks ago

I will see whether I can work on it on Sunday. Today, no chance...

Rasenkardinal commented 2 weeks ago

This would be really great! I am happy to help with testing if necessary.

farmer1969 commented 2 weeks ago

Hi @CharlesGillanders, @Poshy163, I almost forgot that I provided the details (response from OpenAPI) some time back already to Gaspode69 in Storion4You forum. Based on the information available here he implemented the EV charger in the ioBroker AlphaESS adapter. Would this information be sufficient? I guess so. If required I would translate that from German to English but Google Translator should do was well ;-)

Poshy163 commented 1 week ago

Cheers for that @farmer1969 so the only data you are looking at using is stuff like this?

getEvChargerConfigList: ---->code - 200 ---->msg - "Success" ---->expMsg - null ---->data - [{"evchargerSn":"ALP202xxxxxxxxx","evchargerModel":"SMILE-EVCT11"}] getEvChargerCurrentsBySn: ---->code - 200 ---->msg - "Success" ---->expMsg - null ---->data - {"currentsetting":32} getEvChargerStatusBySn: ---->code - 200 ---->msg - "Success" ---->expMsg - null ---->data - {"evchargerStatus":1}

farmer1969 commented 1 week ago

Not really, I think I should extend the information...

Please refer to the script in #13. This covers most use cases I believe, meaning all relevant ev-charger APIs.

As there are (refer to https://open.alphaess.com/developmentManagement/apiList):

Based on the script from #13 I shared in #24 the results, including start/stop charging.

All that shall be provided through the AlphaESS integration for use through HA.