Feature/room combination change in progress lockout#1447
Open
equinoy wants to merge 38 commits into
Open
Conversation
…mproved event handling
…for VLAN and PoE changes
…se for missing device
…puts, enhance logging for route mapping
The cache wasn't being cleared correctly, and was an unnecessary add.
…essionRequestHandler
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
… in DebugSessionRequestHandler
…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>
…ses and causing exceptions
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.
…ionOperationTimeoutSeconds default behavior
Contributor
There was a problem hiding this comment.
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.
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>
…ttps://github.com/PepperDash/Essentials into feature/room-combination-change-in-progress-lockout
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.