mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 15:11:59 +01:00
[goecharger] Add awattarMaxPrice channel (#17532)
* Add awp channel Signed-off-by: Leo Siepel <leosiepel@gmail.com> Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
This commit is contained in:
parent
0133881465
commit
2a1fb95946
@ -27,9 +27,10 @@ The apiVersion 2 is only available for go-e Charger with new hardware revision (
|
||||
|
||||
## Channels
|
||||
|
||||
Currently available channels are
|
||||
Currently available channels are:
|
||||
|
||||
| Channel ID | Item Type | Description | API version |
|
||||
|--------------------------|--------------------------|---------------------------------------------------------------|-------------------|
|
||||
|--------------------------|--------------------------|---------------------------------------------------------------|------------------|
|
||||
| maxCurrent | Number:ElectricCurrent | Maximum current allowed to use for charging | 1 (r/w), 2 (r/w) |
|
||||
| maxCurrentTemp | Number:ElectricCurrent | Maximum current temporary (not written to EEPROM) | 1 (r) |
|
||||
| pwmSignal | String | Signal status for PWM signal | 1 (r), 2 (r) |
|
||||
@ -56,6 +57,7 @@ Currently available channels are
|
||||
| firmware | String | Firmware Version | 1 (r), 2 (r) |
|
||||
| accessConfiguration | String | Access configuration, for example OPEN, RFID ... | 1 (r/w) |
|
||||
| forceState | Number | Force state (Neutral=0, Off=1, On=2) | 2 (r/w) |
|
||||
| awattarMaxPrice | Number | Awattar Max Price in ct | 2 (r/w) |
|
||||
|
||||
## Full Example
|
||||
|
||||
|
@ -55,6 +55,7 @@ public class GoEChargerBindingConstants {
|
||||
public static final String SESSION_CHARGE_CONSUMPTION_LIMIT = "sessionChargeEnergyLimit";
|
||||
public static final String TOTAL_CONSUMPTION = "totalChargedEnergy";
|
||||
public static final String FIRMWARE = "firmware";
|
||||
public static final String AWATTAR_MAX_PRICE = "awattarMaxPrice";
|
||||
|
||||
public static final String API_URL = "http://%IP%/status";
|
||||
public static final String MQTT_URL = "http://%IP%/mqtt?payload=%KEY%=%VALUE%";
|
||||
|
@ -47,4 +47,7 @@ public class GoEStatusResponseV2DTO extends GoEStatusResponseBaseDTO {
|
||||
|
||||
@SerializedName("nrg")
|
||||
public Double[] energy;
|
||||
|
||||
@SerializedName("awp")
|
||||
public Double awattarMaxPrice;
|
||||
}
|
||||
|
@ -142,6 +142,11 @@ public class GoEChargerV2Handler extends GoEChargerBaseHandler {
|
||||
return UnDefType.UNDEF;
|
||||
}
|
||||
return new DecimalType(goeResponse.transaction);
|
||||
case AWATTAR_MAX_PRICE:
|
||||
if (goeResponse.awattarMaxPrice == null) {
|
||||
return UnDefType.UNDEF;
|
||||
}
|
||||
return new DecimalType(goeResponse.awattarMaxPrice);
|
||||
case ALLOW_CHARGING:
|
||||
return OnOffType.from(goeResponse.allowCharging);
|
||||
case TEMPERATURE_TYPE2_PORT:
|
||||
@ -250,6 +255,12 @@ public class GoEChargerV2Handler extends GoEChargerBaseHandler {
|
||||
value = String.valueOf(((QuantityType<ElectricCurrent>) command).toUnit(Units.AMPERE).intValue());
|
||||
}
|
||||
break;
|
||||
case AWATTAR_MAX_PRICE:
|
||||
key = "awp";
|
||||
if (command instanceof DecimalType decimalCommand) {
|
||||
value = String.valueOf(decimalCommand);
|
||||
}
|
||||
break;
|
||||
case SESSION_CHARGE_CONSUMPTION_LIMIT:
|
||||
key = "dwo";
|
||||
var multiplier = 1000;
|
||||
|
@ -19,8 +19,6 @@ thing-type.config.goecharger.goe.refreshInterval.description = Refresh interval
|
||||
|
||||
# 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.description = If true charging is allowed
|
||||
channel-type.goecharger.ast.label = Access Configuration
|
||||
@ -29,6 +27,7 @@ channel-type.goecharger.ast.state.option.OPEN = Open
|
||||
channel-type.goecharger.ast.state.option.RFID = RFID
|
||||
channel-type.goecharger.ast.state.option.TIMER = Timer
|
||||
channel-type.goecharger.ast.state.option.AWATTAR = aWATTar
|
||||
channel-type.goecharger.awp.label = Awatttar Max Price
|
||||
channel-type.goecharger.cbl.label = Cable Encoding
|
||||
channel-type.goecharger.cbl.description = Specifies the max amps that can be charged with that cable
|
||||
channel-type.goecharger.cl1.label = Current L1
|
||||
@ -77,6 +76,8 @@ channel-type.goecharger.tmp.label = Temperature circuit board
|
||||
channel-type.goecharger.tmp.description = Temperature of the Go-eCharger on circuit board
|
||||
channel-type.goecharger.tmpT2p.label = Temperature type 2 port
|
||||
channel-type.goecharger.tmpT2p.description = Temperature of the Go-eCharger on the type 2 port
|
||||
channel-type.goecharger.trx.label = Transaction
|
||||
channel-type.goecharger.trx.description = 0 for no card, otherwise card ID
|
||||
channel-type.goecharger.vl1.label = Voltage L1
|
||||
channel-type.goecharger.vl1.description = Voltage on L1
|
||||
channel-type.goecharger.vl2.label = Voltage L2
|
||||
|
@ -9,6 +9,7 @@
|
||||
<description>Go-eCharger thing that represents the wallbox configuration and readings</description>
|
||||
|
||||
<channels>
|
||||
<channel id="awattarMaxPrice" typeId="awp"/>
|
||||
<channel id="maxCurrent" typeId="current"/>
|
||||
<channel id="maxCurrentTemp" typeId="maxCurrTmp"/>
|
||||
<channel id="pwmSignal" typeId="pwm"/>
|
||||
@ -37,6 +38,10 @@
|
||||
<channel id="temperature" typeId="tmp"/>
|
||||
</channels>
|
||||
|
||||
<properties>
|
||||
<property name="thingTypeVersion">1</property>
|
||||
</properties>
|
||||
|
||||
<config-description>
|
||||
<parameter name="ip" type="text" required="true">
|
||||
<label>IP Address</label>
|
||||
@ -178,6 +183,11 @@
|
||||
<description>Force state (Neutral=0, Off=1, On=2)</description>
|
||||
<state readOnly="true"/>
|
||||
</channel-type>
|
||||
<channel-type id="awp">
|
||||
<item-type>Number</item-type>
|
||||
<label>Awatttar Max Price</label>
|
||||
<state pattern="%.2f"/>
|
||||
</channel-type>
|
||||
<channel-type id="scl">
|
||||
<item-type>Number:Energy</item-type>
|
||||
<label>Current Session Charge Energy Limit</label>
|
||||
|
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||
<update:update-descriptions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:update="https://openhab.org/schemas/update-description/v1.0.0"
|
||||
xsi:schemaLocation="https://openhab.org/schemas/update-description/v1.0.0 https://openhab.org/schemas/update-description-1.0.0.xsd">
|
||||
|
||||
<thing-type uid="goecharger:goe">
|
||||
<instruction-set targetVersion="1">
|
||||
<add-channel id="awattarMaxPrice">
|
||||
<type>goecharger:awp</type>
|
||||
</add-channel>
|
||||
</instruction-set>
|
||||
</thing-type>
|
||||
|
||||
</update:update-descriptions>
|
Loading…
Reference in New Issue
Block a user