MainUI does not get updated after a few hours


I want to display an OH3 MainUI overview page on a Raspberry Pi 3b with touchscreen. The Raspberry Pi is connected to my home network via wifi. OH3 (3.2.0) runs on an x86 Server inside a Docker container.

Everything runs fine for a few hours but then the displayed items on MainUI are not updated any more. I have to reload the page via the Help page to get it back to work.

Maybe this issue is related to the unreliable wifi connection. To proof that I disabled and re-enabled wifi on the Raspberry Pi. After doing so the Items also did not update any more.

A possible (but ugly) workaround is to reload the page every few hours or trigger reload on network reconnect.

Is there a better way to fix that problem?

Best regards,


Not without more information about why it stops updating after a time. Try opening the console log of the browser running MainUI and see if anything jumps out when it stops updating. Maybe there are errors with the SSE feed or something like that.


1 Like

I was thinking about the same approach

How do you want to


Basically what we need is to execute a javascript on the client.
You can do that with javascript injection, but I guess you will run into other problem like browser blocking this script.

Maybe some experts have a good idea?

It helped for me to delete those widgets, which are complex, i.e. which have more than ~8 items.

I checked the Firefox console log and found an error:

ERROR: The connection to http://<MY_OH3_SERVER>/rest/events/states was interrupted while the page was loading.
INFO: =!= Event source connection broken…

funny. While I was issueing a ticket here, your post came right in time😀

Regarding the “ugly” way:
I have also been thinking about either doing some javascript injection or in restarting the Raspi on network loss.

It helped for me to delete those widgets, which are complex, i.e. which have more than ~8 items.

My page has 13 Controls, most of them are oh-label-cell with trend item and analyzer action, but one is quite complex showing weather information (a modified version of the weather card from GitHub - rgrollfitz/oh3-widgets ).

Maybe the issue is related to timeouts or concurrency problems, maybe especially on slower devices.

could you do us a favour and remove that widget for a day and see if the problem persists?

No problem, I manage the OH configuration files in a git repository so I can easily modify the page and roll back after this test. I removed all widgets except the outdoor temperature.