Skip to content

Commit

Permalink
[intesis] Add error channels to intesisHome thing (#9221)
Browse files Browse the repository at this point in the history
Signed-off-by: Hans-Jörg Merk <github@hmerk.de>
Signed-off-by: Christian Grasser <info@christiangrasser.at>
  • Loading branch information
hmerk authored and Christian Grasser committed Dec 7, 2020
1 parent 67b41f0 commit a8170c0
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bundles/org.openhab.binding.intesis/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,16 @@ private void handleDataPointsResponse(Response response) {
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";
Expand Down Expand Up @@ -485,6 +495,13 @@ private void handleDataPointValues(Response response) {
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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,18 @@
<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>
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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"/>
Expand Down

0 comments on commit a8170c0

Please sign in to comment.