I’ve made some changes to the classic UI (for both openHAB 1.8 and 2.0 beta) that should fix the web client’s failure to respect the refresh= parameter on Chart and Image widgets in sitemaps. In both openHAB 1.8.1 and Eclipse SmartHome, the Classic UI will only refresh images and charts under very specific circumstances, and usually only briefly. With this change, all images and charts should refresh at the rates given in the sitemap.
I would like help testing this fix, in order to be completely certain it solves the problem and does not introduce new issues.
Thank you very much @watou. I encountered this issue the last days as I integrated my network cameras into openHAB 1.8.1. The refresh is working well on the android app for all my 4 camera images. On the iOS app only the first image is updating and on my chrome browser no image will be refreshed.
Was there anything different about the steps to try it than what I outlined? To which directory did you move the file server/plugins/org.openhab.ui.webapp_1.8.1.jar? Is the file ownership and permissions on the test JAR suitable? What appears in the log, anything?
That JAR is only for openHAB 2. I provide two different JARs, one for each of the current runtimes. If you are running openHAB 1.8, you only want to put org.openhab.ui.webapp-1.8.2-SNAPSHOT.jar in your addons folder. Regarding the recently reverted dimmer and KNX, is there an issue open on this?
Ah, my mistake MD5 for org.openhab.ui.webapp_1.8.2-SNAPSHOT.jar is correct, ownership and permissions are the same as of org.openhab.ui.webapp_1.8.0.201601090202.jar
This line does only appear with the old version in openhab.log: 2016-02-29 11:12:49.663 [INFO ] [.o.u.w.i.servlet.WebAppServlet] - Started Classic UI at /classicui/openhab.app
Even with start_debug.sh there is no line from [.o.u.w.i.servlet.WebAppServlet] when using the 1.8.2-file
So issue #635 could have been closed after the new slider was implemented, and now that the new slider was reverted, #635 is now important again for dimmers to work with KNX?
If ever a dimmer should be dimmed with increase/decrease, this would fail for knx dimmers which need start/stop-dimming, so I think, issue#635 should be fixed anyway. Since the Sliders dimmed absolute, the issue didn’t matter but does now.
I don’t know why that is. I didn’t think it would matter if you were using an earlier nightly build of 1.8 (the JAR replacement works here for me on 3 different openHAB 1.8.1 systems, and the other JAR works on openHAB 2). The file org.openhab.ui.webapp_1.8.2-SNAPSHOT.jar ought to be picked up in your addons folder as long as the equivalent bundle isn’t in server/plugins.
That was the point I really missed I put the new file at server/plugins so this couldn’t work. Now as I read the instructions more carefully the openhab.app works properly - of course without the sliders so no luck for me
But I can confirm that the images and charts are refreshed as expected
Here is my feedback with the patch applied to openHAB 1.8.1.
My charts are now refreshed (so that is already clearly better) but:
when refresh occurs, an old chart (always the same) is first displayed and then few second after the new chart with the correct values is displayed
my refresh rate (5s) seems to not be the one applied. I have 3 visible charts in the page with different refresh rates so it is not not obvious to check. By the way, a refresh is triggering a scroll at top of the page and I can confirm that it does not occur every 5 seconds.
In this page, I have several visible and invisible charts. I should create a more basic page to give a more precise feedback.
This is possibly due to issues with cache busting in the /chart URLs not being very robust. I can see if I can improve that.
You could view your browser’s Developer Tools, switch to the Network tab, and watch the chart requests, to see if they seem to match the intended refresh cycle.
OK, but exercising possibly complex real-world sitemaps is very important. I have a very similar set of chart period buttons and different visibility= parameters in my sitemap, and it worked properly here, but if you have any chance of a problem, let’s find it!
The chart that is first displayed before being replaced by the correct one at each refresh is apparently the chart that was first displayed when opening the page.
I am using Firefox.
There is also the issue with the sitemap page refreshing in the browser, right around every minute and when the image could be refreshing, so it ends up hitting the /chart servlet twice in quick succession. But with working cache busting in this new JAR, it should not be noticeable now (more than the flicker of the page as it reloads, which is a different subject).
I can confirm that with this last jar the chart is first erased and then displayed few seconds later, probably the time required to download the png (my server is running on a RPI 1). This point is OK now.
What remains strange could be the refresh rate.
I have first to understand the timings in the Network tab of the developer tools !