Expose groups

If I create a group in my item files, say MyOpenhab, and then expose the group will it thus expose all items within the group?

Might make it easier instead of listing every single item individually.

1 Like

The docs are indeed ambiguous about that. But I suspect that if you expose a Group, only the Group itself will be exposed, not the members of the Group.

They have purposely made it so you have to be deliberate in choosing which Items get shared.

Though I’m just guessing. Someone in the know hopefully will comment, or someone will run the experiment to find out.

Hey did you manage to test the rlkoshak’s info?
I would also like to know the answer to this question.
I don’t want to reload the entire openhab.cfg just to add a single item to myOpenHab.

EDIT: Perhaps also rename the topic title to reflect that it is about the new openHAB Cloud Connector

There appears to be no special handling for Group items (see the code here). It makes sense to me to require users to enumerate each item s/he wants to expose to the cloud service, in order to control the volume of work that the free cloud service must do, and to require users to be mindful of specifically what information they are exposing to 3rd party services. The Paper UI configuration under openHAB 2 makes this a bit easier to work with than editing the text file, but even that is not too burdensome, imho.

Yup! Tested last tonight and its no-go.

I don’t think that exposing a group takes away from the “thought” of what you’re including. If anything, it transfers the process to the item file instead of the configuration file or Paper UI.

You still have to add the group to each device. To me, it makes more sense to designate this when I create the device instead of having to remember to go to the service configuration in Paper UI and scroll through the list to find the device I just created.

I understand there needs to be a process in Paper UI since you can technically set up a system without .item files but I think using the group method is a way to bridge both processes.

I’m in agreement with RHINESEL. Whether an item is exposed to the cloud is a property of the item, and should normally be designated at the time the item is created. How many other ‘item related’ settings in OpenHAB are made in the config file? Having to go to the config file to set this one attribute of the item feels completely wrong. Plus, the readability of the list of exposed items is pretty poor. My list is pretty long. If there is a pragmatic reason to require that items be exposed one by one rather than in groups, that’s fine, but it seems to me the setting of this should still be done in the items file.

One approach that comes to mind for defining which Items are exposed in the Item file is in the binding config, kind of like with the autoupdate binding.

Switch myItem "label" { channel="blah" myopenhab="true" }

That approach would retain the need to specify each Item individually for exposure and bring the binding more inline with how every other binding works with regard to not putting Items into the cfg.