openhab / openhab-distro

The binary distribution of openHAB
https://www.openhab.org/
Eclipse Public License 2.0
1.3k stars 391 forks source link

Documentation improvement #680

Closed yveshanoulle closed 6 years ago

yveshanoulle commented 6 years ago

The file addons.cfg contains some documentation that is confusing.

'# A comma-separated list of bindings to install (e.g. "sonos,knx,zwave") This is confusing, because it's not clear if the " are part of the list.

A for me less confusing comment would be:

'# A comma-separated list of bindings to install (e.g. "binding = sonos,knx,zwave")

(And similar for all lists in this file.)

I don't know yet how to create PR for your project. I think we need an issue first.

martinvw commented 6 years ago

I think that the good news is that it also works with quotes:

my addons.cfg

ui = "classic,basic,paper,habpanel,habmin"
yveshanoulle commented 6 years ago

Unfortunately that is not true.

When I write ui = "classic,basic,paper,habpanel,habmin" both classic and habmin are not installed.

martinvw commented 6 years ago

That is weird I copied it from my local file šŸ¤”

Somebody else some idea? Iā€™m one the newest snapshot on which version are you?

yveshanoulle commented 6 years ago

I originally installed the Pine 64 install (2.0) Upgraded to 2.2 and then upgraded to latest snapshot. The test with the missing first and last was from 2.2 I'll try now with the snapshot, yet I 'm not sure if the file is still read after an install.

I was told on the forum that using the " was wrong. And I misread the documentation. Hence I try to help people getting documentation that does not have that misread.

is your copy from /etc/openhab2/services/addons.cfg or addons.config (Not sure where that file is located, I'm told that I should not changed that content)

yveshanoulle commented 6 years ago

I just changed my addons.cfg from ui = classic,basic,habmin,paper,habpanel to ui = "classic,basic,habmin,paper,habpanel"

And in log:tail I see this happening.

13:33:25.400 [INFO ] [lassic.internal.servlet.WebAppServlet] - Stopped Classic UI 13:33:25.746 [INFO ] [.core.karaf.internal.FeatureInstaller] - Uninstalled 'openhab-ui-classic' 13:33:25.787 [INFO ] [smarthome.event.ExtensionEvent ] - Extension 'ui-classic' has been uninstalled. 13:33:46.703 [INFO ] [bpanel.internal.HABPanelDashboardTile] - Stopped HABPanel 13:33:46.876 [INFO ] [.core.karaf.internal.FeatureInstaller] - Uninstalled 'openhab-ui-habpanel' 13:33:46.917 [INFO ] [smarthome.event.ExtensionEvent ] - Extension 'ui-habpanel' has been uninstalled.

I did this on OpenHab 2.3.0 Build 1256

yveshanoulle commented 6 years ago

I have package = expert also on in this file. (From what I understand this is needed to use the settings from the cfg file.

yveshanoulle commented 6 years ago

I just saw that there is already a 1257. I retried and I have the same behavior

martinvw commented 6 years ago

Can you post your full two addons files?

kaikreuzer commented 6 years ago

I think that the good news is that it also works with quotes:

I'd actually think it currently shouldn't work. So wrt this issue, I'd suggest to

  1. update the docs in the way @yveshanoulle suggests
  2. improve the config processing so that such quotes are stripped off, in case they are there.

Wdyt?

martinvw commented 6 years ago

So my config is broken, good you joined in šŸ‘

martinvw commented 6 years ago

I'll prepare PR :-)

martinvw commented 6 years ago

@yveshanoulle thanks for your suggestion and testing:

PR: https://github.com/openhab/openhab-distro/pull/682

Note that this only covers bullet 1

yveshanoulle commented 6 years ago

Seems a lot happened while I was being a trafficjam...

@martinvw you still want me to post my two configs? (I have no idea where to find the addons.config)

martinvw commented 6 years ago

No its fine, somehow something seems wrong in my config, but I never change those files šŸ˜„

I use either the paperUI for installing addons or drop them in the addons folder

yveshanoulle commented 6 years ago

I finally had time to install the new version. The addons.cfg installs correctly. It asks nicely if It can overwrite the file. When it overwrites the file, it also makes a copy of the old file. which is great to see. It might be a good idea to mention that during the setup that when you select overwrite that there will be a copy. (I guess that is not in openhabs control.)

y