Skip to content

Feature/room combination change in progress lockout#1447

Open
equinoy wants to merge 38 commits into
mainfrom
feature/room-combination-change-in-progress-lockout
Open

Feature/room combination change in progress lockout#1447
equinoy wants to merge 38 commits into
mainfrom
feature/room-combination-change-in-progress-lockout

Conversation

@equinoy

@equinoy equinoy commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

This pull request introduces several important enhancements and new interfaces to the Essentials Framework, focused on improved device abstraction, network switch management, and complete room combiner operation lifecycle visibility. It also adds scenario-aware completion signaling so clients can distinguish operation completion from scenario reconciliation completion.

Device Abstractions and Interfaces

Introduced IHasWirelessSharing and supporting event args to standardize detection of wireless presentation activity across devices such as AirMedia, Solstice, and ClickShare. This enables consumers to react to wireless sharing without depending on concrete implementations.
Added new interfaces for network switch management:
INetworkSwitchVlanManager for querying and setting VLANs on ports.
INetworkSwitchPoeManager for controlling PoE state per port.
INetworkSwitchPoeVlanManager for devices supporting both VLAN and PoE, including eventing for port state changes.
Marked IMobileControlMessengerWithSubscriptions as obsolete, clarifying that all messengers are now subscription-based and directing developers to use IMobileControlMessenger.
Room Combiner Operation Lifecycle

Enhanced EssentialsRoomCombiner to implement IEssentialsRoomCombinerWithOperationStatus, exposing a detailed operation lifecycle for scenario changes: Idle, InProgress, Completed, Failed, and TimedOut.
Added public operation visibility through CombinationOperationStatus and CombinationOperationStatusChanged.
Added timeout configuration and enforcement (default 300 seconds, overrideable via config).
Added automatic status transitions and error handling during scenario changes.
Scenario-Aware Completion (New)

Added scenario-aware reconciliation signaling to support robust true-completion checks after operation status transitions.
Explicit reconciliation contract members are:
ScenarioReconciled
ScenarioReconciledScenarioKey
ScenarioReconciledChanged
This allows clients to verify that the active scenario is actually reconciled, not only that a scenario change request has finished.
This was first implemented for CameraManager, but it is intentionally generic. Any device that exposes the same reconciliation contract can be used by the same completion model.
Other Improvements

Improved partition sensor robustness in EssentialsPartitionController by handling null references safely.
Added HasActiveConnections to DebugWebsocketSink for monitoring active WebSocket connections.
Minor cleanup and formatting updates in DebugWebsocketSink.
These changes collectively improve framework extensibility, reliability, and client/integrator visibility into both operation progress and scenario-reconciled completion.

ndorin and others added 30 commits March 20, 2026 12:03
The cache wasn't being cleared correctly, and was an unnecessary
add.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…criptions as obsolete

All messengers are now subscription based in v3.x, making these
constructs no longer necessary.

Closes #1435

Agent-Logs-Url: https://github.com/PepperDash/Essentials/sessions/bda64c9c-5343-412b-801f-5e60816bc38d

Co-authored-by: ndorin <18535240+ndorin@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Updated the summary comment for EnableMessengerSubscriptions property to clarify its purpose.
Co-authored-by: ndorin <18535240+ndorin@users.noreply.github.com>
EssentialsPartitionController.PartitionPresent threw a NullReferenceException in Auto mode when the partition sensor's PartitionPresentFeedback was not yet initialized, breaking combiner fullStatus serialization to MC clients. Fall back to the last-known _partitionPresent value instead of dereferencing a null sensor feedback.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR expands the Essentials Framework’s device abstractions (wireless sharing + network switch management) and adds end-to-end visibility for room-combiner scenario changes via an operation lifecycle/status model, with related Mobile Control messaging updates and debug-websocket quality-of-life improvements.

Changes:

  • Introduces new device interfaces for wireless sharing detection and network switch VLAN/PoE management.
  • Adds a room-combiner operation lifecycle (Idle/InProgress/Completed/Failed/TimedOut), configuration for timeout, and Mobile Control message payload support.
  • Improves debug websocket session handling (port-forwarding timeout logic + connection visibility) and makes a few API/message serialization adjustments.

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/PepperDash.Essentials.MobileControl/MobileControlConfig.cs Marks messenger-subscription config as obsolete and adjusts docs/usings.
src/PepperDash.Essentials.MobileControl.Messengers/Messengers/MessengerBase.cs Adds MessageBasePath into posted status messages.
src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IEssentialsRoomCombinerMessenger.cs Publishes combiner operation status changes and includes status in full state.
src/PepperDash.Essentials.MobileControl.Messengers/Messengers/DeviceStateMessageBase.cs Marks Interfaces payload obsolete and suppresses null serialization.
src/PepperDash.Essentials.MobileControl.Messengers/Messengers/DeviceMessageBase.cs Suppresses null serialization for key/name/type/basePath fields.
src/PepperDash.Essentials.Core/Web/RequestHandlers/GetFeedbacksForDeviceRequestHandler.cs Changes “device not found” behavior to return an empty JSON payload.
src/PepperDash.Essentials.Core/Web/RequestHandlers/DebugSessionRequestHandler.cs Adds CS LAN port-forwarding timeout support and a fallback URL.
src/PepperDash.Essentials.Core/Secrets/SecretsManager.cs Moves provider logging to provider logger + modernizes string formatting.
src/PepperDash.Essentials.Core/Routing/Extensions.cs Adjusts routing device filtering/logging and removes “impossible route” caching.
src/PepperDash.Essentials.Core/Room/Combining/IEssentialsRoomCombiner.cs Adds optional operation-status extension interface + status DTO/enum.
src/PepperDash.Essentials.Core/Room/Combining/EssentialsRoomCombinerPropertiesConfig.cs Adds configurable combination-operation timeout setting.
src/PepperDash.Essentials.Core/Room/Combining/EssentialsRoomCombiner.cs Implements the operation lifecycle, timeout, and “scenario reconciled” completion gating.
src/PepperDash.Essentials.Core/PartitionSensor/EssentialsPartitionController.cs Hardens partition-present feedback against null sensor references.
src/PepperDash.Essentials.Core/DeviceTypeInterfaces/INetworkSwitchControl.cs Adds new VLAN/PoE management interfaces + event args/types.
src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IMobileControlMessengerWithSubscriptions.cs Marks the interface obsolete in favor of subscription-by-default messengers.
src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IHasWirelessSharing.cs Adds standardized wireless sharing feedback + event contract.
src/PepperDash.Core/Logging/DebugWebsocketSink.cs Exposes HasActiveConnections for the debug websocket server.
README.md Documents the room-combiner operation lifecycle and config.
Comments suppressed due to low confidence (1)

src/PepperDash.Essentials.Core/Routing/Extensions.cs:354

  • sinks/sources are already filtered to exclude IRoutingInputsOutputs when they are created, but the foreach loops apply the same filter again. This redundancy adds noise and makes it easier for the two filters to drift over time.
                foreach (var sink in sinks.Where(d => !(d is IRoutingInputsOutputs)))
                {
                    foreach (var source in sources.Where(d => !(d is IRoutingInputsOutputs)))
                    {

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IHasWirelessSharing.cs Outdated
Comment thread src/PepperDash.Essentials.Core/Web/RequestHandlers/DebugSessionRequestHandler.cs Outdated
Comment thread src/PepperDash.Essentials.Core/Secrets/SecretsManager.cs Outdated
equinoy and others added 7 commits July 15, 2026 14:36
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@equinoy
equinoy requested review from aknous, ndorin and ngenovese11 July 15, 2026 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants