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

Allow for more customization for device controls entries #3140

Closed
depau opened this issue Jan 1, 2023 · 7 comments · Fixed by #3576
Closed

Allow for more customization for device controls entries #3140

depau opened this issue Jan 1, 2023 · 7 comments · Fixed by #3576
Labels
enhancement Indicates new feature requests help wanted Indicates that a maintainer wants help on an issue or pull request

Comments

@depau
Copy link

depau commented Jan 1, 2023

Is your feature request related to a problem? Please describe.

I find the device controls quite inflexible and inconvenient for most use cases.

  • A custom name can't be applied; my items are configured in groups such as:

    • Air purifier [Group]
      • Power [Switch]
      • Speed [Dimmer]
    • Desk light [Group]
      • Power [Switch]
      • Brightness [Dimmer]
      • ColorTemperature [Dimmer]

    So I can't simply add the "Power" item cause I'd have no idea of what's being toggled

  • Things can't be grouped; I'd like the control for lights to be swipable (to control the brightness) and tappable (to toggle it); at the current stage I can only add two controls, and tapping the brightness one would turn it off by setting it to zero (losing memory of the previous brightness setting)

Describe the solution you'd like

I think it'd be really useful to have a new metadata type similar to that for Google Assistant that allows to:

  • Override names and other settings
  • Group multiple items together to create controls with complex traits

I'm okay with having creating a few proxy items if necessary to match the controls behavior, and/or with adding additional groups to match the semantics of the controls.

Describe alternatives you've considered

The alternative I considered is going through Google Home, and that's what I'm currently doing, though that's not ideal since I'd rather talk to openHAB directly, for performance and privacy reasons.

@depau depau added the enhancement Indicates new feature requests label Jan 1, 2023
@depau depau changed the title Allow more customization for device controls entries Allow for more customization for device controls entries Jan 1, 2023
@mueller-ma
Copy link
Member

mueller-ma commented Jan 5, 2023

You can control the subtitle and the grouping of these tiles by a setting. It uses data of the semantic model (https://www.openhab.org/docs/tutorial/model.html#semantic-model). IMO this metadata should be enough to configure the tiles you'd like.

However I see two issues here:
1. Subtitle and groups are controlled by a single setting. Maybe split them up into two settings.
2. On my setup with a (I hope) valid semantic model I don't see any groups, so maybe there's a bug.

Edit: These groups are only visible when adding new tiles, not afterwards. Therefore I'm not sure if a second setting is useful.

@mueller-ma
Copy link
Member

The alternative I considered is going through Google Home, and that's what I'm currently doing, though that's not ideal since I'd rather talk to openHAB directly, for performance and privacy reasons.

Can you post a screenshot of that?

@depau
Copy link
Author

depau commented Jan 18, 2023

Sure, sorry for having you wait.

The former is my Google Home device controls dashboard; the middle one is the "add controls" screen for openHAB beta (from F-Droid); the latter is what I get if I long-press the TV item in the Google Home controls (which is currently the most complex openHAB equipment I configured for Google Home).

I must say that the Google-based solution is still far from what I'd consider to be ideal, but it's fully functional.

I can swipe on any dimmable device to change the brightness/volume/speed, tap to toggle the power, long press to open a view with more controls for that device.

The openHAB controls are all over the place, the items with an okay name you see are groups with a type. But for instance if I add the light to the controls I can only toggle it, not change the brightness.

I would at the very least like to be able to pair a Switch and a Dimmer into a single tile, then ideally also a sitemap that is displayed on long press.

@depau
Copy link
Author

depau commented Jan 18, 2023

Maybe my model isn't configured properly though, here's a screenshot to give you an idea of how I structured it:

I then have some additional non-semantic items for things that need extra hacks, such as this one that bundles the air purifier switch and fan speed dimmer into a single item that accepts on/off/speed setting.

image

@mueller-ma
Copy link
Member

But for instance if I add the light to the controls I can only toggle it, not change the brightness.
I would at the very least like to be able to pair a Switch and a Dimmer into a single tile,

That does work currently. Which item type has the item you add as tile?

then ideally also a sitemap that is displayed on long press.

It has to be discussed how the sitemap should be linked to that widget.

Maybe my model isn't configured properly though

Can you click on "Scooter smart plug" and make a screenshot of the right side of the screen?

@depau
Copy link
Author

depau commented Jan 24, 2023

But for instance if I add the light to the controls I can only toggle it, not change the brightness.
I would at the very least like to be able to pair a Switch and a Dimmer into a single tile,

That does work currently. Which item type has the item you add as tile?

I'm currently using the setup required for SpecialColorLight for Google Assistant, therefore

  • Light group ga:SpecialColorLight (no group type) ← added as a tile (see below)
    • Switch (power) ga:lightPower
    • Dimmer (brightness) ga:lightBrightness
    • Dimmer (color temperature) ga:lightColorTemperature

I could change it to a different setup if needed, the current one is as it is because of the GA binding requirements, but it would be nice to have common conventions whenever possible.

EDIT: I actually double checked and the groups don't show up to be added as tiles. So I had actually added the switch.

then ideally also a sitemap that is displayed on long press.

It has to be discussed how the sitemap should be linked to that widget.

Maybe my model isn't configured properly though

Can you click on "Scooter smart plug" and make a screenshot of the right side of the screen?

Here you go. No group type is set.

image

@mueller-ma
Copy link
Member

Ok, now I got your feature request. This seems like a bigger task as it requires some kind of Sitemap rendering based on Items in a group (compared to Widgets like in normal Sitemaps).

@mueller-ma mueller-ma added the help wanted Indicates that a maintainer wants help on an issue or pull request label Feb 8, 2023
mueller-ma added a commit to mueller-ma/openhab.android that referenced this issue Nov 26, 2023
We already have links to Sitemap subpages (NFC tags), so re-use them for the device control.

Closes openhab#3140

Signed-off-by: mueller-ma <mueller-ma@users.noreply.github.com>
mueller-ma added a commit to mueller-ma/openhab.android that referenced this issue Nov 26, 2023
We already have links to Sitemap subpages (NFC tags), so re-use them for the device control.

Closes openhab#3140

Signed-off-by: mueller-ma <mueller-ma@users.noreply.github.com>
mueller-ma added a commit to mueller-ma/openhab.android that referenced this issue Jan 22, 2024
The UI command item in Main UI uses the same URL for `navigate:` than
Main UI itself.
Therefore use the same URLs as the browser uses. When a Basic UI URL is
detected, open it in Sitemap, otherwise in Main UI Webview.

Closes openhab#3140
Closes openhab#3529

Signed-off-by: mueller-ma <mueller-ma@users.noreply.github.com>
mueller-ma added a commit to mueller-ma/openhab.android that referenced this issue Jan 22, 2024
The UI command item in Main UI uses the same URL for `navigate:` than
Main UI itself.
Therefore use the same URLs as the browser uses. When a Basic UI URL is
detected, open it in Sitemap, otherwise in Main UI Webview.

Closes openhab#3140
Closes openhab#3529

Signed-off-by: mueller-ma <mueller-ma@users.noreply.github.com>
mueller-ma added a commit to mueller-ma/openhab.android that referenced this issue Jan 26, 2024
The UI command item in Main UI uses the same URL for `navigate:` than
Main UI itself.
Therefore use the same URLs as the browser uses. When a Basic UI URL is
detected, open it in Sitemap, otherwise in Main UI Webview.

Closes openhab#3140
Closes openhab#3529

Signed-off-by: mueller-ma <mueller-ma@users.noreply.github.com>
mueller-ma added a commit to mueller-ma/openhab.android that referenced this issue Jan 26, 2024
The UI command item in Main UI uses the same URL for `navigate:` than
Main UI itself.
Therefore use the same URLs as the browser uses. When a Basic UI URL is
detected, open it in Sitemap, otherwise in Main UI Webview.

If no `link_to_more` is set, default to a list of members for groups.

Closes openhab#3140
Closes openhab#3529

Signed-off-by: mueller-ma <mueller-ma@users.noreply.github.com>
mueller-ma added a commit that referenced this issue Feb 3, 2024
The UI command item in Main UI uses the same URL for `navigate:` than
Main UI itself.
Therefore use the same URLs as the browser uses. When a Basic UI URL is
detected, open it in Sitemap, otherwise in Main UI Webview.

If no `link_to_more` is set, default to a list of members for groups.

Closes #3140
Closes #3529

Signed-off-by: mueller-ma <mueller-ma@users.noreply.github.com>
florian-h05 added a commit to openhab/openhab-webui that referenced this issue Apr 21, 2024
Closes #2382.
Refs openhab/openhab-android#3140.

Adds Android app's link_to_more metadata to the well-known namespaces,
therefore also adds an editing page for it.

---------

Also-by: mueller-ma <mueller-ma@users.noreply.github.com>
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Indicates new feature requests help wanted Indicates that a maintainer wants help on an issue or pull request
Projects
None yet
2 participants