Skip to content
Profile
E. Burgos
November 17, 2026By Esteban Burgos5 min read

DisplayAds: change what all your screens show from a single panel, in real time

#DisplayAds#Cartelería digital#WebSocket#NestJS#Tiempo real

When a business has screens in a single shop window, changing what they show is a small chore. When it has ten branches, each with one or several screens, it becomes a logistics problem: someone has to go there, or call, or trust that every location updated its own player. With DisplayAds I set out to solve that with a single panel where you decide what is shown, where and when, and the change reaches the screens with nobody going on site.

The problem

A new promotion, a price change or an outdated notice has to reach every screen at once. If each player is updated by hand, one of them always keeps showing the old content. Also, not every screen should show the same thing: what works in the downtown branch may not work in the neighborhood one.

How the fleet is organized

The model has three levels, and all three exist in the code as separate assignments of a campaign:

  • Device: one specific screen, with its own player.
  • Branch (location): all the screens in one store. Each location also has its own time zone.
  • Group: a set you build yourself, for example all the branches in a region or all the counter screens. A device can belong to several groups.

How a campaign is scheduled for each level

A campaign has a name, start and end dates, days of the week and time windows, and an ordered list of pieces with their duration and orientation (landscape or portrait). Then you assign targets: devices, branches, groups, or a mix.

If I assign the campaign to a branch, all its screens receive it, including any added to that store later. If I assign it to a group, the group members receive it. And if I assign it to a device, only that screen does.

What happens when two campaigns overlap in the same time slot? The most specific one wins: a campaign assigned directly to a device outweighs its branch's, and that one outweighs a group's. On a tie, the most recent wins. That lets me define a general campaign for the whole chain and an exception for one particular screen without touching the general one.

Schedules are evaluated in each location's time zone, not the server's. A "9 to 1" window means the same thing in every store.

What happens on the screen when you change something

This is the part I like most. When I save a change to a campaign, the system works out which devices are affected, adding the direct ones, the ones in the branches and the ones in the groups, without repeating any. That job runs on a background queue so the panel does not stall. For each device, the current playlist is recalculated and sent over WebSocket (Socket.io) with an update command. The screen receives the new list and changes what it plays, with nobody going on site.

When a screen comes back online, the agent reports its status periodically, and the server only resends the playlist when it detects that it changed. In addition, the agents keep media in a local cache and re-evaluate time windows on their own; the Android one does so at most every 30 seconds, so switching a time window on or off does not depend on the network.

Remote control and monitoring

The panel shows whether each device is online. Presence is computed from each device's heartbeat: if more than two minutes pass without a signal, a process that runs every minute marks it offline. Status changes and health reports reach the panel in real time over the same WebSocket channel, in one room per organization, so each customer sees only their own fleet.

From the panel you can send remote commands: reboot the device, restart the app, clear the cache, request a status report and preload a media file. Reboot requires delivery confirmation: if the device is offline or does not answer in time, the system says so instead of showing a false success. For large fleets, the device list is filtered on the server by branch and by group before paginating.

A short technical paragraph

The API is NestJS with Prisma on PostgreSQL, Redis for presence, cache and Socket.io rooms, and Bull for queues. The panel is React. There are two device agents: one in Python 3.11 for Raspberry Pi and one native in Kotlin for Android, with video playback through ExoPlayer and kiosk mode. Every command is addressed to a per-device room.

What I take away

What this product taught me most is that the value lies in a simple hierarchy (device, branch, group) combined with reliable delivery: the change arrives, and the panel tells the truth when it did not. If you are interested in how remote fleet problems get solved, or you have a similar case, write to me on LinkedIn and we can talk it over. You can see more about DisplayAds at https://estebanburgos.com.ar/productos/display-ads.

Written by Esteban Burgos

Comments

Be the first to comment.