mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 15:11:59 +01:00
[kaleidescape] Add Buttongrid example and command channel (#16720)
Signed-off-by: Michael Lobstein <michael.lobstein@gmail.com> Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
This commit is contained in:
parent
2dd41f7130
commit
236ec06a7b
@ -3,6 +3,7 @@
|
|||||||
This binding now makes it possible to easily integrate almost all of the capabilities of the Kaleidescape control protocol into openHAB.
|
This binding now makes it possible to easily integrate almost all of the capabilities of the Kaleidescape control protocol into openHAB.
|
||||||
Beyond just integrating playback transport controls, all meta-data provided via the control protocol is made available for display purposes and to use in rules.
|
Beyond just integrating playback transport controls, all meta-data provided via the control protocol is made available for display purposes and to use in rules.
|
||||||
By using rules, it is possible to control other Things such as lighting, projector lens shift, screen masking, etc. based on events that occur during movie playback.
|
By using rules, it is possible to control other Things such as lighting, projector lens shift, screen masking, etc. based on events that occur during movie playback.
|
||||||
|
A simulated remote control is available in BasicUI using the Buttongrid sitemap element described below.
|
||||||
Finally, any other command that is supported by the control protocol can be sent to the component through rules.
|
Finally, any other command that is supported by the control protocol can be sent to the component through rules.
|
||||||
See [Kaleidescape-System-Control-Protocol-Reference-Manual.pdf](https://support.kaleidescape.com/article/Control-Protocol-Reference-Manual) for a reference of available commands.
|
See [Kaleidescape-System-Control-Protocol-Reference-Manual.pdf](https://support.kaleidescape.com/article/Control-Protocol-Reference-Manual) for a reference of available commands.
|
||||||
|
|
||||||
@ -95,6 +96,7 @@ The following channels are available:
|
|||||||
| ui#user_defined_event | String | Will contain custom event messages generated by scripts, sent from another component, or system events |
|
| ui#user_defined_event | String | Will contain custom event messages generated by scripts, sent from another component, or system events |
|
||||||
| ui#user_input | String | Indicates if the user is being prompted for input, what type of input, and any currently entered characters |
|
| ui#user_input | String | Indicates if the user is being prompted for input, what type of input, and any currently entered characters |
|
||||||
| ui#user_input_prompt | String | Indicates user input prompt info and properties currently shown on screen |
|
| ui#user_input_prompt | String | Indicates user input prompt info and properties currently shown on screen |
|
||||||
|
| ui#sendcmd | String | Sends a raw command to the Kaleidescape player (WriteOnly) |
|
||||||
| -- music channels (not available on Alto and Strato) -- |
|
| -- music channels (not available on Alto and Strato) -- |
|
||||||
| music#control | Player | Control Music Playback e.g. play/pause/next/previous/ffward/rewind |
|
| music#control | Player | Control Music Playback e.g. play/pause/next/previous/ffward/rewind |
|
||||||
| music#repeat | Switch | Controls repeat playback for music |
|
| music#repeat | Switch | Controls repeat playback for music |
|
||||||
@ -186,6 +188,7 @@ String z1_Ui_HighlightedSelection "Highlighted Selection: [%s]" { channel="kalei
|
|||||||
String z1_Ui_UserDefinedEvent "User Defined Event: [%s]" { channel="kaleidescape:player:myzone1:ui#user_defined_event" }
|
String z1_Ui_UserDefinedEvent "User Defined Event: [%s]" { channel="kaleidescape:player:myzone1:ui#user_defined_event" }
|
||||||
String z1_Ui_UserInput "User Input: [%s]" { channel="kaleidescape:player:myzone1:ui#user_input" }
|
String z1_Ui_UserInput "User Input: [%s]" { channel="kaleidescape:player:myzone1:ui#user_input" }
|
||||||
String z1_Ui_UserInputPrompt "User Input Prompt[%s]" { channel="kaleidescape:player:myzone1:ui#user_input_prompt" }
|
String z1_Ui_UserInputPrompt "User Input Prompt[%s]" { channel="kaleidescape:player:myzone1:ui#user_input_prompt" }
|
||||||
|
String z1_Ui_Sendcmd "Send Command" { channel="kaleidescape:player:myzone1:ui#sendcmd" }
|
||||||
|
|
||||||
// Music Channels (not available on Alto or Strato)
|
// Music Channels (not available on Alto or Strato)
|
||||||
Player z1_Music_Control "Music Control" { channel="kaleidescape:player:myzone1:music#control" }
|
Player z1_Music_Control "Music Control" { channel="kaleidescape:player:myzone1:music#control" }
|
||||||
@ -334,6 +337,7 @@ sitemap kaleidescape label="Kaleidescape" {
|
|||||||
Text item=z1_Music_AlbumHandle icon="zoom"
|
Text item=z1_Music_AlbumHandle icon="zoom"
|
||||||
Text item=z1_Music_NowplayHandle icon="zoom"
|
Text item=z1_Music_NowplayHandle icon="zoom"
|
||||||
}
|
}
|
||||||
|
Buttongrid label="Kaleidescape Remote" staticIcon=material:tv_remote item=z1_Ui_Sendcmd buttons=[1:1:DETAILS="Info", 1:2:STOP="Stop"=f7:stop, 1:3:PAUSE="Pause"=f7:pause, 2:1:PREVIOUS="Previous"=f7:backward_end_alt, 2:2:PLAY="Play"=f7:play, 2:3:NEXT="Next"=f7:forward_end_alt, 3:1:SCAN_REVERSE="Reverse"=f7:backward, 3:2:KALEIDESCAPE_MENU_TOGGLE="Menu", 3:3:SCAN_FORWARD="Forward"=f7:forward, 4:1:GO_MOVIES="Movies"=f7:film, 4:3:GO_MUSIC="Music"=f7:music_note_2, 4:2:UP="Up"=f7:arrowtriangle_up, 6:2:DOWN="Down"=f7:arrowtriangle_down, 5:1:LEFT="Left"=f7:arrowtriangle_left, 5:3:RIGHT="Right"=f7:arrowtriangle_right, 5:2:SELECT="OK", 7:1:DISC_MENU="Disc Menu", 7:2:INTERMISSION_TOGGLE="Intermission", 7:3:PAGE_UP="Page Up", 8:1:SHUFFLE_COVER_ART="Shuffle", 8:2:GO_NOW_PLAYING="Now Playing", 8:3:PAGE_DOWN="Page Down", 9:1:"KEYBOARD_CHARACTER:1"="1", 9:2:"KEYBOARD_CHARACTER:2"="2", 9:3:"KEYBOARD_CHARACTER:3"="3", 10:1:"KEYBOARD_CHARACTER:4"="4", 10:2:"KEYBOARD_CHARACTER:5"="5", 10:3:"KEYBOARD_CHARACTER:6"="6", 11:1:"KEYBOARD_CHARACTER:7"="7", 11:2:"KEYBOARD_CHARACTER:8"="8", 11:3:"KEYBOARD_CHARACTER:9"="9", 12:1:CANCEL="Cancel", 12:2:"KEYBOARD_CHARACTER:0"="0", 12:3:SELECT="Enter", 13:1:RED="Red", 13:2:GREEN="Green", 13:3:BLUE="Blue", 14:2:YELLOW="Yellow"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
@ -78,6 +78,7 @@ public class KaleidescapeBindingConstants {
|
|||||||
public static final String USER_DEFINED_EVENT = "ui#user_defined_event";
|
public static final String USER_DEFINED_EVENT = "ui#user_defined_event";
|
||||||
public static final String USER_INPUT = "ui#user_input";
|
public static final String USER_INPUT = "ui#user_input";
|
||||||
public static final String USER_INPUT_PROMPT = "ui#user_input_prompt";
|
public static final String USER_INPUT_PROMPT = "ui#user_input_prompt";
|
||||||
|
public static final String CHANNEL_TYPE_SENDCMD = "ui#sendcmd";
|
||||||
|
|
||||||
public static final String MUSIC = "music#";
|
public static final String MUSIC = "music#";
|
||||||
public static final String MUSIC_CONTROL = "music#control";
|
public static final String MUSIC_CONTROL = "music#control";
|
||||||
|
@ -255,6 +255,9 @@ public class KaleidescapeHandler extends BaseThingHandler implements Kaleidescap
|
|||||||
case MUSIC_CONTROL:
|
case MUSIC_CONTROL:
|
||||||
handleControlCommand(command);
|
handleControlCommand(command);
|
||||||
break;
|
break;
|
||||||
|
case CHANNEL_TYPE_SENDCMD:
|
||||||
|
connector.sendCommand(command.toString());
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
logger.debug("Command {} from channel {} failed: unexpected command", command, channel);
|
logger.debug("Command {} from channel {} failed: unexpected command", command, channel);
|
||||||
break;
|
break;
|
||||||
|
@ -158,6 +158,8 @@ channel-type.kaleidescape.screen_mask.label = Screen Mask
|
|||||||
channel-type.kaleidescape.screen_mask.description = Provides aspect ratio and masking information for the current video image
|
channel-type.kaleidescape.screen_mask.description = Provides aspect ratio and masking information for the current video image
|
||||||
channel-type.kaleidescape.screen_mask2.label = Screen Mask 2
|
channel-type.kaleidescape.screen_mask2.label = Screen Mask 2
|
||||||
channel-type.kaleidescape.screen_mask2.description = Provides masking information based on aspect ratio and overscan area
|
channel-type.kaleidescape.screen_mask2.description = Provides masking information based on aspect ratio and overscan area
|
||||||
|
channel-type.kaleidescape.sendcmd.label = Send Command
|
||||||
|
channel-type.kaleidescape.sendcmd.description = Send a command to the component
|
||||||
channel-type.kaleidescape.synopsis.label = Synopsis
|
channel-type.kaleidescape.synopsis.label = Synopsis
|
||||||
channel-type.kaleidescape.synopsis.description = A synopsis of the selected Movie
|
channel-type.kaleidescape.synopsis.description = A synopsis of the selected Movie
|
||||||
channel-type.kaleidescape.title.label = Movie Title
|
channel-type.kaleidescape.title.label = Movie Title
|
||||||
|
@ -33,6 +33,7 @@
|
|||||||
<property name="Control Protocol ID">unknown</property>
|
<property name="Control Protocol ID">unknown</property>
|
||||||
<property name="System Version">unknown</property>
|
<property name="System Version">unknown</property>
|
||||||
<property name="Protocol Version">unknown</property>
|
<property name="Protocol Version">unknown</property>
|
||||||
|
<property name="thingTypeVersion">1</property>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<config-description-ref uri="thing-type:kaleidescape:kaleidescapedevice"/>
|
<config-description-ref uri="thing-type:kaleidescape:kaleidescapedevice"/>
|
||||||
@ -67,6 +68,7 @@
|
|||||||
<property name="Control Protocol ID">unknown</property>
|
<property name="Control Protocol ID">unknown</property>
|
||||||
<property name="System Version">unknown</property>
|
<property name="System Version">unknown</property>
|
||||||
<property name="Protocol Version">unknown</property>
|
<property name="Protocol Version">unknown</property>
|
||||||
|
<property name="thingTypeVersion">1</property>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<config-description-ref uri="thing-type:kaleidescape:kaleidescapedevice"/>
|
<config-description-ref uri="thing-type:kaleidescape:kaleidescapedevice"/>
|
||||||
@ -97,6 +99,7 @@
|
|||||||
<property name="Control Protocol ID">unknown</property>
|
<property name="Control Protocol ID">unknown</property>
|
||||||
<property name="System Version">unknown</property>
|
<property name="System Version">unknown</property>
|
||||||
<property name="Protocol Version">unknown</property>
|
<property name="Protocol Version">unknown</property>
|
||||||
|
<property name="thingTypeVersion">1</property>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<config-description-ref uri="thing-type:kaleidescape:kaleidescapedevice"/>
|
<config-description-ref uri="thing-type:kaleidescape:kaleidescapedevice"/>
|
||||||
@ -127,6 +130,7 @@
|
|||||||
<property name="Control Protocol ID">unknown</property>
|
<property name="Control Protocol ID">unknown</property>
|
||||||
<property name="System Version">unknown</property>
|
<property name="System Version">unknown</property>
|
||||||
<property name="Protocol Version">unknown</property>
|
<property name="Protocol Version">unknown</property>
|
||||||
|
<property name="thingTypeVersion">1</property>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<config-description-ref uri="thing-type:kaleidescape:kaleidescapedevice"/>
|
<config-description-ref uri="thing-type:kaleidescape:kaleidescapedevice"/>
|
||||||
@ -167,6 +171,7 @@
|
|||||||
<channel id="user_defined_event" typeId="user_defined_event"/>
|
<channel id="user_defined_event" typeId="user_defined_event"/>
|
||||||
<channel id="user_input" typeId="user_input"/>
|
<channel id="user_input" typeId="user_input"/>
|
||||||
<channel id="user_input_prompt" typeId="user_input_prompt"/>
|
<channel id="user_input_prompt" typeId="user_input_prompt"/>
|
||||||
|
<channel id="sendcmd" typeId="sendcmd"/>
|
||||||
</channels>
|
</channels>
|
||||||
</channel-group-type>
|
</channel-group-type>
|
||||||
|
|
||||||
@ -205,6 +210,7 @@
|
|||||||
<channel id="user_defined_event" typeId="user_defined_event"/>
|
<channel id="user_defined_event" typeId="user_defined_event"/>
|
||||||
<channel id="user_input" typeId="user_input"/>
|
<channel id="user_input" typeId="user_input"/>
|
||||||
<channel id="user_input_prompt" typeId="user_input_prompt"/>
|
<channel id="user_input_prompt" typeId="user_input_prompt"/>
|
||||||
|
<channel id="sendcmd" typeId="sendcmd"/>
|
||||||
</channels>
|
</channels>
|
||||||
</channel-group-type>
|
</channel-group-type>
|
||||||
|
|
||||||
@ -247,6 +253,7 @@
|
|||||||
<channel id="user_defined_event" typeId="user_defined_event"/>
|
<channel id="user_defined_event" typeId="user_defined_event"/>
|
||||||
<channel id="user_input" typeId="user_input"/>
|
<channel id="user_input" typeId="user_input"/>
|
||||||
<channel id="user_input_prompt" typeId="user_input_prompt"/>
|
<channel id="user_input_prompt" typeId="user_input_prompt"/>
|
||||||
|
<channel id="sendcmd" typeId="sendcmd"/>
|
||||||
</channels>
|
</channels>
|
||||||
</channel-group-type>
|
</channel-group-type>
|
||||||
|
|
||||||
@ -793,4 +800,11 @@
|
|||||||
<state readOnly="true"/>
|
<state readOnly="true"/>
|
||||||
</channel-type>
|
</channel-type>
|
||||||
|
|
||||||
|
<channel-type id="sendcmd" advanced="true">
|
||||||
|
<item-type>String</item-type>
|
||||||
|
<label>Send Command</label>
|
||||||
|
<description>Send a command to the component</description>
|
||||||
|
<autoUpdatePolicy>veto</autoUpdatePolicy>
|
||||||
|
</channel-type>
|
||||||
|
|
||||||
</thing:thing-descriptions>
|
</thing:thing-descriptions>
|
||||||
|
@ -0,0 +1,38 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||||
|
<update:update-descriptions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xmlns:update="https://openhab.org/schemas/update-description/v1.0.0"
|
||||||
|
xsi:schemaLocation="https://openhab.org/schemas/update-description/v1.0.0 https://openhab.org/schemas/update-description-1.0.0.xsd">
|
||||||
|
|
||||||
|
<thing-type uid="kaleidescape:player">
|
||||||
|
<instruction-set targetVersion="1">
|
||||||
|
<add-channel id="sendcmd" groupIds="ui">
|
||||||
|
<type>kaleidescape:sendcmd</type>
|
||||||
|
</add-channel>
|
||||||
|
</instruction-set>
|
||||||
|
</thing-type>
|
||||||
|
|
||||||
|
<thing-type uid="kaleidescape:cinemaone">
|
||||||
|
<instruction-set targetVersion="1">
|
||||||
|
<add-channel id="sendcmd" groupIds="c1-alto_ui">
|
||||||
|
<type>kaleidescape:sendcmd</type>
|
||||||
|
</add-channel>
|
||||||
|
</instruction-set>
|
||||||
|
</thing-type>
|
||||||
|
|
||||||
|
<thing-type uid="kaleidescape:alto">
|
||||||
|
<instruction-set targetVersion="1">
|
||||||
|
<add-channel id="sendcmd" groupIds="c1-alto_ui">
|
||||||
|
<type>kaleidescape:sendcmd</type>
|
||||||
|
</add-channel>
|
||||||
|
</instruction-set>
|
||||||
|
</thing-type>
|
||||||
|
|
||||||
|
<thing-type uid="kaleidescape:strato">
|
||||||
|
<instruction-set targetVersion="1">
|
||||||
|
<add-channel id="sendcmd" groupIds="strato_ui">
|
||||||
|
<type>kaleidescape:sendcmd</type>
|
||||||
|
</add-channel>
|
||||||
|
</instruction-set>
|
||||||
|
</thing-type>
|
||||||
|
|
||||||
|
</update:update-descriptions>
|
Loading…
Reference in New Issue
Block a user