Icons for Media Controls with Mappings

I am trying to have an icon for each mapping shown on the screen for the following code

Switch item=Google_Input icon=“media” label=" " mappings=[1150=“Play”,1152=“Pause”, 1056=“Stop”]

The intent would be to show a different icon for the user to click for each of the above rather than a txt box.

I have searched everywhere and can’t find it can anyone please help.

I have seen this on videos @digitaldan on you tube

According to the wiki and my experience there is no way to do this in the classic UI in OH 1.7.1. If you’ve seen this on videos perhaps it was talking about a third party UI or the OH 2 UI (which I’m not familiar with cannot say whether this is supported).

I have gone back to have a look and it appears the videos may be using ALT Codes to display icons instead of text. Any ideas on how to code in ALT Code to show up in the user interface.

Look up the number for the alt code you care about. Then look up the key combo for entering alt codes on your platform (on Linux it is hold <ctrl><shift>, type “U” followed by the number of the symbol you want, then release. Type this as the label part in your mappings.

I use alt codes and they work quite well, although some display better than others, ie looks better on android and os app than on the basic ui.

I use the following for player codes:

String playerState	""	<music> {autoupdate="false"}


Switch item=playerState mappings=[PREV="।◁◁",STOP="□", PAUSE="॥", PLAY="▷",NEXT="▷▷।"]

rule with squeezebox actions:

rule "PlayerControls"
    Item playerState received command
     switch(receivedCommand) {
	case "PREV" : squeezeboxPrev("player")
	case "STOP" : squeezeboxStop("player")
	case "PAUSE" : squeezeboxPause("player")
	case "PLAY" : squeezeboxPlay("player")
	case "NEXT" : squeezeboxNext("player")
1 Like

Thanks I will give this a go.