The thing has the following configuration parameters:
-| Parameter Label | Parameter ID | Description | Accepted values |
-|------------------------|---------------|------------------------------------------------------------------------------------|------------------------------------------------------|
-| Address | host | Host name or IP address of the Kaleidescape component | A host name or IP address |
-| Port | port | Communication port of the IP connection | 10000 (default - should not need to change) |
-| Serial Port | serialPort | Serial port for connecting directly a component | Serial port name (optional) |
-| Update Period | updatePeriod | Tells the component how often time status updates should be sent (see notes below) | 0 or 1 are the currently accepted values (default 0) |
-| Volume Control Enabled | volumeEnabled | Enable the volume and mute controls in the K iPad & phone apps | Boolean (default false) |
-| Initial Volume Setting | initialVolume | Initial volume level set when the binding starts up | 0 to 75 (default 25) |
+| Parameter Label | Parameter ID | Description | Accepted values |
+|--------------------------|------------------------|--------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------|
+| Address | host | Host name or IP address of the Kaleidescape component | A host name or IP address |
+| Port | port | Communication port of the IP connection | 10000 (default - should not need to change) |
+| Serial Port | serialPort | Serial port for connecting directly a component | Serial port name (optional) |
+| Update Period | updatePeriod | Tells the component how often time status updates should be sent (see notes below) | 0 or 1 are the currently accepted values (default 0) |
+| Volume Control Enabled | volumeEnabled | Enable the volume and mute controls in the K iPad & phone apps | Boolean (default false) |
+| Initial Volume Setting | initialVolume | Initial volume level set when the binding starts up | 0 to 75 (default 25) |
+| Load Highlighted Details | loadHighlightedDetails | When enabled the binding will automatically load the the metadata channels when the selected item in the UI (Movie or Album) changes | Boolean (default false) |
+| Load Album Details | loadAlbumDetails | When enabled the binding will automatically load the metadata channels for the currently playing Album | Boolean (default false) N/A for Alto and Strato |
Some notes:
kaleidescape.things:
-```java
-kaleidescape:player:myzone1 "M500 Living Rm" [host="192.168.1.10", updatePeriod=0, volumeEnabled=true, initialVolume=20]
-kaleidescape:cinemaone:myzone2 "My Cinema One" [host="192.168.1.11", updatePeriod=0, volumeEnabled=true, initialVolume=20]
+```
+kaleidescape:player:myzone1 "M500 Living Rm" [ host="192.168.1.10", updatePeriod=0, loadHighlightedDetails=true, loadAlbumDetails=true ]
+kaleidescape:cinemaone:myzone2 "My Cinema One" [ host="192.168.1.11", updatePeriod=0, loadHighlightedDetails=true, loadAlbumDetails=true ]
+kaleidescape:strato:myzone3 "Strato Theater Rm" [ host="192.168.1.12", updatePeriod=0, loadHighlightedDetails=true ]
+
```
kaleidescape.items:
-```java
+```
// Virtual switch to send a command, see sitemap and rules below
Switch z1_GoMovieCovers "Go to Movie Covers"
String z1_Detail_Country "Country: [%s]" { channel="kaleidescape:player:myzone1:detail#country" }
String z1_Detail_AspectRatio "Aspect Ratio: [%s]" { channel="kaleidescape:player:myzone1:detail#aspect_ratio" }
String z1_Detail_DiscLocation "Disc Location: [%s]" { channel="kaleidescape:player:myzone1:detail#disc_location" }
+
```
ksecondsformat.js:
-```java
+```
(function(totalSeconds) {
if (isNaN(totalSeconds)) {
return '-';
kaleidescape.sitemap:
-```perl
+```
sitemap kaleidescape label="Kaleidescape" {
Frame label="Zone 1" {
Image item=z1_Detail_CoverArt
kaleidescape.rules:
-```java
+```
var int lightPercent
val kactions = getActions("kaleidescape","kaleidescape:player:myzone1")
when
Item z1_GoMovieCovers received command
then
- if(null === kactions) {
+ if (null === kactions) {
logInfo("kactions", "Actions not found, check thing ID")
return
}
when
Item z1_PlayScript received command
then
- if(null === kactions) {
+ if (null === kactions) {
logInfo("kactions", "Actions not found, check thing ID")
return
}
}
end
-rule "Load selected item Metadata"
-when
- Item z1_Ui_HighlightedSelection changed
-then
- if(null === kactions) {
- logInfo("kactions", "Actions not found, check thing ID")
- return
- }
- kactions.sendKCommand("GET_CONTENT_DETAILS:" + z1_Ui_HighlightedSelection.state.toString + ":")
-end
-
-rule "Load Metadata for currently playing album"
-when
- Item z1_Music_AlbumHandle changed
-then
- if(null === kactions) {
- logInfo("kactions", "Actions not found, check thing ID")
- return
- }
- kactions.sendKCommand("GET_CONTENT_DETAILS:" + z1_Music_AlbumHandle.state.toString + ":")
-end
-
rule "Bring up Lights when movie is over"
when
Item z1_Ui_MovieLocation changed from "Main content" to "End Credits"
while (lightPercent < 100) {
lightPercent = lightPercent + 5
logInfo("k rules", "lights at " + lightPercent.toString + " percent")
- //myLightItem.sendCommand(lightPercent)
+ // myLightItem.sendCommand(lightPercent)
Thread::sleep(5000)
}
end
when
Item z1_Ui_MovieLocation changed from "Main content" to "Intermission"
then
- //myLightItem.sendCommand(20)
+ // myLightItem.sendCommand(20)
logInfo("k rules", "intermission started")
end
when
Item z1_Ui_MovieLocation changed from "Intermission" to "Main content"
then
- //myLightItem.sendCommand(OFF)
+ // myLightItem.sendCommand(OFF)
logInfo("k rules", "intermission over")
end
+
+// The following are no longer required since the thing configuration will enable automatic loading of metatdata.
+// However the examples are still valid for advanced use cases where retrieving metadata from an arbitrary content handle is desired.
+
+rule "Load selected item Metadata"
+when
+ Item z1_Ui_HighlightedSelection changed
+then
+ if (null === kactions) {
+ logInfo("kactions", "Actions not found, check thing ID")
+ return
+ }
+ kactions.sendKCommand("GET_CONTENT_DETAILS:" + z1_Ui_HighlightedSelection.state.toString + ":")
+end
+
+rule "Load Metadata for currently playing album"
+when
+ Item z1_Music_AlbumHandle changed
+then
+ if (null === kactions) {
+ logInfo("kactions", "Actions not found, check thing ID")
+ return
+ }
+ kactions.sendKCommand("GET_CONTENT_DETAILS:" + z1_Music_AlbumHandle.state.toString + ":")
+end
```