Embed a OH3 page in sitemap

Hi
Basic System setup

  • openHAB 3.4.3
  • Raspi4
  • installed via openhabian
  • openhHAB cloud Addon.

I use sitemaps a lot and was looking for a way of adding widgets to the sitemap.
I’m pretty sure this can be done by using the sitemap element: Webview. So the plan would be to make a widget and add in to a page in OH3 GUI then add something like the following line to my sitemap definition so it can be accessed locally and remotely.

Webview item="https://username:password@home.myopenhab.org/page/foobar/"

Obviously this requires the username and password to be in the sitemaps definition, but are there any security issues in doing this?

I read:

Options for Secure Remote Access:

myopenHAB Cloud Service

You can use an openHAB Cloud (opens new window) instance to which openHAB creates a tunnel connection and which forwards all requests through this tunnel. openHAB will see these incoming requests as originating from the local loopback interface.

Thanks

I also tried something like this for a time item.

I have created a mainui page with only one widget and integrated it into the sitemap via webview.
In the webview I didn’t have to enter my login data. The page opens just like that without credentials.

But I use it only in my local network or with vpn. I don’t use openhab cloud.
Greets

Sebastian this works fine. Thanks. Is there a way to remove the hamburger at the top left of the android screen?

Go into Code Tab of the Page.

config:
  hideNavbar: true
  hideSidebarIcon: true
  label: nameofpage
  showFullscreenIcon: false
blocks:
  - component: oh-block
    config:
      stylesheet: >
        .row {
          justify-content: left;
        }     .card {   border-radius: 20px;  box-shadow: 5px 5px 10px 1px rgba(100,100,100,0.2);  }
    slots:
      default:
        - component: oh-grid-row
          config: {}
          slots:
            default:
              - component: oh-grid-col
               . 
               . 
               . 

With this config of the Page the Layout is super…

Webview url="http://192.168.x.x:8080/page/nameofpage" height=12 icon=none label="" 

Greets

3 Likes