Basic UI - Live Update

Hi all!.. I had the same issue on both Firefox and Chrome. I am using Visual Studio to edit my configuration files, and noticed that syntax highlighting was not properly functioning too. I had some items with their name not starting with capital letter. I tried changing this and Visual Studio syntax highlighting started functioning properly. Files were correct even before, and things were working well, apart live update on browsers. But after I changed item names and correct formatting of code (at least according to Visual Studio rules) live update in browsers began to work.

Every time that i change something in items and don’t use “correct formatting” live update stops working. It can be even a space or a tab character, that even if does not mean an error in item or sitemap definition code, it make live update in browser stop working.

Hope this can help someone, dig this out.

1 Like

Interesting observation. I know I have some lowercase items. I started noticing them when I switched to VS code.

Unless I’m mistaken, this is still a bug that needs to be fixed as I just read through the items doc and uppercase is “recommended”. It says nothing about required. So either we need to change that to required or fix BasicUI if your theory is correct.

That being said, even with my lowercase items as they are, BasicUI auto updates most of the time.

1 Like

In my case it’s not only about lowercase. As I mentioned, even a space or a tab, can make my sitemap stop dinamically updating in browser.

1 Like

Hmm - I appear to be having this issue still. There appear to be no live updates received via the basic UI! Did anyone ever find out what the cause of this issue was?

1 Like

Don’t think so; this issue is at least 3-4y old (in other words as long as I am using OH); this topic has been discussed with some regularity on this forum, but it appears to be super hard to reproduce, some people see it often, others never; for me personally there appears to be also a temporal variable too (for some stretches of time everything works and then it stops updating, etc); a manual refresh always works though…

2 Likes

I see this problem if I update the sitemap from VSC. Then I need to refresh the browser to get live update back.

I have noticed this too, anytime you “break” the sitemap or items files, auto update stops working until you have fixed the file AND restarted openhab. I think this might out to make it 100% reproducible… I reproduced it 3 times w/o fail. Took my working items file, (It had been working w/o fail for ~24 hours) and added a new line to the end with a syntactically incorrect word, generateerror. Then refresh the browser, everything is"broken"; then fix the error and reload. Everything shows up, but auto refresh no longer works, I have to hit F5/reload to see current values. Once I restart openhab2 everything is back to working fine. I’m guessing there is some code to prevent bombarding the server when the file is in error that isn’t getting cleared correctly once a non error generating file is in place again. Anyway hope maybe that helps someone figure it out! (Just created an account to say all this!)

Josh

3 Likes

@jlpatte2 I can reproduce this way also. Wonder if you need to file an issue for this on the git page. Have you done that before? I could walk you through if needed.

@jlpatte2 Thanks for reporting this here!

I am experiencing this issue quite often (using Firefox and different configurations) but never had time to track it down. Yes it happens more often when I modify configuration.

Yeah we should report that on Github. I can help too when needed.

Are there some logs / indicators (except a clock on every sitemap page ;)) where I can see that update doesn’t work?

My observation on this is that a sitemap that contains a Text element connected to a String item will not automatically refresh.

It’s been a while since I tried to look into this, but I am pretty sure I observed that by simply adding or removing such an element, my sitemap was automatically refreshed - and not.

Anyone else seen this?

What I observe is a complete “not updating”, not only text elements but also Buttons, Sliders, … don’t get updated anymore. The only ways to get them to update is:

  • hitting refresh
  • clicking to a different sitemap page
  • restarting the server
4 Likes

I have the same problems. No idea how to troubleshoot. If anyone wants to screen share with me and investigate: be my guest.

I am experiencing the same behavior. I am on a Raspberry pi v3, OpenHAB v2.4 upgraded from OpenHAB v2.3 installed through apt-get on a freshly installed raspbian Stretch. I use the Chrome web browser on a windows 10 machine.
I am currently re-building my sitemap from scratch.

I have a simplified test.sitemap that now reproducibly never updates, even after restarting openhab.
I tried to open simultaneously the same page on microsoft Edge browser and on Chrome. I observed that, while on Chrome it does not update, in microsoft Edge it does. I even tried to clear cache and navigation history in Chrome but nothing.
I’ll continue adding elements to the sitemap and see when I’ll broke also edge (then I’ll try with Firefox and Opera too…)
Hope that this may be useful to others

Lionello Marrelli

Yes edge is working great, but crome does not (updating)

NOT UPDATING BECOUSE .sitemap File has a MISTAKES!!! It’s NOT BROWSER or anything else!!! JUST Correct file !!

I have been having this problem, and just fixed it. I was 100% not live updating. Turned out that the filename of my sitemap file did not match the sitemap name internally. Now, I have in the file “sitemap wittwer_home”, and the filename is “wittwer_home.sitemap”. As soon as I made this change, everything works as expected.

1 Like

This error does actually generate a warning in openhab.log, it pays to have a look in there from time to time

… 19:04:18.251 [WARN ] [sitemap.internal.SitemapProviderImpl] - Filename home.sitemap does not match the name TestSiteMap of the sitemap - please fix this as you might see unexpected behavior otherwise.

1 Like

Just sharing some info:

Experienced non update of the basic UI after a change in an .item file
(yes still textual describing a MQTT device; change was adding the icon )
In my case a simple stop/start of openhab2 solved the problem.

Thanks! This solved my problem. Turns out that as you say filename must be the same as the name as defined in the sitemap file itself. Now Basic UI updates correctly.
sitemap

My browser (Chrome on Mac and on Linux) and the iOS OH App updates for individual items when changing value by any method. (IKEA Home smart, Google Assistant, Apple Home etc.)
But the group items does not reflect the changes. Neither grouped switches or sliders.
Maybe that is to expect, since you cannot have any idea how to handle different states on each grouped item?
Anyway. As soon as I had the correct names for the files and the name in the sitemap-file, as pointed out above, the browser(s) update correctly.