Custom component goecharger_mqtt - go-eCharger HOMEfix EV charger integration

wow, this is a nice feature ! Unfortunately, it doesn’t work with my Zoe :stuck_out_tongue:

First sunshine this morning : I am really pleased with the “mean value”!
I also have a 10 kWh battery at home which is acting as a buffer when the PV Power is changing too fast

Oh yes that looks better. How do you calculate the mean_total_available_for_charging value - what is your time span for the running averaging?

I use the “average sensor” in configuration.xml

  - platform: average
    name: "mean_total_available_for_charging"
    unique_id: mean_total_available_for_charging
    entities:
      - sensor.total_available_for_charging
    duration:
      minutes: 15

let me clean what I did and I will post the whole scripts here

1 Like

I installed the “Average Sensor” custom component via HACS and got the new mean sensor defined as you did. I reduced the duration to 10min. Thanks for pointing to this.

Has anyone managed already to create a script / algorithm that manages to adjust the charger for surplus charging?
I have a power meter sensor and tried to just match the surplus value to the watts the go-e should take but didn´t take into account the value it will take itself when increasing the amps…

1 Like

Hi, I am using EVCC to do this now. However it is cool that you guys trying to solve this with a yaml config.
Since EVCC is open source, can maybe some inspiration and or code be reused from that project?

1 Like

Hi

I have the following scenario

I have a sensor in HA, that i call “Surplus solar” this is a sensor that shows how much solar i have in surplus (Solar production minus current use)

This comes from Solar Assistant, updated every second via MQTT

Is it “simple” to use this number to dictate the charge current of this charger using this integration ?

It needs to relatively simple, i am NOT a programmer so i can not do elaborate programming to get it working. :slight_smile:

I would offcourse need to adjust the sensor because otherwise when the charger started, it would show very little suprplus and stop charging so it would be “surplus solar minus charger use” to calculate how much is actually surplus :slight_smile:

Hello,

does anyone have a working automation for surplus charging with the goechargers?

Regards
Michael

yes. Check the post : Custom component goecharger_mqtt - go-eCharger HOMEfix EV charger integration - #87 by SteffenLav

it is working.

it doesn’t work for me. when i copy the code from the script into my home assistant i get many errors and can’t save it. for example:

Message malformed: Unexpected value for condition: ‘{‘and’: [{‘above’: 1380, ‘below’: 3910, ‘entity_id’: ‘sensor.total_available_for_charging’}, {‘numeric_state’: ‘sensor.total_available_for_charging’}]}’. Expected and, device, not, numeric_state, or, state, sun, template, time, trigger, zone @ data[‘sequence’][0][‘if’][0]

I have made my own node red flow to control solar charging.
I have an input_boolean as a primary enabler, as well as a check for forced 1-phase. I might trigger 1-phase / 3-phase based on the input_boolean.

This ensures that when I run 3-phase charging, it is always 16A. I have 3.6kW East + 3.6kW SW - so I am rarely above 5kW minus whatever else I use.

I start my charging using a 3rd party App (OCPP), as that gives me €0.02/kWh in credits - I am a network powerbank. They can pause charging up to 15 minutes if sudden high power demand. I am located in Denmark BTW. Larger companies participate with their HVAC as well.

How can I best pause charging if clouds come - keeping the same session seen from the OCPP server ? Sometimes I do get messages from the OCPP server that my car has paused charging, yet I can resume and I will get my money when cable disconnected.

I do not want to enable charging directly from my automation, but I want to resume it. How can I see if it is a resumed session ?

Some logic like a trigger on cable disconnected - then wait and see if car goes charging - and then set some input_boolean to track that I have a valid session. Cable disconnect then change boolean to false ? This would likely avoid people stealing power.

Since firmware 0.55 the charger itself can do eco charging with solar power only.
See PV-Überschuss in Firmware einbauen? · goecharger/go-eCharger-API-v2 · Discussion #110 · GitHub

You have the available options in the latest App. Behind ECO button you can chose eco mode or planned mode. And eco configuration allows you to select PVpower only.

pPv (Power from solar) is supposedly not used for anything but as a display value when charging. pGrid controls available power.

You just need to send your pgrid to the ids Element. Does not work on mqtt for me. So I use a rest URL.

I have created this rest command (in configuration.yaml) - sensor.power_total is the amount of power from my power meter. Negative for power eksport = allowed charge. sensor.solutronic is my solar production.

rest_command:
    update_ids:
      url: >-
        http://192.168.1.XX/api/set?ids={{'{"pGrid": '}}{{states('sensor.power_total')}}{{', "pPv":'}}{{states('sensor.solutronic')}}{{', "pAkku":0}'}}
      method: GET

Then to keep energy available info updated on the charger (it expires - so needs refresh every 10s - I do every 5) I created this automation:

- id: '16818071256345'
  alias: Go-echarger update solar
  description: Updates pGrid and pPv on Go-e charger  to allow charger to control charging power
  trigger:
  - platform: time_pattern
    seconds: /5
  condition: []
  action:
  - service: rest_command.update_ids
    data: {}
  mode: single

Reply to my reply above, MQTT is supported. Got it working. Now using mqtt.publish myself.
Thus the integration can easily be adjusted to support the built-in Solar Energy charging mode of the charger.

I did submit a pull request to the original github repository to enable the 3 sensors (pgrid, ppv, pakku) and ids as a “setter” entity. When it is merged, you can use this HACS integration to feed power available (negative number, in pGrid) to the charger, and control PV charging from the Go-e Charger app, or using the fup/lmo keys.

Even if not using PV, it is likely better to send pGrid values (in Watts) to the charger than to send ama (Ampere to charge), as pGrid will not wear down flash memory.

pGrid values are only good for max approx 10s, so need to be refreshed constantly. Fine to send low value to pause charger, and fine to send values with car not connected. Charging does not start before normal conditions are fulfilled.

2 Likes

Hey hey
I just installed your integration. First test seem to be very good.
But I have one question to it.
In combination with this blueprint Im trying to use my Go E charger for PV excess loading.
Therefor I need a switch to turn loading on and off.
So I used the sensor “Force State” in combination with my own switch:

switch:
  - platform: template
    switches:
      goechargercharging:
        turn_on:
          service: select.select_option
          data:
            option: Charge
          target:
            entity_id: select.go_echarger_215657_frc
        turn_off:
          service: select.select_option
          data:
            option: Don't charge
          target:
            entity_id: select.go_echarger_215657_frc

is this the supposed way to turn charging on and off. Or is there a better way?

1 Like

Hi, I have an issue with several sensors not being shown (see screenshot for an example). I saw that according to the github page they are not enabled by default, but I have not found any documentation on how to enable them. Does anyone can give me a hint on how to achieve this?

image

Settings →
Devices & Services →
Switch to the “devices” tab →
Search for “go-eCharger” →
Open the device page →
Expand the “+x entities not shown” sections →
Click on a disabled sensor →
Click the settings cog →
Expand the “Advanced settings” section →
Change the entity status from “Disabled” to “Enabled” →
Update

1 Like

thank you!

Hi Povl,

could you be so kind and post the yaml for the MQTT.publish you are using for the Go-E Charger to use the Wallbox own Solar Excess functionality? From what I understand reading on the Github page of the company it requires Firmware 0.55.6 ?
Also seen that there is an update on the HACS Custom Component along supporting these setting (Eco mode, Values for PV Excess stuff) lately. Sounds good!

Is there support for also Go-echarger gemini charger? I replaced my home -model to gemini model and it seems component is added without problems with correct serial #, I can see charger’s MQTT topics and values but all devices seem to be unavailable in Home assistant.

Probably differing MQTT schemas between models? (otherwise that I have done a dum thing somewhere… : )

Could subscribe to your MQTT broker manually? Do you see incoming traffic of the charger? Please double check the topic prefix. Does the topic still include the serial number for sure?