Skip to content

Commit 53694df

Browse files
authored
Add information/failure channels (openhab#16463)
Signed-off-by: Jacob Laursen <[email protected]>
1 parent f0675f8 commit 53694df

18 files changed

+233
-11
lines changed

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

+22-8
Original file line numberDiff line numberDiff line change
@@ -45,18 +45,18 @@ discovery.miele:removalGracePeriod=30
4545

4646
### Thing Configuration for Miele XGW3000
4747

48-
| Configuration Parameter | Description |
49-
|-------------------------|---------------|
50-
| ipAddress | Network address of the Miele@home gateway |
48+
| Configuration Parameter | Description |
49+
|-------------------------|----------------------------------------------------------------------------------------------------------------------------------|
50+
| ipAddress | Network address of the Miele@home gateway |
5151
| interface | Network address of openHAB host interface where the binding will listen for multicast events coming from the Miele@home gateway. |
52-
| userName | Name of a registered Miele@home user. |
53-
| password | Password for the registered Miele@home user. |
54-
| language | Language for state, program and phase texts. Leave blank for system language. |
52+
| userName | Name of a registered Miele@home user. |
53+
| password | Password for the registered Miele@home user. |
54+
| language | Language for state, program and phase texts. Leave blank for system language. |
5555

5656
### Thing Configuration for appliance
5757

58-
| Configuration Parameter | Description |
59-
|-------------------------|---------------|
58+
| Configuration Parameter | Description |
59+
|-------------------------|----------------------------------------------------------|
6060
| uid | Unique identifier for specific appliance on the gateway. |
6161

6262
Each appliance needs the device UID as a configuration parameter.
@@ -112,6 +112,8 @@ Channels available for each appliance type are listed below.
112112
| phase | String | Read | Current phase of the program running on the appliance |
113113
| rawPhase | Number | Read | Current phase of the program running on the appliance as raw number |
114114
| door | Contact | Read | Current state of the door of the appliance |
115+
| info | Switch | Read | Signals information, check appliance for details |
116+
| failure | Switch | Read | Signals failure, check appliance for details |
115117
| switch | Switch | Write | Switch the appliance on or off |
116118

117119
#### Dishwasher
@@ -130,6 +132,8 @@ Channels available for each appliance type are listed below.
130132
| elapsed | Number:Time | Read | Time elapsed in the program running on the appliance |
131133
| finish | Number:Time | Read | Time to finish the program running on the appliance |
132134
| door | Contact | Read | Current state of the door of the appliance |
135+
| info | Switch | Read | Signals information, check appliance for details |
136+
| failure | Switch | Read | Signals failure, check appliance for details |
133137
| switch | Switch | Write | Switch the appliance on or off |
134138
| energyConsumption | Number:Energy | Read | Energy consumption by the currently running program on the appliance |
135139
| waterConsumption | Number:Volume | Read | Water consumption by the currently running program on the appliance |
@@ -172,6 +176,8 @@ Channels available for each appliance type are listed below.
172176
| current | Number:Temperature | Read | Current temperature in the fridge |
173177
| target | Number:Temperature | Read | Target temperature to be reached by the fridge |
174178
| door | Contact | Read | Current state of the door of the appliance |
179+
| info | Switch | Read | Signals information, check appliance for details |
180+
| failure | Switch | Read | Signals failure, check appliance for details |
175181
| switch | Switch | Write | Switch the appliance on or off |
176182

177183
#### Fridge/Freezer combination
@@ -189,6 +195,8 @@ Channels available for each appliance type are listed below.
189195
| fridgecurrent | Number:Temperature | Read | Current temperature in the fridge compartment |
190196
| fridgetarget | Number:Temperature | Read | Target temperature to be reached by the fridge compartment |
191197
| door | Contact | Read | Current state of the door of the appliance |
198+
| info | Switch | Read | Signals information, check appliance for details |
199+
| failure | Switch | Read | Signals failure, check appliance for details |
192200
| start | Switch | Write | Switch the appliance on or off |
193201

194202
#### Hob
@@ -247,6 +255,8 @@ Channels available for each appliance type are listed below.
247255
| temp1 | Number:Temperature | Read | Program temperature in the oven 1 |
248256
| temp2 | Number:Temperature | Read | Program temperature in the oven 2 |
249257
| door | Contact | Read | Current state of the door of the appliance |
258+
| info | Switch | Read | Signals information, check appliance for details |
259+
| failure | Switch | Read | Signals failure, check appliance for details |
250260
| switch | Switch | Write | Switch the appliance on or off |
251261
| stop | Switch | Write | Stop the appliance |
252262

@@ -286,6 +296,8 @@ See oven.
286296
| elapsed | Number:Time | Read | Time elapsed in the program running on the appliance |
287297
| finish | Number:Time | Read | Time to finish the program running on the appliance |
288298
| door | Contact | Read | Current state of the door of the appliance |
299+
| info | Switch | Read | Signals information, check appliance for details |
300+
| failure | Switch | Read | Signals failure, check appliance for details |
289301
| switch | Switch | Write | Switch the appliance on or off |
290302
| step | Number | Read | Current step in the program running on the appliance |
291303

@@ -351,6 +363,8 @@ See oven.
351363
| elapsed | Number:Time | Read | Time elapsed in the program running on the appliance |
352364
| finish | Number:Time | Read | Time to finish the program running on the appliance |
353365
| door | Contact | Read | Current state of the door of the appliance |
366+
| info | Switch | Read | Signals information, check appliance for details |
367+
| failure | Switch | Read | Signals failure, check appliance for details |
354368
| switch | Switch | Write | Switch the appliance on or off |
355369
| target | Number:Temperature | Read | Temperature of the selected program (10 °C = cold) |
356370
| spinningspeed | String | Read | Spinning speed in the program running on the appliance |

bundles/org.openhab.binding.miele/src/main/java/org/openhab/binding/miele/internal/handler/CoffeeMachineChannelSelector.java

+13-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public State getState(String s, @Nullable DeviceMetaData dmd, MieleTranslationPr
6767
}
6868
},
6969
PROGRAM_PHASE(RAW_PHASE_PROPERTY_NAME, PHASE_CHANNEL_ID, DecimalType.class, false),
70-
// lightingStatus signalFailure signalInfo
70+
// lightingStatus
7171
DOOR("signalDoor", "door", OpenClosedType.class, false) {
7272
@Override
7373
public State getState(String s, @Nullable DeviceMetaData dmd, MieleTranslationProvider translationProvider) {
@@ -82,6 +82,18 @@ public State getState(String s, @Nullable DeviceMetaData dmd, MieleTranslationPr
8282
return UnDefType.UNDEF;
8383
}
8484
},
85+
INFO("signalInfo", "info", OnOffType.class, false) {
86+
@Override
87+
public State getState(String s, @Nullable DeviceMetaData dmd, MieleTranslationProvider translationProvider) {
88+
return OnOffType.from("true".equals(s));
89+
}
90+
},
91+
FAILURE("signalFailure", "failure", OnOffType.class, false) {
92+
@Override
93+
public State getState(String s, @Nullable DeviceMetaData dmd, MieleTranslationProvider translationProvider) {
94+
return OnOffType.from("true".equals(s));
95+
}
96+
},
8597
SWITCH("", "switch", OnOffType.class, false);
8698

8799
private final Logger logger = LoggerFactory.getLogger(CoffeeMachineChannelSelector.class);

bundles/org.openhab.binding.miele/src/main/java/org/openhab/binding/miele/internal/handler/DishwasherChannelSelector.java

+12
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,18 @@ public State getState(String s, @Nullable DeviceMetaData dmd, MieleTranslationPr
108108
return UnDefType.UNDEF;
109109
}
110110
},
111+
INFO("signalInfo", "info", OnOffType.class, false, false) {
112+
@Override
113+
public State getState(String s, @Nullable DeviceMetaData dmd, MieleTranslationProvider translationProvider) {
114+
return OnOffType.from("true".equals(s));
115+
}
116+
},
117+
FAILURE("signalFailure", "failure", OnOffType.class, false, false) {
118+
@Override
119+
public State getState(String s, @Nullable DeviceMetaData dmd, MieleTranslationProvider translationProvider) {
120+
return OnOffType.from("true".equals(s));
121+
}
122+
},
111123
SWITCH("", "switch", OnOffType.class, false, false),
112124
ENERGY_CONSUMPTION(EXTENDED_DEVICE_STATE_PROPERTY_NAME, ENERGY_CONSUMPTION_CHANNEL_ID, QuantityType.class, false,
113125
true),

bundles/org.openhab.binding.miele/src/main/java/org/openhab/binding/miele/internal/handler/FridgeChannelSelector.java

+12
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,18 @@ public State getState(String s, @Nullable DeviceMetaData dmd, MieleTranslationPr
7878
return UnDefType.UNDEF;
7979
}
8080
},
81+
INFO("signalInfo", "info", OnOffType.class, false) {
82+
@Override
83+
public State getState(String s, @Nullable DeviceMetaData dmd, MieleTranslationProvider translationProvider) {
84+
return OnOffType.from("true".equals(s));
85+
}
86+
},
87+
FAILURE("signalFailure", "failure", OnOffType.class, false) {
88+
@Override
89+
public State getState(String s, @Nullable DeviceMetaData dmd, MieleTranslationProvider translationProvider) {
90+
return OnOffType.from("true".equals(s));
91+
}
92+
},
8193
START("", "start", OnOffType.class, false);
8294

8395
private final Logger logger = LoggerFactory.getLogger(FridgeChannelSelector.class);

bundles/org.openhab.binding.miele/src/main/java/org/openhab/binding/miele/internal/handler/FridgeFreezerChannelSelector.java

+12
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,18 @@ public State getState(String s, @Nullable DeviceMetaData dmd, MieleTranslationPr
9393
return UnDefType.UNDEF;
9494
}
9595
},
96+
INFO("signalInfo", "info", OnOffType.class, false) {
97+
@Override
98+
public State getState(String s, @Nullable DeviceMetaData dmd, MieleTranslationProvider translationProvider) {
99+
return OnOffType.from("true".equals(s));
100+
}
101+
},
102+
FAILURE("signalFailure", "failure", OnOffType.class, false) {
103+
@Override
104+
public State getState(String s, @Nullable DeviceMetaData dmd, MieleTranslationProvider translationProvider) {
105+
return OnOffType.from("true".equals(s));
106+
}
107+
},
96108
START("", "start", OnOffType.class, false);
97109

98110
private final Logger logger = LoggerFactory.getLogger(FridgeFreezerChannelSelector.class);

bundles/org.openhab.binding.miele/src/main/java/org/openhab/binding/miele/internal/handler/OvenChannelSelector.java

+12
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,18 @@ public State getState(String s, @Nullable DeviceMetaData dmd, MieleTranslationPr
127127
return UnDefType.UNDEF;
128128
}
129129
},
130+
INFO("signalInfo", "info", OnOffType.class, false) {
131+
@Override
132+
public State getState(String s, @Nullable DeviceMetaData dmd, MieleTranslationProvider translationProvider) {
133+
return OnOffType.from("true".equals(s));
134+
}
135+
},
136+
FAILURE("signalFailure", "failure", OnOffType.class, false) {
137+
@Override
138+
public State getState(String s, @Nullable DeviceMetaData dmd, MieleTranslationProvider translationProvider) {
139+
return OnOffType.from("true".equals(s));
140+
}
141+
},
130142
STOP("", "stop", OnOffType.class, false),
131143
SWITCH("", "switch", OnOffType.class, false);
132144

bundles/org.openhab.binding.miele/src/main/java/org/openhab/binding/miele/internal/handler/TumbleDryerChannelSelector.java

+12
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,18 @@ public State getState(String s, @Nullable DeviceMetaData dmd, MieleTranslationPr
116116
return UnDefType.UNDEF;
117117
}
118118
},
119+
INFO("signalInfo", "info", OnOffType.class, false) {
120+
@Override
121+
public State getState(String s, @Nullable DeviceMetaData dmd, MieleTranslationProvider translationProvider) {
122+
return OnOffType.from("true".equals(s));
123+
}
124+
},
125+
FAILURE("signalFailure", "failure", OnOffType.class, false) {
126+
@Override
127+
public State getState(String s, @Nullable DeviceMetaData dmd, MieleTranslationProvider translationProvider) {
128+
return OnOffType.from("true".equals(s));
129+
}
130+
},
119131
SWITCH("", "switch", OnOffType.class, false);
120132

121133
private final Logger logger = LoggerFactory.getLogger(TumbleDryerChannelSelector.class);

bundles/org.openhab.binding.miele/src/main/java/org/openhab/binding/miele/internal/handler/WashingMachineChannelSelector.java

+12
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,18 @@ public State getState(String s, @Nullable DeviceMetaData dmd, MieleTranslationPr
127127
return UnDefType.UNDEF;
128128
}
129129
},
130+
INFO("signalInfo", "info", OnOffType.class, false, false) {
131+
@Override
132+
public State getState(String s, @Nullable DeviceMetaData dmd, MieleTranslationProvider translationProvider) {
133+
return OnOffType.from("true".equals(s));
134+
}
135+
},
136+
FAILURE("signalFailure", "failure", OnOffType.class, false, false) {
137+
@Override
138+
public State getState(String s, @Nullable DeviceMetaData dmd, MieleTranslationProvider translationProvider) {
139+
return OnOffType.from("true".equals(s));
140+
}
141+
},
130142
SWITCH("", "switch", OnOffType.class, false, false),
131143
ENERGY_CONSUMPTION(EXTENDED_DEVICE_STATE_PROPERTY_NAME, ENERGY_CONSUMPTION_CHANNEL_ID, QuantityType.class, false,
132144
true),

bundles/org.openhab.binding.miele/src/main/resources/OH-INF/i18n/miele.properties

+4
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ channel-type.miele.end.label = End Time
7272
channel-type.miele.end.description = End time of the program (programmed or running)
7373
channel-type.miele.energy-consumption.label = Energy Consumption
7474
channel-type.miele.energy-consumption.description = Energy consumption by the currently running program on the appliance
75+
channel-type.miele.failure.label = Signal Failure
76+
channel-type.miele.failure.description = Signals failure, check appliance for details
7577
channel-type.miele.finish.label = Finish Time
7678
channel-type.miele.finish.description = Time to finish the program running on the appliance
7779
channel-type.miele.finish.state.pattern = %1$tR
@@ -81,6 +83,8 @@ channel-type.miele.fridgestate.label = Status
8183
channel-type.miele.fridgestate.description = Current status of the fridge compartment
8284
channel-type.miele.heat.label = Remaining Heat
8385
channel-type.miele.heat.description = Remaining heat level of the heating zone/plate
86+
channel-type.miele.info.label = Signal Information
87+
channel-type.miele.info.description = Signals information, check appliance for details
8488
channel-type.miele.phase.label = Phase
8589
channel-type.miele.phase.description = Current phase of the program running on the appliance
8690
channel-type.miele.plates.label = Plates

bundles/org.openhab.binding.miele/src/main/resources/OH-INF/thing/channeltypes.xml

+15
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,21 @@
100100
<state readOnly="true"></state>
101101
</channel-type>
102102

103+
<channel-type id="info" advanced="true">
104+
<item-type>Switch</item-type>
105+
<label>Signal Information</label>
106+
<description>Signals information, check appliance for details</description>
107+
<state readOnly="true"></state>
108+
</channel-type>
109+
110+
<channel-type id="failure" advanced="true">
111+
<item-type>Switch</item-type>
112+
<label>Signal Failure</label>
113+
<description>Signals failure, check appliance for details</description>
114+
<category>Error</category>
115+
<state readOnly="true"></state>
116+
</channel-type>
117+
103118
<channel-type id="switch">
104119
<item-type>Switch</item-type>
105120
<label>Switch</label>

bundles/org.openhab.binding.miele/src/main/resources/OH-INF/thing/coffeemachine.xml

+6
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,15 @@
2222
<channel id="phase" typeId="phase"/>
2323
<channel id="rawPhase" typeId="rawPhase"/>
2424
<channel id="door" typeId="door"/>
25+
<channel id="info" typeId="info"/>
26+
<channel id="failure" typeId="failure"/>
2527
<channel id="switch" typeId="switch"/>
2628
</channels>
2729

30+
<properties>
31+
<property name="thingTypeVersion">1</property>
32+
</properties>
33+
2834
<representation-property>uid</representation-property>
2935

3036
<config-description-ref uri="thing-type:miele:appliance"/>

bundles/org.openhab.binding.miele/src/main/resources/OH-INF/thing/dishwasher.xml

+3-1
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,15 @@
2626
<channel id="elapsed" typeId="elapsed"/>
2727
<channel id="finish" typeId="finish"/>
2828
<channel id="door" typeId="door"/>
29+
<channel id="info" typeId="info"/>
30+
<channel id="failure" typeId="failure"/>
2931
<channel id="switch" typeId="switch"/>
3032
<channel id="energyConsumption" typeId="energy-consumption"/>
3133
<channel id="waterConsumption" typeId="water-consumption"/>
3234
</channels>
3335

3436
<properties>
35-
<property name="thingTypeVersion">1</property>
37+
<property name="thingTypeVersion">2</property>
3638
</properties>
3739

3840
<representation-property>uid</representation-property>

bundles/org.openhab.binding.miele/src/main/resources/OH-INF/thing/fridge.xml

+6
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,15 @@
2424
<description>Target temperature to be reached by the fridge</description>
2525
</channel>
2626
<channel id="door" typeId="door"/>
27+
<channel id="info" typeId="info"/>
28+
<channel id="failure" typeId="failure"/>
2729
<channel id="start" typeId="switch"/>
2830
</channels>
2931

32+
<properties>
33+
<property name="thingTypeVersion">1</property>
34+
</properties>
35+
3036
<representation-property>uid</representation-property>
3137

3238
<config-description-ref uri="thing-type:miele:appliance"/>

bundles/org.openhab.binding.miele/src/main/resources/OH-INF/thing/fridgefreezer.xml

+6
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,15 @@
3333
<description>Target temperature to be reached by the fridge compartment</description>
3434
</channel>
3535
<channel id="door" typeId="door"/>
36+
<channel id="info" typeId="info"/>
37+
<channel id="failure" typeId="failure"/>
3638
<channel id="start" typeId="switch"/>
3739
</channels>
3840

41+
<properties>
42+
<property name="thingTypeVersion">1</property>
43+
</properties>
44+
3945
<representation-property>uid</representation-property>
4046

4147
<config-description-ref uri="thing-type:miele:appliance"/>

bundles/org.openhab.binding.miele/src/main/resources/OH-INF/thing/oven.xml

+6
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,16 @@
4242
<description>Program temperature in the oven</description>
4343
</channel>
4444
<channel id="door" typeId="door"/>
45+
<channel id="info" typeId="info"/>
46+
<channel id="failure" typeId="failure"/>
4547
<channel id="stop" typeId="stop"/>
4648
<channel id="switch" typeId="switch"/>
4749
</channels>
4850

51+
<properties>
52+
<property name="thingTypeVersion">1</property>
53+
</properties>
54+
4955
<representation-property>uid</representation-property>
5056

5157
<config-description-ref uri="thing-type:miele:appliance"/>

0 commit comments

Comments
 (0)