How to send runtime commands in widgets?

Hello,

is there a possibility to send runtime commands (like smarthome:audio stream sink url; see Docs) within a HABpanel Widget? I only know SendCmd(item, value) which very limited…

What I do is formulate a rule based on the state of a switch changing, and then make the widget trigger that state change.

Might be primitive, but works like a charm each time.

…and in such a rule you can use commands like

playSound(“doorbell.mp3”)

And how do I use the runtime commands in such a rule? Can you give an example?

As I wrote, I want to have full access to runtime commands, which are listed here:
http://docs.openhab.org/administration/runtime.html

Thanks for your help!

@opus This is not what I need, I mean command line commands which are described here:
http://docs.openhab.org/administration/runtime.html

playSound() is an defied rule / script action. I need full access to runtime commands, not to rule / script actions.

If it isn’t exposed by the REST API you can’t do it. Install restdocs (if not already installed) and browse around to see if there is something you can access. However I didn’t see anything.

For the most part commands in the console are not exposed to Rules or the REST API (and therefore the UIs).