Myopenhab sitemap visibility filter?

Hello all, I’d like to have a means of changing visibility of some items depending on whether my client device (e.g. mobile phone) is connected directly or via myopenhab. Is there a way to do this?

Essentially I have some security cameras, when coming in via MyOpenhab on my android devices I’d like a still frame rendered as an image (as MyOpenHab proxies this), but when connected directly I’d like to use a webview to get live video. If there was a condition I could use to control visibility for an individual device depending on whether it was connected via MyOpenHab or not then this would be easy.

As a connection via MyOpenHab can sometimes happen even when I’m at home connected to my own wifi, using phone presence and IP address information isn’t turning out to be reliable, so some kind of client-specific condition valid in a sitemap would be excellent but I can’t find anything so far.

OpenHab Version: 2.4.0~S1447-1
Platform: Debian GNU/Linux 9 (stretch)
Hardware: VM, 2 CPUs, 1GB RAM, 20 GB disc, 15 GB free
java version “1.8.0_181”
Java™ SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot™ 64-Bit Server VM (build 25.181-b13, mixed mode)

There is no way to do this. There is no way implemented for OH to know how you are connected.

You can create two versions of your sitemap and switch between the two depending on where you are. But this would have to be done manually I think.

That’s a shame, I thought it would probably be the case. I’ll get my thinking cap on, I might be able to rig up some kind of redirection on the openhab box depending on whether the incoming connection is coming from the firewall (which would be a myopenhab proxied connection) or directly. I’ll add it to the list of things to do .