Berkay Bakaç

← Back to the map

Case study · Devices · audio

AnnounceFlow

Staff run the store’s music and announcements from a browser, and a Raspberry Pi keeps them playing after the office PC is switched off.

Even after staff switch off the office PC, the store’s speaker has to follow its schedule and fall quiet at prayer time.

documented deployment locations
Four
playlist track starts logged across two stores
2,700+
engineer for design, releases and support
Sole

Stack: Python · Flask · SQLite · Raspberry Pi · Windows

Where the music lives

Staff upload music, schedule announcements and set the volume in a browser. Flask serves that panel from the store’s Raspberry Pi. The Pi keeps the audio files locally, and SQLite holds the playlist order, settings and timetable. Closing the browser or switching off the PC leaves the scheduler running.

For a live source, a Windows agent captures audio already playing on the PC and sends it across the store network. The Pi feeds it to the same speaker without recording it. Staff can use a live source without first adding it to their music library.

The operator panel shows music playing while two noon announcements appear on the timeline and in the upcoming list.The operator panel shows music playing while two noon announcements appear on the timeline and in the upcoming list.
The real panel with sample media.

Two announcements are due at noon

The timetable can give two announcements the same start time. I queue them by due time, then arrival, and leave a gap between them. A prayer pause can hold an announcement until the pause ends, provided the announcement is still within its deadline.

A prayer pause also saves the playlist position. Music can continue with the next track afterward. If staff press Stop during the pause, their choice survives. I store that choice separately because an audio process exiting tells me nothing about whether staff wanted the music to resume.

Finding the interruption in a live stream

When staff reported interrupted audio, I put sender heartbeats, receiver restarts and buffer faults on one timeline. A stream ID ties the two ends together, so I can investigate a single session and count it once even if its receiver restarted.

By default the receiver records when it would restart. If recovery is enabled, it spaces out restarts, caps how often they run and checks again whether staff stopped the stream. I test the moment when someone presses Stop just as a restart is about to run.

What the store logs can tell me

The October 2026 deployment record lists four locations. Across two stores the logs contain 2,700+ playlist track starts. At one store, every catalogued scheduled dispatch in the measured window had a player-start entry with the same filename within ten seconds. The store logs give the dates for each measurement.

When I update a working Pi, I preserve the library, schedules and saved settings. I test the database migration against older releases, check that the scheduler is running after restart and check the speaker output separately.