Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display timeout on latest Chromecast #229

Open
JohnStrunk opened this issue Feb 10, 2023 · 4 comments · Fixed by #231 or #241
Open

Display timeout on latest Chromecast #229

JohnStrunk opened this issue Feb 10, 2023 · 4 comments · Fixed by #231 or #241
Labels
bug Something isn't working

Comments

@JohnStrunk
Copy link
Owner

JohnStrunk commented Feb 10, 2023

The current generation of "Chromecast with Google TV" seems to have a shorter timeout, so it returns to the screensaver if there is too much delay between races.

Workaround: disable then re-enable the Chromecast Enable "developer options" and set "Stay awake"

@JohnStrunk
Copy link
Owner Author

#231 didn't fix it.

The latest generation of Chromecasts seem to have a general issue w/ this... pending more investigation.

@JohnStrunk
Copy link
Owner Author

Opened a bug report against the Cast SDK related to the timeout issue: https://issuetracker.google.com/issues/282046056

Reopening this to track the above bug report. Current status of WR-specific efforts:

@JohnStrunk JohnStrunk reopened this May 11, 2023
@JohnStrunk JohnStrunk pinned this issue May 13, 2023
@digilinCraig
Copy link

John, sorry if this is completely stupid (my background is not in python programming so perhaps there is some reason it can't be done), but wouldn't the simplest way to avoid the time out be to just implement a simple heartbeat animation - ie put a square in a corner and change its colour every 5 seconds?

@JohnStrunk
Copy link
Owner Author

@digilinCraig You're definitely thinking in the right direction.

On the older Chromecasts, as long as you publish a new image before the timeout, the timeout will reset and all will be good. The code that makes that happen is:

wahoo-results/imagecast.py

Lines 260 to 270 in feddf96

# The refresh thread periodically re-publishes the current image to ensure
# the Chromecast devices don't timeout.
def _start_refresh(self) -> None:
def _refresh_run():
while True:
time.sleep(_REFRESH_INTERVAL)
if self.image is not None:
self.publish(self.image)
self._refresh_thread = threading.Thread(target=_refresh_run, daemon=True)
self._refresh_thread.start()

And the refresh interval is defined at the top:

# Chromecast image refresh interval (seconds)
# Newer versions of the Chromecast firmware seem to have a 10 minute timeout
_REFRESH_INTERVAL = 7 * 60

Unfortunately, the GoogleTV variants don't seem to reset their timeout when you display a new image. This probably wouldn't be an issue if the scoreboard were actually a video stream instead of static PNGs. However, I've resisted using a video stream because I'm concerned about load on the scoreboard computer plus having a good network connection between it and the Chromecast.

So the best I've got is the current "stay awake" workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
2 participants