OH3: Show html content in an custom Widget (iFrame)

I would like to embed an external widget in OH3 (see below). I create a custom widget where I embed an iFrame. But I have no idea how to do this. @ysc Can you give me a hint? I think this usecase is often needed and interesting for others.

<iframe marginheight='0' marginwidth='0' scrolling='no' width='300' height='365' name='FC3' style='border:1px solid;border-radius:10px;border-color:transparent;' src='https://api.wetteronline.de/wetterwidget?gid=10382&modeid=FC3&seourl=berlin&locationname=Berlin&lang=de'></iframe>

image

1 Like

I looked for ways to do something like this, and this post is one of the first things to come up.

Any luck?

I was wondering if there was a way to have an otherwise normal page, but have the content a custom html page, instead of ui components like cells.
Anyway to do that, @ysc?

i just testet a little (workaround) solution an it works for me

  • create a local html page on your openhab device in the html folder
  • insert the iframe in the body section
  • for example: use a web-frame-card with
    src: http://YourOpenHABServer/static/YourHTMLPage.html
1 Like

Thanks from me as well! I did not know about the web-frame-card component!