Skip to content

Commit 28c136d

Browse files
authored
[kaleidescape] Update readiness_state when Thing is offline (#20485)
* Update readiness_state when Thing is offline Signed-off-by: Michael Lobstein <michael.lobstein@gmail.com>
1 parent 5effac5 commit 28c136d

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ The supported Thing types are:
1717
- `player` Any KPlayer, M Class [M300, M500, M700] or Cinema One 1st Gen player
1818
- `cinemaone` Cinema One (2nd Gen)
1919
- `alto`
20-
- `strato` Includes Strato, Strato S, Strato C, Strato V or Strato M
20+
- `strato` Includes Strato, Strato S, Strato C, Strato V, Strato M, or Strato E
2121

2222
The binding supports either a TCP/IP connection or direct serial port connection (19200-8-N-1) to the Kaleidescape component.
2323

@@ -94,7 +94,7 @@ The following channels are available:
9494
| ui#cinemascape_mode | String | Identifies the CinemaScape mode currently active |
9595
| ui#ui_state | String | Provides information about which screen is visible in the Kaleidescape user interface |
9696
| ui#child_mode_state | String | Indicates if the onscreen display is displaying the child user interface |
97-
| ui#readiness_state | String | Indicates the system's current idle mode (Not available on Premiere system players) |
97+
| ui#readiness_state | String | Indicates the system's current idle mode or if the Thing is offline (Not available on Premiere system players) |
9898
| ui#highlighted_selection | String | Specifies the handle of the movie or album currently selected on the user interface |
9999
| ui#user_defined_event | String | Will contain custom event messages generated by scripts, sent from another component, or system events |
100100
| ui#user_input | String | Indicates if the user is being prompted for input, what type of input, and any currently entered characters |

bundles/org.openhab.binding.kaleidescape/src/main/java/org/openhab/binding/kaleidescape/internal/handler/KaleidescapeHandler.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,11 +294,15 @@ private synchronized boolean openConnection() {
294294
* Close the connection with the Kaleidescape component
295295
*/
296296
private synchronized void closeConnection() {
297+
if (getThing().getChannel(SYSTEM_READINESS_STATE) != null) {
298+
updateState(SYSTEM_READINESS_STATE, new StringType("Offline"));
299+
}
300+
297301
if (connector.isConnected()) {
298302
connector.close();
299-
connector.removeEventListener(this);
300303
logger.debug("closeConnection(): disconnected");
301304
}
305+
connector.removeEventListener(this);
302306
}
303307

304308
@Override

0 commit comments

Comments
 (0)