UK vending operator
Operations Dashboard for a Vending Fleet
Replacing an evening spreadsheet with one system for stock, refill plans, driver routes and machine alerts. The system proposes; a person approves.
0
False alarms in replay
10 s
Median logging interval
2
Hours warm before an alert
None
Writes to a live machine
What was the problem?
Every evening a member of the team counted stock and worked out the next day's refills by hand in a shared spreadsheet. Drivers opened a tab to find their route. The owner checked takings and sales separately, and a machine running warm or going quiet was only spotted when somebody happened to look.
The owner was clear about one thing from the start: the system should propose the plan and a person should approve it. Nothing should run the business on autopilot.
What did we build?
- The spreadsheet's refill maths, moved into tested code, with the existing sheet imported so nothing had to be retyped.
- A stock page with an automatic evening snapshot, plus refill and route planning screens.
- A private, revocable link for each driver that shows only their own route.
- A propose, edit, approve and publish flow: blocking warnings must be acknowledged, and implausible entries ask "are you sure?" before they save.
- An insights page that sets sales against the weather, bank holidays and school holidays.
- An alert engine for warm fridges and silent machines, with quiet hours and one message per incident.
How does the machine data get in?
Each machine's touchscreen already keeps its own logs. Through secure remote access, a collector copies those logs read-only into a UK-hosted Postgres database. The dashboard never writes to a live machine, and raw readings are never edited.
At the median, the panels log every 10 seconds, and the first pull brought in several days of readings from across the fleet plus a long history of daily sales counts. Live publishing from each panel over encrypted MQTT is built and proven end to end against a simulated panel.
Why don't the alerts cry wolf?
Fridge doors open and machines get restocked, so a simple temperature limit would raise alarms all day. In the recorded data, about nine in ten short warm spells ended on their own within half an hour.
So the warm-fridge rule fires only when a fridge stays above 8°C for two hours, with enough readings and a sensor reporting sane values. Anything that trips overnight is held until morning and sent only if it is still true. Replayed against the recorded data, the rule raised exactly one alert, on the right machine, with no false alarms.
What safeguards are in place?
- Every page is private by default, with a test that fails if a route slips outside the login.
- Sign-in and driver links are rate-limited; driver links are stored hashed and can be revoked.
- Database changes are additive and reversible.
- Alerts go to Serqet only until the rules have been reviewed with the operator.
Where does it stand?
Stock, refill planning, routes and driver links are deployed. Next come live overview cards, then a parallel run beside the spreadsheet before the switch-over, then card-payment data. Alerts reach the operator's team once they have reviewed the rules.
Questions people ask
- How do you stop vending machine temperature alerts raising false alarms?
- By tuning the rule to how the machines really behave. A fridge must stay above 8°C for two hours, with enough readings and a sensor reporting sane values, before anyone is told, and overnight alerts wait until morning and are sent only if still true. Replayed against recorded data, the rule raised one real alert and no false alarms.
- Does the dashboard change anything on the machines?
- No. It copies the touchscreens' own logs read-only into a UK-hosted database and never writes to a live machine.
- Does the system run the business on its own?
- No. It proposes the refill plan and routes, and a person edits and approves them before they are published to drivers.
Technology
- Next.js
- React
- TypeScript
- Postgres (UK region)
- Vercel scheduled jobs
- MQTT over TLS
- Python
- Vitest