Image vs. Webview, DWD-Warnings

Looking out of my window I thought it would be a good idea to have the weather-warnings from DWD on my openHAB terminal. Nothing easier as that, I tried it with an Image on my sitemap as follows:

sitemap mw19 label="Haussteuerung"
        Frame {
                Group item=gS label="Souterrain" icon="cellar"
                Group item=gEG label="Erdgeschoss" icon="groundfloor"
                Group item=gOG label="Obergeschoss" icon="firstfloor"
                Group item=gDG label="Dachgeschoss" icon="attic"
                Group item=gG label="Garten" icon="garden"
                Text label="Licht" icon="light" {
                        Switch item=LichtEGaus label="Licht EG" icon="light" mappings=["OFF"="aus"] }
                Text label="Wetterwarnungen" icon="light" {
                        Image item=Wetterwarnungen url=""} 

But the image is not dieplayed, I always get a broken link icon. The link itself is working, copying to a my browser.

I then tried the link as a Webview. This works.

I would prefer the Image item, as this has a refresh value. But why do I do not get the Image from a link that works as a webview?

I am able to see the image correctly in Basic and Classic UIs on a recent OH2 with this in the sitemap:

Image url="" label="foo" refresh=5000

Thats funny, I just wrote a Reply in that other thread concerning Images, asking you to confirm, that you really load the JPG and not an identical PNG. I tried your above line of code, and this is not working for me. Do you have any updated components in your 1.8.3?

I will try that Image widget on my 1.8.3 instance and let you know what I see…

On openHAB 1.8.3, when attempting to proxy the URL you provided, the distant server is returning a 404 page:

Not Found

The requested URL /DWD/warnungen/warnstatus/SchilderHA.jpg was not found on this server.

with the content type text/html. The proxy is returning the message content to your client, but with HTTP status code 200. So of course the browser does not understand the text/html content as an image. This does not happen on OH2 that I observed. The server appears to be doing something “clever” that the proxy servlet in OH 1.8.3 is not handling correctly.

You can turn on the Developer tools as described earlier, find the request to the proxy servlet that returned text/html, copy that URL to the proxy servlet, changed the t= value to make sure the cache is busted, and then see the 404 text appear.

Assuming I’m correct and it’s an issue with the proxy servlet in 1.8.3, the issue won’t be fixed and the only solutions are either to upgrade to OH2 or to use the Webview widget.

Thanks for your effort and answer. So there is a new argument to switch zu 2.0

You’re quite welcome.

I’ve submitted a PR to further improve the proxy servlet in openHAB 2.0 to deal with configurations that have failed to proxy as expected under 2.0, and as a basis for securely allowing the same functionality for non-sitemap-based UIs like HABPanel.