Go-E Charger Wallbox Binding

I get these errors too. It seems the Wifi of the GO-E is not very reliable. You could try to place a repeater closer to the wallbox - but I can ignore these errors because I use the output of my powerwall to control the charging.

Bernd: Thanks for your code, I will use it too!

Hi, do have the same issue sporadically but around 10 times a day with these error messages.
Have neither found a real rootcause nor a proper workaround.
ESP8266 nearby has no issue with WLAN communication.

My GO-E still changes from ON to OFF and back fromm OFF to ON whithout reason:

2021-05-16 11:17:05.098 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'GoeCharger_MaximumCurrent' received command 10

2021-05-16 11:17:05.101 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'GoeCharger_MaximumCurrent' predicted to become 10

2021-05-16 11:17:05.122 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'GoeCharger_AllowCharging' received command ON

2021-05-16 11:17:05.124 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'GoeCharger_MaximumCurrent' changed from 16 A to 10

2021-05-16 11:17:05.126 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'GoeCharger_AllowCharging' predicted to become ON

2021-05-16 11:17:05.136 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'GoeCharger_AllowCharging' changed from OFF to ON

2021-05-16 11:17:05.290 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'GoeCharger_MaximumCurrent' changed from 10 to 10 A

2021-05-16 11:17:05.297 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'GoeCharger_VoltageL1' changed from 227 V to 226 V

2021-05-16 11:17:05.318 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'GoeCharger_AllowCharging' changed from ON to OFF

2021-05-16 11:17:05.428 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'GoeCharger_AllowCharging' changed from OFF to ON

And I still do not understand why the box is doing this


I got a new version of the GO-E home fix 11: V3
Wifi connection is stronger, there seems to be a possibility to use Awattar.
My script was working with the old GO-E V2 received in January
In “erweiterte Einstellungen” I can activate API V2, API V1, Modbus TCP-API - see attached screenshot

When connecting the box on 3.1.0 M4 I get error messages:

2021-06-01 11:26:27.665 [WARN ] [mmon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception: 

com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $

	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:226) ~[?:?]

	at com.google.gson.Gson.fromJson(Gson.java:932) ~[?:?]

	at com.google.gson.Gson.fromJson(Gson.java:897) ~[?:?]

	at com.google.gson.Gson.fromJson(Gson.java:846) ~[?:?]

	at com.google.gson.Gson.fromJson(Gson.java:817) ~[?:?]

	at org.openhab.binding.goecharger.internal.handler.GoEChargerHandler.getGoEData(GoEChargerHandler.java:394) ~[?:?]

	at org.openhab.binding.goecharger.internal.handler.GoEChargerHandler.refresh(GoEChargerHandler.java:410) ~[?:?]

	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[?:?]

	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) ~[?:?]

	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) ~[?:?]

	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]

	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]

	at java.lang.Thread.run(Thread.java:834) [?:?]

Caused by: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $

	at com.google.gson.stream.JsonReader.beginObject(JsonReader.java:386) ~[?:?]

	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:215) ~[?:?]

It seems the new box answers to API requests in a different way than the old box.
How do I go to report this isues to the maintainers of this binding?

Documentation of the old APi is available at:
https://github.com/goecharger/go-eCharger-API-v1
and
https://github.com/goecharger/go-eCharger-API-v1

GO-E wrote me a letter that the documentation will need some more time


1 Like

Exactly the same mistake exists here.
I have a Go-E V2 and a brand new Go-e V3. The result when calling the URL: http://go-echarger_ip/status , the result looks a little different:

V2 Hardware Firmware 030 (the binding works fine):

{"version":"B","tme":"0206211325","rbc":"14","rbt":"154732368","car":"1","amp":"6","err":"0","ast":"0","alw":"0","stp":"0","cbl":"32","pha":"56","tmp":"16","tma":[28.00,27.00,27.13,27.37],"amt":"32","dws":"0","dwo":"0","adi":"1","uby":"0","eto":"30","wst":"3","txi":"0","nrg":[227,225,226,3,0,0,0,0,0,0,0,0,0,0,0,0],"fwv":"033","sse":"023014","wss":"WIFINAME","wke":"*********************","wen":"1","cdi":"0","tof":"101","tds":"1","lbr":"255","aho":"3","afi":"7","azo":"1","ama":"16","al1":"6","al2":"8","al3":"10","al4":"12","al5":"14","cid":"16711935","cch":"255","cfi":"65280","lse":"1","ust":"0","wak":"3366d6d90f","r1x":"0","dto":"0","nmo":"0","sch":"AAAAAAAAAAAAAAAA","sdp":"0","eca":"0","ecr":"0","ecd":"0","ec4":"0","ec5":"0","ec6":"0","ec7":"0","ec8":"0","ec9":"0","ec1":"0","rca":"0468287A","rcr":"","rcd":"","rc4":"","rc5":"","rc6":"","rc7":"","rc8":"","rc9":"","rc1":"","rna":"","rnm":"","rne":"","rn4":"","rn5":"","rn6":"","rn7":"","rn8":"","rn9":"","rn1":"","loe":0,"lot":16,"lom":6,"lop":99,"log":"HIOBMCIN","lon":0,"lof":0,"loa":0,"lch":0,"mce":0,"mcs":"192.168.1.1","mcp":1883,"mcu":"","mck":"","mcc":0}                                                

V3 Hardware Firmware 050:

{"version":"B","tme":"0206211343","rbc":"30","rbt":"9846","car":"1","amx":"0","amp":"6","err":"0","ast":"0","alw":"0","stp":"0","cbl":"20","pha":"56","fsp":"1","tma":[33.125,35.875],"dws":"0","dwo":"0","adi":"0","uby":"0","eto":"135","wst":"3","fwv":"050","nrg":[236,236,236,0,0,0,0,0,0,0,0,0,0,0,0,0],"sse":"050318","wss":"WIFINAME","wke":"********","wen":"1","cdi":"0","tof":"101","tds":"1","lbr":"50","aho":"0","afi":"6","azo":"1","ama":"32","al1":"6","al2":"8","al3":"10","al4":"12","al5":"14","cid":"255","cch":"16752384","cfi":"65280","lse":"0","ust":"2","wak":"********","r1x":"2","dto":"0","nmo":"0","sch":"AAAAAAAAAAAAAAAA","sdp":"0","eca":"0","ecr":"0","ecd":"0","ec4":"0","ec5":"0","ec6":"0","ec7":"0","ec8":"0","ec9":"0","ec1":"0","rca":"1","rcr":"","rcd":"","rc4":"","rc5":"","rc6":"","rc7":"","rc8":"","rc9":"","rc1":"","rna":"User 1","rnm":"User 2","rne":"User 3","rn4":"User 4","rn5":"User 5","rn6":"User 6","rn7":"User 7","rn8":"User 8","rn9":"User 9","rn1":"User 10","loe":0,"lot":16,"lom":6,"lop":50,"log":"","lof":0,"loa":0,"lch":0}

I have only clean my Wifi Name

I hope this Information can help to fix issues with the V3 Charger Version.

I also read that tmp was replaced by tma (all Sensors) , but this was not noted in the V1 documentation. loxwiki.eu

I used your data, added mine and put the data in a spreadsheet for Libreoffice:

I put the names of the fields in the first row, FE shows missing values / fields
Some of the fields were renamed (tmp → fsp), rearranged (fwv and nrg), there is a new field amx and at the end some fields are not used any more (mce to mce).
I highlighted not corresponding data.

I attach my response to goe-IP/api/status:
GOE_V3_API2.txt (7.6 KB)

It seems that the field tmp does not exist in the JSON-answer to IP/status, I statet this guess in the issue:
[[goecharger] new hardware version v3 and new firmware v2 seem to be unstable or not supported · Issue #10791 · openhab/openhab-addons · GitHub]

Well, I installed all the necessary software, did a fork and deleted (I still have to learn how to uncomment lines in *.xml and *.java ) all the lines with temperature, TEMPERATURE and the corrseponding case-statements in GoEChargerHandler.java.java.

My first successful compile with java!

I copied the org.openhab.binding.goecharger-3.1.0-SNAPSHOT.jar file to /usr/share/openhab/add-ons 


It’s working!

@FeliciaRS: Would you try it, too?
org.openhab.binding.goecharger-3.1.0-SNAPSHOT.txt (17.4 KB)
Well, I could not upload the *.jar fie, so I renamed it in *.txt, you should reverse that.

I did some further tests and it seems that only part of the binding is working.
I get messages like:

2021-06-05 19:04:41.257 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'GoeCharger_MaximumCurrent' predicted to become 16

2021-06-05 19:04:41.265 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'GoeCharger_MaximumCurrent' changed from 6 A to 16

2021-06-05 19:04:41.326 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'goecharger:goe:treppe' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $

It would be interesting to find out if the binding is working on the old version of GO-E without these errors.

Hello Christian,
Thank you for your efforts. I tried to install the jar file but it doesn’t work.
However, I also have the openHAB 3.0.2 release build. Tonight I’ll try to do a test installation with 3.1.0 and look at it again.

I’m also in contact with Go-e because the new hardware still seems to have a few software bugs.

Thanks Philipp

I am still a struggling beginner programming / changing the existing binding, so dont’ take it too seriously. GO-E answered to my question regarding “tmp”:

der Parameter tmp wird bereits sehr lange nicht mehr aktiv von uns verwendet, da die Werte sehr ungenau sind.

Deswegen haben wir bereits seit lÀngerem neue Temperatursensoren und einen entsprechend neuen Parameter, nÀmlich tma.

Sollten Sie also die Temperatur messen wollen, bitte ich Sie tma zu verwenden.

amt ist der Ladestrom, welcher max. freigegeben wird und sich nach der Temperatur des Chargers(tma) richtig.

I was able to change my forked local bundle to read tma1 and tma2.
tma1 seems to be always lower than tma2.
Could be the box measures temperatur at two different locations?

When changing the value of amx I get this error:


==> /var/log/openhab/events.log <==

2021-06-07 13:13:03.362 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'goecharger:goe:GOE' changed from OFFLINE (COMMUNICATION_ERROR): java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $ to ONLINE
2021-06-07 13:13:21.292 [DEBUG] [r.internal.handler.GoEChargerHandler] - POST Response: Request method for this URI is not handled by server

The error is caused by the following code around line 360 in GoEChargerHandler.java:

private void sendData(String key, String value) {
        String urlStr = getUrl(GoEChargerBindingConstants.MQTT_URL).replace("%KEY%", key).replace("%VALUE%", value);
        logger.debug("POST URL = {}", urlStr);

        try {
            ContentResponse contentResponse = httpClient.newRequest(urlStr).method(HttpMethod.POST)
                    .timeout(10, TimeUnit.SECONDS).send();
            String response = contentResponse.getContentAsString();
            logger.debug("POST Response: {}", response);
            GoEStatusResponseDTO result = gson.fromJson(response, GoEStatusResponseDTO.class);
            updateChannelsAndStatus(result, null);
        } catch (InterruptedException | TimeoutException | ExecutionException | JsonSyntaxException e) {
            updateChannelsAndStatus(null, e.getMessage());
        }
    }

When I enter the contents of urlStr in my browser the GO-E answers with the same data one gets by issuing IP/status, this is shown in the logger.debug output
It seems GoEStatusResponseDTO or updateChannelsAndStatus produce an exception which was not produced in V1 and V2.

Hello,

my answer is still pending. The charger with the V2 hardware still works with your binding as before. Unfortunately, the V3 Charger doesn’t work with it either.

Unfortunately, the API status URL is no longer accessible after calling it via Binding. http://ip/status only returns this result:
“couldn’t take api lock in 3s, please try again later”
until the charger is restarted.
This happen with the original and your modified Binding

I had installed a virtual machine for it.

This lock disapears after some time or a restart of the box.
S.B. recommended to keep amp because this value stays permanent in the box.
“powerall” is wrong by a factor of 10, I will change that.
Have you tried the binding with your old box?
Yes, you did. Great it still works. This shows that GO-E changed something which triggers an errror.

I think the debugging messages

2021-06-14 11:10:57.858 [DEBUG] [r.internal.handler.GoEChargerHandler] - POST URL = http://192.168.178.82/mqtt?payload=alw=0 2021-06-14 11:10:58.005 [DEBUG] [r.internal.handler.GoEChargerHandler] - POST Response: Request method for this URI is not handled by server
show that after the code is posting

http://192.168.178.82/mqtt?payload=alw=0

the box answers with

Request method for this URI is not handled by server

That seems to be wrong. What I do not understand that when I enter

http://192.168.178.82/mqtt?payload=alw=0
into the browser no error message is produced.

I compiled and tested a new version
https://github.com/chilobo/openhab-addons/commit/0bffd0347196dc5e51aed90734c1c7004b34d025

The jar I copied to dropbox:
https://www.dropbox.com/s/fzx819g2skgem0m/org.openhab.binding.goecharger-3.1.0-SNAPSHOT.jar?dl=0

Added changes

  • replacing usage of tmp with tma1 and tma2
  • new field powerAll for combined power of 3 phases
  • new field maxCurrTemp to use the non-EEPROM value for max. current (amx)
  • maxCurrent is still available (amp)

Still doesn’t work on my Box with V3.
Could someone test it on a Box with V1 or V2?

I guess I found a solution.
I had to change the method to submit the mqtt-request from POST to GET.
You find the jar at:
https://www.dropbox.com/s/jbnkijlfbul9soq/org.openhab.binding.goecharger-3.1.0-SNAPSHOT.jar?dl=0
Could somebody (Phillip?) try this code on the old box?


The reset card of my GO-E V3 did not show a Token. I asked GO-E about that, they answered:


, die neue Version hat keinen Cloud-Token mehr, wie man diesen von der Àlteren Variante kennt.

Stattdessen vergibt man jetzt ein eigenes Passwort, welches den Cloud-Token ersetzt. NatĂŒrlich ist es im Moment so, das bisher bekannte Anwendungen damit noch nicht arbeiten können.
Wir arbeiten natĂŒrlich bereits an einer ausfĂŒhrlichen Dokumentation zur neuen API und auch zu den neuen Zugriffsarten.

So it makes no sense to try to use the REST-Features of API1 with the new version V3.

Hello Christian,
that looks good, I can control both chargers via the binding.
I will now update my openHAB to 3.1.0 and test it in real operation.

Today I received an update to 050.2 for the V3 Charger with a bugfixes.

I got the update too.
It seems that GO-E changed the unit of Current Session Charged Energy. Did the old box get an update too?
Is the value shown in Openhab in one or both boxes too small by a factor of 3600?

The value is different from the beginning than with the V2 Charger. The value from V3 Charger has to be multiplied by 3600.
In the rules it looks like this for me: EVsessioncorrect = (GoEChargerSessionChargedEnergy.state as Number * 0.001) to produce the correct result. I don’t know why but this works.
The Old V2 Charger delivers the correct value (Current Session Charged Energy) without recalculation.
The Old V2 Charger have the Firmware 040.0 and works without trouble.

Unfortunately, the V3 Charger often delivers this error:

java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $

But I can’t say exactly when this will happen.
If no car is connected and the charge is deactivated, this can happen, but not every Time. Restart of the Charger can help but not ever.

I had this error befor I changed the method to change values from POST to GET.

Could you download
https://www.dropbox.com/s/zh9axelqdhfvies/org.openhab.binding.goecharger-3.1.0-SNAPSHOT.jar?dl=0
, copy it to the addons-directory and check if it still happens? Is there any other error messageor debug message in the log in the last lines befor this message?

I will still testing.
You have change the sessionChargedEnergy ? I must see what the V2 Charger show on this Channel.
There was no other error Message before the error arrived, sorry.

Yes, I changed it because GO-E changed the unit. It now uses the same unit as totalChargedEnergy which is 0.1 kWh.
You can see this if you call IP/status in a browser, look for eto (totalChargedEnergy) and dws (sessionChargedEnergy).