openhab-addons: [goecharger] new hardware version v3 and new firmware v2 seem to be unstable or not supported
I changed the v2 hardware go-e charger to the brand new v3 hardware which I got these days. v2 charger worked very fine in openhab. had may working rules.
v3 Hardware: Removed the old openhab “thing”, deinstalled and reinstalled the goecharger binding and added the new charger by ip. seemed to work a few seconds first, then “java.lang.IllegalStateException” is shown in thing configuration and openhab log. the api shoud be the same as the older charger has, but there may be some changes which affect the error:
Current Behavior
Thing configuration in openhab 3 switches between “online” and “communication error” in a loop. few seconds “online”, few seconds “communication error”.
Status: OFFLINE COMMUNICATION_ERROR java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
Logfile repeats this lines in a loop: `2021-06-02 00:31:01.142 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘goecharger:goe:413602c5bf’ changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
2021-06-02 00:31:01.151 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘GoECharger_MaxCurrent’ changed from 6 to UNDEF
2021-06-02 00:31:01.156 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘GoECharger_PwmSignal’ changed from WAITING_FOR_CAR to UNDEF
2021-06-02 00:31:01.159 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘GoECharger_Error’ changed from NONE to UNDEF
2021-06-02 00:31:01.173 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘GoECharger_CurrentL1’ changed from 0.0 A to UNDEF
2021-06-02 00:31:01.175 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘GoECharger_CurrentL2’ changed from 0.0 A to UNDEF
2021-06-02 00:31:01.176 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘GoECharger_CurrentL3’ changed from 0.0 A to UNDEF
2021-06-02 00:31:01.177 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘GoECharger_PowerL1’ changed from 0 W to UNDEF
2021-06-02 00:31:01.178 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘GoECharger_PowerL2’ changed from 0 W to UNDEF
2021-06-02 00:31:01.179 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘GoECharger_PowerL3’ changed from 0 W to UNDEF
2021-06-02 00:31:01.179 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘GoECharger_Phases’ changed from 0 to UNDEF
2021-06-02 00:31:01.180 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘GoECharger_SessionChargeEnergyLimit’ changed from 1 to UNDEF
2021-06-02 00:31:01.182 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘GoECharger_TotalChargedEnergy’ changed from 0.0 kWh to UNDEF
2021-06-02 00:31:01.183 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘GoECharger_AllowCharging’ changed from OFF to UNDEF
2021-06-02 00:31:01.184 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘GoECharger_CableCurrent’ changed from 32 A to UNDEF
2021-06-02 00:31:01.184 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘GoECharger_Firmware’ changed from 050 to UNDEF
2021-06-02 00:31:01.185 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘GoECharger_AccessConfiguration’ changed from OPEN to UNDEF
2021-06-02 00:31:03.217 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘goecharger:goe:413602c5bf’ changed from OFFLINE (COMMUNICATION_ERROR): java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $ to UNINITIALIZED`
Your Environment
goe charger new hardware v3, new firmware 050 Important: the new firmware has a new api (“v2”) but it is also possible to use and enable the old (“v1”) api which I did. old v1 api is the same as in the past: http://192.168.1.8/status, http://192.168.1.8/mqtt?payload=amp=10 (works as it did in older hardware) (new v2 api: http://192.168.1.8/api/status)
I already had a look at the goecharger java files and found out that the v1 api is used. Unfortunately I am not experienced in Java. If I can support any developer by giving more information and testing please ask me.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 1
- Comments: 24 (5 by maintainers)
Thanks, you can always create a new issue if necessary
I guess you can close this bug. I reinstalled openhab, restored my backup, bundle:list shows 3.4.0 on the GO-eCharger Binding and all the parts I am using seem to work fine.
@lsiepel You can leave this bug open, I will add the binding and test it…
I think I am just not (yet) expierenced enough to give out the branch. Well, I managed to replace amp with amx. But I think this field is not available in V1. I managed to use the fields in tma. Because those fields just do not exist in V2 (and V1 ?) testing it against V1 would only be useful if I added code which is valid for all three versions. That seems to be too difficult for me at the moment.
To change the current the binding uses the field amp of the GO-E. Support recommends to use amx instead because amx is not written to the EEPROM, so using it instead prolongs the life of the box.
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!
So - now I need feedback how I (or better somebody more experienced) changes the code for the binding and submits it on github. We should discuss if omitting temperature will cause problems in existing installations.
I did some further tests and it seems that only part of the binding is working. I get messages like:
It would be interesting to find out if the binding is working on the old version of GO-E without these errors.
I have the same configuration and get the same error message. My programming experience doesn’t include java either, but I am willing to help too.
In https://community.openhab.org/t/go-e-charger-wallbox-binding/93338/46 you can find a comparison of old and new responses to goe-ip/status
I looked at the fields in the api-response to status and compared them to the file GoEStatusResponseDTO.jave in \org.openhab.binding.goecharger\src\main\java\org\openhab\binding\goecharger\internal\api
There is a field “tmp” - temperature but no corresponding match in the json answer to IP/status:
{"version":"B","tme":"0406212051","rbc":"17","rbt":"92613673","car":"1","amx":"10","amp":"10","err":"0","ast":"0","alw":"1","stp":"0","cbl":"0","pha":"56","fsp":"0","tma":[25,29.375],"dws":"0","dwo":"180","adi":"1","uby":"0","eto":"0","wst":"3","fwv":"050","nrg":[240,239,241,0,0,0,0,0,0,0,0,0,0,0,0,0],"sse":"050080","wss":"K-300","wke":"********","wen":"1","cdi":"0","tof":"101","tds":"1","lbr":"10","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":"1","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":0}At its place in the new answer is a field fsp of unknown meaning (between “pha” and “tma”). A search for “temperature” shows that this field is only used in 4 files, in GoEChargerHandler.java the option == null is handled.
So a quick and dirty solution could be to check if there is a field “tmp” in the API response and set temperatur to NULL if there isn’t.