openhab / openhab-addons

Add-ons for openHAB
https://www.openhab.org/
Eclipse Public License 2.0
1.85k stars 3.54k forks source link

[android debug bridge] appears (wrongly) as suggested addon #16592

Open andrewfg opened 1 month ago

andrewfg commented 1 month ago

I recently attached an Amazon Fire TV Stick to my home media system, and since then the android debug bridge binding is appearing under suggested addons. See below. I am not sure if that binding should or should not be suggested in relation to the Amazon Fire TV Stick. => Does anyone have thoughts or suggestions?

image

Signed-off-by: Andrew Fiddian-Green software@whitebear.ch

andrewfg commented 1 month ago

@GiviMAD ping!

GiviMAD commented 2 weeks ago

Sorry for the delay, Most of the binding's channels work with the Amazon Fire TV Stick if you have enabled the adb access in the developer options, but the discovery service doesn't check whetter the adb is enabled on the device.

andrewfg commented 2 weeks ago

if you have enabled the adb access in the developer options

@GiviMAD thanks for the response. The addon suggestion finder works by discovering Firesticks (e.g.) on the LAN. It cannot detect if the Firestick has ADB enabled or not; so it always suggests your addon to be installed. I don't know the statistics but I am guessing that the large majority of users do NOT have ADB turned on. So for those users ('normal' users) the suggestion to install your binding is actually not appropriate.

I think there could be a few possible solutions..

  1. Don't change anything.
  2. Disable the addon suggestion finder for this binding.
  3. See if there is some property in the discovery mechanism that indicates if ADB is installed or not.
  4. And lastly -- for discussion -- I don't know if this is actually possible. but perhaps I can modify the addon suggestion finder so that instead of tracking two states in the UI (do not suggest addon / do suggest addon) it may perhaps track three states (do not suggest addon / do suggest addon with install selection unchecked / do suggest addon with install selection checked). By copy I am asking @mherwege for comments on this please.
mherwege commented 2 weeks ago

4. And lastly -- for discussion -- I don't know if this is actually possible. but perhaps I can modify the addon suggestion finder so that instead of tracking two states in the UI (do not suggest addon / do suggest addon) it may perhaps track three states (do not suggest addon / do suggest addon with install selection unchecked / do suggest addon with install selection checked). By copy I am asking @mherwege for comments on this please.

I am not a big fan of this. While possible, it would require such a list to be maintained in the webui code, not with the binding. And a default deselection would only make a difference in the initial setup wizard, not in the listing in the add-on store.

Ultimately, a better solution might be to build something that allows ignoring suggestions and keep track of the ignored state, so it does not keep popping up in the suggestions list (while still be accessible from the wider list of add-ons). But there is no place to store that information in OH at the moment and no REST endpoint to do that, so it would require quite a bit of work.