unfoldedcircle / feature-and-bug-tracker

Feature and bug tracker repository for Unfolded Circle products
25 stars 0 forks source link

[feature request] Increase number of entities that can be added to an activity #124

Closed va-lemon closed 1 year ago

va-lemon commented 1 year ago

Is there an existing issue for this?

Description

The Remote Two currently allows up to 50 entities to be added to an activity. This limit should be increased to 100. When using the Home Assistant integration (or any future home automation hub integration), each script or button is exposed to Remote Two as an entity and the count of buttons or scripts that need to be exposed can grow very quickly.

E.g. in my setup, I have a Denon AVR, a JVC projector, an Apple TV and MadVR HTPC exposed integrated via Home Assistant. Each action that is not supported by the integration in HA (e.g. invoke the Control Center on Apple TV or use the D-pad controls) has to be called via the HA remote entity which I create as a script in HA. This script gets exposed as one entity to Remote Two.

Additional context

This issue can also be resolved in other ways:

  1. Allow Remote Two to call Home Assistant services directly with configurable service data in the web configurator. This will reduce the need to add HA scripts or buttons as entities to the Remote Two.
  2. Expose HA remote entities directly to Remote Two. In conjunction with item 1, this will expose device information via HA sensors and allow ability to send HA remote commands without needing individual HA scripts and buttons exposed to Remote Two.
  3. Allow ability to create non-IR Remotes in Remote Two and then link to these non-IR Remote pages from within an activity. E.g. I can create a Denon IP Remote with HA scripts and buttons. Then rather than adding each of the HA Denon scripts and buttons to all my activities, I can link to the "Cotnrols" page of the Denon IP Remote in my activities where I need Denon controls.

Each one of the above are actually valuable features on their own and should be considered for implementation to provide greater flexibility.

zehnm commented 1 year ago

Increasing entity limit for activities & macros is a valid point 👍

Feedback to:

  1. This will require a further abstraction to work with our integration driver architecture. Whenever possible, all device specific logic needs to be in an integration. The integrations have a well-defined API to talk to the core services. Otherwise we "pollute" the architecture, which will bite us sooner or later with future development and maintenance.
    One idea is to add something like a "service-call entity" with metadata describing parameters (we already have something similar in place for the web-configurator activity & macro configuration). This would then allow much more possiblities for other custom drivers or home automation hubs and wouldn't be limited to HA only. This request already came up by others. It's something we'll look into soon.
  2. Exposing HA remote entities is in the backlog. No ETA yet though.
  3. I'm not sure I understand this correctly. What do you exactly mean with "controls page", a frontend from Home Assistant?
zehnm commented 1 year ago

Number of entities in an activity & max number of steps will be increased from 50 to 100 in the next release.

That many entities or steps in an activity sequence should be avoided though and only used for special use cases. Other limits might be triggered.

Another way to increase the number of entities is to split them into multiple activities or macros. If certain entity command only need to be triggered in the on- or off-sequence, without the entity being used anymore as a UI component or button mapping, then these should be moved to a macro. An activity sequence can call multiple macros.

va-lemon commented 1 year ago

Number of entities in an activity & max number of steps will be increased from 50 to 100 in the next release.

That many entities or steps in an activity sequence should be avoided though and only used for special use cases. Other limits might be triggered.

Another way to increase the number of entities is to split them into multiple activities or macros. If certain entity command only need to be triggered in the on- or off-sequence, without the entity being used anymore as a UI component or button mapping, then these should be moved to a macro. An activity sequence can call multiple macros.

Thank you. I have already started to think about streamlining activities (power on/off sequences as well as which entities I add to the activity UI).

You have a fair point about not adding too many entities to an activity. I think this is where item 3 from my original request comes in. The use case is as below:

  1. User starts an activity to watch movies on their projector with an Apple TV and Denon AVR.
  2. There are certain device specific controls that the media_player entity from Home Assistant does not provide. The user has to create a script or button in HA for each one of these controls that then show up as an entity in Remote Two. Examples are picture modes for the projector (Movies, Sports, Games, etc.); audio modes, audio delay, HDMI out selection for the Denon AVR. I also have a powered masking system for my projector screen which can mask off the screen for a 2.4 scope, 2.0 or 16:9 aspect ratios.
  3. There are a set of such controls that the user would need to have quick access to on each activity UI so we can change things like picture modes, audio modes and in my case, the screen mask aspect ratio quickly without needing to leave the current activity.
  4. Each one of these controls get added as one entity to the Remote Two thus increasing the count of entities that get added to each activity that uses the projector, denon AVR etc.
  5. The thought behind item 3 in my original request was that what if instead of adding the same set of controls (picture mode, audio mode, HDMI Out, screen mask selection) to each activity, the user can create the set of controls once (let's say a virtual remote). Then in each activity where I want to use this set of controls, instead of creating a new page and adding entities to that activity then adding them to the new page, the user can choose to link or reference to a page that already exists for the virtual remote. Sort of like a symlink in Unix or alias in macOS.
  6. As an example, I would like to add the controls in this screenshot to each activity that uses the projector. To achieve this today, I would have to add each button as an entity to the activity or create a separate activity (which does not have a power on/off sequence). Downside of separate activity is that you leave the current activity to execute a quick command then come back to your current activity. If there was a way to link to a page between activities and then jump back, that would be great. Screenshot 2023-10-15 at 8 09 08 PM

Sorry about the long post! I hope I was able to clarify the request and I realize it may not fit with the UI architecture.

zehnm commented 1 year ago

Thanks for the explanation! We are aware of the restrictions, especially with the media-player entity, and are working on making it more flexible (e.g. allowing additional custom commands, however this won't solve the HA issues). Supporting remote-entities should make it easier as well.

I'm closing this issue: number of entities and sequence steps was increased from 50 to 100 in 1.4.2. Feel free to open feature requests for the other suggestions.