Skip to content

Commit ba5488f

Browse files
authored
[intesis] Fixed error channels not being updated (openhab#8863)
Signed-off-by: Hans-Jörg Merk <[email protected]>
1 parent c7b86c0 commit ba5488f

File tree

3 files changed

+26
-19
lines changed

3 files changed

+26
-19
lines changed

bundles/org.openhab.binding.intesis/README.md

+22-15
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,17 @@ Thing intesis:intesisBox:acOffice "AC Unit Adapter" @ "AC" [ipAddress="192.168.
6868
**Items**
6969

7070
```intesishome.items
71-
Switch ac "Power" { channel="intesis:intesisHome:acOffice:power" }
72-
String acMode "Mode" { channel="intesis:intesisHome:acOffice:mode" }
73-
String acFanSpeed "Fan Speed" <fan> { channel="intesis:intesisHome:acOffice:fanSpeed" }
74-
String acVanesUpDown "Vanes Up/Ddown Position" { channel="intesis:intesisHome:acOffice:vanesUpDown" }
75-
String acVanesLeftRight "Vanes Left/Right Position" { channel="intesis:intesisHome:acOffice:vanesLeftRight" }
76-
Number:Temperature acSetPoint "Target Temperature" <heating> { channel="intesis:intesisHome:acOffice:targetTemperature" }
77-
Number:Temperature acAmbientTemp "Ambient Temperature" <temperature> { channel="intesis:intesisHome:acOffice:ambientTemperature" }
78-
Number:Temperature acOutdoorTemp "Outdoor Temperature" <temperature> { channel="intesis:intesisHome:acOffice:outdoorTemperature" }
71+
Switch ac "Power" { channel="intesis:intesisHome:acOffice:power" }
72+
String acMode "Mode" { channel="intesis:intesisHome:acOffice:mode" }
73+
String acFanSpeed "Fan Speed" <fan> { channel="intesis:intesisHome:acOffice:fanSpeed" }
74+
String acVanesUpDown "Vanes Up/Ddown Position" { channel="intesis:intesisHome:acOffice:vanesUpDown" }
75+
String acVanesLeftRight "Vanes Left/Right Position" { channel="intesis:intesisHome:acOffice:vanesLeftRight" }
76+
Number:Temperature acSetPoint "Target Temperature" <heating> { channel="intesis:intesisHome:acOffice:targetTemperature" }
77+
Number:Temperature acAmbientTemp "Ambient Temperature" <temperature> { channel="intesis:intesisHome:acOffice:ambientTemperature" }
78+
Number:Temperature acOutdoorTemp "Outdoor Temperature" <temperature> { channel="intesis:intesisHome:acOffice:outdoorTemperature" }
79+
String acErrorStatus "Errorstatus" { channel="intesis:intesisBox:acOffice:errorStatus" }
80+
String acErrorCode "Errorcode" { channel="intesis:intesisBox:acOffice:errorCode" }
81+
String acWifiSignal "Wifi Signal Quality" <qualityofservice> { channel="intesis:intesisBox:acOffice:wifiSignal" }
7982
```
8083

8184
**Sitemap**
@@ -85,13 +88,17 @@ sitemap intesishome label="My AC control" {
8588
8689
Frame label="Climate" {
8790
Switch item=ac
88-
Switch item=acMode icon="heating" mappings=[AUTO="Auto", HEAT="Heat", DRY="Dry", FAN="Fan", COOL="Cool"]
89-
Switch item=acFanSpeed icon="qualityofservice" mappings=[AUTO="Auto", 1="Low", 2="Med", 3="MedHigh", 4="High"]
90-
Switch item=acVanesUpDown icon="movecontrol" mappings=[AUTO="Stop", 1="1", 2="2", 3="3", 4="4", 5="5", SWING="Swing"]
91-
Switch item=acVanesLeftRight icon="movecontrol" mappings=[AUTO="Stop", 1="1", 2="2", 3="3", 4="4", 5="5", SWING="Swing"]
92-
Setpoint item=acSetPoint icon="temperature" minValue=16 maxValue=28 step=1
93-
Text item=acAmbientTemp icon="temperature"
94-
Text item=acOutdoorTemp icon="temperature"
91+
Switch item=acMode icon="heating" mappings=[AUTO="Auto", HEAT="Heat", DRY="Dry", FAN="Fan", COOL="Cool"]
92+
Switch item=acFanSpeed icon="qualityofservice" mappings=[AUTO="Auto", 1="Low", 2="Med", 3="MedHigh", 4="High"]
93+
Switch item=acVanesUpDown icon="movecontrol" mappings=[AUTO="Stop", 1="1", 2="2", 3="3", 4="4", 5="5", SWING="Swing"]
94+
Switch item=acVanesLeftRight icon="movecontrol" mappings=[AUTO="Stop", 1="1", 2="2", 3="3", 4="4", 5="5", SWING="Swing"]
95+
Setpoint item=acSetPoint icon="temperature" minValue=16 maxValue=28 step=1
96+
Text item=acAmbientTemp icon="temperature"
97+
Text item=acOutdoorTemp icon="temperature"
98+
Text item=acErrorStatus
99+
Text item=acErrorCode
100+
Text item=acWifiSignal icon="qualityofservice"
101+
95102
}
96103
}
97104
```

bundles/org.openhab.binding.intesis/src/main/java/org/openhab/binding/intesis/internal/handler/IntesisBoxHandler.java

+2-4
Original file line numberDiff line numberDiff line change
@@ -263,12 +263,10 @@ private void receivedUpdate(String function, String receivedValue) {
263263
updateState(CHANNEL_TYPE_VANESLR, new StringType(value));
264264
break;
265265
case "ERRCODE":
266-
properties.put("errorCode", value);
267-
updateProperties(properties);
266+
updateState(CHANNEL_TYPE_ERRORCODE, new StringType(value));
268267
break;
269268
case "ERRSTATUS":
270-
properties.put("errorStatus", value);
271-
updateProperties(properties);
269+
updateState(CHANNEL_TYPE_ERRORSTATUS, new StringType(value));
272270
if ("ERR".equals(value)) {
273271
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR,
274272
"device reported an error");

bundles/org.openhab.binding.intesis/src/main/resources/OH-INF/thing/thing-types.xml

+2
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,14 @@
5959
<item-type>String</item-type>
6060
<label>@text/channel-type.intesis.errorCode.label</label>
6161
<description>@text/channel-type.intesis.errorCode.description</description>
62+
<state readOnly="true"></state>
6263
</channel-type>
6364

6465
<channel-type id="errorStatus">
6566
<item-type>String</item-type>
6667
<label>@text/channel-type.intesis.errorStatus.label</label>
6768
<description>@text/channel-type.intesis.errorStatus.description</description>
69+
<state readOnly="true"></state>
6870
</channel-type>
6971

7072
</thing:thing-descriptions>

0 commit comments

Comments
 (0)