[amazonechocontrol] Handle PUSH_DND_STATE_CHANGE push messages - #21516
Open
ML19821 wants to merge 1 commit into
Open
[amazonechocontrol] Handle PUSH_DND_STATE_CHANGE push messages#21516ML19821 wants to merge 1 commit into
ML19821 wants to merge 1 commit into
Conversation
Toggling do-not-disturb on a device made every such push land in the unknown-command branch and log a WARN (openhab#21339). The event is a documented, well-formed per-device message, so it is now routed like the other per-device pushes and updates the doNotDisturb channel directly instead of waiting for the next poll. Signed-off-by: Martin Littkovsky <2018turtle@proton.me> AI-assisted-by: Claude Code
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.
Toggling do-not-disturb on a device sends
PUSH_DND_STATE_CHANGEover the push stream. That command is not in the switch which routes the per-device pushes, so every toggle lands in the unknown-command branch and logs a WARN (#21339). ThedoNotDisturbchannel only catches up on the next data refresh, up to an hour later.The event is a well-formed per-device message, so it is now routed like the other per-device pushes and updates the channel directly.
I cannot verify this on my own installation: all my Alexa devices are Sonos-based and Amazon sends no push events for those. @clinique, who reported it, has been running a test build since 26 August. That build carries this change unchanged; it was built before three unrelated notification-poll changes landed in main. What would confirm it:
doNotDisturbon one Echo, then toggle do-not-disturb on the device or in the Alexa app — not from openHAB.Detected unknown command from activity stream: PUSH_DND_STATE_CHANGEshould be gone from the log.Two unit tests cover the channel update in both directions. Full bundle suite green (170 tests), static analysis clean.
Fixes #21339
Transparency: this patch and the comments on this PR were written with AI assistance (Claude); every commit carries an
AI-assisted-bytrailer. All changes were built and tested by the author; the push path itself is the part that needs a second installation to confirm. Reviewed against wborn/github-review-policy atca8d3f4d0(2026-08-19) before submission.