[openthermgateway] Add Diagnostics indication channel (#9516)

* Added Diagnostics indication channel

Signed-off-by: Arjen Korevaar <a.korevaar@mephix.com>
This commit is contained in:
Arjen Korevaar 2020-12-28 19:13:51 +01:00 committed by GitHub
parent 924eca29f2
commit 6da56da7a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 24 additions and 16 deletions

View File

@ -65,6 +65,7 @@ The OpenTherm Gateway binding supports the following channels:
| airpressfault | Switch | Air pressure fault | yes | | airpressfault | Switch | Air pressure fault | yes |
| waterovtemp | Switch | Water over-temperature fault | yes | | waterovtemp | Switch | Water over-temperature fault | yes |
| oemfaultcode | Switch | OEM fault code | yes | | oemfaultcode | Switch | OEM fault code | yes |
| diag | Switch | Diagnostics indication | yes |
| sendcommand | Text | Channel to send commands to the OpenTherm Gateway device | no | | sendcommand | Text | Channel to send commands to the OpenTherm Gateway device | no |
## Full Example ## Full Example
@ -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 AirPressFault "Air pressure fault" <switch> { channel="openthermgateway:otgw:1:airpressfault" }
Switch WaterOvTemp "Water over-temperature fault" <switch> { channel="openthermgateway:otgw:1:waterovtemp" } Switch WaterOvTemp "Water over-temperature fault" <switch> { channel="openthermgateway:otgw:1:waterovtemp" }
Number OemFaultCode "OEM fault code" { channel="openthermgateway:otgw:1:oemfaultcode" } 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" } Text SendCommand "Send command channel" { channel="openthermgateway:otgw:1:sendcommand" }
``` ```
@ -148,6 +150,7 @@ sitemap demo label="Main Menu" {
Switch item="AirPressFault" icon="" label="Air pressure fault" Switch item="AirPressFault" icon="" label="Air pressure fault"
Switch item="waterOvTemp" icon="" label="Water over-temperature fault" Switch item="waterOvTemp" icon="" label="Water over-temperature fault"
Text item="OemFaultCode" icon="" label="OEM fault code" Text item="OemFaultCode" icon="" label="OEM fault code"
Switch item="Diagnostics" icon="" label="Diagnostics indication"
} }
} }

View File

@ -12,10 +12,7 @@
*/ */
package org.openhab.binding.openthermgateway; package org.openhab.binding.openthermgateway;
import java.util.Collections;
import java.util.Set; import java.util.Set;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import org.eclipse.jdt.annotation.NonNullByDefault; import org.eclipse.jdt.annotation.NonNullByDefault;
import org.openhab.core.thing.ThingTypeUID; import org.openhab.core.thing.ThingTypeUID;
@ -68,17 +65,17 @@ public class OpenThermGatewayBindingConstants {
public static final String CHANNEL_AIR_PRESSURE_FAULT = "airpressfault"; public static final String CHANNEL_AIR_PRESSURE_FAULT = "airpressfault";
public static final String CHANNEL_WATER_OVER_TEMP = "waterovtemp"; public static final String CHANNEL_WATER_OVER_TEMP = "waterovtemp";
public static final String CHANNEL_OEM_FAULTCODE = "oemfaultcode"; 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 public static final Set<String> SUPPORTED_CHANNEL_IDS = Set.of(CHANNEL_ROOM_TEMPERATURE, CHANNEL_ROOM_SETPOINT,
.unmodifiableSet(Stream.of(CHANNEL_ROOM_TEMPERATURE, CHANNEL_ROOM_SETPOINT, CHANNEL_FLOW_TEMPERATURE, CHANNEL_FLOW_TEMPERATURE, CHANNEL_RETURN_TEMPERATURE, CHANNEL_OUTSIDE_TEMPERATURE,
CHANNEL_RETURN_TEMPERATURE, CHANNEL_OUTSIDE_TEMPERATURE, CHANNEL_CENTRAL_HEATING_WATER_PRESSURE, CHANNEL_CENTRAL_HEATING_WATER_PRESSURE, CHANNEL_CENTRAL_HEATING_ENABLED,
CHANNEL_CENTRAL_HEATING_ENABLED, CHANNEL_REQUESTED_CENTRAL_HEATING_ENABLED, CHANNEL_REQUESTED_CENTRAL_HEATING_ENABLED, CHANNEL_OVERRIDE_CENTRAL_HEATING_ENABLED,
CHANNEL_OVERRIDE_CENTRAL_HEATING_ENABLED, CHANNEL_CENTRAL_HEATING_MODE, CHANNEL_CENTRAL_HEATING_MODE, CHANNEL_CENTRAL_HEATING_WATER_SETPOINT,
CHANNEL_CENTRAL_HEATING_WATER_SETPOINT, CHANNEL_REQUESTED_CENTRAL_HEATING_WATER_SETPOINT, CHANNEL_REQUESTED_CENTRAL_HEATING_WATER_SETPOINT, CHANNEL_OVERRIDE_CENTRAL_HEATING_WATER_SETPOINT,
CHANNEL_OVERRIDE_CENTRAL_HEATING_WATER_SETPOINT, CHANNEL_DOMESTIC_HOT_WATER_TEMPERATURE, CHANNEL_DOMESTIC_HOT_WATER_TEMPERATURE, CHANNEL_DOMESTIC_HOT_WATER_ENABLED, CHANNEL_DOMESTIC_HOT_WATER_MODE,
CHANNEL_DOMESTIC_HOT_WATER_ENABLED, CHANNEL_DOMESTIC_HOT_WATER_MODE, CHANNEL_DOMESTIC_HOT_WATER_SETPOINT, CHANNEL_FLAME, CHANNEL_RELATIVE_MODULATION_LEVEL,
CHANNEL_DOMESTIC_HOT_WATER_SETPOINT, CHANNEL_FLAME, CHANNEL_RELATIVE_MODULATION_LEVEL, CHANNEL_MAXIMUM_MODULATION_LEVEL, CHANNEL_FAULT, CHANNEL_SERVICEREQUEST, CHANNEL_REMOTE_RESET,
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_LOW_WATER_PRESSURE, CHANNEL_GAS_FLAME_FAULT, CHANNEL_AIR_PRESSURE_FAULT, CHANNEL_OEM_FAULTCODE, CHANNEL_DIAGNOSTICS_INDICATION);
CHANNEL_WATER_OVER_TEMP, CHANNEL_OEM_FAULTCODE).collect(Collectors.toSet()));
} }

View File

@ -233,6 +233,13 @@
<state readOnly="true"/> <state readOnly="true"/>
</channel-type> </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"> <channel-type id="sendcommand">
<item-type>String</item-type> <item-type>String</item-type>
<label>Send Command</label> <label>Send Command</label>

View File

@ -38,10 +38,11 @@
<channel id="airpressfault" typeId="airpressfault"/> <channel id="airpressfault" typeId="airpressfault"/>
<channel id="waterovtemp" typeId="waterovtemp"/> <channel id="waterovtemp" typeId="waterovtemp"/>
<channel id="oemfaultcode" typeId="oemfaultcode"/> <channel id="oemfaultcode" typeId="oemfaultcode"/>
<channel id="diag" typeId="diag"/>
<channel id="sendcommand" typeId="sendcommand"/> <channel id="sendcommand" typeId="sendcommand"/>
</channels> </channels>
<properties> <properties>
<property name="version">1.0.2</property> <property name="version">1.1.0</property>
</properties> </properties>
<config-description-ref uri="thing-type:openthermgateway:otgw"/> <config-description-ref uri="thing-type:openthermgateway:otgw"/>
</thing-type> </thing-type>