Logic of groups

Hi,

I have been trying to search, but i cannot find a concise answer to how groups work.

This is what i expect, it may be wrong:

I put dimmers in a group. Then the group should show in the control page in paperui, and i can dim both dimmers at the same time.

In my head, the meaning of group, is to control all elements in group simultaneously. This does not seem to apply.

If groups did not exist, then i would start thinking about scripting, eg, make a dummy switch, and when this is triggered, perform action on all dimmers. But as groups exists, scripting does not make sense to me.

Could someone please set me straight? :stuck_out_tongue:

Regards,

Kim

Interesting question actually. Group of Dimmers represented as virtual Dimmer, with some heuristic common brightness level.
Is ON/OFF working at least?

Unfortunately, my group ā€œHomeā€ does not show in the ā€œcontrolā€ page in paperui. So, i have no way of doing any action towards the group.

The group at this point only has 1 member, but that should not matter.

Itā€™s worth bearing in mind that Groups have types, just like Items.

e.g. if you want a Group to behave as a ā€˜master switchā€™ you will have to define it as Switch type group. Lkewise if you want it be a master Dimmer, as a Dimmer type. Never done it, donā€™t know if it works - but the general intent is that commands passed to a group will get passed to member Items capable of handling that kind of command.

I checked this myself right now. The group doesnā€™t show automatically in PaperUI control, or basic UI or classic UI.
Other members, any suggestions that donā€™t include writing a text based sitemap?

The control panel in the UI will only show items bound to channels
For manually created items including groups you will need to use a sitemap and the basicUI or ClassicUI

So, you can make it work like i expect by editing files, but you cant do it in the graphical gui?

Is this just a missing feature or by design? If it is the latter, in my opinion, it degrades the usability for normal users.

1 Like

Yes, that is a shame. Group is such a basic feature, it should not ask user to go back to OH1 philosophy of learning sitemaps and other text based config files.

Define normal user
You will need to use a sitemap anyway down the line
The controlUI is just that a ā€œcontrolā€ UI

Normal user is the one who expects an intuitive discover, click,drag,drop type of system. Openhab2 looks like it wants to go there. A normal user is someone who dont know what a terminal is, and should not need to know.

I thought the paperui and the control ui was the ā€œcontrol centerā€, and the items here will be visible in mobile apps, etc. They are visible btw, but i cant see my group in the iphone app either.

Sitemaps needs to be written, right? I have no problem going to a shell and make stuff work, not even scripting some rules, but i did not expect to do it for such a simple task.

But, then again, i am new to this system.

1 Like

Can you request this as a wish on github perhaps? We may be short of some volunteers but at least the issue will be queued and it will help other users. The people around here will tell you what repo to create the feature request against.
But meanwhile you got no choice but to use a custom sitemap and classic/basic UI to render it.
Its not that difficult, so donā€™t be afraid.

Sure, i could do that, only thing is that i may not know enough about the system, and the ā€œlimitationā€ we are discussing, to make an accurate request. I know devā€™s donā€™t like unclear requests, or requests that are plain wrong, because of an inexperienced user.

That wonā€™t be a problem. The developers are kind in this project. :slight_smile:
I can augment your request once you create it.

Do you know wich repo i should make the request in?

@Kai @rlkoshak any quick suggestions where should this enhancement go? Lets queue this at least. Unless its already doable with latest SNAPSHOT?

I am on the most recent snapshot.

Maybe it is this: https://github.com/openhab/openhab-distro

There are reported issues there with paperui and basicui. I think feature requests can be posted as issues, and will get a tag for ā€œfeature requestā€.

1 Like

The Control tab of PaperUI only shows Channels that have Items linked to them. That is it. PaperUI is an administration UI, not a Home Automation Userā€™s Interface. You donā€™t really want the users of your HA to have access to all the controls in PaperUI anyway. But the point is the Control Tab is to test that your Channels are working, nothing more. So you will not see Groups there.

In fact it does. It also can summarize all the members of the Group (e.g. show the average temp). But to see that summarization or to send a command to that Group you need to create a Home Automation Userā€™s Interface using a Sitemap or HABPanel. You can then put your Group:Dimmer on that UI as if it were any other Item and when you change it it will change all of its members to match.

Group:Dimmer:AVG AverageDimmers
Group:Dimmer:MAX MaxDimmers
Group:Dimmer:MIN MinDimmers

This is how you would define these Groups in a .items file. I donā€™t know how it works in PaperUI.

HABPanel, though there you still have to construct it. There is also Home Builder which will produce a bunch of Items and Sitemap to get you started.

OK, I looked.

The part you canā€™t do is send commands to that Group in PaperUIā€™s Control tab. That tab is only for testing out that Channels are working. For everything that is not linked to a Channel, you need to create the UI for your Home Automation.

Itā€™s partially by design. PaperUI is just an OH 2 thing and it is intended for administration of your OH server. It is not intended to be a general interface that anyone would use to control your home automation. And because it is an OH 2 only UI, it cannot do much of anything with many parts of what can be done in OH like work with OH 1.x version bindings.

New features and capabilities are constantly being added to PaperUI all the time. Perhaps someday it will become more capable, or perhaps itā€™s limitations will become moot as everything will have been migrated to OH 2.x. But for now, you will need to create your Home Automation Userā€™s Interface to display and control any Item or Group that is not linked to a Channel on a Thing.

As I said there is HABPanel which is point and click UI building, no text files. The API is REST based and relatively easy for anyone with the time and skills to build their own new UIs around. And if anyone where to build such a UI that automatically gets created as Items are created Iā€™m sure it would be very welcomed by the community.

But PaperUI and Habmin are not Home Automation UIs (i.e. the UIs that we and our families and guests use to control our homes). They are Administration UIs. Their primary focus is on setting up and configuring your home automation, not on actually using your home automation. If it were up to me Iā€™d get rid of the Control tab in PaperUI entirely. All it seems to do is cause confusion with new users like the OP.

Indeed. It wants to go there. And it is moving that direction at a steady pace. But itā€™s not there yet.

OH is a long way from that still. If that is what you expect I donā€™t think you will be happy in the long run.

That is another annoyance I have. If you donā€™t create a sitemap, the server dynamically creates one out of the Control tab. But that means they have the same limitation as the Control tab (i.e. only show Items that have been linked to Channels). Iā€™d have much rather have a ā€œIt looks like you want to use a sitemap, here is how you create oneā€ page instead.

PaperUI is owned by the Eclipse Smarthome Project so I think any requests should go there.

1 Like

Ok, wow, that is what i would call a reply! I donā€™t actually think i have any follow up questions :smiley:

Great, i understand more now. I have no problem writing ā€œcodeā€ to get things going, i was just not sure if i had to.

I will look into this tomorrow.

Ok,maybe one question:

Groups made in the gui, will they be accessible to call in the sitemap builder? I dont know where, but i read something about some parts being saved in a database, and oher stuff in files.

I could scrap the gui made groups and create them in files only, your syntax looks okay anyway.

Thanks!

Yes. As will Items and Groups created in text files. Pretty much ALL Items and Groups are available to all of the Home Automation UIs (sitemap based, HABpanel).

When you create stuff in PaperUI they get saved to a JSON DB under /var/openhab2/jsondb. When you edit text files they get put in /etc/openhab2. It is possible to create Items in PaperUI which will get saved to the JSONDB. It is also possible to create Items using a .items file. Those Items will not get saved to JSONDB.

We are in a bit of a long term transition and have to be sensitive to backwards compatibility so I donā€™t expect this to change in the near term. But as PaperUI becomes more and more capable I suspect more and more users will start using it more to create things like Items and fewer will be using .items files.

Eventually Rules and Sitemaps will hopefully become configurable in PaperUI to (Experimental Rules Engine is heading that direction but itā€™s not ready for prime time yet). In the mean time HABPanel is great for the UI part.

I would still as newbie not like to have to write files or build whole HABPanel UI screens only because group is not showing in auto-generated-sitemaps. The default sitemap constructed by basicui/classicui just does most things for me already, is there a way to specify that I want to enrich/patch that, instead of creating the whole stuff in a custom sitemap?