Missing item states in OH 3

Hello everybody

Maybe somebody can help to understand OH 3 behavior of showing states (of items).
When I go to settings -> items, I can see all my items with its status. That’s totally fine.
grafik

If I click on an item the current state disappears

Even my group-items have no state.
grafik

If go to settings -> things -> channels I cannot see any state

I don’t think it’s normal, isn’t it?

  • Platform information:
    • Hardware: Raspi 4B
    • OS: openhabian
    • Java Runtime Environment: default
    • openHAB version: 3
  • logfiles: are clean. no errors
  • Items are created via text files

Sunny greets
Enrico

What happens when you reload the page?

Nothing.

I notice that all these Items are defined in .items files. It might be the case that the UI doesn’t properly display the states for such Items. I don’t know for sure. Use the REST API or watch the events.log to verify which part is lying to us. The states shown in the Items page of the lack of states (i.e. Items are NULL or UNDEF) shown in the individual Item pages.

Hi, just check with my item-files and all states are shown correct in UI. So item files seems not the root cause.

Hi. I have the same problem. I have also spent about a week debugging it and have narrowed it down to antivirus software. It seems to be some config error with my laptop.

The things that are not working use the MIME type text/event-stream, for Server Sent Events.
Some AV software blocks these as suspicious. Sometimes it thinks it is a download and holds the data until the stream closes, and only then gives the data to the process that requested it.

Are you running any AV software? Any proxies?

Some things to try:

  • Does it work on other machines? e.g. Your phone, an emulator, etc.

  • Does it work in other browsers?

  • Does the dashboard work immediately after boot?
    Mine works until about 3 minutes after boot, usually around the same time I get a notification from Windows Security (so when Windows Security is running).

  • Can you connect with HTTPS? e.g. https://yourdevice:8443/
    I can’t. Something to do with SSL certificate errors (Firefox gives this error: PR_END_OF_FILE_ERROR and Insomnia this: Error: SSL peer certificate or SSH remote key was not OK; see the first thread I linked below).

  • Is the Stream Events tab working the Developer Console of the Main UI?
    Mine isn’t. It also uses SSE.

  • Try opening your browser and pointing it to http://yourdevice:8080/rest/events/states.
    If nothing comes up in a few seconds, most likely the same problem as me.

  • You can try installing Fiddler Everywhere, and doing this:

    • Open Fiddler
    • Open the dashboard (or just reload it, if it’s already open)

    If the dashboard works, it’s probably AV software: Fiddler creates a proxy to monitor requests, and this can fix some problems.

Check these threads:

4 Likes

Thanks for the great help.

I did not come into my mind it could be local problem. I viewed openhab with my mobile and all seems to be what it should be. I’ll give it try on various computers and let you know what I found out.

Wow! Would never have thought on this. Just thinking, how we would have narrowed it down without your findings?! :+1:

Are you running any AV software? Any proxies?
-> Of course, but no proxies

Does it work on other machines? Yes, just this one not.
Does it work in other browsers? Nope
Does the dashboard work immediately after boot? Never tried
Can you connect with HTTPS? e.g. https://yourdevice:8443/: I don’t get a specific error but the page doesn’t come up anyway. I can see some markup has been loaded.
Is the Stream Events tab working the Developer Console of the Main UI?: Works, but needs several minutes
Try opening your browser and pointing it to http://yourdevice:8080/rest/events/states.: No response

Indeed it is a AV problem. There is nothing I can do. Good to know, I’ll use a different computer.

What AV software are you using? (just my curiosity)

1 Like

A security suite from Sophos.

Interesting…
Many people who had problems with SSE were using Sophos (it was the one that thought it was a download).
I will find the relevant stuff.

Could be that this is solvable…

EDIT:
Does your Sophos setup have download scanning?

1 Like

Have you tried putting your server’s hostname into Sophos’s “Web Protection”?

(I assume it will work for any Sophos installation.)

No, because its a managed service. It’s a business laptop with a lot of permissions except the security suite. In my case there’s nothing I can (or willing to) do.

But thank you anyway. You saved me lot of hours.

Oh, okay. I understand your situation now. Glad I could be of help, by the way :slight_smile:

Hi Darryl,
Yes Sophos has download scanning.

Thank you, for your help.

I had same problems and I solved with HTTPS.

1 Like

Great hint! That solved it to me either