Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bindings do not show up in dialogue for addings Things #926

Closed
aurelio1 opened this issue Feb 24, 2021 · 4 comments
Closed

Bindings do not show up in dialogue for addings Things #926

aurelio1 opened this issue Feb 24, 2021 · 4 comments
Labels
bug Something isn't working main ui Main UI question Further information is requested

Comments

@aurelio1
Copy link

aurelio1 commented Feb 24, 2021

The problem

When doing Things -> New the Main UI does not show the binding, although it has been properly loaded and is active, according to the OpenHAB console.

Expected behavior

This happened both in the Eclipse environment and in an operational environment by adding the binding to the addons folder.

Steps to reproduce

Your environment

runtimeInfo:
  version: 3.0.0
  buildString: Release Build
locale: de_CH
systemInfo:
  configFolder: /etc/openhab
  userdataFolder: /var/lib/openhab
  logFolder: /var/log/openhab
  javaVersion: 11.0.9
  javaVendor: Azul Systems, Inc.
  javaVendorVersion: Zulu11.43+88-CA
  osName: Linux
  osVersion: 4.19.66-v7+
  osArchitecture: arm
  availableProcessors: 4
  freeMemory: 34081032
  totalMemory: 245112832
bindings:
  - airq
  - gpstracker
  - homematic
  - hue
  - mail
  - miele
  - network
  - solaredge
  - synologysurveillancestation
clientInfo:
  device:
    ios: false
    android: false
    androidChrome: false
    desktop: true
    iphone: false
    ipod: false
    ipad: false
    edge: false
    ie: false
    firefox: true
    macos: false
    windows: false
    cordova: false
    phonegap: false
    electron: false
    nwjs: false
    webView: false
    webview: false
    standalone: false
    pixelRatio: 1
    prefersColorScheme: light
  isSecureContext: true
  locationbarVisible: true
  menubarVisible: true
  navigator:
    cookieEnabled: true
    deviceMemory: N/A
    hardwareConcurrency: 8
    language: de
    languages:
      - de
      - en-US
      - en
      - es-AR
    onLine: true
    platform: Linux x86_64
  screen:
    width: 1920
    height: 1080
    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; rv:78.0) Gecko/20100101 Firefox/78.0
timestamp: 2021-02-24T19:13:26.205Z

Browser console

Browser network traffic

Additional information

It is not allowed to upload the .jar, but I can send it upon request.
The problem does not appear only with my Siro binding (in the works), but also with others, see https://community.openhab.org/t/binding-in-development-not-appearing-in-main-ui/117779

@aurelio1 aurelio1 added bug Something isn't working main ui Main UI labels Feb 24, 2021
@ghys
Copy link
Member

ghys commented Feb 25, 2021

Please make sure it appears in the response of GET /rest/bindings, you can go to Developer Tools > API Explorer and open /bindings to check it.
The fact that it doesn't appear under Settings > Bindings is normal, these screens are for installing/uninstalling distro add-ons, the sideloaded add-ons don't appear there (same as Paper UI).

@ghys ghys added the question Further information is requested label Feb 25, 2021
@aurelio1
Copy link
Author

aurelio1 commented Feb 25, 2021

@ghys It was not my point that the sideloaded binding is missing from the Settings>Bindings. My point was that it is missing from the bindings list in Things>New. My other two sideloaded bindings are shown there.
The missing binding does not appear in the bindings list of the API Explorer either. The other two sideloaded bindings appear correctly. Does this mean that the bug is not related to the Main UI, but rather to the API backend?
Besides that (but that is an enhancement request, not a bug) it would be very useful (and reduce confusion) that sideloaded bindings are also shown in Settings>Bindings, eventually in an additional table. Or has it been discussed that for some reason it is better not to show them?

@ghys
Copy link
Member

ghys commented Feb 25, 2021

Does this mean that the bug is not related to the Main UI, but rather to the API backend?

Then yes.

Besides that (but that is an enhancement request, not a bug) it would be very useful (and reduce confusion) that sideloaded bindings are also shown in Settings>Bindings, eventually in an additional table. Or has it been discussed that for some reason it is better not to show them?

It's been discussed before, and it's a technical limitation in the API - only the bindings have their dedicated endpoint, the other types of add-ons don't, so there's no way to see them if they don't come from the distribution. Ideally shouldn't be any special treatment for one category of add-ons, so all screens work the same. With some proposed additions to the API I suggested in
openhab/openhab-core#2070 maybe there could be a way to list them (the add-ons placed in addons could appear to be from an add-on service named "local" or similar, with no installation/uninstallation possible).

@aurelio1
Copy link
Author

aurelio1 commented Feb 25, 2021

Thank you for this interesting information. I assume there is also a reason that Settings>Bindings doesn't show ALL bindings (from the distribution AND the sideloaded bindings). If the API doesn't deliver the source of the binding, having both together, without distinction, is still better than listing just those from the distribution, ignoring the sideloaded ones.
Or asked differently: why doesn't Settings>Bindings take the information from the GET /rest/bindings API?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working main ui Main UI question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants