Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Buttongrid README examples #16701

Merged
merged 6 commits into from
May 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions bundles/org.openhab.binding.benqprojector/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,10 @@ sitemap benq label="BenQ Projector" {
Selection item=benqAspectRatio label="Aspect Ratio"
Switch item=benqFreeze label="Freeze"
Switch item=benqBlank label="Blank Screen"
// This Selection is deprecated in favor of the Buttongrid element below
Selection item=benqDirect label="Direct Command"
Text item=benqLampTime
Buttongrid item=benqDirect label="Remote Control" staticIcon=material:tv_remote buttons=[1:2:up="Up"=f7:arrowtriangle_up, 3:2:down="Down"=f7:arrowtriangle_down, 2:1:left="Left"=f7:arrowtriangle_left, 2:3:right="Right"=f7:arrowtriangle_right, 2:2:enter="Enter", 4:1:"menu=on"="Menu On", 4:2:"menu=off"="Menu Off", 4:3:"vol=+"="Volume +", 5:1:"mute=on"="Mute On", 5:2:"mute=off"="Mute Off", 5:3:"vol=-"="Volume -", 6:1:zoomO="Zoom Out", 6:2:zoomI="Zoom In", 6:3:auto="Zoom Auto"]
}
Frame label="Advanced Controls" {
Switch item=benqDirect label="Image Flip" mappings=["pp=FT"="Front","pp=RE"="Rear","pp=FC"="Front Ceiling","pp=RC"="Rear Ceiling"]
Expand Down
2 changes: 2 additions & 0 deletions bundles/org.openhab.binding.epsonprojector/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,9 @@ sitemap epson label="Epson Projector"
Switch item=epsonMute label="AV Mute"
// Volume can be a Setpoint also
Slider item=epsonVolume label="Volume" minValue=0 maxValue=100 step=1 icon="soundvolume"
// This Switch is deprecated in favor of the Buttongrid element below
Switch item=epsonKeyCode label="Navigation" icon="screen" mappings=["03"="Menu", "35"="˄", "36"="˅", "37"="<", "38"=">", "16"="Enter"]
Buttongrid item=epsonKeyCode label="Navigation" staticIcon=material:tv_remote buttons=[1:1:"03"="Menu", 1:2:"35"="Up"=f7:arrowtriangle_up, 3:2:"36"="Down"=f7:arrowtriangle_down, 2:1:"37"="Left"=f7:arrowtriangle_left, 2:3:"38"="Right"=f7:arrowtriangle_right, 2:2:"16"="Enter"]
}
Frame label="Adjust Image" {
Setpoint item=epsonBrightness label="Brightness"
Expand Down
2 changes: 2 additions & 0 deletions bundles/org.openhab.binding.oppo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,9 @@ sitemap oppo label="Oppo Blu-ray" {
Setpoint item=oppo_sub_shift label="Sub Title Shift [%d]" minValue=-10 maxValue=10 step=1 visibility=[oppo_power==ON]
Selection item=oppo_hdmi_mode visibility=[oppo_power==ON] icon="video"
Selection item=oppo_hdr_mode visibility=[oppo_power==ON] icon="colorwheel"
// This Selection is deprecated in favor of the Buttongrid element below
Selection item=oppo_remote_button visibility=[oppo_power==ON]
Buttongrid label="Remote Control" staticIcon=material:tv_remote item=oppo_remote_button buttons=[1:1:POW="Power"=switch-off, 1:3:SRC="Input", 1:4:EJT="Open"=f7:eject, 2:2:NFX="Netflix", 2:3:VDU="Vudu", 3:1:PUR="Pure Audio", 3:2:VDN="Volume -", 3:3:VUP="Volume +", 3:4:MUT="Mute"=soundvolume_mute, 4:1:NU1="1", 4:2:NU2="2", 4:3:NU3="3", 4:4:HOM="Home"=f7:house, 5:1:NU4="4", 5:2:NU5="5", 5:3:NU6="6", 5:4:PUP="Page Up", 6:1:NU7="7", 6:2:NU8="8", 6:3:NU9="9", 6:4:PDN="Page Down", 7:1:CLR="Clear", 7:2:NU0="0", 7:3:GOT="Goto", 7:4:OSD="Info", 8:1:TTL="Top Menu", 8:2:NUP="Up"=f7:arrowtriangle_up, 8:3:MNU="Pop-Up Menu", 9:1:NLT="Left"=f7:arrowtriangle_left, 9:2:SEL="Enter", 9:3:NRT="Right"=f7:arrowtriangle_right, 10:1:OPT="Option", 10:2:NDN="Down"=f7:arrowtriangle_down, 10:3:RET="Return", 11:1:RED="Red", 11:2:GRN="Green", 11:3:BLU="Blue", 11:4:YLW="Yellow", 12:1:STP="Stop"=f7:stop, 12:2:PLA="Play"=f7:play, 12:3:PAU="Pause"=f7:pause, 13:1:PRE="Prev"=f7:backward_end_alt, 13:2:REV="Rev"=f7:backward, 13:3:FWD="Fwd"=f7:forward, 13:4:NXT="Next"=f7:forward_end_alt, 14:1:AUD="Audio", 14:2:SUB="Subtitle", 14:3:ZOM="Zoom", 14:4:M3D="3D", 15:1:SET="Setup", 15:2:ATB="AB Replay", 15:3:RPT="Repeat", 15:4:DIM="Dimmer", 16:1:HDM="Resolution", 16:2:SEH="Picture", 16:3:INH="Detail Info", 16:4:HDR="HDR"]
}
}
```
Expand Down
2 changes: 2 additions & 0 deletions bundles/org.openhab.binding.panasonicbdp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ panasonicbdp.sitemap:
sitemap panasonicbdp label="Panasonic Blu-ray" {
Frame label="Blu-ray Player" {
Switch item=Player_Power
// This Selection is deprecated in favor of the Buttongrid element below
Selection item=Player_Button icon="player"
Default item=Player_Control
Text item=Player_PlayerStatus
Expand All @@ -117,6 +118,7 @@ sitemap panasonicbdp label="Panasonic Blu-ray" {
Text item=Player_TimeTotal icon="time"
Text item=Player_ChapterCurrent icon="time"
Text item=Player_ChapterTotal icon="time"
Buttongrid label="Remote Control" staticIcon=material:tv_remote item=Player_Button buttons=[1:1:POWER="Power"=switch-off, 1:3:OP_CL="Open"=f7:eject, 2:1:D1="1", 2:2:D2="2", 2:3:D3="3", 3:1:D4="4", 3:2:D5="5", 3:3:D6="6", 4:1:D7="7", 4:2:D8="8", 4:3:D9="9", 5:1:SHARP="# [_]", 5:2:D0="0", 5:3:CLEAR="* Cancel", 6:1:NETFLIX="Netflix", 6:2:MLTNAVI="Home"=f7:house, 6:3:NETWORK="Internet", 7:1:PUPMENU="Pop-Up Menu", 7:2:UP="UP"=f7:arrowtriangle_up, 7:3:TITLE="Top Menu", 8:1:LEFT="Left"=f7:arrowtriangle_left, 8:2:SELECT="OK", 8:3:RIGHT="Right"=f7:arrowtriangle_right, 9:1:MENU="Option", 9:2:DOWN="Down"=f7:arrowtriangle_down, 9:3:RETURN="Return", 10:1:REV="Rev"=f7:backward, 10:2:PLAYBACK="Play"=f7:play, 10:3:CUE="Fwd"=f7:forward, 11:1:SKIPREV="Prev"=f7:backward_end_alt, 11:2:PAUSE="Pause"=f7:pause, 11:3:SKIPFWD="Next"=f7:forward_end_alt, 12:1:CLOSED_CAPTION="CC", 12:2:STOP="Stop"=f7:stop, 12:3:MIRACAST="Mirroring", 13:1:RED="Red", 13:2:GREEN="Green", 13:3:YELLOW="Yellow", 14:1:BLUE="Blue", 14:2:DSPSEL="Status", 14:3:PLAYBACKINFO="Playback Info", 15:1:TITLEONOFF="Subtitle", 15:2:AUDIOSEL="Audio", 15:3:PICTURESETTINGS="Video Setting", 16:1:HDR_PICTUREMODE="HDR Setting", 16:2:SOUNDEFFECT="Sound Effect", 16:3:HIGHCLARITY="High Clarity", 17:2:SKIP_THE_TRAILER="Skip The Trailer"]
}
}
```
Expand Down
7 changes: 7 additions & 0 deletions bundles/org.openhab.binding.roku/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ sitemap roku label="Roku" {
Frame label="My Roku" {
Selection item=Player_ActiveApp icon="screen"
Text item=Player_ActiveAppName
// This Selection is deprecated in favor of the Buttongrid element below
Selection item=Player_Button icon="screen"
Default item=Player_Control
Text item=Player_PlayMode
Expand All @@ -157,6 +158,12 @@ sitemap roku label="Roku" {
Text item=Player_ProgramTitle
Text item=Player_ProgramDescription
Text item=Player_ProgramRating

// Buttongrid for Roku player
Buttongrid label="Remote Control" staticIcon=material:tv_remote item=Player_Button buttons=[1:1:Back="Back", 1:2:Home="Home"=f7:house, 1:3:Search="Search", 2:2:Up="Up"=f7:arrowtriangle_up, 4:2:Down="Down"=f7:arrowtriangle_down, 3:1:Left="Left"=f7:arrowtriangle_left, 3:3:Right="Right"=f7:arrowtriangle_right, 3:2:Select="Select", 5:1:InstantReplay="Instant Replay", 5:2:Info="Info*", 6:1:Rev="Reverse"=f7:backward, 6:2:Play="Play/Pause"=f7:playpause, 6:3:Fwd="Forward"=f7:forward, 7:1:Enter="Enter", 7:2:Backspace="Backspace", 7:3:FindRemote="Find Remote"]

// Buttongrid for Roku TV
Buttongrid label="Remote Control" staticIcon=material:tv_remote item=Player_Button buttons=[1:1:POWERON="Power On"=switch-on, 1:2:PowerOff="Power Off"=switch-off, 1:3:InputTuner="Tuner", 1:4:InputAV1="AV 1", 2:1:InputHDMI1="HDMI 1", 2:2:InputHDMI2="HDMI 2", 2:3:InputHDMI3="HDMI 3", 2:4:InputHDMI4="HDMI 4", 3:1:Back="Back", 3:2:Home="Home"=f7:house, 3:3:Search="Search", 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="Select", 7:1:InstantReplay="Instant Replay", 7:2:Info="Info*", 8:1:Rev="Reverse"=f7:backward, 8:2:Play="Play/Pause"=f7:playpause, 8:3:Fwd="Forward"=f7:forward, 9:1:Enter="Enter", 9:2:Backspace="Backspace", 9:3:FindRemote="Find Remote", 4:4:ChannelUp="Channel +", 5:4:ChannelDown="Channel -", 7:4:VolumeUp="Volume +", 8:4:VolumeMute="Mute"=soundvolume_mute, 9:4:VolumeDown="Volume -"]
}
}
```
34 changes: 19 additions & 15 deletions bundles/org.openhab.binding.tivo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ SELECT
TIVO
LIVETV
GUIDE
BACK
INFO
EXIT
THUMBSUP
Expand Down Expand Up @@ -107,6 +108,7 @@ ACTION_D
CC_ON
CC_OFF
FIND_REMOTE
STANDBY
ASPECT_CORRECTION_FULL
ASPECT_CORRECTION_PANEL
ASPECT_CORRECTION_ZOOM
Expand Down Expand Up @@ -145,27 +147,29 @@ String TiVo_KeyboardStr "Search String"
```

- The item `TiVo_SetChannelName` depends upon a valid `tivo.map` file to translate channel numbers to channel names. The openHAB **MAP** transformation service must also be installed.
- See [this discussion thread] (<https://community.openhab.org/t/bogob-big-ol-grid-o-buttons-is-this-even-possible-yes-yes-it-is/115343>) for an example of setting up an advanced UI to simulate the look of the TiVo remote.
- A simulated remote control widget is available using the Buttongrid sitemap element described below.
- A more advanced simulated remote can be also be implemented as described here: (<https://community.openhab.org/t/bogob-big-ol-grid-o-buttons-is-this-even-possible-yes-yes-it-is/115343>).

### tivo.sitemap

```perl
sitemap tivo label="Tivo Central" {
Frame label="Tivo" {
Text item=TiVo_SetChannel label="Current Channel [%s]" icon="screen"
Text item=TiVo_SetChannelName label="Channel Name" icon="screen"
Text item=TiVo_Recording label="Recording" icon="screen"
Switch item=TiVo_IRCmd label="Channel" icon="screen" mappings=["CHANNELDOWN"="CH -","CHANNELUP"="CH +"]
Switch item=TiVo_IRCmd label="Media" icon="screen" mappings=["REVERSE"="⏪", "PAUSE"="⏸", "PLAY"="▶", /*(DVD TiVo only!) "STOP"="⏹",*/ "FORWARD"="⏩", "RECORD"="⏺" ]
Switch item=TiVo_MenuScreen label="Menus" icon="screen" mappings=["TIVO"="Home", "LIVETV"="Live Tv", "GUIDE"="Guide", "NOWPLAYING"="My Shows", "NETFLIX"="Netflix", SEARCH="Search" ]
Switch item=TiVo_SetChannel label="Fav TV" icon="screen" mappings=[2.1="CBS", 4.1="NBC", 7.1="ABC", 11.1="FOX", 5.2="AntennaTV"]
Switch item=TiVo_IRCmd label="Navigation" icon="screen" mappings=["UP"="˄", "DOWN"="˅", "LEFT"="<", "RIGHT"=">", "SELECT"="Select", "EXIT"="Exit" ]
Switch item=TiVo_IRCmd label="Actions" icon="screen" mappings=["ACTION_A"="Red","ACTION_B"="Green","ACTION_C"="Yellow","ACTION_D"="Blue"]
Switch item=TiVo_IRCmd label="Likes" icon="screen" mappings=["THUMBSUP"="Thumbs Up", "THUMBSDOWN"="Thumbs Down"]
Switch item=TiVo_IRCmd label="Remote" icon="screen" mappings=["FIND_REMOTE"="Find Remote"]
Switch item=TiVo_IRCmd label="Standby" icon="screen" mappings=["STANDBY"="Standby","TIVO"="Wake Up"]
Text item=TiVo_Status label="Status" icon="screen"
Input item=TiVo_KeyboardStr label="Search" staticIcon=zoom inputHint="text"
Text item=TiVo_SetChannel label="Current Channel [%s]" icon="screen"
Text item=TiVo_SetChannelName label="Channel Name" icon="screen"
Text item=TiVo_Recording label="Recording" icon="screen"
// Note the TiVo_IRCmd Switch elements are deprecated in favor of the Buttongrid element below
Switch item=TiVo_IRCmd label="Channel" icon="screen" mappings=["CHANNELDOWN"="CH -","CHANNELUP"="CH +"]
Switch item=TiVo_IRCmd label="Media" icon="screen" mappings=["REVERSE"="⏪", "PAUSE"="⏸", "PLAY"="▶", /*(DVD TiVo only!) "STOP"="⏹",*/ "FORWARD"="⏩", "RECORD"="⏺" ]
Switch item=TiVo_MenuScreen label="Menus" icon="screen" mappings=["TIVO"="Home", "LIVETV"="Live Tv", "GUIDE"="Guide", "NOWPLAYING"="My Shows", "NETFLIX"="Netflix", SEARCH="Search" ]
Switch item=TiVo_SetChannel label="Fav TV" icon="screen" mappings=[2.1="CBS", 4.1="NBC", 7.1="ABC", 11.1="FOX", 5.2="AntennaTV"]
Switch item=TiVo_IRCmd label="Navigation" icon="screen" mappings=["UP"="˄", "DOWN"="˅", "LEFT"="<", "RIGHT"=">", "SELECT"="Select", "EXIT"="Exit" ]
Switch item=TiVo_IRCmd label="Actions" icon="screen" mappings=["ACTION_A"="Red","ACTION_B"="Green","ACTION_C"="Yellow","ACTION_D"="Blue"]
Switch item=TiVo_IRCmd label="Likes" icon="screen" mappings=["THUMBSUP"="Thumbs Up", "THUMBSDOWN"="Thumbs Down"]
Switch item=TiVo_IRCmd label="Remote" icon="screen" mappings=["FIND_REMOTE"="Find Remote"]
Switch item=TiVo_IRCmd label="Standby" icon="screen" mappings=["STANDBY"="Standby","TIVO"="Wake Up"]
Input item=TiVo_KeyboardStr label="Search" staticIcon=zoom inputHint="text"
Buttongrid item=TiVo_IRCmd label="Remote Control" staticIcon=material:tv_remote buttons=[1:1:GUIDE="Guide", 1:2:TIVO="Home", 1:3:LIVETV="LiveTV", 2:2:UP="Up"=f7:arrowtriangle_up, 3:1:LEFT="Left"=f7:arrowtriangle_left, 3:2:SELECT="OK", 3:3:RIGHT="Right"=f7:arrowtriangle_right, 4:2:DOWN="Down"=f7:arrowtriangle_down, 5:1:BACK="Back", 5:2:INFO="Info", 5:3:EXIT="Exit", 6:1:THUMBSUP="Thumbs Up"=f7:hand_thumbsup, 6:3:CHANNELUP="Channel +", 7:1:THUMBSDOWN="Thumbs Down"=f7:hand_thumbsdown, 7:3:CHANNELDOWN="Channel -", 8:2:PLAY="Play"=f7:play, 9:1:REVERSE="Reverse"=f7:backward, 9:2:PAUSE="Pause"=f7:pause, 9:3:FORWARD="Forward"=f7:forward, 10:2:SLOW="Slow"=f7:play_circle, 11:1:REPLAY="Replay", 11:2:RECORD="Record"=f7:circle, 11:3:ADVANCE="Advance", 12:1:ACTION_A="A (Yellow)", 12:2:ACTION_B="B (Blue)", 12:3:ACTION_C="C (Red)", 13:1:ACTION_D="D (Green)", 13:2:CC_ON="CC On", 13:3:CC_OFF="CC Off", 14:1:NUM1="1", 14:2:NUM2="2", 14:3:NUM3="3", 15:1:NUM4="4", 15:2:NUM5="5", 15:3:NUM6="6", 16:1:NUM7="7", 16:2:NUM8="8", 16:3:NUM9="9", 17:1:CLEAR="Clear", 17:2:NUM0="0", 17:3:ENTER="Enter", 18:1:STANDBY="Stand By", 18:3:FIND_REMOTE="Find Remote"]
}
}
```
Expand Down
2 changes: 2 additions & 0 deletions bundles/org.openhab.binding.vizio/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,9 @@ sitemap vizio label="Vizio" {
Selection item=TV_Source icon="screen"
Selection item=TV_ActiveApp icon="screen"
Default item=TV_Control
// This Selection is deprecated in favor of the Buttongrid element below
Selection item=TV_Button
Buttongrid label="Remote Control" staticIcon=material:tv_remote item=TV_Button buttons=[1:1:POWER="PowerToggle"=switch-off, 1:2:Home="Home"=f7:house, 1:3:Menu="Menu", 1:4:Exit="Exit", 2:2:Up="Up"=f7:arrowtriangle_up, 4:2:Down="Down"=f7:arrowtriangle_down, 3:1:Left="Left"=f7:arrowtriangle_left, 3:3:Right="Right"=f7:arrowtriangle_right, 3:2:Ok="Ok", 2:4:VolumeUp="Volume +", 4:4:VolumeDown="Volume -", 3:4:MuteToggle="Mute"=soundvolume_mute, 5:1:Info="Info", 5:2:Back="Back", 5:3:Smartcast="Smartcast", 5:4:InputToggle="Input Toggle", 6:1:SeekBack="Reverse"=f7:backward, 6:2:Play="Play"=f7:play, 6:3:Pause="Pause"=f7:pause, 6:4:SeekFwd="Forward"=f7:forward, 7:1:ChannelUp="Channel +", 7:2:ChannelDown="Channel -", 7:3:PreviousCh="Previous Ch", 8:1:PictureMode="Picture Mode", 8:2:WideMode="Wide Mode", 8:3:WideToggle="Wide Toggle", 8:4:ccToggle="CC Toggle"]
}
}

Expand Down