Skip to content

Commit

Permalink
[openthermgateway] Add Diagnostics indication channel (openhab#9516)
Browse files Browse the repository at this point in the history
* Added Diagnostics indication channel

Signed-off-by: Arjen Korevaar <a.korevaar@mephix.com>
  • Loading branch information
ArjenKorevaar committed Dec 28, 2020
1 parent 924eca2 commit 6da56da
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 16 deletions.
3 changes: 3 additions & 0 deletions bundles/org.openhab.binding.openthermgateway/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ The OpenTherm Gateway binding supports the following channels:
| airpressfault | Switch | Air pressure fault | yes |
| waterovtemp | Switch | Water over-temperature fault | yes |
| oemfaultcode | Switch | OEM fault code | yes |
| diag | Switch | Diagnostics indication | yes |
| sendcommand | Text | Channel to send commands to the OpenTherm Gateway device | no |

## Full Example
Expand Down Expand Up @@ -109,6 +110,7 @@ Switch GasFlameFault "Gas or flame fault" <switch> { channel="openthermgateway:o
Switch AirPressFault "Air pressure fault" <switch> { channel="openthermgateway:otgw:1:airpressfault" }
Switch WaterOvTemp "Water over-temperature fault" <switch> { channel="openthermgateway:otgw:1:waterovtemp" }
Number OemFaultCode "OEM fault code" { channel="openthermgateway:otgw:1:oemfaultcode" }
Switch Diagnostics "Diagnostics indication" { channel="openthermgateway:otgw:1:diag" }
Text SendCommand "Send command channel" { channel="openthermgateway:otgw:1:sendcommand" }
```

Expand Down Expand Up @@ -148,6 +150,7 @@ sitemap demo label="Main Menu" {
Switch item="AirPressFault" icon="" label="Air pressure fault"
Switch item="waterOvTemp" icon="" label="Water over-temperature fault"
Text item="OemFaultCode" icon="" label="OEM fault code"
Switch item="Diagnostics" icon="" label="Diagnostics indication"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@
*/
package org.openhab.binding.openthermgateway;

import java.util.Collections;
import java.util.Set;
import java.util.stream.Collectors;
import java.util.stream.Stream;

import org.eclipse.jdt.annotation.NonNullByDefault;
import org.openhab.core.thing.ThingTypeUID;
Expand Down Expand Up @@ -68,17 +65,17 @@ public class OpenThermGatewayBindingConstants {
public static final String CHANNEL_AIR_PRESSURE_FAULT = "airpressfault";
public static final String CHANNEL_WATER_OVER_TEMP = "waterovtemp";
public static final String CHANNEL_OEM_FAULTCODE = "oemfaultcode";
public static final String CHANNEL_DIAGNOSTICS_INDICATION = "diag";

public static final Set<String> SUPPORTED_CHANNEL_IDS = Collections
.unmodifiableSet(Stream.of(CHANNEL_ROOM_TEMPERATURE, CHANNEL_ROOM_SETPOINT, CHANNEL_FLOW_TEMPERATURE,
CHANNEL_RETURN_TEMPERATURE, CHANNEL_OUTSIDE_TEMPERATURE, CHANNEL_CENTRAL_HEATING_WATER_PRESSURE,
CHANNEL_CENTRAL_HEATING_ENABLED, CHANNEL_REQUESTED_CENTRAL_HEATING_ENABLED,
CHANNEL_OVERRIDE_CENTRAL_HEATING_ENABLED, CHANNEL_CENTRAL_HEATING_MODE,
CHANNEL_CENTRAL_HEATING_WATER_SETPOINT, CHANNEL_REQUESTED_CENTRAL_HEATING_WATER_SETPOINT,
CHANNEL_OVERRIDE_CENTRAL_HEATING_WATER_SETPOINT, CHANNEL_DOMESTIC_HOT_WATER_TEMPERATURE,
CHANNEL_DOMESTIC_HOT_WATER_ENABLED, CHANNEL_DOMESTIC_HOT_WATER_MODE,
CHANNEL_DOMESTIC_HOT_WATER_SETPOINT, CHANNEL_FLAME, CHANNEL_RELATIVE_MODULATION_LEVEL,
CHANNEL_MAXIMUM_MODULATION_LEVEL, CHANNEL_FAULT, CHANNEL_SERVICEREQUEST, CHANNEL_REMOTE_RESET,
CHANNEL_LOW_WATER_PRESSURE, CHANNEL_GAS_FLAME_FAULT, CHANNEL_AIR_PRESSURE_FAULT,
CHANNEL_WATER_OVER_TEMP, CHANNEL_OEM_FAULTCODE).collect(Collectors.toSet()));
public static final Set<String> SUPPORTED_CHANNEL_IDS = Set.of(CHANNEL_ROOM_TEMPERATURE, CHANNEL_ROOM_SETPOINT,
CHANNEL_FLOW_TEMPERATURE, CHANNEL_RETURN_TEMPERATURE, CHANNEL_OUTSIDE_TEMPERATURE,
CHANNEL_CENTRAL_HEATING_WATER_PRESSURE, CHANNEL_CENTRAL_HEATING_ENABLED,
CHANNEL_REQUESTED_CENTRAL_HEATING_ENABLED, CHANNEL_OVERRIDE_CENTRAL_HEATING_ENABLED,
CHANNEL_CENTRAL_HEATING_MODE, CHANNEL_CENTRAL_HEATING_WATER_SETPOINT,
CHANNEL_REQUESTED_CENTRAL_HEATING_WATER_SETPOINT, CHANNEL_OVERRIDE_CENTRAL_HEATING_WATER_SETPOINT,
CHANNEL_DOMESTIC_HOT_WATER_TEMPERATURE, CHANNEL_DOMESTIC_HOT_WATER_ENABLED, CHANNEL_DOMESTIC_HOT_WATER_MODE,
CHANNEL_DOMESTIC_HOT_WATER_SETPOINT, CHANNEL_FLAME, CHANNEL_RELATIVE_MODULATION_LEVEL,
CHANNEL_MAXIMUM_MODULATION_LEVEL, CHANNEL_FAULT, CHANNEL_SERVICEREQUEST, CHANNEL_REMOTE_RESET,
CHANNEL_LOW_WATER_PRESSURE, CHANNEL_GAS_FLAME_FAULT, CHANNEL_AIR_PRESSURE_FAULT, CHANNEL_WATER_OVER_TEMP,
CHANNEL_OEM_FAULTCODE, CHANNEL_DIAGNOSTICS_INDICATION);
}
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,13 @@
<state readOnly="true"/>
</channel-type>

<channel-type id="diag">
<item-type>Switch</item-type>
<label>Diagnostics Indication</label>
<description>Diagnostics indication</description>
<state readOnly="true"/>
</channel-type>

<channel-type id="sendcommand">
<item-type>String</item-type>
<label>Send Command</label>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,11 @@
<channel id="airpressfault" typeId="airpressfault"/>
<channel id="waterovtemp" typeId="waterovtemp"/>
<channel id="oemfaultcode" typeId="oemfaultcode"/>
<channel id="diag" typeId="diag"/>
<channel id="sendcommand" typeId="sendcommand"/>
</channels>
<properties>
<property name="version">1.0.2</property>
<property name="version">1.1.0</property>
</properties>
<config-description-ref uri="thing-type:openthermgateway:otgw"/>
</thing-type>
Expand Down

0 comments on commit 6da56da

Please sign in to comment.