Skip to content

fix(wake): deep-off Roku TVs wake instead of receiving PowerOff - #22

Merged
gthgomez merged 1 commit into
mainfrom
fix/wake-deep-off
Oct 8, 2026
Merged

gthgomez merged 1 commit into
mainfrom
fix/wake-deep-off

Conversation

@gthgomez

@gthgomez gthgomez commented Oct 8, 2026

Copy link
Copy Markdown
Owner

Investigation summary

Wake flow: dock decision (PowerPresentation) -> WoL burst (UDP 9/7, wifi+eth MACs) + keypress/Home (6s timeout), retry-safe; failures set WAKE_UNAVAILABLE + hint, and the 5s status poller self-heals the chip to Online once the TV answers. That machinery is sound.

Bug found

resolvePowerPresentation only treated standby as "should wake". ECP's deep-off mode (poweroff — including Fast TV Start TVs whose ECP still answers while the panel is off) fell through to PowerOff, dispatching a no-op at exactly the TV the user was trying to wake. The existing RokuPowerMode.isLikelyReachable() flag (false precisely for poweroff) was never consulted.

Fix

Deep-off now joins the wake condition; unknown mode and standby behave as before. 3 regression tests added (deep-off online/offline, displayoff).

Verification

./gradlew :app:assembleDebug :app:testDebugUnitTest — pass; PowerPresentationTest 8/8 green locally.

resolvePowerPresentation treated only standby as wake; ECP powerMode 'poweroff' (deep off, incl. Fast TV Start TVs whose ECP answers while the panel is dark) fell through to PowerOff — a no-op against exactly the TV that needed waking. isLikelyReachable() now joins the wake condition; 3 regression tests added.

Verification: ./gradlew :app:assembleDebug :app:testDebugUnitTest — pass (PowerPresentationTest 8/8)
@gthgomez
gthgomez merged commit df10883 into main Oct 8, 2026
@gthgomez
gthgomez deleted the fix/wake-deep-off branch October 8, 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.

1 participant