]> git.basschouten.com Git - openhab-addons.git/commitdiff
[intesis] Add error channels to intesisHome thing (#9221)
authorHans-Jörg Merk <github@hmerk.de>
Mon, 7 Dec 2020 06:00:15 +0000 (07:00 +0100)
committerGitHub <noreply@github.com>
Mon, 7 Dec 2020 06:00:15 +0000 (22:00 -0800)
Signed-off-by: Hans-Jörg Merk <github@hmerk.de>
bundles/org.openhab.binding.intesis/README.md
bundles/org.openhab.binding.intesis/src/main/java/org/openhab/binding/intesis/internal/handler/IntesisHomeHandler.java
bundles/org.openhab.binding.intesis/src/main/resources/OH-INF/thing/dynamic-channels.xml
bundles/org.openhab.binding.intesis/src/main/resources/OH-INF/thing/thing-types.xml

index 506b0f896a84d16ced90d42e2fd7ca3f06b37c99..78ec5640adc65664669061ded351cb8d621a28c1 100644 (file)
@@ -42,7 +42,7 @@ The binding uses the following configuration parameters.
 | outdoorTemperature | Number:Temperature | (Readonly) The outdoor air temperature (if applicable) |                                                         |
 | errorStatus        | String             | (Readonly) The error status of the device              | OK,ERR                                                  |
 | errorCode          | String             | (Readonly) The error code if an error encountered      | not documented                                          |
-| wifiSignal         | Number             | (Readonly) WiFi signal strength (IntesisBox only)      | 4=excellent, 3=good, 2=not string, 1=unreliable, 0=none |
+| wifiSignal         | Number             | (Readonly) WiFi signal strength (IntesisBox only)      | 4=excellent, 3=very good, 2=good, 1=acceptable, 0=low   |
 
 Note that individual A/C units may not support all channels, or all possible values for those channels.
 
index 35aea4fd9549bc1c0942bac2134e9c6e3038880b..617415da2fae2e5a027b2c10e658176f813f89d3 100644 (file)
@@ -392,6 +392,16 @@ public class IntesisHomeHandler extends BaseThingHandler {
                         itemType = "Number:Temperature";
                         addChannel(channelId, itemType, null);
                         break;
+                    case 14:
+                        channelId = CHANNEL_TYPE_ERRORSTATUS;
+                        itemType = "Switch";
+                        addChannel(channelId, itemType, null);
+                        break;
+                    case 15:
+                        channelId = CHANNEL_TYPE_ERRORCODE;
+                        itemType = "String";
+                        addChannel(channelId, itemType, null);
+                        break;
                     case 37:
                         channelId = CHANNEL_TYPE_OUTDOORTEMP;
                         itemType = "Number:Temperature";
@@ -485,6 +495,13 @@ public class IntesisHomeHandler extends BaseThingHandler {
                         stateValue = QuantityType.valueOf(unit, SIUnits.CELSIUS);
                         updateState(CHANNEL_TYPE_AMBIENTTEMP, stateValue);
                         break;
+                    case 14:
+                        updateState(CHANNEL_TYPE_ERRORSTATUS,
+                                String.valueOf(element.value).equals("0") ? OnOffType.OFF : OnOffType.ON);
+                        break;
+                    case 15:
+                        updateState(CHANNEL_TYPE_ERRORCODE, StringType.valueOf(String.valueOf(element.value)));
+                        break;
                     case 37:
                         unit = Math.round((element.value) / 10);
                         stateValue = QuantityType.valueOf(unit, SIUnits.CELSIUS);
index 3be613ad98923e61e76d8a4b75d3a69b4e1cb1e3..0e5e919115343499b25e4c9fabcdad993395650f 100644 (file)
                <description>@text/channel-type.intesis.outdoorTemperature.description</description>
                <state pattern="%.1f %unit%" step="0.5" readOnly="true"></state>
        </channel-type>
+       <channel-type id="errorCode">
+               <item-type>String</item-type>
+               <label>@text/channel-type.intesis.errorCode.label</label>
+               <description>@text/channel-type.intesis.errorCode.description</description>
+               <state readOnly="true"></state>
+       </channel-type>
+
+       <channel-type id="errorStatus">
+               <item-type>Switch</item-type>
+               <label>@text/channel-type.intesis.errorStatus.label</label>
+               <description>@text/channel-type.intesis.errorStatus.description</description>
+               <state readOnly="true"></state>
+       </channel-type>
 
 </thing:thing-descriptions>
index ecb15189e57927466256c2956b1275046a9e848e..b89de788308df1c5ef50374be7bcf771b0ca2c4d 100644 (file)
@@ -6,7 +6,7 @@
 
        <thing-type id="intesisHome">
                <label>IntesisHome WiFi Adapter</label>
-               <description>IntesisHome WiFi Adapter</description>
+               <description>Represents a single IntesisHome WiFi adapter on the network, connected to an A/C unit.</description>
                <channels>
                        <channel id="power" typeId="system.power"/>
                </channels>
@@ -26,7 +26,7 @@
 
        <thing-type id="intesisBox">
                <label>IntesisBox Adapter</label>
-               <description>Represents a single IntesisBox adapter on the network, connected to an A/C unit.</description>
+               <description>Represents a single IntesisBox WiFi adapter on the network, connected to an A/C unit.</description>
                <channels>
                        <channel id="power" typeId="system.power"/>
                        <channel id="wifiSignal" typeId="system.signal-strength"/>