Go-E Charger Wallbox Binding

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).

@chilobo Are you still working on this binding. I had change my Charger to V3 and with your last binding it is working good for an undefined period. Sometimes 5 minutes. sometimes hours. One charger is running for days. here is the last log

2021-07-12 14:00:48.347 [DEBUG] [r.internal.handler.GoEChargerHandler] - GET URL = http://192.168.1.28/status
2021-07-12 14:00:48.422 [DEBUG] [r.internal.handler.GoEChargerHandler] - GET Response: {"version":"B","tme":"1207211400","rbc":"23","rbt":"59745","car":"4","amx":"0","amp":"6","err":"0","ast":"1","alw":"0","stp":"0","cbl":"32","pha":"56","fsp":"0","tma":[32.625,38.125],"dws":"0","dwo":"180","adi":"1","uby":"0","eto":"1314","wst":"3","fwv":"050.2","nrg":[231,230,232,0,0,0,0,0,0,0,0,0,0,0,0,0],"sse":"051383","wss":"xxxxxxx","wke":"********","wen":"1","cdi":"0","tof":"101","tds":"1","lbr":"255","aho":"0","afi":"6","azo":"0","ama":"16","al1":"6","al2":"10","al3":"12","al4":"14","al5":"16","cid":"255","cch":"65535","cfi":"65280","lse":"0","ust":"0","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":32,"lom":6,"lop":50,"log":"","lof":0,"loa":0,"lch":50}
2021-07-12 14:00:58.423 [DEBUG] [r.internal.handler.GoEChargerHandler] - GET URL = http://192.168.1.28/status
2021-07-12 14:01:01.512 [DEBUG] [r.internal.handler.GoEChargerHandler] - GET Response: couldn't take api lock in 3s, please try again later
2021-07-12 14:01:01.512 [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 $

Do you have any idea. When this happen also the http://xxx.xxx.xxx.xxx/status ist not working anymore until I restart the charger. Then everything is fine again.

I am ready to test if you have newer versions but I am not sure I this is really a binding problem or an api problem from Go-E

Thanks
Asmodeon.

Some time ago (about 2 -3 weeks) I got this message too, it occured only sometimes and I had to restart the GO-E again as you did. I didn’t have this error within the last two weeks.
About a month ago Philipp had this error too:
https://community.openhab.org/t/go-e-charger-wallbox-binding/93338/50?u=chilobo

I have no idea why this happens.

Are you still using maxCurrent to set the current? Try using maxCurrentTemporary instead.
I don’t think it will help, just try it.

Is your wifi connection to the box reliable? Since I use a repeater about 5 m and a wall of 26 cm away connection to the box seems to be more reliable.

Are you refreshing every 10 s? Try to use a longer interval like 30 s.

I’m just guessing around!!

Hello,

I can confirm that since I optimized my WiFi the failures have decreased. Sometimes the data is not updated properly, but things are currently going very well.

I think Go-e still needs to work on the firmware.

What do you mean with “try maxCurrentTemporary instead” I don’t have this channel in the binding and I thought I am using you latest version from 20.06.2021.

272 │ Active   │  80 │ 3.1.0.202106201036    │ openHAB Add-ons :: Bundles :: Go-eCharger Binding   

Parallel I have incrased the intervall to see if this will help. My WLan ist at 40% - but it’s not so easy to increase at the moment - I have to work on it.