Skip to content

Commit

Permalink
[kermi] improved channel-definition, adapted README.md, removed unuse…
Browse files Browse the repository at this point in the history
…d code

Signed-off-by: Kai Neuhaus <[email protected]>
  • Loading branch information
KaaNee committed May 8, 2024
1 parent b6763fd commit d08fc58
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 47 deletions.
20 changes: 8 additions & 12 deletions bundles/org.openhab.binding.modbus.kermi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,19 +103,15 @@ They are grouped into 7 channel-groups:

Possible states:

- Standby
- Standby
- Alarm
- TWE
- Kuehlen
- Heizen
- Abtauung
- Vorbereitung
- Blockiert
- EVU Sperre
- Nicht verfuegbar


- Status unknown (if no valid state is received)
- DrinkingWater
- Heating
- Defrost
- Preparing
- Blocked
- EVU Blocktime
- Unavailable


#### Energy-Source
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ public class KermiBindingConstants {
public static final ThingTypeUID THING_TYPE_KERMI_XCENTER = new ThingTypeUID(BINDING_ID, "kermi-xcenter");

// Channels for State
// public static final String GLOBAL_STATE_CHANNEL = "global-state";
public static final String GLOBAL_STATE_ID_CHANNEL = "global-state-id";

// Alarm State
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,6 @@ public enum ReadStatus {

private List<@Nullable PollTask> pollTasks = new ArrayList<>();

// private @Nullable PollTask testPoller;
private @Nullable KermiConfiguration config;

/**
Expand All @@ -202,9 +201,9 @@ public KermiXcenterThingHandler(Bridge thing) {
super(thing);

// STATE
// globalStateChannel = channelUID(thing, STATE_GROUP, GLOBAL_STATE_CHANNEL);
globalStateIdChannel = channelUID(thing, STATE_GROUP, GLOBAL_STATE_ID_CHANNEL);

// ALARM
alarmStateChannel = channelUID(thing, ALARM_GROUP, ALARM_STATE_CHANNEL);

// Energy source
Expand Down Expand Up @@ -638,16 +637,6 @@ public void dispose() {
localComms.unregisterRegularPoll(localPoller);
}
}
/*
* PollTask localInfoPoller = statePoller;
* if (localInfoPoller != null) {
* localComms.unregisterRegularPoll(localInfoPoller);
* }
* PollTask localDataPoller = dataPoller;
* if (localDataPoller != null) {
* localComms.unregisterRegularPoll(localDataPoller);
* }
*/
}
// Comms will be close()'d by endpoint thing handler
comms = null;
Expand Down Expand Up @@ -681,15 +670,4 @@ private void updateStatus() {
} // else - one status isn't received yet - wait until both Modbus polls returns either success or error
}

/*
* @Override
* public void childHandlerInitialized(ThingHandler childHandler, Thing childThing) {
* listeners.add((E3DCWallboxThingHandler) childHandler);
* }
*
* @Override
* public void childHandlerDisposed(ThingHandler childHandler, Thing childThing) {
* listeners.remove(childHandler);
* }
*/
}
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,6 @@ public Parser(DataType type) {
} else if (type.equals(DataType.ALARM_STATE)) {
size = ALARM_REG_SIZE * 2;
bArray = new byte[size];
// } else if (type.equals(DataType.DATA)) {
// size = XCENTER_DATA_REG_SIZE * 2;
// bArray = new byte[size];
} else if (type.equals(DataType.PV)) {
size = PV_MODULATION_REG_SIZE * 2;
bArray = new byte[size];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@
<channel-type id="flow-temperature-channel">
<item-type>Number:Temperature</item-type>
<label>Flow Temperature</label>
<description>B16 - Vorlauftemperatur WP</description>
<description>B16 - Flow Temperature</description>
<state pattern="%.1f %unit%"/>
</channel-type>
<channel-type id="return-temperature-channel">
<item-type>Number:Temperature</item-type>
<label>Return Temperature</label>
<description>B17 - Rücklauftemperatur WP</description>
<description>B17 - Return Temperature</description>
<state pattern="%.1f %unit%"/>
</channel-type>
<channel-type id="flow-speed-channel">
<item-type>Number:VolumetricFlowRate</item-type>
<label>Flow Speed</label>
<description>P13 - Durchfluss WP in l/min</description>
<state pattern="%.1f %uni%"/>
<description>P13 - Flow speed in l/min</description>
<state pattern="%.1f %unit%"/>
</channel-type>
</thing:thing-descriptions>
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,19 @@
<channel-type id="exit-temperature-channel">
<item-type>Number:Temperature</item-type>
<label>Exit Temperature</label>
<description>B14 - Energiequelle Austrittstemperatur</description>
<description>B14 - Exit Temperature Energy Source</description>
<state pattern="%.1f %unit%"/>
</channel-type>
<channel-type id="incoming-temperature-channel">
<item-type>Number:Temperature</item-type>
<label>Incoming temperature</label>
<description>B15 - Energiequelle Eintrittstemperatur</description>
<description>B15 - Incoming Temperature Energy Source</description>
<state pattern="%.1f %unit%"/>
</channel-type>
<channel-type id="temperature-sensor-outside-channel">
<item-type>Number:Temperature</item-type>
<label>Temperature Outside</label>
<description>BOT - Außentemperaturfühler</description>
<description>BOT - Sensor Outside Temperature</description>
<state pattern="%.1f %unit%"/>
</channel-type>
</thing:thing-descriptions>
Original file line number Diff line number Diff line change
Expand Up @@ -6,51 +6,63 @@
<channel-type id="cop-channel">
<item-type>Number</item-type>
<label>Current COP</label>
<state pattern="%d"/>
</channel-type>
<channel-type id="cop-heating-channel">
<item-type>Number</item-type>
<label>Current COP heating</label>
<state pattern="%d"/>
</channel-type>
<channel-type id="cop-drinkingwater-channel">
<item-type>Number</item-type>
<label>Current COP drinking water</label>
<state pattern="%d"/>
</channel-type>
<channel-type id="cop-cooling-channel">
<item-type>Number</item-type>
<label>Current COP cooling</label>
<state pattern="%d"/>
</channel-type>

<channel-type id="power-channel">
<item-type>Number:Power</item-type>
<label>Current power</label>
<state pattern="%.1f %unit%"/>
</channel-type>
<channel-type id="power-heating-channel">
<item-type>Number:Power</item-type>
<label>Current power heating</label>
<state pattern="%.1f %unit%"/>
</channel-type>
<channel-type id="power-drinkingwater-channel">
<item-type>Number:Power</item-type>
<label>Current power drinking water</label>
<state pattern="%.1f %unit%"/>
</channel-type>
<channel-type id="power-cooling-channel">
<item-type>Number:Power</item-type>
<label>Current power cooling</label>
<state pattern="%.1f %unit%"/>
</channel-type>

<channel-type id="electric-power-channel">
<item-type>Number:Power</item-type>
<label>Current electric power</label>
<state pattern="%.1f %unit%"/>
</channel-type>
<channel-type id="electric-power-heating-channel">
<item-type>Number:Power</item-type>
<label>Current electric power heating</label>
<state pattern="%.1f %unit%"/>
</channel-type>
<channel-type id="electric-power-drinkingwater-channel">
<item-type>Number:Power</item-type>
<label>Current electric power drinking water</label>
<state pattern="%.1f %unit%"/>
</channel-type>
<channel-type id="electric-power-cooling-channel">
<item-type>Number:Power</item-type>
<label>Current electric power cooling</label>
<state pattern="%.1f %unit%"/>
</channel-type>
</thing:thing-descriptions>
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,18 @@
<description>State of PV-Modulation</description>
</channel-type>
<channel-type id="pv-power-channel">
<item-type>Number:Watt</item-type>
<item-type>Number:Power</item-type>
<label>PV Power</label>
<state pattern="%.1f %unit%"/>
</channel-type>
<channel-type id="pv-target-temperature-heating-channel">
<item-type>Number:Temperature</item-type>
<label>PV Temp Heating</label>
<state pattern="%.1f %unit%"/>
</channel-type>
<channel-type id="pv-target-temperature-drinkingwater-channel">
<item-type>Number:Temperature</item-type>
<label>PV Temp Drinkingwater</label>
<state pattern="%.1f %unit%"/>
</channel-type>
</thing:thing-descriptions>

0 comments on commit d08fc58

Please sign in to comment.