openhab / openhab-webui

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

Refresh button for items #1484

Open ssalonen opened 2 years ago

ssalonen commented 2 years ago

The problem

In item view, it would be great to have button for sending REFRESH command to items.

Often when manipulating items the state can reset by itself. Easy access to REFRESH command would allow the user to get the state restored.

Your suggestion

Have a small refresh button for sending REFRESH command to the item.

Your environment

runtimeInfo:
  version: 3.3.0
  buildString: Release Build
locale: fi-FI
systemInfo:
  configFolder: /etc/openhab
  userdataFolder: /var/lib/openhab
  logFolder: /var/log/openhab
  javaVersion: 11.0.15
  javaVendor: Raspbian
  osName: Linux
  osVersion: 5.15.32-v7l+
  osArchitecture: arm
  availableProcessors: 4
  freeMemory: 97366840
  totalMemory: 372244480
  startLevel: 100
bindings:
  - fmiweather
  - modbus
  - network
  - shelly
  - systeminfo
  - zwave
clientInfo:
  device:
    ios: false
    android: false
    androidChrome: false
    desktop: true
    iphone: false
    ipod: false
    ipad: false
    edge: false
    ie: false
    firefox: false
    macos: false
    windows: false
    cordova: false
    phonegap: false
    electron: false
    nwjs: false
    webView: false
    webview: false
    standalone: false
    pixelRatio: 1.25
    prefersColorScheme: light
  isSecureContext: true
  locationbarVisible: true
  menubarVisible: true
  navigator:
    cookieEnabled: true
    deviceMemory: 8
    hardwareConcurrency: 4
    language: en-GB
    languages:
      - en-GB
      - en
      - en-US
      - fi
    onLine: true
    platform: Linux x86_64
  screen:
    width: 3072
    height: 1728
    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 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like
    Gecko) Chrome/104.0.0.0 Safari/537.36
timestamp: 2022-08-24T04:42:29.315Z

Additional information

rkoshak commented 2 years ago

I like it but not all bindings support the REFRESH command. I worry about unexpected behavior and complaints along the lines of "I click refresh on my Zwave Items and it works as expected but when I do it for MQTT Items nothing happens." That's not an argument against the feature itself, just something that needs to be accounted for.

niwla23 commented 2 years ago

I like it but not all bindings support the REFRESH command. I worry about unexpected behavior and complaints along the lines of "I click refresh on my Zwave Items and it works as expected but when I do it for MQTT Items nothing happens." That's not an argument against the feature itself, just something that needs to be accounted for.

I think best option would be to just disable it then (graying it out, no click cursor) or not showing it at all