Access MainUI browser settings by code

Is it possible to set and get MainUI‘s settings for the browser such as
Enable Web Audio sink support
as can be seen under
Help & AboutMiscellaneous?

All that technical information is collected from numerous different sources. So, the answer ranges from “yes” to “not easily” to “probably not” depending on which information and in what context.

It is specifically this setting in the browser I like to set and get.

That’s stored in the browsers local storage. If you open up the browser console and type:

localStorage.getItem("openhab.ui:webaudio.enable")

you’ll get the enabled/disabled state of that setting. But, that storage is not available in either the widget expression or rules contexts (at least that I’m aware of).

If I am not mistaken, the browser establishes an SSE connection to the server for webaudio.
Is it possible to check server-side if this connection is currently established?

I’ve never tried, but I doubt it’s possible without knowing the exact session id which you probably also don’t have ready access to.

What problem are you trying to solve?

2 Likes

All right. Thanks for looking into this.
It is not a problem I try to solve, my parents are using webaudio for a door bell and I wanted to include this info in a status email to my account.