Repository navigation
Switch to Art Mode when the morning wake lands in TV mode - #8
Merged
Merged
Conversation
A Frame that Art Frames turned on could come up in TV mode and stay there. Every wake path read "power on, Art Mode off" as "someone is watching" and left it, even when Art Frames had just woken it. Now the wake records the TV's state first. If the TV was in standby, off or not answering before our wake signal or key, and then reads TV mode, Art Frames: 1. Reads the state two more times, 10 seconds apart, so a TV that is still starting up can reach Art Mode by itself. 2. Rechecks power and Art Mode on one connection, then asks once for Art Mode (set_artmode). It never sends another power key. 3. Waits up to 15 seconds for Art Mode, and otherwise logs it and leaves the TV. A TV that was on or in an unknown state before the wake is still left alone. The presence wake and the scheduled wake share this step. A wake that ends in TV mode gets its own log line, Health row and analytics outcome, apart from "a TV programme was in progress", and the scheduled wake does not retry it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review changes to the TV mode fix: 1. Only the scheduled wake's first try switches a TV that the wake turned on in TV mode (wake(switch_tv_mode=True)). The presence wake, Turn screen on, Turn on now and the retry leave TV mode alone, as before. 2. "Off before the wake" now needs confirmed standby or off, or no answer on two reads 3 seconds apart. One missed reply from a TV someone watches no longer counts. 3. A TV that was off and still answers with an unclear state after the checks gets the same wait for TV mode, not "state-unknown". 4. television.py logs nothing again; the controller keeps its own wake text. 5. The Health row gives the time and tells the owner to press the remote's power button once to go to Art Mode. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Problem
On 2026-11-30 a Frame TV came on in regular TV mode after Art Frames' morning wake, not in Art Mode. Every wake path read "power on, Art Mode off" as "someone is watching TV" and left the TV alone. This happened even when Art Frames' own wake packet had just turned the TV on.
Change
Tests
tests/test_wake_tv_mode.pycovers: off, then TV mode, then one switch; someone watching before the wake; unknown state before the wake; one missed read; the boot race; a slow start; the switch failing; and the paths that must not switch. Full suite: 2265 passed, 3 skipped. ruff is clean.🤖 Generated with Claude Code