Go-E Charger Wallbox Binding

Hi,

i want to use the go-e charger to charge my EV with electricity from my photovoltaik system. Openhab should control the max current of the wallbox, so the car uses as much electricity from the sun as possible.

Therefor i want to create a binding, so others benefit from this as well. I already had a look at the fronius binding, which also gets data from a http API in json format. The go-e charger also has a REST API that can be used to control it. So i guess the easiest way to create a binding for this is to orientate on that binding.

API description:

Specs of charger:

What do you guys think? Does it make sense to create an own binding for this or is this a bit overkill because i can just use the http binding for this?

There is a MQTT and a REST API available, what do you think is the better choice?

1 Like

Try them both and see if one way is better on your setup than the other. :wink:

The HTTP binding or some rules will probably do but why not give a binding a try to make it more comfortable. We’re happy to take any contributions.

REST API, usually.

Ok, so i started writing a binding. Its almost complete in an initial version now. PR is here: https://github.com/openhab/openhab-addons/pull/7068

Following values are currently available (created a sitemap with all available values, the top ones are also settable):

Config looks like this:
goe.thing

Thing goecharger:goe:garage [ip="192.168.1.36",refreshInterval=5]

goe.items

Number   MaxAmpere                       "Max ampere"                      {channel="goecharger:goe:garage:maxAmpere"}
Number   PwmSignal                       "Pwm signal status"               {channel="goecharger:goe:garage:pwmSignal"}
String   Error                           "Error code"                      {channel="goecharger:goe:garage:error"}
Number   VoltageL1                       "Voltage l1"                      {channel="goecharger:goe:garage:voltageL1"}
Number   VoltageL2                       "Voltage l2"                      {channel="goecharger:goe:garage:voltageL2"}
Number   VoltageL3                       "Voltage l3"                      {channel="goecharger:goe:garage:voltageL3"}
Number   CurrentL1                       "Current l1"                      {channel="goecharger:goe:garage:currentL1"}
Number   CurrentL2                       "Current l2"                      {channel="goecharger:goe:garage:currentL2"}
Number   CurrentL3                       "Current l3"                      {channel="goecharger:goe:garage:currentL3"}
Number   PowerL1                         "Power l1"                        {channel="goecharger:goe:garage:powerL1"}
Number   PowerL2                         "Power l2"                        {channel="goecharger:goe:garage:powerL2"}
Number   PowerL3                         "Power l3"                        {channel="goecharger:goe:garage:powerL3"}
Number   Phases                          "Phases"                          {channel="goecharger:goe:garage:phases"}
Number   SessionChargeConsumptionLimit   "Current session charge limit"    {channel="goecharger:goe:garage:sessionChargeConsumptionLimit"}
Number   SessionChargeConsumption        "Current session charge amount"   {channel="goecharger:goe:garage:sessionChargeConsumption"}
Switch   AllowCharging                   "Allow charging"                  {channel="goecharger:goe:garage:allowCharging"}
Number   CableEncoding                   "Cable encoding"                  {channel="goecharger:goe:garage:cableEncoding"}
Number   Temperature                     "Temperature"                     {channel="goecharger:goe:garage:temperature"}
String   Firmware                        "Firmware"                        {channel="goecharger:goe:garage:firmware"}
Number   TotalConsumption                "Total charge amount"             {channel="goecharger:goe:garage:totalConsumption"}

Values of the binding can be used as always for example to set max amps from PV:

rule "Set max amps for PV charging"
when
    Item availablePVCurrent received update
then
    logInfo("Amps available: ", receivedCommand.toString)
    MaxAmpere.sendCommand(receivedCommand.toString) // maybe more advanced logic
end

I can provide a first version of the addon as .jar for testing, however everything is implemented using a mock server, my goe charger will arrive next week.

Hallo Rangarid, did you manage to do something?

Hi Max,

What do you mean? The binding is done. What’s left is testing and fixing bugs when I get my go eCharger.

You have one and want to test it? I can send you a .jar later.

Regards
Samuel

I would also be intrested in a trial .jar.

Which Smart Meter or PV inverter are you planing to use for the implementation of charging?

Hi,

i attached a zip file with the binding.jar to the github pull request linked above. You need to extract it and put the .jar to /usr/share/openhab2/addons.

If you take the samples from above, you already should see values, if i implemented the API correctly. If you use the vscode plugin you can also generate the items with vscode.

My PV-System will be installed in april/may, but it currently looks like it will be Fronius. Will use this Binding for it:

Will request the data every 5s or so, should be close enough.

BTW phases is calculated based on energy readings from Go-eCharger. If the energy meter in the wallbox says for example phase 1+2 have 220V and phase 3 0V i know that the car charges on two phases. This might be important, if you have different cars. For example my Ioniq charges 32A single phase, my eUP 16A dual phase. With phasesyou can then individually control the max amps and you have one rule for all cars.

For example:
Ioniq: max 32A 1 phase <- 7.4kW
eUP: max 16A 2 phases <- 7,4kW together
other car max 11A 3 phases <- 7,6kW together
If your PV system produces 8kW and you want to charge your car with full power, depending on phases your car can charge with the max amps need to be calculated dynamically.

In Amps formula would be something like
maxAmpsPerPhase = currentAmpsInverter / phases

I just tested it with a real device. Most things directly worked, had to adjust some others. I updated the .jar in the PR. It should now work correctly with the values mentioned above.

Thanks for providing this binding for the go-eCharger to OpenHab.
I tested it and it works just fine.

I was wondering if you could add all remaining variables from the REST-Interface to the binding as well?

Best regard, Matthias

Hi, eventually i will add the other params as well, but for now i just added those, that are really relevant for pv based charging. Depending on the speed of the reviewers i might be able to add more items, however that is not my top prio right now. I just uploaded a new jar with some enhancedments to the github PR, can you please try that one also?

https://github.com/openhab/openhab-addons/files/4301637/org.openhab.binding.goecharger-2.5.3-SNAPSHOT.zip

Please try the new items file with unit of measurements:

Number:ElectricCurrent     GoEChargerBindingThingMaxAmpere                       "Maximum current"                 {channel="goecharger:goe:garage:maxAmpere"}
Number                     GoEChargerBindingThingPwmSignal                       "Pwm signal status"               {channel="goecharger:goe:garage:pwmSignal"}
String                     GoEChargerBindingThingError                           "Error code"                      {channel="goecharger:goe:garage:error"}
Number:ElectricPotential   GoEChargerBindingThingVoltageL1                       "Voltage l1"                      {channel="goecharger:goe:garage:voltageL1"}
Number:ElectricPotential   GoEChargerBindingThingVoltageL2                       "Voltage l2"                      {channel="goecharger:goe:garage:voltageL2"}
Number:ElectricPotential   GoEChargerBindingThingVoltageL3                       "Voltage l3"                      {channel="goecharger:goe:garage:voltageL3"}
Number:ElectricCurrent     GoEChargerBindingThingCurrentL1                       "Current l1"                      {channel="goecharger:goe:garage:currentL1"}
Number:ElectricCurrent     GoEChargerBindingThingCurrentL2                       "Current l2"                      {channel="goecharger:goe:garage:currentL2"}
Number:ElectricCurrent     GoEChargerBindingThingCurrentL3                       "Current l3"                      {channel="goecharger:goe:garage:currentL3"}
Number:Power               GoEChargerBindingThingPowerL1                         "Power l1"                        {channel="goecharger:goe:garage:powerL1"}
Number:Power               GoEChargerBindingThingPowerL2                         "Power l2"                        {channel="goecharger:goe:garage:powerL2"}
Number:Power               GoEChargerBindingThingPowerL3                         "Power l3"                        {channel="goecharger:goe:garage:powerL3"}
Number                     GoEChargerBindingThingPhases                          "Phases"                          {channel="goecharger:goe:garage:phases"}
Number:Energy              GoEChargerBindingThingSessionChargeConsumptionLimit   "Current session charge limit"    {channel="goecharger:goe:garage:sessionChargeConsumptionLimit"}
Number:Energy              GoEChargerBindingThingSessionChargeConsumption        "Current session charge amount"   {channel="goecharger:goe:garage:sessionChargeConsumption"}
Number:Energy              GoEChargerBindingThingTotalConsumption                "Total charge amount"             {channel="goecharger:goe:garage:totalConsumption"}
Switch                     GoEChargerBindingThingAllowCharging                   "Allow charging"                  {channel="goecharger:goe:garage:allowCharging"}
Number:ElectricCurrent     GoEChargerBindingThingCableEncoding                   "Cable encoding"                  {channel="goecharger:goe:garage:cableEncoding"}
Number:Temperature         GoEChargerBindingThingTemperature                     "Temperature"                     {channel="goecharger:goe:garage:temperature"}
String                     GoEChargerBindingThingFirmware                        "Firmware"                        {channel="goecharger:goe:garage:firmware"}
String                     GoEChargerBindingThingAccessState                     "Access state"                    {channel="goecharger:goe:garage:accessState"}

I tested you latest jar file and it seems all fine.
It is a good idea to add a unique prefix to identify the items.

Good news, initial PR was merged, so Binding will be available with next release. There is just one small fix needed and I’m currently working on it.

hi Rangarid, I’m new with the openhab application, can you explain me how to install your .jar?
thank you very much

Not sure if the jar is the latest version, so maybe better wait for a release of the addons, should be there soon.

Looks like they are on it:
https://github.com/openhab/openhab-addons/releases/tag/2.5.3
This is from yesterday

hi Samuel, done but I can’t understand the next step, do I have to have something in BusicUI? There is nothing from me.

Sorry thank you very much

Guess you have no general understanding of Openhab yet, so maybe first try to learn how to setup things and items via files. This binding is not configured in the UI but with .thing and .items file as stated in the docs:

Go to your Openhab config folder and create a .item in the items folder and a .thing in things folder as described in the documentation.

Hi, thanks for the help, yes I’m not practical with openhab, I created the two files, but I don’t know what to do next, should I use mqtt?

thank you very much

You really should look into how to use Openhab and for what and so on. You can do a lot of things now and nothing of it is specific to one binding. All things you find about bindings and what you can do with them apply to almost all bindings including go-eCharger binding.

Now you can create rules or monitor stats or send notifications based on readings and so on.

Hi Samuel, it works very well, now I wanted to associate it with my solar Kostal.
thanks a lot