Remove Sonos event filtering to allow all events processing#1
Open
majamassarini wants to merge 2 commits intodevfrom
Open
Remove Sonos event filtering to allow all events processing#1majamassarini wants to merge 2 commits intodevfrom
majamassarini wants to merge 2 commits intodevfrom
Conversation
bb6daff to
bea40ed
Compare
The previous event filtering waited for command confirmation but caused two main problems: 1. Events from remote devices (physical remotes, other apps) were dropped during the 1-second waiting window 2. Non-matching event types were discarded when expecting a specific response New approach uses time-based filtering to prevent command echo events: - After sending configuration commands (mode, playlist, volume), record timestamp - Ignore pause/play events for 3 seconds after configuration commands - Process all other events immediately (stop, volume) - After timeout, process pause/play events normally This fixes the circadian rhythm forced state problem where Sonos sends pause during mode/playlist reconfiguration, causing the state machine to exit forced circadian rhythm state prematurely. Trade-off: User actions via Sonos app or physical controls during the 3-second window after config commands will be ignored. Assisted-By: Claude Sonnet 4.5 <noreply@anthropic.com>
d9ae1b7 to
ea78877
Compare
The command echo problem (Sonos sending pause/play events during reconfiguration that incorrectly unforce appliance states) is now handled at the automate-home level via two new scheduler trigger types: - state.entering.disable_events.Trigger: immediately disables forced.Event.Off in the appliance state machine when entering a playing state (Fade In, Forced On, Forced Circadian Rhythm). - state.entering.delay.enable_events.Trigger: re-enables it after 30 seconds so legitimate user stop/pause commands are processed again. The gateway now passes all Sonos events through without any filtering. The suppression window is configured entirely in the automate-home scheduler trigger YAML. Assisted-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ea78877 to
ffd48ac
Compare
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.
No description provided.