Hey everyone,
I wanted to share a quick troubleshooting guide for a frustrating issue I recently solved. While setting up an Android tablet with Fully Kiosk Browser, I tried to display a dynamically updating screensaver image (downloaded periodically via a bash script). However, Fully Kiosk kept showing a black screen or stubbornly displaying an old, cached image.
Here is how to ensure your dynamic screensaver updates smoothly without black screens:
1. Bypass Fully Kiosk Cache with a Camera Entity
Don’t use the standard image: tag in your dashboard cards (like picture-elements) for frequently updating files, as Fully Kiosk’s WebView caches them aggressively. Instead, create a Local File camera entity and use camera_image: camera.my_screensaver. Home Assistant creates a dynamic proxy stream with a token for cameras, which automatically bypasses the browser cache.
Important Note: As of HA 2024.11, configuring local_file cameras via configuration.yaml is deprecated and can cause “Account is already configured” errors. You should add the Local File integration exclusively via the UI (Settings > Devices & services).
2. Fix the “Black Screen” Race Condition (Atomic Updates)
If you use a shell_command or bash script to fetch the new background, you might get a persistent black screen. This happens because Home Assistant tries to read the file the exact millisecond it’s being downloaded or while permissions are being applied, resulting in a 404 error that the frontend caches.
The fix is using atomic file updates: Do not overwrite the live image directly and do not change permissions after moving it.
- Download the new image to a temporary file (e.g.,
temp.jpg). - Apply the correct read permissions to the temp file:
chmod 644 temp.jpg - Then overwrite the live file using the move command:
mv temp.jpg current_bg.jpg
By applying chmod before mv, the new file instantly replaces the old one with the correct permissions already intact. The Home Assistant web server will never encounter an unreadable or partially downloaded file.
I hope this helps anyone building a wall panel!