Please help test fix for image and chart refresh in classic web UI

Thanks for your testing, @Lolodomo! Please report anything that seems incorrect.

So, my test result was, that I got a 404 error.
I stopped the server, then I did a backup of the org.openhab.ui.webapp_1.8.1.jar. After this I deleted the original file. At the end I put the org.openhab.ui.webapp-1.8.2-SNAPSHOT.jar (the latest one you postet) to my addons directory and started the server again.

First I noticed that In my openhab.log file is no hint for [INFO ] [.o.u.w.i.servlet.WebAppServlet] - Started Classic UI at /classicui/openhab.app. Then if I go to my sitemap, my browser shows me a 404 :pensive:

Second: after I stopped the server again, I noticed that it really takes a long time to shutdown the server. Also there was no hint in the openhab.log for Stopped REST API.

Any suggestions or hints what I did wrong?

Hi David, thanks for trying to test this JAR. Please carefully review the steps to install the test JAR, like @Udo_Hartmann did, to get past the 404 error. I am confident that the files, in the right places and with the right ownership and permissions, should work. I really appreciate your help in testing this change. Regards, John

I have a page with 2 charts with a scale of 1 day. So the image content does not change very often.
Can you confirm that in case the image is identical when refreshing, there will be no real refresh of the image (cache us used ?) and so no scroll at top of the page ?

The scroll-to-top-of-page in the Classic UI is outside the scope of my changes. It appears to happen on pages of the sitemap where there are other widgets besides just charts or images, regardless of any refresh= parameters.

With my proposed change (the latest JAR you are using), every single retrieval of a chart or image, regardless of whether it has refresh= set, will retrieve a new chart or image, even if the chart or imageā€™s content has not changed. The code prior to my change made a half-effort in busting the cache to achieve this outcome, but it had some flaws, especially for charts, that allowed it to use a cached version of the image or chart under some conditions. This is why your chart appeared to show an outdated chart on occasion.

Hey John, Iā€™m sure that I worked step by step as you mentioned.
Iā€™m on openHAB 1.8.1.
First I stopped the openHAB server. Then I did a backup of the /server/plugins/org.openhab.ui.webapp_1.8.1.jar, then I deleted the original file.
After this I did it step by step as I do it with new or changed (snapshot) bindings and put the new org.openhab.ui.webapp-1.8.2-SNAPSHOT.jar to my addons directory as I did it with many other bindings before. I also set the permissions as I did it with my other bindings.

Hmmm, I will give it a second try this evening :relaxed:

Your steps sound like they should have worked, like they did for Udo and Lolodomo. Please have another look this evening, and thanks for your help in getting this resolved!

Can anyone else help test this change? I am aware of no old refresh problems not solved or any new ones created, by these fixes. The JARs and instructions are at the top of this thread. Please test on openHAB 1.8 and 2.0 beta if you can, and thank you.

I get a 404, too.
I used the file you posted 3 days ago, openHAB 1.8.1 with Oracle Java 1.8 on a Raspberry Pi 2, all permissions checked. I just replaced the file as described above.

Thanks very much for pitching in, Dirk. Are you sure you put the new JAR in the addons folder, not in the same place from where you removed the original (server/plugins)?

Sorry, you are right, my fault. It starts now, I will keep an eye on the charts nowā€¦

1 Like

I have tested on 1.8.1 and my cameras refresh at the interval I specify. The only issue is the sliders widgets in the classic UI for all my dimmers (zwave) have reverted back to buttons with arrows. The install instructions work fine if followed.

1 Like

This is a result of https://github.com/openhab/openhab/pull/4051

@watou, does the fix deal with the charts that shouldnā€™t refresh?
I am annoyed with the constant refresh of images and charts when I donā€™t have a refresh set. Both on desktop and mobile

If you are referring to the irritating refresh of a page of the sitemap, regardless of which widgets are on it, then sadly no, this fix is only to have the refresh= sitemap parameters respected. There are still unwanted page refreshes in the Classic UI (and maybe the mobile apps, too?). So this change only refreshes the images and charts in place without causing the page reload, but does nothing to stop those page reloads.

Many have complained about this in the past, myself included, but no one has done anything about it yet, myself included. :slightly_smiling:

Thank you for the explanation. Since it annoys me so much, I pledge to at least make a reasonable attempt to fix these page reloads. It would be nice if I can ask you questions in the process.

Certainly! Thanks for contributing!

@watou: I just tested your fix in OH2 and I can confirm that my chart is refreshed.

I still have to analyze if the refresh rate is as expected. If others confirm that it is ok, there is no reason that it is not ok for me.

Excellent, @lolodomo! Thank you for all of your testing workā€”many will benefit from your efforts.

Just wanted to chime in that the refresh is now working as expected for me. Thanks for the fix @watou.

1 Like