Integration of goe-charger (in local wifi)

Hi all, out there.

Proud to share my working version of a goe-charger into HA

Corrected wrong value_templates now :slight_smile:

#charging station
  - platform: rest
    resource: http://your.ip.in.wifi/status
    scan_interval: 30
    name: "ladestation"
    value_template: "{{ value_json['car'] }}"
    json_attributes:
      - car
      - err
      - eto
      - tmp
      - dws
      - nrg
  - platform: template
    sensors:
      charger_status_pwm:
        friendly_name: 'Status'
        value_template: >-
          {% if is_state_attr('sensor.ladestation', 'car', '1') %}
            Ladestation bereit, kein Fahrzeug
          {% elif is_state_attr('sensor.ladestation', 'car', '2') %}
            Fahrzeug lÀdt
          {% elif is_state_attr('sensor.ladestation', 'car', '3') %}
            Warte auf Fahrzeug
          {% elif is_state_attr('sensor.ladestation', 'car', '4') %}
            Ladung beendet, Fahrzeug noch verbunden
          {% else %}
            PrĂŒfen
          {% endif %}
      charger_error_status:
        friendly_name: 'Fehlerstatus'
        value_template: >-
          {% if is_state_attr('sensor.ladestation', 'err', '0') %}
            OK
          {% elif is_state_attr('sensor.ladestation', 'err', '1') %}
            Fehlerstromschutschalter
          {% elif is_state_attr('sensor.ladestation', 'err', '3') %}
            Phasenstörung
          {% elif is_state_attr('sensor.ladestation', 'err', '8') %}
            Erdungserkennung
          {% elif is_state_attr('sensor.ladestation', 'err', '10') %}
            sonstiges
          {% else %}
            prĂŒfen
          {% endif %}
      charger_total_energy:
        friendly_name: 'Gesamt geladene Energiemenge'
        value_template: '{{ ((states.sensor.ladestation.attributes["eto"]|int) *0.1) | round(1) }}'
        unit_of_measurement: "kWh"
      charger_temp:
        friendly_name: 'Temperatur Ladestation'
        value_template: '{{ states.sensor.ladestation.attributes["tmp"] }}'
        unit_of_measurement: "°C"
      charger_this_load_energy:
        friendly_name: 'Geladene Energiemenge diese Ladung'
        value_template: '{{ ((states.sensor.ladestation.attributes["dws"]|float) /360000) | round(1) }}'
        unit_of_measurement: "kWh"
      charger_this_load_cost:
        friendly_name: 'Kosten fĂŒr die Ladung'
        value_template: '{{ ((states.sensor.ladestation.attributes["dws"]|float) /360000 * 0.26) | round(2) }}'
        unit_of_measurement: "€"
      charger_l1_volt:
        friendly_name: 'Spannung auf L1'
        value_template: '{{ states.sensor.ladestation.attributes["nrg"][0] }}'
        unit_of_measurement: "V"
      charger_l2_volt:
        friendly_name: 'Spannung auf L2'
        value_template: '{{ states.sensor.ladestation.attributes["nrg"][1] }}'
        unit_of_measurement: "V"
      charger_l3_volt:
        friendly_name: 'Spannung auf L3'
        value_template: '{{ states.sensor.ladestation.attributes["nrg"][2] }}'
        unit_of_measurement: "V"
      charger_l1_ampere:
        friendly_name: 'StromstÀrke auf L1'
        value_template: '{{ ((states.sensor.ladestation.attributes["nrg"][4]|int) *0.1) | round (1) }}'
        unit_of_measurement: "A"
      charger_l2_ampere:
        friendly_name: 'StromstÀrke auf L2'
        value_template: '{{ ((states.sensor.ladestation.attributes["nrg"][5]|int) *0.1) | round (1) }}'
        unit_of_measurement: "A"
      charger_l3_ampere:
        friendly_name: 'StromstÀrke auf L3'
        value_template: '{{ ((states.sensor.ladestation.attributes["nrg"][6]|int) *0.1) | round (1) }}'
        unit_of_measurement: "A"
      charger_charging_load:
        friendly_name: 'Ladeleistung gesamt'
        value_template: '{{ ((states.sensor.ladestation.attributes["nrg"][11]|int) *0.01) | round (1) }}'
        unit_of_measurement: "kW"

All used parameters are also documented in https://go-e.co/app/api.pdf

If somebody wants to have an all english version just ask, I can translate the texts easily.

Have fun and maybe someone will create a real integration for this device :slight_smile:

And of course, further improvements in coding efficiency are welcome!

Ralf

3 Likes

Hi,

i started implementing a custom_component for this Charger. At the moment it is only possible to read values as sensors, but i am already working on the services for setting parameters in the box.

Maybe this is interesting for you.

Carsten

3 Likes

Hi Carsten
Tried to implement your solution for go-e Charger with HASS but unfortunately failed.
I followed your exactly instructions but at the end I cannot see any charger displayed in HASS.
First question: Shouldn’t I see any go-e device in Integrations menu?
May be I’m missing here some points.

Konfiguration ĂŒberprĂŒfen:
Component error: goecharger - Integration ‘goecharger’ not found.

Thanks a lot for any advice?
Regards,
Rene

I have the same problem as Rene.
When I check the configuration.yaml (with configuration validation under server control), I get the following error message:

Component error: goecharger - Integration ‘goecharger’ not found.

I have copied the folder goecharger into the custom_components folder and added the below config (with the correct serial number) to my configuration.yaml. I have performed several restarts of Home Assistant.
Any idea what went wrong?

goecharger:
  host: 192.168.178.67
  serial: 'CM-02-XXXXXX'

Best regards,
Henning

Have you found the issue in the meantime?
I have the same problem, see my other post.

no answer from author. So just deleted it again.

When you have problems using the plugin please open an issue on the Plugin-github project, because i am not actively monitoring his community pages.

https://github.com/cathiele/homeassistant-goecharger/issues

As for the Serialnumber. please try the serial without the “CM-02-” prefix, just the numbers as shown in the plugin documentation replace your numbers with the example “111111” numbers.

I solved it as follows:

  1. add the custom_compontent (just unpack/copy the integration itself)
  2. reboot
  3. add configuration
  4. reboot

If I add the component and add the configuration in one step, I will get the error. If I do it in 2 steps then I’m good.

Hi
Tried to implement your config in configuration.yaml and failed.
image

What is the problem?

Cheers,
Rene

Hi René,
did you try to implement the solution manually in your configuration.yaml or did you use the custom component provided by Carsten?

Your error message is a little bit too few of information.

Regards
Ralf

Hi Ralf
Thanks for you reply.
Just added your definitions at bottom of my configuration.yaml. Updated the resource link (link (http://192.168.0.20/status) tested in browser and works)

Now did a config check with Homeassistant and got the errors.

So did not use Carsten solution.

Here my System Infos:

Version 0.118.5
Installation Type Home Assistant OS
Development false
Supervisor true
Docker true
Virtual Environment false
Python Version 3.8.6
Operating System Family Linux
Operating System Version 4.19.127-v7
CPU Architecture armv7l

Thanks for any help in advance.
Cheers
Rene

Hi René,

can you send your charger part of the configuration.yaml? Then I will do a quick check.

Regards
Ralf

Here you are:
#charging station go-e

  • platform: rest
    resource: http://192.168.0.20/status
    scan_interval: 30
    name: “ladestation”
    value_template: “{{ value_json[‘car’] }}”
    json_attributes:
    • car
    • err
    • eto
    • tmp
    • dws
    • nrg
  • platform: template
    sensors:
    charger_status_pwm:
    friendly_name: ‘Status’
    value_template: >-
    {% if is_state_attr(‘sensor.ladestation’, ‘car’, ‘1’) %}
    Ladestation bereit, kein Fahrzeug
    {% elif is_state_attr(‘sensor.ladestation’, ‘car’, ‘2’) %}
    Fahrzeug lÀdt
    {% elif is_state_attr(‘sensor.ladestation’, ‘car’, ‘3’) %}
    Warte auf Fahrzeug
    {% elif is_state_attr(‘sensor.ladestation’, ‘car’, ‘4’) %}
    Ladung beendet, Fahrzeug noch verbunden
    {% else %}
    PrĂŒfen
    {% endif %}

To start with just did Status part to narrow down the problem.

I just wanted to leave a thank you for Carsten! Found your integration here and what can I say - it just works :slight_smile:

@RalfP first of all THX for the template. Just easy and it works. LIKE!
PS a hint that the above should be added to the sensor.yaml ?

@cathiele THX for the integration. Would like to go ahead but stugling currently with my samba.
is it possible to run the commads for installation also with hass.io as base?

After installing the custom integration of @cathiele I found all entities in HA but they were all unavailable. After some search I found that the /status endpoint was not exposed because it has to be activated in the settings of the charger first. This can easily be done through the go-e app but is not mentioned in the custom integration’s readme.

I would like to create a PR for the documentation, but I have a feeling that this setting might be new and maybe only available with special hardware or firmware versions. Mine is hardware version V3 and firmware 050.2.

Can any of you report back whether you find this setting in your app or not?
Check the go-e app at → Internet → Extended Settings → Activate local HTTP API v1 (v2 also available)

Hint:
With firmware 050 the go-e currently reports deka-Wh instead of deka-Ws for data point dws. So current_session_charged_energy of the custom integration is wrong too.

The issue is known and will be fixed in a future release of the firmware.

1 Like

Works great! Thank You for your work!

This have been working well, since yesterday when I upgraded firmware 051.1 to 051.3.
they did fix that mqtt settings, now its saved but broke something from API v1.
edit:
strange this morning all goe-charger entities shows unavailable now they are back


Same problem for me. API v2 seems to work. v1 sends timeout error after a while.

In this context: Is somewehwere a full API v2 documentation? This one on github isn’t complete: https://github.com/goecharger/go-eCharger-API-v2