Hi,
I collect some data in write them into a file (10 lines, ~40 chars per line).
How can i display these “lines” in oH? Like a text box …
If needed, I also can create a short html file with this content instead the text file.
Than: How can I create an “item” (or icon (with a hyperlink)) which only “point” to html-file (which is located on the oH server (Raspberry)).
Actuell i use the BasicUI to show/display my items I have.
I just found some “strange” issue with the usage from a html file under /etc/openhab2/static/filename.html
If I modify or replace the Html-file, the new content will not displayed when opening the oH webpage: http://MYIP:8080/basicui/app?w=000100&sitemap=mHOME
(the html-file was build in with the webview url …)
Also will not update the content.
When opening the html-file “direct” using: http://MYIP:8080/static/filename.html
the actuall (correct) content is shown.
And after this, also the other link (via sitemap) is shown the actual content.
Is there any settings I must do?
Any hint for this behaviour?
Or do I need another apache server, instead jetty the lighttpd ?
Update:
I add in html meta a refresh, but this did not solve the problem.
Here I see another “solution” and I think this is not my problem because this user have a “selection” (switch) problem.
I don’t belive so, in my case it will not solve.
PC (Chrome) : Strg-F5 will not fix, also on mobile (sliding down the page - refresh) still show the old content when try this IP: http://myip:8080/basicui/app?w=000100&sitemap=mHOME
Using the file in the html/static -folde rshow correct content (after refreshing the page) !
For one thing on my sitemap I have no explanation:
On the top, before the (correct) webview -content is shown, there is broken symbol from a icon (see picture, red cycle).
I don’t know the reason or “source”.
(the used html-file is correct, there is no broken icon vissible, only simple table …)
I copy the picture-URL, this is the content:
http://MYIP:8080/icon/webview?format=png
I found out that the “png” appear after I changed in the Paper-UI the default icon-format from svg tp png (before the same broken icon, but with "…format=svg)
The code in the sitemap is:
Text item=gTelevision
{
Webview url="/static/tv_prime.html" height=22
}
OK, found it:
If I add (i.e.) icon=screen, the broken icon is replaced by the screen-icon (for example):
On the broken icon, note that current snapshot has broken default icons.
If it seems that that webview.xxx is really missing from the default ‘classic’ icon set - there is an ongoing gitub issue related to deliberately omitting an icon, Maybe worth adding comment to that.