Image Button in openHAB

Is it in openHAB possible to tab on a Button to start for example YouTube on my Xbox via Amazon Alexa? Also is it possible to have on a Image Button not the Thing, if I tab on it, that it first will be bigger? I only want a Button, when I tab on it, it will make something.

Switch mappings and buttongrid support icons now.


But no, it won’t get bigger. The size is static.

Making things get bigger may be possible using MainUI controls, not BasicUI.

As for how to make your xbox launch Youtube, I’m unfamiliar with xbox. If you can control it using alexa, perhaps you can send a command to it via alexa using amazon echo control binding

Use the startRoutine or startCommand channel maybe?

1 Like

Thank you for your answear. What should be as Item and what should be as sitemap config to get this done? Also for me it is unclear, where I can add the image. Can I load my own picture, like the YouTube Icon?

In the hint you could see “command=label=icon”

So for example
Open youtube on xbox=Youtube=iconify:logos:youtube

You can use your own icon by putting the icon file (svg/png) in conf/icons/classic and referring to it by name there. Say you saved a custom icon as conf/icons/classic/myyoutubeicon.svg

Then for buttongrid, you can use

Open youtube on xbox=Youtube=myyoutubeicon

This is all documented in the sitemap / icons section of the docs.

1 Like

Ok and where is at this code the item logic which will push the command to alexa?

You use the amazon echo control - see the link above.

The buttongrid sends the command, the sentence you’d say to alexa, via the item. You link that item to amazon echo control’s startRoutine or startCommand as I wrote above.

1 Like

Ok yes the start Routine Command works at my openHAB Station. But for me it is unclear how I can call at the Sitemap the Item Start Routine with the command to open YouTube on Xbox.

I’m not sure I understand what you mean.

The sitemap is for you to interact using a web browser. When you click the buttongrid, it will send the command to the item.

In here, you would configure that command to be “open youtube on xbox” (or whatever the correct command may be). So when you click the button, it sends that command.

I have it working! Thanks!

The image cant be loaded. I have put the image to /etc/openhab/conf/icons/classic/youtube.svg, and then the command “Open youtube on xbox=Youtube=youtube.svg”, but the image is empty:

Don’t put the extension. Just youtube without .svg