openhab / openhab-webui

Web UIs of openHAB
Eclipse Public License 2.0
224 stars 241 forks source link

MainUI not showing current item value #2167

Open J-N-K opened 1 year ago

J-N-K commented 1 year ago

The problem

An item has a current value, but it is not shown on the item page in MainUI. It is shown in the item list, though.

Bildschirmfoto 2023-11-12 um 11 05 33 Bildschirmfoto 2023-11-12 um 11 05 22
label: Abs. Luftfeuchtigkeit
type: Number:Density
category: humidity
groupNames:
  - gBadKlima
  - gPersist5
groupType: None
function: null
tags:
  - Humidity
  - Measurement

Expected behavior

Current item value is also shown on the item page.

Steps to reproduce

see above

Your environment

runtimeInfo:
  version: 4.1.0
  buildString: "Build #3716"
locale: de-DE
systemInfo:
  configFolder: /etc/openhab
  userdataFolder: /var/lib/openhab
  logFolder: /var/log/openhab
  javaVersion: 17.0.9
  javaVendor: Eclipse Adoptium
  javaVendorVersion: Temurin-17.0.9+9
  osName: Linux
  osVersion: 6.1.0-13-amd64
  osArchitecture: amd64
  availableProcessors: 4
  freeMemory: 550067632
  totalMemory: 1023410176
  uptime: 73561
  startLevel: 100
 clientInfo:
  device:
    ios: false
    android: false
    androidChrome: false
    desktop: true
    iphone: false
    ipod: false
    ipad: false
    edge: false
    ie: false
    firefox: false
    macos: true
    windows: false
    cordova: false
    phonegap: false
    electron: false
    nwjs: false
    webView: false
    webview: false
    standalone: false
    os: macos
    pixelRatio: 2
    prefersColorScheme: light
  isSecureContext: false
  locationbarVisible: true
  menubarVisible: true
  navigator:
    cookieEnabled: true
    deviceMemory: N/A
    hardwareConcurrency: 8
    language: de-DE
    languages:
      - de-DE
    onLine: true
    platform: MacIntel
  screen:
    width: 1512
    height: 982
    colorDepth: 24
  support:
    touch: false
    pointerEvents: true
    observer: true
    passiveListener: true
    gestures: false
    intersectionObserver: true
  themeOptions:
    dark: light
    filled: true
    pageTransitionAnimation: default
    bars: filled
    homeNavbar: default
    homeBackground: default
    expandableCardAnimation: default
  userAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15
    (KHTML, like Gecko) Version/17.1 Safari/605.1.15
timestamp: 2023-11-12T10:10:26.970Z

Browser network traffic

Bildschirmfoto 2023-11-12 um 11 12 52

Additional information

J-N-K commented 1 year ago

Not sure if I should close this. It's an issue with HTTP connections. It seems to work fine with HTTPS. Plain HTTP connections don't seem to support SSE.

florian-h05 commented 1 year ago

The Items list is getting states from the REST response, the Item page and the UI pages from SSE. If SSE doesn’t work, there are no states.

However I haven’t heard of such an SSE limitation when using HTTP on macOS Sonoma, but given the fact that unencrypted WebSocket connections don’t work on iOS, I wouldn’t wonder if Apple disabled SSE for HTTP.

florian-h05 commented 11 months ago

How to we procees with this issue?

J-N-K commented 11 months ago

Maybe we should add a note somewhere that SSE (and web sockets) are not supported in some browsers when using HTTP connections. Maybe we can even detect that on client side and show a toast message that live updates are not supported (similar to the communication lost message).