Goecharger-api2 - Control your go-eCharger Wallbox directly via the API v2 [Gemini/flex, HOMEfix & other]

After I have provided integrations for tibber (pulse local), waterkotte heatpump’s and SENEC.Home Systems I have developed another Integration in order to support my new go-eCharger Gemini-flex.

I was not able to find a go-eCharger integration that communicate directly via the HTTP API v2 and offer support for all the different ‘api-keys’ that are documented by go-e in GitHub. So instead of ‘complaining’ I have used the free day here in Germany to finish an (initial) release of the ‘goecharger-api2’ integration that I want to share with you.

Requirements

  • go-eCharger running Firmware 56.1 [I have developed it with 56.2 BETA]
  • enabled HTTP API v2 (via go-eCharger App)

Key Features

  • Most of the documented fields [in the official go-eCharger GitHub repository] are supported by this integration (only 27 of 172 are not included yet) [see list of currently not handled API keys]

  • Easy support for ‘PV surplus charging’ (PV-Überschuss Laden) without additional hardware. In order to use this feature just a small additional manual setup process is required [details can be found @github]

  • For all go-eCharger (status) fields that support a numeric status code, this code is available as separate sensor

  • Multilanguage support: a German translation included (any feedback highly appreciated!) & looking forward to other language contributions

  • Hibernation-Mode: only request sensor data from wallbox when system is in use [details can be found @github]

    Please note that the configuration data will be read only every 24hours from the hardware (to save data) - but you can update the sensors any time with an ‘update’ button.

  • Owners of a 22kW variant can force 16A only for all relevant settings. (This can be enabled via the integration settings and require a restart of the integration - then with every restart the settings will be inspected and adjusted to a max of 16A if required)

Known Issues

  • This is a custom HACS Integration, so you have to add the repository manually to your HACS before you can install it
  • No Integration Icon (yet) - still waiting that my PR for the brand’s repository will be merged

Your feedback is highly appreciated - specially the German translation could be improved - feel free to start a PR with your suggestions - TIA

2 Likes

Sounds great! Does it automatically switch between 1 phase and 3 phase charging?

IMHO this is a feature of the firmware of the Wallbox itself - you can adjust different thresholds when the box will switch from 1p o 3p and vice versa - IMHO there is no need to actively switch by the integration itself.

Just wanted to thank you for the invested time and labor, @marq24! I´m switching over from a really old V1 hardware go-e Charger to a Gemini Flex the next days :slight_smile:

Thanks for your integration, there is only one issue i don’t quite understand:

when using PV surplus charging → feeding in the current battery charge/dicharge rate seems useless. if the pv power drops the battery charge rate will drop as well based on the grid meter data faster as the charger / ha can detect. so on the next update the battery charge power will be lower but the car will keep charging.

So if we would like to have a different priority of use (base load of house > battery > car) we would need to factor in the current state of the battery and the maximum charge power.

Any thoughts on that?

Thank for this integration using the HTTP API. There is also a MQTT integration. What’s the point to prefer the HTTP API?

1 Like

I did not spend any thoughts on priority loading (for home battery)…

In order to define & control PV surplus priorities in my HA setup - I use GitHub - InventoCasa/ha-advanced-blueprints: Advanced Blueprints combined with pyscript for extra useful automations - E.g. via this blueprint I enable the pool pump & heating, the water pump for the garden or higher the temperature of the hot water… It should be no big deal to add an additional switch to enable/disable PV car charging [just like other PV consuming devices in my home]. This blueprint also takes a home battery & loading state into account and allow you to define priorities between the different consumers.

as already said elsewhere - when you are happy with the MQTT based Integration (and you have all entities you need there) then please continue to use it… But to answer your question “what’s the point?” → the MQTT API does not offer the same amount of API-keys then the HTTP based API - at least that’s what I read from the docs @ go-e…

1 Like

Thank you for this explanation !

Strange thing: I imported the repo in HACS but the UI doesn’t show it:


any idea why so?

Thanks in advance!

@Woody_HomeAss - sorry no clue what could be the root cause of this - from the error message I would say, that HACS think, that the Integration is already part of the default HACS store - but this is for sure not the case…

What you can do as workaround is to install the integration manually (via git clone)… Sorry but I do not have a single clue what could be the root cause of your error

Thanks for the integration!
somehow however my go-e charges with home battery power aswell. I’ve read that you use a custom blueprint in your integration. Can you guide me on how to change the values of that?
I did a helper to calculate the power in the powermeter, so the automation looks like this:

      pgrid: "{{states('sensor.powermeterleistungshelfer')|float*-1}}"
      ppv: "{{states('sensor.inverter_eingangsleistung')}}"
      pakku: "{{states('sensor.battery_lade_entladeleistung')}}"

while the powermeterleistungshelfer is a helper that adds the power of each phase from the smartmeter. PV is huawei SUN2000 with LUNA2000 ant DTSHU-666

Hi @Cillian,

I am not sure which ‘custom blueprint’ you are referring? In any case there are ongoing discussion @ my github repro about the ‘home battery usage’ and how to avoid this → How does sensor.goe_xxx_pvopt_averagepgrid get calculated? · marq24/ha-goecharger-api2 · Discussion #3 · GitHub

My current observation is, that beside the possible go-eCharger settings it might be smart to check if battery is in use (export power from battery), to substract this battery usage from data you send as ‘pgrid’ input (and do not privide pakku at all) - but this is currently all just fishing in the dark - IMHO go-eCharger Dev team is working hard to get the best solution (when we provide appropriate data)…

Thanks for your reply. I was referring to post #5. If i now read it a seconds time i understand it differently, at first I thought your integration uses this blueprint in the background.

ok - I just clarified my #5 post, so that’s hopefully easier to understand - thanks for your feedback

Thanks for your answer! in the meantime i built some automations myself based on the entities of your integration. I kept it quite simple (only one phase charging as my PV does not generate more that 4kW surplus) and fitted it to my needs / sensors (multiplus II / em540). Maybe it helps somebody with the same issue:

service: number.set_value
target:
  entity_id: number.goe_257731_amp
data:
  value: |-
    {% if states('sensor.victron_vebus_state_228') == 'ABSORPTION' %}
      {% if ((states('sensor.em540summary')  | float * -1 + states('sensor.goe_257731_nrg_11') | float) / 240) < 6 %}
        {{6 | float | round(0) }} 
      {% else %}
        {% if ((states('sensor.em540summary')  | float * -1 + states('sensor.goe_257731_nrg_11') | float) / 240) > 16 %}
          {{ 16 | float | round(0)}}
        {% else %}
          {{ ((states('sensor.em540summary')  | float * -1 + states('sensor.goe_257731_nrg_11') | float) / 240) | round(0) }}
        {% endif %}
      {% endif %}
    {% else %}
      {% if (((((states('sensor.em540summary') | float * - 1) - 2000 + states('sensor.goe_257731_nrg_11') | float) + states('sensor.victron_system_bus_charge_power') | float) / 240) | round(0)) < 6 %}
        {{6 | float | round(0) }} 
      {% else %}
        {% if (((((states('sensor.em540summary') | float * - 1) - 2000 + states('sensor.goe_257731_nrg_11') | float) + states('sensor.victron_system_bus_charge_power') | float) / 240) | round(0)) > 16 %}
          {{ 16 | float | round(0)}}
        {% else %}
          {{ (((((states('sensor.em540summary') | float * - 1) - 2000 + states('sensor.goe_257731_nrg_11') | float) + states('sensor.victron_system_bus_charge_power') | float) / 240) | round(0)) }}
        {% endif %}
      {% endif %}
    {% endif %}