Sitemap images only working remotely but not at local network

Hi,
at my sitemap I use some images, generated bei Grafana. One of these looks like this:

Frame {
    Image refresh=60000 url="http://localhost:3000/render/dashboard-solo/db/haus?editorTab=Display&panelId=17&from=now-1d&to=now&width=480&height=320"
}

As you can see, grafana server is running on the same machine as openhab2 (localhost).

We use severale smartphones (android and iOS) with openhab app to show our sitemap. The interessting thing is, if connected remotely via myopenhab.org, I can see all this grafana images. If I’m connected local (when I’m at home and using WiFi), none of this images is visible.

This works for me a long time, also locally. But since a month or so, it stopped working in local network.

Using openHAB 2.1.0
at a Odroid XU4 with Ubuntu 16.04.2 LTS
and the newest app from store.

Of couse a local HTTP GET of the image url above is working fine.
Can anybody help me?

Hi,

Did you try setting the ip of your openhab server instead of “localhost” in the sitemap item definition?
It might work!

Best regards,

George

Thanks for help. Unfortunatelly neither ip address nor hostname is working.

Is there a way to debug this? Or other things I can try?

This only happens if remote and local URL is configured. If I only set the local URL, it works perfectly.

Is it only not working in HABdroid or even in Basic UI and Classic UI ?

@coolchip Did you manage to fix this? I’m having the same issue. Works on remote but not local. (If I load the local URL in a browser I get images, its just the app that seams to be broken)

I’m sorry. Unfortunately, I have no solution. The problem still exists. I don’t see the graphics in the app.

Hi, here are some things I have found out:

  • If Granfana needs user credentials, make sure to add them in the url:

    Image refresh=30000 url="http://admin:admin@grafana:3000/render/d-solo/...
    
  • If you run OpenHAB / Grafana in Docker, make sure to provide the correct domaine name. For example, I can access Grafana through http://grafana.loc, but inside the OpenHAB container, it has to be http://grafana. Try to curl Grafana inside OpenHAB container.

  • For App access through local URL: if you have set up a username and password in the app for local access, these credentials get proxied to Grafana! So either add the same user to Grafana, or delete username & password in the app (of course, only if you do not need the credentials to access OpenHAB…).

Hope this helps :slight_smile: