github MaxGramser/homeassistant_espscreen screens-v0.4.112
Tessera 0.4.112 · firmware 0.71.0

59 minutes ago

Tessera 0.4.112 · firmware 0.71.0

A hotfix for screens with a speaker: a screen no longer restarts as a sound starts to play.

What was broken

A screen with a speaker could restart the moment a sound started: a tap sound, a ring, a chime, an alert's sound or a live camera's sound. The more sounds it played, the more often it happened. On a 7-inch Guition with the tap sound and a camera with sound on its page, it came after 20 to 30 taps.

ESPHome's speaker prepares a new buffer for itself in the background each time it starts. The screen handed it the first piece of a sound at that very moment, and now and then that piece reached the buffer just as it was being replaced. The screen now waits until the speaker runs, a few hundredths of a second, before it hands it any sound. Every sound goes through that one rule, so a sound plays as before, just without the restart.

Tested

  • The cause. Two troubleshooting reports from 7-inch Guitions, one on the release before and one on an earlier dev build, carried the same crash. Decoded with a build of the exact same configuration, both stopped in the speaker's buffer, handed over from the screen's main loop while the speaker was starting. The release's own 7-inch, a test with 190 rings in a row, did not show it: it comes rarely and depends on timing, so this fix follows the reports and ESPHome's own code.
  • The upgrade. On a Home Assistant with the release before (app 0.4.111, firmware 0.70.0), five screens built this release from GitHub with the app's own ESPHome and took it over Wi-Fi: a 4-inch Guition (ESP32-S3), a CYD (ESP32), a 10.1-inch Guition (ESP32-P4 v3.2), a reTerminal D1001 and a 7-inch Guition (both ESP32-P4 v1.3). Each came back online on 0.71.0 with its pages and settings as they were. The 7-inch and the D1001 then rang ten times each without a restart, and the D1001's ring, which its speaker takes at 48 kHz through the resampler this fix is about, was heard in the room.
  • The checks. The project's whole check passed on the release commit: 2,550 Python tests, 103 C++ tests (one new one for the rule), the editor's tests and the preview's. CI's checks passed too. CI builds every board for this commit on three ESPHome versions; the release went out while that build, which takes about four hours, was still running.

How to get it

Update Tessera Screen Manager in Home Assistant, then use Update on each screen. A screen you install from ESPHome Device Builder gets the fix with its next install there, once the app is updated.

Thank you to the people who sent troubleshooting reports with the steps that brought it on. They made the cause plain.

Don't miss a new homeassistant_espscreen release

NewReleases is sending notifications on new releases.