My problem now is that I don’t know how to accomplish this. What must I include as a plugin, if necessary, and what’s the syntax to use in the sitemap?
Here is an excerpt from its JavaDoc:
The proxy servlet is used by image and video widgets. As its name suggests, it proxies the content, so
that it is possible to include resources (images/videos) from the LAN in the openHAB UI. This is
especially useful for webcams as you would not want to make them directly available to the internet.
The servlet registers as “/proxy” and expects the two parameters “sitemap” and “widgetId”. It will
hence provide the data of the url specified in the according widget. Note that it does NOT allow
general access to any servers in the LAN - only urls that are specified in a sitemap are accessible.
Add images or other web pages/web elements to the sitemap using the Image, Video, or Webview elements. Each of these elements take a URL which points at the resource you want to load. See the sitemap wiki page.
No plugins or direct access to the proxy servlet is necessary.
Thank you @rlkoshak for answering. Ok but does this apply also to local content which I want to access externally? My guess is, from trials, no it does not.
If I point to a local resource say 192.168.0.xxx:8080/image.jpg or 192.168.0.xxx:8080/mjpegstream.php the client UI should be redirected by the OH server. This is why I found the proxy servlet mentioned in my first post suitable. Although this functionality I would actually expect to find in a fresh install of OH and maybe its there but the problem is I don’t know how to use it?
Also would it be possible to point to a local resource which is not on a server, e.g. ~/images/tempchart.png (I’m running Raspbian Jessie). Perhaps through a file:// pointer? And if possible, what permissions must be set for these files? Is it enough with read access for the openhab user?
You should be able to point at local files one if two ways.
Put a copy of the file or a symbolic link to the file in the webapps folder.
The second is to use the file:// URL format. I’m not positive this works but so long as the openHAB user has permission to read the file it should work. If you use a relative path, it must be relative to the folder openHAB was started in. I’m not sure what that folder is when it us started as a service and it is probably better practice to use full path.