cathiele / homeassistant-goecharger

Home Assistant custom_component for controlling the go-eCharger EV-Charger
MIT License
89 stars 29 forks source link

Switch to API v2 #40

Open Jpsy opened 3 years ago

Jpsy commented 3 years ago

My go-e offers a new API v2 (/api/status). It would be great to use that API instead of the v1 version (/status). e-go states that the new API reveals more information and is is surely the one that will be subject to further development. I am not sure though whether the existence of the v2 API depends on hardware or firmware versions. Mine are: Hardware V3, firmware 050.2 (as stated in the app).

Screenshot_20210624-124612~2

cathiele commented 3 years ago

Screenshot_20210624-140003 ... My charger has only the V1 API so i will not be able to Support V2.

Maybe you can provide a PR without breaking V1 only chargers

NatroNx commented 2 years ago

Got my go-e charger today and everything seems to work fine with your integration. Thanks for that.

A crucial thing seems to be missing in APIv1 for me next trip planned charging - this would return

{"atp":{"utc":"2022-01-08T05:55:00.000","local":"2022-01-08T06:55:00.000 +01:00","neededTime":"00:08:44","remainingTime":"05:47:21","notEnoughActivated":false,"prices":[]}}

and I also want to set it - how can I help to get v2 working with this awesome integration?

klacol commented 2 years ago

I have bought a new go echarger V3 on eBay that supports the new API (v2). The new charger can charge with max 11 kW. Since that is the maximum that my car can support it is ok for me. The "old" charger will be sold on eBay. This can be interesting for cars that can support 22 kW.

The reason for me to make this downgrade is, that I want to have better support for pv-based charging. I realized finally, after 75 Tkm Tesla M3 and 18 month with my solar panels, what the difference between 1-phase and 3-phase is :-).

When I want to start the pv-based charging early in the morning, when the sun is still rising, the minimum of 6 Amps with 3-phases is to much load for my solar system. So I need to switch to 1-phase to start the charging only with solar power. When the sun rises, I change to higher amps and switch then again to 3-phases with 6 Amps. And then towards noon I can go up to 10 Amps with 3-phase.

Long story short; I have now a new charger and could help to work on the integration of V3. My Ideas of the feature set woul be:

  1. Check all existing functions against the V3
  2. Add the information about the phases (1-phase, 2-phase, 3-phase)
  3. Change the phase via HA

@cathiele : I do not want to introduce breaking changes. What would be your idea to organize this? How would the testing procedure look like?

cathiele commented 1 year ago

i can not test the functions as i don't own a v2/v3 charger. First of all the python api (http://github.com/cathiele/goecharger) must support the additional features. maybe you can fork that repo and integrate the v3 api functions?

i think the integration then needs a option for setting the charger api version.