Add transaction to Go-Echarger (#13105)
Signed-off-by: Sascha Kloß <sascha.kloss@gmx.de>
This commit is contained in:
parent
3de0f79d9a
commit
47b004f227
@ -44,6 +44,7 @@ Currently available channels are
|
|||||||
| sessionChargeEnergyLimit | Number:Energy | Wallbox stops charging after defined value, disable with 0 | 1 (r/w), 2 (r/w) |
|
| sessionChargeEnergyLimit | Number:Energy | Wallbox stops charging after defined value, disable with 0 | 1 (r/w), 2 (r/w) |
|
||||||
| sessionChargedEnergy | Number:Energy | Amount of energy that has been charged in this session | 1 (r), 2 (r) |
|
| sessionChargedEnergy | Number:Energy | Amount of energy that has been charged in this session | 1 (r), 2 (r) |
|
||||||
| totalChargedEnergy | Number:Energy | Amount of energy that has been charged since installation | 1 (r), 2 (r) |
|
| totalChargedEnergy | Number:Energy | Amount of energy that has been charged since installation | 1 (r), 2 (r) |
|
||||||
|
| transaction | Number | 0 if no card, otherwise card ID | 2 (r/w) |
|
||||||
| allowCharging | Switch | If `ON` charging is allowed | 1 (r/w), 2 (r) |
|
| allowCharging | Switch | If `ON` charging is allowed | 1 (r/w), 2 (r) |
|
||||||
| cableCurrent | Number:ElectricCurrent | Specifies the max current that can be charged with that cable | 1 (r), 2 (r) |
|
| cableCurrent | Number:ElectricCurrent | Specifies the max current that can be charged with that cable | 1 (r), 2 (r) |
|
||||||
| temperature | Number:Temperature | Temperature of the curciuit board of the Go-eCharger | 1 (r), 2 (r) |
|
| temperature | Number:Temperature | Temperature of the curciuit board of the Go-eCharger | 1 (r), 2 (r) |
|
||||||
|
|||||||
@ -45,6 +45,7 @@ public class GoEChargerBindingConstants {
|
|||||||
public static final String POWER_L2 = "powerL2";
|
public static final String POWER_L2 = "powerL2";
|
||||||
public static final String POWER_L3 = "powerL3";
|
public static final String POWER_L3 = "powerL3";
|
||||||
public static final String POWER_ALL = "powerAll";
|
public static final String POWER_ALL = "powerAll";
|
||||||
|
public static final String TRANSACTION = "transaction";
|
||||||
public static final String ALLOW_CHARGING = "allowCharging";
|
public static final String ALLOW_CHARGING = "allowCharging";
|
||||||
public static final String CABLE_ENCODING = "cableCurrent";
|
public static final String CABLE_ENCODING = "cableCurrent";
|
||||||
public static final String PHASES = "phases";
|
public static final String PHASES = "phases";
|
||||||
|
|||||||
@ -27,6 +27,9 @@ public class GoEStatusResponseV2DTO extends GoEStatusResponseBaseDTO {
|
|||||||
@SerializedName("psm")
|
@SerializedName("psm")
|
||||||
public Integer phases;
|
public Integer phases;
|
||||||
|
|
||||||
|
@SerializedName("trx")
|
||||||
|
public Integer transaction;
|
||||||
|
|
||||||
@SerializedName("alw")
|
@SerializedName("alw")
|
||||||
public Boolean allowCharging;
|
public Boolean allowCharging;
|
||||||
|
|
||||||
|
|||||||
@ -136,6 +136,11 @@ public class GoEChargerV2Handler extends GoEChargerBaseHandler {
|
|||||||
default:
|
default:
|
||||||
}
|
}
|
||||||
return new StringType(error);
|
return new StringType(error);
|
||||||
|
case TRANSACTION:
|
||||||
|
if (goeResponse.transaction == null) {
|
||||||
|
return UnDefType.UNDEF;
|
||||||
|
}
|
||||||
|
return new DecimalType(goeResponse.transaction);
|
||||||
case ALLOW_CHARGING:
|
case ALLOW_CHARGING:
|
||||||
return goeResponse.allowCharging == true ? OnOffType.ON : OnOffType.OFF;
|
return goeResponse.allowCharging == true ? OnOffType.ON : OnOffType.OFF;
|
||||||
case TEMPERATURE_TYPE2_PORT:
|
case TEMPERATURE_TYPE2_PORT:
|
||||||
@ -269,6 +274,11 @@ public class GoEChargerV2Handler extends GoEChargerBaseHandler {
|
|||||||
if (command instanceof DecimalType) {
|
if (command instanceof DecimalType) {
|
||||||
value = String.valueOf(((DecimalType) command).intValue());
|
value = String.valueOf(((DecimalType) command).intValue());
|
||||||
}
|
}
|
||||||
|
case TRANSACTION:
|
||||||
|
key = "trx";
|
||||||
|
if (command instanceof DecimalType) {
|
||||||
|
value = String.valueOf(((DecimalType) command).intValue());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (key != null && value != null) {
|
if (key != null && value != null) {
|
||||||
|
|||||||
@ -19,6 +19,8 @@ thing-type.config.goecharger.goe.refreshInterval.description = Refresh interval
|
|||||||
|
|
||||||
# channel types
|
# channel types
|
||||||
|
|
||||||
|
channel-type.goecharger.trx.label = Transaction
|
||||||
|
channel-type.goecharger.trx.description = 0 for no card, otherwise card ID
|
||||||
channel-type.goecharger.alw.label = Allow Charging
|
channel-type.goecharger.alw.label = Allow Charging
|
||||||
channel-type.goecharger.alw.description = If true charging is allowed
|
channel-type.goecharger.alw.description = If true charging is allowed
|
||||||
channel-type.goecharger.ast.label = Access Configuration
|
channel-type.goecharger.ast.label = Access Configuration
|
||||||
|
|||||||
@ -23,6 +23,7 @@
|
|||||||
<channel id="powerL2" typeId="pl2"/>
|
<channel id="powerL2" typeId="pl2"/>
|
||||||
<channel id="powerL3" typeId="pl3"/>
|
<channel id="powerL3" typeId="pl3"/>
|
||||||
<channel id="powerAll" typeId="pAll"/>
|
<channel id="powerAll" typeId="pAll"/>
|
||||||
|
<channel id="transaction" typeId="trx"/>
|
||||||
<channel id="allowCharging" typeId="alw"/>
|
<channel id="allowCharging" typeId="alw"/>
|
||||||
<channel id="cableCurrent" typeId="cbl"/>
|
<channel id="cableCurrent" typeId="cbl"/>
|
||||||
<channel id="firmware" typeId="fmw"/>
|
<channel id="firmware" typeId="fmw"/>
|
||||||
@ -195,6 +196,12 @@
|
|||||||
<description>Amount of energy that has been charged since installation</description>
|
<description>Amount of energy that has been charged since installation</description>
|
||||||
<state pattern="%.1f %unit%" readOnly="true"/>
|
<state pattern="%.1f %unit%" readOnly="true"/>
|
||||||
</channel-type>
|
</channel-type>
|
||||||
|
<channel-type id="trx">
|
||||||
|
<item-type>Number</item-type>
|
||||||
|
<label>Transaction</label>
|
||||||
|
<description>0 for no card, otherwise card ID</description>
|
||||||
|
<state readOnly="false"/>
|
||||||
|
</channel-type>
|
||||||
<channel-type id="alw">
|
<channel-type id="alw">
|
||||||
<item-type>Switch</item-type>
|
<item-type>Switch</item-type>
|
||||||
<label>Allow Charging</label>
|
<label>Allow Charging</label>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user