mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-25 14:55:55 +01:00
[keba] Split channel ENABLED to USER and SYSTEM channels (#15531)
* Split channel ENABLED to USER and SYSTEM channels --------- Signed-off-by: Simon Spielmann <simon.spielmann@gmx.de>
This commit is contained in:
parent
94d9fb7d36
commit
538a455bfd
@ -18,7 +18,8 @@ All devices support the following channels:
|
||||
| Channel ID | Item Type | Read-only | Description |
|
||||
| ----------------------- | ------------------------ | --------- | ----------------------------------------------------------------------- |
|
||||
| state | Number | yes | current operational state of the wallbox |
|
||||
| enabled | Switch | no | activation state of the wallbox |
|
||||
| enabledsystem | Switch | yes | activation state of the wallbox (System) |
|
||||
| enableduser | Switch | no | activation state of the wallbox (User) |
|
||||
| maxpresetcurrent | Number:ElectricCurrent | no | maximum current the charging station should deliver to the EV in A |
|
||||
| maxpresetcurrentrange | Number:Dimensionless | no | maximum current the charging station should deliver to the EV in % |
|
||||
| power | Number:Power | yes | active power delivered by the charging station |
|
||||
@ -63,7 +64,8 @@ Number:ElectricCurrent KebaCurrent "Maximum supply current [%.3f A]
|
||||
Number:ElectricCurrent KebaSystemCurrent "Maximum system supply current [%.3f A]" {channel="keba:kecontact:1:maxsystemcurrent"}
|
||||
Number:ElectricCurrent KebaFailSafeCurrent "Failsafe supply current [%.3f A]" {channel="keba:kecontact:1:failsafecurrent"}
|
||||
Number KebaState "Operating State [%s]" {channel="keba:kecontact:1:state"}
|
||||
Switch KebaSwitch "Enabled" {channel="keba:kecontact:1:enabled"}
|
||||
Switch KebaEnabledSystem "Enabled (System)" {channel="keba:kecontact:1:enabledsystem"}
|
||||
Switch KebaEnabledUser "Enabled (User)" {channel="keba:kecontact:1:enableduser"}
|
||||
Switch KebaWallboxPlugged "Plugged into wallbox" {channel="keba:kecontact:1:wallbox"}
|
||||
Switch KebaVehiclePlugged "Plugged into vehicle" {channel="keba:kecontact:1:vehicle"}
|
||||
Switch KebaPlugLocked "Plug locked" {channel="keba:kecontact:1:locked"}
|
||||
@ -90,7 +92,8 @@ sitemap demo label="Main Menu"
|
||||
Text label="Charging Station" {
|
||||
Text item=KebaState
|
||||
Text item=KebaUptime
|
||||
Switch item=KebaSwitch
|
||||
Switch item=KebaEnabledSystem
|
||||
Switch item=KebaEnabledUser
|
||||
Switch item=KebaWallboxPlugged
|
||||
Switch item=KebaVehiclePlugged
|
||||
Switch item=KebaPlugLocked
|
||||
|
@ -41,7 +41,8 @@ public class KebaBindingConstants {
|
||||
public static final String CHANNEL_WALLBOX = "wallbox";
|
||||
public static final String CHANNEL_VEHICLE = "vehicle";
|
||||
public static final String CHANNEL_PLUG_LOCKED = "locked";
|
||||
public static final String CHANNEL_ENABLED = "enabled";
|
||||
public static final String CHANNEL_ENABLED_SYSTEM = "enabledsystem";
|
||||
public static final String CHANNEL_ENABLED_USER = "enableduser";
|
||||
public static final String CHANNEL_PILOT_CURRENT = "maxpilotcurrent";
|
||||
public static final String CHANNEL_PILOT_PWM = "maxpilotcurrentdutycyle";
|
||||
public static final String CHANNEL_MAX_SYSTEM_CURRENT = "maxsystemcurrent";
|
||||
|
@ -323,17 +323,11 @@ public class KeContactHandler extends BaseThingHandler {
|
||||
break;
|
||||
}
|
||||
case "Enable sys": {
|
||||
int state = entry.getValue().getAsInt();
|
||||
switch (state) {
|
||||
case 1: {
|
||||
updateState(CHANNEL_ENABLED, OnOffType.ON);
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
updateState(CHANNEL_ENABLED, OnOffType.OFF);
|
||||
break;
|
||||
}
|
||||
}
|
||||
updateState(CHANNEL_ENABLED_SYSTEM, OnOffType.from(entry.getValue().getAsInt() == 1));
|
||||
break;
|
||||
}
|
||||
case "Enable user": {
|
||||
updateState(CHANNEL_ENABLED_USER, OnOffType.from(entry.getValue().getAsInt() == 1));
|
||||
break;
|
||||
}
|
||||
case "Curr HW": {
|
||||
@ -558,7 +552,7 @@ public class KeContactHandler extends BaseThingHandler {
|
||||
}
|
||||
break;
|
||||
}
|
||||
case CHANNEL_ENABLED: {
|
||||
case CHANNEL_ENABLED_USER: {
|
||||
if (command instanceof OnOffType) {
|
||||
if (command == OnOffType.ON) {
|
||||
transceiver.send("ena 1", this);
|
||||
|
@ -35,8 +35,10 @@ channel-type.keba.current_settable.label = Preset Current
|
||||
channel-type.keba.current_settable.description = Preset Current
|
||||
channel-type.keba.display.label = Display
|
||||
channel-type.keba.display.description = Text to show on the P30 Series C or X display
|
||||
channel-type.keba.enabled.label = Enabled
|
||||
channel-type.keba.enabled.description = Activation state of the wallbox
|
||||
channel-type.keba.enabledsystem.label = Enabled (System)
|
||||
channel-type.keba.enabledsystem.description = Activation state of the wallbox (System)
|
||||
channel-type.keba.enableduser.label = Enabled (User)
|
||||
channel-type.keba.enableduser.description = Activation state of the wallbox (User)
|
||||
channel-type.keba.energy.label = Energy Session
|
||||
channel-type.keba.energy.description = Power consumption
|
||||
channel-type.keba.error1.label = Error Code 1
|
||||
|
@ -9,7 +9,8 @@
|
||||
<description>A KeContact EV Charging Station</description>
|
||||
|
||||
<channels>
|
||||
<channel id="enabled" typeId="enabled"/>
|
||||
<channel id="enabledsystem" typeId="enabledsystem"/>
|
||||
<channel id="enableduser" typeId="enableduser"/>
|
||||
<channel id="state" typeId="state"/>
|
||||
<channel id="maxpresetcurrent" typeId="current_settable"/>
|
||||
<channel id="maxpresetcurrentrange" typeId="range"/>
|
||||
@ -57,6 +58,10 @@
|
||||
<channel id="authenticate" typeId="authenticate"/>
|
||||
</channels>
|
||||
|
||||
<properties>
|
||||
<property name="thingTypeVersion">1</property>
|
||||
</properties>
|
||||
|
||||
<config-description>
|
||||
<parameter name="ipAddress" type="text" required="true">
|
||||
<label>Network Address</label>
|
||||
@ -115,10 +120,16 @@
|
||||
<description>Indicator if the plug is locked by the electrical vehicle</description>
|
||||
<state readOnly="true"></state>
|
||||
</channel-type>
|
||||
<channel-type id="enabled">
|
||||
<channel-type id="enabledsystem">
|
||||
<item-type>Switch</item-type>
|
||||
<label>Enabled</label>
|
||||
<description>Activation state of the wallbox</description>
|
||||
<label>Enabled (System)</label>
|
||||
<description>Activation state of the wallbox (System)</description>
|
||||
<state readOnly="true"></state>
|
||||
</channel-type>
|
||||
<channel-type id="enableduser">
|
||||
<item-type>Switch</item-type>
|
||||
<label>Enabled (User)</label>
|
||||
<description>Activation state of the wallbox (User)</description>
|
||||
<state readOnly="false"></state>
|
||||
</channel-type>
|
||||
<channel-type id="x1" advanced="true">
|
||||
|
@ -0,0 +1,18 @@
|
||||
<?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="keba:kecontact">
|
||||
<instruction-set targetVersion="1">
|
||||
<remove-channel id="enabled"/>
|
||||
<add-channel id="enabledsystem">
|
||||
<type>keba:enabledsystem</type>
|
||||
</add-channel>
|
||||
<add-channel id="enableduser">
|
||||
<type>keba:enableduser</type>
|
||||
</add-channel>
|
||||
</instruction-set>
|
||||
</thing-type>
|
||||
|
||||
</update:update-descriptions>
|
Loading…
Reference in New Issue
Block a user