├── README.md ├── go-eCharger API v1 DE.md ├── go-eCharger API v1 EN.md ├── go-eCharger Modbus TCP API v1 DE.md └── go-eCharger Modbus TCP API v1 EN.md /README.md: -------------------------------------------------------------------------------- 1 | # go-eCharger-API-v1 2 | API specification for go-eCharger Home+ with WiFi connection 3 | 4 | [Deutsche Version (German Version)](go-eCharger%20API%20v1%20DE.md) 5 | 6 | [English Version](go-eCharger%20API%20v1%20EN.md) 7 | 8 | # go-eCharger MODBUS TCP API 9 | [Deutsche Version (German Version)](go-eCharger%20Modbus%20TCP%20API%20v1%20DE.md) 10 | 11 | Feel free to create issues 12 | -------------------------------------------------------------------------------- /go-eCharger API v1 DE.md: -------------------------------------------------------------------------------- 1 | # go-eCharger API Specification 2 | 3 | **Diese Dokumentation ist für die Adapter-Firmware-Version 033 gültig.** 4 | 5 | # Index 6 | 7 | 1. [Verbindung](#1-Verbindung-) 8 | - [Rate Limiting](#rate-limiting) 9 | 2. [API: status](#2-api-status-) 10 | - [Request Pfad](#request-pfad) 11 | - [Rückgabeformat](#rückgabeformat) 12 | - [Parameter](#parameter) 13 | 3. [Kommandos](#3-kommandos-) 14 | - [Parameter setzen](#parameter-setzen) 15 | - [Pfad](#pfad) 16 | 4. [Rückgabewerte](#4-rückgabewerte-) 17 | - [Lokales WLAN / Hotspot](#lokales-wlan--hotspot) 18 | - [Cloud: REST Api](#cloud-rest-api) 19 | 5. [Cloud REST Api Workflow](#5-cloud-rest-api-workflow-) 20 | 6. [Eigener MQTT Server](#6-eigener-mqtt-server-) 21 | 22 | # 1. Verbindung : 23 | 24 | Der go-eCharger bietet zwei WLAN Interfaces, von denen eines immer als mobiler Hotspot dient 25 | und ein weiteres das sich mit einem vorhandenen WLAN Netzwerk verbinden kann um eine 26 | Internetverbindung herzustellen. 27 | 28 | Für die API werden folgende Verbindungen angeboten: 29 | 30 | | Verbindung | Pfad | 31 | | --------------------- | ------------------------------------------------------------------- | 32 | | WLAN Hotspot | http://192.168.4.1/ | 33 | | WLAN lokales Netzwerk | http://x.x.x.x/ Wobei die IP Adresse vom DHCP Server abgerufen wird | 34 | | Cloud: REST Api | https://api.go-e.co/ | 35 | | Eigener MQTT Server | | 36 | 37 | Authentifizierung: 38 | 39 | | Verbindung | Authentifizierung | 40 | | --------------------- | ------------------------------------------------------------------------------------------------------ | 41 | | WLAN Hotspot | Keine (Hotspot WPA key muss bekannt sein) | 42 | | WLAN lokales Netzwerk | Keine (Gerät muss im gleichen WLAN sein und die HTTP Api muss mit der go-eCharger App aktiviert werden | 43 | | Cloud: REST Api | go-eCharger Cloud Token | 44 | | Eigener MQTT Server | Keine | 45 | 46 | 47 | ### Rate Limiting 48 | 49 | | Verbindung | Limit | 50 | | --------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 51 | | WLAN Hotspot | Keines (5 Sekunden Abstand empfohlen) | 52 | | WLAN lokales Netzwerk | Keines (5 Sekunden Abstand empfohlen) | 53 | | Cloud: REST Api | **Fair use Limit**: : 50MB pro Monat, ca. 25’000 Requests. Bei
geplanter Überschreitung, bitte go-e GmbH kontaktieren! | 54 | | Eigener MQTT Server | Keines (5 Sekunden Abstand empfohlen) | 55 | 56 | # 2. API: status : 57 | 58 | Liefert alle relevanten Parameter als JSON Objekt zurück. 59 | 60 | Beispiele (unvollständig): 61 | 62 | ``` 63 | {"version":"B","rbc":"251","rbt":"2208867","car":"1","amp":"10","err":"0","ast" 64 | :"0","alw":"1","stp":"0","cbl":"0","pha":"8","tmp":"30","dws":"0","dwo":"0","ad 65 | i":"1","uby":"0","eto":"120","wst":"3","nrg":[2,0,0,235,0,0,0,0,0,0,0,0,0,0,0,0 66 | ],"fwv":"020-rc1","sse":"000000","wss":"goe","wke":"","wen":"1","tof":"101","td 67 | s":"1","lbr":"255","aho":"2","afi":"8","ama":"32","al1":"11","al2":"12","al3":" 68 | 15","al4":"24","al5":"31","cid":"255","cch":"65535","cfi":"65280","lse":"0","us 69 | t":"0","wak":"","r1x":"2","dto":"0","nmo":"0","eca":"0","ecr":"0","ecd":"0","ec 70 | 4":"0","ec5":"0","ec6":"0","ec7":"0","ec8":"0","ec9":"0","ec1":"0","rca":"","rc 71 | r":"","rcd":"","rc4":"","rc5":"","rc6":"","rc7":"","rc8":"","rc9":"","rc1":""," 72 | rna":"","rnm":"","rne":"","rn4":"","rn5":"","rn6":"","rn7":"","rn8":"","rn9":"" 73 | ,"rn1":""} 74 | ``` 75 | GO-E V3: 76 | ``` 77 | {"version":"B","tme":"1706211422","rbc":"25","rbt":"351133305","car":"1","amx":"12","amp":"12","err":"0","ast":"0","alw":"1","stp":"0","cbl":"0","pha":"56","fsp":"0","tma":[29.875,34.375],"dws":"0","dwo":"10","adi":"1","uby":"0","eto":"167","wst":"3","fwv":"050","nrg":[242,239,242,0,0,0,0,0,0,0,0,0,0,0,0,0],"sse":"050080","wss":"NN_WIFI__NN","wke":"********","wen":"1","cdi":"0","tof":"101","tds":"1","lbr":"10","aho":"0","afi":"18","azo":"0","ama":"16","al1":"6","al2":"8","al3":"10","al4":"13","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} 78 | ``` 79 | 80 | ### Request Pfad 81 | 82 | | Verbindung | Pfad | 83 | | -------------------- | ---------------------------------------------------------------------------------------- | 84 | | WLAN Hotspot | http://192.168.4.1/status | 85 | | WLAN lokalesNetzwerk | http://x.x.x.x/status | 86 | | Cloud: REST Api | https://api.go-e.co/api_status?token=TOKEN [&wait=0]
Der wait parameter ist optional | 87 | 88 | ### Rückgabeformat 89 | 90 | | Verbindung | Pfad | 91 | | -------------------- | ----------------------------------------------------------------- | 92 | | WLAN Hotspot | Plain STATUS_OBJECT | 93 | | WLAN lokalesNetzwerk | Plain STATUS_OBJECT | 94 | | Cloud: REST Api | {`"success":true,"age":AGE_IN_MILLISECONDS,"data":STATUS_OBJECT}` | 95 | 96 | ### Parameter 97 | 98 | Zusätzlich zu diesen Parametern können auch ohne vorherige Ankündigung und je nach Verbindungsart weitere Parameter dazu kommen. 99 | 100 | **Erklärung Format:** alle Parameter werden im JSON Objekt als String gesendet (in Anführungszeichen). Die meisten dieser Parameter können in ein Integer Format konvertiert werden. Der bei Format angegebene Datentyp zeigt die zu erwartende Größe. Sollte der String nicht in den angegebenen Datentyp konvertiert werden, soll ein Kommunikationsfehler angezeigt werden. 101 | 102 | | Parameter | Format | Erklärung | 103 | | ------------------------------------------------------------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 104 | | version | String (1) | **JSON Format.**
"B": Normalfall
"C":Wenn Ende-zu-Ende Verschlüsselung aktiviert | 105 | | rbc | uint32_t | **reboot_counter:** Zählt die Anzahl der Bootvorgänge. Wird mit der Ende-zu-Ende Verschlüsselung als Schutz gegen Replay Attacken gesendet. | 106 | | rbt | uint32_t | **reboot_timer:** Zählt die Millisekunden seit dem letzten Bootvorgang. Wird mit der Ende-zu-Ende Verschlüsselung als Schutz gegen Replay Attacken gesendet. Läuft nach 49 Tage über und erhöht dabei den reboot_counter. | 107 | | car | uint8_t | **Status PWM Signalisierung**
1: Ladestation bereit, kein Fahrzeug
2: Fahrzeug lädt
3: Warte auf Fahrzeug
4: Ladung beendet, Fahrzeug noch verbunden | 108 | | amp | uint8_t | Ampere Wert für die PWM Signalisierung in ganzen Ampere von **6-32A** | 109 | | amx | uint8_t | Ampere Wert für die PWM Signalisierung in ganzen Ampere von **6-32A**. Wird nicht auf dem Flash persistiert, verhält sich sonst aber gleich wie amp. Nach dem reboot wird amp auf den letzten Wert zurückgesetzt, der mit amp gesetzt wurde. Nutzung von amx für PV Regelung empfohlen. Nach dem Setzen von amp oder amx liefert die Box bei Anfragen den zuletzt gesetzten Wert unter beiden Variablen zurück. | 110 | | err | uint8_t | **error:**
1: RCCB (Fehlerstromschutzschalter)
3: PHASE (Phasenstörung)
8: NO_GROUND (Erdungserkennung)
10, default: INTERNAL (sonstiges) | 111 | | ast | uint8_t | **access_state:** Zugangskontrolle.
0: Offen
1: RFID / App benötigt
2: Strompreis / automatisch | 112 | | alw | uint8_t | **allow_charging:** PWM Signal darf anliegen
0: nein
1: ja | 113 | | stp | uint8_t | **stop_state:** ​Automatische Abschaltung
0: deaktiviert
2: nach kWh abschalten kWh | 114 | | cbl | uint8_t | **Typ2 ​Kabel Ampere codierung**
13-32: Ampere Codierung
0: kein Kabel | 115 | | pha | uint8_t | **Phasen** vor und nach dem Schütz
binary flags: 0b00ABCDEF
A ... phase 3, vor dem Schütz
B ... phase 2 vor dem Schütz
C ... phase 1 vor dem Schütz
D ... phase 3 nach dem Schütz
E ... phase 2 nach dem Schütz
F ... phase 1 nach dem Schütz
pha | 0b00001000: Phase 1 ist vorhanden
pha | 0b00111000: Phase1-3 ist vorhanden | 116 | | tmp | uint8_t | **Temperatur** des controller in °C (nur bis GO-E V2) 117 | | tma | array[1] | **Temperaturen** des Controllers in °C, ersetzt ab V3 tmp 118 | | dws | uint32_t | **Geladene Energiemenge** in Deka-Watt-Sekunden
Beispiel: 100'000 bedeutet, 1'000'000 Ws (= 277Wh = 0.277kWh)
wurden in diesem Ladevorgang geladen. | 119 | | dwo | uint16_t | **Abschaltwert** in 0.1kWh wenn stp==2, für dws Parameter
Beispiel: 105 fur 10,5kWh
Ladebox-Logik: if(dwo!=0 && dws/36000>=dwo)alw=0 | 120 | | adi | uint8_t | **adapter_in:** Ladebox ist mit Adapter angesteckt
0: NO_ADAPTER
1: 16A_ADAPTER | 121 | | uby | uint8_t | **unlocked_by:** Nummer der RFID Karte, die den jetzigen
Ladevorgang freigeschalten hat | 122 | | eto | uint32_t | **energy_total:** Gesamt geladene Energiemenge in 0.1kWh
Beispiel: 130 bedeutet 13kWh geladen | 123 | | wst | uint8_t | **wifi_state:** WLAN Verbindungsstatus
3: verbunden
default: nicht verbunden | 124 | | nrg | array[15] | Array mit Werten des Strom- und Spannungssensors
nrg[0]: Spannung auf L1 in volts
nrg[1]: Spannung auf L2 in volts
nrg[2]: Spannung auf L3 in volts
nrg[3]: Spannung auf N in volts
nrg[4]: Ampere auf L1 in 0.1A (123 entspricht 12.3A)
nrg[5]: Ampere auf L2 in 0.1A
nrg[6]: Ampere auf L3 in 0.1A
nrg[7]: Leistung auf L1 in 0.1kW (36 entspricht 3.6kW)
nrg[8]: Leistung auf L2 in 0.1kW
nrg[9]: Leistung auf L3 in 0.1kW
nrg[10]: Leistung auf N in 0.1kW
nrg[11]: Leistung gesamt 0.01kW (360 entspricht 3.6kW)
nrg[12]: Leistungsfaktor auf L1 in%
nrg[13]: Leistungsfaktor auf L2 in%
nrg[14]: Leistungsfaktor auf L3 in%
nrg[15]: Leistungsfaktor auf N in%

App Logik:
if(Math.floor(pha/8) ==1 &&
parseInt(nrg[3])>parseInt(nrg[0])){
nrg[0]=nrg[3]
nrg[7]=nrg[10]
nrg[12]=nrg[15]
} | 125 | | fwv | String | **Firmware Version**
Beispiel: "020-rc1" | 126 | | sse | String | **Seriennummer** als %06d formatierte Zahl
Example: "000001" | 127 | | wss | String | WLAN **SSID**
Beispiel: "Mein Heimnetzwerk" | 128 | | wke | String | WLAN **Key**
Beispiel: "**\*\*\*\***" für fwv ab 020
Beispiel: "password" für fwv vor 020 | 129 | | wen | uint8_t | **wifi_enabled:** Wi-Fi aktiviert
0: deaktiviert
1: aktiviert | 130 | | tof | uint8_t | **time_offset:** Zeitzone in Stunden für interne batteriegestützte Uhr +100
Beispiel: 101 entspricht GMT + 1 | 131 | | tds | uint8_t | **Daylight saving time offset** (Sommerzeit) in Stunden
Beispiel: 1 für Mitteleuropa | 132 | | lbr | uint8_t | **LED Helligkeit** von 0-255
0: LED aus
255: LED Helligkeit maximal | 133 | | aho | uint8_t | Minimale Anzahl von Stunden in der mit "Strompreis - automatisch" geladen werden muss.
Beispiel: 2 ("Auto ist nach 2 Stunden voll genug") | 134 | | afi | uint8_t | Stunde (Uhrzeit) in der mit "Strompreis - automatisch" die Ladung mindestens aho Stunden gedauert haben muss.
Beispiel: 7 ("Fertig bis 7:00, also davor mindestens 2 Stunden geladen") | 135 | | azo | uint8_t | Awattar Preiszone
0: Österreich
1: Deutschland | 136 | | ama | uint8_t | Absolute max. Ampere: Maximalwert für Ampere Einstellung
Beispiel: 20 (Einstellung auf mehr als 20A in der App nicht möglich) | 137 | | al1 | uint8_t | Ampere Level 1 für Druckknopf am Gerät.
6-32: Ampere Stufe aktiviert
0: Stufe deaktivert (wird übersprungen) | 138 | | al2 | uint8_t | Ampere Level 2 für Druckknopf am Gerät.
Muss entweder 0 oder > al1 sein | 139 | | al3 | uint8_t | Ampere Level 3 für Druckknopf am Gerät.
Muss entweder 0 oder > al2 sein | 140 | | al4 | uint8_t | Ampere Level 4 für Druckknopf am Gerät.
Muss entweder 0 oder > al3 sein | 141 | | al5 | uint8_t | Ampere Level 5 für Druckknopf am Gerät.
Muss entweder 0 oder > al4 sein | 142 | | cid | uint24_t | Color idle:**Farbwert für Standby** (kein Auto angesteckt) als Zahl
Beispiel: parseInt("#00FFFF"): 65535 (blau/grün, Standard) | 143 | | cch | uint24_t | Color charging: Farbwert für Ladevorgang aktiv, als Zahl
Beispiel: parseInt("#0000FF"):255 (blau, Standard) | 144 | | cfi | uint24_t | Color idle: **Farbwert für Ladevorgang abgeschlossen** als Zahl
Beispiel: parseInt("#00FF00"): 65280(grün, Standard) | 145 | | lse | uint8_t | **led_save_energy:** LED automatisch nach 10 Sekunden abschalten
0: Energiesparfunktion deaktiviert
1: Energiesparfunktion aktiviert.n
Achtung: setzen dieses Parameters mit r2x= | 146 | | ust | uint8_t | **unlock_state:** Kabelverriegelung Einstellung
0: Verriegeln solange Auto angesteckt
1: Nach Ladevorgang automatisch entriegeln
2: Kabel immer verriegelt lassen | 147 | | wak | String | WLAN **Hotspot Password**
Beispiel: "abdef0123456" | 148 | | r1x | uint8_t | **Flags**
0b1: HTTP Api im WLAN Netzwerk aktiviert (0:nein, 1:ja)
0b10: Ende-zu-Ende Verschlüsselung aktiviert (0: nein, 1: ja) | 149 | | dto | uint8_t | **Restzeit** in Millisekunden verbleibend auf Aktivierung durch Strompreise App-logik:
if (json.car==1) message = "Zuerst Auto anstecken"
else message = "Restzeit: …" | 150 | | nmo | uint8_t | **Norwegen-Modus** aktiviert
0: deaktiviert (Erdungserkennung aktiviert)
1: aktiviert (Erdungserkennung deaktiviert) | 151 | | eca
ecr
ecd
ec4
ec5
ec6
ec7
ec8
ec9
ec1 | uint32_t | Geladene **Energiemenge pro RFID Karte** von 1-10
Beispiel: eca == 1400: 140kWh auf Karte 1 geladen
Beispiel: ec7 == 1400: 140kWh auf Karte 7 geladen
Beispiel: ec1 == 1400: 140kWh auf Karte 10 geladen | 152 | | rca
rcr
rcd
rc4
rc5
rc6
rc7
rc8
rc9
rc1 | String | **RFID Karte ID** von 1-10 als string
Format und Länge: variabel, je nach Version | 153 | | rna
rnm
rne
rn4
rn5
rn6
rn7
rn8
rn9
rn1 | String | **RFID Karte Name** von 1-10
Maximallänge: 10 Zeichen | 154 | | tme | String |**Aktuelle Uhrzeit**, formatiert als ddmmyyhhmm
0104191236 entspricht to 01.04.2019 12:36 | 155 | | txi | String | transmit interface | 156 | | sch | String | **Scheduler einstellungen** (base64 encodiert)
Funktionen zum encodieren und decodieren gibt es hier:
https://gist.github.com/peterpoetzi/6cd2fad2a915a2498776912c5aa137a8
Die Einstellungen können so gesetzt werden:
r21=Math.floor(encode(1))
r31=Math.floor(encode(2))
r41=Math.floor(encode(3))
DEin direktes Setzen von sch= wird nicht unterstützt | 157 | | sdp | uint8_t | **Scheduler double press:** Aktiviert Ladung nach doppeltem Drücken des Button, wenn die Ladung gerade durch den Scheduler unterbrochen wurde
0: Funktion deaktiviert
1: Ladung sofort erlauben | 158 | | upd | uint8_t | **Update available** (nur verfügbar bei Verbindung über go-e Server)
0: kein Update verfügbar
1: Update verfügbar | 159 | | cdi | uint8_t | **Cloud disabled**
0: cloud enabled
1: cloud disabled | 160 | | loe | uint8_t | **Lastmanagement enabled**
0: Lastmanagement deaktiviert
1: Lastmanagement über Cloud aktiviert | 161 | | lot | uint8_t | **Lastmanagement Gruppe Total Ampere** | 162 | | lom | uint8_t | **Lastmanagement minimale Amperezahl** | 163 | | lop | uint8_t | **Lastmanagement Priorität** | 164 | | log | String | **Lastmanagement Gruppen ID** | 165 | | lon | uint8_t | **Lastmanagement: erwartete Anzahl von Ladestationen (derzeit nicht unterstützt)** | 166 | | lof | uint8_t | **Lastmanagement Fallback Amperezahl** | 167 | | loa | uint8_t | **Lastmanagement Ampere** (derzeitiger erlaubter Ladestrom)
wird vom Lastmanagement automatisch gesteuert | 168 | | lch | uint32_t | **Lastmanagement: Sekunden seit letztem Stromfluss bei noch angestecktem Auto**
0 when charging is in progress | 169 | | mce | uint8_t | **MQTT custom enabled**
Verbindung mit eigenen MQTT Server herstellen
0: Funktion deaktiviert
1: Funktion aktiviert | 170 | | mcs | String(63) | **MQTT custom Server**
Hostname ohne Protokollangabe (z.B. test.mosquitto.org) | 171 | | mcp | uint16_t | **MQTT custom Port**
z.B. 1883 | 172 | | mcu | String(16) | **MQTT custom Username** | 173 | | mck | String(16) | **MQTT custom key**
Für MQTT Authentifizierung | 174 | | mcc | uint8_t | **MQTT custom connected**
0: nicht verbunden
1: verbunden Seite | 175 | 176 | # 3. Kommandos : 177 | 178 | Folgende Parameter können nur gelesen werden: 179 | 180 | ``` 181 | version rbc rbt car err cbl pha tmp dws adi uby eto wst nrg fwv sse eca ecr 182 | ecd ec4 ec5 ec6 ec7 ec8 ec9 ec1 rca rcr rcd rc4 rc5 rc6 rc7 rc8 rc9 rc1 183 | ``` 184 | 185 | Folgende Parameter können gesetzt werden: 186 | 187 | ``` 188 | amp amx ast alw stp dwo wss wke wen tof tds lbr aho afi ama al1 al2 al3 al4 al5 189 | cid cch cfi lse ust wak r1x dto nmo rna rnm rne rn4 rn5 rn6 rn7 rn8 rn9 rn1 190 | ``` 191 | 192 | ### Parameter setzen 193 | 194 | Bei allen Parametern, die gesetzt werden können, ist das format für das Kommando: 195 | 196 | | Method | Payload | 197 | | ------ | ------------------------------------------------------------------ | 198 | | SET | [param]=[value]
Beispiel: amp=16
Beispiel: wss=my home network | 199 | 200 | ### Pfad 201 | 202 | | Verbindung | Pfad | 203 | | --------------------- | ---------------------------------------------------------------------------------------------------- | 204 | | WLAN Hotspot | http://192.168.4.1/mqtt?payload= | 205 | | WLAN lokales
Netzwerk | http://x.x.x.x/mqtt?payload= | 206 | | Cloud: REST Api | https://api.go-e.co/api?token=TOKEN&payload=MESSAGE | 207 | 208 | # 4. Rückgabewerte : 209 | 210 | ### Lokales WLAN / Hotspot 211 | 212 | | Verbindung | Rückgabe | 213 | | --------------------- | ------------------------------------------------------ | 214 | | WLAN Hotspot | Komplettes status JSON Objekt mit bereits geänderten Wert | 215 | | WLAN lokales
Netzwerk| Komplettes status JSON Objekt mit bereits geänderten Wert | 216 | 217 | Bei jedem Status Request und jedem Kommando wird das Status JSON-Objekt
zurückgegeben. Ein nicht erfolgreiches Kommando erkennt man daran dass sich der Wert im
Status Objekt nicht geändert hat. 218 | 219 | ### Cloud: REST Api 220 | 221 | Rückgabewerte für /api 222 | 223 | | Bedingung | Rückgabe | 224 | | ------------------------------ | --------------------------------------------- | 225 | | Token nicht angegeben | `{"success":false,"error":"no token"} ` | 226 | | Payload nichtangegeben | ` {"success":false,"error":"no payload"}` | 227 | | Token nicht in Datenbank gefunden | `{"success":false,"error":"wrong token"}` | 228 | | Rate limit exception | `{"success":false,"error":"rate limiting"}` | 229 | | Success | `{"success":true,"payload":original_payload}` | 230 | 231 | Rückgabewerte für /api_status 232 | 233 | | Bedingung | Rückgabe | 234 | | ------------------------------ | ----------------------------------------------------------------- | 235 | | Token nicht angegeben | `{"success":false,"error":"no token"}` | 236 | | Token nicht in Datenbank gefunden | `{"success":false,"error":"wrong token"}` | 237 | | Rate limit exception | `{"success":false,"error":"rate limiting"}` | 238 | | Status nicht abrufbar | `{"success":false,"error":"other"}` | 239 | | Success | ``{"success":true,"age":AGE_IN_MILLISECONDS,"data":STATUS_OBJECT} | 240 | 241 | Antwortzeit für /api_status 242 | 243 | | Bedingung | Rückgabe | 244 | | ------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 245 | | Letzter Status
<10 Sekunden alt | ~ 300 Millisekunden | 246 | | Letzter Status
10 Sekunden alt | **Wenn wait=1:**
~300 bis ~3500 Millisekunden

**Wenn wait=0:**
~300 Millisekunden

**Erklärung:** Wenn wait=1 **(default)** API Server sendet Ping an Ladebox und wartet bis zu 3 Sekunden auf ein neues Status Objekt. Falls nach 3 Sekunden kein neuer Status kommt, wird der zuletzt empfangene Status gesendet| 247 | | Status nicht
abrufbar | < 1000 Millisekunden | 248 | 249 | # 5. Cloud REST Api Workflow: 250 | 251 | Beispiele: 252 | 253 | | Aktion | Ladestrom auf 16A stellen | 254 | | -------- | --------------------------------------------------------- | 255 | | URL | https://api.go-e.co/api?payload=amp=16&token=_________ | 256 | | Response | ` {"success":true,"payload":"amp=16"}` | 257 | 258 | | Aktion | Ladung deaktivieren | 259 | | -------- | -------------------------------------------------------- | 260 | | URL | https://api.go-e.co/api?payload=alw=0&token=__________ | 261 | | Response | `{"success":true,"payload":"alw=0"}` | 262 | 263 | | Aktion | Activate Ladung aktivieren | 264 | | -------- | -------------------------------------------------------- | 265 | | URL | https://api.go-e.co/api?payload=alw=1&token=_____________ | 266 | | Response | `{"success":true,"payload":"alw=1"}` | 267 | 268 | | Aktion |Status abfragen | 269 | | ------------------------ | ------------------------------------------------------------------------------------------------------- | 270 | | URL | https://api.go-e.co/api_status?token=___________ &wait=0 | 271 | | Response
(simplified) | `{"success":true,"age":1234,"data":{"version":"B", [...] ,
"car":"1","amp":"16","err":"0", [...] }}` | 272 | 273 | # 6. Eigener MQTT Server: 274 | 275 | Ab Firmware Version 030 ist es möglich einen eigenen MQTT Server zusätzlich zur go-e Cloud zu verwenden
276 |
277 | Kommandos werden über dieses Topic entgegengenommen:
**go-eCharger/000000/cmd/req**
Wobei 000000 durch die jeweilige Seriennummer ersetzt werden muss.
278 |
279 | Das Status Objekt wird alle 5 Sekunden über folgendes Topic ausgegeben:
**go-eCharger/000000/status**
280 |
281 | Es ist nicht notwendig das Senden speziell zu aktivieren, der go-eCharger sendet durchgehend Daten auf /status. 282 | -------------------------------------------------------------------------------- /go-eCharger API v1 EN.md: -------------------------------------------------------------------------------- 1 | # go-eCharger API Specification (english version) 2 | 3 | **This documentation is valid for firmware version of the adapter 033** 4 | 5 | # Index 6 | 7 | 1. [Connection](#1-connection-) 8 | - [Rate Limiting](#rate-limiting) 9 | 2. [API: status](#2-api-status-) 10 | - [Request Path](#request-path) 11 | - [Return Format](#return-format) 12 | - [Parameter](#parameter) 13 | 3. [Commands](#3-commands-) 14 | - [Set parameter](#set-parameter) 15 | - [Path](#path) 16 | 4. [Return Values](#4-return-values-) 17 | - [Local WiFi / Hotspot](#local-wifi--hotspot) 18 | - [Cloud: REST Api](#cloud-rest-api) 19 | 5. [Cloud REST Api Workflow](#5-cloud-rest-api-workflow-) 20 | 6. [Custom MQTT Server](#6-custom-mqtt-server-) 21 | 22 | # 1. Connection: 23 | 24 | The go-eCharger offers two WLAN interfaces, one of which always serves as a mobile hotspot 25 | and another that can connect to an existing WLAN network to establish an Internet connection. 26 | The following connections are offered for the API: 27 | 28 | The following connections are offered for the API: 29 | 30 | | Connection | Path | 31 | | ------------------ | ---------------------------------------------------------------- | 32 | | WiFi Hotspot | http://192.168.4.1/ | 33 | | WiFi local network | http://x.x.x.x/ The IP address is retrieved from the DHCP server | 34 | | Cloud: REST Api | https://api.go-e.co/ | 35 | | Custom MQTT Server | | 36 | 37 | Authentication: 38 | 39 | | Connection | Authentication | 40 | | ------------------ | -------------------------------------------------------------------------------------------------- | 41 | | WiFi Hotspot | None (Hotspot WPA key must be known) | 42 | | WiFi local network | None (device must be in the same WLAN and the HTTP Api must be activated with the go-eCharger app) | 43 | | Cloud: REST Api | go-eCharger Cloud Token | 44 | | Custom MQTT Server | None | 45 | 46 | ### Rate Limiting 47 | 48 | | Verbindung | Limit | 49 | | ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 50 | | WiFi Hotspot | None (5 second delay recommended) | 51 | | WiFi local network | None (5 second delay recommended) | 52 | | Cloud: REST Api | **Fair use Limit** : 50MB per month, about 500'000 requests. In case
of planned exceeding, please contact go-e GmbH!

**/api_status**
**Fair use Limit**: 50MB per month, about 25'000 requests. In case of
planned exceeding, please contact go-e GmbH! | 53 | |Custom MQTT Server | None (5 second delay recommended) | 54 | 55 | # 2. API: status: 56 | 57 | Returns all relevant parameters as a JSON object. 58 | 59 | Example (incomplete): 60 | 61 | ``` 62 | {"version":"B","rbc":"251","rbt":"2208867","car":"1","amp":"10","err":"0","ast" 63 | :"0","alw":"1","stp":"0","cbl":"0","pha":"8","tmp":"30","dws":"0","dwo":"0","ad 64 | i":"1","uby":"0","eto":"120","wst":"3","nrg":[2,0,0,235,0,0,0,0,0,0,0,0,0,0,0,0 65 | ],"fwv":"020-rc1","sse":"000000","wss":"goe","wke":"","wen":"1","tof":"101","td 66 | s":"1","lbr":"255","aho":"2","afi":"8","ama":"32","al1":"11","al2":"12","al3":" 67 | 15","al4":"24","al5":"31","cid":"255","cch":"65535","cfi":"65280","lse":"0","us 68 | t":"0","wak":"","r1x":"2","dto":"0","nmo":"0","eca":"0","ecr":"0","ecd":"0","ec 69 | 4":"0","ec5":"0","ec6":"0","ec7":"0","ec8":"0","ec9":"0","ec1":"0","rca":"","rc 70 | r":"","rcd":"","rc4":"","rc5":"","rc6":"","rc7":"","rc8":"","rc9":"","rc1":""," 71 | rna":"","rnm":"","rne":"","rn4":"","rn5":"","rn6":"","rn7":"","rn8":"","rn9":"" 72 | ,"rn1":""} 73 | ``` 74 | 75 | ### Request Path 76 | 77 | | Connection | Path | 78 | | ------------------ | --------------------------------------------------------------------------------------- | 79 | | WiFi Hotspot | http://192.168.4.1/status | 80 | | WiFi local network | http://x.x.x.x/status | 81 | | Cloud: REST Api | https://api.go-e.co/api_status?token=TOKEN [&wait=0]
The wait parameter is optional | 82 | 83 | ### Return Format 84 | 85 | | Connection | Path | 86 | | ------------------ | ----------------------------------------------------------------- | 87 | | WiFi Hotspot | Plain STATUS_OBJECT | 88 | | WiFi local network | Plain STATUS_OBJECT | 89 | | Cloud: REST Api | `{"success":true,"age":AGE_IN_MILLISECONDS,"data":STATUS_OBJECT}` | 90 | 91 | ### Parameter 92 | 93 | In addition to these parameters, other parameters may also be added without prior notice and depending on the type of connection. 94 | 95 | **Explanation Format:** All parameters are sent in the JSON object as a string (in quotation 96 | marks). Most of these parameters can be converted to an integer format. The data type 97 | specified in the format shows the expected size. If the string is not converted to the specified 98 | data type, a communication error should be displayed. 99 | 100 | | Parameter | Format | Explanation | 101 | | ------------------------------------------------------------------- | ---------- | --------------------------------------------------------------------------------------------------------------------------------------- | 102 | | version | String (1) | **JSON Format.**
"B": normal case
"C": When end-to-end encryption is enabled | 103 | | rbc | uint32_t | **reboot_counter:** Counts the number of boot operations. Sent with end-to-end encryption as protection against replay attacks. | 104 | | rbt | uint32_t | **reboot_timer:** Counts the milliseconds since the last boot. Sent with end-to-end encryption as protection against replay attacks.
Expires after 49 days, increasing the reboot_counter. | 105 | | car | uint8_t | **Status PWM Signaling**
1: charging station ready, no vehicle
2: vehicle loads
3: Waiting for vehicle
4: Charge finished, vehicle still connected | 106 | | amp | uint8_t | Ampere value for the PWM signaling in whole ampere of **6-32A** | 107 | | amx | uint8_t | Ampere value for the PWM signaling in whole ampere of **6-32A** Will not be written on flash but acts like you set amp instead. Only on the next reboot, the amp value will be restored to the last value set with amp. Recommended for PV charging | 108 | | err | uint8_t | **error:**
1: RCCB (Residual Current Device)
3: PHASE (phase disturbance)
8: NO_GROUND (earthing detection)
10, default: INTERNAL (other) | 109 | | ast | uint8_t | **access_state:** Access control.
0: open
1: RFID / App needed
2: electricity price / automatic | 110 | | alw | uint8_t | **allow_charging:** PWM signal may be present
0: no
1: yes | 111 | | stp | uint8_t | **stop_state:** Automatic shutdown
0: deactivated
2: switch off after kWh | 112 | | cbl | uint8_t | **Typ2 Cable Ampere encoding**
13-32: Ampere Codierung
0: no cable | 113 | | pha | uint8_t | **Phasen** before and after the contactor
binary flags: 0b00ABCDEF
A ... phase 3, in front of the contactor
B ... phase 2 in front of the contactor
C ... phase 1 in front of the contactor
D ... phase 3 after the contactor
E ... phase 2 after the contactor
F ... phase 1 after the contactor
Example: 0b00001000: Phase 1 is available
Example: 0b00111000: Phase1-3 is available | 114 | | tmp | uint8_t | **Temperature** of the controller in °C | 115 | | dws | uint32_t | **Charged energy** in deca-watt seconds
Example: 100'000 means, 1'000'000 Ws (= 277Wh = 0.277kWh)
were charged during this charging process. | 116 | | dwo | uint16_t | **Shutdown value** in 0.1kWh if stp==2, for dws parameter
Example: 105 for 10,5kWh
Charging station logic: if(dwo!=0 && dws/36000>=dwo)alw=0 | 117 | | adi | uint8_t | **adapter_in:** Charging box is plugged in with adapter
0: NO_ADAPTER
1: 16A_ADAPTER | 118 | | uby | uint8_t | **unlocked_by:** Number of the RFID card that has activated the
current charging process | 119 | | eto | uint32_t | **energy_total:** Total charged energy in 0.1kWh
Example: 130 means 13kWh charged | 120 | | wst | uint8_t | **wifi_state:** Wi-Fi connection status
3: connected
default: not connected | 121 | | nrg | array[15] | Array with values of the current and voltage sensor
nrg [0]: voltage on L1 in volts
nrg [1]: voltage on L2 in volts
nrg [2]: voltage on L3 in volts
nrg [3]: voltage to N in volts
nrg [4]: Ampere on L1 in 0.1A (123 equals 12.3A)
nrg [5]: Ampere on L2 in 0.1A
nrg [6]: Ampere on L3 in 0.1A
nrg [7]: power on L1 in 0.1kW (36 equals 3.6kW)
nrg [8]: power on L2 in 0.1kW
nrg [9]: power at L3 in 0.1kW
nrg [10]: power at N in 0.1kW
nrg [11]: Total power in 0.01kW (360 equals 3.6kW)
nrg [12]: power factor on L1 in%
nrg [13]: power factor on L2 in%
nrg [14]: power factor on L3 in%
nrg [15]: Power factor on N in%

App logic:
if(Math.floor(pha/8) ==1 &&
parseInt(nrg[3])>parseInt(nrg[0])){
nrg[0]=nrg[3]
nrg[7]=nrg[10]
nrg[12]=nrg[15]
} | 122 | | fwv | String | **Firmware Version**
Example: "020-rc1" | 123 | | sse | String | **Serial number** number formatted as %06d
Example: "000001" | 124 | | wss | String | WiFi **SSID**
Example: "My home network" | 125 | | wke | String | WiFi **Key**
Example: "**\*\*\*\***" for fwv after 020
Example: "password" for fwv before 020 | 126 | | wen | uint8_t | **wifi_enabled:** Wi-Fi enabled
0: deactivated
1: activated | 127 | | tof | uint8_t | **ime_offset:** Time zone in hours for internal battery-powered clock +100
Example: 101 is GMT +1 | 128 | | tds | uint8_t | **Daylight saving time offset** (Summer time) in hours
Example: 1 for Central Europe | 129 | | lbr | uint8_t | **LED brightness** from 0-255
0: LED off
255: LED brightness maximum | 130 | | aho | uint8_t | Minimum number of hours in which to load with "electricity price - automatic"
Example: 2 ("Car is full enough after 2 hours") | 131 | | afi | uint8_t | Hour **(time)** in which with "electricity price - automatically" the charge must have lasted at least aho hours.
Example: 7 ("Done until 7:00, so before at least 2 hours loaded") | 132 | | azo | uint8_t | Awattar price zone
0: Austria
1: Germany | 133 | | ama | uint8_t | Absolute max. Ampere: Maximum value for ampere setting
Example: 20 (can not be set to more than 20A in the app) | 134 | | al1 | uint8_t | Ampere Level 1 for push button on the device.
6-32: Ampere level activated
0: level deactivated (is skipped) | 135 | | al2 | uint8_t | Ampere Level 2 for push button on the device.
Must be either 0 or >al1 | 136 | | al3 | uint8_t | Ampere Level 3 for push button on the device.
Must be either 0 or >al2 | 137 | | al4 | uint8_t | Ampere Level 4 for push button on the device.
Must be either 0 or >al3 | 138 | | al5 | uint8_t | Ampere Level 5 for push button on the device.
Must be either 0 or >al4 | 139 | | cid | uint24_t | Color idle: **color value for standby** (no car plugged in) as a number
Example: parseInt ("# 00FFFF"): 65535 (blue / green, default) | 140 | | cch | uint24_t | Color charging: **color value for charging active,** as a number
Example: parseInt ("# 0000FF"): 255 (blue, default) | 141 | | cfi | uint24_t | Color idle: **color value completed for charging,** as a number
Example: parseInt ("# 00FF00"): 65280 (green, default) | 142 | | lse | uint8_t | **led_save_energy:** Turn off the LED automatically after 10 seconds
0: Energy saving function deactivated
1: Energy saving function activated | 143 | | ust | uint8_t | **unlock_state:** Cable lock adjustment
0: lock as long as the car is plugged in
1: Automatically unlock after charging
2: Always leave the cable locked | 144 | | wak | String | WiFi **Hotspot Password**
Example: "abdef0123456" | 145 | | r1x | uint8_t | **Flags**
0b1: HTTP Api in the WLAN network activated (0: no, 1: yes)
0b10: End-to-end encryption enabled (0: no, 1: yes) | 146 | | dto | uint8_t | **Remaining time** in milliseconds remaining on activation by
electricity prices
App logic:
if(json.car==1)message = "Zuerst Auto anstecken"
else message = "Restzeit: …" | 147 | | nmo | uint8_t | **Norway mode** activated
0: deactivated (earthing detection activated)
1: activated (no earthing detection, intended only for IT grids) | 148 | | eca
ecr
ecd
ec4
ec5
ec6
ec7
ec8
ec9
ec1 | uint32_t | Charged **energy per RFID card** from 1-10
Example: eca == 1400: 140kWh charged on card 1
Example: ec7 == 1400: 140kWh charged on board 7
Example: ec1 == 1400: 140kWh charged on card 10 | 149 | | rca
rcr
rcd
rc4
rc5
rc6
rc7
rc8
rc9
rc1 | String | **RFID Card ID** from 1-10 as a string
Format and length: variable, depending on the version | 150 | | rna
rnm
rne
rn4
rn5
rn6
rn7
rn8
rn9
rn1 | String | **RFID Card Name** from 1-10
Maximum length: 10 characters | 151 | | tme | String | **Current time**, formatted as ddmmyyhhmm
0104191236 corresponds to 01.04.2019 12:36 | 152 | | sch | String | **Scheduler settings** (base64 encoded)
Functions for encode and decode are here:
https://gist.github.com/peterpoetzi/6cd2fad2a915a2498776912c5aa137a8
The settings can be set in this way:
r21=Math.floor(encode(1))
r31=Math.floor(encode(2))
r41=Math.floor(encode(3))
Direct setting of sch = is not supported | 153 | | sdp | uint8_t | **Scheduler double press:** Activates charge after double pressing the
button if the load has just been interrupted by the scheduler
0: Function disabled
1: Allow charge immediately | 154 | | upd | uint8_t | **Update available** (only available if connected via go-e server)
0: no update available
1: Update available | 155 | | cdi | uint8_t | **Cloud disabled**
0: cloud enabled
1: cloud disabled | 156 | | loe | uint8_t | **Load balancing enabled**
0: load balancing disabled
1: Load balancing activated via cloud | 157 | | lot | uint8_t | **Load balancing group total ampere** | 158 | | lom | uint8_t | **Load balancing minimum amperage** | 159 | | lop | uint8_t | **Load balancing priority** | 160 | | log | String | **Load balancing group ID** | 161 | | lon | uint8_t | **Load balancing:expected number of charging stations
(currently not supported)** | 162 | | lof | uint8_t | **Load balancing fallback amperage** | 163 | | loa | uint8_t | **Load balancing Ampere** (current permitted charging current)
is automatically controlled by the load balancing) | 164 | | lch | uint32_t | **Load balancing: seconds since the last current flow while the
car is still plugged in**
0 when charging is in progress | 165 | | mce | uint8_t | **MQTT custom enabled**
Connect to your own MQTT server
0: Function disabled
1: Function activated | 166 | | mcs | String(63) | **MQTT custom Server**
Hostname without protocol specification (z.B. test.mosquitto.org) | 167 | | mcp | uint16_t | **MQTT custom Port**
i.e. 1883 | 168 | | mcu | String(16) | **MQTT custom Username** | 169 | | mck | String(16) | **MQTT custom key**
For MQTT authentication | 170 | | mcc | uint8_t | **MQTT custom connected**
0: not connected
1: connected | 171 | 172 | # 3. Commands: 173 | 174 | The following parameters can only be read: 175 | 176 | ``` 177 | version rbc rbt car err cbl pha tmp dws adi uby eto wst nrg fwv sse eca ecr 178 | ecd ec4 ec5 ec6 ec7 ec8 ec9 ec1 rca rcr rcd rc4 rc5 rc6 rc7 rc8 rc9 rc1 179 | ``` 180 | 181 | The following parameters can be set: 182 | 183 | ``` 184 | amp amx ast alw stp dwo wss wke wen tof tds lbr aho afi ama al1 al2 al3 al4 al5 185 | cid cch cfi lse ust wak r1x dto nmo rna rnm rne rn4 rn5 rn6 rn7 rn8 rn9 rn1 186 | ``` 187 | 188 | ### Set parameter 189 | 190 | For all parameters that can be set, the format is for the command: 191 | 192 | | Method | Payload | 193 | | ------ | ------------------------------------------------------------------ | 194 | | SET | [param]=[value]
Example: amp=16
Example: wss=my home network | 195 | 196 | ### Path 197 | 198 | | Connection | Path | 199 | | --------------------- | ---------------------------------------------------------------------------------------------------- | 200 | | WiFi Hotspot | http://192.168.4.1/mqtt?payload= | 201 | | WiFi local network | http://x.x.x.x/mqtt?payload= | 202 | | Cloud: REST Api | https://api.go-e.co/api?token=TOKEN&payload=MESSAGE | 203 | 204 | # 4. Return Values: 205 | 206 | ### Local WiFi / Hotspot 207 | 208 | | Connection | Response | 209 | | --------------------- | ------------------------------------------------------ | 210 | | WiFi Hotspot | Complete status JSON object with already changed value | 211 | | WiFi local network | Complete status JSON object with already changed value | 212 | 213 | For every status request and every command, the status JSON object is returned. An
unsuccessful command can be recognized by the fact that the value in the status object has not changed. 214 | 215 | ### Cloud: REST Api 216 | 217 | Responses for /api 218 | 219 | | Condition | Response | 220 | | ------------------------------ | --------------------------------------------- | 221 | | Token not specified | `{"success":false,"error":"no token"}` | 222 | | Payload not specified | `{"success":false,"error":"no payload"}` | 223 | | Token not found in database | `{"success":false,"error":"wrong token"}` | 224 | | Rate limit exception | `{"success":false,"error":"rate limiting"}` | 225 | | Success | `{"success":true,"payload":original_payload}` | 226 | 227 | Return values for /api_status 228 | 229 | | Condition | Response | 230 | | ------------------------------ | ----------------------------------------------------------------- | 231 | | Token not specified | `{"success":false,"error":"no token"}` | 232 | | Token not found in database | `{"success":false,"error":"wrong token"}` | 233 | | Rate limit exception | `{"success":false,"error":"rate limiting"}` | 234 | | Status not available | `{"success":false,"error":"other"}` | 235 | | Success | `{"success":true,"age":AGE_IN_MILLISECONDS,"data":STATUS_OBJECT}` | 236 | 237 | Response time for /api_status 238 | 239 | | Condition | Response time | 240 | | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------- | 241 | | Last Status <10 seconds old | ~300 milliseconds | 242 | | Last Status 10 seconds old | **If wait=1:**
~300 bis ~3500 milliseconds

**If wait=0:**
~300 milliseconds

**Explanation:** If wait=1 **(default)** API Server sends ping to load box and waits up to 3 seconds for a new status object. If no new
status arrives after 3 seconds, the last received status will be sent. | 243 | | Status nicht abrufbar | < 1000 milliseconds | 244 | 245 | # 5. Cloud REST Api Workflow: 246 | 247 | Examples: 248 | 249 | |Action |Set charging current to 16A| 250 | |---|---| 251 | |URL |https://api.go-e.co/api?payload=amp=16&token=__________| 252 | |Response|`` {"success":true,"payload":"amp=16"}``| 253 | 254 | |Action |Deactivate charging| 255 | |---|---| 256 | |URL| https://api.go-e.co/api?payload=alw=0&token=__________| 257 | |Response | ``{"success":true,"payload":"alw=0"}``| 258 | 259 | |Action| Activate charging| 260 | |---|---| 261 | |URL| https://api.go-e.co/api?payload=alw=1&token=__________| 262 | |Response |``{"success":true,"payload":"alw=1"}``| 263 | 264 | |Action |Get Status| 265 | |---|---| 266 | |URL |https://api.go-e.co/api_status?token=__________ &wait=0| 267 | |Response
(simplified)|``{"success":true,"age":1234,"data":{"version":"B", [...] ,
"car":"1","amp":"16","err":"0", [...] }}``| 268 | 269 | # 6. Custom MQTT Server: 270 | 271 | From firmware version 030 on it is possible to use a separate MQTT server in addition to the
go-e cloud.
272 |
273 | Commands are accepted via this topic:
**go-eCharger/000000/cmd/req**
Where 000000 must be replaced by the respective serial number.
274 |
275 | The status object is output every 5 seconds via the following topic:
**go-eCharger/000000/status**
276 |
277 | It is not necessary to activate the sending, the go-eCharger continuously sends data to /status. 278 | -------------------------------------------------------------------------------- /go-eCharger Modbus TCP API v1 DE.md: -------------------------------------------------------------------------------- 1 | # GO-E Charger Modbus TCP/IP Dokumentation Deutsch 2 | 3 | | Version | Date | Author | Description | 4 | | ------- | ---------- | ----------- | --------------- | 5 | | 1.0 | 2020-10-01 | Peter Pötzi | Initial version | 6 | 7 | # Index 8 | 9 | * [Aktivierung](#activation) 10 | * [Verbindung](#connection) 11 | * [Modbus Register](#modbusregister) 12 | * [Code Beispiele](#example) 13 | 14 | + [ Verbindung mit dem Charger herstellen ](#connect) 15 | + [ Daten über den Input Register auslesen ](#getinputregister) 16 | + [ Daten über den Holding Register auslesen ](#getholdingregister) 17 | + [ Daten über den Holding Register eintragen ](#setholdingregister) 18 | + [ Socket schließen ](#close) 19 | + [ Socket öffnen ](#open) 20 | 21 | ### Doku zu den verwendeten libraries 22 | 23 | * [net](https://nodejs.org/api/net.html) 24 | * [jsmodbus](https://www.npmjs.com/package/jsmodbus) 25 | 26 | 27 | ## Aktivierung der API 28 | 29 | Um die API zu aktivieren muss in der go-eCharger app unter Erweiterte Einstellungen der
30 | API Zugriff aktiviert werden. Nach der Aktivierung ist ein Neustart der Ladebox notwendig.
31 | Die API steht erst ab Firmware Version 0.40 zur Verfügung. 32 | 33 | 34 | ## Verbindung 35 | 36 | Modbus TCP wird über folgende Verbindungen angeboten: 37 | 38 | | Verbindung | Port | 39 | | ---------- | ---- | 40 | | WLAN | 502 | 41 | 42 | Der go-e Charger hat die Geräte ID 1. 43 | 44 | 45 | ## Modbus Register 46 | 47 | Die Register ID ist 0-Indiziert. Daher muss für manche Clients die Register ID um 1
48 | erhöht werden. 49 | 50 | Register sind als Holding Register oder Input Register ausgeführt. 51 | 52 | * Holding Register erlauben ein Lesen und Schreiben 53 | * Input Register nur ein Lesen. 54 | 55 | Bei Werten die über mehrere Register gehen sind alle 16-Bit Packete ein big-endian. 56 | Der go-eCharger verwendet standardmäßig Big Endian (Word Swap). 57 | 58 | 59 | | Register | Bezeichnung | Register Typ | Datentyp | Länge | Beschreibung | 60 | | -------------------------------------- | --------------------------- | ----------------- | --------------------- | ----- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 61 | | 100 | CAR_STATE | Input Register | unsigned integer (16) | 1 | **Status PWM Signalisierung**
0: unbekannt, Ladestation defekt
1: Ladestation bereit, kein Fahrzeug
2: Fahrzeug lädt
3: Warte auf Fahrzeug
4: Ladung beendet, Fahrzeug noch
verbunden | 62 | | 101 | PP_CABLE | Input Register | unsigned integer (16) | 1 | Typ2 **Kabel Ampere codierung**
13-32: Ampere Codierung
0: kein Kabel | 63 | | 105
106 | FWV | Input Register | ascii (4 byte) | 2 | Firmware Version als ASCII | 64 | | 107 | ERROR | Input Register | unsigned integer (16) | 1 | error:
1: RCCB (Fehlerstromschutzschalter)
3: PHASE (Phasenstörung)
8: NO_GROUND (Erdungserkennung)
10, default: INTERNAL (sonstiges) | 65 | | 108
109 | VOLT_L1 | Input Register | unsigned integer (32) | 2 | Spannung auf L1 in Volt | 66 | | 110
111 | VOLT_L2 | Input Register | unsigned integer (32) | 2 | Spannung auf L2 in Volt | 67 | | 112
113 | VOLT_L3 | Input Register | unsigned integer (32) | 2 | Spannung auf L3 in Volt | 68 | | 114
115 | AMP_L1 | Input Register | unsigned integer (32) | 2 | Ampere auf L1 in 0.1A (123 entspricht 12, 3A) | 69 | | 116
117 | AMP_L2 | Input Register | unsigned integer (32) | 2 | Ampere auf L2 in 0.1A (123 entspricht 12, 3A) | 70 | | 118
119 | AMP_L3 | Input Register | unsigned integer (32) | 2 | Ampere auf L3 in 0.1A (123 entspricht 12, 3A) | 71 | | 120
121 | POWER_TOTAL | Input Register | unsigned integer (32) | 2 | Leistung gesamt in 0.01kW (360 entspricht 3, 6kW) | 72 | | 128
129 | ENERGY_TOTAL | Input Register | unsigned integer (32) | 2 | Gesamt geladene Energiemenge in 0.1kWh | 73 | | 132
133 | ENERGY_CHARGE | Input Register | unsigned integer (32) | 2 | **Geladene Energiemenge** in
Deka-Watt-Sekunden
Beispiel:100’000 bedeutet, 1’000’000
Ws (=277Wh = 0, 277kWh) wurden in
diesem Ladevorgang geladen. | 74 | | 144
145 | VOLT_N | Input Register | unsigned integer (32) | 2 | Spannung auf N in Volt | 75 | | 146
147 | POWER_L1 | Input Register | unsigned integer (32) | 2 | Leistung auf L1 in 0.1kW (36 entspricht 3, 6kW) | 76 | | 148
149 | POWER_L2 | Input Register | unsigned integer (32) | 2 | Leistung auf L2 in 0.1kW (36 entspricht 3, 6kW) | 77 | | 150
151 | POWER_L3 | Input Register | unsigned integer (32) | 2 | Leistung auf L3 in 0.1kW (36 entspricht 3, 6kW) | 78 | | 152
153 | POWER_FACTOR_L1 | Input Register | unsigned integer (32) | 2 | Leistungsfaktor auf L1 in % | 79 | | 154
155 | POWER_FACTOR_L2 | Input Register | unsigned integer (32) | 2 | Leistungsfaktor auf L2 in % | 80 | | 156
157 | POWER_FACTOR_L3 | Input Register | unsigned integer (32) | 2 | Leistungsfaktor auf L3 in % | 81 | | 158
159 | POWER_FACTOR_N | Input Register | unsigned integer (32) | 2 | Leistungsfaktor auf N in % | 82 | | 200 | ALLOW | Holding Register | unsigned integer (16) | 1 | **allow_charging:** PWM Signal darf
anliegen
0: nein
1: ja | 83 | | 201 | ACCESS_STATE | Holding Register | unsigned integer (16) | 1 | **access_state**: Zugangskontrolle.
0: Offen
1: RFID / App benötigt
2: Strompreis / automatisch
3: Scheduler | 84 | | 202 | ADAPTER_INPUT | Input Register | unsigned integer (16) | 1 | **adapter_in**: Ladebox ist mit Adapter
angesteckt
0: NO_ADAPTER
1: 16A_ADAPTER | 85 | | 203 | UNLOCKED_BY | Input Register | unsigned integer (16) | 1 | Nummer der RFID Karte, die den
jetzigen Ladevorgang freigeschalten
hat | 86 | | 204 | CABLE_LOCK_MODE | Holding Register | unsigned integer (16) | 1 | Kabelverriegelung Einstellung
0: Verriegeln solange Auto angesteckt
1: Nach Ladevorgang automatisch
entriegeln
2: Kabel immer verriegelt lassen | 87 | | 205 | PHASES | Input Register | unsigned integer (16) | 1 | **Phasen** vor und nach dem Schütz
binary flags: 0b00ABCDEF
A... phase 3, vor dem Schütz
B... phase 2 vor dem Schütz
C... phase 1 vor dem Schütz
D... phase 3 nach dem Schütz
E... phase 2 nach dem Schütz
F... phase 1 nach dem Schütz
pha 0b00001000: Phase 1 ist
vorhanden
pha 0b00111000: Phase1-3 ist
vorhanden
| 88 | | 206 | LED_BRIGHTNESS | Holding Register | unsigned integer (16) | 1 | **LED Helligkeit** von 0-255
0: LED aus
255: LED Helligkeit maxima | 89 | | 207 | LED_SAVE_ENERGY | Holding Register | unsigned integer (16) | 1 | **led_save_energy**: LED automatisch
nach 10 Sekunden abschalten
0: Energiesparfunktion deaktiviert
1: Energiesparfunktion aktiviert | 90 | | 208 | ELECTRICITY_PRICES_HOURS | Holding Register | unsigned integer (16) | 1 | Minimale **​Anzahl** ​von Stunden in der
mit "Strompreis - automatisch" geladen
werden muss
Beispiel: 2 ("Auto ist nach 2 Stundenvoll genug") | 91 | | 209 | ELECTRICITY_PRICES_FINISHED | Holding Register | unsigned integer (16) | 1 | Stunde (**​Uhrzeit​**) in der mit "Strompreis
- automatisch" die Ladung mindestens
aho ​Stunden gedauert haben muss.
Beispiel: 7 ("Fertig bis 7:00, also davor
mindestens 2 Stunden geladen") | 92 | | 210 | ELECTRICITY_PRICES_ZONE | Holding Register | unsigned integer (16) | 1 | Awattar Preiszone
0: Österreich
1: Deutschland | 93 | | 211 | AMPERE_MAX | Holding Register | unsigned integer (16) | 1 | Absolute max. Ampere: Maximalwert
für Ampere Einstellung
Beispiel: 20 (Einstellung auf mehr als
20A in der App nicht möglich) | 94 | | 212 | AMPERE_L1 | Holding Register | unsigned integer (16) | 1 | Ampere Level 1 für Druckknopf am
Gerät.
6-32: Ampere Stufe aktiviert
0: Stufe deaktivert (wird übersprungen) | 95 | | 213 | AMLERE_L2 | Holding Register | unsigned integer (16) | 1 | Ampere Level 2 für Druckknopf am
Gerät.
6-32: Ampere Stufe aktiviert
0: Stufe deaktivert (wird übersprungen) | 96 | | 214 | AMPERE_L3 | Holding Register | unsigned integer (16) | 1 | Ampere Level 3 für Druckknopf am
Gerät.
6-32: Ampere Stufe aktiviert
0: Stufe deaktivert (wird übersprungen) | 97 | | 215 | AMPERE_L4 | Holding Register | unsigned integer (16) | 1 | Ampere Level 4 für Druckknopf am
Gerät.
6-32: Ampere Stufe aktiviert
0: Stufe deaktivert (wird übersprungen) | 98 | | 216 | AMPERE_L5 | Holding Register | unsigned integer (16) | 1 | Ampere Level 5 für Druckknopf am
Gerät.
6-32: Ampere Stufe aktiviert
0: Stufe deaktivert (wird übersprungen) | 99 | | 217 | CLOUD_DISABLED | Holding Register | unsigned integer (16) | 1 | **Cloud disabled**
0: cloud enabled
1: cloud disabled | 100 | | 218 | NORWAY_MODE | Holding Register | unsigned integer (16) | 1 | **Norwegen-Modu**s​ aktiviert
0: deaktiviert (Erdungserkennung
aktiviert)
1: aktiviert (keine Erdungserkennung,
nur für IT-Netze gedacht) | 101 | | 299 | AMPERE_VOLATILE | Holding Register | unsigned integer (16) | 1 | Ampere Wert für die PWM
Signalisierung in ganzen Ampere von
**6-32A**

Wird nicht im EEPROM gespeichert
und wird beim nächsten Bootvorgang
auf den zuletzt im EEPROM
gespeicherten Wert **​zurückgesetzt​**.
Für Energieregelung | 102 | | 300 | AMPERE_EEPROM | Holding Register | unsigned integer (16) | 1 | Ampere Wert für die PWM
Signalisierung in ganzen Ampere von
**6-32A**

Wird im EEPROM ​gespeichert ​(max.
Schreibzyklen ca. 100.000) | 103 | | 301
302
303 | MAC | Input Register | unsigned integer (48) | 3 | MAC Adresse der WLAN Station, binär | 104 | | 304
305
306
307
308
309 | SNR | Input Register | ascii (12 byte) | 6 | Seriennummer des go-eCharger, als
ASCII | 105 | | 310
311
312
313
314 | HOSTNAME | Input Register | ascii (10 byte) | 6 | Hostname des go-eCharger, als ASCII | 106 | | 315
316
317
318 | IP | Input Register | ascii (8 byte) | 4 | IP Adresse des go-eCharger, 1 Bytepro Register | 107 | | 319
320
321
322 | SUBNET | Input Register | unsigned integer (64) | 4 | Subnetzmaske des go-eCharger, 1
Byte pro Register | 108 | | 323
324
325
326 | GATEWAY | Input Register | ascii (4 byte) | 4 | Gateway des go-eCharger, 1 Byte proRegister | 109 | 110 | 111 | 112 | 113 | ## Verbindung mit dem Charger herstellen 114 | 115 | ``` javascript 116 | // clientG.js 117 | const net = require("net"); // importiert net 118 | const modbus = require("jsmodbus"); // importiert jsmodbus 119 | const socket = new net.Socket(); // instanziert Socket 120 | const client = new modbus.client.TCP(socket, 1); // instanziert eine Client TCP connection mit hilfe vom Socket und der unitId 121 | const options = { // config für die connection 122 | port: 502, // port 123 | host: 'xxx.xxx.xxx.xxx' // ip 124 | }; 125 | openSocket(socket, options) 126 | 127 | socket.on("error", (err) => { // Wird aufgerufen, wenn der Computer einen Fehler beim aufrufen von der Verbindung hat 128 | console.log(err); // gibt den Fehler in der Konsole aus 129 | }) 130 | ``` 131 | 132 | 133 | 134 | ## Daten über den Input Register auslesen 135 | 136 | ``` javascript 137 | /** 138 | * @function 139 | * @name getInputRegisters 140 | * @param {object} socket 141 | * @param {object} client 142 | * @param {number} register - attribut von der Spalte "Register" von der GO-E Charger Modbus API 143 | * @param {number} count - attribut von der Spalte "Länge" von der GOE-E Charger Modbus API 144 | * 145 | 146 | * Diese Funktion gibt das JSON Objekt aus, welches vom Charger gesendet wirdc 147 | * 148 | */ 149 | function getInputRegisters(socket, client, register, count) { 150 | socket.on("connect", function() { // Wird aufgerufen, wenn der Computer eine Verbindung herstellt 151 | /** 152 | * @method 153 | * @name readInputRegisters - read only Option vom Modbus (Von der GO-E Charger Modbus API -> Spalte Register Typ) 154 | * @param {number} register - attribut von der Spalte "Register" von der GO-E Charger Modbus API 155 | * @param {number} count - attribut von der Spalte "Länge" von der GOE-E Charger Modbus API 156 | */ 157 | client.readInputRegisters(register, count).then(function(response) { 158 | console.log(response); // Gibt die response in der Konsole aus 159 | }).catch(function(err) { 160 | console.log(err); // Gibt den error in der Konsole aus 161 | }); 162 | }) 163 | } 164 | ``` 165 | 166 | 167 | 168 | ## Daten über den Holding Register auslesen 169 | 170 | ``` javascript 171 | /** 172 | * @function 173 | * @name getHoldingRegisters 174 | * @param {object} socket 175 | * @param {object} client 176 | * @param {number} register - attribut von der Spalte "Register" von der GO-E Charger Modbus API 177 | * @param {number} count - attribut von der Spalte "Länge" von der GOE-E Charger Modbus API 178 | * 179 | * Diese Funktion gibt das JSON Objekt aus, welches vom Charger gesendet wird 180 | * 181 | */ 182 | function getHoldingRegisters(socket, client, register, count) { 183 | socket.on("connect", function() { // Wird aufgerufen, wenn der Computer eine Verbindung herstellt 184 | /** 185 | * @method 186 | * @name readHoldingRegisters - read only Option vom Modbus (Von der GO-E Charger Modbus API -> Spalte Register Typ) 187 | * @param {number} register - attribut von der Spalte "Register" von der GO-E Charger Modbus API 188 | * @param {number} count - attribut von der Spalte "Länge" von der GOE-E Charger Modbus API 189 | */ 190 | client.readHoldingRegisters(register, count).then(function(response) { 191 | console.log(response); // Gibt die response in der Konsole aus 192 | }).catch(function(err) { 193 | console.log(err); // Gibt den error in der Konsole aus 194 | }); 195 | }) 196 | } 197 | ``` 198 | 199 | 200 | 201 | ## Daten über den Holding Register eintragen 202 | 203 | ``` javascript 204 | /** 205 | * @function 206 | * @name setHoldingRegisters 207 | * @param {object} socket 208 | * @param {object} client 209 | * @param {number} register - attribut von der Spalte "Register" von der GO-E Charger Modbus API 210 | * @param {number} value - attribut um dem gegebenen register einen neuen Wert zuzufügen 211 | * 212 | * Diese Funktion setzt einen gegebenen wert auf eine gegebene register adresse 213 | * 214 | */ 215 | function setHoldingRegisters(socket, client, register, value) { 216 | socket.on("connect", function() { 217 | /** 218 | * @method 219 | * @name writeSingleRegister - read und write option von Mosbus 220 | * @param {number} register - attribut von der Spalte "Register" von der GO-E Charger Modbus API 221 | * @param {number} value - attribut um dem gegebenen register einen neuen Wert zuzufügen 222 | */ 223 | client.writeSingleRegister(register, value).then(function(response) { 224 | console.log(response); // gibt den response aus 225 | }).catch(function(err) { 226 | console.log(err); // gibt den Fehler aus 227 | closeSocket(socket); 228 | }) 229 | }) 230 | } 231 | ``` 232 | 233 | 234 | 235 | ## Socket schließen 236 | 237 | ``` javascript 238 | /** 239 | * @function 240 | * @name closeSocket 241 | * @param {object} socket 242 | * 243 | * Diese Funktion schließt den Socket 244 | * 245 | */ 246 | function closeSocket(socket) { 247 | socket.end(); 248 | } 249 | ``` 250 | 251 | 252 | 253 | ## Socket öffnen 254 | 255 | ``` javascript 256 | /** 257 | * @function 258 | * @name openSocket 259 | * @param {object} socket 260 | * @param {object} option - config für die Connection 261 | * 262 | * Diese Funktion öffnet den Socket 263 | * 264 | */ 265 | function openSocket(socket, option) { 266 | socket.connect(options); // Mit der gegebenen config mit dem Socket verbinden 267 | } 268 | ``` 269 | -------------------------------------------------------------------------------- /go-eCharger Modbus TCP API v1 EN.md: -------------------------------------------------------------------------------- 1 | # GO-E Charger Modbus TCP/IP Documentation English 2 | 3 | | Version | Date | Author | Description | 4 | | ------- | ---------- | ----------- | --------------- | 5 | | 1.0 | 2020-10-01 | Peter Pötzi | Initial version | 6 | 7 | # Index 8 | 9 | * [Activation](#activation) 10 | * [Connection](#connection) 11 | * [Modbus Register](#modbusregister) 12 | * [Code example](#example) 13 | - [ Connect to Charger ](#connect) 14 | - [ Get Data from Input Register ](#getinputregister) 15 | - [ Get Data from Holding Register ](#getholdingregister) 16 | - [ Set Data for Holding Register ](#setholdingregister) 17 | - [ Close Socket ](#close) 18 | - [ Open Socket ](#open) 19 | 20 | ### Documentation to the used libraries 21 | 22 | * [net](https://nodejs.org/api/net.html) 23 | * [jsmodbus](https://www.npmjs.com/package/jsmodbus) 24 | 25 | 26 | ## API activation 27 | 28 | To activate the API, you have to allow API access in the go-eCharger app under Advanced Settings.
After activation, the charging box must be restarted.
29 | The API is only available for firmware version 0.40 and newer. 30 | 31 | 32 | ## Connection 33 | 34 | The Modbus TCP connection goes as follows: 35 | 36 | | Connection | Port | 37 | | ---------- | ---- | 38 | | WLAN | 502 | 39 | 40 | The go-e Charger has the unitId of 1. 41 | 42 | 43 | ## Modbus Register 44 | 45 | The Register ID is 0-indexed. Because of that some clients have to increase the Register ID by 1. 46 | 47 | Registers are designed as holding registers or input registers. 48 | 49 | * Holding Register allows reading and writing. 50 | * Input Register allows only reading. 51 | 52 | For values ​​that are distributed over several registers are all 16-Bit packages a big-endian. 53 | 54 | | Register | Name | Register Type | Data type | Lenght | Description | 55 | | -------------------------------------- | --------------------------- | ----------------- | --------------------- | ----- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 56 | | 100 | CAR_STATE | Input Register | unsigned integer (16) | 1 | **Status PWM signaling**
0: Unknown, Charging station defective
1: Charging station ready, no car
2: Car is charging
3: Waiting for car
4: Charging finnished, Car still connected | 57 | | 101 | PP_CABLE | Input Register | unsigned integer (16) | 1 | Type2 **Cable ampere coding**
13-32: ampere coding
0: no cable | 58 | | 105
106 | FWV | Input Register | ascii (4 byte) | 2 | Firmware version as ASCII | 59 | | 107 | ERROR | Input Register | unsigned integer (16) | 1 | error:
1: RCCB (Residual current circuit breaker)
3: PHASE (phase disturbance)
8: NO_GROUND (Ground detection)
10, default: INTERNAL (Others) | 60 | | 108
109 | VOLT_L1 | Input Register | unsigned integer (32) | 2 | Voltage on L1 in volts | 61 | | 110
111 | VOLT_L2 | Input Register | unsigned integer (32) | 2 | Voltage on L2 in volts | 62 | | 112
113 | VOLT_L3 | Input Register | unsigned integer (32) | 2 | Voltage on L3 in volts | 63 | | 114
115 | AMP_L1 | Input Register | unsigned integer (32) | 2 | Amps on L1 in 0.1A (123 equals 12, 3A) | 64 | | 116
117 | AMP_L2 | Input Register | unsigned integer (32) | 2 | Amps on L2 in 0.1A (123 equals 12, 3A) | 65 | | 118
119 | AMP_L3 | Input Register | unsigned integer (32) | 2 | Amps on L3 in 0.1A (123 equals 12, 3A) | 66 | | 120
121 | POWER_TOTAL | Input Register | unsigned integer (32) | 2 | Total power in 0.01kW (360 corresponds to 3.6kW) | 67 | | 128
129 | ENERGY_TOTAL | Input Register | unsigned integer (32) | 2 | Total amount of energy charged in 0.1kWh | 68 | | 132
133 | ENERGY_CHARGE | Input Register | unsigned integer (32) | 2 | **Amount of energy charged** in
Deka-Watt-Seconds
Example: 100, 000 means 1, 000, 000
Ws (= 277Wh = 0.277kWh) were loaded in this charging process. | 69 | | 144
145 | VOLT_N | Input Register | unsigned integer (32) | 2 | Voltage on N in volts | 70 | | 146
147 | POWER_L1 | Input Register | unsigned integer (32) | 2 | Power on L1 in 0.1kW (36 corresponds to 3.6kW) | 71 | | 148
149 | POWER_L2 | Input Register | unsigned integer (32) | 2 | Power on L2 in 0.1kW (36 corresponds to 3.6kW) | 72 | | 150
151 | POWER_L3 | Input Register | unsigned integer (32) | 2 | Power on L3 in 0.1kW (36 corresponds to 3.6kW) | 73 | | 152
153 | POWER_FACTOR_L1 | Input Register | unsigned integer (32) | 2 | Power factor on L1 in % | 74 | | 154
155 | POWER_FACTOR_L2 | Input Register | unsigned integer (32) | 2 | Power factor on L2 in % | 75 | | 156
157 | POWER_FACTOR_L3 | Input Register | unsigned integer (32) | 2 | Power factor on L3 in % | 76 | | 158
159 | POWER_FACTOR_N | Input Register | unsigned integer (32) | 2 | Power factor on N in % | 77 | | 200 | ALLOW | Holding Register | unsigned integer (16) | 1 | **allow_charging:** PWM Signal is allowed
to abut
0: no
1: yes | 78 | | 201 | ACCESS_STATE | Holding Register | unsigned integer (16) | 1 | **access_state**: access control.
0: open
1: RFID / App needed
2: electricity price / automatic
3: scheduler | 79 | | 202 | ADAPTER_INPUT | Input Register | unsigned integer (16) | 1 | **adapter_in**: The charging box
is connected with an adapter
0: NO_ADAPTER
1: 16A_ADAPTER | 80 | | 203 | UNLOCKED_BY | Input Register | unsigned integer (16) | 1 | Number of the RFID card that
activated the current charging process
| 81 | | 204 | CABLE_LOCK_MODE | Holding Register | unsigned integer (16) | 1 | Cable lock setting
0: Lock while the car is connected
1: Unlock automatically after
charging
2: Always keep the cable locked | 82 | | 205 | PHASES | Input Register | unsigned integer (16) | 1 | **Phases** before and after the contactor
binary flags: 0b00ABCDEF
A... phase 3, before the contactor
B... phase 2 before the contactor
C... phase 1 before the contatctor
D... phase 3 after the contactor
E... phase 2 after the contactor
F... phase 1 after the contactor
pha 0b00001000: Phase 1 is
available
pha 0b00111000: Phase1-3 is
available
| 83 | | 206 | LED_BRIGHTNESS | Holding Register | unsigned integer (16) | 1 | **LED brightness** from 0-255
0: LED off
255: LED brightness max | 84 | | 207 | LED_SAVE_ENERGY | Holding Register | unsigned integer (16) | 1 | **led_save_energy**: LED switch off
automatically after 10 seconds
0: Energy saving function deactivated
1: Energy saving function activated | 85 | | 208 | ELECTRICITY_PRICES_HOURS | Holding Register | unsigned integer (16) | 1 | Minimum **count** ​of hours that must be
charged with "Electricity price - automatic"
Example: 2 ("Car is full enough after 2 hours") | 86 | | 209 | ELECTRICITY_PRICES_FINISHED | Holding Register | unsigned integer (16) | 1 | Hour (**​time**) in which with "electricity price
- automatic" the charge must have lasted
at least aho hours.
Example: 7 ("Ready by 7:00, so charged at
least 2 hours before that") | 87 | | 210 | ELECTRICITY_PRICES_ZONE | Holding Register | unsigned integer (16) | 1 | Awattar price zone
0: Austria
1: Germany | 88 | | 211 | AMPERE_MAX | Holding Register | unsigned integer (16) | 1 | Absolute Max Amps: Maximum
value for Amps setting
Example: 20 (setting to more than
20A in the app not possible) | 89 | | 212 | AMPERE_L1 | Holding Register | unsigned integer (16) | 1 | Ampere level 1 for push button on the
device.
6-32: Ampere level activated
0: Level deactivated (will be skipped) | 90 | | 213 | AMLERE_L2 | Holding Register | unsigned integer (16) | 1 | Ampere level 2 for push button on the
device.
6-32: Ampere level activated
0: Level deactivated (will be skipped) | 91 | | 214 | AMPERE_L3 | Holding Register | unsigned integer (16) | 1 | Ampere level 3 for push button on the
device.
6-32: Ampere level activated
0: Level deactivated (will be skipped) | 92 | | 215 | AMPERE_L4 | Holding Register | unsigned integer (16) | 1 | Ampere level 4 for push button on the
device.
6-32: Ampere level activated
0: Level deactivated (will be skipped) | 93 | | 216 | AMPERE_L5 | Holding Register | unsigned integer (16) | 1 | Ampere level 5 for push button on the
device.
6-32: Ampere level activated
0: Level deactivated (will be skipped) | 94 | | 217 | CLOUD_DISABLED | Holding Register | unsigned integer (16) | 1 | **Cloud disabled**
0: cloud enabled
1: cloud disabled | 95 | | 218 | NORWAY_MODE | Holding Register | unsigned integer (16) | 1 | **Norway mode**​ activated
0: deactivated (ground detection
activated)
1: activated (no ground detection,
only intended for IT networks) | 96 | | 299 | AMPERE_VOLATILE | Holding Register | unsigned integer (16) | 1 | Amps Value for the PWM
signaling in whole amps of
**6-32A**

Is not saved in the EEPROM
and is **reset** to the value last saved in the EEPROM during the next boot process.

For energy control | 97 | | 300 | AMPERE_EEPROM | Holding Register | unsigned integer (16) | 1 | Amps Value for the PWM
signaling in whole amps of
**6-32A**

Is saved in the EEPROM (max.
write cycles approx. 100, 000) | 98 | | 301
302
303 | MAC | Input Register | unsigned integer (48) | 3 | MAC address of the WLAN station, binary | 99 | | 304
305
306
307
308
309 | SNR | Input Register | ascii (12 byte) | 6 | Serial number of the go-eCharger, as
ASCII | 100 | | 310
311
312
313
314 | HOSTNAME | Input Register | ascii (12 byte) | 6 | Host name of the go-eCharger, as ASCII | 101 | | 315
316
317
318 | IP | Input Register | ascii (8 byte) | 4 | IP address of the go-eCharger, 1 byte per register | 102 | | 319
320
321
322 | SUBNET | Input Register | unsigned integer (64) | 4 | Subnet mask of the go-eCharger, 1
byte per register | 103 | | 323
324
325
326 | GATEWAY | Input Register | ascii (4 byte) | 4 | Go-eCharger gateway, 1 byte per register | 104 | 105 | 106 | 107 | 108 | ## Connect to Charger 109 | 110 | ``` javascript 111 | // clientE.js 112 | const net = require("net"); // import net 113 | const modbus = require("jsmodbus"); // import jsmodbus 114 | const socket = new net.Socket(); // create new socket 115 | const client = new modbus.client.TCP(socket, 1); // create client that has been given the socket and the unitId as parameters 116 | const options = { // config for connection 117 | port: 502, // port 118 | host: 'xxx.xxx.xxx.xxx' // ip 119 | }; 120 | 121 | socket.on("error", (err) => { // when the computer has an error while connecting 122 | console.log(err); // prints error in the console 123 | }) 124 | openSocket(socket, options); 125 | ``` 126 | 127 | 128 | 129 | ## Get Data from Input Register 130 | 131 | ``` javascript 132 | /** 133 | * @function 134 | * @name getInputRegisters 135 | * @param {object} socket 136 | * @param {object} client 137 | * @param {number} register - attribute from the column "Register" of the GO-E Charger Modbus API 138 | * @param {number} count - attribute from the column "Länge" of the GO-E Charger Modbus API 139 | * 140 | * This function prints the JSON Object that the Charger Sends 141 | * 142 | */ 143 | function getInputRegisters(socket, client, register, count) { 144 | socket.on("connect", function() { // when the computer connects to the given ip 145 | /** 146 | * @method 147 | * @name readInputRegisters - read only option from Modbus (From the GO-E Charger Modbus API --> column Register Typ) 148 | * @param {number} register - attribute from the column "Register" of the GO-E Charger Modbus API 149 | * @param {number} count - attribute from the column "Länge" of the GO-E Charger Modbus API 150 | */ 151 | client.readInputRegisters(register, count).then(function(response) { 152 | console.log(response); // prints response in the console 153 | 154 | }).catch(function(err) { 155 | console.log(err); // prints error in the console 156 | closeSocket(socket); 157 | 158 | }); 159 | }) 160 | } 161 | ``` 162 | 163 | 164 | 165 | ## Get Data from Holding Register 166 | 167 | ``` javascript 168 | /** 169 | * @function 170 | * @name getHoldingRegisters 171 | * @param {object} socket 172 | * @param {object} client 173 | * @param {number} register - attribute from the column "Register" of the GO-E Charger Modbus API 174 | * @param {number} count - attribute from the column "Länge" of the GO-E Charger Modbus API 175 | * 176 | * This function prints the JSON Object that the Charger Sends 177 | * 178 | */ 179 | function getHoldingRegisters(socket, client, register, count) { 180 | socket.on("connect", function() { // when the computer connects to the given ip 181 | /** 182 | * @method 183 | * @name readHoldingRegisters - read and write option from Modbus 184 | * @param {number} register - attribute from the column "Register" of the GO-E Charger Modbus API 185 | * @param {number} count - attribute from the column "Länge" of the GO-E Charger Modbus API 186 | */ 187 | client.readHoldingRegisters(register, count).then(function(response) { 188 | console.log(response); // prints response in the console 189 | 190 | }).catch(function(err) { 191 | console.log(err); // prints error in the console 192 | closeSocket(socket); 193 | 194 | }); 195 | }) 196 | } 197 | ``` 198 | 199 | 200 | 201 | ## Set Data for Holding Register 202 | 203 | ``` javascript 204 | /** 205 | * @function 206 | * @name setHoldingRegisters 207 | * @param {object} socket 208 | * @param {object} client 209 | * @param {number} register - attribute from the column "Register" of the GO-E Charger Modbus API 210 | * @param {number} value - attribute to set the value of the given register 211 | * 212 | * This function sets the value of a given register 213 | * 214 | */ 215 | function setHoldingRegisters(socket, client, register, value) { 216 | socket.on("connect", function() { 217 | /** 218 | * @method 219 | * @name writeSingleRegister - read and write option from Modbus 220 | * @param {number} register - attribute from the column "Register" of the GO-E Charger Modbus API 221 | * @param {number} value - attribute to set the value of the given register 222 | */ 223 | client.writeSingleRegister(register, value).then(function(response) { 224 | console.log(response); // prints the response 225 | }).catch(function(err) { 226 | console.log(err); // prints the error 227 | closeSocket(socket); 228 | }) 229 | }) 230 | } 231 | ``` 232 | 233 | 234 | 235 | ## Close Socket 236 | 237 | ``` javascript 238 | /** 239 | * @function 240 | * @name closeSocket 241 | * @param {object} socket 242 | * 243 | * This function closes the socket 244 | * 245 | */ 246 | function closeSocket(socket) { 247 | socket.end(); 248 | } 249 | ``` 250 | 251 | 252 | 253 | ## Open Socket 254 | 255 | ``` javascript 256 | /** 257 | * @function 258 | * @name openSocket 259 | * @param {object} socket 260 | * @param {object} option - config for connection 261 | * 262 | * This function opens the socket 263 | * 264 | */ 265 | function openSocket(socket, option) { 266 | socket.connect(options); // connect to the socket with the given config 267 | } 268 | ``` 269 | --------------------------------------------------------------------------------