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

[feature request] [mainui] Add Thing as Equipment - Select/deselect all checkbox #377

Closed
marcelrv opened this issue Oct 6, 2020 · 10 comments · Fixed by #404
Closed

[feature request] [mainui] Add Thing as Equipment - Select/deselect all checkbox #377

marcelrv opened this issue Oct 6, 2020 · 10 comments · Fixed by #404
Labels
enhancement New feature or request main ui Main UI

Comments

@marcelrv
Copy link

marcelrv commented Oct 6, 2020

While developing and testing bindings, the simple mode of paperUI was always very helpful.
In the OH UI quickly testing is a real big pain as there is no simple fast way to create items.

Preference would be to have a similar mode as the good-old simple mode (e.g. triggered by single click) but otherwise improve the 'Add Thing as Equipment' functionality to not have to click each and every channel

@ghys
Copy link
Member

ghys commented Oct 6, 2020

Right, been thinking about this one for a while. "Simple mode" is gone with openhab/openhab-core#1385 and probably not coming back.
On the "Add to Model" screen (i.e. "Add Thing as Equipment"/"Add Points from Thing") Select all is definitely missing. The rationale with this feature was to give users a chance to put some thought into how items are created (notably their names), as well as pick the channels that are actually needed and only those - I've seen some things with over 200 channels... But I agree it could be more streamlined.

An additional option would be to have the equivalent of simple mode but as a developer tool, you pick one or several things, it will create temporary items and links and display a card to monitor their states. I suspect it would then be used by non-developers to speed up the linking though.

@ghys ghys added enhancement New feature or request main ui Main UI labels Oct 6, 2020
@mvalla
Copy link

mvalla commented Oct 6, 2020

I suspect it would then be used by non-developers to speed up the linking though.

I suspect a feature-(or I would say a UX-)equivalent of simple mode would be a big miss on the new OH3 UI, and not just for developers!
The power and beauty of OH auto discovery becomes very limited if no items and their default controls are not created immediately too.
Many other frameworks which have auto-discovery have also auto creation of controls; for example take Mozilla WebThings UX which is[was] beautiful IMHO.
Same happens on: Samsung SmartThings, Google Home, Apple HomeKit, etc. : once you select an hw, controls just appear! Only AFTER you will perform further configurations and modeling.

I think a new user should be able to first model its home, then add a binding and be able (with least possible button clicks) to see controls for items generated for those auto-discovered things.
THEN he will be able to remove unwanted channels (advanced channels were useful here..) and configure items according to its model. Then link to cloud, agents, rules etc etc etc.

I suspect many new OH3 users will fly away if such immediate and simple approach is not offered out of the box in OH3.

@kaikreuzer
Copy link
Member

The "non-advanced" channels were once meant to be the ones that users most likely want to have - things with 200+ channels somehow defeat this idea, but let's consider them to not be the norm.

Maybe we could add a button to the "Add Thing as Equipment"/"Add Points from Thing" features to create links+items for the non-advanced (=suggested) channels and apply the default naming scheme to them. Ideally the list of channels is editable by the user first (to remove channels or add some advanced ones).

The risk I see is that it could create a big number of unused items which simply clutters everything. Maybe we could also reduce such a feature to only channels that have semantic metadata in place, i.e. the ones that will in consequence also turn up on existing pages automatically.

@digitaldan
Copy link
Contributor

@ghys and now @kai (you posted as i was typing this) if channels configurations contained default or recommended semantic tags vs the generic categories that they do now, would this help the auto generation of items and widgets? For example, if a Thermostat was able to define that a set point channel is a semantic-type :"point" and semantic-tag:"setpoint", would it be easier to model commonly used channels, and help the UI build more complicated UI elements (like a thermostat widget)? Could we extend our categories for this purpose? I realize this may start getting over my head in terms of complication, and is a better question for the architecture council, but its something that has been gnawing at me as a missing link in building more purpose built UI elements (like a thermostat, music player, etc...)

@bobadair
Copy link
Member

bobadair commented Oct 6, 2020

if channels configurations contained default or recommended semantic tags vs the generic categories that they do now, would this help the auto generation of items and widgets?

I was thinking exactly the same thing when I read this. I don't know if extending categories or using some other mechanism would be the better approach, but it seems like adding some sort of additional (optional) metadata to the channel definitions to aid in semantic modeling, automatic linking of channels, and UI rendering of controls would be really useful.

@ghys
Copy link
Member

ghys commented Oct 6, 2020

The risk I see is that it could create a big number of unused items which simply clutters everything

That was the main problem with simple mode, it was fine while you were okay with abstracting away the notions of items and separate physical & functional layers, and then when you realized their value, next to impossible to recover from the mess it created.

if channels configurations contained default or recommended semantic tags vs the generic categories that they do now, would this help the auto generation of items and widgets

That would be a godsend, to be honest. But it's a lot of work to revisit every channel of every thing type (all 2412 of them as it stands now) to add proper semantic tagging...

@digitaldan
Copy link
Contributor

That would be a godsend, to be honest. But it's a lot of work to revisit every channel of every thing type

Maybe, but i think for many of our most popular bindings, it would not be that hard to modify the channel definition with reasonable semantic tags. My guess is we could really narrow that list down, and anyone with a reasonable understanding of the semantic model could infer the right tags. I think it would be better to start now, and have some shining examples of how it's done right, and let the rest of the bindings follow . I don't have a sense how big the change is on the backend to support this however.

@ghys
Copy link
Member

ghys commented Oct 6, 2020

I agree, and that will help us refine the semantic ontology in the process to handle such common equipments as thermostats or media players, so that the "default widget algorithms" will easily detect those semantic patterns and offer specialized widgets tailored to them.

@marcelrv
Copy link
Author

marcelrv commented Oct 6, 2020

That would be a godsend, to be honest. But it's a lot of work to revisit every channel of every thing type

Maybe, but i think for many of our most popular bindings, it would not be that hard to modify the channel definition with reasonable semantic tags. My guess is we could really narrow that list down, and anyone with a reasonable understanding of the semantic model could infer the right tags. I

I beg to differ... I just was looking over the list of current devices that theoretically could be controlled with the miio binding... the list of smartdevices in the Xiaomi ecosystem is currently >7000. Ranging from indeed obvious things like thermostats, to everything from watercookers, toiletseats, curtains, televisions, oven, fridges, foot bath.... you name it, they have it as smart device. I think it is unlikely OH will ever hold clear semantic tags for all of these properties...

However, following the logic suggested, these would not be considered for simple user friendly auto channel creation...
I'm very in favor of doing more sophisticated channels created if it has proper semantic definitions, but please don't make this a requirement...

@Skinah
Copy link
Contributor

Skinah commented Oct 14, 2020

Another vote for a select all button, as it is often quicker to select all and then untick the ones you don't want.
Like the idea of "non-advanced" channels only getting selected if the advanced ones are hidden.
A pop up modal could warn the user why not to select too many, and also offer buttons like, 'all channels' and 'all non advanced' to offer choices and to make the modal warning window have a dual purpose, to inform and offer multiple ways.

A separate but related suggestion/feedback is that when ticking multiple channels I find it annoying that they expand and move the list down each time a box is ticked. I can not speed click when they do this. Can they not auto expand unless you click on a + icon or similar? At the moment I have been going to the bottom and ticking the boxes from the bottom up as a work around.

ghys added a commit to ghys/openhab-webui that referenced this issue Oct 16, 2020
Add `searchbar-ignore` class to link skeletons to prevent
the height of the accordion to be initialized at 0px.
Should fix openhab#401.

Add filters to display only linked or unlinked channels.
Closes openhab#395.

Hide item linking controls for trigger channels.
Closes openhab#390.

Add option to select/unselect all checkboxes when in
multiple links mode. This will take the linked/unlinked
filter into account, and the advanced toggle, but not
the name filter.
Closes openhab#377.

Signed-off-by: Yannick Schaus <github@schaus.net>
@ghys ghys closed this as completed in #404 Oct 20, 2020
ghys added a commit that referenced this issue Oct 20, 2020
Add `searchbar-ignore` class to link skeletons to prevent
the height of the accordion to be initialized at 0px.
Should fix #401.

Add filters to display only linked or unlinked channels.
Closes #395.

Hide item linking controls for trigger channels.
Closes #390.

Add option to select/unselect all checkboxes when in
multiple links mode. This will take the linked/unlinked
filter into account, and the advanced toggle, but not
the name filter.
Closes #377.

Signed-off-by: Yannick Schaus <github@schaus.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request main ui Main UI
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants