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]-IEssentialsRoom considerations #935

Open
ngenovese11 opened this issue Apr 21, 2022 · 2 comments
Open

[FEATURE]-IEssentialsRoom considerations #935

ngenovese11 opened this issue Apr 21, 2022 · 2 comments
Labels
enhancement New feature or request planning

Comments

@ngenovese11
Copy link
Contributor

Is your feature request related to a problem? Please describe.
To create a custom room it is required to implement IEssentialsRoom which contains far more than necessary for my use cases.

Describe the solution you'd like
A simpler interface that represents the minimum required implementations for Essentials to load a room.

Additional context

 public interface IEssentialsRoom : IKeyName, IKeyed, IReconfigurableDevice, IRunDefaultPresentRoute, IEnvironmentalControls
  {
    void StartShutdown(eShutdownType type);
    void StartRoomVacancyTimer(eVacancyMode mode);
    void Shutdown();
    void SetRoomOccupancy(IOccupancyStatusProvider statusProvider, int timeoutMinutes);
    void PowerOnToDefaultOrLastSource();
    void SetDefaultLevels();
    void RoomVacatedForTimeoutPeriod(object o);
    BoolFeedback OnFeedback { get; }
    BoolFeedback IsWarmingUpFeedback { get; }
    BoolFeedback IsCoolingDownFeedback { get; }
    IOccupancyStatusProvider RoomOccupancy { get; }
    bool OccupancyStatusProviderIsRemote { get; }
    bool IsMobileControlEnabled { get; }
    IMobileControlRoomBridge MobileControlRoomBridge { get; }
    string SourceListKey { get; }
    SecondsCountdownTimer ShutdownPromptTimer { get; }
    int ShutdownPromptSeconds { get; }
    int ShutdownVacancySeconds { get; }
    eShutdownType ShutdownType { get; }
    EssentialsRoomEmergencyBase Emergency { get; }
    MicrophonePrivacyController MicrophonePrivacy { get; }
    string LogoUrlLightBkgnd { get; }
    string LogoUrlDarkBkgnd { get; }
    eVacancyMode VacancyMode { get; }
    bool ZeroVolumeWhenSwtichingVolumeDevices { get; }
    event EventHandler<EventArgs> RoomOccupancyIsSet;
  }
@ngenovese11 ngenovese11 added the enhancement New feature or request label Apr 21, 2022
@andrew-welker
Copy link
Contributor

Sorry for the delay in replying. I think it totally makes sense to pull out things that aren't core to base room operation and move them into their own interfaces that can be used to composite this existing interface together. Things like Occupancy, Mic Privacy, Emergency, etc can probably all be moved to their own interfaces. Make some proposals in what you'd like to see broken out and we can get the work done.

@ngenovese11
Copy link
Contributor Author

No worries in the delay; I had hopes of going through and proposing a solution along with this then got busy.

I would think it would make sense to have a similar construct to the plugin device...

psuedo:

public abstract class EssentialRoom : IKeyed
{
 public EssentialsRoom(string key, string name) => this.Key = Key; this.Name = name;
}

public abstract class EssentialsBridgeableRoom : EssentialsRoom, IBridgeAdvanced
{

}

public abstract class EssentialsPluginRoomFactory<T> where T : EssentialsRoom
{
  public abstract EssentialsRoom Build(Config config)
}

This way we can use interfaces to represent features and keep a consistent construct across Devices & Rooms.

I have not dove into what this might actually mean in code if we want to keep backwards compatibility with existing rooms within essentials.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request planning
Projects
None yet
Development

No branches or pull requests

3 participants