[goecharger] Add API V2 support (#12400)

* add API V2 support
* handle InterrupedException explicitly

Signed-off-by: Reinhard Plaim <reinhardplaim@gmail.com>
This commit is contained in:
Reinhard Plaim
2022-03-08 15:37:39 +01:00
committed by GitHub
parent 378a037df9
commit ba03fef082
12 changed files with 904 additions and 217 deletions

View File

@@ -12,11 +12,21 @@ thing-type.goecharger.goe.description = Go-eCharger thing that represents the wa
thing-type.config.goecharger.goe.ip.label = IP Address
thing-type.config.goecharger.goe.ip.description = The IP address of the Go-eCharger
thing-type.config.goecharger.goe.apiVersion.label = API version
thing-type.config.goecharger.goe.apiVersion.description = The API version of the Go-eCharger
thing-type.config.goecharger.goe.refreshInterval.label = Refresh Interval
thing-type.config.goecharger.goe.refreshInterval.description = Refresh interval for acquiring data from Go-eCharger in seconds
# channel types
channel-type.goecharger.current.label = Maximum Current
channel-type.goecharger.current.description = Maximum current per phase allowed to use for charging
channel-type.goecharger.maxCurrTmp.label = Maximum Current Temporary
channel-type.goecharger.maxCurrTmp.description = Maximum current temporary (not written to EEPROM)
channel-type.goecharger.phs.label = Phases
channel-type.goecharger.phs.description = Amount of phases currently used for charging
channel-type.goecharger.fs.label = Force State
channel-type.goecharger.fs.description = Force state (Neutral=0, Off=1, On=2)
channel-type.goecharger.alw.label = Allow Charging
channel-type.goecharger.alw.description = If true charging is allowed
channel-type.goecharger.ast.label = Access Configuration
@@ -33,20 +43,16 @@ channel-type.goecharger.cl2.label = Current L2
channel-type.goecharger.cl2.description = Current on L2
channel-type.goecharger.cl3.label = Current L3
channel-type.goecharger.cl3.description = Current on L3
channel-type.goecharger.current.label = Maximum Current
channel-type.goecharger.current.description = Maximum current per phase allowed to use for charging
channel-type.goecharger.err.label = Error Code
channel-type.goecharger.err.description = Error code of Go-eCharger
channel-type.goecharger.err.state.option.NONE = None
channel-type.goecharger.err.state.option.RCCB = RCCB
channel-type.goecharger.err.state.option.NO_GROUND = No ground
channel-type.goecharger.err.state.option.INTERNAL = Internal
channel-type.goecharger.eto.label = Total Charged Energy
channel-type.goecharger.eto.description = Amount of energy that has been charged since installation
channel-type.goecharger.fmw.label = Firmware
channel-type.goecharger.fmw.description = Firmware Version
channel-type.goecharger.pha.label = Phases
channel-type.goecharger.pha.description = Amount of phases currently used for charging
channel-type.goecharger.scl.label = Current Session Charge Energy Limit
channel-type.goecharger.scl.description = Wallbox stops charging after defined value, deactivate with value 0
channel-type.goecharger.scs.label = Current Session Charged Energy
channel-type.goecharger.scs.description = Amount of energy that has been charged in this session
channel-type.goecharger.pl1.label = Power L1
channel-type.goecharger.pl1.description = Power on L1
channel-type.goecharger.pl2.label = Power L2
@@ -55,19 +61,16 @@ channel-type.goecharger.pl3.label = Power L3
channel-type.goecharger.pl3.description = Power on L3
channel-type.goecharger.pwm.label = PWM signal status
channel-type.goecharger.pwm.description = Pulse-width modulation signal status
channel-type.goecharger.pwm.state.option.READY_NO_CAR = Ready (no car)
channel-type.goecharger.pwm.state.option.CHARGING = Charging
channel-type.goecharger.pwm.state.option.WAITING_FOR_CAR = Waiting for car
channel-type.goecharger.pwm.state.option.CHARGING_DONE_CAR_CONNECTED = Charging done (car connected)
channel-type.goecharger.scl.label = Current Session Charge Energy Limit
channel-type.goecharger.scl.description = Wallbox stops charging after defined value, deactivate with value 0
channel-type.goecharger.scs.label = Current Session Charged Energy
channel-type.goecharger.scs.description = Amount of energy that has been charged in this session
channel-type.goecharger.tmp.label = Temperature
channel-type.goecharger.tmp.description = Temperature of the Go-eCharger
channel-type.goecharger.tmpT2p.label = Temperature type 2 port
channel-type.goecharger.tmpT2p.description = Temperature on the type 2 port of the Go-eCharger
channel-type.goecharger.tmp.label = Temperature circuit board
channel-type.goecharger.tmp.description = Temperature on the circuit board of the Go-eCharger
channel-type.goecharger.vl1.label = Voltage L1
channel-type.goecharger.vl1.description = Voltage on L1
channel-type.goecharger.vl2.label = Voltage L2
channel-type.goecharger.vl2.description = Voltage on L2
channel-type.goecharger.vl3.label = Voltage L3
channel-type.goecharger.vl3.description = Voltage on L3
# Others
unsuccessful.communication-error=Request response was unsuccessful

View File

@@ -10,6 +10,7 @@
<channels>
<channel id="maxCurrent" typeId="current"/>
<channel id="maxCurrentTemp" typeId="maxCurrTmp"/>
<channel id="pwmSignal" typeId="pwm"/>
<channel id="error" typeId="err"/>
<channel id="voltageL1" typeId="vl1"/>
@@ -21,15 +22,17 @@
<channel id="powerL1" typeId="pl1"/>
<channel id="powerL2" typeId="pl2"/>
<channel id="powerL3" typeId="pl3"/>
<channel id="phases" typeId="pha"/>
<channel id="sessionChargeEnergyLimit" typeId="scl"/>
<channel id="sessionChargedEnergy" typeId="scs"/>
<channel id="totalChargedEnergy" typeId="eto"/>
<channel id="allowCharging" typeId="alw"/>
<channel id="cableCurrent" typeId="cbl"/>
<channel id="temperature" typeId="tmp"/>
<channel id="firmware" typeId="fmw"/>
<channel id="accessConfiguration" typeId="ast"/>
<channel id="phases" typeId="pha"/>
<channel id="forceState" typeId="fs"/>
<channel id="sessionChargedEnergy" typeId="scs"/>
<channel id="sessionChargeEnergyLimit" typeId="scl"/>
<channel id="totalChargedEnergy" typeId="eto"/>
<channel id="temperatureType2Port" typeId="tmpT2p"/>
<channel id="temperature" typeId="tmp"/>
</channels>
<config-description>
@@ -38,6 +41,10 @@
<description>The IP address of the Go-eCharger</description>
<context>network-address</context>
</parameter>
<parameter name="apiVersion" type="integer" required="false" min="1" max="2">
<label>API version</label>
<description>The API version of the Go-eCharger</description>
</parameter>
<parameter name="refreshInterval" type="integer" required="false" unit="s">
<label>Refresh Interval</label>
<description>Refresh interval for acquiring data from Go-eCharger in seconds</description>
@@ -65,6 +72,12 @@
<description>Maximum current per phase allowed to use for charging</description>
<state pattern="%d %unit%" readOnly="false"/>
</channel-type>
<channel-type id="maxCurrTmp">
<item-type>Number:ElectricCurrent</item-type>
<label>Maximum Current Temporary</label>
<description>Maximum current temporary (not written to EEPROM)</description>
<state pattern="%d %unit%" readOnly="false"/>
</channel-type>
<channel-type id="pwm">
<item-type>String</item-type>
<label>PWM signal status</label>
@@ -149,6 +162,12 @@
<item-type>Number</item-type>
<label>Phases</label>
<description>Amount of phases currently used for charging</description>
<state readOnly="false"/>
</channel-type>
<channel-type id="fs">
<item-type>Number</item-type>
<label>Force state</label>
<description>Force state (Neutral=0, Off=1, On=2)</description>
<state readOnly="true"/>
</channel-type>
<channel-type id="scl">
@@ -181,11 +200,19 @@
<description>Specifies the max amps that can be charged with that cable</description>
<state pattern="%d %unit%" readOnly="true"/>
</channel-type>
<channel-type id="tmpT2p">
<item-type>Number:Temperature</item-type>
<label>Temperature type 2 port</label>
<description>Temperature of the Go-eCharger on the type 2 port</description>
<state pattern="%d %unit%" readOnly="true"/>
<category>Temperature</category>
</channel-type>
<channel-type id="tmp">
<item-type>Number:Temperature</item-type>
<label>Temperature</label>
<description>Temperature of the Go-eCharger</description>
<label>Temperature circuit board</label>
<description>Temperature of the Go-eCharger on circuit board</description>
<state pattern="%d %unit%" readOnly="true"/>
<category>Temperature</category>
</channel-type>
<channel-type id="fmw">
<item-type>String</item-type>